Table-based view switching method, system and equipment and medium
By dynamically switching view types and graphic drawing methods, the table-based view switching method solves the problem of insufficient flexibility in perspective adjustment of traditional table components in data analysis, realizes convenient multi-view display and data analysis for users, and improves data display Richness and efficiency.
Patent Information
- Application Number
- CN202411136034.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-19
- Publication Date
- 2024-11-08
AI Technical Summary
In data analysis, traditional table components are difficult to flexibly adjust content, format and perspective according to user personalized needs, and cannot provide a diversified perspective to display and analyze data.
Provide a table-based view switching method, dynamically switch view types in response to user operations, supports multiple graphic drawing methods, quickly responds to user-selected drawing types based on the target array, rendering views from different perspectives without requesting table data again, simplifying View angle switching operation.
It realizes users' convenient switching perspectives for data analysis, enriches data display, reduces resource consumption and performance decline, reduces operational complexity and learning costs, and accelerates the data exploration process.
Smart Images

Figure CN118918216A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data analysis, and in particular to a table-based view switching method, system, device and medium. Background Art
[0002] In visual dashboards, tables are a key data analysis tool that can intuitively present data information. However, traditional table components are often limited to fixed display modes, and it is difficult to flexibly adjust the displayed content, format, and perspective according to the user's personalized needs or different analysis scenarios. Although some BI (Business Intelligence) products on the market have realized the function of adjusting the format of tables and switching analysis dimensions to change the displayed content at runtime, these changes are still limited to the table framework and cannot provide a variety of perspectives to display and analyze data.
[0003] Therefore, the present invention proposes a table-based view switching method, system, device and medium to solve the above-mentioned defects. Summary of the invention
[0004] In view of this, the present invention proposes a table-based view switching method, system, device and medium, so that users can more conveniently switch to the desired perspective for browsing or data analysis, enriching the data display mode of the table component, thereby accelerating the data exploration process.
[0005] Based on the above purpose, an embodiment of the present invention provides a table-based view switching method, which specifically includes the following steps: In response to the current user triggering a multi-view display control in the user interface, acquiring a target view type corresponding to the triggered multi-view display control; Obtaining a target array in a target table in a current user interface, constructing a first view that meets the target view type based on a first drawing type and the target array, and rendering the first view in the user interface; Monitoring whether a drawing type control in the user interface is switched; In response to a switching of a drawing type control in the user interface, constructing a second view satisfying the target view type based on a second drawing type and the target array; The first view rendered in the user interface is switched to the second view.
[0006] In some implementations, the step of obtaining the target array in the target table in the current user interface includes: Query all selected row data and column data in the target table, and use all the row data and all the column data as target row data and target column data; A target array is determined based on the target row data and the target column data.
[0007] In some implementations, the step of constructing a first view satisfying the target view type based on the first drawing type and the target array includes: Based on the target array, determining a first dimension array and a first metric array; According to the first drawing type, all the data in the first measurement array are used as first X-axis data, and all the data in the first dimension array are used as first graphic series in each of the first X-axis data; Obtain the first numerical value corresponding to each of the first graphic series in each of the first X-axis data; Determine a first graphic series array based on all of the first graphic series and all of the first values corresponding thereto; Based on the first graphics series array, the first view that meets the target view type is constructed.
[0008] In some implementations, the step of constructing a second view satisfying the target view type based on the second drawing type and the target array includes: Based on the target array, determining a first dimension array and a first metric array; According to the second drawing type, all the data in the first dimensional array are used as second X-axis data, and all the data in the first measurement array are used as second graphic series in each of the second X-axis data; Obtain the second numerical value corresponding to each of the second graphic series in each of the second X-axis data; Determine a second graphic series array based on all the second graphic series and all the second values corresponding thereto; Based on the second graphics series array, the second view satisfying the target view type is constructed.
[0009] In some implementations, the table-based view switching method further includes: Monitoring whether the multi-view display control in the user interface is switched; In response to the multi-view display control in the user interface being switched, acquiring a second view type corresponding to the switched multi-view display control; Using the second view type as a new target view type, obtaining a target array in a target table in a current user interface, constructing a first view that meets the target view type based on the first drawing type and the target array, and rendering the first view in the user interface; Monitoring whether a drawing type control in the user interface is switched; In response to a switching of a drawing type control in the user interface, constructing a second view satisfying the target view type based on a second drawing type and the target array; The first view rendered in the user interface is switched to the second view.
[0010] In some implementations, the table-based view switching method further includes: Querying several similar users corresponding to the current user; Determining the preferred view type corresponding to the current user based on the target history preferred view types corresponding to each of the similar users; Based on all the preferred view types, all the multi-view display controls are displayed in the user interface.
[0011] In some implementations, the step of querying a number of similar users corresponding to the current user includes: Obtain the historical preference view types of all users and construct a co-occurrence matrix; Calculate the similarity between the current user and other users except the current user based on the co-occurrence matrix and a preset similarity calculation method; A target similarity whose value is not zero is searched among all the similarities, and the other users corresponding to the target similarity are used as the similar users corresponding to the current user.
[0012] Another aspect of the embodiment of the present invention further provides a table-based view switching system, including: a triggering unit configured to acquire a target view type corresponding to the triggered multi-view display control in the user interface in response to the current user triggering the multi-view display control; A first view unit is configured to obtain a target array in a target table in a current user interface, construct a first view that meets the target view type based on a first drawing type and the target array, and render the first view in the user interface; A monitoring unit configured to monitor whether a drawing type control in the user interface is switched; A second view unit, configured to construct a second view satisfying the target view type based on a second drawing type and the target array in response to a switching of a drawing type control in the user interface; A rendering unit is configured to switch the first view rendered in the user interface to the second view.
[0013] According to another aspect of an embodiment of the present invention, a computer device is provided, comprising: at least one processor; and a memory, wherein the memory stores a computer program executable on the processor, and the computer program implements the steps of the above method when executed by the processor.
[0014] According to another aspect of the embodiments of the present invention, a computer-readable storage medium is provided, which stores a computer program that implements the above method steps when executed by a processor.
[0015] The present invention has at least the following beneficial technical effects: the table-based view switching method of the present invention supports users to select different view types to display data as needed, and supports multiple graphics drawing methods for each view type to meet the user's multi-perspective display needs, and quickly responds to the drawing type selected by the user based on the target array for processing to render views under different perspectives. There is no need to request the data in the table again, thus avoiding unnecessary resource consumption and performance degradation, simplifying the perspective switching operation, reducing the operation complexity and learning cost, so that users can more conveniently switch to the desired perspective for browsing or data analysis, and compare data analysis from different perspectives under the same view type, so that the data display is richer, thereby accelerating the data exploration process. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other embodiments can be obtained based on these drawings without paying creative work.
[0017] Figure 1 A block diagram of an embodiment of a table-based view switching method provided by the present invention; Figure 2 A schematic diagram of an embodiment of a table in a user interface provided by the present invention; Figure 3 A schematic diagram of an embodiment of the execution process of the table-based view switching method provided by the present invention; Figure 4 A schematic diagram of an embodiment of a bar graph drawn row by row based on a table provided by the present invention; Figure 5 A schematic diagram of an embodiment of a process for implementing the row-by-row drawing of corresponding data provided by the present invention; Figure 6 A schematic diagram of an embodiment of a bar graph drawn by columns based on a table provided by the present invention; Figure 7A schematic diagram of an embodiment of a process for implementing the corresponding data plotting by column provided by the present invention; Figure 8 A schematic diagram of an embodiment of a co-occurrence matrix generation process provided by the present invention; Fig. 9 A schematic diagram of an embodiment of a table-based view switching system provided by the present invention; Fig.10 A schematic diagram of the structure of an embodiment of a computer device provided by the present invention; Fig.11 A schematic diagram of the structure of an embodiment of a computer-readable storage medium provided by the present invention. DETAILED DESCRIPTION
[0018] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the embodiments of the present invention are further described in detail below in combination with specific embodiments and with reference to the accompanying drawings.
[0019] It should be noted that all expressions using "first" and "second" in the embodiments of the present invention are for distinguishing two non-identical entities with the same name or non-identical parameters. It can be seen that "first" and "second" are only for the convenience of expression and should not be understood as limitations on the embodiments of the present invention. The subsequent embodiments will not explain this one by one.
[0020] Data visualization is the scientific and technical study of visual presentation of data. In this field, there are various methods, among which charts play an indispensable role. Through intuitive visual design, they transform complex data sets into clear, easy-to-understand and easy-to-analyze images, allowing users to quickly capture key information and trends in the data. With the widespread application of data visualization technology in modern society, many visualization tools have emerged on the market for users to choose from. However, in the process of data analysis, users often need to constantly experiment and explore different presentation methods in order to find the most accurate way to express the meaning of the data. In this process, users may create a large number of unnecessary charts due to uncertainty about which chart type to choose. The addition of these charts not only increases the burden of interaction with the database, but also may lead to resource waste and system performance degradation. On the other hand, even if users know clearly what graphics should be used to display data, the analysis of these data often relies on tabular data. When reviewing other BI products, we found that users tend to put charts and tables on the same page, or use the tab function to display tables and graphics separately in different tabs. In order to ensure the data consistency between charts and tables, it is usually necessary to set up a linkage mechanism, otherwise the chart cannot be directly updated and rendered in real time according to the data in the table. Although this design improves the flexibility of data display, it also places higher demands on system complexity and development costs. Although the table components of BI products have enhanced user interactivity and data analysis flexibility to a certain extent, they are still relatively simple in display form and lack the possibility of in-depth understanding and analysis of data from multiple perspectives.
[0021] In order to solve the above defects, the first aspect of the embodiment of the present invention provides a table-based view switching method. Figure 1 As shown, it includes the following steps: Step S100, in response to the current user triggering the multi-view display control in the user interface, obtaining a target view type corresponding to the triggered multi-view display control; Step S200, obtaining a target array in a target table in the current user interface, constructing a first view that meets the target view type based on the first drawing type and the target array, and rendering the first view in the user interface; Step S300, monitoring whether the drawing type control in the user interface is switched to the second drawing type; Step S400, in response to the drawing type control in the user interface being switched, constructing a second view satisfying the target view type based on the second drawing type and the target array; Step S500: Switch the first view rendered in the user interface to the second view.
[0022] In some embodiments, in the field of data visualization, the diversity and flexibility of view types (or chart types) are crucial to effectively convey data information. View types include bar charts, line charts, bar charts, pie charts, combination charts, etc., and each view type supports multiple graphic settings, such as whether to display labels, font colors, secondary coordinates, stacks, columns, lines or rings, etc. Figure 2 A schematic diagram of an embodiment of a table in a user interface provided by the present invention. Figure 2 In the upper right corner are the multi-view display controls corresponding to each view type, which from right to left are the combination chart display control, pie chart display control, line chart display control, bar chart display control and column chart display control. The leftmost control is the table display control, which is used to switch the user interface from the multi-view display state to the table display state only. Figure 3 As shown, the present invention will first identify the currently logged in user (i.e., the current user), recommend several corresponding view types based on the historical behavior of the current user, obtain a multi-view type list, and arrange the multi-view display controls corresponding to each view type in the multi-view list in the upper right corner of the user interface, wherein the multi-view display controls in the upper right corner of the user interface corresponding to different users are different. The view type corresponding to the multi-view display control triggered by the user is taken as the target view type. The target table is the table selected by the current user for data analysis.
[0023] In some embodiments, the user can quickly switch to the desired view type for data analysis by triggering any multi-view display control in the user interface to obtain a view containing graphics that meet the requirements. When the user triggers any multi-view display control in the user interface, a graphics area will be added above the table in the user interface, and the graphics area will adapt according to the size of the table. There are two dom (Document Object Model) elements in the graphics area. One dom element is a graphics toolbar including graphics settings, drawing by row and drawing by column. It is fixed in the upper right corner of the graphics area. It is checked by default to draw by row, that is, the drawing type defaults to drawing by row. The other dom element is below the graphics toolbar, which is the dom for rendering graphics. This process dynamically adds a graphics area above the table by using the .before() method of jQuery (a JavaScript framework). The fixed position is implemented using the relative positioning (position) attribute of CSS (Cascading Style Sheets). The graphics width is the same as the table width, and the graphics height is obtained by subtracting the height of the table container from the height of the table parent. If the graphics height is less than 300 pixels, it is displayed as 300 pixels. If the current user triggers the table display control in the user interface, the DOM elements in the graphics area will be removed from the user interface, and the table will be re-rendered so that only the table is displayed in the user interface.
[0024] In some implementations, the first drawing type is row-by-row drawing, and the second drawing type is case-by-case drawing. Figure 4 The present invention provides a schematic diagram of an embodiment of a bar chart drawn by row based on a table. Figure 4 For example, when the user triggers Figure 2 When a column chart is displayed in the user interface of Figure 4 The graphics area in the user interface of the graphics area is selected by default in the graphics toolbar of the graphics area, and the data in the table is obtained and a bar chart is drawn according to the data implementation process corresponding to the row drawing, and the graphics area where the bar chart DOM is rendered is used as the first view. The drawing type control includes the row drawing checkbox and the column drawing checkbox in the graphics toolbar, such as Figure 4 When the user selects the Draw by Column check box, the drawing type control is switched to the second drawing type, such as Figure 6 As shown. Figure 6 For example, when the user is in Figure 4 When you select the "Column" check box in the graphics toolbar to switch the drawing type to column drawing, the following is generated: Figure 6The graphic area in the user interface, at this time, obtains the data in the table and draws a bar chart according to the corresponding data drawing process by column, and uses the graphic area of the bar chart DOM rendered as the second view, switches the first view in the user interface to the second view, and the table in the user interface remains unchanged.
[0025] The table-based view switching method of the present invention supports users to select different view types to display data as needed, and supports multiple graphics drawing methods for each view type to meet the user's multi-perspective display needs. It quickly responds to the drawing type selected by the user based on the target array for processing to render views under different perspectives. There is no need to request the data in the table again, thus avoiding unnecessary resource consumption and performance degradation, simplifying the perspective switching operation, reducing the operation complexity and learning cost, so that users can more conveniently switch to the desired perspective for browsing or data analysis, and compare data analysis from different perspectives under the same view type, making the data display richer, thereby accelerating the data exploration process.
[0026] In some embodiments, the step of obtaining a target array in a target table in a current user interface includes: querying all selected row data and column data in the target table, taking all row data and all column data as target row data and target column data; and determining a target array based on the target row data and target column data.
[0027] In some implementations, when a user triggers any multi-view display control in the user interface, a check box style is dynamically added before each row or column cell in the table, such as Figure 4 or Figure 6 As shown. Real-time monitoring and identification of multi-view display controls triggered by users, and after triggering the multi-view display control, add checkboxes in the table component, and check the data of the first 5 rows and columns of the table by default, and use the first 5 rows of data checked at this time as the target row data, and the first 5 columns of data as the target column data. Users can check the data of any row or column as needed. This process uses the for loop to display the columns in the table, uses the jQuery selector to match the cells of each column, dynamically adds the checkbox style, and obtains the DOM elements of the first 5 rows and columns, and assigns the selected state to their checkboxes. The jQuery selector is used to obtain the target row data and target column data checked in the table, and a one-dimensional JSON array is constructed. The structure of the JSON array is [{key:value},{key:value},…], where key is the column name of the current table (including dimension column name or measurement column name), value is the data of the corresponding cell, and the one-dimensional JSON array is used as the target array.
[0028] In some embodiments, according to the above method, the present invention implements HTML5 (HyperTextMarkup Language 5, a new generation of hypertext markup language) based on the web front end, jQuery and the use of collaborative filtering recommendation algorithm to obtain the specific graphics recommended by dynamically rendering the table data checked on the DOM to obtain a view that meets the current user needs.
[0029] The table-based view switching method of the present invention dynamically adds check boxes to the table to realize the data of any row and any column of the table for analysis, so that the graphics in the view change with the change of the check state of the cells in the table. By flexibly operating the cell data, data analysis from different angles under the same view can be compared, making the data display richer, thereby accelerating the data exploration process, and there is no need to send HTTP requests to the back end to obtain data, which can reduce the interaction with the database, reduce resource waste and improve performance.
[0030] In some embodiments, the step of constructing a first view satisfying a target view type based on a first drawing type and a target array includes: determining a first dimension array and a first measurement array based on the target array; according to the first drawing type, using all data in the first measurement array as first X-axis data, and using all data in the first dimension array as first graphic series in each first X-axis data; obtaining first numerical values corresponding to each first graphic series in each first X-axis data; determining a first graphic series array based on all first graphic series and all first numerical values corresponding thereto; and constructing a first view satisfying the target view type based on the first graphic series array.
[0031] In some implementations, the selected row data and column data in the table component are obtained, and according to the currently selected drawing type, the filter+find combined traversal method of jQuery is used to organize the data into the X-axis data, legend data, and graphic series data in the multi-view configuration information, and the font color and label color in the multi-view configuration information can also be modified according to the graphic settings. Among them, the row data corresponds to the dimension, and the column data corresponds to the measurement. Figure 5 The following is a schematic diagram of an embodiment of the process of implementing the process of drawing corresponding data by row provided by the present invention. Figure 4 As shown, the first 5 checked rows of data are used as the target row data, and the first 5 checked columns of data are used as the target column data. The target array constructed based on the target row data and target column data is as follows Figure 5As shown in the "one-dimensional JSON array" in the figure, "Type" and "Variety" are dimension column names, and "2019", "2020", "2021", "2022" and "2023" are measurement column names. Extract all the keys as column names from the first JSON element of the target array, and divide these column names into two categories: dimension column names (WN) and measurement column names (MN). Use MN as the X-axis data of the pre-drawn view chart. Traverse the target array, identify which keys correspond to the dimension columns for each row of data, and connect the value (dimensional data) of the dimension column with connecting lines (in actual data processing, it may not be directly reflected as connecting lines, but as classification identifiers), and add it to the legend array, such as "Food Crops-Potatoes", as shown in Figure 5 As shown in the "Legend Array". Identify which keys correspond to the metric columns, put the value (metric data) of the metric column into the data structure of the current row, and finally build a two-dimensional array rowData, in which each row contains a complete set of metric data. After the traversal is completed, the collection of the legend array and rowData is the initial graphic series array. De-duplicate the legend array to obtain a new legend array, add the data in rowData according to the de-duplication of the legend array to obtain a new rowData, and the collection of the new legend array and the new rowData is the first graphic series array, as shown in Figure 5 Each deduplicated legend (i.e., an element in the new legend array) corresponds to a graphic series, and the measurement data in each graphic series is the value of the corresponding legend in the first graphic series array. In one example, the bar chart (first view) constructed based on the first graphic series array is as follows Figure 4 When the image type is a pie chart, MN can be used as the inter-group data of the pre-drawn view chart, and WN can be used as the intra-group data.
[0032] In some embodiments, the step of constructing a second view satisfying the target view type based on the second drawing type and the target array includes: determining a first dimension array and a first measurement array based on the target array; according to the second drawing type, using all data in the first dimension array as second X-axis data, and using all data in the first measurement array as a second graphic series in each second X-axis data; obtaining second numerical values corresponding to each second graphic series in each second X-axis data; determining a second graphic series array based on all second graphic series and all second numerical values corresponding to them; and constructing a second view satisfying the target view type based on the second graphic series array.
[0033] In some embodiments, Figure 7A schematic diagram of an embodiment of the process of implementing the process of drawing corresponding data by column provided by the present invention. MN will be used as the legend array of the pre-drawn view chart, and its length determines the number of graphic series in the multi-view chart. Traverse the target array, identify which keys correspond to the dimension columns for each row of data, and connect the value (dimensional data) of the dimension column with connecting lines to form the label of the X-axis. Add these labels to the X-axis array, and deduplicate the array to avoid repeated X-axis labels, and record the row labels with the same X-axis labels for subsequent processing. Traverse the legend array, for each legend (that is, each metric column), traverse the target array again, find the data corresponding to the legend (that is, the metric column) in each row of the target array, add these data to a temporary array columnData, and deduplicate and accumulate columnData according to the X-axis array. That is, if multiple rows of data are the same on the X-axis, add their corresponding metric data. Add the deduplicated and accumulated data as an array to the second graphic series array, and the second graphic series array finally constructed is as follows. Figure 7 The column chart (second view) constructed based on the second graphic series array is shown in Figure 6 shown.
[0034] The table-based view switching method of the present invention supports multiple graphics drawing methods for each view type to meet the user's multi-perspective display needs. It quickly responds to the drawing type selected by the user based on the target array for processing to render views under different perspectives, simplifies the perspective switching operation, reduces the operation complexity and learning cost, so that users can more conveniently switch to the desired perspective for browsing or data analysis, making the data display richer.
[0035] In some embodiments, the table-based view switching method of the present invention also includes: monitoring whether a multi-view display control in a user interface switches; in response to a multi-view display control in a user interface switching, obtaining a second view type corresponding to the switched multi-view display control; using the second view type as a new target view type, and obtaining a target array in a target table in the current user interface, constructing a first view that satisfies the target view type based on a first drawing type and the target array, and rendering the first view in the user interface; monitoring whether a drawing type control in the user interface switches; in response to a drawing type control in the user interface switching, constructing a second view that satisfies the target view type based on a second drawing type and the target array; and switching the first view rendered in the user interface to the second view.
[0036] In some embodiments, it is monitored in real time whether the multi-view display control in the user interface is switched. For example, after the user triggers the bar chart display control in the user interface, the line chart display control is triggered again, that is, the multi-view display control in the user interface is monitored to have changed. At this time, the data in the table is obtained and the line chart is drawn according to the corresponding data implementation process of drawing by row. After switching the multi-view display control, there is no need to send an HTTP request to the backend again to obtain data, reducing the interaction with the database, thereby avoiding unnecessary resource consumption and performance degradation. Similarly, when the user switches the drawing type, modifies the graphics settings, or switches the check state of the checkbox in the table, the DOM used to render the shape in the graphics area will be re-rendered according to the data implementation process corresponding to the selected drawing type.
[0037] The table-based view switching method of the present invention supports users to switch between multiple view types. By dynamically switching view types, specific graphics can be loaded on demand to obtain the required view. Data rendering graphics can also be dynamically obtained according to the check status of cells in the table without requesting data again, thereby avoiding unnecessary resource consumption and performance degradation.
[0038] In some embodiments, the table-based view switching method of the present invention also includes: querying several similar users corresponding to the current user; determining the preference view type corresponding to the current user based on the target historical preference view type corresponding to each similar user; and displaying all multi-view display controls in the user interface based on all preference view types.
[0039] The table-based view switching method of the present invention supports intelligent recommendation of multiple view types according to user behavior, and constructs multiple view display controls corresponding to all view types to arrange and display them in the user interface. Each view type supports personalized graphic settings and multi-perspective display according to user needs, thereby improving the flexibility of table content display and making data display richer, thereby better understanding the distribution, trend and correlation of data.
[0040] In some embodiments, the step of querying several similar users corresponding to the current user includes: obtaining the historical preference view types of all users and constructing a co-occurrence matrix; calculating the similarity between the current user and other users except the current user based on the co-occurrence matrix and a preset similarity calculation method; querying a target similarity whose value is not zero among all similarities, and taking other users corresponding to the target similarity as similar users corresponding to the current user.
[0041] In some embodiments, Figure 8A schematic diagram of an embodiment of the co-occurrence matrix generation process provided by the present invention. By recording the view type selected by each user each time, we can construct a co-occurrence matrix. In order to measure the interest similarity between users, the cosine similarity is calculated for each pair of users. An inverted index table from view type to user is constructed. The function of this inverted index table is to quickly find which users have selected a specific view type, and to exclude the similarity calculation between users who have never selected any common view type, thereby improving efficiency. Based on the inverted table, we construct a co-occurrence matrix, whose rows and columns represent users, and the elements in the matrix represent the number of view types used by two users in common. The co-occurrence matrix records the number of common view types, not the specific view types. For each pair of users in the co-occurrence matrix, the cosine similarity between them can be calculated. The calculation of cosine similarity requires two vectors, and the "vector" of each user is composed of the number of view types they have used in common. In the calculation formula of cosine similarity, the numerator is the value of the corresponding element in the co-occurrence matrix, and the denominator requires additional calculation, that is, the product of the square roots of the number of view types used independently by each user. The calculated user similarity is combined with the view types selected by similar users to predict the view type that the current user may choose by weighted average. The weight here can be user similarity. Finally, the multi-view display controls corresponding to the predicted view types are arranged in a certain order and displayed in the upper right corner of the user interface for users to quickly view and select.
[0042] The table-based view switching method of the present invention uses the weighted average of user similarity and view types selected by similar users to predict and recommend multiple view types that the currently logged-in user may select, and then displays corresponding multi-view display controls for different currently logged-in users, thereby avoiding the probability of users selecting useless view types. The view types are intelligently recommended based on user behavior, reducing the situation where users perform useless data analysis, improving data analysis capabilities, better understanding the distribution, trends and associations of data, and enhancing user experience.
[0043] Based on the same inventive concept, according to another aspect of the present invention, Fig. 9 As shown, an embodiment of the present invention further provides a table-based view switching system, and the table-based view switching system includes: A triggering unit 110, configured to obtain a target view type corresponding to the triggered multi-view display control in response to the current user triggering the multi-view display control in the user interface; A first view unit 120 is configured to obtain a target array in a target table in a current user interface, construct a first view satisfying a target view type based on a first drawing type and the target array, and render the first view in the user interface; A monitoring unit 130, configured to monitor whether a drawing type control in a user interface is switched; The second view unit 140 is configured to construct a second view satisfying a target view type based on a second drawing type and a target array in response to a switching of a drawing type control in the user interface; The rendering unit 150 is configured to switch the first view rendered in the user interface to a second view.
[0044] The table-based view switching system of the present invention supports users to select different view types to display data as needed, and supports multiple graphics drawing methods for each view type to meet the user's multi-perspective display needs. It quickly responds to the drawing type selected by the user based on the target array for processing to render views under different perspectives. There is no need to request the data in the table again, thus avoiding unnecessary resource consumption and performance degradation, simplifying the perspective switching operation, reducing the operation complexity and learning cost, so that users can more conveniently switch to the desired perspective for browsing or data analysis, and compare data analysis from different perspectives under the same view type, making the data display richer, thereby accelerating the data exploration process.
[0045] Based on the same inventive concept, according to another aspect of the present invention, Fig.10 As shown, an embodiment of the present invention further provides a computer device 30, which includes a processor 310 and a memory 320. The memory 320 stores a computer program 321 that can be run on the processor. When the processor 310 executes the program, the steps of the above method are performed.
[0046] Based on the same inventive concept, according to another aspect of the present invention, Fig.11 As shown, an embodiment of the present invention further provides a computer-readable storage medium 40, which stores a computer program 410 for executing the above method when executed by a processor.
[0047] Finally, it should be noted that a person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the storage medium of the program can be a disk, an optical disk, a read-only storage memory (ROM) or a random access memory (RAM), etc. The above-mentioned computer program embodiments can achieve the same or similar effects as the corresponding above-mentioned any method embodiments.
[0048] It will also be appreciated by those skilled in the art that various exemplary logic blocks, modules, circuits and algorithm steps described in conjunction with the disclosure herein can be implemented as electronic hardware, computer software or a combination of the two. In order to clearly illustrate this interchangeability of hardware and software, a general description has been given to the functions of various schematic components, blocks, modules, circuits and steps. Whether this function is implemented as software or hardware depends on specific applications and the design constraints imposed on the entire system. Those skilled in the art can implement the function in various ways for each specific application, but this implementation decision should not be interpreted as causing a departure from the disclosed scope of the embodiments of the present invention.
[0049] The above are exemplary embodiments disclosed in the present invention, but it should be noted that various changes and modifications may be made without departing from the scope of the embodiments disclosed in the present invention as defined in the claims. The functions, steps and / or actions of the method claims according to the disclosed embodiments described herein do not need to be performed in any particular order. The serial numbers of the embodiments disclosed in the above embodiments of the present invention are for description only and do not represent the advantages and disadvantages of the embodiments. In addition, although the elements disclosed in the embodiments of the present invention may be described or required in individual form, they may also be understood as multiple unless explicitly limited to the singular.
[0050] It should be understood that, as used herein, the singular forms "a", "an" are intended to include the plural forms as well, unless the context clearly supports an exception. It should also be understood that, as used herein, "and / or" refers to any and all possible combinations including one or more of the associated listed items.
[0051] A person skilled in the art should understand that the discussion of any of the above embodiments is only exemplary and is not intended to imply that the scope of the disclosure of the embodiments of the present invention (including the claims) is limited to these examples; under the concept of the embodiments of the present invention, the technical features in the above embodiments or different embodiments can also be combined, and there are many other changes in different aspects of the above embodiments of the present invention, which are not provided in detail for the sake of simplicity. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present invention should be included in the protection scope of the embodiments of the present invention.
Claims
1. A table-based view switching method, characterized in that: include: In response to the current user triggering a multi-view display control in the user interface, acquiring a target view type corresponding to the triggered multi-view display control; Obtaining a target array in a target table in a current user interface, constructing a first view that meets the target view type based on a first drawing type and the target array, and rendering the first view in the user interface; Monitoring whether a drawing type control in the user interface is switched; In response to a switching of a drawing type control in the user interface, constructing a second view satisfying the target view type based on a second drawing type and the target array; The first view rendered in the user interface is switched to the second view.
2. The table-based view switching method according to claim 1, characterized in that: The step of obtaining the target array in the target table in the current user interface includes: Query all selected row data and column data in the target table, and use all the row data and all the column data as target row data and target column data; A target array is determined based on the target row data and the target column data.
3. The table-based view switching method according to claim 1, characterized in that: The step of constructing a first view satisfying the target view type based on the first drawing type and the target array includes: Based on the target array, determining a first dimension array and a first metric array; According to the first drawing type, all the data in the first measurement array are used as first X-axis data, and all the data in the first dimension array are used as first graphic series in each of the first X-axis data; Obtain the first numerical value corresponding to each of the first graphic series in each of the first X-axis data; Determine a first graphic series array based on all of the first graphic series and all of the first values corresponding thereto; Based on the first graphics series array, the first view that meets the target view type is constructed.
4. The table-based view switching method according to claim 1, characterized in that: The step of constructing a second view satisfying the target view type based on the second drawing type and the target array includes: Based on the target array, determining a first dimension array and a first metric array; According to the second drawing type, all the data in the first dimensional array are used as second X-axis data, and all the data in the first measurement array are used as second graphic series in each of the second X-axis data; Obtain the second numerical value corresponding to each of the second graphic series in each of the second X-axis data; Determine a second graphic series array based on all the second graphic series and all the second values corresponding thereto; Based on the second graphics series array, the second view satisfying the target view type is constructed.
5. The table-based view switching method according to claim 1, characterized in that: Also includes: Monitoring whether the multi-view display control in the user interface is switched; In response to the multi-view display control in the user interface being switched, acquiring a second view type corresponding to the switched multi-view display control; Using the second view type as a new target view type, obtaining a target array in a target table in a current user interface, constructing a first view that meets the target view type based on the first drawing type and the target array, and rendering the first view in the user interface; Monitoring whether a drawing type control in the user interface is switched; In response to a switching of a drawing type control in the user interface, constructing a second view satisfying the target view type based on a second drawing type and the target array; The first view rendered in the user interface is switched to the second view.
6. The table-based view switching method according to claim 1, characterized in that: Also includes: Querying several similar users corresponding to the current user; Determining the preferred view type corresponding to the current user based on the target history preferred view types corresponding to each of the similar users; Based on all the preferred view types, all the multi-view display controls are displayed in the user interface.
7. The table-based view switching method according to claim 6, characterized in that: The step of querying a number of similar users corresponding to the current user includes: Obtain the historical preference view types of all users and construct a co-occurrence matrix; Calculate the similarity between the current user and other users except the current user based on the co-occurrence matrix and a preset similarity calculation method; A target similarity whose value is not zero is searched among all the similarities, and the other users corresponding to the target similarity are used as the similar users corresponding to the current user.
8. A table-based view switching system, characterized in that: include: a triggering unit configured to, in response to a current user triggering a multi-view display control in a user interface, acquire a target view type corresponding to the triggered multi-view display control; A first view unit is configured to obtain a target array in a target table in a current user interface, construct a first view that meets the target view type based on a first drawing type and the target array, and render the first view in the user interface; A monitoring unit configured to monitor whether a drawing type control in the user interface is switched; A second view unit, configured to construct a second view satisfying the target view type based on a second drawing type and the target array in response to a switching of a drawing type control in the user interface; A rendering unit is configured to switch the first view rendered in the user interface to the second view.
9. A computer device comprising: at least one processor; as well as A memory storing a computer program executable on the processor, wherein the processor executes the steps of the method according to any one of claims 1 to 7 when executing the program.
10. A computer-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 performed.
