Diagram display method, electronic device, storage medium and program product
The chart display method automates the creation of multi-view visual screens by inferring chart content from user input, using large language and image generation models to streamline the visualization process, reducing expertise needs and costs while improving efficiency and aesthetics.
Patent Information
- Application Number
- CN202411034521.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-30
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2044-07-30
AI Technical Summary
The construction of multi-view visual screen systems is complex, requiring cross-field expertise and is time-consuming, with a long production cycle and high labor costs due to the need for trial and error in data screen creation.
A chart display method that infers chart content data from user input text, automatically generates chart views, and determines their layout, utilizing large language models and image generation models to reduce expertise requirements and streamline the visualization process.
Automated large-screen construction capability that reduces user expertise needs, shortens production cycles, and lowers labor and time costs while enhancing the visual appeal and efficiency of data visualization.
Smart Images

Figure CN118567775B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to a chart display method, electronic device, computer-readable storage medium and computer program product, which can be applied to the technical fields of large-screen visualization data and large language models. Background Art
[0002] In daily and data analysis work, visual data screens can effectively enhance the readability of analysis and the time efficiency of data exploration. However, the complete construction of a multi-view visual screen system is a complex and tedious process. The entire construction process not only requires cross-field experience and expertise, but also requires a lot of trial and error. Therefore, it will consume a lot of manpower and time costs, and the cycle of data screen production is long. Summary of the invention
[0003] The embodiments of the present application provide a chart display method, an electronic device, a computer-readable storage medium, and a computer program product to alleviate or solve one or more technical problems existing in the prior art.
[0004] In a first aspect, an embodiment of the present application provides a chart display method, comprising: based on input text information, inferring chart content data required to display at least one chart view in a target screen, the chart content data of a chart view including a title, a chart type, and chart drawing data; determining a layout method of the chart view in the target screen; generating a corresponding chart view according to the chart content data, and displaying the generated chart view in the target screen according to the layout method.
[0005] In a second aspect, an embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory, and the processor implements any method of the embodiment of the present application when executing the computer program.
[0006] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, any method of the embodiment of the present application is implemented.
[0007] In a fourth aspect, an embodiment of the present application provides a computer program product, including a computer program, which implements any method of the embodiments of the present application when executed by a processor.
[0008] According to the chart display method of the embodiment of the present application, the text information input by the user is first used to infer the chart content data of the chart view, including the title, chart type and chart drawing data, so as to automatically generate the chart view using these data, and then determine the layout of these chart views in the target screen, and display these automatically generated chart views in the target screen according to the layout, thereby providing a complete set of visualization data large screen template generation process, realizing the ability to automatically display text to chart view only by requiring the user to input text information. Since there is no need to prepare chart content data, the requirements for user expertise and capabilities can be reduced, and this automatic generation capability also greatly shortens the cycle of visualization data large screen output, reduces labor costs and time costs, and thus provides the data visualization industry with automated large screen construction capabilities.
[0009] Optionally, the chart display method of the embodiment of the present application can also utilize a large language model, that is, input the user's text information into the large language model, and utilize the chart content data in different industry fields and the text parsing ability of the large language model, so that the large language model automatically outputs the chart content data in the data format desired by the user, thereby enriching the field of automatic display of charts and further improving the efficiency of automatic construction of large-scale visual data screens.
[0010] Optionally, in the chart display method of the embodiment of the present application, an image generation model can also be used to automatically generate a material decoration image, and the material decoration image can be used to decorate multiple chart views, thereby generating display decorations that are more in line with large-screen design specifications.
[0011] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] In the accompanying drawings, unless otherwise specified, the same reference numerals throughout the multiple drawings represent the same or similar parts or elements. These drawings are not necessarily drawn to scale. It should be understood that these drawings only depict some embodiments according to the present application and should not be regarded as limiting the scope of the present application.
[0013] Figure 1 A flowchart showing a method for displaying a chart according to an embodiment of the present application is shown;
[0014] Figure 2A , Figure 2B , Figure 2C and Figure 2D A schematic diagram showing a diagram view of an embodiment of the present application;
[0015] Figure 3A , Figure 3B and Figure 3C A schematic diagram showing a layout of multiple chart views according to an embodiment of the present application;
[0016] Figure 4 A block diagram of an electronic device provided by an embodiment of the present application is shown. DETAILED DESCRIPTION
[0017] In the following, only some exemplary embodiments are briefly described. As those skilled in the art will appreciate, the described embodiments may be modified in various ways without departing from the concept or scope of the present application. Therefore, the drawings and descriptions are considered to be exemplary in nature and not restrictive.
[0018] To facilitate understanding of the technical solutions of the embodiments of the present application, the following describes the related technologies of the embodiments of the present application. The following related technologies can be combined with the technical solutions of the embodiments of the present application as optional solutions, and they all belong to the protection scope of the embodiments of the present application.
[0019] The following terms will be used in the following text:
[0020] Visual data screen: also known as data visualization display wall, data cockpit or big data dashboard, it is a way of displaying a large amount of complex data through visual elements such as charts, graphics, dynamic images, etc. The launch of the data screen brings convenience. No coding is required. Users can directly drag the components to be presented onto the canvas, and then configure and layout them at will. What you see is what you get. It is usually used in many fields such as business analysis, smart city management, emergency command center, financial market monitoring, retail industry analysis, etc., to help decision makers quickly understand the information, trends and patterns behind the data, so as to make more accurate decisions.
[0021] Large Language Model (LLM): A natural language processing model based on deep learning technology. It is a deep learning model trained with a large amount of text data and can generate natural language text or understand the meaning of language text. Large language models can handle a variety of natural language tasks, such as text classification, question answering, and dialogue. Large language models are an important path to artificial intelligence (AI).
[0022] Domain Specific Language (DSL): A computer language designed to solve problems in a specific domain. Unlike general-purpose programming languages (such as Java, Python, or C++), DSLs focus on the programming needs of a specific domain. Therefore, they are usually more concise and expressive, and are easier to understand and use for experts in the field.
[0023] Image Generation Model (IGM): A model that can sample and generate high-dimensional image data from a low-dimensional latent space.
[0024] Stable Diffusion (SD): A deep learning model, a text-to-image model. SD is an image generation technology based on Latent Diffusion Models (LDMs), but uses a more stable, controllable and efficient method to generate high-quality images. Therefore, the model can directly generate images on consumer-grade graphics cards, up to at least 512*512 pixels. At present, the application of SD is no longer limited to the field of image generation, it is also widely used in natural language processing, audio and video generation and other fields.
[0025] The complete construction of a multi-view visualization large-screen system is a complex and tedious process that requires cross-experience and expertise in multiple fields, including a strong reliance on basic data domain knowledge, aesthetic considerations of visualization design, and the connection and control of the entire implementation process.
[0026] Throughout the workflow, most visualization tools follow these steps: (i) upload or preprocess the dataset into a tabular format; (ii) select data for key performance indicators; (iii) draw corresponding charts based on the data; and (iv) arrange the layout of these charts on a screen. This is a complex creative task that requires different expertise at different steps, can be tedious for users, and is prone to errors. The entire construction process requires a lot of trial and error, which consumes a lot of manpower and time costs.
[0027] Especially when users can only provide rough industry theme information without data set preparation, the display of visual data screens becomes more difficult, because users not only need to simulate drawing data and select chart types based on industry theme information, but also need to experiment with how to display multiple charts on a single screen and lay them out reasonably. A good data screen drawing data set should clearly reflect the characteristics of the theme. At the same time, the selection of data is traditionally summarized by relevant industry experts and cannot be simply summarized based on a series of rules. In addition, the layout of the data screen still lacks a clear structure and understanding of the design space, especially those small charts and decorative elements hidden in a single view, which need further consideration.
[0028] The embodiment of the present application aims to provide a chart display method, which first uses text information input by a user to infer chart content data required for a chart view, including a title, a chart type, and chart drawing data, so as to automatically generate a chart view using these data, and then determines the layout of the chart view in a target screen, and displays the automatically generated chart view in the target screen according to the layout.
[0029] The target screen can be a large visual data screen, so the embodiment of the present application provides a complete set of large visual data screen template generation processes, which realizes the ability to automatically display text to chart views by only requiring the user to input text information. Since there is no need to prepare chart content data, the requirements for user expertise and capabilities can be reduced, and this ability to automatically generate chart views also greatly shortens the cycle of large visual data screen output, reduces labor costs and time costs, and thus provides the data visualization industry with automated large screen construction capabilities.
[0030] Furthermore, in the chart display method provided in the embodiment of the present application, an image generation model can be used to automatically generate a material decoration image, and the material decoration image can be used to decorate the chart view, thereby generating a display decoration that is more in line with large-screen design specifications.
[0031] It should be noted that the above application scenarios or application examples provided in the embodiments of the present application are for ease of understanding, and the embodiments of the present application do not specifically limit the application of the technical solution. In addition, the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data need to comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0032] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The several specific embodiments listed can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described in detail below with reference to the accompanying drawings.
[0033] Figure 1 A flowchart of a method for displaying a chart according to an embodiment of the present application is shown. Figure 1 As shown, the method may include step S101, step S102 and step S103.
[0034] Step S101: based on input text information, inferring chart content data required to display at least one chart view in a target screen, wherein the chart content data of a chart view includes a title, a chart type and chart drawing data.
[0035] Exemplarily, the text information may be input by the user, such as subject information, i.e., information about the subject that needs to be displayed on the target screen. The subject information may be industry information, field information, or scene information. For example, the subject information may be "traffic monitoring", "demographics", "sales data analysis", "retail industry analysis", etc. It should be noted that the text information may also be other information that can reflect the subject or content that needs to be displayed on the target screen, and the embodiments of the present application are not limited to this.
[0036] The target screen is the carrier for displaying the chart view, that is, the display space of the chart view. In the embodiment of the present application, the target screen can be a large screen for visualizing data. Among them, the icon view displayed in the target screen can be one or more, and the embodiment of the present application does not limit this.
[0037] A chart view is a view that includes one or more charts, that is, one or more charts are used to present a data display task in a single view. It usually includes a title and one or more charts. Figure 2A , Figure 2B , Figure 2C and Figure 2D Four chart views are shown, and their titles are "Traffic Accident Hot Spot Distribution Map", "Traffic Flow Change Map", "Traffic Congestion Situation Map" and "Traffic Accident Statistics Map". Among them, the "Traffic Congestion Situation Map" chart view includes two charts, which respectively show the traffic congestion situation during busy hours and the traffic congestion situation during off-peak hours.
[0038] The chart content data of each chart view includes title, chart type and chart drawing data. Among them, the title can intuitively reflect the content of one or more charts in the corresponding chart view. Chart type refers to the presentation form of the chart, such as column chart, pie chart, area chart, bar chart, line chart, XY scatter chart, point map, waterfall chart, funnel chart, radar chart, word cloud, rectangular tree map, histogram, box plot, Gantt chart, bubble chart, etc. For example, in Figure 2A , Figure 2B , Figure 2C and Figure 2D In the chart view, the chart type of the "Traffic Accident Hot Spot Distribution Map" is a point map; the chart type of the "Traffic Flow Change Map" is a line chart; the chart type of the "Traffic Congestion Map" is a column chart; the chart type of the "Traffic Accident Statistics Map" is a table. Chart drawing data refers to the data used to generate a chart, which can include tabular data such as statistical data and analytical data, as well as some chart style data such as colors and borders.
[0039] Exemplarily, a large amount of chart content data can be prepared in advance, for example, collected from a large screen of prior visualization data, or collected from a large screen template; each set of collected chart content data can be labeled with a classification label; then, key data is extracted from the input text information to determine the theme or content that needs to be displayed on the target screen, and then the chart content data whose key data matches the classification label is automatically matched from the multiple sets of prepared chart content data to generate a corresponding chart view.
[0040] Please continue reading Figure 1 , Step S102: Determine the layout of the chart view in the target screen.
[0041] The layout of the chart view can be regarded as the position and size information of the chart view in the target screen. For example, the concept of "bounding box" can be given to the chart view, and the layout can be understood as the position and size of the bounding box of the chart view in the display space. Figure 3A and Figure 3B As shown, the layout method determines the chart view Figure 1 , Chart View 2, Chart View 3, and Chart View Figure 4 The size of the bounding box, and the positions of the four bounding boxes in the target screen (which may include positional relationships and row and column arrangement relationships).
[0042] For example, the layout method of the embodiment of the present application may also include the concept of a hierarchical structure, that is, a stacked layout method of each chart view. Taking a 2-level hierarchical structure as an example, Figure 3C As shown, the chart view "Traffic Accident Hot Spot Distribution Map" is located at the bottom layer, and the chart view "Traffic Mode Distribution Map" is located at the top layer.
[0043] Exemplarily, layout methods can be collected from a priori visualization data large screen, or layout methods can be collected from large screen templates; each collected layout method can be labeled with a classification label; then, key data is extracted from the input text information, the theme or content that needs to be displayed on the target screen is determined, and then the layout method that matches the key data and the classification label is automatically matched from the multiple layout methods that have been collected. Exemplarily, the layout method can also be selected by the user from a pre-prepared layout template. Among them, each layout template shows the corresponding layout method, and the user can choose according to actual needs.
[0044] Please continue reading Figure 1 , step S103: generating a corresponding chart view according to the chart content data, and displaying the generated chart view on the target screen according to the layout method determined in step S102.
[0045] As described above, a chart view including a title, one or more charts can be generated based on the chart content data of a chart view. Then, according to the layout mode determined in step S102, the position and size of the chart view in the target screen are determined, and then displayed in the target screen.
[0046] The above method provided by the embodiment of the present application realizes the ability to generate and layout from text information to chart views, and provides the data visualization industry with an automated large-screen construction capability. Exemplarily, the text information may contain only the subject information of a target screen. For example, to build a large screen for traffic monitoring, or to build a large screen showing the global population. The user only needs to provide a very simple text message, and the text message does not need to provide key indicator data, that is, the user does not need to prepare the chart content data, but the system automatically infers the chart content data, so the requirements for user expertise and capabilities can be reduced, thereby greatly shortening the production cycle of large-screen visualization data, reducing manpower and time costs, and bringing a more efficient overall process for users to effectively design complete and available data screens.
[0047] Optionally, the text information may include information about a subject that needs to be displayed on the target screen, such as industry information, field information, or scene information, etc. Based on this, the embodiment of the present application provides two implementation methods of step S101.
[0048] In one implementation, in step S101, based on the input text information, inferring the chart content data required to display at least one chart view in the target screen may include: determining at least one data display task matching the theme; inferring the chart type and chart drawing data corresponding to the data display task, and determining the corresponding title based on the chart drawing data, to obtain the chart content data of the chart view corresponding to the data display task.
[0049] Decomposing a topic can get multiple data display tasks, which can be referred to as task decomposition. The chart display task decomposition is based on an input topic to decompose the task. The task decomposition is mainly based on the topic to analyze the tasks suitable for display under the current topic. For example: when the topic is "traffic monitoring", it can be decomposed into multiple data display tasks: traffic accident hotspot distribution display, traffic mode distribution display, traffic accident statistics display, traffic flow change display, traffic congestion display, etc. It can be understood that each chart view represents a data display task, that is, a single chart view can be used for specific display analysis tasks while conveying the original data.
[0050] Furthermore, visual mapping and data simulation are performed, that is, the chart type and chart drawing data are determined. Each data display task is matched with a suitable chart type and chart drawing data, which can be obtained by collecting data from a priori visualization data screen or from a screen template, and then classified, screened and matched. Alternatively, the collected data is used to train a deep learning model (such as LLM), and the trained deep learning model can directly obtain the chart type and chart drawing data based on the data display task.
[0051] Then, title generation is performed, that is, for a single data display task, a title can be generated for it using its chart drawing data to intuitively reflect the content of the chart. The title is used as the title of the chart view corresponding to the data display task.
[0052] Based on this implementation method, by determining the chart type, chart drawing data and title of each data presentation task, the chart content data of each chart view can be obtained, so that the system can automatically decompose the data presentation tasks based on themes and infer the chart content data for each data presentation task. As a result, users are no longer required to prepare chart content data, thereby reducing the requirements for user expertise and capabilities.
[0053] In another implementation, in step S101, based on the input text information, inferring the chart content data required to display at least one chart view in the target screen may include: obtaining the chart content data of at least one chart view output by the large language model based on the text information, wherein the training sample of the large language model includes multiple topic information and data sets corresponding to each topic information, the data sets include at least one data display task and chart content data corresponding to the data display task, and the chart content data output by the large language model conforms to a preset data format.
[0054] In the embodiment of the present application, the training of LLM may include: (1) statistics and collection of data for pre-stored large-screen templates, extracting some charts, layouts, chart types that are more suitable for current industry information applications, and drawing data of these charts from these templates, and classifying these data into multiple subject information, and each subject information corresponds to a data set; and each data set includes at least one data display task and chart content data that conforms to a preset data format corresponding to each data display task, thereby constituting a training sample of LLM. (2) Using the training samples to train LLM until LLM converges.
[0055] When LLM training is completed, the text information is input into LLM at the back end, and the complete information of the large-screen construction output by LLM can be directly obtained, that is, the chart content data of the chart view that needs to be displayed.
[0056] The preset data format of the LLM output data can be DSL, such as json format, so as to facilitate the subsequent compilation of the chart content data based on the LLM output to generate, layout and display chart views. The preset data format can be configured according to user needs, and the embodiment of the present application does not limit this.
[0057] Based on this implementation, the data display task decomposition, visual mapping, data simulation, and title generation involved in step S101 can all be implemented by LLM, thereby further improving the generation efficiency and usability of visual data charts. In addition, the execution of these steps can be completed by LLM at the back end, thereby reducing the occupation of online resources.
[0058] In one embodiment, in step S102, determining the layout of the chart view in the target screen includes: generating a layout tree, wherein the layout tree includes multiple view nodes, one view node represents a chart type of a chart view and size information of the chart view in the target screen, and the multiple view nodes are distributed in multiple levels; according to a layout template, mapping the multiple view nodes in the layout tree to different positions in the target screen, wherein the layout template includes the position distribution of chart views of different chart types in one screen.
[0059] Exemplarily, the layout tree structure used in the embodiment of the present application is as follows:
[0060] ;
[0061] in, Represents a layout tree, Represents the i-th view node. Based on the statistical analysis of the data of a large number of data screens, the layout tree is a 2-level hierarchy, where the number of level 1 nodes is mainly 2 to 4, which means that the layout design of the industry data screen is as simple as possible to ensure readability. Therefore, the above layout tree is a 2-level hierarchy, and the number of level 1 nodes is at most 4. It should be noted that the embodiments of the present application are not limited to this, and the number of levels and nodes can be configured according to actual needs.
[0062] A view node uses a tuple to represent the chart type and size information of the chart view represented by the view node. For example, , Indicates the chart type, Represents the width information of the chart view's bounding box. Indicates the height information of the bounding box of the chart view. The chart type can be obtained in step S101, and the size information has a certain correlation with the chart type, and is related to the size of the target screen and the number of chart views, and the size information of the chart view can be determined accordingly.
[0063] For example, whether different chart views are view nodes of the same level can be calculated by the similarity between chart types. The relationship between the chart view and the level to which the view node belongs can be expressed as follows:
[0064] ;
[0065] .
[0066] in, Indicates that when there is (The chart type is )hour, entropy appears on the target screen. Therefore, The lower, the and The higher the correlation, The lower the uncertainty that arises. Representation Node The various chart types contained in the layer.
[0067] The layout template includes the position distribution of chart views of different chart types in a screen, that is, firstly count the usual positions of charts of different chart types in a large screen according to the existing layout templates; then, after calculating the layout tree, map multiple view nodes in the layout tree to different positions in the target screen according to the layout template.
[0068] In one example, multiple view nodes in the layout tree are mapped to different positions in the target screen according to the layout template, which can be achieved by using the nine-point method. Divided into 9 areas ; Select the most representative chart view (referred to as the target view), that is, the chart view with the largest size among all view nodes, and place the target view on the target screen. The relative position in is modeled as ,in express and Similarly, the screen corresponding to the layout template is also divided into 9 areas, and the position of the chart view consistent with the chart type of the target view on the screen is determined, and it is substituted into the aforementioned modeling formula to determine the positional relationship between the target view and the nine areas; after the position of the target view is determined, it can be determined whether the chart view represented by each view node adopts a row layout or a column layout on the target screen, and the position of other chart views on the target screen can be obtained in a similar way.
[0069] In another example, multiple view nodes in a layout tree are mapped to different positions in a target screen according to a layout template, including: determining an association relationship between chart views represented by different view nodes according to the layout template; and determining a positional relationship between different chart views in the target screen based on the association relationship.
[0070] The relationship between chart views can be calculated using layout templates, that is, the correlation between chart views can be calculated. When assembling, chart views with higher correlation will be arranged together as much as possible. For example, the relationship between chart views can be calculated using the Similarity Entropy method. By arranging chart views with high correlation together, relevant data can be displayed in a centralized manner, which improves the viewing experience of the large-screen visualization data.
[0071] Based on this, the automatic layout of the chart view on the target screen can be achieved, and based on the layout template, the multi-view layout can be more reasonable and more in line with industry experience.
[0072] In one embodiment, in step S103, a corresponding chart view is generated according to the chart content data, including: for any chart view, at least one target chart is generated according to the task type of the data display task corresponding to the chart view and the chart content data of the chart view, and the chart view is generated using the title of the chart view and the at least one target chart.
[0073] As mentioned above, each chart view can represent a data display task, that is, a single chart view can be used for specific display and analysis tasks while conveying the original data. In the embodiment of the present application, the task types include data comparison tasks, key indicator display tasks, overview tasks, and detail display tasks. A comparison task can be defined as an analysis task that focuses on the differences between multiple data attributes with similar characteristics or data significance or different target objects with the same data attributes. For example, in the field of transportation, a comparison task is, for example, "display of the number of vehicle trips during the day and at night."
[0074] A key indicator display task can be defined as an analytical task that requires highlighting certain key indicators from a given data attribute under specific criteria. The specific criteria can be finding a specific value, extreme value, proportion, or outlier. For example, a key indicator display task can be to display the "detailed number of flights departing on the day" in the aviation field.
[0075] An overview task can be defined as a dataset that needs to be presented with multiple attributes or fully plotted data. In contrast to highlighting tasks, this approach focuses more on the completeness and accuracy of the data. For example, in the sports domain, an overview task could be a task that presents “awards won by different teams in a sports event.”
[0076] A detail display task can be defined as combining two or more data attribute sets together in an attempt to explore the relationship between them, which mainly occurs when one set is a subset of the other. For example, in the financial field, a detail display task can be a task of "showing the different profit shares of a given company based on showing the profitability of all companies."
[0077] Based on different task types of data presentation tasks, the number of charts included in a single chart view may be different, and the presentation forms of the generated charts may also be different.
[0078] For example: in response to the task type being a data comparison task, multiple groups of table data are determined from the chart drawing data of the chart view, and the multiple groups of table data are displayed side by side using multiple target charts, wherein the number of target charts is the number of groups of table data, and the chart type of the target chart is the chart type of the chart view. Figure 2CAs shown, the chart view "Traffic Congestion Chart" includes two charts "Busy Hour" and "Idle Hour", and the traffic congestion conditions at "Busy Hour" and "Idle Hour" are both represented by bar charts.
[0079] For another example: in response to the task type being a key indicator display task, a target chart is generated according to the chart drawing data of the chart view, and the indicator data corresponding to the key indicator is filtered from the chart drawing data of the chart view, and the indicator data corresponding to the key indicator is highlighted in the target chart. For example, if the key indicator is "the detailed number of flights departing on the day", the data corresponding to the indicator is highlighted.
[0080] For another example: in response to the task type being an overview task, a target chart of table type is generated according to the chart drawing data of the chart view. The overview task requires the presentation of a data set covering multiple attributes or complete drawing data, emphasizing the completeness and accuracy of the data. Therefore, in order to draw complete data, a table is usually used to display the description, such as Figure 2D shown.
[0081] Another example: in response to the task type being a detail display task, target charts of multiple chart types are generated according to the chart drawing data of the chart view. Detail display tasks mainly occur when one set is a subset of another set, so a more complex chart type is required, namely, a chart combination, which consists of multiple charts in the same view to present detailed information of the data in a hierarchical manner, such as Figure 3C shown.
[0082] Based on this, an embodiment of the present application provides an automatic generation function of a data panel, that is, for a chart view, based on the task type of the chart view, by configuring the chart type and the number of charts, a variety of data display tasks or analysis tasks are displayed, thereby optimizing data presentation and user perception experience.
[0083] In one implementation, in step S103, displaying the generated chart view on the target screen according to the layout determined in step S102 may include: decorating the generated chart view; and displaying the decorated chart view on the target screen according to the above layout.
[0084] In the embodiment of the present application, the decoration processing mainly includes the recommendation of theme color palette and the generation of material decoration images, wherein the material decoration images are mainly the borders and icons in the target screen. Based on this, the visual style of the data screen can be unified, and beautiful and practical decorations can be generated to enhance the data display capability and user experience of the entire target screen (such as the data screen).
[0085] Optionally, decorating the chart view includes at least one of the following: determining a theme color palette to be applied to the target screen based on the text information, and applying the theme color palette to the generated chart view; generating a material decoration image using an image generation model, and decorating the generated chart view using the material decoration image.
[0086] Exemplarily, the theme palette applied to the target screen can be determined based on the text information, and then the theme palette can be encoded into the color channel of the target screen, so that the theme palette is displayed in the target screen, that is, the theme palette is applied to the generated chart view. Among them, the theme palette can be obtained using LLM. Considering the different data types encoded into the color channel, the palette type can be divided into a categorical palette and a sequential palette, which are used for dimensional data and measurement data respectively, so that the appropriate type of palette can be selected as the theme palette according to the data type.
[0087] Exemplarily, when an image generation model (IGM) is used to generate material decorative images, model training and data set selection are key aspects. In order to enhance the effect of image generation, it is necessary to collect the decorative image components in the data set into the training data set. During the generation process, the image generation model needs to ensure that the design elements such as the geometry of the border, line thickness, color and texture meet the best practices of the target disk screen. Therefore, a set of design specifications can be defined and the data set can be checked to exclude decorative images that do not meet the specifications, so that the model can identify and apply these specifications during the learning process. For example, prompt words that can effectively generate more ideal material decorative images can be summarized through repeated experiments. These prompt words combine the theme color and the design style contained in the input text information. These prompt words are input into the image generation model to automatically generate material decorative images that meet the design specifications, are beautiful and practical. In the embodiment of the present application, the image generation model can be an SD model.
[0088] According to the diagram display method of the embodiment of the present application, it can be applied to a large data screen for visualization, including extracting effective data information from text information using a large language model LLM, and then automatically inferring the diagram content data used to generate the diagram view, and automatically laying out the generated diagram through an intelligent layout algorithm, and then automatically generating the material decoration image of the data screen using an image generation model, providing the data visualization industry with an automated data screen construction capability. The method of the embodiment of the present application, in terms of data readiness, can accurately parse text information and simulate a large data screen that reflects industry characteristics; in terms of efficiency, the generation speed of the data screen and the system's ability to handle different amounts of data are greatly improved; in terms of usability, the user interface is intuitive and friendly, and the time required for users to learn and operate the system is greatly reduced; in terms of flexibility, the system can adapt to various industry keywords and can cover a variety of use cases and analysis needs; in terms of aesthetics, the visual presentation of the data screen is more attractive, and the layout and design are more in line with the design specifications of data visualization.
[0089] Corresponding to the application scenario and method of the method provided in the embodiment of the present application, the embodiment of the present application also provides a chart display device, including: a chart content data inference module, used to infer chart content data required to display at least one chart view in a target screen based on input text information, wherein the chart content data of a chart view includes a title, a chart type and chart drawing data; a layout method determination module, used to determine the layout method of the chart view in the target screen; a chart view display module, used to generate a corresponding chart view according to the chart content data, and display the generated chart view in the target screen according to the layout method.
[0090] In one embodiment, the text information includes information about the subject that needs to be displayed on the target screen, and the chart content data inference module is specifically used to: determine at least one data display task that matches the subject; infer the chart type and chart drawing data corresponding to the data display task, and determine the corresponding title based on the chart drawing data, to obtain the chart content data of the chart view corresponding to the data display task.
[0091] In one embodiment, the text information includes information about a topic that needs to be displayed on the target screen, and the chart content data inference module is specifically used to: obtain chart content data of the at least one chart view output by the large language model based on the text information, wherein the training sample of the large language model includes multiple topic information and data sets corresponding to each topic information, the data sets include at least one data display task and chart content data corresponding to the data display task, and the chart content data output by the large language model conforms to a preset data format.
[0092] In one embodiment, the layout mode determination module is specifically used to: generate a layout tree, wherein the layout tree includes multiple view nodes, one view node represents a chart type of a chart view and size information of the chart view in the target screen, and the multiple view nodes are distributed in multiple levels; according to a layout template, map the multiple view nodes in the layout tree to different positions in the target screen, wherein the layout template includes the position distribution of chart views of different chart types in one screen.
[0093] In one implementation, the layout mode determination module is specifically used to: determine the association relationship between the chart views represented by different view nodes according to the layout template; and determine the position relationship between the different chart views in the target screen based on the association relationship.
[0094] In one embodiment, the chart view display module is specifically used to: for any chart view, generate at least one target chart according to the task type of the data display task corresponding to the chart view and the chart content data of the chart view, and generate the chart view using the title of the chart view and the at least one target chart.
[0095] In one embodiment, the chart view display module is specifically used for: in response to the task type being a data comparison task, determining multiple groups of tabular data from the chart drawing data of the chart view, and displaying the multiple groups of tabular data side by side using multiple target charts, wherein the number of target charts is the number of groups of the tabular data, and the chart type of the target chart is the chart type of the chart view; in response to the task type being a key indicator display task, generating the target chart according to the chart drawing data of the chart view, filtering indicator data corresponding to the key indicators from the chart drawing data of the chart view, and highlighting the indicator data in the target chart; in response to the task type being an overview task, generating a target chart of a table type according to the chart drawing data of the chart view; in response to the task type being a detail display task, generating target charts of multiple chart types according to the chart drawing data of the chart view.
[0096] In one embodiment, the chart view display module is specifically used to: decorate the generated chart view; and display the decorated chart view in the target screen according to the layout mode. The decorating of the generated chart view includes at least one of the following: determining a theme color palette applied to the target screen according to the text information, and applying the theme color palette to the generated chart view; generating a material decoration image using an image generation model, and decorating the generated chart view using the material decoration image.
[0097] In one implementation, the target screen is a large screen for visualizing data.
[0098] The functions of each module in each device in the embodiments of the present application can be found in the corresponding description in the above method, and have corresponding beneficial effects, which will not be repeated here.
[0099] Figure 4 FIG. 1 is a block diagram of an electronic device used to implement an embodiment of the present application. Figure 4 As shown, the electronic device includes: a memory 401 and a processor 402, and the memory 401 stores a computer program that can be run on the processor 402. When the processor 402 executes the computer program, the method in the above embodiment is implemented. The number of the memory 401 and the processor 402 can be one or more. In a specific implementation, the electronic device may also include a communication interface 403 for communicating with external devices and performing data exchange transmission.
[0100] In specific implementation, if the memory 401, the processor 402 and the communication interface 403 are implemented independently, the memory 401, the processor 402 and the communication interface 403 can be connected to each other through a bus and communicate with each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0101] Optionally, in a specific implementation, if the memory 401, the processor 402 and the communication interface 403 are integrated on a chip, the memory 401, the processor 402 and the communication interface 403 can communicate with each other through an internal interface.
[0102] An embodiment of the present application provides a computer-readable storage medium storing a computer program, which implements the method provided in the embodiment of the present application when the program is executed by a processor.
[0103] An embodiment of the present application provides a computer program product, including a computer program, which implements the method provided in the embodiment of the present application when executed by a processor.
[0104] An embodiment of the present application also provides a chip, which includes a processor for calling and executing instructions stored in the memory from the memory, so that a communication device equipped with the chip executes the method provided by the embodiment of the present application.
[0105] An embodiment of the present application also provides a chip, including: an input interface, an output interface, a processor and a memory, wherein the input interface, the output interface, the processor and the memory are connected via an internal connection path, and the processor is used to execute the code in the memory. When the code is executed, the processor is used to execute the method provided in the embodiment of the application.
[0106] It should be understood that the above processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. It is worth noting that the processor may be a processor that supports the Advanced RISC Machines (ARM) architecture.
[0107] Further, optionally, the above-mentioned memory may include a read-only memory and a random access memory. The memory may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memory. Among them, the non-volatile memory may include a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may include a random access memory (RAM), which is used as an external cache. By way of exemplary but not limiting description, many forms of RAM are available. For example, static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM) and direct memory bus random access memory (DR RAM).
[0108] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium.
[0109] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine different embodiments or examples described in this specification and the features of different embodiments or examples, unless they are contradictory.
[0110] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0111] Any process or method described in the flow chart or otherwise described herein can be understood as a module, fragment or portion of a code representing one or more executable instructions for implementing the steps of a specific logical function or process. And the scope of the preferred embodiment of the present application includes other implementations, in which the functions may not be performed in the order shown or discussed, including in a substantially simultaneous manner or in a reverse order according to the functions involved.
[0112] The logic and / or steps described in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, which can be embodied in any computer-readable medium for use by an instruction execution system, apparatus or device (such as a computer-based system, a system including a processor or other system that can fetch instructions from an instruction execution system, apparatus or device and execute instructions), or used in combination with these instruction execution systems, apparatuses or devices.
[0113] It should be understood that the various parts of the present application can be implemented with hardware, software, firmware or a combination thereof. In the above embodiments, multiple steps or methods can be implemented with software or firmware stored in a memory and executed by a suitable instruction execution system. All or part of the steps of the above embodiment method can be completed by instructing the relevant hardware through a program, which can be stored in a computer-readable storage medium, and when the program is executed, it includes one of the steps of the method embodiment or a combination thereof.
[0114] In addition, each functional unit in each embodiment of the present application can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into one module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of a software functional module. If the above-mentioned integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. The storage medium can be a read-only memory, a disk or an optical disk, etc.
[0115] The above is only an exemplary embodiment of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various changes or substitutions within the technical scope recorded in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A method for displaying a chart, comprising: Inferring chart content data required to display at least one chart view in the target screen based on the input text information, wherein the chart content data of one chart view includes a title, a chart type, and chart drawing data; Determining a layout of the chart view in the target screen; Generating a corresponding chart view according to the chart content data, and displaying the generated chart view on the target screen according to the layout mode; The text information includes information about a subject that needs to be displayed on the target screen, and the inference of chart content data required to display at least one chart view on the target screen based on the input text information includes: determining at least one data display task matching the subject; inferring a chart type and chart drawing data corresponding to the data display task, and determining a corresponding title based on the chart drawing data, to obtain chart content data of the chart view corresponding to the data display task; The generating a corresponding chart view according to the chart content data comprises: for any chart view, generating at least one target chart according to the task type of the data display task corresponding to the chart view and the chart content data of the chart view, and generating the chart view by using the title of the chart view and the at least one target chart; Among them, generating at least one target chart according to the task type of the data display task corresponding to the chart view and the chart drawing data of the chart view includes: in response to the task type being a data comparison task, determining multiple groups of table data from the chart drawing data of the chart view, and displaying the multiple groups of table data side by side using multiple target charts, wherein the number of the target charts is the number of groups of the table data, and the chart type of the target chart is the chart type of the chart view; in response to the task type being a key indicator display task, generating the target chart according to the chart drawing data of the chart view, filtering the indicator data corresponding to the key indicator from the chart drawing data of the chart view, and highlighting the indicator data in the target chart; in response to the task type being an overview task, generating a target chart of a table type according to the chart drawing data of the chart view; in response to the task type being a detail display task, generating target charts of multiple chart types according to the chart drawing data of the chart view.
2. The method according to claim 1, wherein: The text information includes information about a subject that needs to be displayed on the target screen, and the inference of chart content data required to display at least one chart view on the target screen based on the input text information includes: obtaining chart content data of the at least one chart view output by a large language model based on the text information, wherein the training samples of the large language model include multiple subjects and data sets corresponding to each subject, the data sets include at least one data display task and chart content data corresponding to the data display task, and the chart content data output by the large language model conforms to a preset data format.
3. The method according to claim 1, wherein: Determining a layout manner of the at least one chart view in the target screen includes: Generate a layout tree, wherein the layout tree includes a plurality of view nodes, one view node represents a chart type of a chart view and size information of the chart view in the target screen, and the plurality of view nodes are distributed in a plurality of levels; According to a layout template, a plurality of view nodes in the layout tree are mapped to different positions in the target screen, wherein the layout template includes position distribution of chart views of different chart types in one screen.
4. The method according to claim 3, wherein: The mapping of the plurality of view nodes in the layout tree to different positions in the target screen according to the layout template includes: Determining association relationships between graph views represented by different view nodes according to the layout template; Based on the association relationship, the position relationship of different chart views in the target screen is determined.
5. The method according to any one of claims 1 to 4, wherein: The step of displaying the generated chart view on the target screen in accordance with the layout method includes: Decorate the generated chart view; The decorated chart view is displayed on the target screen according to the layout.
6. The method according to claim 5, wherein: The decorating process of the generated chart view includes at least one of the following: Determine a theme color palette applied to the target screen according to the text information, and apply the theme color palette to the generated chart view; The image generation model is used to generate a material decoration image, and the material decoration image is used to perform decoration processing on the generated chart view.
7. An electronic device comprising a memory, a processor and a computer program stored in the memory, wherein the processor implements the method according to any one of claims 1 to 6 when executing the computer program.
8. A computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
9. A computer program product comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 6.
