A visual recommendation method, device, equipment and storage medium

By analyzing user demand text and using preset visual recommendation models, the appropriate chart types are automatically recommended, which solves the problems of high development costs and fixed recommendation results in the existing technology, and personalized chart display is achieved.

CN113761334BActive Publication Date: 2025-01-17BEIJING WODONG TIANJUN INFORMATION TECH CO LTD +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202011272324.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-11-13
Publication Date
2025-01-17
Estimated Expiration
2040-11-13

AI Technical Summary

Technical Problem

The existing visual recommendation technology requires a lot of preparation work, and the development cost is high and the recommendation result is a fixed pattern, which cannot meet the personalized needs of users.

Method used

By analyzing the natural language requirement text entered by the user, extracting the field information to be visualized and the preset category keywords, filtering and processing data, and automatically recommending suitable chart types using the preset visual recommendation model.

Benefits of technology

It reduces the development cost of the visualization system, realizes personalized chart recommendations based on user needs, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113761334B_ABST
    Figure CN113761334B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention discloses a visualization recommendation method, device, equipment and storage medium. The method includes: parsing the input demand text, extracting the field information to be visualized and the preset category keywords in the demand text according to the parsing results; screening and processing the data objects according to the field information to be visualized and the preset category keywords to obtain the data to be visualized; determining the target visualization chart suitable for the data to be visualized according to the preset visualization recommendation model; and visually displaying the data to be visualized according to the target visualization chart. Through the technical solution of the embodiment of the present invention, it is possible to parse the data of interest according to the natural language input by the user, and automatically recommend the most suitable chart type to display these data, thereby reducing the development cost of the visualization system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention relate to the field of data processing technology, and in particular to a visualization recommendation method, device, equipment and storage medium. Background Art

[0002] In recent years, in the construction of BI (Business Intelligence) platforms, visualization recommendation technology has become a popular application technology. Visualization recommendation is to automatically present the data of interest to users in a visual way according to their personalized needs. It can not only avoid a lot of manual operations and improve work efficiency, but also save computing resources of the BI platform.

[0003] At present, some BI products mainly use coding methods to establish a mapping from data to visual attributes (such as position, length, color, angle, etc.) of geometric marks (such as points, lines, surfaces, rectangles, circles), thereby forming recommendation rules to recommend chart types, or use machine learning methods to extract features from the data characteristics of each column or column combination for training, and output recommended visualization forms for each column and other technical means to achieve the visualization recommendation function.

[0004] However, in the process of implementing the present invention, the inventors found that there are at least the following technical problems in the prior art: the use of geometric mark encoding or machine learning methods requires a lot of preparatory work, such as establishing geometric mark mapping or using a large number of samples for machine learning, which leads to high development costs for the visualization recommendation function, and the visualization recommendation results are fixed-pattern charts that cannot meet the personalized needs of users. Summary of the invention

[0005] The embodiments of the present invention provide a visualization recommendation method, apparatus, device and storage medium to analyze the data of interest to the user based on the natural language input by the user, and automatically recommend a chart type suitable for displaying the data of interest to the user.

[0006] In a first aspect, an embodiment of the present invention provides a visualization recommendation method, the method comprising:

[0007] Parse the input demand text, and extract the field information to be visualized and the preset category keywords in the demand text according to the parsing result;

[0008] Screening and processing the data objects according to the field information to be visualized and the preset category keywords to obtain the data to be visualized;

[0009] Determine a target visualization chart suitable for the data to be visualized according to a preset visualization recommendation model;

[0010] The data to be visualized is visualized according to the target visualization chart.

[0011] Optionally, extracting the field information to be visualized in the requirement text according to the parsing result includes:

[0012] Match the fields in the field information library with the requirement text one by one, and find text substrings in the requirement text whose similarity with each field is greater than or equal to a preset threshold;

[0013] For each field, among the text substrings whose similarity is greater than or equal to a preset threshold, the text substring with the highest similarity and the corresponding similarity and field name are saved as an element in the field matching set;

[0014] The elements in the field matching set are arranged in descending order according to the similarity value, and the fields to be visualized are extracted from the field matching set arranged in descending order according to the preset limit number of fields to be visualized, so as to obtain a field set to be visualized.

[0015] Optionally, extracting the fields to be visualized from the field matching set arranged in descending order according to the preset limit number of fields to be visualized to obtain the field set to be visualized includes:

[0016] When the number of elements in the to-be-visualized field set is less than the preset limit number of to-be-visualized fields, the elements in the field matching set arranged in descending order are read in sequence;

[0017] Determine whether the text substring in the current element of the field matching set read is repeated with the text substring corresponding to the field in the field set to be visualized. If so, read the next element of the current element and repeat this step of determination;

[0018] Otherwise, the field information in the current element is stored in the to-be-visualized field set as the to-be-visualized field information, and the text substring corresponding to the to-be-visualized field information is marked in the requirement text.

[0019] Optionally, the categories of the field information to be visualized include dimension fields and metric fields, wherein the dimension fields include time dimension fields and space dimension fields, and the metric fields include additive metric fields and non-additive metric fields, and the additive metric fields refer to fields whose corresponding data can perform mathematical operations.

[0020] Optionally, extracting preset category keywords in the requirement text according to the parsing result:

[0021] Identify text content other than the text substring corresponding to the field information to be visualized in the requirement text;

[0022] Extracting keywords of a preset category from the text content;

[0023] The keywords of the preset categories include: keywords of a first preset category for data screening, keywords of a second preset category for data processing, and keywords of a third preset category for chart type recommendation.

[0024] Optionally, the filtering and processing of data objects according to the field information to be visualized and the preset category keywords to obtain the data to be visualized includes:

[0025] Filter out the column data in the data object according to the field information to be visualized;

[0026] Performing row screening on the column data according to the keywords of the first preset category;

[0027] The data obtained by filtering the rows is processed according to the keywords of the second preset category to obtain the data to be visualized.

[0028] Optionally, the preset visualization recommendation model includes: a first mapping relationship between visualization chart types and proprietary coefficient mappings, a second mapping relationship between visualization chart types and third preset type keywords, and a third mapping relationship between visualization chart types and dimension field value deduplication count values;

[0029] The specific coefficient is a coefficient calculated based on the field type required for each visualization chart type.

[0030] Optionally, determining a target visualization chart suitable for the data to be visualized according to a preset visualization recommendation model includes:

[0031] Determine at least one candidate chart according to the preset visualization recommendation model, and calculate a final recommendation value of each candidate chart;

[0032] A target visualization chart is determined according to the final recommended values ​​of the candidate charts.

[0033] Optionally, determining at least one candidate chart according to the preset visualization recommendation model and calculating a final recommendation value of each candidate chart includes:

[0034] Based on the first mapping relationship, determine a set of candidate charts that meet the conditions according to the quantity and category of the field information to be visualized;

[0035] When the candidate chart set is a non-empty set, for each candidate chart in the candidate chart set, based on the second mapping relationship, when the keywords of the third preset type include at least one keyword corresponding to the candidate chart, a specific coefficient of the candidate chart is multiplied at least once by a preset magnification coefficient as an initial recommended value to obtain a first adjusted recommended value;

[0036] Based on the third mapping relationship, when there is a count value of one or more dimension fields in the field information to be visualized that is greater than a preset reference value, the first adjustment recommended value is updated according to the difference between the count value and the preset reference value to obtain a final recommended value.

[0037] Optionally, determining a target visualization chart according to the final recommended values ​​of each candidate chart includes:

[0038] Sorting the final recommended values ​​of the candidate charts and displaying the sorting results for the user to select a target visualization chart, and determining the target visualization chart according to the user's selection;

[0039] Alternatively, the candidate chart with the highest final recommendation value among the candidate charts is used as the target visualization chart.

[0040] Optionally, the keywords of the first preset category include at least one of year, month and day, the keywords of the second preset category include one of monthly, cumulative, and average, and the keywords of the third preset category include at least one of trend, percentage, proportion, ranking and distribution.

[0041] In a second aspect, an embodiment of the present invention further provides a visualization recommendation device, the device comprising:

[0042] An information extraction module is used to parse the input demand text and extract the field information to be visualized and preset category keywords in the demand text according to the parsing result;

[0043] A visualization data acquisition module, used to screen and process data objects according to the field information to be visualized and the preset category keywords to obtain data to be visualized;

[0044] A target visualization chart determination module is used to determine a target visualization chart suitable for the data to be visualized according to a preset visualization recommendation model;

[0045] A visualization display module is used to visualize the data to be visualized according to the target visualization chart.

[0046] Optionally, the information extraction module includes:

[0047] A field matching unit, used to match the fields in the field information library with the demand text one by one, and find text substrings in the demand text whose similarity with each field is greater than or equal to a preset threshold;

[0048] A field set generation unit is used to save, for each field, the text substring with the highest similarity among the text substrings with a similarity greater than or equal to a preset threshold, the corresponding similarity and field name as an element into a field matching set;

[0049] The visualization field extraction unit is used to arrange the elements in the field matching set in descending order according to the similarity value, and extract the fields to be visualized from the field matching set in descending order according to the preset limit number of fields to be visualized, so as to obtain a field set to be visualized.

[0050] Optionally, the visualization field extraction unit is specifically used for:

[0051] When the number of elements in the to-be-visualized field set is less than the preset limit number of to-be-visualized fields, the elements in the field matching set arranged in descending order are read in sequence;

[0052] Determine whether the text substring in the current element of the field matching set read is repeated with the text substring corresponding to the field in the field set to be visualized. If so, read the next element of the current element and repeat this step of determination;

[0053] Otherwise, the field information in the current element is stored in the to-be-visualized field set as the to-be-visualized field information, and the text substring corresponding to the to-be-visualized field information is marked in the requirement text.

[0054] Optionally, the categories of the field information to be visualized include dimension fields and metric fields, wherein the dimension fields include time dimension fields and space dimension fields, and the metric fields include additive metric fields and non-additive metric fields, and the additive metric fields refer to fields whose corresponding data can perform mathematical operations.

[0055] Optionally, the information extraction module is further used for:

[0056] Identify text content other than the text substring corresponding to the field information to be visualized in the requirement text;

[0057] Extracting keywords of a preset category from the text content;

[0058] The keywords of the preset categories include: keywords of a first preset category for data screening, keywords of a second preset category for data processing, and keywords of a third preset category for chart type recommendation.

[0059] Optionally, the visualization data acquisition module is specifically configured to include:

[0060] Filter out the column data in the data object according to the field information to be visualized;

[0061] Performing row screening on the column data according to the keywords of the first preset category;

[0062] The data obtained by filtering the rows is processed according to the keywords of the second preset category to obtain the data to be visualized.

[0063] Optionally, the preset visualization recommendation model includes: a first mapping relationship between visualization chart types and proprietary coefficient mappings, a second mapping relationship between visualization chart types and third preset type keywords, and a third mapping relationship between visualization chart types and dimension field value deduplication count values;

[0064] The specific coefficient is a coefficient calculated based on the field type required for each visualization chart type.

[0065] Optionally, the target visualization chart determination module is specifically used for:

[0066] Determine at least one candidate chart according to the preset visualization recommendation model, and calculate a final recommendation value of each candidate chart;

[0067] A target visualization chart is determined according to the final recommended values ​​of the candidate charts.

[0068] Optionally, the target visualization chart determination module is specifically used for:

[0069] Based on the first mapping relationship, determine a set of candidate charts that meet the conditions according to the quantity and category of the field information to be visualized;

[0070] When the candidate chart set is a non-empty set, for each candidate chart in the candidate chart set, based on the second mapping relationship, when the keywords of the third preset type include at least one keyword corresponding to the candidate chart, a specific coefficient of the candidate chart is multiplied at least once by a preset magnification coefficient as an initial recommended value to obtain a first adjusted recommended value;

[0071] Based on the third mapping relationship, when there is a count value of one or more dimension fields in the field information to be visualized that is greater than a preset reference value, the first adjustment recommended value is updated according to the difference between the count value and the preset reference value to obtain a final recommended value.

[0072] Optionally, the target visualization chart determination module is further used to:

[0073] Sorting the final recommended values ​​of the candidate charts and displaying the sorting results for the user to select a target visualization chart, and determining the target visualization chart according to the user's selection;

[0074] Alternatively, the candidate chart with the highest final recommendation value among the candidate charts is used as the target visualization chart.

[0075] Optionally, the keywords of the first preset category include at least one of year, month and day, the keywords of the second preset category include one of monthly, cumulative, and average, and the keywords of the third preset category include at least one of trend, percentage, proportion, ranking and distribution.

[0076] In a third aspect, an embodiment of the present invention further provides a computer device, the computer device comprising:

[0077] one or more processors;

[0078] A memory for storing one or more programs;

[0079] When the one or more programs are executed by the one or more processors, the one or more processors implement the visualization recommendation method provided by any embodiment of the present invention.

[0080] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the visualization recommendation method provided by any embodiment of the present invention.

[0081] The embodiments of the above invention have the following advantages or beneficial effects:

[0082] By parsing the demand text input by the user and extracting the field information to be visualized and the preset category keywords from it, the data objects are screened and processed according to the field information to be visualized and the preset category keywords to obtain the data to be visualized, and the target visualization chart suitable for the data to be visualized is determined according to the preset visualization recommendation model, and the data to be visualized is visualized according to the target visualization chart. It realizes parsing the data of interest according to the natural language input by the user, and automatically recommending the most suitable chart type to display these data, reducing the development cost of the visualization system. BRIEF DESCRIPTION OF THE DRAWINGS

[0083] Figure 1 is a flowchart of a visualization recommendation method provided by Embodiment 1 of the present invention;

[0084] Figure 2 is a flow chart of a visualization recommendation method provided by Embodiment 2 of the present invention;

[0085] Figure 3 is a structural diagram of a visual recommendation device provided in Embodiment 3 of the present invention;

[0086] Figure 4 It is a structural diagram of a server provided in Embodiment 4 of the present invention. DETAILED DESCRIPTION

[0087] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.

[0088] Embodiment 1

[0089] Figure 1 This is a flowchart of a visualization recommendation method provided in Embodiment 1 of the present invention. This embodiment can be applied to the visualization recommendation function of the BI platform to visualize the data that the user is interested in. The method can be implemented by a visualization recommendation device, which is configured in a server and can be implemented by software and / or hardware in the server.

[0090] like Figure 1 As shown in Figure 2, the visualization recommendation method specifically includes the following contents:

[0091] S110 , parsing the input demand text, and extracting the field information to be visualized and preset category keywords in the demand text according to the parsing result.

[0092] Specifically, the demand text can be text content input by users on a platform with visualization functions, such as a BI platform and a question-and-answer platform. Users express their needs and purposes by inputting demand text to obtain corresponding visualization display results. For example, the content of the demand text is "the performance statistics of employees of Company A in the past three months."

[0093] Further, the demand text is analyzed. First, the field information to be visualized is determined from the demand text by matching it with the fields in the field database. Among them, the field database can be built-in to the platform, which is a field database composed of the column names of each data table in the database, including the English names of all optional fields (i.e. the original names of the fields in the data table, such as "age"), Chinese names (such as "age" corresponding to the meaning of "age"), data types (string, int, double, etc., such as "age" corresponding to the data type is double), field types and other information. In this embodiment, the categories of field information to be visualized include dimension fields and metric fields. Among them, the dimension fields include time dimension fields and space dimension fields. For example, the time dimension field includes field contents such as joining time, transaction time or statistical time, and the space dimension field includes field contents such as age, gender, department or level. The specific content under the space dimension field is enumerable. The metric fields include additive metric fields and non-additive metric fields. An additive metric field refers to a field whose corresponding data can be mathematically calculated. For example, an additive metric field is turnover, and the turnover data can be mathematically calculated. Non-additive fields, such as department names, have corresponding contents such as Department A, Department B, and Department C. Usually, mathematical calculations are not performed on the three department names, which is meaningless. Therefore, such fields are defined as non-additive metric fields.

[0094] Then, the keywords of the preset category are identified from the content of the text in the demand text that has not been successfully matched with any field in the field database. Specifically, regular expression matching method or other natural language parsing methods can be used to identify keywords. In this embodiment, the keywords of the preset category include: keywords of the first preset category for data screening, keywords of the second preset category for data processing, and keywords of the third preset category for chart type recommendation. Exemplarily, the keywords of the first preset category are statements related to data screening, such as "(time) to (time)", "(dimension field enumeration value) and (dimension field enumeration value)", "(value) year (value) month", "(a certain metric field in C) is greater than (value)", "near (number) month", etc. The keywords of the second preset category are statements related to data processing, such as "by (a certain field)" corresponds to the operation of "group by (grouping summary) a certain field", and "monthly" corresponds to grouping and aggregating the date field by month. The third preset category keywords are statements related to the recommended chart types, corresponding to the characteristics of some chart types, such as "trend" (tending to be a line chart / double line chart), "percentage" (tending to be a pie chart / doughnut chart / percentage column chart / percentage horizontal bar chart), "proportion" (same as "percentage") and "ranking" (tending to be a horizontal bar chart / column chart), "distribution" (tending to be a heat map / box plot), etc.

[0095] S120: Screen and process data objects according to the field information to be visualized and the preset category keywords to obtain data to be visualized.

[0096] Specifically, first, filter out the column data in the data object according to the field information to be visualized. The data object is all the data content in the database connected to the platform. The column data in the corresponding data table can be found through the field information to be visualized. Then, the column data preliminarily filtered out is filtered according to the keywords of the first preset category. Exemplarily, by visualizing the field information name and transaction amount, the sales data table of each salesperson of a company is found, one column is the name of the salesperson, and the other column is the specific transaction amount. Then, according to the keyword of the first preset category "within the time period of 10 am to 2 pm", the sales data between 10 am and 2 pm is filtered according to the time order of writing these two columns of data into the table, and the row filtering is completed. It should be noted here that when the field information to be visualized is used for column filtering, if all the fields in the field information to be visualized are on the same data table, only column slicing processing needs to be performed on the data table. If the fields are located on different tables, these tables need to be associated (column splicing of the data tables involved) and then column slicing operations need to be performed.

[0097] Finally, the data obtained by row screening is processed according to the keywords of the second preset category to obtain the data to be visualized. Grouping aggregation operations (sum, average, count), date field format conversion (from day to month / quarter / year) and other processing operations can be performed according to a certain field. For example, the total sales amount of each salesperson from 10 am to 2 pm is calculated, and the multiple transaction amounts of each salesperson in the specified time period are accumulated to obtain the preliminarily processed data to be visualized.

[0098] S130: Determine a target visualization chart suitable for the data to be visualized according to a preset visualization recommendation model.

[0099] Among them, the preset visualization recommendation model is a model defined in this embodiment, including a first mapping relationship between visualization chart type and proprietary coefficient mapping, a second mapping relationship between visualization chart type and the third preset type keyword, and a third mapping relationship between visualization chart type and dimension field value deduplication count value; wherein, the proprietary coefficient is a coefficient calculated based on the field type required for each visualization chart type. Specifically, through the first mapping relationship, the chart type suitable for the field information to be visualized can be found; through the second mapping relationship, the chart type that better meets the user's expectations can be screened out, such as the keyword of the third preset type is "trend", which corresponds to the tendency line chart / double line chart, and these two types of charts can show the trend characteristics of the data; through the third mapping relationship, the target chart type can be screened out from the perspective of the readability of the chart. That is to say, based on the above three mappings, the visualization recommendation model forms recommendation logic from the three perspectives of field type, user's subjective tendency and chart readability, and recommends visualization charts to users.

[0100] S140: Visually display the data to be visualized according to the target visualization chart.

[0101] After completing the above steps, one or more visualization chart types recommended for the user can be obtained. The user can directly use one of the charts to display the data to be visualized, or the user can select a chart from multiple visualization chart types to visualize the data.

[0102] The technical solution of this embodiment parses the demand text input by the user and extracts the field information to be visualized and the preset category keywords therefrom, and then screens and processes the data objects according to the field information to be visualized and the preset category keywords to obtain the data to be visualized, determines the target visualization chart suitable for the data to be visualized according to the preset visualization recommendation model, and visualizes the data to be visualized according to the target visualization chart. It realizes parsing the data of interest according to the natural language input by the user, and automatically recommends the most suitable chart type to display the data, thereby reducing the development cost of the visualization system.

[0103] Embodiment 2

[0104] Figure 2 This is a flowchart of a visualization recommendation method provided in Embodiment 2 of the present invention. Based on the above embodiment, this embodiment further illustrates the process of extracting the field information to be visualized in the demand text and quantifying the visualization chart recommendation value. The explanations of the terms that are the same or corresponding to the above embodiment are not repeated here.

[0105] See also Figure 2 The visualization recommendation method provided in this embodiment specifically includes the following steps:

[0106] S210 , parsing the input demand text, and extracting the field information to be visualized and preset category keywords in the demand text according to the parsing result.

[0107] Specifically, first, match the fields in the field information library with the demand text one by one, and find the text substrings in the demand text whose similarity with each field is greater than or equal to the preset threshold α. Among them, α∈(0,1) can be set according to the accuracy requirements of field matching, and the value range of α is usually 0.85-0.9. The field database can be built-in to the platform, which is a field database based on the column names of each data table in the database, including the English names of all optional fields (that is, the original names of the fields in the data table, such as "age"), Chinese names (such as "age" means "age"), data types (string, int, double, etc., such as "age" corresponding to the data type is double), field type and other information.

[0108] Then, for each field, the text substring with the highest similarity among the text substrings with similarity greater than or equal to the preset threshold, as well as the corresponding similarity and field name are saved as an element in the field matching set. In other words, for a field, there may be multiple text substrings with similarities greater than or equal to the preset threshold matched in the requirement text, and only the text substring corresponding to the similarity with the largest value is taken as the text substring corresponding to the field. Then the "field name, similarity, text substring" is saved as an element in the field matching set M. When no element is saved in M, M is an initialized empty set. That is, if in this step, two fields in the requirement text match text substrings with a similarity greater than or equal to the preset threshold α, there will be 2 elements in M.

[0109] Then, the elements in the field matching set M are arranged in descending order according to the similarity value, and the fields to be visualized are extracted from the field matching set after descending order according to the preset limit number of fields to be visualized, so as to obtain the field set to be visualized. The preset limit number of fields to be visualized n is determined by the maximum number of fields that can be displayed in each type of chart. Assuming that at most 6 fields can be displayed in all chart types, the value of n is 6. The specific operation steps may be to determine whether the number of elements in the field set to be visualized is less than n. If so, the elements in the field matching set M after descending order are read in sequence, otherwise, the reading of the elements in M ​​is stopped. For the element currently read, determine whether the text substring in the current element is repeated with the text substring corresponding to the field in the field set to be visualized. If so, read the next element of the current element and repeat this step of judgment; otherwise, store the field information in the current element as the field information to be visualized in the field set to be visualized C (before the field information to be visualized is put in, C is an empty set), and mark the text substring corresponding to the field information to be visualized in the demand text. This is because different fields may match the same text substring. In this embodiment, in order to eliminate ambiguity, the text substring is only assigned to one field. In addition, marking the text substring corresponding to the field information to be visualized is also to avoid ambiguity caused by giving multiple meanings to the text substring when subsequently identifying the preset type keyword.

[0110] Finally, regular expression matching or other natural language parsing methods can be used to identify keywords in untagged text content.

[0111] S220: Screen and process data objects according to the field information to be visualized and the preset category keywords to obtain data to be visualized.

[0112] For the specific content of this step, please refer to the relevant description of step S120.

[0113] S230: Determine at least one candidate chart according to the preset visualization recommendation model, and calculate a final recommendation value of each candidate chart.

[0114] Specifically, the process of calculating the recommended value of the chart is to map and calculate one by one according to the three mapping relationships of the preset visualization recommendation model.

[0115] First, based on the first mapping relationship of the preset visualization recommendation model, the set of candidate charts that meet the conditions is determined by the number and category of the field information to be visualized. The first mapping relationship can refer to the specific mapping relationship shown in Table 1. For example, if there is 1 dimension field and 2 metric fields in C, the candidate chart set G = {double column chart, double line chart, scatter chart}.

[0116]

[0117]

[0118] The proprietary coefficient corresponding to each chart indicates the degree of proprietary data adaptation according to the field type required by each chart. The calculation of the proprietary coefficient follows the principle of "the higher the chart requirement, the higher the recommended value". The specific calculation formula is: Among them, S k is a coefficient specific to chart type k, n k is the number of field types required for chart type k, Is the field type i required by chart type k k The number of Is the field type i k The number of elements included. For example, the field type required for a stacked column chart is "1 dimension field + 1 spatial dimension field + 1 additive measure field", where the "dimension field" contains 1 element (i.e. "dimension"), the "spatial dimension field" contains 2 elements ("spatial" and "dimension"), and the "additive measure field" contains 2 elements ("additive" and "measurement"), so the exclusive coefficient of the stacked column chart is 1×1+1×2+1×2=5.

[0119] Then, when the candidate chart set G is a non-empty set, for each candidate chart in the candidate chart set, based on the second mapping relationship, when the keywords of the third preset type include at least one keyword corresponding to the candidate chart, the specific coefficient of the candidate chart is used as the initial recommended value and multiplied by the preset magnification coefficient at least once to obtain a first adjusted recommended value. Exemplarily, for chart type k, its specific coefficient S k is the recommended value R k According to the second mapping relationship, if the third preset category keyword contains the key sentence corresponding to the chart type, each containing one then R k The value of is multiplied by F, where F>1 is the magnification factor. The specific value can be set as needed. For example, if the third preset category keyword contains "trend", which corresponds to a double-line graph, then the first adjustment recommendation value of the double-line graph in G is the exclusive coefficient (4) multiplied by F. If the third preset category keyword also contains another keyword pointing to the double-line graph, the first adjustment recommendation value is the exclusive coefficient (4) multiplied by F. 2 .

[0120] Finally, based on the third mapping relationship, when the count value of one or more dimension fields in the field information to be visualized is greater than the preset reference value, the first adjustment recommended value is updated according to the difference between the count value and the preset reference value to obtain the final recommended value R kSpecifically, if the deduplication count of any dimension value is greater than the reference value, let the difference be d, then R k The value of log is reduced a (d+1), where the base a can be set as needed. For each dimension field, R is updated in the above manner. k For example, the reference values ​​for de-duplicating the two dimension values ​​of a stacked horizontal bar chart can be set to 10 (vertical display dimension) and 5 (horizontal display dimension), respectively, and the reference values ​​for de-duplicating the spatial and temporal dimension values ​​of a column chart can be set to 10 and 30, respectively.

[0121] It should be noted here that if a chart type in Table 1 requires multiple dimension fields, the reference values ​​of the deduplication counts of different dimension field values ​​may be different (such as the vertical display dimension and horizontal display dimension of a stacked horizontal bar chart). Therefore, the arrangement of the dimension fields affects the recommended values ​​(for example, if a field is represented on the X-axis and on the Y-axis, the final chart display results will be different).

[0122] S240: Determine a target visualization chart according to the final recommended values ​​of each candidate chart.

[0123] Specifically, after calculation, the recommended value of each chart in the set G can be obtained, and then the final recommended values ​​of each candidate chart are sorted, and the sorting results are displayed for the user to select a target visualization chart, and the target visualization chart is determined according to the user's selection.

[0124] Alternatively, the candidate chart with the highest final recommendation value among the candidate charts is used as the target visualization chart.

[0125] It should be noted here that for the same type of chart, the recommended values ​​may be different if the arrangement and display positions of the fields to be visualized are different. In other words, a chart type may have multiple different recommended values, and the field arrangement with the highest recommended value can be displayed to the user, or all the results can be displayed to the user for the user to choose.

[0126] S250: Visually display the data to be visualized according to the target visualization chart.

[0127] Once the user selects the target visualization chart, the data to be visualized can be displayed visually, and the data corresponding to different fields can be rendered to enhance the readability of the chart.

[0128] The technical solution of this embodiment parses the demand text input by the user and extracts the field information to be visualized and preset category keywords therefrom, and then screens and processes the data objects according to the field information to be visualized and the preset category keywords to obtain the data to be visualized, determines the target visualization chart suitable for the data to be visualized according to the preset visualization recommendation model, and visualizes the data to be visualized according to the target visualization chart, wherein the preset visualization recommendation model comprehensively considers the field type, the user's subjective tendency and the readability of the chart, calculates the recommended value of the chart type and also defines the exclusive coefficient of the chart, quantitatively describes the degree of exclusiveness according to the demand of the chart type for the field composition, and uses it as the basis for calculating the recommended value, thereby realizing parsing the data of interest according to the natural language input by the user, and automatically recommending the most suitable chart type for displaying the data, thereby reducing the development cost of the visualization system.

[0129] The following is an embodiment of a visual recommendation device provided by an embodiment of the present invention. The device and the visual recommendation methods of the above embodiments belong to the same inventive concept, and the visual recommendation methods of the above embodiments can be implemented by the visual recommendation device. For details not described in detail in the embodiment of the visual recommendation device, reference can be made to the embodiment of the above visual recommendation method.

[0130] Embodiment 3

[0131] Figure 3 This is a schematic diagram of the structure of a visualization recommendation device provided in the third embodiment of the present invention. This embodiment can be applied to the visualization recommendation function of the BI platform to visualize the data of interest to the user. Figure 3 As shown, the device specifically includes an information extraction module 310 , a visualization data acquisition module 320 , a target visualization chart determination module 330 and a visualization display module 340 .

[0132] Among them, the information extraction module 310 is used to parse the input demand text, and extract the field information to be visualized and the preset category keywords in the demand text according to the parsing results; the visualization data acquisition module 320 is used to filter and process the data objects according to the field information to be visualized and the preset category keywords to obtain the data to be visualized; the target visualization chart determination module 330 is used to determine the target visualization chart suitable for the data to be visualized according to the preset visualization recommendation model; the visualization display module 340 is used to visualize the data to be visualized according to the target visualization chart.

[0133] The technical solution of this embodiment parses the demand text input by the user and extracts the field information to be visualized and the preset category keywords therefrom, and then screens and processes the data objects according to the field information to be visualized and the preset category keywords to obtain the data to be visualized, determines the target visualization chart suitable for the data to be visualized according to the preset visualization recommendation model, and visualizes the data to be visualized according to the target visualization chart. It realizes parsing the data of interest according to the natural language input by the user, and automatically recommends the most suitable chart type to display the data, thereby reducing the development cost of the visualization system.

[0134] Optionally, the information extraction module 310 includes:

[0135] A field matching unit, used to match the fields in the field information library with the demand text one by one, and find text substrings in the demand text whose similarity with each field is greater than or equal to a preset threshold;

[0136] A field set generation unit is used to save, for each field, the text substring with the highest similarity among the text substrings with a similarity greater than or equal to a preset threshold, the corresponding similarity and field name as an element into a field matching set;

[0137] The visualization field extraction unit is used to arrange the elements in the field matching set in descending order according to the similarity value, and extract the fields to be visualized from the field matching set in descending order according to the preset limit number of fields to be visualized, so as to obtain a field set to be visualized.

[0138] Optionally, the visualization field extraction unit is specifically used for:

[0139] When the number of elements in the to-be-visualized field set is less than the preset limit number of to-be-visualized fields, the elements in the field matching set arranged in descending order are read in sequence;

[0140] Determine whether the text substring in the current element of the field matching set read is repeated with the text substring corresponding to the field in the field set to be visualized. If so, read the next element of the current element and repeat this step of determination;

[0141] Otherwise, the field information in the current element is stored in the to-be-visualized field set as the to-be-visualized field information, and the text substring corresponding to the to-be-visualized field information is marked in the requirement text.

[0142] Optionally, the categories of the field information to be visualized include dimension fields and metric fields, wherein the dimension fields include time dimension fields and space dimension fields, and the metric fields include additive metric fields and non-additive metric fields, and the additive metric fields refer to fields whose corresponding data can perform mathematical operations.

[0143] Optionally, the information extraction module 320 is further used to:

[0144] Identify text content other than the text substring corresponding to the field information to be visualized in the requirement text;

[0145] Extracting keywords of a preset category from the text content;

[0146] The keywords of the preset categories include: keywords of a first preset category for data screening, keywords of a second preset category for data processing, and keywords of a third preset category for chart type recommendation.

[0147] Optionally, the visual data acquisition module 320 is specifically used for:

[0148] Filter out the column data in the data object according to the field information to be visualized;

[0149] Performing row screening on the column data according to the keywords of the first preset category;

[0150] The data obtained by filtering the rows is processed according to the keywords of the second preset category to obtain the data to be visualized.

[0151] Optionally, the preset visualization recommendation model includes: a first mapping relationship between visualization chart types and proprietary coefficient mappings, a second mapping relationship between visualization chart types and third preset type keywords, and a third mapping relationship between visualization chart types and dimension field value deduplication count values;

[0152] The specific coefficient is a coefficient calculated based on the field type required for each visualization chart type.

[0153] Optionally, the target visualization chart determination module 330 is specifically used for:

[0154] Determine at least one candidate chart according to the preset visualization recommendation model, and calculate a final recommendation value of each candidate chart;

[0155] A target visualization chart is determined according to the final recommended values ​​of the candidate charts.

[0156] Optionally, the target visualization chart determination module is specifically configured to include:

[0157] Based on the first mapping relationship, determine a set of candidate charts that meet the conditions according to the quantity and category of the field information to be visualized;

[0158] When the candidate chart set is a non-empty set, for each candidate chart in the candidate chart set, based on the second mapping relationship, when the keywords of the third preset type include at least one keyword corresponding to the candidate chart, a specific coefficient of the candidate chart is multiplied at least once by a preset magnification coefficient as an initial recommended value to obtain a first adjusted recommended value;

[0159] Based on the third mapping relationship, when there is a count value of one or more dimension fields in the field information to be visualized that is greater than a preset reference value, the first adjustment recommended value is updated according to the difference between the count value and the preset reference value to obtain a final recommended value.

[0160] Optionally, the target visualization chart determination module 330 is further configured to:

[0161] Sorting the final recommended values ​​of the candidate charts and displaying the sorting results for the user to select a target visualization chart, and determining the target visualization chart according to the user's selection;

[0162] Alternatively, the candidate chart with the highest final recommendation value among the candidate charts is used as the target visualization chart.

[0163] Optionally, the keywords of the first preset category include at least one of year, month and day, the keywords of the second preset category include one of monthly, cumulative, and average, and the keywords of the third preset category include at least one of trend, percentage, proportion, ranking and distribution.

[0164] The visualization recommendation device provided in the embodiment of the present invention can execute the visualization recommendation method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0165] Embodiment 4

[0166] Figure 4 A schematic diagram of the structure of a server provided in Embodiment 4 of the present invention. Figure 4 A block diagram of an exemplary server 12 suitable for use in implementing embodiments of the present invention is shown. Figure 4 The server 12 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0167] like Figure 4As shown, the server 12 is in the form of a general purpose computing device. The components of the server 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that connects various system components (including the system memory 28 and the processing unit 16).

[0168] Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. By way of example, these architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MAC) bus, an Enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.

[0169] The server 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the server 12, including volatile and non-volatile media, removable and non-removable media.

[0170] The system memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. The server 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 34 may be used to read and write non-removable, non-volatile magnetic media ( Figure 4 not shown, usually called a "hard drive"). Although Figure 4 Not shown in the figure, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, a DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The system memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present invention.

[0171] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in system memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. Program modules 42 generally perform the functions and / or methods of the embodiments described herein.

[0172] The server 12 may also communicate with one or more external devices 14 (e.g., keyboards, pointing devices, displays 24, etc.), may communicate with one or more devices that enable a user to interact with the server 12, and / or may communicate with any device that enables the server 12 to communicate with one or more other computing devices (e.g., network cards, modems, etc.). Such communication may be performed via an input / output (I / O) interface 22. In addition, the server 12 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 20. As shown, the network adapter 20 communicates with other modules of the server 12 via a bus 18. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the server 12, including, but not limited to, microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0173] The processing unit 16 executes various functional applications and data processing by running the program stored in the system memory 28, for example, implementing a visualization recommendation method provided by the embodiment of the present invention, the method comprising:

[0174] Parse the input demand text, and extract the field information to be visualized and the preset category keywords in the demand text according to the parsing result;

[0175] Screening and processing the data objects according to the field information to be visualized and the preset category keywords to obtain the data to be visualized;

[0176] Determine a target visualization chart suitable for the data to be visualized according to a preset visualization recommendation model;

[0177] The data to be visualized is visualized according to the target visualization chart.

[0178] Of course, those skilled in the art can understand that the processor can also implement the technical solution of the visualization recommendation method provided by any embodiment of the present invention.

[0179] Embodiment 5

[0180] The fifth embodiment provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps of the visualization recommendation method provided in any embodiment of the present invention are implemented. The method includes:

[0181] Parse the input demand text, and extract the field information to be visualized and the preset category keywords in the demand text according to the parsing result;

[0182] Screening and processing the data objects according to the field information to be visualized and the preset category keywords to obtain the data to be visualized;

[0183] Determine a target visualization chart suitable for the data to be visualized according to a preset visualization recommendation model;

[0184] The data to be visualized is visualized according to the target visualization chart.

[0185] The computer storage medium of the embodiment of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to: an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.

[0186] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0187] The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0188] Computer program code for performing the operation of the present invention may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect through the Internet).

[0189] It should be understood by those skilled in the art that the modules or steps of the present invention described above can be implemented by a general-purpose computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, optionally, they can be implemented by a program code executable by a computer device, so that they can be stored in a storage device and executed by the computing device, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.

[0190] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims

1. A visualization recommendation method, characterized in that: include: Parsing the input requirement text, and extracting the field information to be visualized and preset category keywords in the requirement text according to the parsing result, wherein the preset category keywords include: keywords of a first preset category for data screening, keywords of a second preset category for data processing, and keywords of a third preset category for chart type recommendation; Filtering out column data in the data object according to the field information to be visualized, performing row filtering on the preliminarily filtered out column data according to the keywords of the first preset category, and processing the data obtained by the row filtering according to the keywords of the second preset category to obtain the data to be visualized; Determining a target visualization chart suitable for the data to be visualized according to a preset visualization recommendation model, wherein the preset visualization recommendation model includes a first mapping relationship between a visualization chart type and a proprietary coefficient mapping, a second mapping relationship between a visualization chart type and a third preset type keyword, and a third mapping relationship between a visualization chart type and a deduplication count value of a dimension field value; wherein the proprietary coefficient is a coefficient calculated based on the field type required for each visualization chart type; The data to be visualized is visualized according to the target visualization chart.

2. The method according to claim 1, characterized in that The extracting the field information to be visualized in the requirement text according to the parsing result includes: Match the fields in the field information library with the requirement text one by one, and find text substrings in the requirement text whose similarity with each field is greater than or equal to a preset threshold; For each field, among the text substrings whose similarity is greater than or equal to a preset threshold, the text substring with the highest similarity and the corresponding similarity and field name are saved as an element in the field matching set; The elements in the field matching set are arranged in descending order according to the similarity value, and the fields to be visualized are extracted from the field matching set arranged in descending order according to the preset limit number of fields to be visualized, so as to obtain a field set to be visualized.

3. The method according to claim 2, characterized in that The method of extracting the fields to be visualized from the field matching set arranged in descending order according to the preset limit number of fields to be visualized to obtain the field set to be visualized includes: When the number of elements in the to-be-visualized field set is less than the preset limit number of to-be-visualized fields, the elements in the field matching set arranged in descending order are read in sequence; Determine whether the text substring in the current element of the field matching set read is repeated with the text substring corresponding to the field in the field set to be visualized. If so, read the next element of the current element and repeat this step of determination; Otherwise, the field information in the current element is stored in the to-be-visualized field set as the to-be-visualized field information, and the text substring corresponding to the to-be-visualized field information is marked in the requirement text.

4. The method according to any one of claims 1 to 3, characterized in that: The categories of the field information to be visualized include dimension fields and metric fields, wherein the dimension fields include time dimension fields and space dimension fields, and the metric fields include additive metric fields and non-additive metric fields, wherein the additive metric fields refer to fields whose corresponding data can perform mathematical operations.

5. The method according to claim 4, characterized in that Extracting preset category keywords in the demand text according to the parsing result: Identify text content other than the text substring corresponding to the field information to be visualized in the requirement text; Keywords of a preset category are extracted from the text content.

6. The method according to claim 1, characterized in that The step of determining a target visualization chart suitable for the data to be visualized according to a preset visualization recommendation model includes: Determine at least one candidate chart according to the preset visualization recommendation model, and calculate a final recommendation value of each candidate chart; A target visualization chart is determined according to the final recommended values ​​of the candidate charts.

7. The method according to claim 6, characterized in that The step of determining at least one candidate chart according to the preset visualization recommendation model and calculating a final recommendation value of each candidate chart includes: Based on the first mapping relationship, determine a set of candidate charts that meet the conditions according to the quantity and category of the field information to be visualized; When the candidate chart set is a non-empty set, for each candidate chart in the candidate chart set, based on the second mapping relationship, when the keywords of the third preset type include at least one keyword corresponding to the candidate chart, a specific coefficient of the candidate chart is multiplied at least once by a preset magnification coefficient as an initial recommended value to obtain a first adjusted recommended value; Based on the third mapping relationship, when there is a count value of one or more dimension fields in the field information to be visualized that is greater than a preset reference value, the first adjustment recommended value is updated according to the difference between the count value and the preset reference value to obtain a final recommended value.

8. The method according to claim 6, characterized in that The step of determining a target visualization chart according to the final recommended values ​​of each candidate chart comprises: Sorting the final recommended values ​​of the candidate charts and displaying the sorting results for the user to select a target visualization chart, and determining the target visualization chart according to the user's selection; Alternatively, the candidate chart with the highest final recommendation value among the candidate charts is used as the target visualization chart.

9. The method according to claim 1, characterized in that: The keywords of the first preset category include at least one of year, month and day, the keywords of the second preset category include one of monthly, cumulative, and average, and the keywords of the third preset category include at least one of trend, percentage, proportion, ranking and distribution.

10. A visual recommendation device, characterized in that: include: An information extraction module, used to parse the input requirement text, and extract the field information to be visualized and preset category keywords in the requirement text according to the parsing result, wherein the preset category keywords include: keywords of a first preset category for data screening, keywords of a second preset category for data processing, and keywords of a third preset category for chart type recommendation; A visualization data acquisition module, used for filtering out column data in a data object according to the field information to be visualized, filtering out rows of the initially filtered out column data according to the keywords of the first preset category, and processing the data obtained by the row filtering according to the keywords of the second preset category to obtain data to be visualized; a target visualization chart determination module, configured to determine a target visualization chart suitable for the data to be visualized according to a preset visualization recommendation model, wherein the preset visualization recommendation model includes a first mapping relationship between visualization chart types and proprietary coefficient mappings, a second mapping relationship between visualization chart types and third preset type keywords, and a third mapping relationship between visualization chart types and dimension field value deduplication count values; wherein the proprietary coefficients are coefficients calculated based on the field type composition required for each visualization chart type; A visualization display module is used to visualize the data to be visualized according to the target visualization chart.

11. A computer device, characterized in that: The computer device comprises: one or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the visualization recommendation method according to any one of claims 1 to 9.

12. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the visualization method according to any one of claims 1 to 9 is implemented.

Citation Information

Patent Citations

  • Chart recommendation system and method based on natural language processing

    CN111460102A