Data visualization chart generation method, system, equipment and medium

By parsing key information of instructions and matching target indicator themes, and combining domain knowledge graphs and indicator theme libraries, automated data visualization chart generation is achieved. This solves the problems of missing indicator theme identification, poor domain adaptability, and lack of closed-loop anomaly handling in existing technologies, thereby improving generation efficiency and practicality.

CN121787380APending Publication Date: 2026-04-03HUNAN QIANGZHI TECH DEV CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-28
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

Existing data visualization technologies suffer from problems such as lack of indicator theme identification, poor domain adaptability, lack of compatibility with multiple business intelligence platforms, lack of context memory for multi-round interactions, and lack of closed-loop exception handling, resulting in low generation efficiency and poor practicality.

Method used

By parsing key information in instructions, matching target metrics and chart types, and combining domain knowledge graphs and metric theme libraries, automated data visualization chart generation is achieved, including semantic similarity calculation, multi-factor weight calculation, and metadata verification. It supports adaptation to multiple business intelligence platforms and detects anomalies in real time.

Benefits of technology

It improves data visualization efficiency, reduces operational steps, enhances the accuracy of indicator theme identification, lowers integration costs, shortens response time, and strengthens the closed-loop capability of anomaly handling.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121787380A_ABST
    Figure CN121787380A_ABST
Patent Text Reader

Abstract

The invention discloses a data visualization chart generation method, system and device and a medium, and the method comprises the steps: analyzing a to-be-generated chart instruction in response to the to-be-generated chart instruction of a to-be-generated chart, and obtaining the key information of the to-be-generated chart; based on the key information of the to-be-generated chart, determining a data range and an initial index theme of the to-be-generated chart, and extracting chart data of the to-be-generated chart; respectively calculating semantic similarity between the initial index theme and each index theme in an index theme library so as to determine a target index theme from the index theme library; according to the data range of the to-be-generated chart and the target index theme, matching a target chart type; on the basis of the target chart type, the target data chart is generated according to the chart data of the to-be-generated chart and the target index theme, accurate and efficient generation of the data visualization chart can be achieved by analyzing the instruction key information and matching the target index and the chart type, and the data visualization efficiency and practicability are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data visualization technology, and in particular to a method, system, device and medium for generating data visualization charts. Background Technology

[0002] Data visualization is a core supporting technology in the field of business intelligence. It can transform complex structured data into intuitive charts, helping users quickly uncover data value and make decisions. It is widely used in education, finance, enterprise management, and many other fields. Currently, mainstream business intelligence tools require users to manually complete operations such as dragging and dropping fields, configuring attributes, and selecting chart types. Data visualization is achieved through gradual setup and is a common method of data analysis in various industries.

[0003] However, existing technologies rely on general semantic matching and only use hard-coded application programming interfaces, resulting in visualization generation being tied to a single business intelligence platform and lacking compatibility. Furthermore, users need to repeatedly describe all their needs during multiple rounds of interaction, leading to low recognition accuracy and poor domain adaptability of existing data visualization technologies. Summary of the Invention

[0004] The following is an overview of the subject matter described in detail herein. This overview is not intended to limit the scope of the claims.

[0005] The main objective of this disclosure is to propose a data visualization chart generation method, system, device, and storage medium that can achieve accurate and efficient generation of data visualization charts by parsing key information of instructions and matching target indicators and chart types, thereby improving the efficiency and practicality of data visualization.

[0006] A first aspect of this application provides a method for generating data visualization charts, the method comprising: In response to a chart generation instruction, the chart generation instruction is parsed to obtain key information of the chart to be generated; the key information includes domain information, time dimension, and data dimension. Based on the key information of the chart to be generated, the data range and initial indicator theme of the chart to be generated are determined, and the chart data of the chart to be generated is extracted. The semantic similarity between the initial indicator topic and each indicator topic in the indicator topic library is calculated to determine the target indicator topic from the indicator topic library. Based on the data range and target indicator theme of the chart to be generated, match the target chart type; Based on the target chart type, a target data chart is generated according to the chart data of the chart to be generated and the target indicator theme.

[0007] In some embodiments of this application, after determining the data range and initial indicator theme of the chart to be generated based on the key information of the chart to be generated, and extracting the chart data of the chart to be generated, the method further includes: If a query timeout occurs during the extraction of chart data for the chart to be generated, an operation is performed to extract candidate chart data for the chart to be generated based on the key information of the chart to be generated, so as to obtain multiple sets of candidate chart data corresponding to the key information. From the candidate chart data corresponding to the multiple sets of key information, determine the chart data for the chart to be generated; An early warning message is generated and sent to the client. The early warning message is used to indicate abnormal data extraction.

[0008] In some embodiments of this application, the step of calculating semantic similarity between the initial indicator topic and each indicator topic in the indicator topic library to determine the target indicator topic from the indicator topic library includes: Calculate the semantic similarity between the initial indicator topic and each indicator topic in the indicator topic library; Based on the semantic similarity between the initial indicator topic and each indicator topic in the indicator topic library, at least one candidate indicator topic is selected from the indicator topic library; the candidate indicator topic is the indicator topic whose semantic similarity meets the preset conditions. The target indicator theme is determined based on the weighting factors of the at least one candidate indicator theme.

[0009] In some embodiments of this application, the weighting factors include dictionary weight, frequency weight, and context weight. The dictionary weight characterizes the importance of the indicator topic in the corresponding domain, the frequency weight characterizes the historical usage frequency of the indicator topic, and the context weight characterizes the relevance of the indicator topic in historical context content. Determining the target indicator topic based on the weighting factors of the at least one candidate indicator topic includes: Based on the dictionary weight, frequency weight, and context weight of the at least one candidate indicator topic, a multi-factor weighted calculation is performed to obtain the comprehensive weight of the at least one candidate indicator topic. The target indicator theme is determined based on the comprehensive weight of the at least one candidate indicator theme; the target indicator theme is the indicator theme corresponding to the highest comprehensive weight among the at least one candidate indicator theme.

[0010] In some embodiments of this application, after calculating the semantic similarity between the initial indicator topic and each indicator topic in the indicator topic library to determine the target indicator topic from the indicator topic library, the method further includes: Detect the contextual content of the chart to be generated; If the aforementioned context content exists, historical indicator theme-related information is extracted from the context content in order to optimize the target indicator theme using the historical indicator theme-related information. If the context content does not exist, initialize the context content and store the target metric topic into the context content to obtain the updated context content.

[0011] In some embodiments of this application, before matching the target chart type based on the data range and target indicator theme of the chart to be generated, the method further includes: Metadata validation is performed on the target indicator topic to obtain the validation result; the metadata validation includes verifying the existence of related fields and the rationality of data types in the target indicator topic; If the verification result indicates that the dimension information corresponding to the target indicator theme is missing, the dimension association data corresponding to the target indicator theme is matched from the indicator theme library to complete the target indicator theme.

[0012] In some embodiments of this application, after generating a target data chart based on the target chart type, the chart data to be generated, and the target indicator theme, the method further includes: In response to the adjustment instruction of the target data chart, the adjustment instruction is parsed to obtain the adjustment information of the target data chart; the adjustment information includes content adjustment information and layout adjustment information. If the adjustment information is content adjustment information, the adjustment chart data of the target data chart is extracted according to the content adjustment information; based on the target chart type, the adjustment chart data of the target data chart and the target indicator theme are used to generate an adjustment data chart; When the adjustment information is layout adjustment information, the target chart type is adjusted according to the layout adjustment information to obtain the adjusted chart type; based on the adjusted chart type, the adjusted data chart is generated according to the chart data of the target data chart and the target indicator theme.

[0013] The first aspect of this application provides a method for generating data visualization charts. This method involves responding to a chart generation instruction, parsing the instruction to obtain key information about the chart, determining the data range and initial indicator theme based on this key information, and extracting the chart data. Semantic similarity is calculated between the initial indicator theme and each indicator theme in an indicator theme library to determine a target indicator theme from the library. A target chart type is matched based on the data range and target indicator theme. Finally, a target data chart is generated based on the target chart type, the chart data, and the target indicator theme. This method enables accurate and efficient generation of data visualization charts by parsing key instruction information and matching target indicators and chart types, thereby improving the efficiency and practicality of data visualization.

[0014] To achieve the above objectives, a second aspect of this application provides a data visualization chart generation system, the system comprising: The parsing module is used to respond to the chart generation instruction to generate a chart, parse the chart generation instruction to obtain the key information of the chart to be generated; the key information includes domain information, time dimension and data dimension. The extraction module is used to determine the data range and initial indicator theme of the chart to be generated based on the key information of the chart to be generated, and to extract the chart data of the chart to be generated; The calculation module is used to calculate the semantic similarity between the initial indicator topic and each indicator topic in the indicator topic library, so as to determine the target indicator topic from the indicator topic library. The matching module is used to match the target chart type based on the data range and target indicator theme of the chart to be generated; The generation module is used to generate a target data chart based on the target chart type, the chart data of the chart to be generated, and the target indicator theme.

[0015] To achieve the above objectives, a third aspect of this application provides an electronic device, including: at least one control processor and a memory for communicatively connecting to the at least one control processor; the memory stores instructions executable by the at least one control processor, the instructions being executed by the at least one control processor to enable the at least one control processor to perform the above-described data visualization chart generation method.

[0016] To achieve the above objectives, a fourth aspect of this application provides a computer-readable storage medium storing computer-executable instructions for causing a computer to execute the above-described data visualization chart generation method.

[0017] It is understood that the beneficial effects of the second to fourth aspects compared with the related technologies are the same as the beneficial effects of the first aspect compared with the related technologies. Please refer to the relevant description in the first aspect above, which will not be repeated here. Attached Figure Description

[0018] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, in which: Figure 1 This is a flowchart illustrating a data visualization chart generation method provided in an embodiment of this application; Figure 2 This is a schematic diagram provided in an embodiment of this application; Figure 3 This is a schematic diagram of the structure of a data visualization chart generation system provided in an embodiment of this application; Figure 4 This is a schematic diagram of the hardware structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0019] The embodiments of this application are described in detail below. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain this application, and should not be construed as limiting this application.

[0020] In the description of this application, the use of terms such as "first," "second," etc., is for the purpose of distinguishing technical features only and should not be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated or the order of the technical features indicated.

[0021] In the description of this application, it should be understood that the orientation descriptions, such as up, down, etc., are based on the orientation or positional relationship shown in the accompanying drawings, and are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this application.

[0022] In the description of this application, it should be noted that, unless otherwise explicitly defined, terms such as "setup," "installation," and "connection" should be interpreted broadly, and those skilled in the art can reasonably determine the specific meaning of the above terms in this application in conjunction with the specific content of the technical solution.

[0023] Data visualization is a core technology in the field of business intelligence, helping users understand complex data through charts. Currently, mainstream business intelligence tools require users to manually create visualizations by dragging and dropping fields, configuring attributes, and selecting chart types. However, this approach has several problems: First, it lacks indicator theme recognition, failing to automatically locate core indicators from user natural language questions, requiring manual selection. This is because it lacks a dedicated indicator theme matching algorithm, relying solely on general semantic matching without incorporating a domain-specific indicator dictionary and weighting model. Second, it suffers from poor domain adaptability, easily leading to ambiguities in indicator-field mapping when parsing domain-specific commands. This stems from the lack of integration of domain knowledge graphs and indicator metadata. The system suffers from several issues: First, it cannot verify the underlying data tables through indicator themes; second, it lacks compatibility with multiple business intelligence platforms, as visualization generation is tied to a single business intelligence platform, requiring enterprises to reconstruct the integration logic when changing systems, and lacks a standardized adaptation layer due to the use of hard-coded interfaces for business intelligence application programming interfaces; third, it lacks context memory for multi-round interactions, requiring users to repeatedly describe all requirements when correcting commands, and incremental correction is impossible due to the lack of context state storage and the absence of association with historically matched indicator themes; and fourth, it lacks a closed-loop exception handling mechanism, directly interrupting the process when structured query language execution times out or data source connection fails, because no exception detection node is set in the entire process of "indicator theme match → data query".

[0024] Based on this, embodiments of this application provide a data visualization chart generation method, system, electronic device, and medium, which aim to achieve accurate and efficient generation of data visualization charts by parsing key information of instructions, matching target indicators and chart types, thereby improving the efficiency and practicality of data visualization.

[0025] The data visualization chart generation method, system, electronic device, and medium provided in this application are specifically described through the following embodiments. First, the data visualization chart generation method in this application is described.

[0026] The embodiments of this application can acquire and process relevant data based on artificial intelligence technology. Artificial intelligence (AI) refers to the theories, methods, technologies, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to obtain optimal results.

[0027] Foundational technologies for artificial intelligence generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interactive systems, and mechatronics. AI software technologies mainly encompass computer vision, robotics, biometrics, speech processing, natural language processing, and machine learning / deep learning.

[0028] The data visualization chart generation method provided in this application relates to the field of data visualization technology. This method can be applied to a terminal, a server, or software running on either a terminal or a server. In some embodiments, the terminal can be a smartphone, tablet, laptop, desktop computer, etc.; the server can be configured as an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application implementing the data visualization chart generation method, but is not limited to the above forms.

[0029] This application can be used in a wide variety of general-purpose or special-purpose computer system environments or configurations. Examples include: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, and distributed computing environments including any of the above systems or devices. This application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform specific tasks or implement specific abstract data types. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.

[0030] It should be noted that in all specific embodiments of this application, when processing data related to user identity or characteristics, such as user information, user behavior data, user historical data, and user location information, user permission or consent is obtained first. Furthermore, the collection, use, and processing of this data comply with relevant laws, regulations, and standards. In addition, when embodiments of this application require access to sensitive personal information of users, separate permission or consent from the user is obtained through pop-ups or redirection to confirmation pages. Only after obtaining the user's separate permission or consent is the necessary user-related data required for the proper functioning of these embodiments acquired.

[0031] Therefore, referring to Figure 1This application provides a data visualization chart generation method. This method is applied to a central controller, which can be a server, an electronic device, or a mobile terminal, etc. There are no specific limitations here. The method includes the following steps S110 to S150.

[0032] Step S110: In response to the chart to be generated instruction, parse the chart to be generated instruction to obtain the key information of the chart to be generated; the key information includes domain information, time dimension and data dimension; Step S120: Based on the key information of the chart to be generated, determine the data range and initial indicator theme of the chart to be generated, and extract the chart data of the chart to be generated; Step S130: Calculate the semantic similarity between the initial indicator topic and each indicator topic in the indicator topic library to determine the target indicator topic from the indicator topic library. Step S140: Match the target chart type according to the data range and target indicator theme of the chart to be generated; Step S150: Based on the target chart type, generate the target data chart according to the chart data to be generated and the target indicator theme.

[0033] In this step, in response to the chart to be generated instruction, which can be a natural language query entered by the user through the system interface, the instruction is semantically parsed by the natural language processing parsing engine. By combining the domain language model and keyword recognition rules, the core constraints required for subsequent data processing and indicator matching can be accurately extracted from the fuzzy natural language instruction, laying the foundation for the subsequent process.

[0034] Specifically, extracting domain information corresponds to the professional scenario to which the instruction belongs (such as the education field or the financial field), the time dimension clarifies the time boundary of the data (such as Spring 2024 or the 2023 academic year), and the data dimension limits the statistical scope of the data (such as the computer science department or a certain product line).

[0035] Furthermore, the data scope is clarified by combining domain information, time dimension, and data dimension, such as "teaching-related data of the School of Computer Science in Spring 2024", which accurately defines the data set to be retrieved in the target database; the initial indicator theme is extracted from the fuzzy requirements of the instructions (such as initially locating the relevant direction from "core teaching indicators"), providing an initial anchor point for subsequent indicator matching.

[0036] Furthermore, based on the defined data range, corresponding structured query statements are generated to extract chart data that meets the conditions from the target database (including related data tables such as course schedules, teacher tables, and attendance tables). During the extraction process, users do not need to manually configure field associations or query logic. The extraction is fully automated and accurate, relying on the automatic mapping of key information and database metadata.

[0037] Furthermore, a domain-specific indicator theme library is loaded. This library contains domain-specific indicator names, associated fields, dictionary weights (set based on the indicator's domain importance), and frequency weights (based on historical usage frequency statistics), and supports dynamic updates. Then, a bidirectional encoder representation model is used to convert the initial indicator theme and the "name + description" of each indicator in the library into vectors. A semantic similarity algorithm (such as cosine similarity) is then used to calculate the vector matching degree, filtering out candidate indicator themes whose similarity meets a preset threshold.

[0038] Furthermore, a multi-factor weighted calculation is performed by combining dictionary weights, frequency weights, and context weights (based on historical dialogue relevance) to obtain the comprehensive weight of each candidate indicator. The target indicator theme is then determined by sorting the candidates according to their weights. Finally, metadata validation is performed on the target indicator theme to confirm the existence of its associated fields and the rationality of its data types. Missing dimension-related data is automatically supplemented (e.g., matching "School of Computer Science" with the corresponding school number) to ensure that the target indicator theme can be accurately associated with the underlying data table.

[0039] Furthermore, the data characteristics of the data to be generated into the charts (such as data type being numerical or percentage, data volume being single-value or multi-dimensional series) are analyzed, along with the attributes of the target indicator theme (such as quantity statistics, trend changes, or percentage achievement). This analysis is then combined with a pre-defined chart type mapping rule library to construct a three-dimensional mapping relationship of "indicator attribute - data characteristic - chart type." The mapping rule library supports customization according to domain needs (such as specific layout rules for the education sector or chart style specifications for the financial sector), ensuring that the matched target chart type accurately presents the core data information while conforming to domain usage habits. For example, quantity statistics indicators (such as the number of courses) are matched with bar charts, trend changes indicators (such as teacher teaching hours) are matched with line charts, and percentage or achievement indicators (such as student attendance) are matched with dashboards or pie charts.

[0040] Furthermore, based on the associated fields and data characteristics of the target indicator theme, the extracted chart data is structured (e.g., grouped by indicator dimension, calculated statistical values, and formatted data format). Then, the standardized interface of the multi-business intelligence adaptation layer is called to connect with the target business intelligence platform (e.g., Data Usability, Power BI, etc.) to generate basic charts based on the matched target chart type.

[0041] Furthermore, based on domain-specific layout template libraries (such as a 2x2 grid layout for education and a multi-dimensional split-screen layout for finance), dashboards are automatically assembled by combining the importance ranking of indicators, and the corresponding theme colors for the domain are configured (such as blue for education and gold for finance). This generates target data charts with clear structures and intuitive visuals, thereby achieving end-to-end automated generation from data to visualization charts without requiring users to manually adjust chart styles, layouts, or data formats, significantly reducing the operational threshold.

[0042] In one embodiment, a data visualization chart generation method is applied, such as... Figure 2 As shown, the technical issues are resolved through a full-process architecture of "user command input → indicator theme matching → data query → business intelligence adaptation → dashboard output," combined with a proprietary indicator theme matching algorithm. The specific implementation steps are as follows: Step 1: Users enter query commands through the system interface (such as "Generate 2024 Spring Teaching Status Dashboard").

[0043] Step 2: The system calls the "Indicator Topic Matching Algorithm" to identify the user's intent. The algorithm matches indicator topics related to the user's input based on the "Domain Knowledge Graph".

[0044] Step 3: The system checks for the existence of multi-turn dialogue context. If so, it refines the current query intent by combining the historical dialogue content.

[0045] Step 4: Semantically analyze the user's command using a natural language processing engine to automatically generate the corresponding structured query language query statement.

[0046] Step 5: The system executes the generated Structured Query Language statement to extract data from the "target database".

[0047] Step 6: Pass the query results to the "Multi-Business Intelligence Adaptation Layer" and call the chart generation application interface provided by the business intelligence platform to automatically match the chart type (such as line chart, bar chart, pie chart, etc.) based on the data characteristics.

[0048] Step 7: The system detects abnormal situations in real time, including query timeouts, empty result sets, and database connection failures, and executes corresponding fault tolerance mechanisms.

[0049] Step 8: Users can modify the content and adjust the layout of the generated dashboard. The system will re-execute the configuration process based on user feedback to achieve interactive optimization.

[0050] Therefore, this embodiment improves the accuracy of indicator mapping by more than 40% compared with the general model through a dedicated indicator topic matching algorithm. Moreover, users do not need to manually select indicators and can complete the entire process from "problem" to "dashboard" through natural language, greatly reducing the number of operation steps. At the same time, the standardized adaptation layer in this embodiment supports rapid switching of business intelligence platforms, reducing integration costs by 60%, and the context memory combined with indicator topic association ensures that the response time for multiple rounds of correction is ≤1 second. In addition, the abnormal closed-loop handling reduces the process interruption rate from 20% to below 3%.

[0051] In one embodiment of this example, taking "the academic affairs administrator generating a dashboard for the teaching situation of the School of Computer Science in Spring 2024" as an example, the specific implementation content is as follows: First, the user enters the command "Generate a dashboard for the 2024 Spring Computer Science Department's teaching situation, highlighting key teaching indicators" through the system's web interface. The user clicks the "Generate" button, and the system receives the command and initiates the processing flow. The system then invokes the "Indicator Topic Hitting Algorithm" to recognize the user's intent.

[0052] Furthermore, as shown in Table 1, a dictionary of indicators for the education field is loaded.

[0053] Table 1

[0054] Furthermore, a bidirectional encoder is used to represent the model by converting the "core teaching indicators" into vectors V_request, and the "indicator name + description" of each indicator into vectors V_indicator1 to V_indicator5. Semantic similarity is then calculated, with the following results: S(V_request, V_indicator1) = 0.82, S(V_request, V_indicator2) = 0.78, S(V_request, V_indicator3) = 0.76, S(V_request, V_indicator4) = 0.68, S(V_request, V_indicator5) = 0.65.

[0055] Furthermore, candidate indicators with S≥0.75 are selected from the calculation results: {Indicator 001, Indicator 002, Indicator 003}. Then, multi-factor weight calculations were performed on the candidate indicators, with parameters set as α=0.4, β=0.3, γ=0.3 (no historical context, W_context=0.5). The calculation process is as follows: P_indicator001=0.4×0.9+0.3×0.85+0.3×0.5=0.765; P_indicator002=0.4×0.85+0.3×0.78+0.3×0.5=0.735; P_indicator003=0.4×0.8+0.3×0.92+0.3×0.5=0.775. Therefore, based on the above multi-factor weight calculation results, the final hit indicator themes are determined to be {Indicator003 (student attendance rate, P=0.775), Indicator001 (number of courses, P=0.765), Indicator002 (teacher teaching time, P=0.735)}.

[0056] Furthermore, metadata validation is performed on the final hit indicator topic, specifically including verifying whether the course quantity field (numeric type) of the course table associated with indicator 001 exists and whether the attendance rate field (percentage type) of the attendance table associated with indicator 003 exists, and then automatically supplementing the college number corresponding to "Computer Science College" with 101 (matching from the college information table).

[0057] Furthermore, the system checks whether a multi-turn dialogue context exists. In this embodiment, which is the first interaction, there is no historical context. Therefore, the context object is initialized (containing fields: historical indicator topic list, current business intelligence platform = data usability, user identifier, and session identifier), and then the indicator topics {indicator 001, indicator 002, indicator 003} that were hit this time are stored in the context object.

[0058] Furthermore, the user's commands are semantically parsed using a natural language processing engine to extract key elements. These key elements include domain, time, dimension, and fuzzy requirements. Specifically, in this embodiment, the domain is education, the time is Spring 2024, the dimension is the School of Computer Science, and the fuzzy requirement is "core teaching indicators." Therefore, the keyword set is {"Spring 2024", "School of Computer Science", "core teaching indicators"}.

[0059] Furthermore, based on the hit indicator themes and extracted key elements, corresponding structured query language (SCL) statements are generated. The system then executes these SCL statements to extract data from the target database. Specifically, the results obtained after executing the SCL are shown in Table 2. Table 2

[0060] Furthermore, the query results are passed to the "Multi-Business Intelligence Adaptation Layer," which calls the chart generation application programming interface (API) provided by the business intelligence platform. Then, the data-friendly expressive state transition application programming interface (API) is called to configure my Structured Query Language (SCL) database connection to create a data source. Finally, the SCL results are registered as the "2024 Spring Computer Science Teaching Indicators" dataset, associated with the three matched indicator themes.

[0061] Furthermore, charts are generated. Specifically, the number of courses is displayed as a bar chart (X-axis = college, Y-axis = number of courses); the teaching hours of teachers are displayed as a line chart (X-axis = college, Y-axis = duration); and the student attendance rate is displayed as a dashboard (target value = 90%, current value = 92.5%). The dashboard is assembled using a 2×2 grid (top row: bar chart + line chart, bottom row: dashboard + data summary card), and the theme color is set to "education blue".

[0062] Furthermore, the system detects anomalies in real time and executes corresponding fault-tolerant mechanisms. If the Structured Query Language (SCL) execution times out (reason: excessive data volume from multiple table joins), anomaly detection is performed. Specifically, the system catches timeout errors (timeout period = 5 seconds), and after two failed retries, simplifies the SCL based on the hit algorithm weights (retaining the top two weighted metrics: student attendance rate and number of courses), reducing the number of table joins. A user prompt is generated: "The query data volume is too large; it has been simplified to two core metrics. Do you want to view the complete results?". On the other hand, if the data source connection fails, it switches to a backup data source, records error logs, and notifies the system administrator.

[0063] Furthermore, when a user modifies the generated dashboard, receiving the user's input modification command: "Change the display of teacher teaching hours to grouped by major," the system re-executes the configuration process based on user feedback. First, it extracts the historical hit indicator theme indicator 002 (teacher teaching hours) and Business Intelligence Platform = Data Usability from the context. Then, it only updates the grouping field of the Structured Query Language to "Major Name" (Major Name), and then calls the Data Usability chart update application interface without rebuilding the data source. Thus, the response time is only 0.7 seconds, and the dashboard refreshes in real time. The context is then updated, storing the modified indicator configuration in the context object for subsequent interactions.

[0064] In some embodiments, after determining the data range and initial indicator theme of the chart to be generated based on the key information of the chart to be generated in step S120, and extracting the chart data of the chart to be generated, the following steps S210 to S230 are further included: Step S210: If a query timeout occurs during the extraction of chart data to be generated, perform the operation of extracting candidate chart data for the chart to be generated based on the key information of the chart to be generated, so as to obtain candidate chart data corresponding to multiple sets of key information. Step S220: Determine the chart data to be generated from the candidate chart data corresponding to multiple sets of key information; Step S230: Generate an early warning message and send it to the client. The early warning message is used to indicate abnormal data extraction.

[0065] In this embodiment, when generating structured query statements based on key information and performing data extraction, if a query timeout is triggered due to excessive data volume from multiple table joins, high database load, or network latency, multiple differentiated query schemes are reconstructed using key information such as domain information, time dimension, and data dimension as core constraints. This is achieved by simplifying query logic (e.g., reducing non-core data table joins and narrowing the temporary data cache range), splitting data extraction dimensions (e.g., extracting data in batches according to indicator importance), or limiting the data sampling range. This process extracts multiple sets of candidate chart data, ensuring that each set of candidate data covers the core data dimensions corresponding to the key information, thus avoiding the loss of core data due to simplified logic.

[0066] Furthermore, each set of candidate data is associated and matched with the determined target indicator theme. Complete data corresponding to core indicators with high comprehensive weight (such as student attendance rate, number of courses, etc.) are retained first, and duplicate or secondary data dimensions are eliminated or merged. At the same time, the completeness and accuracy of the candidate data are verified (such as whether the data format meets the indicator requirements and whether the key values ​​are within a reasonable range). Finally, the dataset that meets the display requirements of the core indicators and can ensure data reliability is selected from multiple sets of candidate data as the final chart data to be generated, ensuring that even if the query times out, it can still provide high-quality data support for the subsequent chart generation.

[0067] Furthermore, based on specific scenarios of query timeouts (such as excessive data volume or high database load), targeted early warning messages are generated to inform users of the abnormal situation, explain the solutions already taken, and the current status, thus avoiding user confusion due to chart generation delays. Simultaneously, this early warning information can be sent via client interface pop-ups, message notifications, and other methods.

[0068] In some embodiments, in step S130, the semantic similarity between the initial indicator topic and each indicator topic in the indicator topic library is calculated to determine the target indicator topic from the indicator topic library, including the following steps S310 to S330: Step S310: Calculate the semantic similarity between the initial indicator topic and each indicator topic in the indicator topic library; Step S320: Based on the semantic similarity between the initial indicator topic and each indicator topic in the indicator topic library, at least one candidate indicator topic is selected from the indicator topic library; the candidate indicator topic is the indicator topic whose semantic similarity meets the preset conditions. Step S330: Determine the target indicator topic based on the weighting factors of at least one candidate indicator topic.

[0069] In this embodiment, the weighting factors include dictionary weight, frequency weight, and context weight. Dictionary weight represents the importance of the indicator topic in the corresponding field, frequency weight represents the historical usage frequency of the indicator topic, and context weight represents the relevance of the indicator topic in historical context content.

[0070] Specifically, the first step is to load a pre-defined domain-specific indicator theme library. This library contains indicator names for the corresponding domain (such as education or finance), associated data table fields, dictionary weights (set based on the importance of the indicator within the domain), and frequency weights (based on the historical usage frequency of the indicator). It also supports dynamic updates based on actual needs.

[0071] Furthermore, a bidirectional encoder representation model is adopted to convert the initial indicator topics (such as "core teaching indicators") extracted from user instructions into a vector form that can be recognized by computers. At the same time, the "name + associated description" of each indicator in the indicator topic library is also converted into a corresponding vector to ensure that the two are in the same semantic space.

[0072] Furthermore, by using semantic similarity algorithms (such as cosine similarity algorithms) to calculate the matching degree between the initial indicator topic vector and each indicator vector in the library, a quantified similarity value is obtained, providing an objective basis for subsequent screening of candidate indicators, thus breaking through the limitation of existing technologies that rely solely on general semantic matching.

[0073] Furthermore, each similarity value is compared with a pre-set semantic similarity threshold, and index topics with similarity values ​​greater than or equal to the threshold are selected as at least one candidate index topic. This quickly eliminates indexes that are irrelevant to user needs or have extremely low relevance, narrows the scope of subsequent weight calculations, improves index matching efficiency, and ensures the basic relevance of candidate indexes.

[0074] Furthermore, the comprehensive weight of each candidate indicator theme is obtained through multi-factor weighted calculation. The specific calculation logic is "comprehensive weight = α × dictionary weight + β × frequency weight + γ × context weight". Then, the candidate indicator themes are sorted from high to low according to the comprehensive weight, and the indicators that are ranked first and meet the preset weight requirements are selected as the target indicator themes.

[0075] Furthermore, after determining the target indicator theme, a metadata verification process is executed to confirm the existence of the target indicator's associated fields and the rationality of the data types, and to supplement the missing dimension-related data (such as matching "School of Computer Science" with the corresponding school number), ensuring that the target indicator theme can accurately connect with the underlying data table and solving the problems of ambiguous mapping of existing technical indicators and poor domain adaptability.

[0076] In some embodiments, determining the target indicator topic in step S330 based on the weighting factors of at least one candidate indicator topic includes the following steps S410 to S420: Step S410: Based on the dictionary weight, frequency weight and context weight of at least one candidate indicator topic, perform multi-factor weighted calculation to obtain the comprehensive weight of at least one candidate indicator topic. Step S420: Determine the target indicator theme based on the comprehensive weight of at least one candidate indicator theme; the target indicator theme is the indicator theme corresponding to the highest comprehensive weight among at least one candidate indicator theme.

[0077] In this embodiment, dictionary weight represents the core importance of the indicator in the corresponding field (such as education, finance); frequency weight represents the historical actual usage frequency of the indicator. The more frequently the indicator is used, the higher the user demand and the higher the weight value; context weight represents the degree of correlation between the indicator and the current query intent in the historical dialogue. If there are multiple rounds of dialogue, the relevant indicators hit in the past will increase the corresponding context weight. If there is no historical context, the default baseline value (such as 0.5 set in the uploaded file) will be used.

[0078] Specifically, preset weighting coefficients (α=0.4, β=0.3, γ=0.3) are loaded, and each candidate indicator topic is calculated one by one according to the formula "comprehensive weight = α × dictionary weight + β × frequency weight + γ × context weight". This quantitative calculation enables an objective evaluation of the candidate indicator topics, breaking through the limitations of the single-dimensional judgment of existing technologies.

[0079] Furthermore, all candidate indicator topics are sorted by their comprehensive weight from highest to lowest, and the indicator topic with the highest comprehensive weight is selected as the initial target indicator topic, ensuring optimal matching between the selected indicator and the user's query intent. In addition, after determining the initial target indicator topic, a metadata verification process is performed: on the one hand, the existence of the associated fields (e.g., "Attendance Table.Attendance Rate") and the rationality of the data type (e.g., percentage) are confirmed to avoid data extraction failures due to missing fields or type mismatches; on the other hand, if missing dimension information is detected (e.g., only mentioning "Computer Science Department" without specifying the department number), the corresponding dimension-related data is automatically matched and supplemented from the domain information database (e.g., department number = 101), ultimately forming a verified and improved target indicator topic. This ensures the accuracy of indicator selection and resolves the ambiguity in indicator-field mapping in existing technologies, laying a reliable foundation for subsequent data extraction and chart generation.

[0080] In some embodiments, after calculating the semantic similarity between the initial indicator topic and each indicator topic in the indicator topic library in step S130 to determine the target indicator topic from the indicator topic library, the method further includes the following steps S510 to S530: Step S510: Detect the context of the chart to be generated; Step S520: If the context content exists, extract historical indicator theme-related information from the context content in order to optimize the target indicator theme through the historical indicator theme-related information. Step S530: If the context content does not exist, initialize the context content and store the target metric topic into the context content to obtain the updated context content.

[0081] In this embodiment, based on the current user session identifier and user identifier, it is retrieved whether there is context content formed by historical interactions. This context content is a session-level data set stored in the system, which includes key data such as a list of historical indicator topics, the adapted business intelligence platform identifier, past configuration information, and session status.

[0082] Specifically, during the detection process, the current interaction and historical sessions are accurately associated through session identifiers to avoid contextual confusion between different users and different sessions. This addresses the shortcomings of existing technologies that lack stateful memory for multi-turn interactions and lays the foundation for subsequent incremental optimization of metrics.

[0083] Furthermore, relevant information about historical indicator themes is extracted from the context data, specifically including historically matched indicator themes, corresponding indicator configuration parameters, historical data dimension selections, and business intelligence platform adaptation records. Based on this information, the target indicator theme is then optimized. For example, if a historical indicator has a logical relationship with the current target indicator (such as "student attendance rate" and "number of courses" being core teaching indicators), the context weight factor in the comprehensive weight calculation will be adjusted to strengthen the priority of the related indicator. Simultaneously, redundant content that overlaps with or conflicts with historical indicators will be removed, ensuring that the target indicator theme both aligns with current needs and carries over historical interaction intent, avoiding users repeatedly describing their needs and significantly improving the response efficiency of multi-round interactions.

[0084] Furthermore, when no historical context content is detected, a context object is initialized. The core structure of the context object includes four core fields: a list of historical metric topics, the identifier of the currently adapted business intelligence platform, the user's unique identifier, and the identifier of this session. At the same time, a configuration information storage area is reserved for subsequent interaction data supplementation.

[0085] Furthermore, the target metric topic is completely stored in the historical metric topic list of the context object to form the updated context content. This reserves a data interface for possible subsequent multi-round interactions, ensuring that when the user issues a correction command later, the stored target metric topic can be directly retrieved from the context without having to re-execute the entire metric matching process.

[0086] In some embodiments, before matching the target chart type according to the data range and target indicator theme of the chart to be generated in step S140, the following steps S610 to S620 are further included: Step S610: Perform metadata verification on the target indicator topic and obtain the verification result; the metadata verification includes checking the existence of related fields in the target indicator topic and the rationality of the data type; Step S620: If the verification result indicates that the dimension information corresponding to the target indicator theme is missing, match the dimension association data corresponding to the target indicator theme from the indicator theme library to complete the target indicator theme.

[0087] In this embodiment, a full-dimensional metadata verification is performed on the target indicator theme to identify compatibility issues between the indicator and the data in advance, clearing obstacles for subsequent processes and ensuring the reliability of the technical solution. Specifically, this includes two core dimensions: first, the existence verification of associated fields, which involves retrieving metadata information from the target database to confirm whether the associated fields corresponding to the target indicator theme actually exist, avoiding subsequent data extraction failures due to missing fields; second, the rationality verification of data types, checking whether the data types of the associated fields match the display requirements of the target indicator theme.

[0088] Furthermore, when the verification results show that the dimensional information corresponding to the target indicator topic is missing, the system searches the indicator topic library and related domain information library for preset dimensional mapping rules based on the domain attributes and core keywords of the target indicator topic to accurately match the missing dimensional data. The matched dimensional data is then added to the target indicator topic, perfecting its association logic with the underlying data table. This ensures that the target indicator topic not only contains the core indicator itself but also has complete dimensional constraints, enabling precise location of the specific data set in the target database.

[0089] In some embodiments, after generating the target data chart based on the target chart type, the chart data to be generated, and the target indicator theme in step S150, the following steps S710 to S730 are further included: Step S710: In response to the adjustment instruction of the target data chart, parse the adjustment instruction to obtain the adjustment information of the target data chart; the adjustment information includes content adjustment information and layout adjustment information; Step S720: If the adjustment information is content adjustment information, extract the adjustment chart data of the target data chart based on the content adjustment information; based on the target chart type, generate the adjustment data chart according to the adjustment chart data of the target data chart and the target indicator theme; Step S730: If the adjustment information is layout adjustment information, adjust the target chart type according to the layout adjustment information to obtain the adjustment chart type; based on the adjustment chart type, generate the adjustment data chart according to the chart data of the target data chart and the target indicator theme.

[0090] In this embodiment, the system responds to user requests to adjust target data charts. Specifically, the adjustment commands input by the user through the system interface can be in natural language form (such as "change the display of teacher teaching hours to grouped by major" or "change the dashboard to a pie chart"). This embodiment first identifies the relevance of the adjustment command to the current session and associates it with the historical context of the corresponding target data chart through the session identifier.

[0091] Furthermore, the adjustment instructions are semantically decomposed using a natural language processing parsing engine to accurately extract the adjustment information. This adjustment information includes content adjustment information and layout adjustment information. The content adjustment information focuses on changes at the data or indicator level (such as adding or removing indicators, changing data dimensions, modifying statistical ranges, etc.), while the layout adjustment information focuses on changes in the chart presentation format (such as switching chart types, adjusting grid arrangement, modifying theme colors, adjusting chart sizes, etc.).

[0092] Furthermore, when the adjustment information is determined to be content adjustment information, there is no need to rebuild the overall data source and repeatedly execute the entire indicator matching process. Instead, the historical target indicator theme, business intelligence platform identifier, and original configuration information are quickly extracted from the context object, and the core modification points are located only for the content adjustment needs. Then, based on the content adjustment information, targeted data query logic is generated to extract the adjusted chart data from the target database. This process only involves the extraction of newly added or modified data and does not affect the validity of the original data. Finally, the original target chart type is retained (e.g., the original line chart remains a line chart), the adjusted chart data and the target indicator theme are merged, and the chart update interface of the business intelligence platform is called to quickly generate the adjusted data chart. The response time of the entire process is controlled within a preset threshold, achieving efficient optimization of data content.

[0093] Furthermore, when the adjustment information is a layout adjustment, only the display style and structure of the chart are optimized: if the user's request is to switch the chart type (such as changing a bar chart to a line chart, or a dashboard to a pie chart), the chart type mapping rule library is called according to the layout adjustment information to match the chart type that is suitable for the data characteristics and indicator attributes; if the user's request is to adjust the layout structure or visual style (such as changing a 2×2 grid to a 3×1 layout, or changing the theme color from "education blue" to "technology gray"), the corresponding template parameters are retrieved from the layout template library to adjust the arrangement and color scheme of the target chart.

[0094] Furthermore, without the need to re-extract or process chart data, the chart data and target indicator themes of the original target data chart can be directly reused. Through the standardized interface of the multi-business intelligence adaptation layer, the chart style update interface of the business intelligence platform is called to generate an adjusted data chart that meets the layout adjustment requirements. This ensures the flexibility of the adjustment and avoids unnecessary data duplication, greatly improving the user interaction experience.

[0095] like Figure 3 As shown in some embodiments of this application, a data visualization chart generation system is provided. The system includes a parsing module 310, an extraction module 320, a calculation module 330, a matching module 340, and a generation module 350. Specifically: The parsing module 310 is used to respond to the chart generation instruction to generate the chart, parse the chart generation instruction, and obtain the key information of the chart to be generated; the key information includes domain information, time dimension, and data dimension. The extraction module 320 is used to determine the data range and initial indicator theme of the chart to be generated based on the key information of the chart to be generated, and to extract the chart data of the chart to be generated. The calculation module 330 is used to calculate the semantic similarity between the initial indicator topic and each indicator topic in the indicator topic library, so as to determine the target indicator topic from the indicator topic library. Matching module 340 is used to match the target chart type based on the data range and target indicator theme of the chart to be generated; The generation module 350 is used to generate a target data chart based on the target chart type, the chart data to be generated, and the target indicator theme.

[0096] It should be noted that the data visualization chart generation system provided in this embodiment and the data visualization chart generation method described above are based on the same inventive concept. Therefore, the relevant content of the data visualization chart generation method described above also applies to the content of the data visualization chart generation system, and will not be repeated here.

[0097] To achieve this, the system responds to the chart generation command, parses the command to obtain key information about the chart to be generated, determines the data range and initial indicator theme of the chart, and extracts the chart data. It then calculates the semantic similarity between the initial indicator theme and each indicator theme in the indicator theme library to determine the target indicator theme. Based on the data range and target indicator theme of the chart to be generated, it matches the target chart type. Finally, based on the target chart type, and according to the chart data of the chart to be generated and the target indicator theme, it generates the target data chart. In this way, by parsing key command information and matching target indicators and chart types, the system can achieve accurate and efficient generation of data visualization charts, improving the efficiency and practicality of data visualization.

[0098] This application also provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the above-described data visualization chart generation method.

[0099] like Figure 4 , Figure 4 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application. The electronic device includes: At least one battery; At least one memory; At least one processor; At least one program; The program is stored in memory, and the processor executes at least one program to implement the data visualization chart generation method described above in this disclosure.

[0100] This electronic device can be any smart terminal, including mobile phones, tablets, personal digital assistants (PDAs), and in-vehicle computers.

[0101] The electronic devices according to embodiments of this application will now be described in detail.

[0102] The processor 1600 can be implemented using a general-purpose central processing unit (CPU), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this disclosure. The memory 1700 can be implemented as a read-only memory (ROM), static storage device, dynamic storage device, or random access memory (RAM). The memory 1700 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 1700 and is called and executed by the processor 1600 to perform a data visualization chart generation method according to an embodiment of this disclosure.

[0103] The input / output interface 1800 is used to implement information input and output. The communication interface 1900 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.). Bus 2000 transmits information between various components of the device (e.g., processor 1600, memory 1700, input / output interface 1800, and communication interface 1900); The processor 1600, memory 1700, input / output interface 1800 and communication interface 1900 are connected to each other within the device via bus 2000.

[0104] This disclosure also provides a storage medium, which is a computer-readable storage medium storing computer-executable instructions for causing a computer to execute the above-described data visualization chart generation method.

[0105] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0106] The embodiments described in this disclosure are for the purpose of more clearly illustrating the technical solutions of this disclosure and do not constitute a limitation on the technical solutions provided by this disclosure. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by this disclosure are also applicable to similar technical problems.

[0107] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of this disclosure, and may include more or fewer steps than shown, or combine certain steps, or different steps.

[0108] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0109] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.

[0110] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any related variations, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0111] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.

[0112] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0113] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0114] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0115] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes multiple instructions to cause an electronic device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0116] The above is a detailed description of the preferred embodiments of this application. However, the embodiments of this application are not limited to the above-described implementation methods. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of the embodiments of this application. All such equivalent modifications or substitutions are included within the scope defined by the claims of the embodiments of this application.

[0117] The embodiments of this application have been described in detail above with reference to the accompanying drawings. However, this application is not limited to the above embodiments. Within the scope of knowledge possessed by those skilled in the art, various changes can be made without departing from the spirit of this application.

Claims

1. A method for generating data visualization charts, characterized in that, The method includes: In response to a chart generation instruction, the chart generation instruction is parsed to obtain key information of the chart to be generated; the key information includes domain information, time dimension, and data dimension. Based on the key information of the chart to be generated, the data range and initial indicator theme of the chart to be generated are determined, and the chart data of the chart to be generated is extracted. The semantic similarity between the initial indicator topic and each indicator topic in the indicator topic library is calculated to determine the target indicator topic from the indicator topic library. Based on the data range and target indicator theme of the chart to be generated, match the target chart type; Based on the target chart type, a target data chart is generated according to the chart data of the chart to be generated and the target indicator theme.

2. The data visualization chart generation method according to claim 1, characterized in that, After determining the data range and initial indicator theme of the chart to be generated based on the key information of the chart to be generated, and extracting the chart data of the chart to be generated, the method further includes: If a query timeout occurs during the extraction of chart data for the chart to be generated, an operation is performed to extract candidate chart data for the chart to be generated based on the key information of the chart to be generated, so as to obtain multiple sets of candidate chart data corresponding to the key information. From the candidate chart data corresponding to the multiple sets of key information, determine the chart data for the chart to be generated; An early warning message is generated and sent to the client. The early warning message is used to indicate abnormal data extraction.

3. The data visualization chart generation method according to claim 1, characterized in that, The step of calculating semantic similarity between the initial indicator topic and each indicator topic in the indicator topic library to determine the target indicator topic from the indicator topic library includes: Calculate the semantic similarity between the initial indicator topic and each indicator topic in the indicator topic library; Based on the semantic similarity between the initial indicator topic and each indicator topic in the indicator topic library, at least one candidate indicator topic is selected from the indicator topic library; the candidate indicator topic is the indicator topic whose semantic similarity meets the preset conditions. The target indicator theme is determined based on the weighting factors of the at least one candidate indicator theme.

4. The data visualization chart generation method according to claim 3, characterized in that, The weighting factors include dictionary weight, frequency weight, and context weight. The dictionary weight represents the importance of the indicator topic in the corresponding domain, the frequency weight represents the historical usage frequency of the indicator topic, and the context weight represents the relevance of the indicator topic in historical context content. Determining the target indicator topic based on the weighting factors of the at least one candidate indicator topic includes: Based on the dictionary weight, frequency weight, and context weight of the at least one candidate indicator topic, a multi-factor weighted calculation is performed to obtain the comprehensive weight of the at least one candidate indicator topic. The target indicator theme is determined based on the comprehensive weight of the at least one candidate indicator theme; the target indicator theme is the indicator theme corresponding to the highest comprehensive weight among the at least one candidate indicator theme.

5. The data visualization chart generation method according to claim 1, characterized in that, After calculating the semantic similarity between the initial indicator topic and each indicator topic in the indicator topic library to determine the target indicator topic from the indicator topic library, the method further includes: Detect the contextual content of the chart to be generated; If the aforementioned context content exists, historical indicator theme-related information is extracted from the context content in order to optimize the target indicator theme using the historical indicator theme-related information. If the context content does not exist, initialize the context content and store the target metric topic into the context content to obtain the updated context content.

6. The data visualization chart generation method according to claim 1, characterized in that, Before matching the target chart type based on the data range and target indicator theme of the chart to be generated, the method further includes: Metadata validation is performed on the target indicator topic to obtain the validation result; the metadata validation includes verifying the existence of related fields and the rationality of data types in the target indicator topic; If the verification result indicates that the dimension information corresponding to the target indicator theme is missing, the dimension association data corresponding to the target indicator theme is matched from the indicator theme library to complete the target indicator theme.

7. The data visualization chart generation method according to claim 1, characterized in that, After generating the target data chart based on the target chart type, the chart data to be generated, and the target indicator theme, the method further includes: In response to the adjustment instruction of the target data chart, the adjustment instruction is parsed to obtain the adjustment information of the target data chart; the adjustment information includes content adjustment information and layout adjustment information. If the adjustment information is content adjustment information, the adjustment chart data of the target data chart is extracted according to the content adjustment information; based on the target chart type, the adjustment chart data of the target data chart and the target indicator theme are used to generate an adjustment data chart; When the adjustment information is layout adjustment information, the target chart type is adjusted according to the layout adjustment information to obtain the adjusted chart type; based on the adjusted chart type, the adjusted data chart is generated according to the chart data of the target data chart and the target indicator theme.

8. A data visualization chart generation system, characterized in that, The system includes: The parsing module is used to respond to the chart generation instruction to generate a chart, parse the chart generation instruction to obtain the key information of the chart to be generated; the key information includes domain information, time dimension and data dimension. The extraction module is used to determine the data range and initial indicator theme of the chart to be generated based on the key information of the chart to be generated, and to extract the chart data of the chart to be generated; The calculation module is used to calculate the semantic similarity between the initial indicator topic and each indicator topic in the indicator topic library, so as to determine the target indicator topic from the indicator topic library. The matching module is used to match the target chart type based on the data range and target indicator theme of the chart to be generated; The generation module is used to generate a target data chart based on the target chart type, the chart data of the chart to be generated, and the target indicator theme.

9. An electronic device, characterized in that, The method includes at least one control processor and a memory for communicatively connecting to the at least one control processor; the memory stores instructions executable by the at least one control processor, which, when executed by the at least one control processor, enable the at least one control processor to perform a data visualization chart generation method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions for causing a computer to perform a data visualization chart generation method according to any one of claims 1 to 7.