Data rendering method and device, electronic equipment and readable storage medium
By obtaining the location data of the cell in the table component and displaying the attribute configuration list, users can update the attributes of the cell, solve the problem of poor visualization and readability in the existing technology, and achieve more efficient and flexible data processing And rendering.
Patent Information
- Application Number
- CN202411426009.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-12
- Publication Date
- 2025-01-28
AI Technical Summary
The prior art lacks the function of personalizing the cell styles in table components, resulting in poor visualization and readability of data.
By responding to the user's to -process data selection instruction, obtain the location data of the cell, and display the attribute configuration list based on this location data. Users can choose the target attribute data for the attribute update processing, and finally treat processing data for rendering.
Improve the efficiency and accuracy of data processing, reduce the difficulty of maintenance, support data visualization, enhance the readability of data, and improve the flexibility of data processing.
Smart Images

Figure CN119376817A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of data processing technology, and in particular to a method, device, electronic device and readable storage medium for data rendering. Background Art
[0002] In the application process of the user interface construction framework, the functions of the table can be realized through the corresponding table component. The table component is browser-oriented and provides efficient and concise API (Application Programming Interface) design, modular tables, and on-demand loading. It fully utilizes the responsive characteristics of the user interface construction framework and the advantages of component-based development. The basic functions of the table component include data display and operation, table configuration and customization, performance optimization, as well as interaction and expansion. The existing technology can realize basic table operations in the table component, but lacks the function of personalized modification of cell styles.
[0003] It can be seen that the existing technology has the problem of poor data visualization and readability due to the inability to perform modification functions such as marking and reminding key data. Summary of the invention
[0004] In view of this, the embodiments of the present disclosure provide a method, device, electronic device and readable storage medium for data rendering to solve the problem in the prior art of poor data visualization and readability due to the inability to perform modification functions such as marking and reminding key data.
[0005] According to a first aspect of an embodiment of the present disclosure, a method for data rendering is provided, including: in response to a to-be-processed data selection instruction, obtaining position data corresponding to the to-be-processed data; displaying an attribute configuration list according to the position data corresponding to the to-be-processed data; in response to an attribute selection instruction, obtaining target attribute data corresponding to the attribute configuration list; based on the target attribute data corresponding to the attribute configuration list, performing attribute update processing on the to-be-processed data to obtain attribute update data; and rendering processing on the to-be-processed data based on the attribute update data.
[0006] A second aspect of an embodiment of the present disclosure provides a data rendering device, including: a first acquisition module, used to obtain position data corresponding to the data to be processed in response to a data selection instruction to be processed; a first processing module, used to display an attribute configuration list according to the position data corresponding to the data to be processed; a second acquisition module, used to obtain target attribute data corresponding to the attribute configuration list in response to the attribute selection instruction; a second processing module, used to perform attribute update processing on the data to be processed based on the target attribute data corresponding to the attribute configuration list to obtain attribute update data; and a third processing module, used to render the data to be processed based on the attribute update data.
[0007] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the computer program.
[0008] According to a fourth aspect of an embodiment of the present disclosure, a readable storage medium is provided, which stores a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.
[0009] Compared with the prior art, the embodiments of the present disclosure have the following beneficial effects: by responding to a to-be-processed data selection instruction issued by a user, the location data of the selected to-be-processed data is obtained; based on the location data, an attribute configuration list can be displayed in a location area represented by the location data; the user can determine the target attribute data selected in the attribute configuration list by issuing an attribute selection instruction; and then, attribute update processing can be performed on the to-be-processed data through the target attribute data to obtain attribute-updated data; and the to-be-processed data can be rendered according to the updated attributes in the attribute update data, thereby improving the efficiency and accuracy of data processing, reducing the difficulty of maintenance, supporting data visualization, enhancing the readability of data, and improving the flexibility of data processing. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0011] Figure 1 is a schematic diagram of an application scenario of an embodiment of the present disclosure;
[0012] Figure 2 is a flowchart of a data rendering method provided by an embodiment of the present disclosure;
[0013] Figure 3 is a structural schematic diagram of a data rendering device provided by an embodiment of the present disclosure;
[0014] Figure 4 It is a structural schematic diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0015] In the following description, specific details such as specific system structures and technologies are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present disclosure. However, it should be clear to those skilled in the art that the present disclosure may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid obstructing the description of the present disclosure with unnecessary details.
[0016] It should be noted that the user information (including but not limited to terminal device information, user personal information, etc.) and data (including but not limited to data for display, data for analysis, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties.
[0017] A method and device for data rendering according to an embodiment of the present disclosure will be described in detail below with reference to the accompanying drawings.
[0018] Figure 1 Schematic diagram of an application scenario of an embodiment of the present disclosure. The application scenario may include terminal devices 1, 2 and 3, a server 4 and a network 5.
[0019] Terminal devices 1, 2 and 3 can be hardware or software. When terminal devices 1, 2 and 3 are hardware, they can be various electronic devices with display screens and supporting communication with server 4, including but not limited to smart phones, tablet computers, laptop portable computers and desktop computers, etc.; when terminal devices 1, 2 and 3 are software, they can be installed in the above electronic devices. Terminal devices 1, 2 and 3 can be implemented as multiple software or software modules, or as a single software or software module, and the embodiments of the present disclosure are not limited to this. Furthermore, various applications can be installed on terminal devices 1, 2 and 3, such as data processing applications, instant messaging tools, social platform software, search applications, shopping applications, etc.
[0020] The server 4 may be a server that provides various services, for example, a background server that receives a request sent by a terminal device that establishes a communication connection with the server, and the background server may receive and analyze the request sent by the terminal device, and generate a processing result. The server 4 may be a single server, or a server cluster composed of several servers, or a cloud computing service center, which is not limited in the embodiments of the present disclosure.
[0021] It should be noted that the server 4 can be hardware or software. When the server 4 is hardware, it can be various electronic devices that provide various services for the terminal devices 1, 2, and 3. When the server 4 is software, it can be multiple software or software modules that provide various services for the terminal devices 1, 2, and 3, or it can be a single software or software module that provides various services for the terminal devices 1, 2, and 3, and the embodiments of the present disclosure are not limited to this.
[0022] The network 5 can be a wired network connected by coaxial cable, twisted pair and optical fiber, or it can be a wireless network that can interconnect various communication devices without wiring, such as Bluetooth, Near Field Communication (NFC), infrared, etc., which is not limited in the embodiments of the present disclosure.
[0023] The user can establish a communication connection with the server 4 via the network 5 through the terminal devices 1, 2 and 3 to receive or send information, etc. Specifically, the server 4 can respond to the to-be-processed data selection instructions of the terminal devices 1, 2 and 3 to obtain the location data of the selected to-be-processed data; based on the location data, the attribute configuration list can be displayed in the location area represented by the location data; the user can determine the target attribute data selected in the attribute configuration list by issuing an attribute selection instruction; and then the to-be-processed data can be updated with the target attribute data to obtain the data after the attribute update; the to-be-processed data can be rendered according to the updated attributes in the attribute update data.
[0024] It should be noted that the specific types, quantities and combinations of the terminal devices 1, 2 and 3, the server 4 and the network 5 can be adjusted according to the actual needs of the application scenario, and the embodiments of the present disclosure are not limited to this.
[0025] Figure 2 It is a flowchart of a data rendering method provided by an embodiment of the present disclosure. Figure 2 The data rendering method can be Figure 1 The server executes. Figure 2 As shown, the data rendering method includes:
[0026] Step 201 : in response to a to-be-processed data selection instruction, obtain position data corresponding to the to-be-processed data.
[0027] Specifically, in response to an instruction issued by a user through a graphical user interface to select data to be processed, the data to be processed can be located by parsing the instruction information and matching it with the row and column mapping relationship of the currently displayed spreadsheet or data table, wherein user operations of the graphical user interface include but are not limited to mouse clicks or keyboard input, etc., and the instruction information may be the position coordinates of the click event, etc., which are not limited here. After locating the data to be processed, the position data corresponding to the data to be processed is obtained, and the position data includes row numbers and column numbers, etc., which are not limited here, thereby improving the efficiency and accuracy of data processing. Since the position data of the selected cell can be responded to instantly and accurately obtained, the flexibility and maintainability of the data are improved.
[0028] Among them, the data to be processed can be the data selected by the user in the current operation, including but not limited to text, numerical values, or cells, etc., and the data to be processed can be used for rendering-related processing such as style rendering or data modification; the data to be processed selection instruction can be an operation instruction issued through a graphical user interface, and the data to be processed selection instruction can be used to indicate the identified or selected data to be processed, and the data to be processed selection instruction can be triggered by the user's interactive behavior, and the user's interactive behavior includes but is not limited to mouse clicks or keyboard input, etc.; the position data corresponding to the data to be processed can be the position identification of the data to be processed, including but not limited to row number, column number, and / or coordinate information, etc., and the position data corresponding to the data to be processed can be obtained by parsing the data to be processed selection instruction and combining the row and column structure or data structure of the table, wherein the data structure includes but is not limited to a two-dimensional array or a document object model (DOM) tree, etc.
[0029] For example, in an expandable table, the data to be processed may be cells. The user may click on the cells with the mouse, locate the selected cells by parsing the cell selection instructions, and obtain the row number and column number of the selected cells as position data.
[0030] Step 202: Display the attribute configuration list according to the location data corresponding to the data to be processed.
[0031] Specifically, by parsing the location data corresponding to the data to be processed, a property configuration list can be dynamically generated and displayed at the location represented by the location data corresponding to the data to be processed, thereby enhancing the flexibility of data processing, so that the processing strategy can be adjusted according to the specific needs of different locations; improving the user experience, and the user can observe the relevant configuration options for the location of the data to be processed or the target location; and improving the intelligence level, by automatically matching and displaying the property configuration, reducing manual intervention and improving processing efficiency and accuracy.
[0032] Among them, the attribute configuration list can be a structured display, which includes various configurable attributes of the data to be processed for the location data, including but not limited to environmental parameters, device status, or rendering options. The attributes in the attribute configuration list can be obtained through database query, API call, or preset rule mapping, etc., and are not limited here. The attributes in the attribute configuration list can be used to guide subsequent data processing, resource allocation, or user interaction, etc.
[0033] For example, in the above-mentioned expandable table, the specific position of the selected cell in the expandable table can be determined according to the row number and column number of the selected cell, and a property configuration list can be dynamically generated at this position. The property configuration list may include various options for rendering the cell, including but not limited to adding background color, adjusting cell font, and / or adjusting cell font size, etc.
[0034] Step 203: In response to the attribute selection instruction, obtain target attribute data corresponding to the attribute configuration list.
[0035] Specifically, it can respond to an attribute selection instruction from a graphical user interface. The attribute selection instruction can be triggered by a user by clicking, checking, or entering a keyword, etc., which is not limited here. The attribute selection instruction can be used to specify a specific attribute item in the attribute configuration list, and then the corresponding target attribute data can be retrieved and obtained in the attribute configuration list or a data source associated with the attribute configuration list according to the attribute item identifier determined by the attribute selection instruction. The target attribute data corresponding to the attribute configuration list can be a specific data value or parameter set related to the target attribute item selected by the user, which is not limited here. The target attribute data corresponding to the attribute configuration list can be obtained by database query, file reading, or API interface call, etc., thereby enhancing the immediacy of user interaction, and can dynamically obtain target attribute data as needed, thereby improving the pertinence of data processing, and improving response speed and flexibility.
[0036] Among them, the attribute selection instruction can be a clear instruction issued by the user to the system through an interactive method, wherein the interactive method includes but is not limited to clicking a button or selecting a drop-down menu, etc. The attribute selection instruction can be used to represent the target attribute item that the user needs to view or operate; the target attribute data corresponding to the attribute configuration list can be the specific data retrieved through the attribute configuration list according to the attribute selection instruction, and the target attribute data corresponding to the attribute configuration list can be used to represent the specific value or parameter information of the attribute item specified by the user.
[0037] For example, in the above-mentioned expandable table, the target attribute required by the user can be determined according to the attribute selection instruction input by the user, and the target attribute data corresponding to the attribute configuration list can be obtained based on the target attribute component corresponding to the attribute configuration list. For example, the user can choose to fill the cell with a green background color, and the target attribute data can be the red, green, and blue color mode (Red Green Blue, RGB) parameters corresponding to green.
[0038] Step 204 , based on the target attribute data corresponding to the attribute configuration list, perform attribute update processing on the data to be processed to obtain attribute update data.
[0039] Specifically, the target attribute data corresponding to the attribute configuration list can be parsed and identified, and the target attribute data corresponding to the attribute configuration list can be matched with the data to be processed. The attribute update operation can be performed by comparing the current attribute state of the data to be processed with the target attribute data, that is, the target attribute data is applied to the corresponding data to be processed, replacing or supplementing the original attribute information, which can include modifications to the attributes of the data to be processed, such as content, style, format, or metadata, which are not limited here. Then, the attribute update data can be obtained, thereby enhancing the flexibility of data processing and dynamically adjusting the attribute data of the data to be processed; improving data consistency and accuracy, enhancing user experience and system efficiency, reducing the tedious steps of manually modifying data attributes, and speeding up the data processing process.
[0040] The attribute update data may be an attribute data set of the data to be processed after the attribute update process, and the attribute update data may include updated attribute information, and the updated attribute information may be obtained by attribute matching and replacement.
[0041] For example, the data to be processed may be all cells in a table, and the target attribute data corresponding to the attribute configuration list may be the target attribute data "students in school" and the conditions corresponding to the target attribute data. The condition may be that the occupation is "student". Then, by traversing each cell in the table, it is possible to check whether the occupation field of each cell is "student". If so, the value of the field is updated to "students in school", and the attribute update data can be obtained.
[0042] Step 205: Render the data to be processed based on the attribute update data.
[0043] Specifically, it can receive attribute update data and render the data to be processed according to the attribute update data. The rendering process includes but is not limited to updating the display content of the data to be processed, adjusting the style of the data to be processed, changing the size or position of the data to be processed, etc., thereby enhancing the visualization of the data and allowing users to observe the effect of the data update; improving interactivity and response speed, and enhancing user experience and processing efficiency.
[0044] For example, in a table containing sales data, fields may include product name, sales quantity, and sales amount, etc. The received updated sales data may be used as attribute update data, and then the cells corresponding to the products may be rendered. The rendering process may include updating the sales value to a new value, and adjusting the color or font size of the cell according to preset style rules, such as highlighting sales that exceed a threshold to highlight changes in the data.
[0045] According to the technical solution provided by the embodiment of the present disclosure, by responding to the to-be-processed data selection instruction issued by the user, the location data of the selected to-be-processed data is obtained; based on the location data, the attribute configuration list can be displayed in the location area represented by the location data; the user can determine the target attribute data selected in the attribute configuration list by issuing an attribute selection instruction; and then, the to-be-processed data can be attribute updated through the target attribute data to obtain the attribute-updated data; the to-be-processed data can be rendered according to the updated attributes in the attribute update data, thereby improving the efficiency and accuracy of data processing, reducing the difficulty of maintenance, supporting data visualization, enhancing the readability of data, and improving the flexibility of data processing.
[0046] In some embodiments, before obtaining the location data corresponding to the data to be processed in response to the instruction for selecting the data to be processed, it also includes: obtaining a preset attribute data set; and performing configuration processing on the preset attribute data set to obtain an attribute configuration list.
[0047] Specifically, a preset attribute data set can be obtained through database query, file reading, or user input. The preset attribute data set contains predefined attributes that can be used for configuring the data to be processed, including but not limited to the font style, color, border, and / or alignment of the video cell. The preset attributes can then be configured and processed, and an attribute configuration list can be obtained through operations such as filtering, sorting, combining, and / or mapping, which are not limited here. The attribute configuration list can be used to represent the attributes that can be applied to the cell, as well as the specific configuration values corresponding to each attribute.
[0048] Among them, the preset attribute data set can be a data structure containing multiple attribute definitions. The preset attribute data set can be obtained in a variety of ways, including but not limited to loading predefined attribute settings from a database, reading user-defined attribute templates from a configuration file, or dynamically generating them programmatically, etc. The preset attributes included can be used to control the display mode, behavior logic, and interaction mode of cells in the table.
[0049] For example, when designing a sales data table, you can define a preset attribute data set, which can include cell attributes such as font size, color theme, and border style. You can then configure the preset attribute data set according to the needs of the table to obtain a property configuration list suitable for the table.
[0050] According to the technical solution provided by the embodiment of the present disclosure, by obtaining a preset attribute data set, the preset attribute data set can contain a preset structure defined by multiple attribute data, and then the preset attributes can be configured and processed to obtain an attribute configuration list, thereby enhancing the flexibility and customizability of the data and improving the reusability and maintainability of the attribute configuration function.
[0051] In some embodiments, before responding to an instruction to select data to be processed and obtaining location data corresponding to the data to be processed, it also includes: determining a preset table component; configuring the attribute configuration list based on the preset table component to obtain a table component corresponding to the attribute configuration list, and the table component corresponding to the attribute configuration list contains at least one data to be processed.
[0052] Specifically, a preset table component can be determined. The preset table component can be an extensible table component. The extensible table component can be used to define the structure of the table and the attribute types contained in the table structure. The structure of the table includes but is not limited to rows, columns, and / or cells, etc., and then the attribute configuration list can be configured and processed according to the preset table component. The configuration processing can include mapping the attributes to each data to be processed corresponding to the preset table component, and can adjust the attribute settings in the attribute configuration list according to the type and hierarchical relationship of the data to be processed to obtain the table component corresponding to the attribute configuration list. The table component corresponding to the attribute configuration list can contain a preset table structure and contain one or more cell data to be processed.
[0053] Among them, the preset table component can be an extensible table component, which can be used to dynamically define the basic structure and function of the table component in the user interface construction framework (Vue) project. The preset table component may include rows, columns, cells, headers, and / or footers, etc., which are not limited here; the table component corresponding to the property configuration list can be an extensible table component instance after configuration processing, and the corresponding attribute values and behavior logic can be implemented according to the specific settings in the property configuration list.
[0054] For example, in the process of building a dynamic table for displaying sales data, a preset table component containing basic rows, columns, and cells can be determined, and then the attribute configuration list can be configured into the preset table component according to business needs. The attribute configuration list can be used to represent the data style settings that can be displayed in each cell, including but not limited to fonts, colors, and borders, etc., and then a complete sales data table can be obtained according to the table component corresponding to the attribute configuration list, which can be displayed to users for viewing or further data analysis.
[0055] According to the technical solution provided by the embodiment of the present disclosure, by determining the preset table component, the property configuration list is configured and processed to obtain the table component corresponding to the property configuration list, thereby enhancing the flexibility and scalability of the table component. Since the preset table component and the property configuration list can be applied to different table instances, the reusability of the table component is improved, and the customization capability and user experience of the table are enhanced.
[0056] In some embodiments, a property configuration list is displayed according to the location data corresponding to the data to be processed, including: injecting the property configuration list and preset control list access parameters based on the table component corresponding to the property configuration list and the location data corresponding to the data to be processed; in response to an instruction to select the data to be processed, displaying the property configuration list, the property configuration list including the preset control list access parameters.
[0057] Specifically, a property configuration list can be dynamically generated and displayed according to the location data corresponding to the data to be processed. The property configuration list can include setting components related to the content of the data to be processed and control list access parameters preset according to business needs, wherein the setting components related to the content of the data to be processed include but are not limited to input boxes or drop-down selection boxes, etc., and the preset control list access parameters can be predetermined by backend services or configuration files, including but not limited to data validation rules, data source binding, or access permission control, etc. When the user issues a to-be-processed data selection instruction through interface interaction, the property configuration list containing the preset control list access parameters can be responded to and displayed in real time, wherein the interface interaction includes but is not limited to clicking or selecting a cell.
[0058] Among them, the preset control list access parameters can be pre-set table rules or configuration items. The preset control list access parameters can be obtained through configuration files, databases or code logic, and the preset control list access parameters can be used to control the display of preset table components, data input verification, data source binding, and / or user access rights, etc.
[0059] For example, when building an extensible financial report, the data to be processed can be cells, and each cell can be configured with different data types, validation rules, and data sources according to needs. The data types can include amounts, percentages, and dates, etc. The validation rules can be that the amount must be a positive number, and the data source can be a field in a preset database table. Then, based on the cell location information, an attribute configuration list can be dynamically generated, and the attribute configuration list can contain preset control list access parameters.
[0060] According to the technical solution provided by the embodiment of the present disclosure, a property configuration list is dynamically generated and displayed through the location data corresponding to the data to be processed. The property configuration list may include setting components related to the content of the data to be processed and control list access parameters preset according to business needs, thereby enhancing the flexibility and configurability of the table, improving the efficiency and accuracy of data processing, and enhancing the user experience and scalability of the system. The preset control list access parameters can be applied to complex business logic and permission control, reducing the workload of repeated configuration and ensuring the security and consistency of the data.
[0061] In some embodiments, based on the target attribute data corresponding to the attribute configuration list, attribute update processing is performed on the data to be processed to obtain attribute update data, including: based on the target attribute data corresponding to the attribute configuration list, field update processing is performed on the data to be processed to obtain update fields corresponding to the data to be processed; the target attribute data corresponding to the attribute configuration list is input into the update field corresponding to the data to be processed to obtain attribute update data.
[0062] Specifically, the fields that need to be updated in the data to be processed can be identified based on the target attribute data corresponding to the attribute configuration list, where the data to be processed can be cells in an expandable table, and the update fields corresponding to the data to be processed can be determined based on the instructions in the attribute configuration list through programming logic or configuration mapping relationships, and then field update processing can be performed to fill the target attribute data into the corresponding update field to obtain attribute update data.
[0063] Among them, the update field corresponding to the data to be processed can be a data field that needs to be updated or modified in the data to be processed according to the target attribute data corresponding to the attribute configuration list. The update field corresponding to the data to be processed can be determined based on the configuration information of the target attribute data corresponding to the attribute configuration list and the structure of the data to be processed, wherein the structure of the data to be processed includes but is not limited to the column definition of the table or the data type of the cell, etc., and then the target attribute data can be input into the corresponding update field to realize the update of the data. The update field corresponding to the data to be processed in the context of the extensible table can be a specific attribute of the cell or the column definition of the table, etc., which is not limited here.
[0064] For example, in the editing scenario of an expandable table, you can update the attribute values of cells in the table. You can identify the target attribute data that needs to be added to the cell based on the preset attribute configuration list, determine the update field corresponding to the cell based on the target attribute data, and then fill the target attribute data into the update field and display the updated cell content in real time.
[0065] According to the technical solution provided by the embodiment of the present disclosure, the fields of the data to be processed that need to be updated are identified according to the target attribute data corresponding to the attribute configuration list, and then field update processing can be performed to fill the target attribute data into the corresponding update field one by one to obtain attribute update data, thereby enhancing the degree of automation of data processing, improving the accuracy and efficiency of data updating, enhancing the flexibility of data rendering, and enhancing the controllability of data rendering.
[0066] In some embodiments, rendering processing is performed on the data to be processed based on the attribute update data, including: obtaining a preset attribute template; inserting the attribute update data into the preset attribute template to obtain an attribute template corresponding to the target attribute data; and performing visual conversion processing on the attribute template corresponding to the target attribute data.
[0067] Specifically, a preset attribute template can be loaded from a configuration or database, which is not limited here. The preset attribute template can be configured with an infrastructure and style for data display, and dynamically acquired attribute update data can be inserted into the preset attribute template according to the format defined by the template, wherein the attribute update data includes but is not limited to the text content, color, and / or font size of the cell, etc., and then a customized attribute template for the target attribute data can be obtained, that is, the attribute template corresponding to the target attribute data. The attribute template corresponding to the target attribute data can be parsed and rendered through a visualization library or framework, and the target attribute data can be displayed in the form of a graphical interface.
[0068] Among them, the preset attribute template can be a preset data display specification, and the preset attribute template can include the element layout, style, and / or interaction logic required to display the data, wherein the elements include but are not limited to text boxes, icons, and / or colors, etc. The preset attribute template can be used to display the data to the user in a unified format; the attribute template corresponding to the target attribute data can be a customized display template generated for the target attribute data, and the attribute template corresponding to the target attribute data can combine the general display rules with the specific data content by replacing the placeholders or variable values in the preset template to perform personalized display of the data.
[0069] For example, when building a spreadsheet application that supports dynamic configuration of column width, color, font and other attributes, the data to be processed can be cells in an expandable table, and attribute update data can be generated through interface operations. Interface operations include but are not limited to dragging column width or selecting color, etc. A preset attribute template can be loaded, and the preset attribute template can define the basic style and structure of the expandable table. The attribute update data can be inserted into the preset attribute template to generate an attribute template corresponding to the target attribute data, and then the attribute template corresponding to the target attribute data can be visually rendered to dynamically display the adjusted table.
[0070] According to the technical solution provided by the embodiment of the present disclosure, by loading a preset attribute template from a configuration or a database, the dynamically acquired attribute update data can be inserted into the preset attribute template according to the format defined by the template, and then a customized attribute template for the target attribute data can be obtained, that is, the attribute template corresponding to the target attribute data. The attribute template corresponding to the target attribute data can be parsed and rendered through a visualization library or framework, and the target attribute data can be displayed in the form of a graphical interface, thereby enhancing the dynamic display capability of the data, improving the flexibility of data processing, and enhancing the interactive experience of the user interface.
[0071] In some embodiments, the above-mentioned data rendering method also includes: in response to a real-time data selection instruction, obtaining position data corresponding to the real-time data; judging whether the position data corresponding to the real-time data and the position data corresponding to the data to be processed meet the preset out-of-position conditions; when the position data corresponding to the real-time data and the position data corresponding to the data to be processed meet the preset out-of-position conditions, hiding the attribute configuration list; displaying the real-time attribute configuration list according to the position data corresponding to the real-time data; in response to a real-time attribute selection instruction, obtaining target attribute data corresponding to the real-time attribute configuration list; based on the target attribute data corresponding to the real-time attribute configuration list, performing attribute update processing on the real-time data to obtain attribute real-time update data; rendering the attribute real-time update data.
[0072] Specifically, by responding to a real-time data selection instruction, which can be triggered by a user clicking, selecting, or inputting a specific data element, the position data corresponding to the selected real-time data can be obtained, including but not limited to the row number or column number, etc., and can be compared with the position data of the data to be processed to determine whether the preset out-of-position conditions are met. The preset out-of-position conditions include but are not limited to not being in the same row, different row numbers, not being in the same column, or different column numbers, etc. If the preset out-of-position conditions are met, the currently displayed attribute configuration list can be hidden, and a new real-time attribute configuration list can be generated and displayed based on the location information of the real-time data. The target attribute data can be selected from the real-time attribute configuration list through the real-time attribute selection instruction, which includes but is not limited to clicking or checking, etc., and then the real-time data can be updated according to the selection of the attribute data to generate real-time attribute update data, and the updated data can be rendered and displayed on the user interface.
[0073] Among them, the real-time data selection instruction can be an instruction for selecting or specifying a real-time data element through an interface operation, the interface operation includes but is not limited to mouse clicking or keyboard input, etc., and the real-time data element can be a cell in a table; the position data corresponding to the real-time data can be the position information of the selected real-time data in the data structure or interface layout, including but not limited to the row number or column number, etc.; the preset out-of-position condition can be a preset rule or condition, and the preset out-of-position condition can be used to determine whether the real-time data and the data to be processed are in different positions or satisfy a non-overlapping relationship; the real-time attribute configuration list can be a list of attribute configuration options dynamically generated according to the position and type of the real-time data, which can be used to select or set specific attributes for the real-time data; the real-time attribute selection instruction can be an instruction for selecting or determining an attribute configuration item from the real-time attribute configuration list; the target attribute data corresponding to the real-time attribute configuration list can refer to specific data or configuration items selected from the real-time attribute configuration list through the real-time attribute selection instruction and can be used to update the attributes of the real-time data; the attribute real-time update data can be new data obtained after the attributes of the original real-time data are updated according to the selection and the data in the real-time attribute configuration list.
[0074] For example, during the spreadsheet editing process, the real-time selected cell can be real-time data. When the user clicks or selects the real-time selected cell, the position data corresponding to the real-time selected cell can be obtained according to the click position, and it can be determined whether the position is different from the position of the currently edited cell. If different, the property configuration list of the current cell can be hidden, and the real-time property configuration list of the real-time selected cell can be displayed. Then, the required font color, background color and other properties can be selected from the real-time property configuration list, and the properties of the cell can be updated according to the selected property data, and the updated effect can be rendered in the table.
[0075] According to the technical solution provided by the embodiment of the present disclosure, by responding to the real-time data selection instruction, the position data corresponding to the selected real-time data can be obtained, and can be compared with the position data of the data to be processed to determine whether the preset out-of-position condition is met. If the preset out-of-position condition is met, the currently displayed attribute configuration list can be hidden, and a new real-time attribute configuration list can be generated and displayed according to the location information of the real-time data. The target attribute data can be selected from the real-time attribute configuration list through the real-time attribute selection instruction, and then the real-time data can be updated according to the selection of the attribute data to generate the real-time update data of the attribute. The updated data can be rendered and reflected in the user interface, thereby enhancing the real-time interactive capability of the data, improving the immediacy and dynamics of the data rendering, and improving the response speed of the user interface and the user experience.
[0076] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present disclosure, and will not be described in detail here.
[0077] The following are embodiments of the device disclosed herein, which can be used to execute the method embodiments disclosed herein. For details not disclosed in the device embodiments disclosed herein, please refer to the method embodiments disclosed herein.
[0078] Figure 3 Schematic diagram of a data rendering device provided by an embodiment of the present disclosure. Figure 3 As shown, the data rendering device includes:
[0079] A first acquisition module 301 is used to acquire position data corresponding to the data to be processed in response to a to-be-processed data selection instruction;
[0080] The first processing module 302 is used to display the attribute configuration list according to the position data corresponding to the data to be processed;
[0081] The second acquisition module 303 is used to acquire target attribute data corresponding to the attribute configuration list in response to the attribute selection instruction;
[0082] The second processing module 304 is used to perform attribute update processing on the data to be processed based on the target attribute data corresponding to the attribute configuration list to obtain attribute update data;
[0083] The third processing module 305 is used to render the data to be processed based on the attribute update data.
[0084] According to the technical solution provided by the embodiment of the present disclosure, by responding to the to-be-processed data selection instruction issued by the user, the location data of the selected to-be-processed data is obtained; based on the location data, the attribute configuration list can be displayed in the location area represented by the location data; the user can determine the target attribute data selected in the attribute configuration list by issuing an attribute selection instruction; and then, the to-be-processed data can be attribute updated through the target attribute data to obtain the attribute-updated data; the to-be-processed data can be rendered according to the updated attributes in the attribute update data, thereby improving the efficiency and accuracy of data processing, reducing the difficulty of maintenance, supporting data visualization, enhancing the readability of data, and improving the flexibility of data processing.
[0085] In some embodiments, the data rendering device is further used to obtain a preset attribute data set; perform configuration processing on the preset attribute data set to obtain an attribute configuration list.
[0086] In some embodiments, the above-mentioned data rendering device is also used to determine a preset table component; configure the attribute configuration list based on the preset table component to obtain a table component corresponding to the attribute configuration list, and the table component corresponding to the attribute configuration list contains at least one data to be processed.
[0087] In some embodiments, the first processing module 302 is specifically used to inject the attribute configuration list and the preset control list access parameters based on the table component corresponding to the attribute configuration list and the position data corresponding to the data to be processed; in response to the instruction to select the data to be processed, the attribute configuration list is displayed, and the attribute configuration list includes the preset control list access parameters.
[0088] In some embodiments, the second processing module 304 is specifically used to perform field update processing on the data to be processed based on the target attribute data corresponding to the attribute configuration list to obtain the updated field corresponding to the data to be processed; input the target attribute data corresponding to the attribute configuration list into the updated field corresponding to the data to be processed to obtain the attribute update data.
[0089] In some embodiments, the third processing module 305 is specifically used to obtain a preset attribute template; insert the attribute update data into the preset attribute template to obtain the attribute template corresponding to the target attribute data; and perform visual conversion processing on the attribute template corresponding to the target attribute data.
[0090] In some embodiments, the above-mentioned data rendering device is also used to, in response to a real-time data selection instruction, obtain position data corresponding to the real-time data; determine whether the position data corresponding to the real-time data and the position data corresponding to the data to be processed meet the preset out-of-position conditions; when the position data corresponding to the real-time data and the position data corresponding to the data to be processed meet the preset out-of-position conditions, hide the attribute configuration list; display the real-time attribute configuration list according to the position data corresponding to the real-time data; in response to a real-time attribute selection instruction, obtain target attribute data corresponding to the real-time attribute configuration list; based on the target attribute data corresponding to the real-time attribute configuration list, perform attribute update processing on the real-time data to obtain attribute real-time update data; and render the attribute real-time update data.
[0091] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present disclosure.
[0092] Figure 4 Schematic diagram of an electronic device 4 provided in an embodiment of the present disclosure. Figure 4 As shown, the electronic device 4 of this embodiment includes: a processor 401, a memory 402, and a computer program 403 stored in the memory 402 and executable on the processor 401. When the processor 401 executes the computer program 403, the steps in the above-mentioned method embodiments are implemented. Alternatively, when the processor 401 executes the computer program 403, the functions of the modules / units in the above-mentioned device embodiments are implemented.
[0093] The electronic device 4 may be a desktop computer, a notebook, a PDA, a cloud server, or other electronic device. The electronic device 4 may include, but is not limited to, a processor 401 and a memory 402. Those skilled in the art will appreciate that Figure 4 The electronic device 4 is merely an example and does not limit the electronic device 4 , and may include more or less components than those shown in the figure, or different components.
[0094] The processor 401 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
[0095] The memory 402 may be an internal storage unit of the electronic device 4, for example, a hard disk or memory of the electronic device 4. The memory 402 may also be an external storage device of the electronic device 4, for example, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 4. The memory 402 may also include both an internal storage unit and an external storage device of the electronic device 4. The memory 402 is used to store computer programs and other programs and data required by the electronic device.
[0096] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units.
[0097] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium (e.g., a computer-readable storage medium). Based on this understanding, the present disclosure implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. The computer program may include computer program code, and the computer program code may be in source code form, object code form, executable file or some intermediate form, etc. The computer-readable storage medium may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc.
[0098] The above embodiments are only used to illustrate the technical solutions of the present disclosure, rather than to limit them. Although the present disclosure has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and should all be included in the protection scope of the present disclosure.
Claims
1. A method for data rendering, characterized in that: include: In response to a to-be-processed data selection instruction, acquiring position data corresponding to the to-be-processed data; Displaying a property configuration list according to the location data corresponding to the data to be processed; In response to the attribute selection instruction, obtaining target attribute data corresponding to the attribute configuration list; Based on the target attribute data corresponding to the attribute configuration list, performing attribute update processing on the data to be processed to obtain attribute update data; The data to be processed is rendered based on the attribute update data.
2. The data rendering method according to claim 1, characterized in that: Before obtaining the position data corresponding to the data to be processed in response to the instruction for selecting the data to be processed, the method further includes: Get the preset attribute data set; The preset attribute data set is configured to obtain the attribute configuration list.
3. The data rendering method according to claim 1, characterized in that: Before obtaining the position data corresponding to the data to be processed in response to the instruction for selecting the data to be processed, the method further includes: Determine the preset table component; The attribute configuration list is configured based on a preset table component to obtain a table component corresponding to the attribute configuration list, wherein the table component corresponding to the attribute configuration list contains at least one of the data to be processed.
4. The data rendering method according to claim 1, characterized in that: The displaying of the attribute configuration list according to the location data corresponding to the data to be processed includes: Based on the table component corresponding to the attribute configuration list and the position data corresponding to the data to be processed, injecting the attribute configuration list and the preset control list access parameters; In response to the to-be-processed data selection instruction, the attribute configuration list is displayed, and the attribute configuration list includes the preset control list access parameter.
5. The data rendering method according to claim 1, characterized in that: The step of performing attribute update processing on the data to be processed based on the target attribute data corresponding to the attribute configuration list to obtain attribute update data includes: Based on the target attribute data corresponding to the attribute configuration list, performing field update processing on the data to be processed to obtain an update field corresponding to the data to be processed; The target attribute data corresponding to the attribute configuration list is input into the update field corresponding to the data to be processed to obtain the attribute update data.
6. The data rendering method according to claim 1, characterized in that: The rendering process of the to-be-processed data based on the attribute update data includes: Get the preset attribute template; Inserting the attribute update data into the preset attribute template to obtain the attribute template corresponding to the target attribute data; Perform visual conversion processing on the attribute template corresponding to the target attribute data.
7. The data rendering method according to claim 1, characterized in that: The method further comprises: In response to the real-time data selection instruction, acquiring position data corresponding to the real-time data; Determine whether the position data corresponding to the real-time data and the position data corresponding to the data to be processed meet a preset out-of-position condition; When the position data corresponding to the real-time data and the position data corresponding to the data to be processed meet the preset out-of-position condition, hiding the attribute configuration list; Displaying a real-time attribute configuration list according to the location data corresponding to the real-time data; In response to the real-time attribute selection instruction, acquiring target attribute data corresponding to the real-time attribute configuration list; Based on the target attribute data corresponding to the real-time attribute configuration list, performing attribute update processing on the real-time data to obtain attribute real-time update data; Rendering is performed on the attribute real-time update data.
8. A data rendering device, characterized in that: include: A first acquisition module, configured to acquire position data corresponding to the data to be processed in response to a to-be-processed data selection instruction; A first processing module, used for displaying a property configuration list according to the position data corresponding to the data to be processed; A second acquisition module, configured to acquire target attribute data corresponding to the attribute configuration list in response to an attribute selection instruction; A second processing module, configured to perform attribute update processing on the data to be processed based on the target attribute data corresponding to the attribute configuration list to obtain attribute update data; The third processing module is used to render the data to be processed based on the attribute update data.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.