A method for creating views based on dynamic query SQL as a configuration display method
Through dynamic query SQL and cluster analysis decision tree algorithms, combined with user visual preferences and emotional states, personalized display of database views is achieved, solving the problem of lack of personalization and dynamic interaction in the existing technology, and improving data availability and Decision-making efficiency.
Patent Information
- Application Number
- CN202410162519.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-05
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2044-02-05
AI Technical Summary
Existing database client software and data visualization tools lack personalized display and dynamic interaction capabilities when processing data from different data sources. They cannot meet users' visual preferences and emotional state adjustment needs, affecting data availability and decision-making efficiency.
Views are created using a method based on dynamic query SQL. By loading the database driver, selecting the database and Schema, customizing SQL queries, and combining cluster analysis and decision tree algorithms, charts are dynamically generated and adjusted according to the user's visual preference and emotional state. Personalized data display.
It achieves flexible configuration and personalized display of different data sources, improves data availability and user experience, can reflect users' emotional states in real time, and enhances the efficiency and quality of decision-making.
Smart Images

Figure CN117971870B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of database technology, and in particular to a method for creating a view based on dynamic query SQL as a configuration presentation mode. Background Art
[0002] With the rapid development of information technology, databases have become a key tool for storing and managing data. Among them, SQL (Structured Query Language), as a powerful database language, provides multiple functions such as data manipulation and data definition. Its interactive characteristics provide great convenience for users. However, in actual applications, many database client software, while supporting multiple data source connections, often lack the diversity and personalized customization capabilities in data view display.
[0003] Especially in the field of business intelligence (BI) and data analysis, users' understanding of data and decision-making process not only rely on the accuracy and completeness of data, but also highly rely on the way data is presented. Users need not only static data tables, but interactive views that can be dynamically generated and adjusted according to personal visual preferences and emotional state categories. This demand has prompted developers to seek a method that can flexibly generate and adjust the view display style and data interpretation according to user needs.
[0004] Current database client software and data visualization tools can provide basic chart display functions when processing data from different data sources, but they are still insufficient in personalized display, dynamic interaction, and emotional perception adjustment. Therefore, developing a technology that combines the powerful data processing capabilities of SQL with personalized and dynamic view display technology can significantly improve data availability and user experience, while improving the efficiency and quality of the decision-making process. Summary of the invention
[0005] In response to the problems in the related technology, the present invention proposes a method for creating views based on dynamic query SQL as a configuration display method, which has the function of displaying the data content you want according to the generated business data for each business scenario, so as to facilitate subsequent business statistics and decision-making. The decision content can be used in various forms to maximize the purpose of satisfying the business demands of customers in various scenarios, thereby overcoming the above-mentioned technical problems existing in the existing related technology.
[0006] To this end, the specific technical solution adopted by the present invention is as follows:
[0007] The method of creating a view based on dynamic query SQL as a configuration display method includes the following steps:
[0008] S1. Load the corresponding database driver based on the database configuration information on the page, connect to the configured database according to the configuration information, and verify the connectivity of the database;
[0009] S2. Select the corresponding database and Schema according to the business data, select an existing table in the selected Schema, and create datasets based on the selected table and custom SQL query;
[0010] S3. Select the corresponding chart type according to the data type to be displayed and the analysis purpose, and customize the chart based on the visual preferences and information digestion categories of the target users;
[0011] S4. Dynamically generate views based on SQL queries combined with the target user's custom configuration, and adjust the view's display style category and data presentation category according to the target user's emotional state category to achieve personalized presentation of business data.
[0012] Furthermore, the loading of the corresponding database driver based on the database configuration information of the page and connecting to the configured database according to the configuration information includes the following steps:
[0013] S11, obtain the database configuration information of the page, and load the corresponding database driver according to the configuration information to determine whether it is necessary to connect to the database through SSL;
[0014] S12. Connect the configured database according to the configuration information to verify the connectivity of the database, wherein the database includes a time series database, a hive big database, a quasi-real-time big database, a relational database, and an MPP architecture database.
[0015] Furthermore, the step of selecting a corresponding database and Schema according to the business data, selecting an existing table in the selected Schema, and creating a datasets data set according to the selected table in combination with a custom SQL query includes the following steps:
[0016] S21. Select the corresponding database according to the business data requirements, and select the corresponding Schema in the selected database;
[0017] S22. View and review the existing tables in the selected Schema, and select one or more tables based on business requirements;
[0018] S23. Write SQL query statements according to the selected table and specific data requirements, and convert the query results of the SQL query statements into datasets.
[0019] Furthermore, the step of selecting a corresponding chart type according to the data type to be displayed and the analysis purpose, and customizing the chart based on the visual preference and information digestion category of the target user includes the following steps:
[0020] S31. Select a corresponding chart type according to the data type to be displayed and the analysis purpose, and define the dimension options and time attributes of the chart;
[0021] S32, using cluster analysis combined with association rule learning technology to analyze the visual preferences of target users for different view charts;
[0022] S33, analyzing the target user's response to different view charts based on a decision tree algorithm, and identifying the user's information digestion category;
[0023] S34. Customize the chart according to the visual preference of the target user and the information digestion category.
[0024] Furthermore, the method of analyzing the visual preferences of target users for different view charts by using cluster analysis combined with association rule learning technology includes the following steps:
[0025] S321, obtaining data on user interactions with different view charts in a historical database, extracting features related to user visual preferences based on the preprocessed interaction data, extracting key features of the view charts, and clustering the view charts using a clustering algorithm to form different view chart groups;
[0026] S322, associating the user's interaction data with the view chart clustering results, clustering the users using the user's interaction data for different view chart groups, and finding association rules between the user's visual preference and the view chart group features based on the user clustering results;
[0027] S323. Analyze the visual preferences of the target user group for different view chart groups based on the results of view chart clustering, user clustering and association rules, wherein the visual preference represents the user's preference and inclination for visual elements such as color, font and layout type.
[0028] Visual preference is a quantifiable indicator that can be expressed by a numerical value. For example, it can be expressed by a score from 0 to 1, where 0 means no preference at all and 1 means extreme preference. This score can be calculated based on factors such as the frequency and duration of user interaction with the view chart, and user feedback. The larger the value, the higher the user's preference for a certain visual element. This numerical representation can more intuitively understand the user's preference for different visual elements (such as color, font, layout, etc.).
[0029] Specifically, visual preference = α . Interaction frequency score + β . Duration score + γ .User feedback score, where α, β, and γ are weight coefficients used to adjust the influence of different factors in the total score, and the sum of the three weight coefficients is 1. Interaction frequency score: calculated based on the number of times the user interacts with the view chart. For example, the number of interactions of a user can be compared with the average number of interactions of all users to obtain a relative score. Duration score: calculated based on the total time the user spends on the view chart. Similarly, the total duration of the user can be compared with the average duration of all users to obtain a relative score. User feedback score: If there is user feedback (such as survey scores), you can use these scores directly or convert them into a standardized score.
[0030] Furthermore, associating the user's interaction data with the view chart clustering results, clustering the users using the user's interaction data for different view chart groups, and finding the association rules between the user's visual preference and the view chart group features based on the user clustering results includes the following steps:
[0031] S3221. Integrate the clustering results of the view chart and the user's interaction data, create a feature matrix for each user, and standardize the data in the feature matrix;
[0032] S3222, determining the optimal number of clusters, clustering the user's feature matrix using a clustering algorithm, and evaluating the clustering results using a silhouette coefficient indicator;
[0033] S3223. Convert the result of user clustering into the format of association rule learning, and use the association rule method to analyze the relationship between the user's visual preference and the view chart group characteristics.
[0034] Furthermore, analyzing the target user's response to different view charts based on the decision tree algorithm and identifying the user's information digestion category includes the following steps:
[0035] S331, obtaining data on user interactions with different view charts in a historical database, and extracting features related to user learning and digesting information categories based on the preprocessed interaction data;
[0036] S332, using the user's interactive data to train a decision tree model, and optimizing the parameters of the decision tree model through a parameter fusion optimization algorithm;
[0037] S333, predicting the target user's response to different view charts based on the optimized decision tree model, and identifying the target user's information digestion category according to the prediction result;
[0038] Among them, the user information digestion category includes the speed at which the user processes information, the category of interaction between the user and the view chart, and the user's concentration when viewing the view chart.
[0039] Furthermore, the method of training the decision tree model using the user's interactive data and optimizing the parameters of the decision tree model using a parameter fusion optimization algorithm includes the following steps:
[0040] S3321. Train a decision tree model using user interaction data, select parameters to be optimized in the decision tree model, and define a search range or a candidate value list for each parameter;
[0041] S3322. Randomly generate initial parameter combinations in the parameter space, evaluate the fitness of each parameter combination on the training set, and select the parameter combination with the best fitness to perform crossover and mutation operations to obtain a new parameter combination;
[0042] S3323, repeatedly executing S3322 until a preset number of iterations or fitness threshold is reached to obtain an initial optimal parameter combination;
[0043] S3324, using the initial optimal parameter combination as the starting point of Bayesian optimization, and using Bayesian optimization to construct a probability model between parameters and model performance;
[0044] S3325. Based on the probability model, a new parameter combination is selected for testing and the model is continuously updated. The iteration is continued until the optimal parameter combination is found or the iteration number limit is reached to obtain the optimal parameter combination.
[0045] Furthermore, the step of customizing the chart according to the visual preference of the target user and the information digestion category includes the following steps:
[0046] S341, obtaining the visual preference data of the target user and the data on the learning and digesting information method, and configuring the chart color, font and layout type according to the visual preference of the target user;
[0047] S342, configuring the frequency of data updates and the speed of dynamic display in the chart based on the speed at which the target user processes information;
[0048] S343. Configure different levels of information display according to the target user's attention concentration when viewing the view chart, and configure interaction parameters based on the interaction category between the target user and the view chart.
[0049] Furthermore, the method of dynamically generating a view based on SQL query combined with the custom configuration of the target user, and adjusting the display style category and data presentation category of the view according to the emotional state category of the target user to realize the personalized display of business data includes the following steps:
[0050] S41, obtaining custom configuration parameters of the target user, and dynamically generating a view based on SQL query and the custom configuration of the target user;
[0051] S42, identifying the target user's emotional state category through the target user's facial expression or voice emotion, and adjusting the color, font, motion effect elements, and data presentation category of the view in real time according to the target user's emotional state category, to ensure that the generated view conforms to the target user's emotional state;
[0052] S43. Display the customized view to the target user to achieve personalized display of business data.
[0053] Compared with the prior art, the present invention provides a method for creating a view based on dynamic query SQL as a configuration display method, which has the following beneficial effects:
[0054] (1) The present invention can configure connections for different data sources and select the following schema mode and the table under the schema according to the characteristics of different data sources. At the same time, the corresponding chart can be generated according to the custom SQL statement; the present invention can support all current database connections, and can also be displayed in multiple ways based on the queried data, and can be configured in a WYSIWYG way without the need for separate demand development.
[0055] (2) The present invention can not only customize data views according to the specific needs and preferences of users through dynamic query SQL and user configuration, thereby providing standard data display, and adjusting views according to the user's personal preferences to improve user experience, but also perceive the user's emotions through the user's facial expression and voice analysis, and adjust the view style and data display method accordingly, so as to achieve dynamic adjustment, so that the data view can remain relevant and attractive in different situations, so that the presentation of business data views is not only more in line with the user's preferences and understanding methods, but also can reflect and adapt to the user's emotional state category in real time. In this environment, users can not only understand and analyze data more quickly and accurately, but also make decisions in a more comfortable and personalized situation, thereby improving the efficiency and quality of decision-making, while ensuring that good decision-making results are maintained under emotional changes.
[0056] (3) The present invention can deeply and accurately analyze and predict the user's visual preferences and information digestion categories through cluster analysis and decision tree algorithms, so that users can be effectively classified according to their visual preferences and learning habits, and a more customized view design can be provided for each type of user. At the same time, the application of the decision tree algorithm can understand the user's decision path and preference pattern, which not only makes the view more in line with the user's personal preferences in appearance, but also better adapts to the user's understanding and processing ability in the way of information presentation. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0058] Figure 1 The present invention is a flowchart of a method for creating a view based on dynamic query SQL as a configuration presentation method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0059] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0060] According to an embodiment of the present invention, a method for creating a view based on dynamic query SQL as a configuration presentation mode is provided.
[0061] The present invention will now be further described with reference to the accompanying drawings and specific embodiments. Figure 1 As shown, according to one embodiment of the present invention, a method for creating a view based on dynamic query SQL as a configuration display mode is provided, comprising the following steps:
[0062] S1. Load the corresponding database driver based on the database configuration information on the page, connect to the configured database according to the configuration information, and verify the connectivity of the database;
[0063] The step of loading the corresponding database driver based on the database configuration information on the page and connecting to the configured database according to the configuration information includes the following steps:
[0064] S11. Obtain the database configuration information of the page, and load the corresponding database driver according to the configuration information, and determine whether it is necessary to connect to the database through SSL. Determine whether it is necessary to connect to the database through SSL (Secure Sockets Layer), which is important for ensuring the security of data transmission, especially when sensitive data is involved;
[0065] Specifically, the configuration information of each database varies depending on the type of database. For example, mySQL requires configuration of the IP and port as well as the database name, user name and password, additional parameters, etc.
[0066] S12. Connect to the configured database according to the configuration information and verify the connectivity of the database (verify whether the database connection is successful by executing a test query). The databases include time series databases (Apache Druid), Hive big databases (Apache Hive), quasi-real-time big databases (Apache Spark SQL), relational databases (MySQL, postgreSQL, SQLite) and MPP architecture databases (Presto, Trino).
[0067] In addition, after the database is created, you can also make changes to the database, including:
[0068] Information change: modify the database information;
[0069] Overall deletion: delete the database;
[0070] Data export: realize the export of database data.
[0071] S2. Select the corresponding database and Schema according to the business data, select an existing table in the selected Schema, and create datasets based on the selected table and custom SQL query;
[0072] The process of selecting a corresponding database and schema according to business data, selecting an existing table in the selected schema, and creating a datasets data set according to the selected table combined with a custom SQL query includes the following steps:
[0073] S21. Select the corresponding database according to the business data requirements, and select the corresponding Schema in the selected database;
[0074] Specifically, first clarify the business data requirements, which will determine which type of database to choose (such as relational database, big data database, etc.); then select the appropriate database based on business needs; finally, select the appropriate Schema in the selected database. Schema is the way to store data structure in the database. Different Schemas represent different business modules or projects.
[0075] S22. View and review the existing tables in the selected Schema, including information such as column names and data types, and select one or more tables based on business needs. The selection should be based on the needs of the analysis or application that the dataset will be used for;
[0076] Specifically, you can select dimensions and indicators for any combination based on the retrieved data, and you can also filter the data.
[0077] S23. Write SQL query statements based on the selected table and specific data requirements, including operations such as selecting specific columns, filtering conditions, connecting multiple tables, and converting the query results of the SQL query statements into datasets.
[0078] In addition, after the dataset is created, you can also make changes to the dataset, including:
[0079] Database table change: change the data set according to the database table information;
[0080] SQL change: Change according to custom SQL;
[0081] Delete Dataset: Deletes an existing dataset.
[0082] S3. Select the corresponding chart type according to the data type to be displayed and the analysis purpose, and customize the chart based on the visual preferences and information digestion categories of the target users;
[0083] The step of selecting a corresponding chart type according to the data type to be displayed and the analysis purpose, and customizing the chart based on the visual preference and information digestion category of the target user includes the following steps:
[0084] S31. Select the corresponding chart type (such as bar chart, line chart, pie chart, etc.) according to the data type to be displayed (such as numerical value, classification, time series, etc.) and the analysis purpose (such as displaying trends, comparing groups, revealing relationships, or other purposes), and define the dimension options and time attributes of the chart. For example, large data volumes or multidimensional data require more complex chart types such as heat maps or scatter plot matrices;
[0085] In addition, you can also define time attribute configuration (including time column, time granularity and time range) and query configuration (including dimension, measure value, percentage measure value, filter value, sort dimension, paging option, record limit, time inclusion, sorting method, whether to display total number).
[0086] S32, using cluster analysis combined with association rule learning technology to analyze the visual preferences of target users for different view charts; specifically, using cluster analysis combined with association rule learning technology to analyze the visual preferences of target users for different view charts includes the following steps:
[0087] S321. Obtain data on user interactions with different view charts in a historical database, such as click-through rate, browsing time, user feedback, etc., and extract features related to user visual preferences based on the preprocessed interaction data, such as user basic information, historical interaction behavior, etc., extract key features of view charts, such as chart type, color scheme, layout, etc., cluster the view charts using a clustering algorithm to form different view chart groups, check the rationality and effectiveness of the clustering results, and ensure that the view charts of each group have common characteristics;
[0088] S322, associating the user's interaction data with the view chart clustering results, clustering the users using the user's interaction data for different view chart groups, and finding association rules between the user's visual preference and the view chart group features based on the user clustering results, specifically including the following steps:
[0089] S3221. Integrate the clustering results of the view chart and the user's interaction data, create a feature matrix for each user, which includes the user's interaction with each view chart group, and standardize the data in the feature matrix to ensure that each feature has the same influence in subsequent analysis;
[0090] S3222. Select an appropriate clustering algorithm, such as K-Means, hierarchical clustering, etc., determine the optimal number of clusters, use the clustering algorithm to cluster the user's feature matrix, and use the silhouette coefficient indicator to evaluate the rationality and effectiveness of the clustering results;
[0091] In order to achieve effective clustering of the user feature matrix, the following steps can be taken:
[0092] 1) Choose a suitable clustering algorithm: Choose a suitable clustering algorithm based on the data characteristics and requirements. Common algorithms include K-Means and hierarchical clustering.
[0093] K-Means algorithm: Applicable to large-scale data sets, mainly used to find spherical clusters. It minimizes the sum of distances within the cluster through iteration and is suitable for processing numerical data.
[0094] Hierarchical clustering algorithm: suitable for smaller data sets, and can form a tree-like clustering structure. This method is suitable for situations where the shapes and sizes of clusters vary greatly.
[0095] 2) Determine the optimal number of clusters: Especially when using the K-Means algorithm, choosing the right number of clusters is key. You can use the Elbow Method to estimate the optimal number of clusters. This method determines the optimal number by evaluating the total squared error (SSE) under different numbers of clusters.
[0096] 3) Clustering the user feature matrix: Input the user's feature data into the selected clustering algorithm for clustering analysis. This step will group the users into different clusters based on their features.
[0097] 4) Use the silhouette coefficient to evaluate clustering results: The silhouette coefficient is an indicator for evaluating clustering effects, ranging from -1 to 1. A high silhouette coefficient indicates that the samples within the cluster are highly similar, while the samples between clusters are highly different. By calculating the silhouette coefficient, the rationality and effectiveness of the clustering results can be evaluated.
[0098] Through these steps, user characteristics can be effectively clustered to provide more personalized view configurations for different user groups, improving user experience and the effectiveness of data analysis.
[0099] S3223. Convert the results of user clustering into the format of association rule learning, set the minimum support and minimum confidence, use association rule methods (such as Apriori, FP-Growth, etc.) to analyze the relationship between user visual preferences and view chart group characteristics, analyze the mined rules, and find the most valuable rules.
[0100] Convert the user clustering results into the format of association rule learning, and apply the association rule method to analyze the relationship between user visual preference and view chart group characteristics. You can follow the following steps:
[0101] 1) Convert clustering results into a format suitable for association rule learning: First, the user clustering results need to be converted into a data format suitable for association rule learning. This usually involves representing the clustering results as a series of transactions, where each transaction contains a set of items.
[0102] 2) Set the minimum support and minimum confidence:
[0103] Minimum Support: This is a threshold that determines how often an item set appears in all transactions. Only when the support of an item set is above this threshold, it will be considered for further analysis.
[0104] Minimum confidence: This is another threshold to measure the strength of the rule. A rule with a high confidence level indicates that when one item appears, the other item is likely to appear as well.
[0105] 3) Apply association rule algorithms to analyze data: You can use algorithms such as the Apriori algorithm or the FP-Growth algorithm to discover strong association rules. The Apriori algorithm finds frequent item sets in an iterative manner, while the FP-Growth algorithm uses a compressed tree structure to store data sets, which is more efficient.
[0106] 4) Analyze the mined rules: Analyze these rules to find the relationship between user visual preferences and view chart characteristics. This includes identifying which chart types, colors, or layout categories are associated with the preferences of specific user groups.
[0107] 5) Find the most valuable rules: Filter out the most valuable rules from the mined rules. These rules should have high support and high confidence, indicating that they have high universality and credibility.
[0108] Through this process, we can have a deeper understanding of the visual preferences and needs of user groups, thereby providing each user group with a more accurate and personalized data view design, improving the effectiveness of user experience and data analysis.
[0109] S323. Analyze the visual preferences of the target user group for different view chart groups based on the results of view chart clustering, user clustering and association rules, wherein the visual preference represents the user's preference and inclination for visual elements such as color, font and layout type.
[0110] S33, analyzing the target user's response to different view charts based on a decision tree algorithm, and identifying the user's information digestion category;
[0111] Specifically, analyzing the target user's response to different view charts based on the decision tree algorithm and identifying the user's information digestion category includes the following steps:
[0112] S331, obtaining data on user interactions with different view charts in a historical database, including user clicks, scrolling, dwell time, number of return visits, etc., and extracting features related to user learning and digesting information categories based on the preprocessed interaction data, such as the frequency, duration, sequence, etc. of user interaction behaviors, and the type and complexity of view charts, etc.;
[0113] S332, selecting a suitable decision tree algorithm, such as CART, ID3 or C4.5, using the user's interactive data to train the decision tree model, and optimizing the parameters of the decision tree model through a parameter fusion optimization algorithm; said using the user's interactive data to train the decision tree model, and optimizing the parameters of the decision tree model through a parameter fusion optimization algorithm includes the following steps:
[0114] S3321. Train a decision tree model using user interaction data, select parameters to be optimized in the decision tree model, such as the depth of the tree (max_depth), the minimum number of samples of a branch (min_samples_split), etc., and define a search range or a candidate value list for each parameter;
[0115] S3322. Randomly generate initial parameter combinations in the parameter space, evaluate the fitness of each parameter combination on the training set, and select the parameter combination with the best fitness to perform crossover and mutation operations to obtain a new parameter combination;
[0116] S3323, repeatedly executing S3322 until a preset number of iterations or fitness threshold is reached to obtain an initial optimal parameter combination;
[0117] S3324, using the initial optimal parameter combination as the starting point of Bayesian optimization, and using Bayesian optimization to construct a probability model between parameters and model performance;
[0118] When the initial optimal parameter combination is used as the starting point of Bayesian optimization to build a probability model between parameters and model performance (the probability model is a Gaussian process), the specific steps are as follows:
[0119] 1) Initialize Bayesian optimization:
[0120] Define the objective function: The objective function f(θ) represents the performance of the decision tree model, such as accuracy, AUC, etc., as a function of the parameter θ.
[0121] Choosing prior distribution: Gaussian process (GP) is often used as the prior distribution of the target function because it provides continuous estimates and uncertainty estimates about the function. The Gaussian process is represented as GP(m(θ), k(θ, θ′)), where m(θ) is the mean function, which is usually set to zero, and k(θ, θ′) is the covariance function, which represents the similarity between parameters θ and θ′.
[0122] 2) Using the initial optimal parameter combination:
[0123] Starting sampling point: Use the initial optimal parameter combination obtained through the previous process (such as S3321 to S3323) as the starting sampling point of Bayesian optimization.
[0124] Initial Evaluation: These initial parameter combinations are evaluated to determine their performance.
[0125] 3) Iteration process:
[0126] Update the posterior distribution: Based on the initial evaluation results, update the posterior distribution of the objective function. This step combines the prior information and the newly observed data.
[0127] Select the next sampling point: Use a collection function, such as the expected improvement (EI), to determine the next sampling point. The EI function takes into account the expected magnitude and uncertainty of the improvement in the objective function value. The EI function can be expressed as: EI(θ) = E[max(f(θ)-f(θ +),0)], where f(θ + ) is the best function value currently observed.
[0128] Evaluate new sampling points: Evaluate newly chosen parameter combinations to obtain new data on model performance.
[0129] 4) Loop iteration:
[0130] After each iteration, the posterior distribution is updated according to the newly obtained data.
[0131] New sampling points are repeatedly selected and evaluated until a stopping criterion, such as a preset number of iterations or a fitness threshold, is reached.
[0132] 5) Determine the optimal parameter combination:
[0133] Through this iterative process, Bayesian optimization will gradually narrow the search range and find the most optimized parameter combination.
[0134] The final parameter combination is the optimized parameter, which is used in the decision tree model.
[0135] Throughout the process, the advantage of Bayesian optimization is that it combines prior knowledge and new observation data, and can effectively handle optimization problems with high cost, complexity or uncertainty. By properly selecting the acquisition function and update strategy, Bayesian optimization can effectively find the optimal parameter combination, thereby improving the performance of the model.
[0136] S3325. Based on the probability model, a new parameter combination is selected for testing and the model is continuously updated. The iteration is continued until the optimal parameter combination is found or the iteration number limit is reached to obtain the optimal parameter combination.
[0137] S333. Predict the target user's reaction to different view charts based on the optimized decision tree model, and identify the target user's information digestion category based on the prediction results; wherein the user's information digestion category includes the user's speed of processing information, the user's interaction category with the view chart, and the user's concentration when viewing the view chart.
[0138] Specifically, based on the model's predictions, the user's response patterns to the view chart are analyzed. This can help understand the speed at which users process information, the types of interactions they have with the view chart, and their attention when viewing the view chart.
[0139] Identify information digest categories:
[0140] Speed of processing information: By observing how long it takes users to respond to different view charts, you can estimate how quickly users process information. Quick responses may indicate that users are able to quickly understand and absorb information.
[0141] Interaction categories with view charts: Analyzing how users interact with different types of view charts (such as clicking, zooming, sliding, etc.) can reveal how users tend to explore and understand data.
[0142] Attention: The time users spend on a view chart and their browsing paths can be used to assess how focused users are when viewing a view chart.
[0143] Adjust the view chart design based on the analysis results: Based on the understanding of how users learn and digest information, the design of the view chart can be further adjusted to make it more in line with the needs and preferences of the target user group.
[0144] This approach not only enables more accurate predictions of user responses to different view charts, but also provides a deeper understanding of how users learn and digest information, thereby providing data visual presentations that better meet user needs.
[0145] S34. Customize the chart according to the visual preference of the target user and the information digestion category.
[0146] Specifically, the step of customizing the chart according to the visual preference of the target user and the information digestion category includes the following steps:
[0147] S341, obtaining the visual preference data of the target user and the data on the learning and digesting information method, and configuring the chart color, font and layout category according to the visual preference of the target user, for example, using soft colors and simple design for visually sensitive users;
[0148] S342, configuring the frequency of data updates and the speed of dynamic display in the chart based on the speed at which the target user processes information;
[0149] S343. Configure different levels of information display based on the target user's attention concentration when viewing the view chart. For example, the main data points are highlighted, and the secondary information is displayed when the user interacts more deeply. Configure the interaction parameters based on the interaction category between the target user and the view chart, including click, slide, zoom, etc.
[0150] In addition, you can make changes to the chart after it is configured, including:
[0151] Modify chart: modify the existing chart;
[0152] Delete Chart: Deletes an existing chart.
[0153] S4. Dynamically generate views based on SQL queries combined with the custom configuration of target users, and adjust the display style category and data presentation category of the view according to the emotional state category of the target users to achieve personalized display of business data.
[0154] The method of dynamically generating a view based on SQL query combined with the custom configuration of the target user, and adjusting the display style category and data presentation category of the view according to the emotional state category of the target user to realize the personalized display of business data includes the following steps:
[0155] S41, obtaining the custom configuration of the target user, and dynamically generating a view based on the SQL query and the custom configuration of the target user;
[0156] S42, identifying the target user's emotional state category through the target user's facial expression or voice emotion, and adjusting the color, font, motion effect elements, and data presentation category of the view in real time according to the target user's emotional state category, to ensure that the generated view conforms to the target user's emotional state;
[0157] Identify the target user's emotional state through their facial expressions or voice emotions, and adjust the view's color, font, motion elements, and data presentation in real time based on the emotional state category. Follow these steps:
[0158] 1) Emotion recognition: Use facial expression recognition and speech emotion recognition technologies to detect the user's emotional state. Facial expression recognition relies on analyzing the user's facial micro-expressions. This technology recognizes different expressions by analyzing the user's facial image. It uses computer vision and image processing technology to detect facial features (such as the position and shape of the eyes, mouth, and eyebrows); speech emotion recognition technology relies on analyzing different features in the voice signal, such as pitch, volume, speaking speed, and intonation changes. It uses acoustic analysis and machine learning technology to process and parse voice data.
[0159] 2) Emotion classification: Classify the identified emotions into basic emotion types, such as happiness, sadness, anger, surprise, etc.
[0160] 3) Adjust the view according to the mood:
[0161] Color adjustment: Adjust the view color according to the user's emotional state. For example, when the user is happy, use brighter and positive colors (such as yellow or blue); when the user is sad, use softer colors (such as gray or light blue).
[0162] Font adjustment: Adjust the size and style of the font to suit the user’s mood. For example, a happy or excited mood might be appropriate with a larger, more lively font.
[0163] Adjustment of motion elements: Adjust the animation effects according to the user’s emotions. For example, you can add some lively animation effects when the user is happy, and use gentle and slow animation effects when the user is sad.
[0164] Adjust the data presentation method: Adjust the data presentation method according to the user's emotions. For example, when the user's emotions are stable, you can display more complex charts, and when the user's emotions fluctuate, use simple and intuitive charts.
[0165] 5) Real-time feedback: The system needs to be able to respond to changes in user emotions in real time and adjust the view accordingly. This requires the system to have strong real-time data processing and chart rendering capabilities.
[0166] In this way, it can be ensured that the generated views are not only visually appealing to users, but also resonate with them emotionally, thereby improving the user experience and information communication effect.
[0167] S43. Display the customized view to the target user to achieve personalized display of business data.
[0168] To sum up, with the help of the above technical scheme of the present invention, the present invention can configure connections for different data sources and select the following schema mode and the table under the schema according to the characteristics of different data sources, and generate corresponding charts according to custom SQL statements; the present invention can support all current database connections, and can also be displayed in a variety of ways based on the queried data, and can be configured in a what-you-see-is-what-you-get manner without the need for separate demand development.
[0169] In addition, the present invention can not only customize data views according to the specific needs and preferences of users through dynamic query SQL and user configuration, so as to provide standard data display, and adjust the view according to the user's personal preferences to improve the user experience, but also perceive the user's emotions through the user's facial expression and voice analysis, and adjust the view style and data display method accordingly, so as to achieve dynamic adjustment, so that the data view can remain relevant and attractive in different situations, so that the presentation method of the business data view is not only more in line with the user's preferences and understanding methods, but also can reflect and adapt to the user's emotional state category in real time. In this environment, users can not only understand and analyze data more quickly and accurately, but also make decisions in a more comfortable and personalized situation, thereby improving the efficiency and quality of decision-making, while ensuring that good decision-making results are maintained under emotional changes.
[0170] In addition, the present invention can deeply and accurately analyze and predict the user's visual preference and information digestion category through cluster analysis and decision tree algorithm, so that users can be effectively classified according to their visual preference and learning habits, and a more customized view design can be provided for each type of user. At the same time, the application of decision tree algorithm can understand the user's decision path and preference pattern, which not only makes the view more in line with the user's personal preference in appearance, but also better adapts to the user's understanding and processing ability in the way of information presentation.
[0171] The technical features of the above-mentioned embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above-mentioned embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification. A person of ordinary skill in the art can understand that all or part of the steps in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a program. The program can be stored in a computer-readable storage medium. When the program is executed, it includes the steps described in the above method, and the storage medium, such as ROM / RAM, a disk, an optical disk, etc.
[0172] The above-mentioned embodiments only express several implementation methods of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.
Claims
1. Create a view based on dynamic query SQL as a method of configuring the display method. It is characterized in that The following steps are involved: S1. Load the corresponding database driver based on the database configuration information on the page, connect to the configured database according to the configuration information, and verify the connectivity of the database; S2. Select the corresponding database and Schema according to the business data, select an existing table in the selected Schema, and create datasets based on the selected table and custom SQL query; S3. Select the corresponding chart type according to the data type to be displayed and the analysis purpose, and customize the chart based on the visual preference and information digestion category of the target user; wherein the visual preference indicates the user's preference and inclination for the visual elements of color, font and layout type; wherein the user's information digestion category includes the user's information processing speed, the user's interaction category with the view chart, and the user's concentration when viewing the view chart; S4. Dynamically generate views based on SQL queries combined with the target user's custom configuration, and adjust the view's display style category and data presentation category according to the target user's emotional state category to achieve personalized presentation of business data; The step of selecting a corresponding chart type according to the data type to be displayed and the analysis purpose, and customizing the chart based on the visual preference and information digestion category of the target user includes the following steps: S31. Select a corresponding chart type according to the data type to be displayed and the analysis purpose, and define the dimension options and time attributes of the chart; S32, using cluster analysis combined with association rule learning technology to analyze the visual preferences of target users for different view charts; S33, analyzing the target user's response to different view charts based on a decision tree algorithm, and identifying the user's information digestion category; S34, customizing the chart according to the visual preference of the target user and the information digestion category; The method of dynamically generating a view based on SQL query combined with the custom configuration of the target user, and adjusting the display style category and data presentation category of the view according to the emotional state category of the target user to realize the personalized display of business data includes the following steps: S41, obtaining custom configuration parameters of the target user, and dynamically generating a view based on SQL query and the custom configuration of the target user; S42, identifying the target user's emotional state category through the target user's facial expression or voice emotion, and adjusting the color, font, motion effect elements, and data presentation category of the view in real time according to the target user's emotional state category, to ensure that the generated view conforms to the target user's emotional state; S43. Display the customized view to the target user to achieve personalized display of business data.
2. The method for creating a view based on dynamic query SQL as a configuration display method according to claim 1, It is characterized in that The method of loading the corresponding database driver based on the database configuration information on the page and connecting to the configured database according to the configuration information includes the following steps: S11, obtain the database configuration information of the page, and load the corresponding database driver according to the configuration information to determine whether it is necessary to connect to the database through SSL; S12. Connect the configured database according to the configuration information and verify the connectivity of the database, wherein the database includes a time series database, a hive big database, a quasi-real-time big database, a relational database, and an MPP architecture database.
3. The method for creating a view based on dynamic query SQL as a configuration display method according to claim 1, It is characterized in that The process of selecting a corresponding database and schema according to business data, selecting an existing table in the selected schema, and creating a datasets data set according to the selected table combined with a custom SQL query includes the following steps: S21. Select the corresponding database according to the business data requirements, and select the corresponding Schema in the selected database; S22. View and review the existing tables in the selected Schema, and select one or more tables based on business requirements; S23. Write SQL query statements according to the selected table and specific data requirements, and convert the query results of the SQL query statements into datasets.
4. The method for creating a view based on dynamic query SQL as a configuration display method according to claim 1, It is characterized in that The method of analyzing the visual preference of target users for different view charts by using cluster analysis combined with association rule learning technology includes the following steps: S321, obtaining data on user interactions with different view charts in a historical database, extracting features related to user visual preferences based on the preprocessed interaction data, extracting key features of the view charts, and clustering the view charts using a clustering algorithm to form different view chart groups; S322, associating the user's interaction data with the view chart clustering results, clustering the users using the user's interaction data for different view chart groups, and finding association rules between the user's visual preference and the view chart group features based on the user clustering results; S323. Analyze the visual preferences of the target user group for different view chart groups based on the results of view chart clustering, user clustering and association rules.
5. The method for creating a view based on dynamic query SQL as a configuration display method according to claim 4, It is characterized in that The step of associating the user's interaction data with the view chart clustering results, clustering the users using the user's interaction data for different view chart groups, and finding the association rules between the user's visual preference and the view chart group features based on the user clustering results includes the following steps: S3221. Integrate the clustering results of the view chart and the user's interaction data, create a feature matrix for each user, and standardize the data in the feature matrix; S3222, determining the optimal number of clusters, clustering the user's feature matrix using a clustering algorithm, and evaluating the clustering results using a silhouette coefficient indicator; S3223. Convert the result of user clustering into the format of association rule learning, and use the association rule method to analyze the relationship between the user's visual preference and the view chart group characteristics.
6. The method for creating a view based on dynamic query SQL as a configuration display method according to claim 1, It is characterized in that The method of analyzing the target user's response to different view charts based on the decision tree algorithm and identifying the user's information digestion category includes the following steps: S331, obtaining data on user interactions with different view charts in a historical database, and extracting features related to user learning and digesting information categories based on the preprocessed interaction data; S332, using the user's interactive data to train a decision tree model, and optimizing the parameters of the decision tree model through a parameter fusion optimization algorithm; S333. Predict the target user's response to different view charts based on the optimized decision tree model, and identify the target user's information digestion category based on the prediction result.
7. The method for creating a view based on dynamic query SQL as a configuration display method according to claim 6, It is characterized in that The method of training the decision tree model using the user's interactive data and optimizing the parameters of the decision tree model using a parameter fusion optimization algorithm comprises the following steps: S3321. Train a decision tree model using user interaction data, select parameters to be optimized in the decision tree model, and define a search range or a candidate value list for each parameter; S3322. Randomly generate initial parameter combinations in the parameter space, evaluate the fitness of each parameter combination on the training set, and select the parameter combination with the best fitness to perform crossover and mutation operations to obtain a new parameter combination; S3323, repeatedly executing S3322 until a preset number of iterations or fitness threshold is reached to obtain an initial optimal parameter combination; S3324, using the initial optimal parameter combination as the starting point of Bayesian optimization, and using Bayesian optimization to construct a probability model between parameters and model performance; S3325. Based on the probability model, a new parameter combination is selected for testing and the model is continuously updated. The iteration is continued until the optimal parameter combination is found or the iteration number limit is reached to obtain the optimal parameter combination.
8. The method for creating a view based on dynamic query SQL as a configuration display method according to claim 1, It is characterized in that The custom configuration of the chart according to the visual preference of the target user and the information digestion category includes the following steps: S341, obtaining the visual preference data of the target user and the data on the learning and digesting information method, and configuring the chart color, font and layout type according to the visual preference of the target user; S342, configuring the frequency of data updates and the speed of dynamic display in the chart based on the speed at which the target user processes information; S343. Configure different levels of information display according to the target user's attention concentration when viewing the view chart, and configure interaction parameters based on the interaction category between the target user and the view chart.
Citation Information
Patent Citations
Application program content display method and device, storage medium and computer equipment
CN110389662A
Intelligent visual analysis method and system based on dynamic perception
CN115373576A
Financial data display method and device, storage medium and electronic equipment
CN116881353A
Content display method and apparatus for application, storage medium, and computer device
WO2020253360A1
