Visual configuration method based on artificial intelligence
Through the automated chart configuration method integrating BERT model and decision tree algorithm, the difficulty of users to manually configure chart parameters is solved, data preprocessing and intelligent recommendation of chart types are realized, and the accuracy and user experience of chart generation are improved.
Patent Information
- Application Number
- CN202510373362.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-27
- Publication Date
- 2025-08-01
AI Technical Summary
Existing visualization tools require users to manually configure chart parameters. Users who lack professional knowledge find it difficult to generate accurate and effective charts, data preprocessing is complicated, and it is difficult to select chart types.
It adopts an automated chart type recommendation method based on BERT model and decision tree algorithm, combining data preprocessing and collaborative filtering algorithms, providing intelligent input boxes and real-time preview functions, supporting multi-device access and chart adjustment.
It improves the accuracy and reliability of chart generation, simplifies user operations, and improves the intelligence level of user experience and chart configuration.
Smart Images

Figure CN120407002A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of computer technology, and particularly relates to a visualization configuration method based on artificial intelligence. Background Art
[0002] Current visualization tools generally rely on users to manually configure chart parameters, and this process usually requires users to have certain professional knowledge. For example, users need to understand the meaning of coordinate axes and know how to select suitable chart types, etc. For ordinary users without such knowledge backgrounds, manually configuring chart parameters is a challenging task.
[0003] Users must be familiar with the applicable scenarios of various chart types and understand how to appropriately set parameters such as coordinate axis ranges and label formats in order to generate effective charts. For example, bar charts are suitable for comparing quantities of different categories, while line charts are more suitable for showing trends. Without this basic knowledge, users may not be able to correctly set parameters, thus affecting the readability and effectiveness of the charts.
[0004] After data is imported, it usually needs to be cleaned, that is, to remove or correct invalid, incorrect or redundant data records. This process is crucial for ensuring the accuracy of the finally generated charts. However, many users will feel confused when performing these operations and do not know how to identify and process these abnormal data. The data may come from different sources and have various formats, and need to be unified into a standard format for subsequent processing. This process includes but is not limited to unifying date formats, converting numerical types, etc. For users without programming or data management experience, this is a very complex task. And there are often missing values in the dataset, which need to be filled by users according to the context or other rules. This may involve statistical analysis or other advanced methods, which is a difficult obstacle for users lacking relevant experience.
[0005] For beginners, they often lack experience when choosing chart types and it is difficult to judge which chart is most suitable for the dataset at hand. For example, the data may be discrete or continuous, and there may be a certain relationship, and these characteristics determine the best chart type. Users need to evaluate the characteristics of the data and accordingly select the most suitable chart type. However, for inexperienced users, this process is often difficult to grasp because it is difficult for inexperienced users to intuitively judge which chart is most suitable for the dataset at hand. Therefore, users have to spend a lot of time and energy learning and trying different chart types, increasing the usage difficulty. Summary of the Invention
[0006] In view of the above problems, the present invention provides a visualization configuration method based on artificial intelligence, which is used to achieve automated chart type recommendation by integrating the BERT model and the decision tree algorithm, ensuring that the chart generation process is more intelligent. At the same time, the data preprocessing function optimizes the data quality before chart generation, further enhancing the accuracy and reliability of the chart.
[0007] To solve the above technical problems, the present invention adopts the following technical solutions:
[0008] A visualization configuration method based on artificial intelligence includes the following steps:
[0009] S10. Construct a responsive web interface for users to access the system on devices supporting browsers.
[0010] S20. Design an intelligent input box and integrate an auto-complete function. When the user starts typing, the system prompts optional completion options according to the entered content. At the same time, the system listens to the user's input in real time and prompts errors or ambiguities according to grammar and logic. The natural language description entered by the user is sent to the backend for processing in real time, and prompts are given according to the context.
[0011] S30. Provide a RESTful API interface to support users in uploading data files in JSON and CSV formats. After the data is uploaded, the system uses the Pandas library in Python to parse the data, identify the data format, and clean the data.
[0012] S40. Use the BERT model for natural language understanding to extract the user's intention according to the user-entered data information or the uploaded data file. The BERT model segments the sentence entered by the user through pre-trained word vectors, identifies keywords and their semantic relationships, and generates corresponding feature vectors.
[0013] S50. According to the generated corresponding feature vectors, use the decision tree algorithm to analyze the attributes of the data set and recommend a chart type suitable for the current data characteristics. At the same time, use the collaborative filtering algorithm to optimize the chart style suggestions and recommend the preferred chart styles of similar users according to the user's historical behavior data.
[0014] S60. According to the chart type recommended by the decision tree algorithm, the system automatically configures the basic parameters of the chart. Use a JavaScript library including D3.js to dynamically generate the chart and embed it in the web interface for display. Export the generated chart.
[0015] In a possible implementation, the Canvas API technology is used to construct the web interface canvas environment in S10, which is used to support users in adjusting the position and size of the chart through operations including dragging chart elements, zooming, and panning.
[0016] In a possible implementation, before the user accesses the system on a device supporting a browser in S10, it includes the user's authentication by username and password. The system encrypts communications through the HTTPS protocol, uses the OAuth 2.0 authentication mechanism, and implements session management and authorization through JWT. The JWT token includes the user's authentication information and is carried in each request to verify the user's identity.
[0017] In a possible implementation, in S20, HTML5, CSS3, and JavaScript are used when designing the intelligent input box.
[0018] In a possible implementation, in S40, the BERT model splits the sentence input by the user through pre-trained word vectors, identifies the keywords and their semantic relationships, and generates corresponding feature vectors. Specifically, the BERT model first performs word segmentation on the input sentence, splitting the sentence into word or sub-word units; each word segment or sub-word unit is mapped to a fixed-length vector space through pre-trained word vectors; the word vectors are processed through a multi-layer bidirectional Transformer encoder to generate feature vectors containing context information.
[0019] In a possible implementation, in S50, according to the generated corresponding feature vectors, the decision tree algorithm is used to analyze the attributes of the data set and recommend the chart type suitable for the current data characteristics. Specifically, the input data set, and each sample of the data set includes multiple attributes; calculate the information gain of each attribute, and select the attribute with the largest information gain as the splitting attribute of the current node; recursively construct the decision tree until all samples are correctly classified into a certain chart type.
[0020] In a possible implementation, in S50, the collaborative filtering algorithm is used to optimize the chart style suggestions, and the preferred chart styles of similar users are recommended according to the user's historical behavior data. Specifically, the input user historical behavior data, including the user's preference records for chart styles; calculate the similarity between users, and find other users with similar behavior patterns to the current user; recommend chart styles based on the preferences of similar users.
[0021] Adopting the present invention has the following beneficial effects:
[0022] (1) By using the BERT model to process natural language input, the system can accurately understand the user's needs, and analyze the data characteristics through the decision tree algorithm, so as to recommend the chart type most suitable for the current data set. This process not only eliminates the user's confusion when choosing the chart type, but also ensures that the generated chart can accurately reflect the real situation of the data.
[0023] (2) The built-in data preprocessing function of the system can automatically complete tasks such as data cleaning and format conversion, ensuring the data quality before chart generation. This not only improves the accuracy of the charts but also saves users a large amount of manual processing time.
[0024] (3) Through the real-time preview and feedback mechanism, users can instantly see the results of each operation on the front-end interface. It supports dragging and adjusting the position and size of the chart, implementing a dynamic refresh mechanism to ensure instant feedback on user operations. This not only improves the user experience but also makes chart adjustment more intuitive and efficient.
[0025] (4) Generally speaking, it significantly improves the intelligent level of chart configuration and optimizes the user experience. Brief Description of the Drawings
[0026] Figure 1 It is a flowchart of the steps of the visualization configuration method based on artificial intelligence according to an embodiment of the present invention. Detailed Embodiment
[0027] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0028] Refer to Figure 1 , which shows a flowchart of the steps of the visualization configuration method based on artificial intelligence according to an embodiment of the present invention, including the following steps:
[0029] S10. Build a responsive Web interface for users to access the system on devices supporting browsers;
[0030] S20. Design an intelligent input box with an integrated auto-complete function. When the user starts typing, the system prompts optional completion options based on the entered content. At the same time, the system listens to the user's input in real time and prompts errors or ambiguities according to grammar and logic. The natural language description entered by the user is sent to the backend for processing in real time, and prompts are given according to the context;
[0031] S30. Provide a RESTful API interface to support users in uploading data files in JSON and CSV formats. After the data is uploaded, the system uses the Pandas library in Python to parse the data, identify the data format, and clean the data;
[0032] Among them, the data cleaning process includes operations such as removing duplicate records and filling in missing values to ensure data consistency and integrity. For example, when processing library borrowing records, the system will automatically identify and delete duplicate records, and fill in the missing borrowing dates based on the existing data to ensure the accuracy of chart generation.
[0033] S40, use the BERT model for natural language understanding, and extract the user's intention according to the user input data information or the uploaded data file; the BERT model divides the sentence input by the user through pre-trained word vectors, identifies the keywords and their semantic relationships, and generates corresponding feature vectors;
[0034] S50, according to the generated corresponding feature vectors, use the decision tree algorithm to analyze the attributes of the data set, and recommend the chart type suitable for the current data characteristics; at the same time, use the collaborative filtering algorithm to optimize the chart style suggestions, and recommend the preferred chart styles of similar users according to the user's historical behavior data;
[0035] S60, according to the chart type recommended by the decision tree algorithm, the system automatically configures the basic parameters of the chart; use the JavaScript library including D3.js to dynamically generate the chart and embed it in the Web interface for display; export the generated chart, and the export format can include multiple formats such as PNG, JPEG, PDF, etc.
[0036] Furthermore, for a visualization configuration method according to another embodiment of the present invention, the Canvas API technology is used to construct the Web interface canvas environment in S10, which is used to support users to adjust the position and size of the chart through operations including dragging chart elements, zooming, and panning. The above settings enable users to freely place chart elements on the canvas and adjust the position and size by dragging. The configurable chart elements include graphic types (common charts such as line charts, pie charts, bar charts, funnel charts, pictograms, radar charts, scatter charts, dashboards, progress bars, etc.), tables, texts, media types (pictures, carousel charts, video players, iframe containers, etc.), and other controls (time selectors, buttons, menu bars, hierarchical trees, dropdown boxes, input boxes, radio boxes, checkboxes, etc.).
[0037] Furthermore, in a visualization configuration method based on artificial intelligence according to another embodiment of the present invention, before the user accesses the system on a device supporting a browser in S10, it includes the user performing identity authentication through a username and password. The system encrypts communication through the HTTPS protocol, uses the OAuth 2.0 authentication mechanism, and realizes session management and authorization through JWT (JSON Web Token). The JWT token includes the user's authentication information and is carried in each request to verify the user's identity. Identity authentication is performed through a username and password to ensure that only authorized personnel can access the system; the system encrypts communication through the HTTPS protocol to ensure the secure transmission of user data. Even if the data is intercepted during network transmission, the specific content cannot be read. In addition, by adopting the OAuth 2.0 authentication mechanism, JWT to realize session management and authorization, and the user's authentication information included in the JWT token, even if the token is stolen, the attacker cannot tamper with the user information because the token itself does not have the permission to modify, improving the security of the system.
[0038] Furthermore, in a visualization configuration method based on artificial intelligence according to another embodiment of the present invention, in S20, HTML5, CSS3, and JavaScript are used when designing the intelligent input box. Specifically, HTML5 and CSS3 are used to determine the position, shape, and format of the text input box. The text input box <input type="text"> is used, and JavaScript or a front-end framework (such as React, Angular, Vue, etc.) is combined to listen for the user's input events. For example, when the administrator enters "Display the number of book borrowings per month in the past year", the system will immediately recognize that this is a statistical requirement for time series data and give corresponding chart configuration suggestions.
[0039] Furthermore, in a visualization configuration method based on artificial intelligence according to another embodiment of the present invention, in S20, the auto-complete function queries the back-end service when the user inputs through Ajax technology or an asynchronous request method, returns possible completion options, and displays them to the user in the form of a list at the front end.
[0040] Furthermore, in a visualization configuration method based on artificial intelligence according to another embodiment of the present invention, in S40, the BERT model splits the sentence input by the user through pre-trained word vectors, identifies the keywords and their semantic relationships, and generates corresponding feature vectors. Specifically, the BERT model first performs word segmentation on the input sentence, splitting the sentence into word or sub-word units; each word segment or sub-word unit is mapped to a fixed-length vector space through pre-trained word vectors; the word vectors are processed through a multi-layer bidirectional Transformer encoder to generate feature vectors containing context information.
[0041] For example, in a specific application scenario, assume the user inputs: "Show the number of book borrowings each month in the past year." The system will perform the following steps:
[0042] Word segmentation: "Show / past / year / each / month / of / book / borrowing / times";
[0043] Map to word vectors: Map each segmented word to a pre-trained word vector;
[0044] Extract context information: Generate a feature vector containing context information through a multi-layer bidirectional Transformer encoder;
[0045] Output: Obtain a 768-dimensional feature vector representing the time series data that the user wishes to view (time range: the past year, monthly statistics of book borrowing times).
[0046] Furthermore, in a visualization configuration method based on artificial intelligence according to another embodiment of the present invention, in S50, according to the generated corresponding feature vectors, using a decision tree algorithm to analyze the attributes of the data set and recommend a chart type suitable for the current data characteristics specifically includes: inputting a data set, and each sample of the data set includes multiple attributes, such as numerical range, number of categories, etc.; calculating the information gain of each attribute, and selecting the attribute with the largest information gain as the splitting attribute of the current node; recursively constructing a decision tree until all samples are correctly classified into a certain chart type. The leaf node represents the finally recommended chart type.
[0047] For example, in a specific application scenario, there is a data set that records the book borrowing situations in different cities, including attributes such as city name, month, and borrowing times. Through the method of the embodiment of the present invention, a chart type suitable for the current data characteristics can be recommended. The processing process is as follows:
[0048] Calculate information gain: For each attribute (such as city name, month, borrowing times), calculate its information gain. For example, calculate the information gain of the "month" attribute;
[0049] Select the splitting attribute: Select the attribute with the largest information gain as the splitting attribute of the current node. For example, if the information gain of "month" is the largest, then select "month" as the splitting attribute;
[0050] Recursively construct a decision tree: Recursively construct a decision tree until all samples are correctly classified into a certain chart type. For example, divide the data set into different subsets according to the "month" attribute, and continue to select the next best splitting attribute until the most suitable chart type is found;
[0051] Output: Based on the results of the decision tree, recommend a chart type suitable for the current data characteristics. For example, if the dataset mainly involves time series data (such as the number of borrowings per month), a line chart is recommended; if it is to compare the number of borrowings in different cities, a bar chart is recommended.
[0052] Furthermore, in a visualization configuration method based on artificial intelligence according to another embodiment of the present invention, in S50, the collaborative filtering algorithm is used to optimize the chart style suggestions, and the preferred chart styles of similar users are recommended according to the historical behavior data of the user. Specifically, it includes: inputting the historical behavior data of the user, including the preference records of the user for the chart style; calculating the similarity between users to find other users with similar behavior patterns to the current user; and recommending the chart style based on the preferences of the similar users.
[0053] Through the above-mentioned visualization configuration method based on artificial intelligence, the BERT deep learning model is applied to the intelligent recommendation of chart types, and the decision tree algorithm is combined for data characteristic analysis, so as to provide a more accurate chart configuration service. In the preprocessing process after automatic data import, including data cleaning, format conversion, filling missing values, etc., the burden on users is reduced. The efficient data parsing and cleaning are carried out using the Pandas library in Python to ensure data quality. The collaborative filtering algorithm is used to optimize the chart style suggestions, and the preferred chart styles of similar users are recommended according to the historical behavior data of the user. By calculating the similarity between users, the chart styles liked by similar users are recommended, making the charts more in line with the user's aesthetics and habits. By integrating natural language processing technology and intelligent recommendation algorithms, users can obtain the required charts through simple natural language input without the need to have professional chart design knowledge. A responsive web interface is provided, supporting multi-device access, and supporting dragging to adjust the position and size of the chart, improving the intuitiveness and convenience of operation. Users are authenticated through their usernames and passwords to ensure that only authorized personnel can access the system. The HTTPS protocol is used to encrypt the communication to ensure the secure transmission of user data and prevent data leakage. Generally speaking, the intelligent level of chart configuration is significantly improved, and the user experience is optimized.
[0054] It should be understood that the exemplary embodiments described herein are illustrative rather than restrictive. Although one or more embodiments of the present invention have been described in conjunction with the accompanying drawings, those of ordinary skill in the art should understand that various changes in form and detail can be made without departing from the spirit and scope of the present invention as defined by the appended claims.
Claims
1. A visualization configuration method based on artificial intelligence, characterized in that, Including the following steps: S10. Build a responsive web interface for users to access the system on browser - supported devices; S20. Design an intelligent input box with an integrated auto - completion function. When the user starts typing, the system prompts optional completion options based on the entered content. At the same time, the system listens to the user's input in real - time and prompts errors or ambiguities according to grammar and logic. The natural - language description entered by the user is sent to the backend for processing in real - time, and prompts are given according to the context; S30. Provide a RESTful API interface to support users in uploading data files in JSON and CSV formats; After the data is uploaded, the system uses the Pandas library in Python to parse the data, identify the data format, and clean the data; S40. Use the BERT model for natural - language understanding to extract the user's intention based on the user - input data information or the uploaded data file; The BERT model segments the sentence entered by the user through pre - trained word vectors, identifies keywords and their semantic relationships, and generates corresponding feature vectors; S50. According to the generated corresponding feature vectors, use the decision - tree algorithm to analyze the attributes of the data set and recommend chart types suitable for the current data characteristics. At the same time, use the collaborative - filtering algorithm to optimize the chart - style suggestions and recommend the preferred chart styles of similar users based on the user's historical behavior data; S60. According to the chart types recommended by the decision - tree algorithm, the system automatically configures the basic parameters of the chart; Use the JavaScript library including D3.js to dynamically generate charts, embed them in the web interface for display, and export the generated charts.
2. The visualization configuration method based on artificial intelligence according to claim 1, wherein In S10, the Canvas API technology is used to build the web - interface canvas environment to support users in adjusting the position and size of the chart through operations including dragging chart elements, zooming, and panning.
3. The visualization configuration method based on artificial intelligence according to claim 1, wherein Before the user accesses the system on browser - supported devices in S10, it includes the user's authentication through username and password. The system encrypts the communication through the HTTPS protocol, uses the OAuth 2.0 authentication mechanism, and realizes session management and authorization through JWT. The JWT token includes the user's authentication information and is carried in each request to verify the user's identity.
4. The visualization configuration method based on artificial intelligence according to claim 1, wherein In S20, HTML5, CSS3, and JavaScript are used when designing the intelligent input box.
5. The visualization configuration method based on artificial intelligence according to claim 1, wherein, In S40, the BERT model segments the sentence entered by the user through pre - trained word vectors, identifies keywords and their semantic relationships, and generates corresponding feature vectors, specifically including: The BERT model first tokenizes the input sentence, splitting it into words or sub - word units; each token or sub - word unit is mapped to a fixed - length vector space through pre - trained word vectors; the word vectors are processed through a multi - layer bidirectional Transformer encoder to generate feature vectors containing context information.
6. The visualization configuration method based on artificial intelligence according to claim 1, wherein In S50, according to the generated corresponding feature vectors, the decision tree algorithm is used to analyze the attributes of the data set, and the specific types of charts recommended for the current data characteristics include: input the data set, and each sample of the data set includes multiple attributes; calculate the information gain of each attribute, and select the attribute with the largest information gain as the division attribute of the current node; recursively construct the decision tree until all samples are correctly classified into a certain chart type.
7. The visualization configuration method based on artificial intelligence according to claim 1, wherein In S50, the collaborative filtering algorithm is used to optimize the chart style suggestions, and the preferred chart styles of similar users are recommended according to the historical behavior data of the users. Specifically, it includes: input the historical behavior data of the users, including the preference records of the users for the chart styles; calculate the similarity between users, and find other users with similar behavior patterns to the current user; recommend the chart styles based on the preferences of the similar users.