Tabular data processing methods, devices, equipment, media, and products
By adding parent description records and configuring display identifiers to the table data, the problem of data not being able to be collapsed or expanded in the grid layout is solved, achieving a clear display of the hierarchical structure and dynamic data viewing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-31
- Publication Date
- 2026-04-07
AI Technical Summary
Existing technologies that use grid layouts for table data display cannot support data folding or unfolding, resulting in poor display quality.
By adding a parent description record and configuring a display identifier for at least two operation records with the same data identifier, and combining the displayable attributes of the table data display page for data rendering, a hierarchical structure display that can be collapsed or expanded can be achieved.
It enables the display of tabular data in a grid layout with a collapsed or expanded hierarchical structure, providing users with clearer data classification, saving space, facilitating quick information location, and supporting dynamic collapsed or expanded operations.
Smart Images

Figure CN119292497B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer processing technology, and more particularly to a method, apparatus, device, medium, and product for processing tabular data. Background Technology
[0002] Currently, when displaying list data using a grid layout based on virtual scrolling, the absolute position of each grid cell is usually set, with each grid occupying a specific row and column position. Then, the list data is rendered based on the position and size of each grid, so that the data content of the list data is rendered and displayed in the grid.
[0003] However, this grid-based layout method can only support the display of tiled data and cannot support the display of data folding or unfolding, resulting in poor display effects. Summary of the Invention
[0004] This disclosure provides a method, apparatus, device, medium, and product for processing tabular data, which achieves the display of tabular data in a grid layout with a collapsed or expanded hierarchical structure, while providing users with clearer tabular data classification, allowing users to dynamically view tabular data by collapsing or expanding according to their needs.
[0005] In a first aspect, embodiments of this disclosure provide a method for processing tabular data, the method comprising:
[0006] In response to a trigger operation to display a table data display page, the list data of the table data display page is obtained, wherein the list data includes at least one operation record corresponding to the table data, and the operation record includes at least a data identifier of the data to be displayed;
[0007] Add a parent description record and configure the display identifier of the parent description record for at least two operation records with the same data identifier to obtain updated list data; wherein, the display identifier is used to indicate whether the data to be displayed in the at least two operation records associated with the parent description record is presented in the table data display page;
[0008] Based on the updated list data and the displayable attributes of the table data display page, data rendering is performed to obtain the target data presented on the table data display page; wherein, the target data is the data in the data to be displayed in the operation record.
[0009] Secondly, embodiments of this disclosure also provide a tabular data processing apparatus, the apparatus comprising:
[0010] The list data acquisition module is used to acquire list data of the table data display page in response to a trigger operation that displays the table data display page. The list data includes at least one operation record corresponding to the table data, and the operation record includes at least a data identifier of the data to be displayed.
[0011] The list data update module is used to add a parent description record for at least two operation records with the same data identifier and configure the display identifier of the parent description record to obtain updated list data; wherein, the display identifier is used to indicate whether the data to be displayed in the at least two operation records associated with the parent description record is presented in the table data display page;
[0012] The target data display module is used to render data based on the updated list data and the displayable attributes of the table data display page to obtain the target data presented on the table data display page; wherein, the target data is the data in the data to be displayed in the operation record.
[0013] Thirdly, embodiments of this disclosure also provide an electronic device, the electronic device comprising:
[0014] One or more processors;
[0015] Storage device for storing one or more programs.
[0016] When the one or more programs are executed by the one or more processors, the one or more processors implement the tabular data processing method as described in any of the embodiments of this disclosure.
[0017] Fourthly, embodiments of this disclosure also provide a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform the tabular data processing method as described in any of the embodiments of this disclosure.
[0018] Fifthly, embodiments of this disclosure also provide a computer program product, including a computer program that, when executed by a processor, implements the tabular data processing method as described in any of the embodiments of this disclosure.
[0019] The technical solution provided in this disclosure, in response to a trigger operation to display a table data display page, obtains list data of the table data display page. The list data includes at least one operation record corresponding to the table data, and the operation record includes at least a data identifier of the data to be displayed. Parent description records are added to at least two operation records with the same data identifier, and a display identifier for the parent description records is configured to obtain updated list data. The display identifier is used to indicate whether the data to be displayed in the at least two operation records associated with the parent description record is presented on the table data display page. Data rendering is performed based on the updated list data and the displayable attributes of the table data display page to obtain the target data presented on the table data display page. The target data is the data in the data to be displayed in the operation records, solving the problem of using a grid layout in the prior art. The inability to fold or expand data, resulting in poor display quality, was addressed by adding a parent description record to at least two operation records with the same data identifier in the list data and configuring the display identifier of the parent description record. Then, data rendering is performed using the displayable attributes of the table data display page and the updated list data. During the data rendering process, the display identifier is used to determine whether to present the data to be displayed from at least two operation records associated with the parent description record on the table data display page. This allows for the display of table data in a folded or expanded hierarchical structure within a grid layout, providing users with clearer table data categorization, saving space in the grid layout, and enabling users to quickly locate the information they need. Furthermore, users can dynamically view the list data according to their needs through folding or expanding operations. Attached Figure Description
[0020] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale.
[0021] Figure 1 A flowchart illustrating a tabular data processing method provided in an embodiment of this disclosure;
[0022] Figure 2 This is a timing diagram representing a tabular data processing method according to an embodiment of this disclosure;
[0023] Figure 3 This is a schematic diagram illustrating the representation and display of target data according to an embodiment of this disclosure;
[0024] Figure 4 A flowchart illustrating a tabular data processing method provided in an embodiment of this disclosure;
[0025] Figure 5 This is a schematic diagram provided by an embodiment of the present disclosure for characterizing and displaying target data;
[0026] Figure 6 This is a schematic diagram of the structure of a tabular data processing device provided in an embodiment of the present disclosure;
[0027] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation
[0028] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.
[0029] It should be understood that the steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.
[0030] The term "comprising" and its variations as used herein are open-ended inclusions, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below.
[0031] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.
[0032] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".
[0033] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
[0034] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained.
[0035] For example, upon receiving a user's active request, a prompt message is sent to the user to explicitly inform them that the requested operation will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the software or hardware, such as the electronic device, application, server, or storage medium performing the operations of this disclosed technical solution, based on the prompt message.
[0036] As an optional but non-limiting implementation, in response to a user's active request, sending a prompt message to the user can be done via a pop-up window, where the prompt message can be presented in text format. Furthermore, the pop-up window can also include a selection control allowing the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0037] It is understood that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of this disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of this disclosure.
[0038] It is understood that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and related provisions.
[0039] Before introducing this technical solution, an example of its application scenarios can be provided. This technical solution can be applied to any scenario where data needs to be displayed in a collapsed or expanded hierarchical structure. For example, in a table component that supports virtual scrolling, if you want to display table data in a collapsed or expanded hierarchical structure within a grid layout, you can use the technical solution provided in the embodiments of this disclosure.
[0040] Figure 1 This is a flowchart illustrating a tabular data processing method provided in an embodiment of the present disclosure. This embodiment is applicable to any scenario where tabular data needs to be displayed in a folded and unfolded hierarchical structure. The method can be executed by a tabular data processing device, which can be implemented in software and / or hardware, or optionally by an electronic device, such as a mobile terminal, a PC, or a server.
[0041] like Figure 1 As shown, the method in this embodiment may specifically include:
[0042] S110. In response to a trigger operation that displays a table data display page, obtain list data from the table data display page. The list data includes at least one operation record corresponding to the table data, and the operation record includes at least the data identifier of the data to be displayed.
[0043] The tabular data display page refers to a page that displays multiple operation records from a list of data in tabular form. These operation records can be arranged in a linear order, for example, arranged sequentially by row dimension. Each operation record may correspond to one or more grids. If there is only one grid, it contains all the data for that operation record; if there are multiple grids, each grid contains a portion of the data for that operation record. The data to be displayed can refer to the specific data within the operation records. Data identifiers can be identifying information used to distinguish data at different levels. For example, a data identifier could be a time, indicating that data from the same time period is at the same level; a data identifier could be a department, indicating that data from the same department is at the same level; or a data identifier could be a project, indicating that data from the same project is at the same level. Alternatively, the data identifier could simply indicate that the data to be displayed belongs to the same level. For example, when viewing historical operation records in a table component, the historical operation records include multiple operation records. Each operation record is a row of data in the list data. Each operation record includes information such as change time, operation user, change type, and change content. Any one of the change time, operation user, change type, and change details can be used as a data identifier. If the change time is used as the data identifier, it indicates that operation records with the same change time are in the same level. This allows operation records in the same level to be represented in a grid format while being collapsed or expanded.
[0044] In this embodiment, opening a table component used to display list data is considered a response to a trigger operation to display the table data display page; alternatively, importing the list data to be displayed into the table component is considered a response to a trigger operation to display the table data display page; or triggering a control used to display the table data display page is considered a response to a trigger operation to display the table data display page. Furthermore, the list data to be displayed on the table data display page can be obtained so that the list data can be processed to achieve a collapsed or expanded hierarchical display effect.
[0045] For example, the table component can be a variable-size grid component that supports virtual scrolling, see [link to relevant documentation]. Figure 2When a user opens the table component, the table component passes the list data to the hierarchy manager, which is responsible for processing this data so that it can be displayed in a hierarchical structure in a tabular format. For example, the list data includes five operation records, represented as: {[1, a], [2, a], [3, b], [4, b], [5, c]}; each array represents one operation record. In this case, 1, 2, 3, 4, and 5 represent the data to be displayed, and a, b, and c represent the data identifiers to which the data to be displayed belongs. Based on this, we know that the data to be displayed 1 and 2 correspond to a data identifier a, the data to be displayed 3 and 4 correspond to a data identifier b, and the data identifier for the data to be displayed 5 is c.
[0046] S120. Add a parent description record for at least two operation records with the same data identifier and configure the display identifier of the parent description record to obtain the updated list data.
[0047] In this context, the parent description record refers to the record directly above the operation record. The parent description record can contain information describing its child records, such as the number of child records, operation information on the child records, time, record identifier, etc. In the hierarchical structure, the operation record can be called a child, and the record directly above the child is the parent description record. The display identifier is used to indicate whether the data to be displayed in at least two operation records associated with the parent description record is presented on the table data display page. The display identifiers of different parent description records can be the same or different.
[0048] In this embodiment, it can be determined whether there are at least two operation records with the same data identifier in the list data. If so, it means that the at least two operation records corresponding to the data identifier belong to the same level. A parent description record can be created for the at least two operation records corresponding to the data identifier, and the parent description record can be written into the list data. If only one operation record in the list data is associated with a certain data identifier, a parent description record is not created for it. At the same time, in order to have a collapsible and expandable display effect, a display identifier can be configured for each parent description record according to the collapsible display requirements. The list data after adding parent description records can be used as the updated list data. At this time, the updated list data includes the parent description record and its child operation records, as well as operation records with data identifiers that are not the same as other operation records. When displaying the list data, the parent description record can be displayed to show the parent-level record of the operation record, and the display identifier determines whether to display at least two operation records associated with the parent description record. For example, the display identifier is set to 1 to indicate that it is not displayed, and the display identifier is set to 2 to indicate that it is displayed; or, the display identifier is set to empty to indicate that it is not displayed, and the display identifier is set to have a value to indicate that it is displayed.
[0049] For example, see [link to previous article] Figure 2 After receiving the list data, the hierarchy manager can calculate the hierarchical relationship between operation records and the position of each operation record in the hierarchy structure based on the fields in the operation records. It then inserts a parent description record corresponding to at least two operation records based on their positions. For example, in the list data, [1, a] and [2, a] have the same data identifier 'a', so a parent description record 0 is created for these two operation records. Parent description record 0 can be represented as [0, '', a]. Simultaneously, the display identifier for all parent description records is set to an identifier where the data to be displayed in at least two operation records associated with the parent description record is not presented on the table data display page. This means that the data to be displayed does not follow the parent description record and is displayed hidden in a collapsed manner. For example, the display identifier can be set to empty (or represented by other values).
[0050] It should be noted that in order to display a hierarchical list effect, a parent description record can be written before at least two operation records with the same data identifier, so that when displayed, the parent description record can be placed above its subordinate operation records, presenting a hierarchical display effect.
[0051] In this embodiment, adding a parent description record and configuring a display identifier for the parent description record for at least two operation records with the same data identifier to obtain updated list data includes: when at least two operation records are detected to have the same data identifier, inserting a parent description record at the operation record where the data identifier first appears, and configuring a display identifier for the parent description record; the at least two operation records are child operation records under the parent description record; after the operation records with the same data identifier in the list data are processed, the updated list data is obtained.
[0052] Specifically, each operation record in the list data can be traversed to check if at least two operation records share the same data identifier. If so, a parent description record can be inserted before (or at an appropriate position) the first operation record encountered among these at least two operation records, ensuring that the parent description record comes first, and subsequent child operation records are displayed accordingly. A display identifier is then configured for this parent description record. After traversing the list data, a list data with the inserted parent description record is obtained, so that when displaying the list data, the parent description record is displayed above these at least two operation records, presenting a hierarchical display effect.
[0053] For example, the original list data is: {[1, a], [2, a], [3, b], [4, b], [5, c]}. There are two operation records with data identifier 'a', so a parent description record [0, '', a] is inserted before [1, a]. There are two operation records with data identifier 'b', so a parent description record [0, '', b] is inserted before [3, b], that is, between [3, b] and its preceding record [2, a]. After processing, the updated list data is: {[0, '', a], [1, a], [2, a], [3, b], [4, b], [5, c], [0, '', b]}.
[0054] S130. Render the data based on the updated list data and the displayable attributes of the table data display page to obtain the target data presented on the table data display page.
[0055] The target data refers to the data to be displayed in the operation log. Displayable attributes can refer to information used to restrict the data displayed on the page. For example, displayable attributes include, but are not limited to, font, color, size, background, margins, etc.
[0056] In this embodiment, the displayable attributes of the table data display page can be combined to determine which data in the updated list data needs to be rendered, and then these data are rendered. When rendering a parent description record, the display flag of the parent description record can be used to determine whether its child operation records should be displayed. If displayed, they can be rendered in a normal display state; if not displayed, they can be rendered in a hidden display state. The rendered target data can then be displayed on the table data display page, allowing users to see a list data with a hierarchical, collapsible display effect.
[0057] In this embodiment, the displayable attributes include the displayable data height of the table data display page. Accordingly, the implementation method for rendering data based on the updated list data and the displayable attributes of the table data display page to obtain the target data presented in the table data display page can be as follows: determine the displayable quantity based on the displayable data height and the data height of each piece of data to be displayed, and read the row data in the list data sequentially according to the displayable quantity; if the data content of the row data is a parent description record, then render the parent description record, and render at least two operation records associated with the parent description record according to the display identifier of the parent description record to obtain the target data presented in the table data display page.
[0058] The displayable data height refers to the vertical space available on the page for displaying data. The data height of each piece of data to be displayed refers to the vertical space occupied by the data to be displayed on the page; the data height of each piece of data to be displayed can be the same or different.
[0059] Specifically, if the height of each piece of data to be displayed is the same, the height of the displayable data can be used as the quotient of the height of the data to be displayed, and the quotient value can be used as the displayable quantity. It should be noted that if the calculation result is a decimal, it can be rounded down to the nearest integer to ensure that complete operation records are displayed. Further, row data in the list data can be read sequentially according to the displayable quantity. During the reading of row data, it is simultaneously checked whether the row data is a parent description record. If so, the parent description record is rendered in a normal display state, and the rendering of at least two operation records associated with the parent description record is determined based on the display identifier of the parent description record. If the display identifier is a hidden identifier, the operation record is rendered in a hidden display state; if the display identifier is a displayed identifier, the operation record is rendered in a normal display state. If the row data is an operation record without a parent description record, the operation record is rendered in a normal display state, so that it is displayed normally on the page, obtaining the target data and displaying it. It should be noted that if the display identifier of the parent description record is set to not display the data to be processed, then the number of at least two operation records associated with the parent description record is not included in the rendering count. When each record in a normal display state is rendered, the rendering count is automatically incremented by 1 to make the rendering count match the displayable count, ensuring that the appropriate number of records can be displayed normally within the given displayable data height.
[0060] It's important to note that if the height of each record to be displayed is different, when initially displaying the list data, you can start from the first record (which could be the parent description record or an operation record) and sequentially add up the heights of each record that needs to be rendered correctly. This ensures the accumulated height matches the height of the displayable data. In this way, the number of records displayed on the table data display page can be dynamically adjusted each time. It's also worth noting that there may be margins and padding between operation records and between records and page edges, which can occupy additional height. Therefore, the height of the displayable data can be dynamically adjusted based on this additional height to ensure a smooth list display.
[0061] In this embodiment, rendering at least two operation records associated with the parent description record based on the display identifier of the parent description record includes: if the display identifier of the parent description record is a first identifier, then the data to be displayed in the at least two operation records associated with the parent description record is rendered to a first height; if the display identifier corresponding to the parent description record is a second identifier, then the data to be displayed in the at least two operation records associated with the parent description record is rendered to a second height.
[0062] The first identifier is the identifier for data to be displayed that includes at least two operation records. The first height can be the height of the data to be displayed in the list when it is normally displayed. The second identifier is the identifier for data to be displayed that does not include at least two operation records, and the second height can be the height of the data to be displayed in the list when it is collapsed.
[0063] Specifically, if the parent description record's display identifier is detected as the first identifier, it means its child operation records need to be displayed normally on the page. In this case, the data to be displayed in at least two operation records associated with the parent description record can be rendered to the first height, so that the operation records are displayed at the normal height. If the parent description record's display identifier is detected as the second identifier, it means its child operation records need to be collapsed and displayed on the page. In this case, the data to be displayed in at least two operation records associated with the parent description record can be rendered to the second height, so that the operation records are displayed at the second height. For example, the first height can be set to the normal height, and the second height can be set to 0 (or a sufficiently small value). The advantage of setting the second height is that the height of the data to be displayed on the page is the second height, making it visually invisible and achieving the effect of collapsing and hiding.
[0064] For example, see [link to previous article] Figure 2 When the table component renders to a parent description record, it queries the hierarchy manager to determine the record's display identifier. If the display identifier is the first identifier, it means the parent description record's child operation records are in an open state, and the table component will render all child operation records of that parent description record. If the display identifier is the second identifier, it means the parent record's child operation records are in a collapsed state, and the table component will render the child operation records and set their height to 0 to hide them. A diagram illustrating the target data can be found in [link to diagram]. Figure 3 , Figure 3 Records A and C are parent description records. Their child operation records are hidden, while child operation records without parent description records are displayed normally.
[0065] The technical solution provided in this embodiment renders not only the parent description record but also the operation record, achieving a collapsing or expanding effect by controlling the height of the child operation records. When the display identifier of the parent description record is the first identifier, its child operation records are in a collapsed state, and their height is set to the second height, making them visually invisible. When the display identifier of the parent description record is the second identifier, its child operation records are in an expanded state, and their height is set to the normal height value, making them visually visible. Thus, when child operation records are collapsed or expanded, it is not necessary to recalculate the height of the entire list; only the height of the affected record grid needs to be updated. This ensures that the position and size of the child operation records are correctly updated when they are collapsed or expanded, ensuring that the page layout does not become chaotic or unstable due to the collapse or expansion operation, thereby improving the usability of the user interface.
[0066] The technical solution provided in this disclosure, in response to a trigger operation to display a table data display page, obtains list data of the table data display page. The list data includes at least one operation record corresponding to the table data, and the operation record includes at least a data identifier of the data to be displayed. Parent description records are added to at least two operation records with the same data identifier, and a display identifier for the parent description records is configured to obtain updated list data. The display identifier is used to indicate whether the data to be displayed in the at least two operation records associated with the parent description record is presented on the table data display page. Data rendering is performed based on the updated list data and the displayable attributes of the table data display page to obtain the target data presented on the table data display page. The target data is the data in the data to be displayed in the operation records, solving the problem of the lack of display functionality in the prior art through grid layout. The previous method of collapsing or expanding data resulted in poor display effects. This solution addresses this issue by adding a parent description record to at least two operation records with the same data identifier in the list data and configuring the display identifier of the parent description record. Then, data rendering is performed using the displayable attributes of the table data display page and the updated list data. During the data rendering process, the display identifier is used to determine whether to present the data to be displayed from at least two operation records associated with the parent description record on the table data display page. This allows for a hierarchical structure of collapsible or expanded table data within a grid layout, providing users with a clearer classification of operation records, saving space in the grid layout, and enabling users to quickly locate the information they need. Furthermore, it allows users to dynamically view list data according to their needs through collapsible or expanded operations.
[0067] Figure 4This is a flowchart illustrating a tabular data processing method provided in an embodiment of this disclosure. Based on the above embodiments, the technical solution of this embodiment can further respond to triggering operations by a target user on a tabular data display page, determine the triggering data identifier of the triggered target data, and if the triggering data identifier is the data identifier of a parent description record in the list data, update the display identifier of the parent description record to re-execute the data rendering operation based on the updated display identifier, thereby obtaining the target data in the tabular data display page. For detailed implementation methods, please refer to the detailed description of the embodiments of this disclosure. Technical features that are the same as or similar to those in the foregoing embodiments will not be repeated here.
[0068] like Figure 4 As shown, the method in this embodiment may specifically include:
[0069] S210. In response to the target user's triggering operation on the table data display page, determine the trigger data identifier of the target data that was triggered.
[0070] The triggering operations include, but are not limited to, clicks, touches, and swipes.
[0071] It should be noted that the target data presented on the data page includes the record data of the parent description record and / or operation record. In this embodiment, the target user can perform a certain operation on the table data display page, such as clicking, touching, or selecting a record data. When it is detected that the target user has triggered an operation on a record data on the table data display page, the data identifier corresponding to the triggered record data can be determined as the trigger data identifier.
[0072] For example, the record data of a parent description record displayed on the data page can be associated with a control used to trigger the expansion or collapse of its child operation records, or the control can be configured in the record data of the parent description record. When it is detected that a target user clicks the control associated with the parent description record, the triggered record data of the parent description record can be used as the target data for the trigger. The trigger data identifier in the record data of the parent description record can be used to describe the uniqueness of the parent description record.
[0073] S220. If the triggering data identifier is the data identifier of the parent description record in the list data, then update the display identifier of the parent description record, and re-execute the data rendering operation based on the updated display identifier to obtain the target data in the table data display page.
[0074] In this embodiment, if the triggered data identifier is detected to be the data identifier of the parent description record in the list data, it indicates that the target user wants to expand or collapse the sub-operation record of the parent description record. At this time, the display identifier of the parent description record can be updated. For example, if the display identifier is the first identifier, it indicates that the current sub-operation record is in an expanded state and needs to be collapsed and hidden; the display identifier can be updated to the second identifier. If the display identifier is the second identifier, it indicates that the current sub-operation record is in a collapsed and hidden state and needs to be expanded; the display identifier can be updated to the first identifier. In other words, updating the display identifier of the parent description record includes: updating the display identifier of the parent description record from the first identifier to the second identifier, or updating the display identifier of the parent description record from the second identifier to the first identifier. Furthermore, when the display identifier of the parent description record is updated, the data rendering operation can be re-executed based on the updated display identifier. After re-rendering, the table data display page will present the updated target data, enabling users to expand or collapse the hierarchical structure by clicking on records, thereby dynamically viewing or hiding record data at different levels.
[0075] For example, see Figure 3 When a user clicks on a parent description record (e.g., record A) to expand or view its child operation records, the table component notifies the hierarchy manager to change the display identifier of record A from "collapse identifier (i.e., second identifier)" to "expand identifier (i.e., first identifier)." Since the hierarchy manager has updated the display identifier of record A, the table component needs to re-render the list data. When rendering child operation records, the table component notifies the hierarchy manager to determine the display identifier of its parent record. If it is the "expand identifier," the table component will render and display all related child operation records. A diagram illustrating the presented target data can be found in [link to diagram]. Figure 5 Otherwise, the sub-operation record is rendered, and its height is set to 0 to hide it. This ensures that the hierarchical structure can be expanded or collapsed, allowing for dynamic viewing or hiding of data at different levels.
[0076] In this embodiment, the page data processing method further includes: responding to the triggering operation of sliding to display table data on the page, rendering data based on the sliding position, displayable attributes, and updated list data to obtain target data.
[0077] The swipe position is used to represent the initial row number read from the list data. The swipe position can also indicate the distance the user has swiped or the offset of the current page relative to the entire list data.
[0078] Specifically, a slider (or other sliding control) can be pre-configured. Target users can drag (e.g., up or down) the slider to browse the list data on the table data display page. Based on this, when a sliding operation to display the table data is detected, the current sliding position is determined. Then, based on the sliding position, the displayable data height of the table data display page, and the data height of records after the last record normally displayed on the page, the record to be rendered is determined, and the rendering operation is re-executed according to the display identifier of the parent record. After re-rendering, the table data display page will present the target data dynamically rendered based on the user's sliding position and the updated list data, enabling users to browse the list data by sliding records.
[0079] The technical solution provided in this disclosure determines the trigger data identifier of the target data in response to the trigger operation of the target user on the table data display page; if the trigger data identifier is the data identifier of the parent description record in the list data, the display identifier of the parent description record is updated, and the data rendering operation is re-executed based on the updated display identifier to obtain the target data in the table data display page. This enables the target user to collapse or expand the record by triggering the target data, thereby dynamically viewing or hiding the sub-operation record.
[0080] Figure 6 This is a schematic diagram of the structure of a tabular data processing device provided in an embodiment of the present disclosure, as shown below. Figure 6 As shown, the device includes: a list data acquisition module 310, a list data update module 320, and a target data display module 330.
[0081] The system includes a list data acquisition module 310, which acquires list data from the table data display page in response to a trigger operation that displays the table data display page. The list data includes at least one operation record corresponding to the table data, and each operation record includes at least a data identifier for the data to be displayed. A list data update module 320 adds a parent description record to at least two operation records with the same data identifier and configures a display identifier for the parent description record to obtain updated list data. The display identifier indicates whether the data to be displayed in the at least two operation records associated with the parent description record is presented on the table data display page. A target data display module 330 performs data rendering based on the updated list data and the displayable attributes of the table data display page to obtain target data presented on the table data display page. The target data is the data in the data to be displayed within the operation records.
[0082] Based on the above-mentioned device, optionally, the list data update module 320 includes:
[0083] A parent description record determination unit is configured to insert a parent description record at the location where the data identifier first appears when at least two operation records are detected to have the same data identifier, and to configure a display identifier for the parent description record; wherein the at least two operation records are child operation records under the parent description record;
[0084] The list data update unit is used to obtain updated list data after the operation records with the same data identifier in the list data have been processed.
[0085] Based on the above-described device, optionally, the displayable attributes include the displayable data height of the table data display page, and the target data display module 330 includes:
[0086] The row data reading unit is used to determine the number of rows that can be displayed based on the height of the displayable data and the height of each data to be displayed, and to read the row data in the list data sequentially according to the number of rows that can be displayed.
[0087] The target data determination unit is used to render the parent description record if the row data is a parent description record, and to render at least two operation records associated with the parent description record according to the display identifier of the parent description record, so as to obtain the target data presented in the table data display page.
[0088] Based on the above-mentioned apparatus, optionally, the target data determination unit includes:
[0089] The first height rendering unit is configured to render the data to be displayed in at least two operation records associated with the parent description record to a first height if the display identifier of the parent description record is a first identifier; wherein, the first identifier is an identifier for presenting the data to be displayed in the at least two operation records.
[0090] The second height rendering unit is used to render the data to be displayed of at least two operation records associated with the parent description record to the second height if the display identifier corresponding to the parent description record is the second identifier; wherein the second identifier is an identifier that does not present the data to be displayed in the at least two operation records.
[0091] Optionally, based on the above-described apparatus, the apparatus may further include:
[0092] The trigger data identifier determination unit is used to determine the trigger data identifier of the target data in response to the trigger operation of the target user on the table data display page;
[0093] The display identifier update unit is used to update the display identifier of the parent description record if the trigger data identifier is the data identifier of the parent description record in the list data, so as to re-execute the data rendering operation based on the updated display identifier and obtain the target data in the table data display page.
[0094] Optionally, based on the above-described device, the display identifier update unit is used to update the display identifier of the parent description record from a first identifier to a second identifier, or to update the display identifier of the parent description record from a second identifier to a first identifier.
[0095] Optionally, based on the above-described apparatus, the apparatus may further include:
[0096] A sliding rendering unit is used to respond to a trigger operation that slides to display the table data display page, and to render data according to the sliding position, the displayable attributes, and the updated list data to obtain the target data; wherein, the sliding position is used to represent the starting row number of the list data to be read.
[0097] The technical solution of this disclosure embodiment, in response to a trigger operation to display a table data display page, obtains list data of the table data display page. The list data includes at least one operation record corresponding to the table data, and the operation record includes at least a data identifier of the data to be displayed. Parent description records are added to at least two operation records with the same data identifier, and a display identifier for the parent description records is configured to obtain updated list data. The display identifier is used to indicate whether the data to be displayed in the at least two operation records associated with the parent description record is presented on the table data display page. Data rendering is performed based on the updated list data and the displayable attributes of the table data display page to obtain the target data presented on the table data display page. The target data is the data in the data to be displayed in the operation records, solving the problem that the existing technology cannot use grid layout to display the data. To address the issue of poor display quality caused by data folding or unfolding, this paper implements a method that adds a parent description record to at least two operation records with the same data identifier in the list data and configures the display identifier of the parent description record. Then, data is rendered using the displayable attributes of the table data display page and the updated list data. During the data rendering process, the display identifier is used to determine whether to present the data to be displayed from at least two operation records associated with the parent description record in the table data display page. This allows for the display of table data in a folded or unfolded hierarchical structure within a grid layout, providing users with clearer grid data categorization, saving space in the grid layout, and making it easier for users to quickly locate the information they need. Furthermore, it allows users to dynamically view list data according to their needs through folding or unfolding operations.
[0098] The tabular data processing apparatus provided in this disclosure can execute the tabular data processing method provided in any embodiment of this disclosure, and has the corresponding functional modules and beneficial effects for executing the method.
[0099] It is worth noting that the various units and modules included in the above-mentioned device are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be realized; in addition, the specific names of each functional unit are only for easy differentiation and are not used to limit the protection scope of the embodiments of this disclosure.
[0100] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Figure 7 As shown, electronic device 400 may include a processing device (e.g., a central processing unit, a graphics processor, etc.) 401, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 402 or a program loaded from storage device 408 into random access memory (RAM) 403. RAM 403 also stores various programs and data required for the operation of electronic device 400. Processing device 401, ROM 402, and RAM 403 are interconnected via bus 404. Input / output (I / O) interface 405 is also connected to bus 404.
[0101] Typically, the following devices can be connected to I / O interface 405: input devices 406 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 407 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 408 including, for example, magnetic tapes, hard disks, etc.; and communication devices 409. Communication device 409 allows electronic device 400 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 7 An electronic device 400 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.
[0102] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication device 409, or installed from storage device 408, or installed from ROM 402. When the computer program is executed by processing device 401, it performs the functions defined in the methods of embodiments of this disclosure.
[0103] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
[0104] The electronic device provided in this disclosure and the tabular data processing method provided in the above embodiments belong to the same inventive concept. Technical details not described in detail in this disclosure can be found in the above embodiments, and this embodiment has the same beneficial effects as the above embodiments.
[0105] This disclosure provides a computer storage medium storing a computer program that, when executed by a processor, implements the tabular data processing method provided in the above embodiments.
[0106] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0107] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol) and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.
[0108] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.
[0109] The aforementioned computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to:
[0110] In response to a trigger operation to display a table data display page, the list data of the table data display page is obtained, wherein the list data includes at least one operation record corresponding to the table data, and the operation record includes at least a data identifier of the data to be displayed;
[0111] Add a parent description record and configure the display identifier of the parent description record for at least two operation records with the same data identifier to obtain updated list data; wherein, the display identifier is used to indicate whether the data to be displayed in the at least two operation records associated with the parent description record is presented in the table data display page;
[0112] Based on the updated list data and the displayable attributes of the table data display page, data rendering is performed to obtain the target data presented on the table data display page; wherein, the target data is the data in the data to be displayed in the operation record.
[0113] Computer program code for performing the operations of this disclosure can be written in one or more programming languages or a combination thereof, including but not limited to object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0114] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0115] The units described in the embodiments of this disclosure can be implemented in software or in hardware. The name of a unit does not necessarily limit the unit itself; for example, the first acquisition unit can also be described as "a unit that acquires at least two Internet Protocol addresses".
[0116] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.
[0117] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0118] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.
[0119] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments.
[0120] Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative examples of implementing the claims.
Claims
1. A method for processing tabular data, characterized in that, include: In response to a trigger operation to display a table data display page, the list data of the table data display page is obtained, wherein the list data includes at least one operation record corresponding to the table data, and the operation record includes at least a data identifier of the data to be displayed; wherein the data identifier is identification information used to distinguish data at different levels; Add a parent description record and configure the display identifier of the parent description record for at least two operation records with the same data identifier to obtain updated list data; wherein, the display identifier is used to indicate whether the data to be displayed in the at least two operation records associated with the parent description record is presented in the table data display page; Based on the updated list data and the displayable attributes of the table data display page, data rendering is performed to obtain the target data presented on the table data display page; wherein, the target data is the data in the data to be displayed in the operation record; The parent description record is a newly added record at the next higher level in addition to the original operation record, and includes at least one of the following: the number of child records, operation information on the child records, time, and record identifier. The display identifier is either a first identifier or a second identifier. The first identifier indicates that the child operation records of the parent description record are in an open state, and the table component will render all the child operation records of the parent description record. The second identifier indicates that the child operation record of the parent description record is in a collapsed state. The table component will render the child operation record and set the height of the child operation record to 0 to hide it.
2. The method according to claim 1, characterized in that, The process of adding a parent description record for at least two operation records with the same data identifier and configuring the display identifier of the parent description record to obtain updated list data includes: When at least two operation records are detected to have the same data identifier, a parent description record is inserted at the operation record where the data identifier first appears, and a display identifier is configured for the parent description record; wherein, the at least two operation records are child operation records under the parent description record; After the operation records with the same data identifier in the list data are processed, the updated list data is obtained.
3. The method according to claim 1, characterized in that, The displayable attributes include the displayable data height of the table data display page. The step of rendering data based on the updated list data and the displayable attributes of the table data display page to obtain the target data presented on the table data display page includes: Based on the height of the displayable data and the height of each piece of data to be displayed, the number of data that can be displayed is determined, and the row data in the list data is read sequentially according to the number of data that can be displayed; If the row data is a parent description record, then the parent description record is rendered, and at least two operation records associated with the parent description record are rendered according to the display identifier of the parent description record, so as to obtain the target data presented in the table data display page.
4. The method according to claim 3, characterized in that, The rendering of at least two operation records associated with the parent description record based on the display identifier of the parent description record includes: If the display identifier of the parent description record is a first identifier, then the data to be displayed in at least two operation records associated with the parent description record will be rendered at a first height; wherein, the first identifier is an identifier for presenting the data to be displayed in the at least two operation records; If the display identifier corresponding to the parent description record is the second identifier, then the data to be displayed in at least two operation records associated with the parent description record will be rendered at the second height; wherein, the second identifier is an identifier that does not present the data to be displayed in the at least two operation records.
5. The method according to claim 1, characterized in that, The method further includes: In response to a target user's triggering action on the table data display page, determine the triggering data identifier of the target data being triggered; If the trigger data identifier is the data identifier of the parent description record in the list data, then the display identifier of the parent description record is updated, and the data rendering operation is re-executed based on the updated display identifier to obtain the target data in the table data display page.
6. The method according to claim 5, characterized in that, Updating the display identifier of the parent description record includes: Update the display identifier of the parent description record from the first identifier to the second identifier, or update the display identifier of the parent description record from the second identifier to the first identifier.
7. The method according to claim 1 or 5, characterized in that, The method further includes: In response to the trigger operation of sliding to display the table data display page, data rendering is performed based on the sliding position, the displayable attributes, and the updated list data to obtain the target data; The sliding position is used to represent the starting row number of the list data to be read.
8. A tabular data processing device, characterized in that, include: The list data acquisition module is used to acquire list data of the table data display page in response to a trigger operation that displays the table data display page. The list data includes at least one operation record corresponding to the table data, and the operation record includes at least a data identifier of the data to be displayed. The data identifier is identification information used to distinguish data at different levels. The list data update module is used to add a parent description record for at least two operation records with the same data identifier and configure the display identifier of the parent description record to obtain updated list data; wherein, the display identifier is used to indicate whether the data to be displayed in the at least two operation records associated with the parent description record is presented in the table data display page; The target data display module is used to render data based on the updated list data and the displayable attributes of the table data display page to obtain the target data presented on the table data display page; wherein, the target data is the data in the data to be displayed in the operation record; The parent description record is a newly added record at the next higher level in addition to the original operation record, and includes at least one of the following: the number of child records, operation information on the child records, time, and record identifier. The display identifier is either a first identifier or a second identifier. The first identifier indicates that the child operation records of the parent description record are in an open state, and the table component will render all the child operation records of the parent description record. The second identifier indicates that the child operation record of the parent description record is in a collapsed state. The table component will render the child operation record and set the height of the child operation record to 0 to hide it.
9. An electronic device, characterized in that, The electronic device includes: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the tabular data processing method as described in any one of claims 1-7.
10. A storage medium containing computer-executable instructions, characterized in that, The computer-executable instructions, when executed by a computer processor, are used to perform the tabular data processing method as described in any one of claims 1-7.
11. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the tabular data processing method as described in any one of claims 1-7.
Citation Information
Patent Citations
Table rendering display method and device, computer equipment and storage medium
CN112765947A