Chart generation method, device, apparatus and storage medium

By receiving natural language text and using AI models to generate data query and chart codes, it automatically performs data query and transformation, solving the problem of high data usage threshold in existing tools and achieving convenient and efficient data visualization.

CN116152384BActive Publication Date: 2026-03-31BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-29
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

Existing data visualization tools have a high barrier to entry for users, requiring them to be familiar with the data source and accurately select data tables and fields, making it difficult to query data when they do not understand the data source.

Method used

By receiving natural language text input from users and using preset AI models to generate data query and chart generation code, the system automatically performs data queries and chart transformations, reducing users' dependence on data sources.

Benefits of technology

This allows users to generate data charts more easily and quickly, lowers the barrier to data use, and improves the efficiency and accuracy of data queries.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116152384B_ABST
    Figure CN116152384B_ABST
Patent Text Reader

Abstract

The present disclosure provides a chart generation method and device, equipment and storage medium, relates to the technical field of artificial intelligence, specifically relates to the technical field of natural language processing, deep learning and the like, can be applied to the scene of data visualization, big data monitoring and the like, and specific implementation schemes include: receiving a natural language text input by a user, the natural language text being used to indicate a target chart corresponding to target data; inputting the natural language text and metadata information into an AI model selected by the user, generating data query code and chart generation code corresponding to the natural language text through the AI model; executing the data query code to query data, obtaining the target data; executing the chart generation code to convert the target data into a chart, obtaining the target chart corresponding to the target data. The present disclosure can make the user more convenient and fast to visualize data and generate a data chart, and reduces the data use threshold.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of artificial intelligence technology, specifically to the fields of natural language processing and deep learning, and can be applied to scenarios such as data visualization and big data monitoring. In particular, it relates to a chart generation method, device, equipment, and storage medium. Background Technology

[0002] With the development of internet and information technology, and the widespread adoption of digitalization, various industries and fields have generated massive amounts of data. This data can be visualized using visualization tools. Due to the sheer volume of data, users need a thorough understanding of the vast data sources to effectively filter out the desired data fields and perform corresponding data analysis.

[0003] Currently, there are some data visualization tools that can visualize data and perform simple self-service data analysis, and support multiple types of charts.

[0004] However, current data visualization tools require users to be familiar with the data source and to be able to accurately select data tables and fields to perform operations, which raises the barrier to entry for using data. Summary of the Invention

[0005] This disclosure provides a chart generation method, apparatus, device, and storage medium that enables users to visualize data more conveniently and quickly, generate data charts, and lower the barrier to data use.

[0006] According to a first aspect of this disclosure, a chart generation method is provided, the method comprising: receiving natural language text input by a user, and receiving an operation from the user to select a target AI model from selectable preset AI models, wherein the natural language text is used to instruct the generation of a target chart corresponding to target data; inputting the natural language text and metadata information into the target AI model, and generating data query code and chart generation code corresponding to the natural language text through the target AI model; executing the data query code to perform data query and obtain target data; and executing the chart generation code to perform chart transformation on the target data and obtain the target chart corresponding to the target data.

[0007] According to a second aspect of this disclosure, a chart generation apparatus is provided, the apparatus comprising: an acquisition unit, a generation unit, an execution unit, and a response unit.

[0008] The acquisition unit is used to receive natural language text input by the user, and to receive the user's operation of selecting the target AI model from the available preset AI models. The natural language text is used to indicate the target chart corresponding to the target data to be generated.

[0009] The generation unit is used to input natural language text and metadata information into the target preset AI model, and generate data query code and chart generation code corresponding to the natural language text through the target AI model.

[0010] The execution unit is used to execute data query code to perform data queries and obtain target data; and to execute chart generation code to perform chart transformation on the target data and obtain the target chart corresponding to the target data.

[0011] The response unit is configured to, in response to a user's action of initiating the creation of a chart, display a first functional control and a second functional control, wherein the first functional control is used to trigger the creation of a new prompt template and the second functional control is used to trigger the search for a recommended prompt template; in response to the user's action of clicking the first functional control, display a text input box, or in response to the user's action of clicking the second functional control, display at least one recommended prompt template.

[0012] According to a third aspect of this disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the method as described in the first aspect.

[0013] According to a fourth aspect of this disclosure, a non-transitory computer-readable storage medium is provided storing computer instructions for causing a computer to perform the method according to the first aspect.

[0014] According to a fifth aspect of this disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements the method according to the first aspect.

[0015] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description

[0016] The accompanying drawings are provided to better understand this solution and do not constitute a limitation of this disclosure. Wherein:

[0017] Figure 1 A flowchart illustrating a chart generation method provided in an embodiment of this disclosure;

[0018] Figure 2 Another schematic diagram of the chart generation method provided in this disclosure embodiment;

[0019] Figure 3A schematic diagram of a user interface provided in an embodiment of this disclosure;

[0020] Figure 4 Another schematic diagram of the user interface provided in the embodiments of this disclosure;

[0021] Figure 5 A schematic diagram illustrating the implementation process of displaying a recommendation prompt template provided in an embodiment of this disclosure;

[0022] Figure 6 A schematic diagram illustrating the principle of the chart generation method provided in this embodiment of the disclosure;

[0023] Figure 7 A schematic diagram of the composition of the chart generation apparatus provided in the embodiments of this disclosure;

[0024] Figure 8 A schematic block diagram of an example electronic device 800 provided for implementation of embodiments of the present disclosure. Detailed Implementation

[0025] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.

[0026] It should be understood that in the embodiments of this disclosure, the character " / " generally indicates that the preceding and following objects are in an "or" relationship. The terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated.

[0027] With the development of internet and information technology, and the widespread adoption of digitalization, various industries and fields have generated massive amounts of data. This data can be visualized using visualization tools. Due to the sheer volume of data, users need a thorough understanding of the vast data sources to effectively filter out the desired data fields and perform corresponding data analysis.

[0028] For example, the vast amounts of data generated during a company's operations and production may include product information, sales data, target user group characteristics, talent management data, and so on. None of this data involves user privacy information. Users can be various roles, such as marketing personnel, brand managers, general managers, data engineers, and HR personnel. Even with the assistance of internal data dashboards and drag-and-drop analysis tools, and with a thorough understanding of the data source, users in these roles may select appropriate data fields when faced with large amounts of data. However, without understanding the data source, difficulties in retrieval and comprehension arise. In such cases, it is necessary to consult the data source producer to understand the meaning of the data tables before conducting analysis and forecasting.

[0029] Currently, there are some data visualization tools that can visualize data and perform simple self-service data analysis, and support multiple types of charts.

[0030] For example, some data visualization tools can visualize data and perform simple self-analysis. They can visualize data by creating views and generate various types of charts, including line charts, bar charts, pie charts, and so on.

[0031] However, current data visualization tools require users to be familiar with the data source and to be able to accurately select data tables and fields to perform operations, which raises the barrier to entry for using data.

[0032] For example, if a user wants to query the data such as "total sales volume and total sales revenue of product A in region C yesterday", the user needs to query the database for relevant information about product A and the relationship between product information and region C in all regions. If the user is not familiar with the data source or cannot accurately operate the data table, it will be very difficult to query the data results, and the threshold for querying data is high.

[0033] Against this background, this disclosure provides a chart generation method that enables users to visualize data more conveniently and quickly, generate data charts, and lower the barrier to data use.

[0034] For example, the entity executing this chart generation method can be a computer or server, or it can be other devices with data processing capabilities, such as mobile phones, computers, or other client devices. There is no limitation on the entity executing this method.

[0035] In some embodiments, the server can be a single server, or it can be a server cluster consisting of multiple servers. In some embodiments, the server cluster can also be a distributed cluster. This disclosure does not limit the specific implementation of the server.

[0036] Figure 1 This is a schematic flowchart illustrating a chart generation method provided in an embodiment of this disclosure. Figure 1 As shown, the method may include:

[0037] S101, receiving natural language text input by the user, and receiving the user's operation of selecting a target AI model from the available preset AI models, the natural language text being used to instruct the generation of a target chart corresponding to the target data.

[0038] For example, an input interface can be provided to the user for inputting natural language text. For instance, taking a server as the executing entity, the server can provide a front-end page as an input interface through a client (such as a mobile phone or computer). The front-end page can include an input box where the user can input natural language text. Alternatively, the user can also input natural language text via voice; there is no limitation on this. The server can receive the natural language text input by the user.

[0039] The natural language text input by the user can include natural language text of types such as Chinese and English.

[0040] Furthermore, it provides users with a drop-down menu on the output interface, allowing them to filter target AI models from the preset AI models to meet their query needs. The drop-down menu offers users multiple preset AI models to choose from, preset AI model versions, and preset AI model configuration preferences. As the product and preset AI models iterate, there will be multiple versions of preset AI models, and the same preset AI model will exhibit different behaviors depending on the configuration preferences, i.e., different parameters.

[0041] For example, the specific wording of the natural language text can affect the generated result of the target chart. For instance, when user A inputs "the sales trend of product A in the last 5 years", the generated target chart is very likely to be a line chart, while when user A inputs "the annual sales of product A in the last 5 years", the generated target chart is very likely to be a bar chart.

[0042] When users don't have a clear expectation of the target chart's generated result, but only a general idea, and when they want to make more exploratory attempts, they can try multiple times, each time choosing a different preset AI model, or selecting a configuration with diverse tendencies for a preset AI model. Conversely, when users have a clear intention, they can choose a specific preset AI model or a configuration with a rigorous tendency for a preset AI model.

[0043] The available preset AI models can be obtained by training a neural network using natural language text, some metadata, and corresponding data query code and chart generation code. For example, natural language text and metadata information can be used as input, and corresponding data query code and chart generation code can be used as output to train the AI ​​model and obtain the preset AI model. There are no restrictions on the implementation of the AI ​​model.

[0044] S102. Input the natural language text and metadata information into the target AI model, and generate the data query code and chart generation code corresponding to the natural language text through the target AI model.

[0045] For example, metadata information may include attribute information of data stored in the database, such as storage address and data name. The metadata information can be selected from database fields contained in the natural language text input by the user. The target AI model processes the natural language text and metadata to obtain data query code and chart generation code corresponding to the natural language text and metadata.

[0046] For example, user A can input natural language text such as "I want to query the sales of M brand mobile phones in City X yesterday and the sales of each sales site in District Y of City X". The natural language text is input into the target AI model, and the target AI model outputs the corresponding data query code and chart generation code.

[0047] S103. Execute the data query code to perform a data query and obtain the target data.

[0048] For example, after obtaining the data query code, the corresponding data query code is executed in the database to obtain the target data.

[0049] For example, after user A obtains the query code for the data they want to query, the database maintains the connection, executes the data query code, and generates the corresponding target data.

[0050] S104. Execute the chart generation code to transform the target data into a chart and obtain the target chart corresponding to the target data.

[0051] For example, after executing the data query code, the database outputs the target data. The chart generation code transforms the target data and generates various forms of target charts, such as line charts, bar charts, pie charts, etc.

[0052] For example, after the database retrieves the data results that user A wants to query, it executes the corresponding chart generation code, and after the chart generation code is completed, it outputs the target chart required by user A.

[0053] This embodiment of the disclosure receives natural language text input by the user and the user's action of selecting a target AI model from a selection of preset AI models. The natural language text and metadata information are input into the target AI model, which then generates data query code and chart generation code corresponding to the natural language text. The data query code is executed to perform a data query and obtain the target data. The chart generation code is executed to transform the target data into a chart, resulting in the target chart corresponding to the target data. This allows users to generate data charts simply by inputting natural language text, making it more convenient and faster for them to visualize data and generate charts, thus lowering the barrier to data use. For example, users can directly input natural language text to generate data charts even without understanding the data source.

[0054] Furthermore, in this embodiment of the disclosure, processing natural language text using a target AI model to generate data charts can significantly improve the efficiency of data chart generation. Adding metadata information to the input of the target AI model can also improve the efficiency and accuracy of data retrieval.

[0055] In some embodiments, the method further includes: in response to a user triggering an operation to start creating a chart, displaying a first functional control and a second functional control, the first functional control being used to trigger the creation of a new prompt template and the second functional control being used to trigger the search for a recommended prompt template; in response to a user clicking the first functional control, displaying a text input box, or in response to a user clicking the second functional control, displaying at least one recommended prompt template.

[0056] The above-mentioned S101 may include: receiving natural language text entered by the user in the text input box; or, receiving the target prompt template selected by the user from at least one recommended prompt template as natural language text; or, receiving the text after the user selects the target prompt template from at least one recommended prompt template and modifies the target prompt template as natural language text.

[0057] For example, Figure 2 This is another schematic flowchart illustrating the chart generation method provided in an embodiment of this disclosure.

[0058] like Figure 2 As shown, the method may include:

[0059] S201. In response to the user's operation of starting to create a chart, display a first function control and a second function control. The first function control is used to trigger the creation of a new prompt template, and the second function control is used to trigger the search for a recommended prompt template.

[0060] For example, a user interface can be provided to the user, allowing the user to initiate the creation of a chart. This user interface can be displayed on a computer or a mobile device.

[0061] Taking the display of the user interface on a computer as an example, Figure 3 This is a schematic diagram of a user interface provided in an embodiment of this disclosure. Figure 3 As shown, the computer can provide a user interface 301, which may include a "Start Creating" button 302. The user's action to trigger the creation of the chart can be a click on the "Start Creating" button 302. In S201, in response to the user clicking the "Start Creating" button 302, a first functional control and a second functional control can be displayed. For example, in response to the user clicking the "Start Creating" button 302, the display interface can be switched from user interface 301 to another user interface, such as interface A, which may include the first functional control and the second functional control.

[0062] Optionally, the "Start Creating" button 302 described above is only an example. In other examples, the "Start Creating" button 302 may also be other forms of buttons or areas used to trigger the creation of a chart, and there are no restrictions here.

[0063] Optionally, the user interface 301 may also include other elements or objects besides the "Start Creating" button 302, such as other components or functional controls, text, images, etc., which will not be described further.

[0064] S202. In response to the user clicking the first functional control, display a text input box; or, in response to the user clicking the second functional control, display at least one recommended prompt template.

[0065] For example, when a user is familiar with the data source, they can choose not to use the recommended prompt template and directly perform a data query, clicking the first function control to display a text input box; when a user is unfamiliar with the data source, they can choose to use the prompt template, clicking the second function control to select a recommended template for use.

[0066] Taking the display of the user interface on the computer as an example, in S201, in response to the user triggering the operation to start creating a chart, the first function control and the second function control can be displayed on other user interfaces. Figure 4 Another schematic diagram of the user interface provided in this embodiment of the disclosure. (See diagram below.) Figure 4 As shown, after a user performs the action to trigger the creation of a chart, the following can be displayed: Figure 4 The user interface 401 shown is an example. For instance, the one described above... Figure 3 In the example shown, in response to the user clicking the "Start Creating" button 302, the display interface can be switched from the user interface 301 to the user interface 401.

[0067] The user interface 401 may include a "Create New Prompt Template" button 402 and a "Find Prompt Template" button 403. The "Create New Prompt Template" button 402 can be referred to as the first functional control, and the "Find Prompt Template" button 403 can be referred to as the second functional control.

[0068] Users can click the "Create New Prompt Template" button 402 in the user interface 401. In response to the user clicking the "Create New Prompt Template" button 402, a text input box and a drop-down menu can be displayed, allowing the user to select the target AI model, the version of the target AI model, and the preferred configuration of the target AI model. For example, in response to the user clicking the "Create New Prompt Template" button 402, the user interface 401 can be switched to another user interface, such as interface B. Interface B may include a text input box and a drop-down menu, allowing the user to select the target AI model, the version of the target AI model, and the preferred configuration of the target AI model. Users can enter natural language text in the text input box or select a target AI model that matches their query needs from the drop-down menu.

[0069] Alternatively, the user can click the "Find Suggestion Template" button 403 in the user interface 401. In response to the user clicking the "Find Suggestion Template" button 403, at least one recommended suggestion template can be displayed. For example, in response to the user clicking the "Find Suggestion Template" button 403, the user interface 401 can be switched to another user interface, such as interface C, which may include at least one recommended suggestion template. The user can select a target suggestion template as natural language text from the at least one recommended suggestion template.

[0070] Optionally, users familiar with the data source can click the first function control to display a text input box, where they can enter text for subsequent operations; users unfamiliar with the data source can click the second function control to display at least one recommended prompt template, where they can select a target prompt template for subsequent operations.

[0071] Similarly, the "Create New Prompt Template" button 402 and the "Find Prompt Template" button 403 can also be other types of buttons or areas, used to trigger the display of a text input box and to display at least one recommended prompt template, respectively, without limitation.

[0072] S203. Receive natural language text entered by the user in the text input box; or, receive a target prompt template selected by the user from at least one recommended prompt template as natural language text; or, receive text after the user selects a target prompt template from at least one recommended prompt template and modifies the target prompt template as natural language text.

[0073] That is, in this embodiment, the user can input natural language text in any of the following ways: inputting in a text input box, selecting from a recommended prompt template, or selecting from a recommended prompt template and then modifying it.

[0074] For example, in the method of selecting from recommended suggestion templates, there can be multiple recommended suggestion templates. Users can select one template that meets or is close to their query needs as a natural language text reference, and fine-tune the natural language text corresponding to the selected target suggestion template to make it meet their query needs.

[0075] For example, if user A's query is "to query the total sales of product A in the past two days", and the recommended prompt template B has the natural language text "to query the total sales of product X in the past N months", the user can directly select recommended prompt template B as the target prompt template and appropriately adjust the natural language text corresponding to template B, modifying the natural language text of recommended prompt template B to "to query the total sales of product A in the past two days" as the natural language text input.

[0076] S204. Input the natural language text and metadata information into the target AI model, and generate the data query code and chart generation code corresponding to the natural language text through the target AI model.

[0077] S205. Execute the data query code to perform a data query and obtain the target data.

[0078] S206. Execute the chart generation code to transform the target data into a chart and obtain the target chart corresponding to the target data.

[0079] The above S204-S206 can be referred to as S102-S104 in the foregoing embodiments, and will not be repeated here.

[0080] In this embodiment, in response to a user's action to initiate chart creation, a first functional control and a second functional control are displayed. In response to a user clicking the first functional control, a text input box and a drop-down menu are displayed; alternatively, in response to a user clicking the second functional control, at least one recommended prompt template is displayed. This provides users with the option to actively input natural language text or select or modify a recommended prompt template as their natural language text, allowing for flexible choices in how they input natural language text. The recommended prompt template serves as a reference for users when inputting natural language text, ensuring that the input is more standardized and contains more relevant information. This enables users to generate corresponding visual charts more efficiently, conveniently, and accurately according to their needs.

[0081] In some embodiments, the action of displaying at least one recommended prompt template in response to the user clicking the second functional control in S202 above may include: displaying at least one of the following identification information in response to the user clicking the second functional control: chart type identifier, data theme identifier, data analysis indicator identifier, AI model identifier; and displaying at least one recommended prompt template corresponding to the target identifier in response to the user selecting at least one target identifier information.

[0082] For example, the second functional control can be Figure 4 In step 403, after the user clicks the second function control, in response to the user clicking the "Find Suggestion Template" button 403, at least one identifier can be displayed, such as: chart type identifier, data theme identifier, data analysis indicator identifier, AI model identifier, etc. Each identifier can correspond to at least one recommended suggestion template, and the user can select the appropriate recommended suggestion template according to their query needs. For example, the user can select one or more identifiers, and in response to the user's selection of at least one target identifier, at least one recommended suggestion template corresponding to the target identifier can be displayed.

[0083] For example, if user A's query is "to display the daily sales of product A over the past ten days using a bar chart," user A can first click the "Find Suggestion Template" button 403 on user interface 401. In response to the user clicking the "Find Suggestion Template" button 403, user interface 401 can be switched to another user interface, such as interface C. Interface C can include at least one identifier, such as "bar chart" or "product theme." The user can select either "bar chart" or "product theme." In response to the user's selection, at least one recommended suggestion template that meets both the criteria of "bar chart" and "product theme" can be displayed. The user can then select the target suggestion template as natural language text from the recommended templates that meet both criteria.

[0084] This embodiment provides users with a more accurate range of recommended prompt templates by responding to the user's click on the second functional control and displaying at least one identifier for each recommended prompt template, and by responding to the user's selection of target identifier information and displaying the recommended prompt template corresponding to the target identifier information. This allows users to select the appropriate recommended prompt template more accurately according to their needs, making the selection of recommended prompt templates faster and more accurate.

[0085] In some embodiments, S203 may further include: displaying at least one recommended prompt template when displaying the text input box.

[0086] For example, when displaying a text input box, at least one recommended suggestion template may also be displayed. The display of the at least one recommended suggestion template may include a dropdown list, such as displaying at least one recommended suggestion template via a dropdown list below the text input box.

[0087] For example, when a user enters natural language text through a text input box, they can also select one from the recommended templates displayed in the drop-down box as the natural language text, or select one and modify it as the natural language text.

[0088] This embodiment improves chart generation efficiency by displaying at least one recommended prompt template when the text input box is displayed, allowing users to refer to the natural language text in the recommended prompt template when entering natural language text through the text input box, or to select or modify the recommended prompt template as natural language text.

[0089] Figure 5 This is a schematic diagram illustrating the implementation process of displaying a recommendation prompt template, as provided in an embodiment of this disclosure. Figure 5 As shown, the step of displaying at least one recommended prompt template in any of the foregoing embodiments may include:

[0090] S501. Filter at least one recommended prompt template based on one or more of the following: user permissions, popularity of each recommended prompt template, and relevance of each recommended prompt template.

[0091] For example, different users have different permissions, and each user can view all recommended suggestion templates within their own permissions. The popularity of recommended suggestion templates can be statistically analyzed by the number of times each template is used within a certain period. The relevance of recommended suggestion templates can refer to recommended suggestion templates related to the currently logged-in user's role. Users can filter all recommended suggestion templates based on both their own permissions and the popularity and relevance of each template. Alternatively, users can filter all recommended suggestion templates only based on their own permissions. Alternatively, users can filter all recommended suggestion templates only based on the popularity of each template. Alternatively, users can filter all recommended suggestion templates only based on the relevance of each template.

[0092] For example, if user A's role is a marketing salesperson, and the user simultaneously uses user permissions and the popularity of each recommended suggestion template, the number of recommended suggestion templates within the marketing salesperson's permissions is 50. Based on the popularity of these 50 recommended suggestion templates, the top 10 most popular recommended suggestion templates are selected for display.

[0093] For example, if user B is an administrator, and the system only uses the popularity of each recommendation template, the system would select the top 10 most popular recommendation templates to display.

[0094] For example, if user C's role is HR, and we want to filter all recommended suggestion templates based solely on the user's own permissions, the number of recommended suggestion templates within the HR's permissions is 30. We will then select any 10 recommended suggestion templates from these 30 templates to display.

[0095] For example, if user d's role is a data engineer, and we filter all recommended suggestion templates based solely on their relevance, then out of all 100 recommended suggestion templates, only 30 will be relevant to user d's daily work. These 30 recommended suggestion templates relevant to user d's work will then be displayed.

[0096] S502. Display the recommended suggestion template after filtering.

[0097] For example, the 10 suggestion templates selected by users a, b, and c after filtering the recommended suggestion templates can be displayed on the user interface for users to choose from.

[0098] This embodiment filters recommended prompt templates based on one or more of the following factors: user permissions, popularity of recommended prompt templates, and relevance of each recommended prompt template. The filtered prompt templates are then displayed. This allows for more accurate recommendation of prompt templates to users based on these factors, enabling them to use the recommended prompt templates more quickly and accurately, further improving the efficiency of data chart generation.

[0099] In some embodiments, after the step of receiving natural language text entered by the user in the text input box as described in any of the foregoing embodiments, and / or after receiving the text modified by the user from at least one recommended prompt template as natural language text, the method may further include:

[0100] In response to the user's save operation of natural language text, the natural language text is saved as a recommended prompt template.

[0101] For example, after a user completes the chart generation, they can choose to save the natural language text of the generated chart. In response to the user's choice to save the natural language text, the natural language text is saved as a recommended prompt template.

[0102] For example, after user A completes the chart generation, the corresponding natural language text of the generated chart is "What is the monthly sales revenue of product A between 2020 and 2021? Generate the corresponding bar chart". User A can choose to save the natural language text "What is the monthly sales revenue of product A between 2020 and 2021? Generate the corresponding bar chart". In response to user A's choice to save the natural language text, the natural language text, the chart generated in response to the natural language text, AI model information, data theme, etc. are saved as a recommendation prompt template.

[0103] In this embodiment, after the chart is generated, the user can save the natural language text of the generated chart as their own recommendation prompt template, making it faster and more convenient for the user to search again.

[0104] In some embodiments, the method of saving natural language text as a recommended suggestion template includes:

[0105] Save the natural language text, target chart information, and target AI model information as a recommendation prompt template.

[0106] For example, when saving natural language text as a recommendation prompt template, the information of the target chart generated by the user during the process of generating the target chart based on the natural language text, the information of the target AI model, and the data theme, etc., which are related to the natural language text, can be saved in the recommendation prompt template to ensure the diversity of information when the user saves the natural language text.

[0107] For example, after user A completes the chart generation, the corresponding natural language text of the generated chart is "What is the monthly sales revenue of product B between 2020 and 2021? Generate the corresponding bar chart". User A can choose to save the natural language text "What is the monthly sales revenue of product B between 2020 and 2021? Generate the corresponding bar chart" as well as the information of the generated target chart, the information of the target AI model, and the data theme, etc., as recommended by the template.

[0108] In this embodiment, after the chart is generated, the user can choose to save the target chart information generated in response to the natural language text, the target AI model information, and other information related to the natural language text, such as the data theme, in the recommendation prompt template, while saving the natural language text. This greatly improves the diversity of information in the recommendation prompt template.

[0109] In some embodiments, the recommendation prompt templates described in the foregoing embodiments may include user-specific recommendation prompt templates and shared recommendation prompt templates. The step of saving natural language text as a recommendation prompt template may include: saving the natural language text as a user-specific recommendation prompt template, and / or, sharing a recommendation prompt template.

[0110] For example, a user-specific recommended suggestion template refers to a suggestion template unique to that user. For instance, a suggestion template library can be created for that user based on their user identifier (such as username, user ID, etc.). This user's suggestion template library can include one or more recommended suggestion templates corresponding to that user. These recommended suggestion templates will not be recommended to other users. A shared recommended suggestion template refers to a suggested suggestion template that different users can share. For instance, a shared suggestion template library can be created for multiple different users, and the shared recommended suggestion templates in this library can be recommended to each user.

[0111] After generating a chart, users can choose to save the natural language text of the generated chart. Alternatively, users can choose to save only the natural language text of the generated chart, but not share the natural language text of the generated chart as a recommended prompt template.

[0112] For example, after user A generates a chart, the corresponding natural language text for the generated chart is "What was the monthly sales revenue of product B between 2020 and 2021? Generate the corresponding bar chart." User A can choose to save the natural language text "What was the monthly sales revenue of product B between 2020 and 2021? Generate the corresponding bar chart" and also save it as a recommendation prompt template. Optionally, user A can save only the natural language text "What was the monthly sales revenue of product B between 2020 and 2021? Generate the corresponding bar chart" but not share it as a recommendation prompt template. Optionally, user A can choose not to save the natural language text "What was the monthly sales revenue of product B between 2020 and 2021? Generate the corresponding bar chart."

[0113] In this embodiment, after the chart is generated, the user can save the natural language text of the generated chart as their own recommendation prompt template, and / or share the recommendation prompt template, so that the user can query again more quickly and conveniently. At the same time, different users can share templates, making it faster and more convenient for users to query data.

[0114] In some embodiments, before the step of saving the natural language text as a shared recommendation prompt template, the method may further include: desensitizing the fields of the natural language text.

[0115] For example, natural language text may contain sensitive fields. When sharing natural language text as a recommendation prompt template, it is necessary to anonymize the fields in the natural language text.

[0116] For example, if user A wants to share the natural language text corresponding to the recommendation prompt template as "What is the monthly sales revenue of product B between 2020 and 2021, and generate the corresponding bar chart", then the query results for product B and sales revenue are sensitive fields. Therefore, the sensitive fields in the natural language text need to be desensitized before sharing the natural language text as the recommendation prompt template.

[0117] This embodiment ensures the security of user information by desensitizing the natural language text before the user shares it as a recommendation prompt template.

[0118] In some embodiments, prior to the above-described step of desensitizing fields in natural language text, the method may further include: displaying a prompt message instructing the user to select a desensitized field from the natural language text. The above-described step of desensitizing fields in natural language text may include: desensitizing the natural language text based on the desensitized field selected by the user.

[0119] For example, a prompt message can be displayed before fields in natural language text are anonymized.

[0120] In some implementations, a prompt message can be used to guide the user to anonymize fields in the natural language text. The user can select and delete sensitive fields from the natural language text. The aforementioned anonymization of natural language text based on the user-selected fields refers to updating the natural language text in response to the user's deletion of sensitive fields.

[0121] In other implementations, the prompt message may include sensitive fields from the natural language text. For example, sensitive fields in the natural language text can be identified according to preset sensitive field identification rules, without any restrictions on these rules. Users can selectively delete sensitive fields from the natural language text based on the prompt message.

[0122] For example, if user A wants to share a recommendation prompt template with the natural language text "What was the monthly sales revenue of product B between 2020 and 2021? Generate a corresponding bar chart," and the prompt message displays "Product B" and "Sales Revenue," the user can select all or part of the sensitive fields in the natural language text of the prompt message that need to be anonymized. Based on the user's selection of all or part of the sensitive fields in the prompt message, the natural language text is anonymized.

[0123] For example, user B wants to share the natural language text corresponding to the recommendation prompt template as "What was the monthly sales revenue of the M brand M1 model mobile phone between 2020 and 2021, and generate the corresponding bar chart?" According to the preset sensitive field identification rules, the sensitive fields identified in the natural language text are "M brand M1 model mobile phone" and "sales revenue". Based on the identified sensitive fields, the user selects "M brand M1 model mobile phone" and "sales revenue" as the sensitive fields that need to be desensitized. According to the sensitive fields selected by the user, the sensitive fields that need to be desensitized are desensitized. The natural language text generated after desensitization is: "What was the monthly sales revenue of product X between 2020 and 2021, and generate the corresponding bar chart?" The desensitized natural language text is then shared as a shared recommendation prompt template.

[0124] In this embodiment, the prompt message displays selectable fields for de-identification. Users can freely choose the fields to be de-identified from the prompt message and perform de-identification processing on the natural language text. This selectivity of the prompt message allows users to freely choose the sensitive fields that need to be de-identified, preventing users from forgetting to de-identify sensitive data before sharing natural language text and greatly ensuring user information security.

[0125] To make the solutions and effects of the embodiments disclosed herein clearer and more apparent, the following is combined with... Figure 6 The present invention will further illustrate the solution of the embodiments of this disclosure through a specific example.

[0126] Figure 6 This is a schematic diagram illustrating the principle of the chart generation method provided in this embodiment of the disclosure. Figure 6 As shown, in a specific example, the template search and management module may include a prompt template search module, an access control system module, a prompt template library module, a target prompt template module, and a module for saving as a new prompt template. The natural language to chart module may include an input text module, a prompt model triggering module, a module for converting to data query SQL code, a module for converting to chart generation code, a chart generation module, a target chart generation module, a query statement execution module, and a data return module. The model training module may include a prompt model module, an input module containing some original data text code, and a large model module. The aforementioned modules may be software modules, hardware modules, or a combination of both.

[0127] When a user enters the user operation page and selects to create a chart based on a shared prompt template, the prompt template search module in the template search and management module responds to the user's selection and sends a signal to the access control system module. The access control system module determines the user's permissions, and the prompt template library module searches for and displays recommended prompt templates based on the user's permissions. The user selects a target prompt template from the recommended prompt templates, and the target prompt template module retrieves the target prompt template information and displays it. After selecting a target prompt template, the user adjusts the natural language text in the target prompt template. The input text module in the natural language to chart module retrieves the natural language text and sends a signal to the prompt model triggering module. The prompt model triggering module, in conjunction with the metadata management system module, converts the natural language text into data query SQL code and chart generation code in the data query SQL code conversion module and the chart generation code conversion module, respectively. The query execution module executes the data query SQL code in the database and generates the query results. The data return module returns the query results to the chart generation code conversion module. The chart generation code conversion module generates the target chart based on the chart generation code and the query results. The chart generation module retrieves the target chart information and displays the target chart on the front-end page, ending the query.

[0128] When a user enters the user operation page and chooses not to create a chart based on a shared prompt template, the user can directly input text. The input text module in the Natural Language to Chart module acquires the natural language text and sends a signal to the prompt model triggering module. The prompt model triggering module, in conjunction with the metadata management system module, converts the natural language text into data query SQL code and chart generation code in the data conversion to chart generation code module and the chart generation code module, respectively. The query execution module executes the data query SQL code in the database and generates the query results. The data return module returns the query results to the chart generation code module. The chart generation code module generates the target chart based on the chart generation code and the query results. The chart generation module acquires the target chart information and displays the target chart on the front-end page, ending the query process.

[0129] When a user enters the user operation page and chooses not to create a chart based on a shared prompt template, the user can create a new prompt template. The input text module in the Natural Language to Chart module acquires the natural language text and sends a signal to the prompt model triggering module. The prompt model triggering module, in conjunction with the metadata management system module, converts the natural language text into data query SQL code and chart generation code in the data conversion to chart generation code module and the data query execution module, respectively. The query execution module executes the data query SQL code in the database and generates the query results. The data return module returns the query results to the chart generation code module. The chart generation code module generates the target chart based on the chart generation code and the query results. The chart generation module obtains the target chart information and displays the target chart on the front-end page, ending the query process.

[0130] The model training module includes input modules for metadata, text, and code. These input modules acquire partial raw data and text, along with corresponding code, and obtain pre-defined large model information. The large model module stores this information. The metadata, text, and code are then input into the large model for training, generating a prompting model—the aforementioned pre-defined AI model. After the prompting model module receives natural language text, it processes the text through the pre-defined AI model, outputting SQL query code and chart generation code. The pre-defined AI model can be saved in different versions during iterations, and its configuration can incorporate variations or rigor depending on the input parameters.

[0131] Optionally, after the target chart generation module completes its operation, the user can choose to save the target chart as a new prompt template. In this case, the template search and management module will store the target chart in the prompt template library.

[0132] In an exemplary embodiment, this disclosure also provides a chart generation apparatus that can be used to implement the chart generation method as described in the foregoing embodiments. Figure 7 This is a schematic diagram illustrating the composition of the chart generation apparatus provided in an embodiment of this disclosure. Figure 7 As shown, the device may include: an acquisition unit 701, a generation unit 702, an execution unit 703, and a response unit 704.

[0133] The acquisition unit 701 is used to receive natural language text input by the user, and to receive the user's operation of selecting a target AI model from the available preset AI models. The natural language text is used to indicate the generation of the target chart corresponding to the target data.

[0134] The generation unit 702 is used to input natural language text and metadata information into the target AI model, and generate data query code and chart generation code corresponding to the natural language text through the target AI model.

[0135] Execution unit 703 is used to execute data query code to perform data query and obtain target data; and execute chart generation code to perform chart transformation on the target data and obtain the target chart corresponding to the target data.

[0136] The response unit 704 is configured to respond to a user's action of initiating the creation of a chart by displaying a first functional control and a second functional control. The first functional control is used to trigger the creation of a new suggestion template, and the second functional control is used to trigger the search for a recommended suggestion template. It is also configured to respond to a user's click on the first functional control by displaying a text input box, or, optionally, respond to a user's click on the second functional control by displaying at least one recommended suggestion template.

[0137] Optionally, the natural language text receiving unit 701 is specifically used to receive the natural language text input by the user in the text input box. Alternatively, it can receive the target prompt template selected by the user from at least one recommended prompt template as the natural language text. Or, it can receive the text after the user selects the target prompt template from at least one recommended prompt template and modifies the target prompt template as the natural language text.

[0138] Optionally, in response to the user's click on the second functional control, at least one recommended prompt template is displayed. Specifically, the response unit 704 is used to display at least one of the following identification information in response to the user's click on the second functional control: chart type identifier, data theme identifier, data analysis indicator identifier, and AI model identifier; and to display at least one recommended prompt template corresponding to the target identifier information in response to the selection operation of at least one target identifier information among the identification information.

[0139] Optionally, the response unit 704 is also configured to display at least one recommended prompt template when the text input box is displayed.

[0140] Optionally, the response unit 704 is further configured to filter at least one recommended prompt template based on one or more of the user's permissions, the popularity of each recommended prompt template, and the relevance of each recommended prompt template; and display the filtered recommended prompt template.

[0141] Optionally, after receiving the natural language text entered by the user in the text input box, and / or after receiving the text after the user selects a target prompt template from at least one recommended prompt template and modifies the target prompt template as natural language text, the response unit 704 is further configured to save the natural language text as a recommended prompt template in response to the user's save operation on the natural language text.

[0142] Optionally, the step of saving the natural language text as a recommendation prompt template is specifically used by the response unit 704 to save the natural language text, the information of the target chart, and the information of the target AI model as a recommendation prompt template.

[0143] Optionally, the recommended prompt template includes a user-specific recommended prompt template and a shared recommended prompt template. The step of saving natural language text as a recommended prompt template, the response unit 704, is specifically used to save natural language text as a user-specific recommended prompt template and / or a shared recommended prompt template.

[0144] Optionally, before saving the natural language text as a shared recommendation prompt template, the response unit 704 is also used to perform field desensitization on the natural language text.

[0145] Optionally, before performing field anonymization on the natural language text, the response unit 704 is further configured to display a prompt message, which instructs the user to select anonymized fields from the natural language text. Specifically, the response unit 704 performs field anonymization on the natural language text based on the anonymized fields selected by the user.

[0146] The acquisition, storage, and application of user personal information involved in the technical solution disclosed herein comply with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0147] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.

[0148] In an exemplary embodiment, an electronic device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the method as described in the above embodiments.

[0149] In an exemplary embodiment, the readable storage medium may be a non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the method described in the above embodiments.

[0150] In an exemplary embodiment, the computer program product includes a computer program that, when executed by a processor, implements the method described in the above embodiments.

[0151] Figure 8 A schematic block diagram of an example electronic device 800 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0152] like Figure 8 As shown, the electronic device 800 includes a computing unit 801, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 802 or a computer program loaded from a storage unit 808 into a random access memory (RAM) 803. The RAM 803 may also store various programs and data required for the operation of the electronic device 800. The computing unit 801, ROM 802, and RAM 803 are interconnected via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.

[0153] Multiple components in electronic device 800 are connected to I / O interface 805, including: input unit 806, such as keyboard, mouse, etc.; output unit 807, such as various types of displays, speakers, etc.; storage unit 808, such as disk, optical disk, etc.; and communication unit 809, such as network card, modem, wireless transceiver, etc. Communication unit 809 allows electronic device 800 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0154] The computing unit 801 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 801 performs the various methods and processes described above, such as the graph generation method. For example, in some embodiments, the graph generation method may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 808. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 800 via ROM 802 and / or communication unit 809. When the computer program is loaded into RAM 803 and executed by the computing unit 801, one or more steps of the graph generation method described above may be performed. Alternatively, in other embodiments, the computing unit 801 may be configured to perform the graph generation method by any other suitable means (e.g., by means of firmware).

[0155] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0156] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0157] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0158] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0159] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with embodiments of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.

[0160] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, servers in distributed systems, or servers incorporating blockchain technology.

[0161] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.

[0162] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.

Claims

1. A chart generation method, the method comprising: receiving a natural language text input by a user, the natural language text being used to indicate generation of a target chart corresponding to target data, and receiving an operation of the user screening a target AI model from preset AI models available for selection; inputting the natural language text and metadata information into the target AI model, and generating, by the target AI model, a data query code and a chart generation code corresponding to the natural language text; executing the data query code to perform data query to obtain the target data; executing the chart generation code to perform chart conversion on the target data to obtain the target chart corresponding to the target data; in response to an operation of the user triggering start of creation of a chart, displaying a first function control and a second function control, the first function control being used to trigger creation of a new prompt template, and the second function control being used to trigger search for a recommended prompt template; in response to an operation of the user clicking the first function control, displaying a text input box, or in response to an operation of the user clicking the second function control, displaying at least one recommended prompt template; the receiving of the natural language text input by the user comprises: receiving the natural language text input by the user in the text input box; or, receiving a target prompt template selected by the user from the at least one recommended prompt template as the natural language text; or, receiving a text modified by the user after selection of a target prompt template from the at least one recommended prompt template as the natural language text; in response to the operation of the user clicking the second function control, displaying at least one of the following identification information: chart type identification, data theme identification, data analysis index identification, and AI model identification; in response to a selection operation on at least one target identification information in the identification information, displaying at least one recommended prompt template corresponding to the target identification information.

2. The method of claim 1, further comprising: when the text input box is displayed, displaying at least one recommended prompt template.

3. The method of any one of claims 1-2, the displaying of the at least one recommended prompt template comprising: screening the at least one recommended prompt template according to one or more of the following: a permission of the user, a heat of each of the recommended prompt templates, and a relevance of each of the recommended prompt templates; displaying the screened recommended prompt template.

4. The method of any one of claims 1-2, after the receiving of the natural language text input by the user in the text input box, and / or after the receiving of a text modified by the user after selection of a target prompt template from the at least one recommended prompt template as the natural language text, the method further comprising: in response to a save operation of the natural language text by the user, saving the natural language text as a recommended prompt template.

5. The method of claim 4, the saving of the natural language text as a recommended prompt template comprising: Save the natural language text, information of the target chart, and information of the target AI model as the recommended prompt template.

6. The method of claim 4, wherein the recommended prompt template comprises a recommended prompt template corresponding to the user and a shared recommended prompt template. The saving of the natural language text as a recommended prompt template comprises: Saving the natural language text as a recommended prompt template corresponding to the user and / or a shared recommended prompt template.

7. The method of claim 6, wherein before the saving of the natural language text as a shared recommended prompt template, the method further comprises: Field desensitization of the natural language text.

8. The method of claim 7, wherein before the field desensitization of the natural language text, the method further comprises: Displaying prompt information for indicating the user to select a desensitization field in the natural language text; The field desensitization of the natural language text comprises: Field desensitization of the natural language text according to the desensitization field selected by the user.

9. A chart generation apparatus, comprising: An acquisition unit configured to receive a natural language text input by a user, and receive an operation of the user selecting a target AI model from preset AI models available for selection, the natural language text being used to indicate generation of a target chart corresponding to target data; A generation unit configured to input the natural language text and metadata information into the target AI model, and generate data query code and chart generation code corresponding to the natural language text by the target AI model; An execution unit configured to execute the data query code to perform data query and obtain the target data; Execute the chart generation code to perform chart conversion on the target data, and obtain the target chart corresponding to the target data; A response unit configured to display a first function control and a second function control in response to an operation of the user triggering starting creation of a chart, the first function control being used to trigger creation of a new prompt template, and the second function control being used to trigger searching for a recommended prompt template; Display a text input box in response to an operation of the user clicking the first function control, or display at least one recommended prompt template in response to an operation of the user clicking the second function control; The acquisition unit is specifically configured to: Receive the natural language text input by the user in the text input box; Or, receive a target prompt template selected by the user from the at least one recommended prompt template as the natural language text; Or, receive a text modified by the user after selecting a target prompt template from the at least one recommended prompt template as the natural language text; Display at least one of the following identification information in response to an operation of the user clicking the second function control: a chart type identification, a data theme identification, a data analysis index identification, and an AI model identification. In response to a selection operation on at least one target identification information in the identification information, display at least one recommendation prompt template corresponding to the target identification information. 10.The apparatus of claim 9, wherein the response unit is further configured to: display the at least one recommendation prompt template when the text input box is displayed. 11.The apparatus of any one of claims 9-10, wherein the response unit is specifically configured to: filter the at least one recommendation prompt template according to one or more of the following: a permission of the user, a popularity of each of the recommendation prompt templates, and a relevance of each of the recommendation prompt templates; and display the filtered recommendation prompt template. 12.The apparatus of any one of claims 9-10, wherein after the response unit receives the natural language text input by the user in the text input box, and / or after the response unit receives the natural language text modified by the user after selecting a target prompt template from the at least one recommendation prompt template, the response unit is further configured to: in response to a save operation on the natural language text by the user, save the natural language text as a recommendation prompt template. 13.The apparatus of claim 12, wherein the response unit is specifically configured to: save the natural language text, information of the target graph, and information of the target AI model as the recommendation prompt template. at least one processor; 14. An electronic device comprising: and a memory connected with the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-8. 15.A non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the method of any one of claims 1-8. 16.A computer program product comprising a computer program which, when executed by a processor, implements the method of any one of claims 1-8. ​

Citation Information

Patent Citations

  • Information processing method and device, electronic equipment and storage medium

    CN113535931A

  • Chart abstract generation method and generation model training method and device

    CN115309888A