Chart generation method and device, equipment and medium
By obtaining user analysis demand information and generating prompt words to input into a large language model, it solves the problem of difficulty in generating charts that meet user needs in the existing technology, realizes automatic generation of suitable charts, and improves the satisfaction of analysis needs and user experience.
Patent Information
- Application Number
- CN202411405571.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-09
- Publication Date
- 2025-01-24
AI Technical Summary
The prior art is difficult to generate charts that meet user analysis needs, especially when the user is not sure what type of charts is required for visual display of target data.
By obtaining the user's analysis requirements information for target data, based on target data, analysis of demand information, and preset built -in static data, it is generated to input prompts to enter large language models. Then, enter a large language model to obtain the configuration information of the chart, and use the chart to render the software to generate charts that meet the needs of user needs.
The automatic chart is automatically generated according to the user's analysis needs, which improves the accuracy and user experience of chart generation, and can better meet the user's data analysis needs.
Smart Images

Figure CN119357382A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a chart generation method, device, equipment and medium. Background Art
[0002] With the advent of the big data era, data visualization has become an important means of data analysis. Among them, charts, as a commonly used data visualization method, can intuitively display information such as data distribution, data trends, and the relationship between data.
[0003] In practical applications, there are many types and styles of charts, and how to generate charts that meet user analysis needs is crucial for users to conduct data analysis. Summary of the invention
[0004] The embodiments of this specification provide a chart generation method, apparatus, device and medium to generate a chart that meets the analysis needs of users.
[0005] To solve the above technical problems, the embodiments of this specification are implemented as follows: A method for generating a chart provided in an embodiment of the present specification includes: Obtain the user's analysis requirements for target data; Based on the target data, the analysis requirement information and preset built-in static data, a prompt word for inputting into a large language model is obtained; the preset built-in static data includes data in a text form for representing a chart generation rule; Inputting the prompt word into the large language model to obtain configuration information of a chart output by the large language model for the target data; According to the configuration information of the chart, a chart for the target data is generated using chart rendering software.
[0006] The present invention provides a diagram generating device, comprising: The information acquisition module is used to obtain the user's analysis requirement information for the target data; A prompt word generation module, used to obtain prompt words for inputting into a large language model based on the target data, the analysis requirement information and preset built-in static data; the preset built-in static data includes data in a text form for representing a chart generation rule; A prompt word input module, used for inputting the prompt word into the large language model to obtain configuration information of a chart for the target data output by the large language model; The chart generation module is used to generate a chart for the target data using chart rendering software according to the configuration information of the chart.
[0007] A diagram generating device provided in an embodiment of the present specification includes: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to: Obtain the user's analysis requirements for target data; Based on the target data, the analysis requirement information and preset built-in static data, a prompt word for inputting into a large language model is obtained; the preset built-in static data includes data in a text form for representing a chart generation rule; Inputting the prompt word into the large language model to obtain configuration information of a chart output by the large language model for the target data; According to the configuration information of the chart, a chart for the target data is generated using chart rendering software.
[0008] An embodiment of the present specification provides a computer-readable medium on which computer-readable instructions are stored. The computer-readable instructions can be executed by a processor to implement the above-mentioned chart generation method.
[0009] At least one embodiment provided in this specification can achieve the following beneficial effects: the embodiment of this specification obtains prompt words for inputting into a large language model based on target data, analysis requirement information and preset built-in static data, wherein the preset built-in static data includes data in text form for representing chart generation rules, inputs prompt words into the large language model, and generates a chart for the target data using chart rendering software according to the configuration information of the chart of the target data output by the large language model. Since the large language model has natural language processing capabilities, it can fully understand the user's analysis requirement information. At the same time, the prompt words of the large language model have preset built-in static data, and the preset built-in static data include data in text form for representing chart generation rules. The data in text form representing the chart generation rules can be used as a reference basis for the large language model, and a chart that meets the user's analysis requirements is generated on the basis that the large language model fully understands the user's analysis requirement information. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] In order to more clearly illustrate the embodiments of this specification or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0011] Figure 1 A schematic diagram of an application scenario of a chart generation method provided in an embodiment of this specification; Figure 2 A flowchart of a method for generating a chart provided in an embodiment of this specification; Figure 3 A schematic diagram of a prompt word template provided in an embodiment of this specification; Figure 4 A schematic diagram of an interface for generating a chart based on a chart generating method provided in an embodiment of this specification; Figure 5 A schematic diagram of an interface for generating a chart based on a chart generating method provided in an embodiment of this specification; Figure 6 A flowchart of a method for generating a chart provided in an embodiment of this specification; Figure 7 The embodiments of this specification provide corresponding to Figure 1 A structural schematic diagram of a chart generating device; Figure 8 The embodiments of this specification provide corresponding to Figure 1 A structural schematic diagram of a chart generating device. DETAILED DESCRIPTION
[0012] In order to make the purpose, technical solutions and advantages of one or more embodiments of this specification clearer, the technical solutions of one or more embodiments of this specification will be clearly and completely described below in combination with the specific embodiments of this specification and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of one or more embodiments of this specification.
[0013] The following is an explanation of the terms involved in the embodiments of this specification.
[0014] Natural language: refers to the tool used by humans to communicate and express their thoughts in daily life. It is the most basic communication tool for humans. Natural language has high flexibility and expressiveness, and can express various emotions, information and thoughts. It can include oral language and written language, and has components such as grammatical rules, vocabulary and semantic rules.
[0015] Natural language processing (NLP) refers to the use of computers to process large amounts of natural language information instead of humans, and is a bridge for communication between humans and computers. The purpose of natural language processing is to enable computers to accurately understand the language that humans express in daily life and generate natural language to interact with humans.
[0016] Large Language Model (LLM): refers to a deep learning model that is pre-trained on a large corpus using autoregression in the NLP field. It can understand and generate natural language text. The large language model can predict the next word or sentence by learning the statistical laws and semantic information of natural language text. As the input data set and parameter space continue to expand, the capabilities of the large language model will also expand accordingly. It can be applied to a variety of fields such as machine learning, machine translation, speech recognition, and image processing.
[0017] Preset built-in static content data: refers to fixed content data determined in advance during the interaction with the large language model, usually some general knowledge, facts, common sense, such as historical events, scientific knowledge, cultural common sense, etc. Preset built-in static content may not change with user input or dialogue, but serves as a reference basis for the large language model to help the large language model better interact with users.
[0018] Prompt: refers to the command or instruction provided by the user when interacting with the large language model. It can be a question, keyword, context information, etc., which is used to indicate the action that the large language model needs to perform or the output it generates. Users can provide clear prompts to guide the large language model to generate the expected response, thereby improving the effect and quality of the interaction.
[0019] Prompt Template: It is a structured text used to generate prompt words. Generating prompt words based on the prompt template can help users interact with the large language model. The large language model can better understand the user's intention and generate more accurate responses that better meet the user's needs.
[0020] Explainability: Explains the model’s interpretability, meaning that the predictions or decisions made by the model can be explained and interpreted in a way that is understandable to humans, rather than a black box decision. Explainability means that the model’s working process and results can be explained clearly, and users can understand why the model makes specific predictions or decisions.
[0021] Chart Knowledge Base (CKB): refers to a database that contains various basic knowledge about visualization and charts based on experience. The Chart Knowledge Base contains the introduction, examples, uses and applicable scenarios of various charts such as line charts, bar charts, pie charts, scatter charts, heat maps, radar charts and horizontal bar charts.
[0022] In the prior art, chart data visualization tools such as Dycharts, Canva, and GitMind can be used to make charts. Users can select a chart template corresponding to the required chart type in the chart data visualization tool, and then upload the target data to the chart data visualization tool, and then the chart data visualization tool generates a chart corresponding to the chart type required by the user based on the target data uploaded by the user. However, in this process, since the user is required to select a chart template corresponding to the chart type, when the user is not clear about what type of chart the target data needs to be visualized, it is impossible to use this chart data visualization tool to make a chart.
[0023] Based on this, a chart data visualization tool that does not require the user to select an icon type has appeared in the prior art. This type of chart data visualization tool can determine the chart type and then generate a chart based on the target data provided by the user. However, the inventor has found through research that when using this type of chart data visualization tool to make a chart, the generated chart often cannot meet the user's analysis needs. For example, the user wants to perform data trend analysis, but this type of chart data visualization tool may generate a pie chart that is not convenient for data trend analysis. The user wants to perform data comparison analysis, but this type of chart data visualization tool may generate a tree diagram that is not convenient for data comparison analysis, etc., which causes certain troubles to the user.
[0024] In order to solve the defects in the prior art, this solution provides the following embodiments: Figure 1 This is a schematic diagram of an application scenario of a chart generation method provided in an embodiment of this specification. Figure 1 As shown, the application scenario includes a terminal 1 and a server 2.
[0025] Among them, the terminal 1 can be a smart phone. In a specific embodiment, the terminal 1 can also be one or more of a desktop computer, a laptop computer, a tablet computer, an Internet of Things device, a portable wearable device, or an immersive image display device. Among them, the Internet of Things device can be one or more of a smart speaker, a smart TV, a smart air conditioner, or a smart car device. The portable wearable device can be one or more of a smart watch, a smart bracelet, or a head-mounted device. The immersive image display device includes but is not limited to an augmented reality (AR) device, a virtual reality (VR) device, etc.
[0026] Server 2 can be an independent physical server, or a server cluster or distributed file system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), as well as big data and artificial intelligence platforms.
[0027] In the embodiments of the present specification, the terminal 1 and the server 2 may be directly or indirectly connected via wired or wireless communication.
[0028] Terminal 1 may receive analysis requirement information for target data input by a user and send it to server 2. Server 2 may generate configuration information of a chart for the target data using a large language model, and generate a chart for the target data using chart rendering software according to the configuration information of the chart, and then server 2 may send the generated chart to terminal 1.
[0029] It is understandable that the terminal 1 may also be equipped with chart rendering software, the server 2 may send the chart configuration information to the terminal 1, and the terminal 1 may generate a chart for the target data based on the chart configuration information using the chart rendering software equipped in the terminal.
[0030] In addition, terminal 1 may also be equipped with a large language model, and then terminal 1 may generate configuration information of a chart for the target data based on the analysis requirement information for the target data input by the user using the large language model carried by the terminal, and then send the configuration information of the generated chart to server 2. Server 2 may generate a chart for the target data based on the configuration information of the chart using chart rendering software, and then send the generated chart to terminal 1.
[0031] Furthermore, the terminal 1 may also be equipped with a large language model and a chart generation software at the same time, so that the terminal 1 can generate charts for the target data independently, and the specific process will not be repeated here.
[0032] The following describes the chart generation method provided in the embodiments of this specification in conjunction with the accompanying drawings.
[0033] Figure 2 This is a flowchart of a method for generating a chart provided in an embodiment of this specification. From a program perspective, Figure 2 The execution subject of the method may be a program installed on the application server or an application client. Figure 2 As shown, the method may include the following steps.
[0034] Step 202: Obtain the user's analysis requirement information for the target data.
[0035] In the embodiments of this specification, the target data may be data to be analyzed by the user, and may include data in various scenarios, such as web page click data, school class population data, and company sales data.
[0036] The user's analysis requirement information may be various types of analysis requirement information, such as at least one of data comparison analysis, data trend analysis, data distribution analysis, data association analysis, data proportion analysis, data structure analysis, data outlier analysis, and data cluster analysis.
[0037] For target data, users may have analysis needs. For example, for web page click volume data, the user's analysis need information may be data trend analysis, specifically "analyze the trend of web page click volume in the last 7 days", and for school class population data, the user's analysis need information may be data comparison analysis, specifically "compare the number of students in each class in the school", etc.
[0038] In the embodiments of this specification, the user can input the analysis requirement information for the target data through the terminal, and the execution subject of the process, such as the server, can obtain the analysis requirement information. For example, the terminal can send the analysis requirement information to the server, or the server can obtain the analysis requirement from the terminal.
[0039] The analysis requirement information for the target data input by the user through the terminal can be information in the form of natural language. In this way, the user can conveniently express his or her analysis requirements, thereby utilizing the natural language processing capability of the large language model to generate a chart that meets the user's analysis requirements.
[0040] Step 204: Based on the target data, the analysis requirement information and preset built-in static data, a prompt word for inputting a large language model is obtained; the preset built-in static data includes data in text form for representing a chart generation rule.
[0041] In the embodiment of the present specification, the target data may be input by a user through a terminal.
[0042] In addition, the target data may also be obtained by the server from the terminal and / or the Internet. For example, the user's analysis requirement information for the target data may include a link to the target data, and the server may obtain the target data from the terminal and / or the Internet based on the link.
[0043] Furthermore, after the server obtains the target data from the terminal and / or the Internet, the server may also display the target data on the terminal so that the user can understand the target data.
[0044] In the embodiments of this specification, the preset built-in static data may be data of fixed content determined in advance during the interaction with the large language model. The preset built-in static content data may not change with the interaction between the user and the large language model, but serves as a reference basis for the large language model to help the large language model better interact with the user.
[0045] Furthermore, the preset built-in static data may include data in a text form for representing the chart generation rules.
[0046] Among them, the chart generation rules can be determined based on prior knowledge, such as a chart knowledge base determined based on expert experience, chart drawing requirements, etc.
[0047] In practical applications, the chart knowledge base and chart drawing requirements may be non-text data, such as function or code data. To this end, the non-text data can be converted into text data to obtain text data representing chart generation rules. For example, a machine learning model can be used to convert function data into text data, and a code conversion tool can be used to convert code data into text data.
[0048] Step 206: Input the prompt word into a large language model to obtain configuration information of a chart for the target data output by the large language model.
[0049] The large language model can be a model of the GPT series, such as GPT-3.5, GPT-4, and GPT-4o, or a model of other series, such as the Tongyi Qianwen model, the Ant Bailing large model, etc., without limitation here.
[0050] The configuration information of the chart may be information containing various attribute data of the chart to be generated, such as chart type data, title data, legend data, and axis data; thus, a chart for target data may be generated based on the configuration information of the chart.
[0051] Step 208: Generate a chart for the target data using chart rendering software according to the configuration information of the chart.
[0052] The chart rendering software may be software that generates charts according to the configuration information of the chart, such as Tableau software, Highcharts software, etc.
[0053] Since the large language model has natural language processing capabilities, it can fully understand the user's analysis demand information. At the same time, the built-in static data in the form of text representing the chart generation rules in the prompt words can be used as a reference basis for the large language model. On the basis of the large language model fully understanding the user's analysis demand information, a chart that meets the user's analysis needs is generated.
[0054] It should be understood that the order of some steps in the methods described in one or more embodiments of this specification can be interchanged according to actual needs, or some steps can be omitted or deleted.
[0055] based on Figure 2 The present specification also provides some specific implementation plans of the method, which are described below.
[0056] In the embodiment of the present specification, the user's analysis requirement information for target data may be information in text form.
[0057] In addition, the user's analysis requirement information for target data may also be information in a non-text form, such as information in at least one of a picture form, a voice form, and a video form.
[0058] It is understandable that for the analysis requirement information in non-text form, the non-text information can be converted into textual information so as to obtain prompt words for input into the large language model.
[0059] For example, for information in the form of pictures, optical character recognition (OCR) technology can be used to extract text to obtain information in text form; for information in the form of voice, automatic speech recognition (ASR) technology can be used to perform voice recognition to obtain information in text form; for information in the form of videos, audio extraction technology can be used to extract audio, and then automatic speech recognition technology can be used to recognize the extracted audio to obtain information in text form, etc.
[0060] In actual applications, when the amount of prompt words is large, the large language model will take a long time to understand the prompt words, which will reduce work efficiency and accuracy. Therefore, in the embodiments of this specification, in order to improve the work efficiency and accuracy of the configuration information of the large language model output chart, the amount of prompt words input to the large language model can be limited.
[0061] Specifically, the data volume of the prompt word can be adjusted by limiting the data volume of the target data. The chart generation method of the embodiment of this specification may also include: Determine whether the data volume of the target data is greater than or equal to a preset data volume threshold, and obtain a determination result; If the judgment result indicates that the data volume of the target data is greater than or equal to the preset data volume threshold, sampling the target data to obtain at least part of the target data; The obtaining of prompt words for inputting a large language model based on the target data, the analysis requirement information and the preset built-in static data may specifically include: Based on at least part of the target data, the analysis requirement information and preset built-in static data, prompt words for inputting into a large language model are obtained.
[0062] Among them, random sampling, systematic sampling, stratified sampling, cluster sampling, etc. can be used to sample the target data.
[0063] Furthermore, in order to ensure the integrity of the target data and thus the accuracy of the prompt words, the target data may be screened to limit the amount of the target data, for example, by removing duplicate data from the target data; or by performing similarity analysis on the target data to remove data from the target data whose similarity is greater than or equal to a preset similarity threshold.
[0064] In the embodiment of this specification, the preset data volume threshold may be 30,000 words, 50,000 words, etc. Of course, it may also be set according to actual needs, and is not limited here.
[0065] It can be understood that if the judgment result indicates that the data volume of the target data is less than the preset data volume threshold, there is no need to sample or filter the target data, and the prompt words for inputting the large language model can be obtained based on the target data, the analysis requirement information and the preset built-in static data.
[0066] In the embodiments of this specification, in order to ensure the richness of the prompt words, enable the large language model to better understand the user's analysis demand information, and generate a chart that meets the user's analysis needs, it is also possible to extract features from the target data and use the extracted data features to obtain prompt words. The chart generation method may also include: Performing feature extraction on the target data to obtain data features of the target data; The obtaining of prompt words for inputting a large language model based on the target data, the analysis requirement information and the preset built-in static data may specifically include: Based on the target data, data features of the target data, the analysis requirement information and preset built-in static data, prompt words for inputting into a large language model are obtained.
[0067] Among them, feature extraction of target data can be performed using rule extraction technology or data-driven methods.
[0068] The extracted data features may include at least one of statistical features, category features, time series features, frequency domain features, dimensional features, and discrete features.
[0069] Among them, statistical features can be features used to describe and summarize the basic attributes of the target data. The basic attributes can represent the total value, mean, median, and variance of the target data, etc.; category features can be features that represent the category or grouping of the target data. For example, the category features of the target data can be binary features, such as "male" and "female", "yes" and "no", etc.; they can also be unordered features, such as "Beijing", "Shanghai", "New York", etc.; they can also be ordered features, such as "excellent", "good", "medium", "poor", etc.; time series features can be features that represent whether the target data changes over time. For example, if the target data is the sales data of a company at different times, the time series features of the target data can be features that represent that the target data changes over time; for example, if the target data is the number of students in each class in a school, the time series features of the target data can be features that represent that the target data does not change over time, etc.; frequency domain features can be features extracted from the target data by frequency domain analysis methods, and frequency domain features can be features that represent the frequency of the target data; dimension features can be features that represent the dimension of the target data. For example, if the target data is one-dimensional data, such as a single-dimensional word, then the dimensional feature of the target data can be one-dimensional; for example, if the target data is two-dimensional data, such as "height" and "weight", then the dimensional feature of the target data can be two-dimensional, etc.; discrete features can be features that represent the degree of discreteness of the target data. If the discrete feature is discrete, it can indicate that the target data is discrete data. If the discrete feature is continuous, it can indicate that the target data is continuous data, and so on.
[0070] In the embodiments of the present specification, the preset built-in static data may include data in text form for representing chart generation rules. The text form data of the chart generation rules may include chart type description data; the chart type description data is used to describe the chart types that can be used by the preset analysis requirement type information; any of the preset analysis requirement type information may use one or more chart types.
[0071] The preset analysis requirement type information includes at least one of data comparison analysis, data trend analysis, data distribution analysis, data correlation analysis, data proportion analysis, data structure analysis, data outlier analysis and data clustering analysis; the chart types include at least one of bar charts, bar charts, line charts, histograms, scatter plots, bubble charts, pie charts, heat maps, radar charts, word clouds, Sankey charts, area charts, waterfall charts, funnel charts, dashboard charts, Gantt charts, tree charts, sunburst charts, chord charts, heat maps, K-line charts, box plots, parallel coordinate charts, tree charts and cluster charts.
[0072] For example, for data comparison analysis in the preset analysis requirement type information, at least one chart type among bar charts, column charts, line charts, radar charts and word clouds can be used; for data trend analysis, at least one chart type among line charts, area charts, scatter charts, Sankey charts and waterfall charts can be used; for data distribution analysis, at least one chart type among scatter charts, histograms, funnel charts and bar charts can be used; for data proportion analysis, at least one chart type among pie charts, bar charts and dashboard charts can be used; for data structure analysis, at least one chart type among funnel charts, Gantt charts, tree charts and sunburst charts can be used; for data correlation analysis, at least one chart type among scatter charts, bubble charts and chord charts can be used; for data outlier analysis, at least one chart type among heat maps, K-line charts and box charts can be used; for data clustering analysis, at least one chart type among parallel coordinates charts, tree charts and cluster charts can be used.
[0073] The large language model may determine the chart type corresponding to the user's analysis requirement information based on the chart types that can be adopted by the preset analysis requirement type information described in the chart type description data.
[0074] For example, if the type of analysis requirement information of the user is data trend analysis, then the chart type to be used may be determined to be at least one of a line chart, an area chart, a scatter chart, a Sankey chart, and a waterfall chart. For example, a chart type may be randomly determined from a line chart, an area chart, a scatter chart, a Sankey chart, and a waterfall chart.
[0075] Furthermore, the chart type correspondence relationship description data in the preset built-in static data is also used to describe the chart type that can be used by the data feature type of the preset target data; the chart type that can be used by the data feature type of the preset target data is a chart type among the multiple chart types that can be used by the preset analysis requirement type information; The data feature type of the preset target data includes at least one of statistical features, category features, time series features, frequency domain features, dimensional features and discrete features.
[0076] The large language model can further determine the chart type corresponding to the user's analysis requirement information from a plurality of chart types determined based on the chart types that can be adopted for the data feature type of the preset target data described in the chart type description data, and from the chart types that can be adopted based on the preset analysis requirement type information described in the chart type description data.
[0077] For example, the multiple chart types that can be used based on the preset analysis requirement type information described in the chart type description data are bar charts, column charts, line charts, radar charts and word clouds. The large language model can further determine the chart type from the bar charts, column charts, line charts, radar charts or word clouds.
[0078] Continuing with the above example, if the data dimension feature of the preset target data is one-dimensional, the further determined chart type may be a word cloud; if the data dimension feature of the preset target data is two-dimensional, the further determined chart type may be a bar chart, a column chart or a line chart; if the data dimension feature of the preset target data is three-dimensional or above, the further determined chart type may be a radar chart.
[0079] Among them, for the further determined bar chart, column chart and line chart, if the discrete characteristics of the preset target data are discrete, the further determined chart type can be a bar chart or a column chart; further, if the number of characters represented by the category name in the statistical characteristics of the preset target data is large, the chart type determined from the bar chart and the column chart is a bar chart; if the number of characters represented by the category name in the statistical characteristics of the preset target data is small, the chart type determined from the bar chart and the column chart is a column chart; if the discrete characteristics of the preset target data are continuous, the chart type determined from the bar chart, the column chart and the line chart is a line chart.
[0080] In the embodiment of the present specification, the textual data of the chart generation rule may also include chart coordinate axis scale precision description data; The chart coordinate axis scale accuracy description data is used to describe the preset relationship between the distribution density of data in the preset target data and the scale accuracy of the chart coordinate axis; the preset relationship indicates that the distribution density of the data is negatively correlated with the accuracy value of the scale accuracy of the chart coordinate axis corresponding to the data.
[0081] For example, the preset target data includes data of a first distribution density and data of a second distribution density, the data of the first distribution density corresponds to a first scale precision in the chart coordinate axis, and the data of the second distribution density corresponds to a second scale precision in the chart coordinate axis; in this preset corresponding relationship, if the first distribution density is greater than the second distribution density, the precision value corresponding to the first scale precision is less than the precision value corresponding to the second scale precision.
[0082] For data with high distribution density, you can set the scale precision with a smaller precision value. In this way, the display effect of data with high distribution density can be improved; for data with low distribution density, you can set the scale precision with a larger precision value to avoid the situation where there is no data in the coordinate interval, thus improving the use efficiency of the chart coordinate axis and the data display effect.
[0083] In the embodiments of the present specification, a prompt word template can be used to obtain prompt words for inputting a large language model. Optionally, obtaining prompt words for inputting a large language model based on the target data, the data features of the target data, the analysis requirement information, and the preset built-in static data may specifically include: According to the prompt word template, the target data, the data features of the target data, the analysis requirement information and the preset built-in static data are pieced together to obtain the prompt words for inputting into the large language model.
[0084] Figure 3 A schematic diagram of a prompt word template provided in an embodiment of this specification. Figure 3 As shown, the template includes preset built-in static data A and fillable area B.
[0085] Among them, the preset built-in static data A may include data in text form representing chart generation rules. Furthermore, the data in text form representing chart generation rules may include basic information A1, chart knowledge base A2, and chart drawing requirements A3, etc. Basic information A1 may include information about the role played, information about the ability of the role played, and format information of the expected output data, etc. For example, the role played information may be "you are a chart generation assistant", the role played ability information may be "can intelligently generate appropriate chart configuration information based on the user's analysis requirements for the target data, at least part of the target data, and the data characteristics of the target data, etc.", and the format information of the expected output data may be "the configuration information of the generated chart is output in a valid and standardized json format." The chart knowledge base A2 may include data describing the classification of charts, such as circular charts may include pie charts, radar charts, etc., and square charts may include tree maps, heat maps, etc. Chart drawing requirements A3 may include data describing the requirements for drawing the coordinate axes of the chart, such as "the coordinates of the x-axis and y-axis can only be filled in with one attribute name in the data, and multiple cannot be filled in." It can be understood that Figure 3 The contents of the chart knowledge base A2 and the chart drawing requirements A3 are merely exemplary. In actual applications, the chart knowledge base A2 and the chart drawing requirements A3 may contain more contents, such as chart type description data and chart coordinate axis scale precision description data, etc.
[0086] The fillable area B can be used to fill in the user's analysis requirement information for the target data, the target data, and the data features of the target data. For example, after the server obtains the analysis requirement information for the target data, the target data, and the data features of the target data, it can fill in the analysis requirement information for the target data, the target data, and the data features of the target data in the fillable area B. Alternatively, the user can also fill in the analysis requirement information for the target data in the fillable area B, and after the server obtains the target data, it extracts the features of the target data to obtain the data features of the target data, and the server can fill in the target data and the data features of the target data in the fillable area B; alternatively, the user can also fill in the analysis requirement information for the target data and the target data in the fillable area B, and the server extracts the features of the target data to obtain the data features of the target data, and the server can fill in the data features of the target data in the fillable area B. It can be understood that if the data volume of the target data is greater than or equal to the preset data volume threshold, the server can obtain at least part of the data of the target data based on the target data, and fill in at least part of the data of the target data in the fillable area B.
[0087] In order to generate a chart that meets the user's analysis needs, the preset built-in static data in the embodiments of this specification may also include positive sample data. The positive sample data may include the first prompt word sample and the configuration information of the chart that can be applied to the first prompt word sample. The positive sample data can assist the large language model to better understand the context and context of the conversation, thereby outputting the configuration information of the chart that meets the user's analysis needs.
[0088] Furthermore, the preset built-in static data may also include negative sample data. The negative sample data may include the second prompt word sample and the configuration information of the chart that is not applicable to the second prompt word sample. In this way, the large language model can be assisted to distinguish between correct output and incorrect output, thereby improving the accuracy and robustness of the large language model, so that the large language model can better understand the user's intention and generate output that is more in line with expectations.
[0089] In practical applications, since the internal structure and calculation process of the deep learning model are not interpretable for the relationship between input information and output information, the deep learning model is generally considered to be a black box model. This black box nature makes it impossible for users to understand the decision-making process of the deep learning model, causing certain troubles to users. In the embodiments of this specification, in order to improve the interpretability of the large language model, the preset built-in static data may also include explanatory information for the configuration information of the chart in the positive sample data. Among them, the explanatory information may be explanatory information in text form.
[0090] In this way, the large language model can output the configuration information of the chart for the target data and the explanation information of the configuration information of the chart for the target data. In the embodiment of this specification, the inputting of the prompt word into the large language model to obtain the configuration information of the chart for the target data output by the large language model can specifically include: The prompt word is input into the large language model to obtain configuration information of a chart for the target data and explanation information of the configuration information of the chart output by the large language model.
[0091] Based on the explanatory information of the configuration information of the chart output by the large language model, the user's understanding of the configuration information of the chart output by the large language model can be enhanced, thereby improving the user's trust and experience.
[0092] In the embodiment of the present specification, the configuration information of the chart output by the large language model may be information in a string format. Specifically, the information in the string format may be unstructured information.
[0093] Unstructured information is generally information with irregular data structure, non-standardized, and non-uniform format, which is not easy for chart rendering software to recognize. Therefore, in the embodiments of this specification, if the configuration information of the chart output by the large language model is unstructured information, the unstructured information can be converted into structured information by using regular matching and other methods, so as to facilitate the recognition of the chart rendering software and generate the chart.
[0094] In the embodiment of the present specification, after a chart for target data is generated, the chart may be displayed, for example, on a terminal, so as to facilitate the user to analyze the target data.
[0095] Figure 4 The following is a schematic diagram of an interface for generating a chart based on a chart generation method provided in an embodiment of this specification. Figure 4 As shown, the user inputs the analysis demand information in the terminal, and the server can obtain the analysis demand information input by the user, "Compare the visit traffic of the three channels A, B, and C in the past 7 days of the xxxx page by date"; the server can feedback the demand determination information to the terminal so that the user can determine the analysis demand information, such as displaying through the terminal "I will compare the visit traffic of the three channels A, B, and C in the past 7 days of the xxxx page by date"; the server can also display the found target data through the terminal so that the user can understand the target data. Among them, the target data may include different times / dates, different channels, and the number of independent visitors uv for the xxxx page. The server can generate the following based on the target data and the analysis demand information input by the user. Figure 4 The bar chart shown in is then displayed to the customer through the terminal.
[0096] Figure 5 The following is a schematic diagram of an interface for generating a chart based on a chart generation method provided in an embodiment of this specification. Figure 5 As shown, the user inputs the analysis demand information in the terminal, and the server can obtain the analysis demand information input by the user, "query the traffic trend of PAGE1 and PAGE2 pages in the past 14 days"; the server can feedback the demand determination information to the terminal so that the user can determine the analysis demand information, such as displaying through the terminal "I will query the traffic trend of PAGE1 and PAGE2 pages in the past 14 days"; the server can also display the found target data through the terminal so that the user can understand the target data. Among them, the target data may include different time / date, different channels, and the number of independent visitors uv for PAGE1 and PAGE2 pages. The server can generate the following based on the target data and the analysis demand information input by the user: Figure 5 The line chart shown in the figure is then displayed to the customer through the terminal.
[0097] Furthermore, after generating a chart for the target data, the explanation information of the configuration information of the chart can also be displayed. After generating a chart for the target data using the chart rendering software, the embodiment of this specification can also include: Displays explanatory information about the configuration information of the chart.
[0098] The server may display the explanation information of the configuration information of the chart through the terminal. Specifically, the server may send the explanation information of the configuration information of the chart to the terminal, and the terminal displays the explanation information of the configuration information of the chart.
[0099] Displaying the explanatory information of the configuration information of the chart for the target data output by the large language model can facilitate users to understand the displayed chart and improve user trust and experience.
[0100] Figure 6 The following is a flow chart of a method for generating a chart provided in an embodiment of the present specification. Figure 6 As shown, the method may include the following steps: Step 602: Start executing the chart generation method.
[0101] The terminal can obtain the user's preset operation, trigger the chart generation process, send a chart generation request to the server, and the server can start executing the chart generation method. Among them, the user's preset operation can be to enter the analysis requirement information in an application page such as a web page, terminal application, applet, H5 page, etc., or to enter the analysis requirement information in a question-and-answer type application.
[0102] Step 604: Acquire the analysis requirement information input by the user and the target data to be analyzed.
[0103] The user may input analysis requirement information and target data in the terminal, and the terminal sends the analysis requirement information and target data input by the user to the server, and the server obtains the analysis requirement information and target data.
[0104] In actual applications, users can also enter only the analysis requirement information in the terminal, as mentioned above Figure 4 "Compare the traffic from kabao_zfb_fqk4, choujiangpush, and JSBANKDX channels in the previous 7 days of the co-branded card page by date", or the above Figure 5 In "Query the traffic trend of the co-branded card application page and position page in the past 14 days", the terminal sends the analysis demand information entered by the user to the server, and the server obtains the analysis demand information; the server can also query the target data according to the user's analysis demand information and obtain the target data.
[0105] Step 606: Sample the target data to obtain at least part of the target data.
[0106] Step 608: Extract features of the target data to obtain data features of the target data.
[0107] Step 610: Combine the analysis requirement information, at least part of the target data, the preset built-in static data, and the data features of the target data to obtain a combined prompt word.
[0108] The preset built-in static data may include text data representing chart generation rules, positive samples, negative samples, and explanation information, etc. The explanation information may be explanation information for configuration information of the chart in the positive sample.
[0109] Step 612: Input the combined prompt words into the large language model.
[0110] Step 614: Obtain configuration information of a graph for target data output by the large language model and explanation information of the configuration information of the graph.
[0111] Step 616: Generate a chart for the target data using chart rendering software according to the configuration information of the chart.
[0112] Step 618: Result display. For example, the explanation information for the configuration information of the chart obtained in step 614 and the chart for the target data generated in step 616 may be visually displayed.
[0113] The server may send explanation information for the configuration information of the chart and the chart for the target data to the terminal, and the terminal displays the explanation information and the chart.
[0114] Step 620: End the current chart generation process.
[0115] It should be understood that the order of some steps in the methods described in one or more embodiments of this specification can be interchanged according to actual needs, or some steps can be omitted or deleted.
[0116] Based on the same idea, the embodiments of this specification also provide a device corresponding to the above method.
[0117] Figure 7 The embodiments of this specification provide corresponding to Figure 1 A schematic diagram of the structure of a chart generating device. Figure 7 As shown, the apparatus may include: The information acquisition module 702 is used to obtain the user's analysis requirement information for the target data; A prompt word generation module 704, used to obtain prompt words for inputting into a large language model based on the target data, the analysis requirement information and preset built-in static data; the preset built-in static data includes data in a text form for representing a chart generation rule; A prompt word input module 706, used to input the prompt word into the large language model to obtain the configuration information of the chart for the target data output by the large language model; The chart generation module 708 is used to generate a chart for the target data using chart rendering software according to the configuration information of the chart.
[0118] Optionally, the device may further include: A feature extraction module, used to extract features from the target data to obtain data features of the target data; The prompt word acquisition module 704 is specifically used for: Based on the target data, data features of the target data, the analysis requirement information and preset built-in static data, prompt words for inputting into a large language model are obtained.
[0119] Optionally, the prompt word acquisition module 704 is specifically used to: According to the prompt word template, the target data, the data features of the target data, the analysis requirement information and the preset built-in static data are pieced together to obtain the prompt words for inputting into the large language model.
[0120] Optionally, the device may further include: A judgment module, used to judge whether the data volume of the target data is greater than or equal to a preset data volume threshold, and obtain a judgment result; a sampling module, configured to sample the target data to obtain at least part of the target data if the judgment result indicates that the data volume of the target data is greater than or equal to the preset data volume threshold; The prompt word acquisition module 704 is specifically used for: Based on at least part of the target data, the analysis requirement information and preset built-in static data, prompt words for inputting into a large language model are obtained.
[0121] Optionally, the prompt word acquisition module 704 is specifically used to: If the judgment result indicates that the data volume of the target data is less than the preset data volume threshold, a prompt word for inputting a large language model is obtained based on the target data, the analysis requirement information and preset built-in static data.
[0122] Optionally, the textual data of the chart generation rule includes chart type description data; The chart type description data is used to describe a first chart type that can be used by the preset analysis requirement type information; any of the preset analysis requirement type information can use one or more chart types; The preset analysis requirement type information includes at least one of data comparison analysis, data trend analysis, data distribution analysis, data correlation analysis, data proportion analysis, data structure analysis, data outlier analysis and data clustering analysis; the chart types include at least one of bar charts, bar charts, line charts, histograms, scatter plots, bubble charts, pie charts, heat maps, radar charts, word clouds, Sankey charts, area charts, waterfall charts, funnel charts, dashboard charts, Gantt charts, tree charts, sunburst charts, chord charts, heat maps, K-line charts, box plots, parallel coordinate charts, tree charts and cluster charts.
[0123] Optionally, the chart type description data is further used to describe the chart type that can be used by the data feature type of the preset target data; the chart type that can be used by the data feature type of the preset target data is a chart type among the multiple chart types that can be used by the preset analysis requirement type information; The data feature type of the preset target data includes at least one of statistical features, category features, time series features, frequency domain features, dimensional features and discrete features.
[0124] Optionally, the textual data of the chart generation rule includes chart coordinate axis scale precision description data; The chart coordinate axis scale accuracy description data is used to describe the preset relationship between the distribution density of data in the preset target data and the scale accuracy of the chart coordinate axis; the preset relationship indicates that the distribution density of the data is negatively correlated with the accuracy value of the scale accuracy of the chart coordinate axis corresponding to the data.
[0125] Optionally, the preset built-in static data includes positive sample data.
[0126] Optionally, the preset built-in static data includes negative sample data.
[0127] Optionally, the preset built-in static data further includes explanation information for configuration information of the chart in the positive sample data.
[0128] Optionally, the prompt word input module 706 is specifically used to: Inputting the prompt word into the large language model, obtaining configuration information of a chart for the target data and explanation information of the configuration information of the chart output by the large language model; The device may also include: The display module is used to display the explanation information of the configuration information of the chart.
[0129] Based on the same idea, the embodiments of this specification also provide a device corresponding to the above method.
[0130] Figure 8 The embodiments of this specification provide corresponding to Figure 1 A schematic diagram of the structure of a chart generating device. Figure 8 As shown, the device 800 may include: at least one processor 810; and, A memory 830 in communication with the at least one processor 810; wherein, The memory 830 stores instructions 820 that can be executed by the at least one processor 810. The instructions 820 are executed by the at least one processor 810 to enable the at least one processor 810 to: Obtain the user's analysis requirements for target data; Based on the target data, the analysis requirement information and preset built-in static data, a prompt word for inputting into a large language model is obtained; the preset built-in static data includes data in a text form for representing a chart generation rule; Inputting the prompt word into the large language model to obtain configuration information of a chart output by the large language model for the target data; According to the configuration information of the chart, a chart for the target data is generated using chart rendering software.
[0131] Based on the same idea, the embodiment of this specification also provides a computer-readable storage medium corresponding to the above method, on which computer instructions are stored, and when the computer instructions are executed by a processor, the steps of the above chart generation method are implemented.
[0132] Each embodiment in this specification is described in a progressive manner. The same or similar parts between the embodiments can be referred to each other. Each embodiment focuses on the differences from other embodiments. Figure 8 As for the chart generating device shown, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0133] In the 1990s, it was very clear whether the improvement of a technology was hardware improvement (for example, improvement of the circuit structure of diodes, transistors, switches, etc.) or software improvement (improvement of the method flow). However, with the development of technology, many improvements of the method flow today can be regarded as direct improvements of the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that the improvement of a method flow cannot be implemented with a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming themselves, without having to ask chip manufacturers to design and make dedicated integrated circuit chips. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one kind of HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.
[0134] The controller can be implemented in any suitable manner, for example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) executable by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that in addition to implementing the controller in a purely computer-readable program code manner, the controller can be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, such a controller can be considered as a hardware component, and the devices for implementing various functions included therein can also be regarded as structures within the hardware component. Or even, the devices for implementing various functions can be regarded as both software modules for implementing the method and structures within the hardware component.
[0135] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0136] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing the present application, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0137] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0138] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0139] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0140] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0141] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0142] Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
[0143] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined in this article, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0144] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0145] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0146] The present application may 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. The present application may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0147] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
Claims
1. A method for generating a chart, comprising: Obtain the user's analysis requirements for target data; Based on the target data, the analysis requirement information and preset built-in static data, a prompt word for inputting into a large language model is obtained; the preset built-in static data includes data in a text form for representing a chart generation rule; Inputting the prompt word into the large language model to obtain configuration information of a chart output by the large language model for the target data; According to the configuration information of the chart, a chart for the target data is generated using chart rendering software.
2. The method of claim 1, further comprising: Performing feature extraction on the target data to obtain data features of the target data; The step of obtaining prompt words for inputting a large language model based on the target data, the analysis requirement information and the preset built-in static data specifically includes: Based on the target data, data features of the target data, the analysis requirement information and preset built-in static data, prompt words for inputting into a large language model are obtained.
3. The method according to claim 2, wherein obtaining the prompt words for inputting the large language model based on the target data, the data features of the target data, the analysis requirement information and the preset built-in static data specifically comprises: According to the prompt word template, the target data, the data features of the target data, the analysis requirement information and the preset built-in static data are pieced together to obtain the prompt words for inputting into the large language model.
4. The method of claim 1, further comprising: Determine whether the data volume of the target data is greater than or equal to a preset data volume threshold, and obtain a determination result; If the judgment result indicates that the data volume of the target data is greater than or equal to the preset data volume threshold, sampling the target data to obtain at least part of the target data; The step of obtaining a prompt word for inputting a large language model based on the target data, the analysis requirement information and the preset built-in static data specifically includes: Based on at least part of the target data, the analysis requirement information and preset built-in static data, prompt words for inputting into a large language model are obtained.
5. The method of claim 4, further comprising: If the judgment result indicates that the data volume of the target data is less than the preset data volume threshold, a prompt word for inputting a large language model is obtained based on the target data, the analysis requirement information and preset built-in static data.
6. The method of claim 1, wherein the textual data of the chart generation rule comprises chart type description data; The chart type description data is used to describe the chart types that can be used by the preset analysis requirement type information; any of the preset analysis requirement type information can use one or more chart types; The preset analysis requirement type information includes at least one of data comparison analysis, data trend analysis, data distribution analysis, data correlation analysis, data proportion analysis, data structure analysis, data outlier analysis and data clustering analysis; the chart types include at least one of bar charts, bar charts, line charts, histograms, scatter plots, bubble charts, pie charts, heat maps, radar charts, word clouds, Sankey charts, area charts, waterfall charts, funnel charts, dashboard charts, Gantt charts, tree charts, sunburst charts, chord charts, heat maps, K-line charts, box plots, parallel coordinate charts, tree charts and cluster charts.
7. The method according to claim 6, wherein the chart type description data is further used to describe the chart type that can be used for the data feature type of the preset target data; the chart type that can be used for the data feature type of the preset target data is a chart type among the multiple chart types that can be used for the preset analysis requirement type information; The data feature type of the preset target data includes at least one of statistical features, category features, time series features, frequency domain features, dimensional features and discrete features.
8. The method according to claim 1, wherein the textual data of the chart generation rule comprises chart coordinate axis scale precision description data; The chart coordinate axis scale accuracy description data is used to describe the preset relationship between the distribution density of data in the preset target data and the scale accuracy of the chart coordinate axis; the preset relationship indicates that the distribution density of the data is negatively correlated with the accuracy value of the scale accuracy of the chart coordinate axis corresponding to the data.
9. The method according to claim 1, wherein the preset built-in static data comprises positive sample data.
10. The method according to claim 1, wherein the preset built-in static data comprises negative sample data. 11 . The method according to claim 9 , wherein the preset built-in static data further comprises explanation information of configuration information of the chart in the positive sample data.
12. The method according to claim 11, wherein inputting the prompt word into the large language model to obtain configuration information of a chart for the target data output by the large language model specifically comprises: Inputting the prompt word into the large language model, obtaining configuration information of a chart for the target data and explanation information of the configuration information of the chart output by the large language model; After generating a chart for the target data using chart rendering software, the method further includes: Displays explanatory information about the configuration information of the chart.
13. A chart generating device, comprising: The information acquisition module is used to obtain the user's analysis requirement information for the target data; A prompt word generation module, used to obtain prompt words for inputting into a large language model based on the target data, the analysis requirement information and preset built-in static data; the preset built-in static data includes data in a text form for representing a chart generation rule; A prompt word input module, used for inputting the prompt word into the large language model to obtain configuration information of a chart for the target data output by the large language model; The chart generation module is used to generate a chart for the target data using chart rendering software according to the configuration information of the chart.
14. A diagram generating device, comprising: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to: Obtain the user's analysis requirements for target data; Based on the target data, the analysis requirement information and preset built-in static data, a prompt word for inputting into a large language model is obtained; the preset built-in static data includes data in a text form for representing a chart generation rule; Inputting the prompt word into the large language model to obtain configuration information of a chart output by the large language model for the target data; According to the configuration information of the chart, a chart for the target data is generated using chart rendering software. 15 . A computer-readable medium having computer-readable instructions stored thereon, wherein the computer-readable instructions can be executed by a processor to implement the diagram generating method according to any one of claims 1 to 12.
Citation Information
Cited By
Chart generation method, multi-modal data platform, computing equipment and computer readable storage medium
CN119903215A
Big language model assisted literature visual analysis method and system
CN120179817A
Data display method and device based on large language model, medium and equipment
CN120688455A
Table editing processing method and device, electronic equipment and storage medium
CN120805873A
Chart analysis method and device based on large model, medium, equipment and product
CN121008791A