A method, device, equipment and readable storage medium for generating information graph
By obtaining a summary summary of the data file and selecting the target template, using a large language model to generate data facts and generate infographics, the problems of high cost and low efficiency in the existing technology are solved, and efficient and beautiful infographic generation are achieved.
Patent Information
- Application Number
- CN202411954877.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2044-12-27
AI Technical Summary
The existing infographic generation solutions have high requirements for users' professional capabilities, high technical complexity and barriers, resulting in high cost and low efficiency of infographic generation.
By obtaining a summary summary of the data file, select the target template from the pre-constructed infographic template library, use the pre-trained large language model to generate data facts, and generate a visual chart based on the data facts, and fill in the target template to generate an infographic.
It reduces the professional capability requirements and technical complexity of infographic generation, improves the efficiency and quality of infographic generation, and enables the infographic to fully display data with an aesthetic layout structure.
Smart Images

Figure CN119378524B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data visualization technology, and in particular to an information graph generation method, device, equipment and readable storage medium. Background Art
[0002] In the era of big data, how to effectively utilize massive data has become a new hot research field. How to effectively express the collected massive complex data in a graphical way after processing and analysis, so as to accurately, efficiently, concisely and comprehensively convey data information to readers is the research content of data visualization, and it is also one of the important challenges in the era of big data. Among them, infographics are a visual tool that conveys information through a combination of images, data visualization (including different types of charts and graphs, such as pie charts and bar charts, etc.) and concise text. It aims to present complex data relationships in an easy-to-understand and attractive way. Compared with annotated charts, infographics are more intuitive, interesting and profound. They do not rely on a lot of text explanations and can allow the audience to quickly grasp the key points.
[0003] Currently, creating infographics usually requires users to have professional capabilities in both data analysis and graphic design. In other words, users need to explore data and find key data facts, while also designing beautiful and eye-catching layouts and styles to combine data facts according to a certain narrative logic.
[0004] It can be seen that the current infographic generation solutions have high requirements on users' professional capabilities, technical complexity and barriers, which greatly increases the cost of infographic generation and reduces efficiency.
[0005] Based on this, this specification provides a method for generating an information graph. Summary of the invention
[0006] This specification provides an information graph generation method, device, equipment and readable storage medium to partially solve the above-mentioned problems existing in the prior art.
[0007] This manual adopts the following technical solutions:
[0008] This specification provides a method for generating an information graph, including:
[0009] obtaining a data file, and extracting a summary abstract from the data file;
[0010] Choose a targeted template from a library of pre-built infographic templates;
[0011] According to the summary, the data file and the target template, a data fact is obtained by using a pre-trained large language model;
[0012] A visualization chart is generated according to the data facts, and the generated visualization chart is filled into the target template to obtain a target information chart.
[0013] Optionally, extracting a summary from the data file specifically includes:
[0014] Inputting the data file and the first prompt word into a pre-trained large language model to obtain a first description of the data file as a whole and a second description of each column of data included in the data file, wherein the second description at least includes a semantic type and a semantic description of each column of data;
[0015] Through the operation input by the user, traverse each column of data contained in the data file, and identify the data type and data characteristics of each column of data in the columns of data;
[0016] A summary abstract is determined according to the first description, the second description of each of the columns of data, and the data type and data feature of each of the columns of data.
[0017] Optionally, a pre-built infographic template library is provided, specifically including:
[0018] Obtain each candidate information graph in advance;
[0019] Acquire reference cases, wherein the reference cases at least include reference style types, reference application scenarios, reference visual styles, and reference color formats;
[0020] For each candidate information graph, based on the candidate information graph and the reference case, the candidate information graph is classified by a pre-trained large language model to obtain a style type, application scenario, visual style, and color format corresponding to the candidate information graph;
[0021] Determine, through user input, each sub-element included in the candidate information graph and attribute information of each sub-element, and determine the layout structure of the candidate information graph according to the attribute information of each sub-element; the sub-element includes a picture element and a text element, and the attribute information includes at least the position and size of the sub-element;
[0022] According to the style type, application scenario, visual style and color format corresponding to the candidate information graph, as well as the layout structure of the candidate information graph, an infographic template corresponding to the candidate information graph is generated and stored in an infographic template library.
[0023] Optionally, according to the summary, the data file and the target template, a data fact is obtained by using a pre-trained large language model, specifically including:
[0024] Determining weights corresponding to the summary, the data file, and the target template, respectively;
[0025] Determine the target number of data facts to be generated;
[0026] The target quantity, the summary, the data file and the target template, as well as the weights corresponding to the summary, the data file and the target template are taken as input and input into a pre-trained large language model to obtain data facts of the target quantity; wherein the data facts are generated by the pre-trained large language model according to the weights corresponding to the summary, the data file and the target template, based on the layout structure of the summary, the data file and the target template.
[0027] Optionally, generating a visualization chart according to the data facts specifically includes:
[0028] Obtaining various visualization code templates, wherein different codes obtained by using different visualization code templates are respectively used to draw visualization charts based on different visualization tool libraries;
[0029] Obtain a second prompt word, where the second prompt word is used to guide the pre-trained large language model to generate a code for drawing a visualization chart based on a visualization code template and data facts;
[0030] Inputting each visualization code template, the data fact and the second prompt word into a pre-trained large language model to obtain a target code for drawing a visualization chart corresponding to the data fact;
[0031] According to the target code, a visualization chart corresponding to the data fact is generated.
[0032] Optionally, the method further comprises:
[0033] Receive chart modification instructions input by users;
[0034] According to the diagram modification instruction and the summary summary, the target code is modified by using a pre-trained large language model to obtain a modified code;
[0035] The visual chart corresponding to the data fact is regenerated according to the modified code.
[0036] Optionally, the target template includes various sub-elements, and the target information graph is obtained by filling the generated visualization graph into the sub-elements included in the target template;
[0037] The method further comprises:
[0038] In response to a user's operation on a sub-element in the target information graph, displaying an information graph editing interface, wherein the information graph editing interface at least includes a chart modification control for modifying a visual chart in the target information graph;
[0039] In response to a user's operation on the chart modification control, determining a modified visual chart;
[0040] Re-target the infographic based on the revised visualization.
[0041] Optionally, the method further comprises:
[0042] determining a target device for displaying the target infographic;
[0043] According to the target device, adjusting the position and size of the visualization chart in the target information map to obtain an adjusted target information map adapted to the target device;
[0044] Uploading the adjusted target information graph to the server so that the server stores the adjusted target information graph, and generates and returns a preview link corresponding to the adjusted target information graph;
[0045] A preview link corresponding to the adjusted target information graph returned by the server is received, so as to view the adjusted target information graph through the preview link.
[0046] Optionally, the method further comprises:
[0047] A software development kit for pre-accessing multiple different pre-trained large language models;
[0048] Install software development kits of multiple pre-trained large language models respectively, and determine attribute information corresponding to the multiple pre-trained large language models respectively, wherein the attribute information includes at least a model identifier, an interface parameter, and an interface key;
[0049] A model unified calling interface is constructed according to the attribute information respectively corresponding to the multiple pre-trained large language models, so as to select and call at least one pre-trained large language model among the multiple pre-trained large language models through the model unified calling interface.
[0050] This specification provides an information graph generation device, including:
[0051] A summary determination module, used to obtain a data file and extract a summary summary from the data file;
[0052] A selection module for selecting a target template from a library of pre-built infographic templates;
[0053] A data fact generation module, used to obtain data facts according to the summary summary, the data file and the target template through a pre-trained large language model;
[0054] The target information graph generation module is used to generate a visual graph according to the data facts, and fill the generated visual graph into the target template to obtain a target information graph.
[0055] This specification provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned information graph generation method is implemented.
[0056] This specification provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned information graph generation method when executing the program.
[0057] At least one of the above technical solutions adopted in this specification can achieve the following beneficial effects:
[0058] In the infographic generation method provided in this specification, a summary abstract is extracted from the acquired data file, a target template is selected from a pre-built infographic template library, data facts are obtained based on the summary abstract, the data file and the target template, a visualization chart is generated based on the data facts, and the visualization chart is filled into the target template to obtain a target infographic. It can be seen that based on the summary abstract extracted from the data file and the data file itself, the data facts adapted to the target template generated by the large language model can objectively describe the data file, and then, the infographic generated based on the data facts can fully display the data file with an aesthetically pleasing layout structure, and can be directly applied to specific professional fields, while lowering the threshold for infographic generation and improving efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] The drawings described herein are used to provide a further understanding of this specification and constitute a part of this specification. The illustrative embodiments and descriptions of this specification are used to explain this specification and do not constitute an improper limitation on this specification. In the drawings:
[0060] Figure 1 A schematic diagram of a process for generating an information graph in this specification;
[0061] Figure 2 A schematic diagram of a process for generating an information graph in this specification;
[0062] Figure 3 A schematic diagram of a process for generating an information graph in this specification;
[0063] Figure 4A schematic diagram of a process for generating an information graph in this specification;
[0064] Figure 5 A schematic diagram of a process for generating an information graph in this specification;
[0065] Figure 6 A schematic diagram of an information graph generating device provided in this specification;
[0066] Figure 7 The corresponding Figure 1 Schematic diagram of electronic equipment. DETAILED DESCRIPTION
[0067] In order to make the purpose, technical solutions and advantages of this specification more clear, the technical solutions 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 them. 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 this specification.
[0068] In addition, it should be noted that all actions of acquiring signals, information or data in this manual are performed in compliance with the relevant local data protection laws and policies and with the authorization given by the owner of the corresponding device.
[0069] It should be noted that, in the absence of conflict, the features in the following embodiments and implementations may be combined with each other.
[0070] As mentioned above, the current annotated charts still rely on a lot of text explanations and are not intuitive. Moreover, the annotated charts are simply a simple splicing of multiple visualization charts, and do not consider the layout structure and typesetting of the data story, lacking in interest and aesthetics. Although annotated charts are helpful to users in specific scenarios (such as data analysts), they are less helpful to users in other scenarios such as journalists and science teachers. They cannot be used directly and still need to be re-formatted and designed in new styles with the help of professional designers, which greatly limits the use scenarios of annotated charts.
[0071] Using infographics to represent data stories can not only fully display the contextual relationship of the data, but also have a beautiful layout structure (such as timeline structure, map structure, human skeletal structure, etc.). Automatically generated infographics can be directly applied to professional fields such as news, popular science education, data analysis, etc., and have a wide range of application scenarios.
[0072] Based on this, this specification provides a method for generating an information graph.
[0073] The technical solutions provided by the embodiments of this specification are described in detail below in conjunction with the accompanying drawings.
[0074] Figure 1 A flowchart of an information graph generation method provided in this specification.
[0075] S100: Acquire a data file, and extract a summary abstract from the data file.
[0076] In the embodiments of this specification, a method for generating an information graph is provided, and the execution process of the method can be executed by an electronic device such as a server for generating an information graph. In addition, in the process of executing the method, for the pre-trained large language model involved, the electronic device for executing the model training of the aforementioned model and the electronic device for executing the method can be the same or different, and this specification does not limit this.
[0077] In this specification, a data file is a file that records business data in the form of numbers, text or other symbols. The business data can be the original information of a business activity and can come from any existing source such as questionnaires, sensor records, business logs, etc. This specification does not limit the application scenarios to which the data files belong and the specific business data they contain.
[0078] Depending on the application scenarios and technical fields, the business data recorded in the data files are different. For example, in the field of e-commerce, the data file can be a table file that records electronic transaction data, which can record data such as the name of the transaction goods, the unit price of the goods, the transaction amount, the identification of the two parties to the transaction, and the delivery information of the goods. For another example, in the field of medical technology, the data file can be a file that records disease spread data, which can record data such as the area where the case occurred, the patient's demographic information, health status, contact history and other basic information, the test results of the case and the treatment plan. Or, in the field of financial investment, the data file can be a file that records market activities and transaction behaviors, which can record financial investment product identification, opening price, closing price and other market data, transaction identification, transaction date, buying and selling direction, buying and selling price and other transaction record data.
[0079] Therefore, by processing and analyzing the business data recorded in the data file, objective, specific and valuable data facts can be obtained, and the data facts can be converted into visual information graphics, that is, the meaning expressed by the business data recorded in the data file can be presented to users with strong appeal and readability, thereby assisting users to better understand and apply the business data in the data file.
[0080] In this specification, a data file may be a text file (such as CSV, TXT), a spreadsheet (such as XLS, XLSX), a database file (such as SQL, MDB), a JSON file, or any other existing data file format. This specification does not limit the specific file format of the data file.
[0081] Afterwards, a summary abstract is extracted from the data file. The summary abstract is used to describe the key information in the business data recorded in the data file, and may include numerical information and text information. The summary abstract is intended to quickly convey the core content and important conclusions of the business data contained in the data file in a concise description. The summary abstract may include a data overview of the data file as a whole, such as the time range, sample size, main variables, etc. of the data. It may also include the core statistical indicators of the business data contained in the data file, so as to quickly convey the main features of the data. It may also include the local trends or patterns presented by each column of data or each row of data, as well as the local correlations between different columns and rows of data. Of course, according to different analysis and processing methods of the summary abstract, the content contained in the summary abstract varies, and this specification does not limit the type and quantity of information actually contained in the summary abstract.
[0082] For example, for a data file recording electronic transaction data, the summary abstract can be "In the first quarter, the platform's electronic transactions showed a steady growth trend. User activity increased significantly, especially mobile transactions became mainstream, reflecting the popular trend of mobile shopping. Electronic products continued to lead sales, showing consumers' strong interest in this category. Transactions were particularly frequent during the evening hours, making it a prime time to attract users. The first transaction conversion rate of new users has increased, indicating that the platform has made positive progress in acquiring and activating new users." The electronic transaction data contained herein show the overall growth trend of electronic transactions, as well as trends from multiple local perspectives, such as user activity, mobile shopping trends, best-selling product categories, peak transaction hours, and new user situations.
[0083] In this specification, the summary abstract extracted from the data file can be automatically generated by a pre-trained large language model, can be obtained by any type of existing data statistical analysis method, or can be obtained by manual processing, and this specification does not limit this.
[0084] Optionally, since the file formats of data files are different, when reading business data from a data file, the file format of the data file can be determined, and a content reading function can be selected based on the file format, and then the business data can be read from the data file based on the content reading function and applied in subsequent steps.
[0085] S102: Select a target template from a pre-built infographic template library.
[0086] Furthermore, a target template suitable for the data file can be selected from a pre-built infographic template library as one of the bases for generating a target infographic. The target template can be determined based on the selection operation input by the user, or it can be determined based on information such as the application scenario to which the data file belongs. Generally, one data file corresponds to the selection of a target template, but the number of selected target templates can be flexibly determined based on the specific situation of the data file and the actual needs of the user, that is, one or more target templates can be selected from the pre-built infographic template library, and this specification does not specifically limit the selection method and number of target templates.
[0087] In this specification, a plurality of different infographic templates are stored in the infographic template library. The infographic template contains a plurality of unfilled sub-elements. In subsequent steps, an infographic containing a chart can be obtained by filling the generated visual chart into the sub-elements. The position and size of each sub-element in the infographic template may be different, that is, the layout structure of different infographic templates is different. The sub-element may be any existing type of display element such as a picture element, a text element, etc. The application scenarios, style types and color types adopted by different infographic templates may be the same or different, and this specification does not limit this.
[0088] The infographic templates in the infographic template library may be manually constructed or generated based on acquired candidate infographics.
[0089] By selecting a target template from the infographic template library, combining the target template, data file and the summary obtained in the previous steps, and using this as a basis to generate data facts, and then generating a visualization chart, the obtained visualization chart can be directly filled into the target template to obtain a target infographic, thereby presenting the business data contained in the data file in a vivid, beautiful and objective manner, improving the visual expression ability of the target infographic, and making the target infographic directly applicable to specific professional scenarios and fields, thereby improving the generation efficiency and accuracy of the target infographic.
[0090] S104: Obtaining data facts according to the summary, the data file and the target template through a pre-trained large language model.
[0091] Specifically, in practical applications, the pre-trained large language model is trained based on the general pre-corpus contained in the general corpus as training samples. This pre-trained large language model has a strong in-context learning (ICL) capability. Without updating the parameters of the pre-trained large language model, only by inputting the prompt into the pre-trained large language model, the pre-trained large language model can complete the corresponding text generation task based on the examples and guidance contained in the prompt text. In each generation step, the pre-trained large language model predicts the next word or phrase based on the current context, the generated text, and the input prompt text. Repeat the generation steps to continuously generate text until the predetermined length is reached or a special terminator is encountered. Finally, these generated texts are spliced together to form the text output by the pre-trained large language model.
[0092] Thus, the data file itself, the summary abstract extracted from the data file and the selected target template are input into the pre-trained large language model. The model can generate data facts that conform to the layout structure of the target template based on the data file and the summary abstract. The number of the data facts can be one or more. In this specification, the data facts are specific, objective and verifiable opinions or conclusions extracted by the pre-trained large language model based on the data file itself and the summary abstract. The content described by the data facts can be any type of existing quantitative indicators or quantitative conclusions such as trends, relationships, proportions, quantities, etc. presented by the business data contained in the data file. Since the data facts are obtained by analyzing the data files and the summary abstracts, they have strong objectivity and verifiability.
[0093] For example, for a data file recording electronic transaction data, the data facts output by the pre-trained large language model can be "6pm to 9pm daily is the most frequent trading time period on the platform, accounting for about 30% of the total trading volume for the day" and "Sales of the electronic products category increased by 15% year-on-year in the first quarter of 2024, becoming the best-selling commodity category", thereby respectively reflecting the peak hours and popular commodity categories of electronic transactions.
[0094] By obtaining data facts through the pre-trained large language model, it can be ensured that the generated visualization charts and the final target information graphs are based on the business data in the actual data files, rather than assumptions. This improves the reliability and accuracy of the target information graphs and increases the credibility of the target information graphs when they are directly applied in specific fields.
[0095] On the other hand, a target template is introduced in the process of generating data facts, and the layout structure of the target template is used to guide the pre-trained large language model to generate data facts that conform to the layout structure. In this specification, the so-called data facts that conform to the layout structure of the target template refer to that the number of data facts is consistent with the number of sub-elements contained in the target template, and the pre-trained large language model can also correspond the generated data facts to the sub-elements in the target template, that is, determine the sub-elements corresponding to the data facts in the target template, so that in the subsequent steps, the visualization chart generated based on the data facts is filled in the corresponding sub-elements.
[0096] S106: Generate a visualization chart according to the data facts, and fill the generated visualization chart into the target template to obtain a target information chart.
[0097] Afterwards, a visualization chart is generated based on the data facts generated in the previous steps. Generally, one data fact corresponds to the generation of one visualization chart. Of course, depending on the actual application scenario and needs, one data fact may correspond to multiple visualization charts, or one visualization chart may be generated based on multiple data facts. This manual does not limit this.
[0098] The chart type of the visualization chart generated based on data facts can be any existing chart type, such as bar chart, line chart, pie chart, scatter plot, heat map, box plot, etc. When generating visualization charts, you can use existing visualization tools, such as Tableau, Power BI, R (ggplot2), etc., and select appropriate explanatory texts such as titles and labels, as well as color schemes, so that complex data and data facts can be intuitively displayed in a graphical way, allowing users to more quickly identify the trends presented by the data without having to manually delve into the original data files. In addition, compared with plain text, beautiful and well-designed visualization charts can better attract users' attention, enhance memory points, effectively convey key information to users, and reduce the possibility of misunderstandings.
[0099] Then, according to the sub-elements in the target template corresponding to the data facts output by the large language model pre-trained in the aforementioned step S104, the visualization chart generated according to the data facts is filled into the corresponding sub-elements to obtain the target information graph.
[0100] In addition, in addition to filling the generated visualization chart into the target template, you can also fill in the text-type sub-element with a text explanation of the visualization chart, so as to more accurately and quickly convey the information of the business data contained in the data file in the form of text and charts.
[0101] The application scenarios for the target infographic may depend on the source of the data file. The target infographic generated by the infographic generation method provided in this specification can be applied to specific knowledge-intensive fields such as education and training, marketing, government reports, project consulting, etc., especially scenarios where infographics are automatically generated from data reports, such as visualization of sales data, visualization of infectious disease spread data, visualization of financial market activity data, and visualization of human skeletons in case demonstrations.
[0102] In the infographic generation method provided in this specification, a summary abstract is extracted from the acquired data file, a target template is selected from a pre-built infographic template library, data facts are obtained based on the summary abstract, the data file and the target template, a visual chart is generated based on the data facts, and the visual chart is filled into the target template to obtain a target infographic.
[0103] It can be seen that based on the summary extracted from the data file and the data file itself, the data facts adapted to the target template are generated through a large language model, which can objectively describe the data file. Moreover, the infographic generated based on the data facts can fully display the data file with an aesthetically pleasing layout structure, and can be directly applied to specific professional fields, thereby lowering the threshold for infographic generation and improving efficiency.
[0104] In one or more embodiments of this specification, Figure 1 Step S100 shown in the figure extracts a summary from the data file, which can be implemented by the following implementation methods: Figure 2 As shown:
[0105] S200: Input the data file and the first prompt word into a pre-trained large language model to obtain a first description of the data file as a whole and a second description of each column of data contained in the data file, wherein the second description at least includes a semantic type and a semantic description of each column of data.
[0106] Specifically, firstly, a content reading function may be determined based on the file format of the data file, and then business data may be read from the data file based on the determined content reading function, and the business data may be used as input. Of course, the data file may also be directly used as input.
[0107] The first prompt word is used to guide the pre-trained large language model to play the role of a data analyst and analyze and process the data file, especially the business data contained in the data file. The analysis and processing method includes analyzing the data file as a whole and analyzing each column of business data contained in the data file. Thus, under the guidance of the first prompt word, the pre-trained large language model can output a first description for the data file as a whole and a second description corresponding to each column of data contained in the data file.
[0108] For example, the first prompt is "You are a data analyst, and your task is to conduct a comprehensive analysis of the provided electronic transaction data file. The data file contains key information of each electronic transaction on the business platform. You need to first conduct an overall analysis and summary of the entire electronic transaction data file, and then conduct a detailed analysis of each column (that is, each variable or feature)." In this way, based on the above first prompt, the pre-trained large language model can first summarize the overall situation of the electronic transaction data file and analyze the significant trends or patterns presented by the data. Then, each column of data in the electronic transaction data file can be analyzed, such as counting the basic statistics of each column of data, and based on the business background of the electronic transaction, explaining the role or impact of each column of data in business decisions.
[0109] In addition, when each row of data in the data file is analyzed separately by the pre-trained large language model, the output second description may include at least the semantic type and semantic description of each column of data, wherein the semantic type may include the operation type of data such as numerical value, currency, date, time, percentage, text, scientific notation, etc., and the semantic description may be an explanation and report of each column of data based on the application scenario and business background of the data file in the form of text description. Of course, the second description may also include the unique values contained in each column of data and their frequency of occurrence, or missing values, etc., which are not limited in this specification.
[0110] S202: Through user input operations, traverse the columns of data contained in the data file, and identify the data type and data features of each column of data in the columns of data.
[0111] Furthermore, since the pre-trained large language model is trained based on a general corpus, its ability to analyze data in certain specific fields may be weak. Therefore, the accuracy and reliability of the summary can be improved by combining the method of manually supplementing deterministic content such as data statistical indicators by users.
[0112] Specifically, each column of data contained in the data file is traversed, and the data type and data feature of each column of data are identified through the operation input by the user, wherein the data type may include numerical type, categorical type, text type, etc. The data feature may be a statistical result obtained based on any type of existing statistical method as the data feature of each column of data, such as maximum value, minimum value, mean, median, standard deviation, frequency distribution, etc.
[0113] Optionally, the data files may contain duplicate columns of data. Therefore, before the user manually analyzes the data files, the data files may be deduplicated to delete duplicate column data, thereby reducing multiple analyses of duplicate data and improving analysis efficiency.
[0114] S204: Determine a summary abstract according to the first description, the second description of each column of data in the columns of data, and the data type and data feature of each column of data in the columns of data.
[0115] Thus, by combining the first description output by the pre-trained large language model and the second description of each column of data with the data type and data features of each column of data obtained based on user operations, a summary abstract corresponding to the data file can be obtained.
[0116] In this specification, the data file is analyzed from two perspectives: the overall perspective of the data file and the local perspective of each column of data contained in the data file. The resulting summary can objectively and accurately describe the business data contained in the data file, laying the foundation for the accuracy and reliability of the subsequent generation of data facts.
[0117] based on Figure 2 In the illustrated implementation mode, the overall description of the data file and the semantic type and semantic description of each column of data are obtained through a pre-trained large language model, and the deterministic content such as the data type and data features of each column of data are obtained through user operations. The aforementioned two parts of information are combined, and the resulting summary can describe the data content contained in the data file in detail and accurately, thereby laying the foundation for generating data facts.
[0118] In one or more embodiments of this specification, Figure 1 The information graph template library used in step S102 can be pre-constructed by the following implementation method. The specific scheme is as follows: Figure 3 As shown:
[0119] S300: Pre-acquire each candidate information graph.
[0120] Specifically, each candidate infographic can be obtained from a public infographic source, or uploaded by a user. The candidate infographics used in this specification have different corresponding application scenarios, visual styles, color formats, and style types. Therefore, the infographic templates contained in the infographic template library constructed based on the candidate infographics can cover a variety of application scenarios and styles, so that when generating a target infographic, a suitable target template can be flexibly selected.
[0121] S302: Acquire reference cases, where the reference cases at least include reference style types, reference application scenarios, reference visual styles, and reference color formats.
[0122] Specifically, the reference cases are used to guide the pre-trained large language model to conduct a multi-faceted analysis of the candidate infographics to obtain the attribute information of the candidate infographics. The reference style types can be comparison, articles, lists, maps, big data, human visual skeleton (for medical scenarios), timelines, blueprints, etc. The reference application scenarios can be training, medical care, reporting, marketing, universities, etc.; the reference visual styles can be simple, business technology, cartoon, Chinese style, fashion, etc.; the reference color format can be RGB format.
[0123] S304: For each candidate information graph, classify the candidate information graph through a pre-trained large language model according to the candidate information graph and the reference case to obtain a style type, application scenario, visual style and color format corresponding to the candidate information graph.
[0124] Thus, for each candidate information graph, the candidate information graph and the reference case obtained above are used as inputs and input into the pre-trained large language model, and the model analyzes and classifies the candidate information graph to determine the design intent of the candidate information graph and the feeling and meaning it attempts to convey, thereby determining the style type of the candidate information graph. Then, considering the content and presentation of the candidate information graph, the model can determine which occasions or purposes the candidate information graph is suitable for, analyze the target audience and intended use of the candidate information graph, and thereby determine the application scenario of the candidate information graph. In addition, the model can determine the visual style of the candidate information graph by analyzing the visual elements in the candidate information graph, such as layout, font selection, icon style, etc. Finally, the model can determine the color format of the candidate information graph based on its color usage.
[0125] S306: Determine the sub-elements included in the candidate information graph and the attribute information of the sub-elements through the operation input by the user, and determine the layout structure of the candidate information graph according to the attribute information of the sub-elements. The sub-elements include picture elements and text elements, and the attribute information includes at least the position and size of the sub-elements.
[0126] For the candidate information graph, its layout structure may be identified and annotated through operations input by the user, and the layout structure may include attribute information of all sub-elements of the candidate information graph from top to bottom and from left to right.
[0127] Among them, sub-elements can be picture elements, such as visual chart elements, and image, graphic, and icon elements. Sub-elements can also be text elements, such as titles, subtitles, and text descriptions of picture elements. Sub-elements can also include navigation elements for guiding users to browse different parts of the infographic, animation elements for carrying variable content, and border and dividing line elements for dividing different information areas to make the layout clearer and more reasonable.
[0128] The attribute information of the sub-element may include the position of the sub-element in the candidate information graph and the size and shape of the sub-element.
[0129] S308: Generate an infographic template corresponding to the candidate infographic according to the style type, application scenario, visual style and color format corresponding to the candidate infographic, as well as the layout structure of the candidate infographic, and store it in an infographic template library.
[0130] Afterwards, an infographic template, such as an HTML format file, is generated based on the style type, application scenario, visual style and color format corresponding to the candidate infographic, as well as the layout structure of the candidate infographic, and the generated infographic template is stored in an infographic template library.
[0131] based on Figure 3 In the embodiment shown, the style type, application scenario, visual style and color format are automatically identified from the candidate information graphs through the pre-trained large language model, and the sub-elements and their attribute information in the candidate information graphs are determined based on the user's operation. The information graph templates generated based on this are rich and diverse, and can cover a variety of style types and application scenarios. Therefore, in the process of generating information graphs, templates can be flexibly selected based on the application scenario, style and other information of the information graph to be generated, while ensuring the quality of the information graph, the visual expression ability and aesthetics of the information graph are improved, and the generated information graph is reduced. Figure 2 The probability of sub-typography and redesign.
[0132] In one or more embodiments of this specification, Figure 1 Step S104 can be implemented by the following implementations: Figure 4 As shown:
[0133] S400: Determine weights corresponding to the summary, the data file, and the target template, respectively.
[0134] In this specification, the weight of the summary, the weight of the data file and the weight of the target template can be the same or different. The specific values of the weights of the three can be based on prior experience or user manual input, and this specification does not limit this.
[0135] The larger the weight, the greater the proportion of the basis when generating data facts. For example, the order of importance of summary, data file and target template is summary>target template>data file. In fact, the weight of summary is greater than the weight of target template, and the weight of target template is greater than the weight of data file. With such weights input into the pre-trained large language model, when the model generates data facts, the proportion based on summary will be greater than the proportion based on target template, and the proportion based on target template will be greater than the proportion based on data file. Therefore, the generation of data facts depends more on summary, followed by target template and data file.
[0136] S402: Determine the target number of data facts to be generated.
[0137] Furthermore, since the amount of data contained in the data file is usually large, the number of data facts directly generated based on the data file is large. If the visualization charts are generated one by one based on the large-scale data facts, the target template cannot be filled in normally. Therefore, the target number can also be determined before calling the pre-trained large language model to generate data facts. The target number is used to indicate the upper limit of the number of data facts to be generated. Since in the information graph generation method provided in this specification, after the data facts are generated, a visualization chart will be generated based on the data facts, and the visualization chart needs to be filled in the sub-elements in the target template to obtain the target information graph. Therefore, the maximum number of visualization charts is limited by the number of picture sub-elements in the target template used to fill in the chart, and thus, the maximum number of data facts is also limited by the number of picture sub-elements in the target template used to fill in the chart. That is, the upper limit of the number of data facts to be generated cannot exceed the number of picture sub-elements in the target template used to fill in the chart. Therefore, the target number of data facts to be generated can be determined based on the number of picture sub-elements in the target template used to fill in the chart.
[0138] S404: The target quantity, the summary abstract, the data file and the target template, as well as the weights corresponding to the summary abstract, the data file and the target template are input into a pre-trained large language model to obtain the data facts of the target quantity.
[0139] The data facts are generated by the pre-trained large language model according to the weights corresponding to the summary, the data file and the target template, based on the summary, the data file and the layout structure of the target template. The number of generated data facts is limited to the target number so that the subsequently generated visualization chart can be normally filled into the target template.
[0140] In one or more embodiments of this specification, Figure 1 Step S106 can be implemented by the following implementations: Figure 5 As shown:
[0141] S500: Obtaining various visualization code templates, wherein different codes obtained by using different visualization code templates are respectively used to draw visualization charts based on different visualization tool libraries.
[0142] In this specification, a visualization tool library can be used to obtain a target code for drawing visualization charts corresponding to data facts, and a visualization chart corresponding to the data facts can be obtained by running the target code. Different visualization tool libraries correspond to different visualization tools for drawing different visualization charts, such as using a bar chart tool to draw a bar chart and using a pie chart tool to draw a pie chart. In addition, different visualization tool libraries correspond to different visualization code templates, so that different visualization chart drawing codes can be obtained with different visualization code templates, so that different visualization tool libraries can be called to draw different visualization charts.
[0143] S502: Obtain a second prompt word, where the second prompt word is used to guide the pre-trained large language model to generate code for drawing a visualization chart based on a visualization code template and data facts.
[0144] The second prompt word can be a guiding text pre-written based on prior experience, so that the pre-trained large language model can understand the need to generate the target code, and thus accurately generate the corresponding code based on the provided visual code template and data facts. The second prompt word may include a task description, that is, the pre-trained large language model needs to generate code for drawing a visual chart based on the visual code template and data facts. The second prompt word may also include the chart type corresponding to the chart drawn by the generated code and specific style requirements, and may also include the expected code output format.
[0145] For example, the second prompt word may be "I need a piece of Python code to draw a bar chart describing [data fact] according to the visualization code template provided below, which is used to display the data analysis results stated in [data fact]. The visualization code is as follows [%]".
[0146] S504: Input each visualization code template, the data fact and the second prompt word into a pre-trained large language model to obtain a target code for drawing a visualization chart corresponding to the data fact.
[0147] Afterwards, the visualization code template and data facts can be filled into the second prompt word to obtain a complete prompt text, and then the obtained prompt text can be input into the pre-trained large language model, and the model can output the target code for drawing the visualization chart corresponding to the data facts.
[0148] Generally, one data fact corresponds to the generation of a segment of target code. Of course, depending on the actual application scenario and requirements, multiple data facts may correspond to the generation of a segment of target code, thereby generating a visualization chart. Alternatively, one data fact may correspond to the generation of multiple segments of target code, thereby generating multiple visualization charts. This specification does not limit this.
[0149] S506: Generate a visualization chart corresponding to the data fact according to the target code.
[0150] By automatically running the target code, a visual chart corresponding to the data facts can be generated.
[0151] In one or more embodiments of this specification, the visualization chart or target information chart generated based on one or more of the above embodiments may not meet the needs of users. In this case, appropriate secondary editing and modification can be performed, such as adjusting the visualization chart, adjusting the attribute information of the text elements or picture elements in the target information chart, to modify the visualization chart or target information chart, thereby improving the quality and practicality of the target information chart description data file. The following are examples of editing and modification methods provided in this specification:
[0152] The first one: in Figure 5 The illustrated implementation method regenerates the visualization chart by modifying the target code based on the visualization chart corresponding to the data fact generated by executing the target code. Specifically: First, a chart modification instruction input by a user is received. Then, according to the chart modification instruction and the summary summary, the target code is modified by a pre-trained large language model to obtain a modified code. Thus, the visualization chart corresponding to the data fact is regenerated according to the modified code.
[0153] Among them, the chart modification instruction input by the user may include at least one of text and code, which is used to represent the user's modification to the generated visual chart. The modified content may include the type of chart (such as changing a bar chart to a pie chart), the color scheme of the chart, the legend or text contained in the chart, etc. Afterwards, the chart modification instruction and the summary summary are input into the pre-trained large language model, and the model is guided to modify the previously obtained target code according to the icon modification content described in the chart modification instruction under the guidance and constraints of the summary summary to obtain the modified code. In this way, the visual chart regenerated based on the modified code can not only meet the modification content expressed by the user input chart modification instruction, but also will not deviate from the data facts and data files, thereby improving the modification efficiency of the visual chart and enhancing the reliability and accuracy of the visual chart.
[0154] The second type: Figure 1 The illustrated implementation method fills the generated visual chart into each sub-element included in the target template to obtain a target information graph, and can adjust the visual chart in the target information graph by user operation. Specifically: First, in response to the user's operation on the sub-element in the target information graph, an information graph editing interface is displayed, and the information graph editing interface at least includes a chart modification control for modifying the visual chart in the target information graph. Afterwards, in response to the user's operation on the chart modification control, the modified visual chart is determined. Thus, the target information graph is re-determined based on the modified visual chart.
[0155] The above scheme is actually based on the user's manual modification, which is to modify the visual view that has been filled in the target template by replacing the whole, and modify the form of the target code. Specifically, a click event listener can be allocated and configured on each sub-element contained in the target template (or the target infographic). When the user clicks on the sub-element, the infographic editing interface can be displayed in response to the user's click operation. The user can operate the chart modification control in the infographic editing interface to input the modified visual chart (replace the picture as a whole), or modify other elements in the target infographic, such as modifying the text style, so as to redefine the target infographic.
[0156] By providing rich and convenient editing functions, users can modify the infographics manually or through instructions, such as font size, color, icon replacement, background image replacement, etc., thereby improving the quality and reliability of the target infographics.
[0157] In an optional embodiment of the present specification, in order to expand the display scene of the generated target information graph, the target information graph can be adapted to be displayed on various types of devices through multi-device adaptation. The specific implementation is as follows:
[0158] Step 1: Determine the target device for displaying the target infographic.
[0159] Since in the information age it is necessary to support sharing on multiple terminal platforms to achieve the purpose of media communication, the current solution does not consider the problem of multi-terminal adaptation of the generated infographic. Therefore, in this specification, the layout of the target infographic is adaptively adjusted based on the target device used to display the target infographic, so that the adjusted target infographic can be displayed on the target device in a more aesthetically pleasing manner.
[0160] The target device can be any type of existing display device, such as a computer monitor, laptop, smartphone, projector, digital display, etc.
[0161] Step 2: According to the target device, the position and size of the visualization chart in the target information graph are adjusted to obtain an adjusted target information graph adapted to the target device.
[0162] Step 3: Upload the adjusted target information graph to the server so that the server stores the adjusted target information graph, generates and returns a preview link corresponding to the adjusted target information graph.
[0163] Step 4: Receive a preview link corresponding to the adjusted target information graph returned by the server, so as to view the adjusted target information graph through the preview link.
[0164] Based on the above implementation mode, by adjusting the generated target information graph so that it can be adapted for display on the target device, the problem that the current solution does not consider multi-terminal adaptation is solved. The adjusted target information graph obtained through the implementation mode of this specification can be shared on various types of target devices for display, greatly improving the dissemination efficiency and display effect of the target information graph.
[0165] In one or more of the above embodiments of this specification, it is necessary to call a pre-trained large language model. In order to improve the efficiency of model calling and lower the usage threshold, in this specification, multiple pre-trained models can be encapsulated in a unified interface, and a model that meets the requirements of information graph generation can be selected and called through a unified model calling interface, thereby improving the efficiency of information graph generation. Specifically:
[0166] Step 1: Get the SDKs for multiple different pre-trained large language models in advance.
[0167] Specifically, you can obtain the software development kit (SDK) of the pre-trained large language model from the model provider. By installing the SDK of the corresponding model, you can initialize, configure, and call the model's API.
[0168] Step 2: Install software development kits of multiple pre-trained large language models respectively, and determine attribute information corresponding to the multiple pre-trained large language models respectively, where the attribute information at least includes a model identifier, interface parameters, and an interface key.
[0169] After installing the SDK, you can configure necessary attribute information, such as model ID, access key (API key), model version, model parameters, and encapsulated model interface.
[0170] Step 3: Construct a unified model calling interface according to the attribute information respectively corresponding to the multiple pre-trained large language models, so as to select and call at least one pre-trained large language model among the multiple pre-trained large language models through the unified model calling interface.
[0171] In this way, users can select and call the required model through the unified calling interface of the constructed model, without having to perceive complex information such as model parameters and model architecture of each model. The calling efficiency is high and the threshold is low, thereby improving the efficiency of infographic generation.
[0172] The above is an information graph generation method provided by one or more embodiments of this specification. Based on the same idea, this specification also provides a corresponding information graph generation device, such as Figure 6 shown.
[0173] Figure 6 A schematic diagram of an information graph generating device provided in this specification specifically includes:
[0174] A summary determination module 600 is used to obtain a data file and extract a summary summary from the data file;
[0175] A selection module 602, for selecting a target template from a pre-built information graph template library;
[0176] A data fact generation module 604 is used to obtain data facts according to the summary summary, the data file and the target template through a pre-trained large language model;
[0177] The target information graph generating module 606 is used to generate a visual graph according to the data facts, and fill the generated visual graph into the target template to obtain a target information graph.
[0178] Optionally, the summary determination module 600 is specifically used to input the data file and the first prompt word into a pre-trained large language model to obtain a first description of the data file as a whole and a second description of each column of data contained in the data file, wherein the second description at least includes a semantic type and a semantic description of each column of data; through user input operations, traverse each column of data contained in the data file to identify the data type and data features of each column of data in the columns of data; and determine a summary summary based on the first description, the second description of each column of data in the columns of data, and the data type and data features of each column of data in the columns of data.
[0179] Optionally, the device further comprises:
[0180] The information graph template library construction module 608 is specifically used to pre-acquire each candidate information graph; obtain reference cases, the reference cases at least including each reference style type, each reference application scenario, each reference visual style and reference color format; for each candidate information graph, according to the candidate information graph and the reference case, the candidate information graph is classified by a pre-trained large language model to obtain the style type, application scenario, visual style and color format corresponding to the candidate information graph; through the operation input by the user, the sub-elements contained in the candidate information graph and the attribute information of each sub-element are determined, and the layout structure of the candidate information graph is determined according to the attribute information of each sub-element; the sub-elements include picture elements and text elements, and the attribute information at least includes the position and size of the sub-elements; according to the style type, application scenario, visual style and color format corresponding to the candidate information graph, and the layout structure of the candidate information graph, an information graph template corresponding to the candidate information graph is generated and stored in the information graph template library.
[0181] Optionally, the data fact generation module 604 is specifically used to determine the weights corresponding to the summary, the data file and the target template respectively; determine the target number of data facts to be generated; input the target number, the summary, the data file and the target template, and the weights corresponding to the summary, the data file and the target template respectively as input to the pre-trained large language model to obtain the target number of data facts; wherein the data facts are generated by the pre-trained large language model according to the weights corresponding to the summary, the data file and the target template respectively, based on the layout structure of the summary, the data file and the target template.
[0182] Optionally, the target information graph generation module 606 is specifically used to obtain each visualization code template, wherein different codes obtained with different visualization code templates are used to draw visualization charts based on different visualization tool libraries; obtain a second prompt word, wherein the second prompt word is used to guide a pre-trained large language model to generate a code for drawing a visualization chart based on the visualization code template and data facts; input each visualization code template, the data facts and the second prompt word into the pre-trained large language model to obtain a target code for drawing a visualization chart corresponding to the data facts; and generate a visualization chart corresponding to the data facts according to the target code.
[0183] Optionally, the device further comprises:
[0184] The first modification module 610 is specifically used to receive a chart modification instruction input by a user; modify the target code through a pre-trained large language model according to the chart modification instruction and the summary summary to obtain a modified code; and regenerate a visual chart corresponding to the data fact according to the modified code.
[0185] Optionally, the target template includes various sub-elements, and the target information graph is obtained by filling the generated visualization graph into the sub-elements included in the target template;
[0186] Optionally, the device further comprises:
[0187] The second modification module 612 is specifically used to display an information graph editing interface in response to the user's operation on the sub-element in the target information graph, and the information graph editing interface at least includes a chart modification control for modifying the visual chart in the target information graph; determine the modified visual chart in response to the user's operation on the chart modification control; and redetermine the target information graph based on the modified visual chart.
[0188] Optionally, the device further comprises:
[0189] The adaptation module 614 is specifically used to determine the target device for displaying the target information graph; according to the target device, adjust the position and size of the visual chart in the target information graph to obtain an adjusted target information graph adapted to the target device; upload the adjusted target information graph to the server so that the server stores the adjusted target information graph, generates and returns a preview link corresponding to the adjusted target information graph; receives the preview link corresponding to the adjusted target information graph returned by the server, so as to view the adjusted target information graph through the preview link.
[0190] Optionally, the device further comprises:
[0191] The interface construction module 616 is specifically used to pre-acquire software development kits of multiple different pre-trained large language models; install the software development kits of multiple pre-trained large language models respectively, determine the attribute information corresponding to the multiple pre-trained large language models respectively, and the attribute information at least includes a model identifier, an interface parameter and an interface key; according to the attribute information corresponding to the multiple pre-trained large language models respectively, construct a model unified calling interface so as to select and call at least one pre-trained large language model among the multiple pre-trained large language models through the model unified calling interface.
[0192] This specification also provides a computer-readable storage medium, which stores a computer program, which can be used to execute the above Figure 1 The infographic generation method shown.
[0193] This manual also provides Figure 7 The schematic structure diagram of the electronic device shown in FIG. Figure 7 As mentioned above, at the hardware level, the electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory, and may also include other hardware required for the business. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to achieve the above Figure 1 Of course, in addition to the software implementation, this specification does not exclude other implementations, such as logic devices or a combination of software and hardware, etc., that is, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0194] 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 hardware entity modules. 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 it 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.
[0195] The controller may be implemented in any suitable manner, for example, the controller may take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (e.g., 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 which include but are not limited to the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320, and the memory controller may also be implemented as part of the control logic of the memory. It is also known to those skilled in the art that, in addition to implementing the controller in a purely computer-readable program code manner, the controller may 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 may be considered as a hardware component, and the devices for implementing various functions included therein may also be considered as structures within the hardware component. Or even, the devices for implementing various functions may be considered as both software modules for implementing the method and structures within the hardware component.
[0196] 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.
[0197] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0198] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems, or computer program products. Therefore, this specification may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, this specification 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.
[0199] This specification is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of this specification. 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.
[0200] 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.
[0201] 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.
[0202] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0203] The 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. The memory is an example of a computer-readable medium.
[0204] 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 tape 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 herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0205] 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.
[0206] It should be understood by those skilled in the art that the embodiments of this specification may be provided as methods, systems or computer program products. Therefore, this specification may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, this specification 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.
[0207] This specification 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. This specification 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.
[0208] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, 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.
[0209] The above description is only an embodiment of the present specification and is not intended to limit the present specification. For those skilled in the art, the present specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present specification shall be included in the scope of the claims of the present specification.
Claims
1. A method for generating an information graph, characterized in that: include: obtaining a data file, and extracting a summary abstract from the data file; Choose a targeted template from a library of pre-built infographic templates; According to the summary, the data file and the target template, a data fact is obtained through a pre-trained large language model; wherein, the weights corresponding to the summary, the data file and the target template are determined; a target number of data facts to be generated is determined; the target number, the summary, the data file and the target template, and the weights corresponding to the summary, the data file and the target template are input as inputs to the pre-trained large language model to obtain the target number of data facts; the data facts are generated by the pre-trained large language model according to the weights corresponding to the summary, the data file and the target template, and based on the layout structure of the summary, the data file and the target template; A visualization chart is generated according to the data facts, and the generated visualization chart is filled into the target template to obtain a target information chart.
2. The method according to claim 1, characterized in that Extract a summary from the data file, specifically including: Inputting the data file and the first prompt word into a pre-trained large language model to obtain a first description of the data file as a whole and a second description of each column of data included in the data file, wherein the second description at least includes a semantic type and a semantic description of each column of data; Through the operation input by the user, traverse each column of data contained in the data file, and identify the data type and data characteristics of each column of data in the columns of data; A summary abstract is determined according to the first description, the second description of each of the columns of data, and the data type and data feature of each of the columns of data.
3. The method according to claim 1, characterized in that A library of pre-built infographic templates including: Obtain each candidate information graph in advance; Acquire reference cases, wherein the reference cases at least include reference style types, reference application scenarios, reference visual styles, and reference color formats; For each candidate information graph, based on the candidate information graph and the reference case, the candidate information graph is classified by a pre-trained large language model to obtain a style type, application scenario, visual style, and color format corresponding to the candidate information graph; Determine, through user input, each sub-element included in the candidate information graph and attribute information of each sub-element, and determine the layout structure of the candidate information graph according to the attribute information of each sub-element; the sub-element includes a picture element and a text element, and the attribute information includes at least the position and size of the sub-element; According to the style type, application scenario, visual style and color format corresponding to the candidate information graph, as well as the layout structure of the candidate information graph, an infographic template corresponding to the candidate information graph is generated and stored in an infographic template library.
4. The method according to claim 1, characterized in that Generate a visual chart based on the data facts, including: Obtaining various visualization code templates, wherein different codes obtained by using different visualization code templates are respectively used to draw visualization charts based on different visualization tool libraries; Obtain a second prompt word, where the second prompt word is used to guide the pre-trained large language model to generate a code for drawing a visualization chart based on a visualization code template and data facts; Inputting each visualization code template, the data fact and the second prompt word into a pre-trained large language model to obtain a target code for drawing a visualization chart corresponding to the data fact; According to the target code, a visualization chart corresponding to the data fact is generated.
5. The method according to claim 4, characterized in that The method further comprises: Receive chart modification instructions input by users; According to the diagram modification instruction and the summary summary, the target code is modified by using a pre-trained large language model to obtain a modified code; The visual chart corresponding to the data fact is regenerated according to the modified code.
6. The method according to claim 1, characterized in that The target template includes various sub-elements, and the target information graph is obtained by filling the generated visualization graph into the sub-elements included in the target template; The method further comprises: In response to a user's operation on a sub-element in the target information graph, displaying an information graph editing interface, wherein the information graph editing interface at least includes a chart modification control for modifying a visual chart in the target information graph; In response to a user's operation on the chart modification control, determining a modified visual chart; Re-target the infographic based on the revised visualization.
7. The method according to claim 1, characterized in that The method further comprises: determining a target device for displaying the target infographic; According to the target device, adjusting the position and size of the visualization chart in the target information map to obtain an adjusted target information map adapted to the target device; Uploading the adjusted target information graph to the server so that the server stores the adjusted target information graph, and generates and returns a preview link corresponding to the adjusted target information graph; A preview link corresponding to the adjusted target information graph returned by the server is received, so as to view the adjusted target information graph through the preview link.
8. The method according to any one of claims 1 to 7, characterized in that: The method further comprises: A software development kit for pre-accessing multiple different pre-trained large language models; Install software development kits of multiple pre-trained large language models respectively, and determine attribute information corresponding to the multiple pre-trained large language models respectively, wherein the attribute information includes at least a model identifier, an interface parameter, and an interface key; A model unified calling interface is constructed according to the attribute information respectively corresponding to the multiple pre-trained large language models, so as to select and call at least one pre-trained large language model among the multiple pre-trained large language models through the model unified calling interface.
9. An information graph generating device, characterized in that: include: A summary determination module, used to obtain a data file and extract a summary summary from the data file; A selection module for selecting a target template from a library of pre-built infographic templates; A data fact generation module, used to obtain data facts according to the summary, the data file and the target template through a pre-trained large language model; wherein, the weights corresponding to the summary, the data file and the target template are determined; the target number of data facts to be generated is determined; the target number, the summary, the data file and the target template, and the weights corresponding to the summary, the data file and the target template are input as inputs to the pre-trained large language model to obtain the target number of data facts; the data facts are generated by the pre-trained large language model according to the weights corresponding to the summary, the data file and the target template, and based on the layout structure of the summary, the data file and the target template; The target information graph generation module is used to generate a visual graph according to the data facts, and fill the generated visual graph into the target template to obtain a target information graph.
10. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method described in any one of claims 1 to 8 is implemented.
11. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method described in any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Information chart sequence detection method and system based on deep learning
CN112507931A
Automated generation of data visualizations and infographics using large language models and diffusion models
US20240185490A1