Visual data list display method and deviceTechnical Field
The invention relates to the field of data visualization, in particular to a visualized data list display method and device.
Background
The graph is a graphic structure which is displayed in a screen, can visually display statistical information attributes (timeliness, numerosity and the like) and plays a key role in knowledge mining and information visual and vivid feeling, and is a good means for visually and vividly visualizing object attribute data. The data chart can look up the difference and the prediction trend of the data in a copy mode, so that the data comparison or the data change trend becomes clear at a glance, and the data relation can be expressed quickly and effectively. The chart is linked to the work data that generated it.
The existing scheme realizes data modeling and large-screen display configuration, and the steps to be realized are as follows:
first, the data source is opened and the list is displayed in alphabetical order on the left. In a second step, one or more tables are dragged from the list, setting attributes to complete the data modeling. And thirdly, opening the UE designer and adding a visual component. And fourthly, setting data for the visual component, opening a data source and the table, and displaying a table field list in alphabetical sorting on the left side. And fifthly, dragging one or more table fields from the list, and setting the attributes to complete the large-screen display configuration.
When data is complex, such as the number of tables is large, or fields of the tables are large and the data amount is large, it is difficult for a person to judge which data is important, which data should be selected for data modeling and large-screen display, and it may take a lot of time to perform data analysis and screening.
Disclosure of Invention
The invention aims to: the method and the device for displaying the visual data list solve the problem that when data are complex, such as the number of tables is large, or fields of the tables are large and the data amount is large, people are difficult to judge which data are important, which data need to be selected for data modeling and large-screen display, and a large amount of time is probably spent on data analysis and screening.
The technical scheme adopted by the invention is as follows:
a visual data list display method comprises the following steps:
s1, opening a data source, and displaying a data table list on a page;
s2, dragging at least one data sheet from the list of the step S1, and setting the attributes of the data sheet to complete data modeling;
s3, opening a visualization designer, and adding a visualization component;
s4, opening a data table, and displaying a field list of the data table on a page;
s5, dragging at least one field from the list of the step S4, and setting the field attribute to complete the data visualization display configuration;
the order of the data tables in the data table list in step S1 is sorted according to the importance coefficients of the data tables;
the order of the fields in the field list in step S4 is sorted according to the importance coefficients of the fields.
According to the scheme, a data exploration method is used for carrying out importance sequencing on a database table and fields of the table, and list display of the table and the fields is improved according to sequencing results. When the data is complex and the user does not know how to select the data, the method can greatly reduce the manual labor and make the selected data more reasonable. The problem that when data are complex, such as the number of tables is large, or fields of the tables are large, the data are difficult to judge manually, and when the data are selected for data modeling and large-screen display, a large amount of time is spent on data analysis and screening, so that the data can be completed is solved.
Further, the parameter of the important coefficient of the data table includes at least one of a record number coefficient of the data table and an association table coefficient of the data table.
Further, the method for calculating the correlation table coefficient of the data table comprises the following steps:
s601, traversing the data tables in the data source, and screening the association tables of the data tables as a first-level association table;
s602, traversing the data tables in the data source, screening out an association table of the first-level association table as a second-level association table, screening out an association table of the second-level association table as a third-level association table, and screening out an N-level association table in the same way, wherein the N-level association table does not have a next-level association table; n is a positive integer;
s603, the data table has the correlation table coefficient that the number of the first-level correlation tables is multiplied by the total number of the second-level correlation tables, then multiplied by the total number of the third-level correlation tables, and so on until the total number of the Nth-level correlation tables is multiplied.
Further, two data tables are associative tables when there is an associative foreign key field between them or the field name of one of the data tables includes the table name of the other data table.
Further, the record number coefficient of the data table is the record number of the data table divided by the maximum record number in all the data tables.
Further, the significant coefficient of the data table is positively correlated with the product of the record number coefficient of the data table and the correlation table coefficient possessed by the data table.
Further, the parameters of the important coefficients of the fields include the classification of each field and the degree of association with other fields.
Further, the field classification method comprises the following steps:
s701, analyzing a null value proportion in a field value, and setting an important coefficient of the field to be the lowest when the null value proportion exceeds a preset proportion;
s702, analyzing whether the field value is a single value or not, and if the field value is the single value, setting the important coefficient of the field to be the lowest;
and S703, when the proportion of null values in the field value does not exceed the preset proportion and the field value is not a single value, setting the important coefficient of the field to be the highest, and determining the important coefficient of the field according to the association degree of the field and other fields. The null value proportion is the proportion of the null value in the field value, and the preset proportion is that the user can independently select the null value according to specific conditions, and generally does not exceed 60%. The minimum value range of the important coefficient is generally 0.1-0.5, and the maximum value range of the important coefficient is generally 0.8-1.2. The user can adjust the content according to different contents recorded in the data table.
Furthermore, the association degree between a field and other fields is obtained by performing association coefficient calculation on a field value list of the field and field value lists of all other fields and then accumulating the calculated association coefficients. The field value list is a column of data belonging to a field, also called field column value, for example, a column of data in EXCEL table, the first row is a field name, and the following data is a field value list of the field.
A visual data list display apparatus comprising:
a memory for storing executable instructions;
and the processor is used for executing the executable instructions stored in the memory to realize the visual data list display method.
In summary, due to the adoption of the technical scheme, the invention has the beneficial effects that:
1. the invention discloses a visual data list display method and a device, wherein visual data modeling comprises the following steps: the arrangement of the data tables is sorted from high to low according to the importance degree of the tables during modeling, and a user can select the data tables from front to back in sequence, so that the trouble that the user does not know how to select the data tables and tests one by one when facing a large stack of tables is avoided;
2. the invention discloses a visual data list display method and a visual data list display device, which solve the problem that when data are complex, such as the number of tables is large, or fields of the tables are large and the data amount is large, people are difficult to judge which data are important, which data are selected for data modeling and large-screen display, and a large amount of time is probably spent on data analysis and screening.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the present invention will be described in further detail below, the described embodiments should not be construed as limiting the present invention, and all other embodiments obtained by a person of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used herein is for the purpose of describing embodiments of the invention only and is not intended to be limiting of the invention.
Example 1
A visual data list display method comprises the following steps:
s1, opening a data source, and displaying a data table list on a page;
s2, dragging at least one data sheet from the list of the step S1, and setting the attributes of the data sheet to complete data modeling;
s3, opening a visualization designer, and adding a visualization component;
s4, opening a data table, and displaying a field list of the data table on a page;
s5, dragging at least one field from the list of the step S4, and setting the field attribute to complete the data visualization display configuration;
the order of the data tables in the data table list in step S1 is sorted according to the importance coefficients of the data tables;
the order of the fields in the field list in step S4 is sorted according to the importance coefficients of the fields.
The scheme provides a method for sequencing the importance of a database table and fields of the table by using a data exploration method, and improving the list display of the table and the fields according to the sequencing result. When the data is complex and the user does not know how to select the data, the method can greatly reduce the manual labor and make the selected data more reasonable.
Example 2
The present embodiment is further based on embodiment 1, where the parameter of the significant coefficient of the data table includes at least one of a record number coefficient of the data table and an association table coefficient that the data table has.
Further, the method for calculating the correlation table coefficient of the data table comprises the following steps:
s601, traversing the data tables in the data source, and screening the association tables of the data tables as a first-level association table;
s602, traversing the data tables in the data source, screening out an association table of the first-level association table as a second-level association table, screening out an association table of the second-level association table as a third-level association table, and screening out an N-level association table in the same way, wherein the N-level association table does not have a next-level association table;
s603, the data table has the correlation table coefficient that the number of the first-level correlation tables is multiplied by the total number of the second-level correlation tables, then multiplied by the total number of the third-level correlation tables, and so on until the total number of the Nth-level correlation tables is multiplied.
Furthermore, the recording number coefficient of the data table is the recording number of the data table divided by the maximum recording number in all the data table tables.
Further, the significant coefficient of the data table is positively correlated with the product of the record number coefficient of the data table and the correlation table coefficient possessed by the data table.
Example 3
This embodiment is an example of embodiment 2, where table a associates tables B, C and D, while table B associates 3 tables, table C associates 1 table, and table D does not associate other tables, so table a has an associated table coefficient of 3 × (3+1+0) = 12; table a has an associated table coefficient of 3 x 1=3 if B and C each have no associated other table.
Example 4
Further to embodiment 2, when there is an associated foreign key field between two data tables or the field name of one of the data tables includes the table name of the other data table, the two data tables are associated tables. If table A has a foreign key field with table B, or table B has a field named A _ ID, then table A and table B are considered to be associated.
Example 5
In this embodiment, based on embodiment 1, the parameters of the significant coefficients of the fields include the classification of each field and the degree of association with other fields.
Further, the field classification method comprises the following steps:
s701, analyzing a null value proportion in a field value, and setting an important coefficient of the field to be 0.4 when the null value proportion exceeds 40%;
s702, analyzing whether the field value is a single value or not, and if the field value is the single value, setting the important coefficient of the field to be 0.4;
and S703, when the proportion of null values in the field value does not exceed 40% and the field value is not a single value, setting the important coefficient of the field to be 1, and determining the important coefficient of the field according to the association degree of the field and other fields.
Furthermore, the association degree between a field and other fields is obtained by performing association coefficient calculation on a field value list of the field and field value lists of all other fields and then accumulating the calculated association coefficients.
Example 6
A visual data list display apparatus comprising:
a memory for storing executable instructions;
and the processor is used for executing the executable instructions stored in the memory to realize the visual data list display method.
Example 7
The present embodiment is a part of codes for implementing the sorting function of the present scheme:
// ordering
private static List<Column>sort(List<Column>columns, double[][]scoreArray) {
for (int i = 0; i<columns.size(); i++) {
Field field = columns.get(i).getField();
double totalScore = 0;
double[]scores = scoreArray[i];
for (double score : scores) {
totalScore += score;
}
// LOG.info(field.getName() + " -- " + totalScore);
field.setImportance(totalScore);
}
// from high to low
Collections.sort(columns, new Comparator<Column>() {
@Override
public int compare(Column column1, Column column2) {
double importance1 = column1.getField().getImportance();
double importance2 = column2.getField().getImportance();
int result;
if (importance1>importance2) {
result = -1;
} else if (importance1<importance2) {
result = 1;
} else {
result = 0;
}
// LOG.debug("result = " + result);
return result;
}
});
return columns;
}。
In addition, the functional modules in the embodiments of the present invention may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.