CN116152384A - Chart generation method, device, equipment and storage medium - Google Patents
Chart generation method, device, equipment and storage medium Download PDFInfo
- Publication number
- CN116152384A CN116152384A CN202310325224.9A CN202310325224A CN116152384A CN 116152384 A CN116152384 A CN 116152384A CN 202310325224 A CN202310325224 A CN 202310325224A CN 116152384 A CN116152384 A CN 116152384A
- Authority
- CN
- China
- Prior art keywords
- user
- natural language
- template
- target
- language text
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 66
- 238000006243 chemical reaction Methods 0.000 claims abstract description 13
- 230000004044 response Effects 0.000 claims description 54
- 230000006870 function Effects 0.000 claims description 28
- 238000000586 desensitisation Methods 0.000 claims description 16
- 238000004590 computer program Methods 0.000 claims description 14
- 238000012216 screening Methods 0.000 claims description 8
- 238000007405 data analysis Methods 0.000 claims description 7
- 230000001960 triggered effect Effects 0.000 claims description 6
- 238000013473 artificial intelligence Methods 0.000 abstract description 66
- 238000013079 data visualisation Methods 0.000 abstract description 11
- 238000013135 deep learning Methods 0.000 abstract description 2
- 238000012544 monitoring process Methods 0.000 abstract description 2
- 238000003058 natural language processing Methods 0.000 abstract description 2
- 239000000047 product Substances 0.000 description 29
- 238000010586 diagram Methods 0.000 description 12
- 238000012545 processing Methods 0.000 description 9
- 238000004891 communication Methods 0.000 description 8
- 238000004458 analytical method Methods 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 5
- 230000035945 sensitivity Effects 0.000 description 5
- 230000008569 process Effects 0.000 description 4
- 238000012549 training Methods 0.000 description 4
- 238000012800 visualization Methods 0.000 description 4
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 238000011161 development Methods 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 230000000007 visual effect Effects 0.000 description 2
- 238000003491 array Methods 0.000 description 1
- 238000013528 artificial neural network Methods 0.000 description 1
- 239000006227 byproduct Substances 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 230000002354 daily effect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000003203 everyday effect Effects 0.000 description 1
- 238000012804 iterative process Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 230000001953 sensory effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T11/00—2D [Two Dimensional] image generation
- G06T11/20—Drawing from basic elements, e.g. lines or circles
- G06T11/206—Drawing of charts or graphs
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/903—Querying
- G06F16/9032—Query formulation
- G06F16/90332—Natural language query formulation or dialogue systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/903—Querying
- G06F16/90335—Query processing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/903—Querying
- G06F16/9035—Filtering based on additional data, e.g. user or group profiles
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/903—Querying
- G06F16/9038—Presentation of query results
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (AREA)
- General Engineering & Computer Science (AREA)
- Mathematical Physics (AREA)
- Artificial Intelligence (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
The disclosure provides a chart generation method, a chart generation device, chart generation equipment and a chart generation storage medium, which relate to the technical field of artificial intelligence, in particular to the technical field of natural language processing, deep learning and the like, and can be applied to data visualization, big data monitoring and other scenes, wherein the specific implementation scheme comprises the following steps: receiving a natural language text input by a user, wherein the natural language text is used for indicating to generate a target chart corresponding to target data; inputting the natural language text and the metadata information into an AI model selected by a user, and generating a data query code and a chart generation code corresponding to the natural language text through the AI model; executing a data query code, and performing data query to obtain target data; executing the chart generating code, and performing chart conversion on the target data to obtain a target chart corresponding to the target data. The method and the device can enable the user to visualize the data more conveniently and rapidly, generate the data chart and reduce the data use threshold.
Description
Technical Field
The disclosure relates to the technical field of artificial intelligence, in particular to the technical fields of natural language processing, deep learning and the like, and can be applied to data visualization, big data monitoring and the like, in particular to a chart generation method, a chart generation device, chart generation equipment and a storage medium.
Background
With the development of internet technology and information technology, and the popularization of digitization. A large amount of data is generated in various industries and fields, and the data can be diagrammed by visualization tools. Because of the huge data volume, users need to fully know massive data sources in the process of data visualization, and data fields needing to be visualized can be screened out from massive data and corresponding data analysis is performed.
Currently, some data visualization tools exist, so that data visualization and simple data self-service analysis can be realized, and multiple types of charts are supported.
However, the current data visualization tools require users to be familiar with the data source, and the users to be able to accurately select accurate information such as the data table and the fields in the table to operate, so that the use threshold of the data is high.
Disclosure of Invention
The invention provides a chart generation method, a chart generation device, chart generation equipment and a storage medium, which can enable a user to more conveniently and rapidly visualize data to generate a data chart, and reduce the data use threshold.
According to a first aspect of the present disclosure, there is provided a chart generating method, the method comprising: receiving a natural language text input by a user, and receiving an operation of screening a target AI model from selectable preset AI models by the user, wherein the natural language text is used for indicating to generate a target chart corresponding to target data; inputting the natural language text and the metadata information into a target AI model, and generating a data query code and a chart generation code corresponding to the natural language text through the target AI model; executing a data query code, and performing data query to obtain target data; executing the chart generating code, and performing chart conversion on the target data to obtain a target chart corresponding to the target data.
According to a second aspect of the present disclosure, there is provided a chart generating apparatus including: the device comprises an acquisition unit, a generation unit, an execution unit and a response unit.
The acquisition unit is used for receiving a natural language text input by a user and receiving the operation of selecting a target AI model from selectable preset AI models by the user, wherein the natural language text is used for indicating to generate a target chart corresponding to target data.
The generation unit is used for inputting the natural language text and the metadata information into a target preset AI model, and generating a data query code and a chart generation code corresponding to the natural language text through the target AI model.
The execution unit is used for executing the data query code, and performing data query to obtain target data; executing the chart generating code, and performing chart conversion on the target data to obtain a target chart corresponding to the target data.
The response unit is used for responding to the operation of starting to create the chart triggered by the user, displaying a first functional control and a second functional control, wherein the first functional control is used for triggering a newly-built prompt template, and the second functional control is used for triggering searching the recommended prompt template; and displaying a text input box in response to the operation of clicking the first functional control by the user, or displaying at least one recommendation prompt template in response to the operation of clicking the second functional control by the user.
According to a third aspect of the present disclosure, there is provided an electronic device comprising: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform a method as in the first aspect.
According to a fourth aspect of the present disclosure, there is provided a non-transitory computer readable storage medium storing computer instructions for causing a computer to perform the method according to the first aspect.
According to a fifth aspect of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the method according to the first aspect.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the disclosure, nor is it intended to be used to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the following specification.
Drawings
The drawings are for a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
fig. 1 is a schematic flow chart of a chart generating method according to an embodiment of the disclosure;
FIG. 2 is another flow chart of a chart generation method according to an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of a user interface provided by an embodiment of the present disclosure;
FIG. 4 is another schematic diagram of a user interface provided by an embodiment of the present disclosure;
fig. 5 is a schematic diagram of an implementation flow for displaying a recommendation alert template according to an embodiment of the present disclosure;
FIG. 6 is a schematic diagram of a graph generation method provided by an embodiment of the present disclosure;
fig. 7 is a schematic diagram of the composition of a chart generating device provided in an embodiment of the present disclosure;
fig. 8 is a schematic block diagram of an example electronic device 800 that may be used to implement embodiments of the present disclosure provided by embodiments of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present disclosure to facilitate understanding, and should be considered as merely exemplary. Accordingly, one of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
It should be appreciated that in embodiments of the present disclosure, the character "/" generally indicates that the context associated object is an "or" relationship. The terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated.
With the development of internet technology and information technology, and the popularization of digitization. A large amount of data is generated in various industries and fields, and the data can be diagrammed by visualization tools. Because of the huge data volume, users need to fully know massive data sources in the process of data visualization, and data fields needing to be visualized can be screened out from massive data and corresponding data analysis is performed.
For example, among the large amount of data that a company may generate in business and production, there may be included large amount of data generated by product information data, sales situation data, target user group feature data, talent management data, and the like, all of which do not relate to user privacy data. The roles of the users may include the personnel of various roles of marketers, brand managers, administrators, data engineers, HRs, and the like. When a person having various roles faces a large amount of data, even if the person has a sufficient knowledge of the data source with the help of various data dashboards inside the company, a drag-and-drop-autonomous analysis tool, etc., the person has to search for a difficult data source and understand the data source without knowing the data source, and at this time, the person needs to ask the producer of the data source to understand the meaning of the data table, and can develop the works such as analysis and prediction.
Currently, some data visualization tools exist, so that data visualization and simple data self-service analysis can be realized, and multiple types of charts are supported.
For example, in the data visualization tools, some tools can realize the visualization and simple autonomous analysis of data, the visualization of the data can be realized by establishing views, and the generated multi-type charts can comprise charts in the forms of line charts, bar charts, pie charts and the like.
However, the current data visualization tools require users to be familiar with the data source, and the users to be able to accurately select accurate information such as the data table and the fields in the table to operate, so that the use threshold of the data is high.
For example, the data that the user wants to query may be "total sales and total sales of yesterday product a in region c", the user needs to query the related information of product a and the related relationship between the product information and region c in all regions in the database, when the user is unfamiliar with the data source or cannot operate the data table accurately, it is very difficult to query the data result, and the threshold of querying the data is high.
Under the background technology, the method for generating the chart can enable a user to more conveniently and rapidly visualize data to generate a data chart, and reduce the data use threshold.
The main body of the chart generating method may be a computer or a server, or may be other devices with data processing capability, for example, may be a mobile phone, a computer, or other client devices. The subject of execution of the method is not limited herein.
In some embodiments, the server may be a single server, or may be a server cluster formed by a plurality of servers. In some implementations, the server cluster may also be a distributed cluster. The present disclosure is not limited to a specific implementation of the server.
Fig. 1 is a schematic flow chart of a chart generating method according to an embodiment of the disclosure. As shown in fig. 1, the method may include:
s101, receiving a natural language text input by a user, and receiving an operation of screening a target AI model from selectable preset AI models by the user, wherein the natural language text is used for indicating generation of a target chart corresponding to target data.
For example, an input interface may be provided for a user to input natural language text. For example, taking a server as an execution subject, the server may provide a front-end page for a user through a client (such as a mobile phone or a computer) as an input interface, where the front-end page may include an input box, and the user may input natural language text in the input box. Alternatively, the user may input natural language text by voice, without limitation. The server may receive natural language text entered by the user.
The natural language text input by the user may include chinese, english, and other types of natural language text.
And a drop-down menu can be provided for the user on the output interface, and the drop-down menu is used for the user to screen a target AI model meeting the query requirement of the user in the preset AI models, and a plurality of selectable preset AI models, preset AI model versions and preset AI model configuration trends can be provided for the user in the drop-down menu. Along with iteration of the product and iteration of the preset AI model, the preset AI model has multiple versions, and the same preset AI model has different performances when the configuration trend, namely different parameters, is adopted.
For example, specific terms of natural language text may affect the outcome of the generation of the target graph, such as: when the natural language text input by the user a is the 'last 5 years sales tendency of the product A', the generation result of the target chart is a line graph with high probability, and when the natural language text input by the user a is the 'last 5 years sales tendency of the product A', the generation result of the target chart is a bar graph with high probability.
When the user has no explicit expectation of the target graph generation result and only a general idea, and when the user wants to make more exploratory attempts, the user can make multiple attempts, and each time can select a different preset AI model, or select a configuration of diversification tendency of a certain preset AI model. Conversely, when the user intent is explicit, the user may select an explicit preset AI model or a configuration of strict trends of some preset AI model.
The alternative preset AI model may be obtained by training the neural network using natural language text, partial metadata, and corresponding data query codes and chart generation codes. For example, natural language text, metadata information, and the like may be used as inputs, corresponding data query codes and chart generation codes may be used as outputs, and the AI model may be trained to obtain a preset AI model, where implementation of the AI model is not limited.
S102, inputting the natural language text and the metadata information into a target AI model, and generating a data query code and a chart generation code corresponding to the natural language text through the target AI model.
Illustratively, the metadata information may include attribute information of data stored for the database, such as: storage addresses, data names, etc., wherein the metadata information may be selected in some database fields included in the natural language text entered by the user. And processing the natural language text and the metadata by using the target AI model to obtain a data query code and a chart generation code corresponding to the natural language text and the metadata.
For example, the natural language text input by the user a may be "i want to query the sales situation of the M-brand mobile phone in the X city and the sales situation of each sales site in the Y region of the X city" in yesterday, and the natural language text is input into the target AI model, and the target AI model outputs the corresponding data query code and the chart generation code.
S103, executing a data query code, and performing data query to obtain target data.
Illustratively, after the data query codes are obtained, the corresponding data query codes are executed in the database to obtain the target data.
For example, after the user a obtains the query code of the data to be queried, the database remains linked, and executes the data query code to generate corresponding target data.
S104, executing a chart generation code, and performing chart conversion on the target data to obtain a target chart corresponding to the target data.
Illustratively, the database outputs the target data after executing the data query code. The chart generating code converts the target data and generates various forms of target charts of the corresponding target data, wherein the forms of the target data can be line charts, bar charts, pie charts and the like.
For example, the database executes the corresponding chart generation code after inquiring the data result which the user a wants to inquire, and outputs the target chart required by the user a after the execution of the chart generation code is completed.
According to the embodiment of the disclosure, through receiving the natural language text input by a user and receiving the operation of screening the target AI model from the selectable preset AI models by the user, inputting the natural language text and metadata information into the target AI model, and generating a data query code and a chart generation code corresponding to the natural language text through the target AI model. Executing the data query code, performing data query to obtain target data, executing the chart generation code, performing chart conversion on the target data to obtain a target chart corresponding to the target data, so that a user can generate the data chart according to the natural language text only by inputting the natural language text, thereby enabling the user to more conveniently and rapidly visualize the data, generating the data chart, and reducing the data use threshold. For example, the user may also directly input natural language text to generate a data chart without knowing the data source.
In addition, in the embodiment of the disclosure, the natural language text is processed through the target AI model to generate the data chart, so that the generation efficiency of the data chart can be greatly improved. Metadata information is added into the input of the target AI model, so that the efficiency and accuracy of data query can be improved.
In some embodiments, the method further comprises: responding to the operation of starting to create the chart triggered by the user, displaying a first functional control and a second functional control, wherein the first functional control is used for triggering a newly built prompt template, and the second functional control is used for triggering searching a recommended prompt template; and displaying a text input box in response to the operation of clicking the first functional control by the user, or displaying at least one recommendation prompt template in response to the operation of clicking the second functional control by the user.
The S101 may include: receiving natural language text input by a user in a text input box; or receiving a target prompt template selected by a user from at least one recommended prompt template as a natural language text; or, after receiving that the user selects the target prompt template from the at least one recommended prompt template, the text modified by the target prompt template is used as the natural language text.
For example, fig. 2 is another flow chart of a chart generating method according to an embodiment of the disclosure.
As shown in fig. 2, the method may include:
s201, responding to the operation of starting to create the chart triggered by a user, displaying a first functional control and a second functional control, wherein the first functional control is used for triggering a newly built prompt template, and the second functional control is used for triggering searching the recommended prompt template.
For example, a user may be provided with a user interface at which the user may perform an operation that triggers the start of creation of a chart. The user operation interface can be displayed on a computer end or a mobile phone end.
Taking a user operation interface displayed on a computer end as an example, fig. 3 is a schematic diagram of the user operation interface provided in an embodiment of the disclosure. As shown in fig. 3, the computer side may provide a user operation interface 301 for a user, and the user operation interface 301 may include a "start creation" button 302. The above-described user-triggered operation to start creation of the chart may be a click operation on the "start creation" button 302. In S201, the first and second functionality controls may be displayed in response to the user clicking the "start creation" button 302. For example, the display interface may be switched from the user operation interface 301 to another user operation interface, such as interface a, which may include a first functionality control and a second functionality control, in response to a user clicking on the "start create" button 302.
Alternatively, the "start creation" button 302 is merely an example, and in other examples, the "start creation" button 302 may be another type of button or area for triggering the start of creation of a chart, which is not limited herein.
Optionally, elements or objects other than the "start create" button 302 may be included in the user operation interface 301, such as other components or functionality controls, text, pictures, etc., which are not further described.
And S202, displaying a text input box in response to the operation of clicking the first functional control by the user, or displaying at least one recommendation prompt template in response to the operation of clicking the second functional control by the user.
For example, when the user is familiar with the data source, the user can choose to directly query the data without using the recommendation prompt template, and click on the first functional control to display a text input box; when the user is unfamiliar with the data source, the user can select the use prompt template and click on the second function control to select the recommendation template for use.
Also taking the example that the user operation interface is displayed on the computer end, in S201, the operation of starting to create the chart in response to the user trigger may display the first function control and the second function control on other user operation interfaces. Fig. 4 is another schematic diagram of a user operation interface provided in an embodiment of the present disclosure. As shown in fig. 4, when the user performs an operation of triggering the start of creation of a chart, a user operation interface 401 shown in fig. 4 may be displayed. For example, in the example shown in fig. 3 described above, the display interface may be switched from the user operation interface 301 to the user operation interface 401 in response to the user clicking the "start creation" button 302.
The user operation interface 401 may include a "new prompt template" button 402 and a "find prompt template" button 403. Wherein the "new prompt template" button 402 may be referred to as a first functionality control and the "find prompt template" button 403 may be referred to as a second functionality control.
The user may click on the "new alert template" button 402 in the user operation interface 401. In response to a user clicking on the "New prompt template" button 402, a text entry box may be displayed, along with a drop-down menu for the user to select the target AI model, the version of the target AI model, and the target AI model trend configuration. For example, in response to a user clicking on the "new prompt template" button 402, the user operation interface 401 may be switched to other user operation interfaces, such as interface B, which may include a text entry box and a drop-down menu in which the user may select the target AI model, a version of the target AI model, and a trend configuration of the target AI model. The user can input natural language text in a text input box or select a target AI model meeting the requirement of self-query in a drop-down menu.
Alternatively, the user may click on the "find alert template" button 403 in the user operation interface 401. In response to a user clicking on the "find alert template" button 403, at least one recommended alert template may be displayed. For example, the user operation interface 401 may be switched to other user operation interfaces, such as interface C, which may include at least one recommendation alert template, in response to a user clicking on the "find alert template" button 403. The user may select a target hint template from the at least one recommended hint template as natural language text.
Optionally, a user familiar with the data source can select to click on the first function control, a text input box is displayed, and the user inputs text to perform subsequent operations; a user unfamiliar with the data source can select to click on the second functionality control, at least one recommendation alert template is displayed, and subsequent operations are performed after the user selects the target alert template.
Similarly, the "new alert template" button 402 and the "find alert template" button 403 may be other types of buttons or areas for triggering the display of a text entry box and the display of at least one recommended alert template, respectively, and are not limited in this regard.
S203, receiving natural language text input by a user in a text input box; or receiving a target prompt template selected by a user from at least one recommended prompt template as a natural language text; or, after receiving that the user selects the target prompt template from the at least one recommended prompt template, the text modified by the target prompt template is used as the natural language text.
That is, in the present embodiment, the manner in which the user inputs the natural language text may be any one of inputting in a text input box, selecting from a recommendation alert template, and modifying after selecting from a recommendation alert template.
In an exemplary manner, the recommendation prompt template may be a plurality of recommendation prompt templates, and the user may select one template meeting or approaching the query requirement of the user from the plurality of recommendation prompt templates as a natural language text reference, and fine-tune the natural language text corresponding to the selected target prompt template to adjust to the natural language text meeting the query requirement of the user.
For example, the query requirement of the user a is "total sales of the product a in the last two days" and the natural language text of the recommendation prompt template B is "total sales of the product X in the last N months" in the recommendation prompt template, the user may directly select the recommendation prompt template B as the target prompt template, and appropriately adjust the natural language text corresponding to the template B, and modify the natural language text of the recommendation prompt template B to "total sales of the product a in the last two days" as the natural language text input.
S204, inputting the natural language text and the metadata information into a target AI model, and generating a data query code and a chart generation code corresponding to the natural language text through the target AI model.
S205, executing a data query code, and performing data query to obtain target data.
S206, executing a chart generation code, and performing chart conversion on the target data to obtain a target chart corresponding to the target data.
The above S204-S206 may refer to S102-S104 in the foregoing embodiments, and will not be described herein.
In this embodiment, the first function control and the second function control are displayed in response to the user triggering to start the operation of creating the chart, and the text input box and the drop-down menu are displayed in response to the user clicking on the first function control, or at least one recommendation prompt template is displayed in response to the user clicking on the second function control, so that a mode of actively inputting natural language text, or a mode of selecting or modifying the recommendation prompt template as natural language text, and the like can be provided for the user to flexibly select and input the natural language text. The recommendation prompt template can be used for a user to refer to the input natural language text, so that the natural language text input by the user is more standard and contains more effective information, and the user can generate a corresponding visual chart according to the needs of the user more efficiently, conveniently and accurately.
In some embodiments, the displaying at least one recommendation alert template in response to the operation of clicking the second function control by the user in S202 may include: and responding to the operation of clicking the second function control by the user, and displaying at least one piece of identification information as follows: chart type identification, data topic identification, data analysis index identification and AI model identification; and responding to the selection operation of at least one piece of target identification information in the identification information, and displaying at least one recommendation prompt template corresponding to the target identification information.
Illustratively, the second function control may be 403 in fig. 4, and after the user clicks the second function control, at least one identification information may be displayed in response to the user clicking the "find alert template" button 403, for example: chart type identification, data topic identification, data analysis index identification, AI model identification, and the like. Each piece of identification information can correspond to at least one recommendation prompt template, and a user can select the recommendation prompt template corresponding to the proper identification information according to the query requirement. For example, the user may select one or more identification information, and in response to a user selection operation of at least one target identification information of the identification information, at least one recommendation alert template corresponding to the target identification information may be displayed.
For example, the query requirement of the user a is "showing sales of the product a every day in the past ten days in a bar chart", and first, the user a may click on the "find prompt template" button 403 in the user operation interface 401. The user operation interface 401 may be switched to other user operation interfaces, such as an interface C, in response to the user clicking on the "find alert template" button 403, where the interface C may include at least one identification information, such as: "histogram", "product topic", etc. The user can select two identification information of the 'histogram' and the 'product theme', and at least one recommendation prompt template which accords with the 'histogram' and contains the 'product theme' simultaneously can be displayed in response to the operation of selecting the 'histogram' and the 'product theme' by the user. The user can select a target prompt template from the recommended prompt templates which simultaneously accord with the bar graph and contain the product theme as natural language text.
According to the embodiment, by responding to the operation of clicking the second function control by the user, displaying at least one identification information of each recommendation prompt template and responding to the operation of selecting the target identification information by the user, displaying the recommendation prompt template corresponding to the target identification information, a more accurate selection range of the recommendation prompt template can be provided for the user, the user can select a proper recommendation prompt template more accurately according to the own requirements, and the selection of the recommendation prompt template is quicker and more accurate.
In some embodiments, S203 may further include: at least one recommendation alert template is displayed while the text entry box is displayed.
For example, at least one recommendation alert template may also be displayed when the text entry box is displayed. The display mode of the at least one recommendation prompt template can comprise a drop-down box display mode, such as that the at least one recommendation prompt template is displayed under the text input box through a drop-down box.
For example, when the user inputs a natural language text through the text input box, one of the recommended prompt templates displayed in the drop-down box may be selected as the natural language text, or one of the recommended prompt templates may be selected and modified as the natural language text.
According to the method and the device, when the text input box is displayed, at least one recommendation prompt template is displayed, so that a user can refer to the natural language text in the recommendation prompt template when inputting the natural language text through the text input box, or select or modify the recommendation prompt template as the natural language text, and the chart generation efficiency is further improved.
Fig. 5 is a schematic implementation flow chart of displaying a recommendation alert template according to an embodiment of the present disclosure. As shown in fig. 5, the step of displaying at least one recommendation alert template according to any of the foregoing embodiments may include:
s501, screening at least one recommendation prompt template according to one or more of the authority of the user, the heat degree of each recommendation prompt template and the relativity of each recommendation prompt template.
Illustratively, different users possess different rights, each user can view all recommendation alert templates within his own rights; the statistical mode of recommending the heat of the prompting templates can be the using times of each template in a period of time; the relevance of the recommendation alert template may refer to the recommendation alert template that is related to the role of the current logged-in user. All the recommendation prompt templates can be screened based on the heat degree of each recommendation prompt template and the correlation of the recommendation prompt templates under the condition of self permission. Alternatively, all recommendation templates may be screened only according to the user's own rights. Alternatively, all the recommendation alert templates may be screened based only on the geothermal level of each recommendation alert template. Alternatively, all the recommendation alert templates may be screened based only on the relevance of each recommendation alert template.
For example, the role of the user a is a marketer, taking the use of the user authority and the heat degree of each recommendation prompt template as an example, the number of recommendation prompt templates in the authority of the marketer is 50, and meanwhile, the first 10 recommendation prompt templates with the highest heat degree are selected and displayed based on the heat degrees of the 50 recommendation prompt templates.
For another example, the role of the user b is a manager, and the first 10 recommendation alert templates with the highest heat are selected and displayed by taking the heat of each recommendation template as an example.
For another example, the role of the user c is HR, and for example, all recommendation prompt templates are screened only according to the user's own authority, the number of recommendation prompt templates within the HR authority is 30, and any 10 recommendation prompt templates are selected from the 30 templates to be displayed.
For another example, the role of the user d is a data engineer, and all the recommendation alert templates are screened according to the relevance of each recommendation alert template, and among all the 100 recommendation alert templates, the recommendation alert templates related to the daily work of the user d only comprise 30 recommendation alert templates, and the 30 recommendation alert templates related to the work of the user d are displayed.
S502, displaying the screened recommendation prompt template.
For example, the 10 prompt templates of the user a, the user b and the user c after screening the recommended prompt templates are displayed in a user operation interface respectively for selection by the user.
According to the embodiment, the recommendation prompt templates are screened through one or more of the user's own authority, the heat of the recommendation prompt templates and the correlation of each recommendation prompt template, and the screened recommendation prompt templates are displayed, so that the recommendation prompt templates can be recommended to the user more accurately according to one or more of the user's authority, the heat of the recommendation prompt templates and the correlation of each recommendation prompt template, the user can use the recommendation prompt templates more quickly and accurately, and the data chart generation efficiency is further improved.
In some embodiments, after the step of receiving the natural language text input by the user in the text input box and/or after the step of receiving the text modified by the target alert template as the natural language text after the user selects the target alert template from the at least one recommended alert template, the method may further include:
And responding to the saving operation of the user on the natural language text, and saving the natural language text as a recommendation prompt template.
For example, after the user completes the chart generation, the user may choose to save the natural language text that generated the chart, and in response to the user selecting the operation to save the natural language text, the natural language text is saved as the recommendation alert template.
For example, after the user a completes the chart generation, the corresponding natural language text for generating the chart is "between 2020 and 2021, the sales amount of the product a in each month is what, and a corresponding histogram is generated", the user a may select to store the natural language text "between 2020 and 2021, the sales amount of the product a in each month is what, and generate the corresponding histogram", and store the natural language text, the generated chart and AI model information, the data subject and the like in response to the selection of the user a as the recommendation prompt template.
In this embodiment, after the chart is generated, the user may save the natural language text for generating the chart as the recommendation prompt template according to his own will, so that the user may perform the query again more quickly and conveniently.
In some embodiments, the storing the natural language text as a recommendation alert template includes:
and saving the natural language text, the information of the target chart and the information of the target AI model as a recommendation prompt template.
For example, when the natural language text is saved as the recommendation prompt template, the information of the generated target chart, the information of the target AI model, the information related to the natural language text such as the data theme and the like in the process of generating the target chart according to the natural language text by the user can be saved in the recommendation prompt template at the same time, so that the diversity of the information when the natural language text is saved by the user is ensured.
For example, after the user a completes the chart generation, the corresponding natural language text for generating the chart is "between 2020 and 2021, the sales amount of the product B per month is what, and the corresponding histogram is generated", and the user a may select how much the sales amount of the product B per month is between 2020 and 2021 with the natural language text "between 2020 and 2021", and generate the corresponding histogram "and save the information of the generated target chart, the information of the target AI model, the data subject, and the like for the recommendation prompt template.
In this embodiment, after the chart generation is completed, the user may select to save the natural language text, and save the information of the target chart generated in response to the natural language text, the information of the target AI model, the information related to the natural language text such as the data subject, and the like in the recommendation prompt template, so that the diversity of the information in the recommendation prompt template is greatly improved.
In some embodiments, the recommendation alert template described in the foregoing embodiments may include a recommendation alert template corresponding to the user and a sharing recommendation alert template. The step of saving the natural language text as the recommendation alert template may include: and saving the natural language text as a recommendation prompt template corresponding to the user and/or sharing the recommendation prompt template.
By way of example, the recommendation alert template corresponding to the user refers to a recommendation alert template specific to the user, for example, a alert template library may be established for the user based on the user identification (such as the user name, the user ID, etc.) of the user, where one or more recommendation alert templates corresponding to the user may be included in the alert template library of the user, and the recommendation alert templates in the alert template library of the user are not recommended to other users. The sharing recommendation prompt template refers to a recommendation prompt template which can be shared by different users, for example, a sharing prompt template library can be established for a plurality of different users, and the sharing recommendation prompt template in the sharing prompt template library can recommend to each user.
After completing the chart generation, the user may select natural language text for generating the chart. Alternatively, after the chart generation is completed, the user may choose to save only the natural language text for generating the chart, but not share the natural language text for generating the chart as the recommendation alert template.
For example, after the user a completes the chart generation, the corresponding natural language text for generating the chart is "between 2020 and 2021, the sales amount of the product B in each month is what, and a corresponding histogram is generated", and the user a may select to store the natural language text "between 2020 and 2021, the sales amount of the product B in each month is what, and generate the corresponding histogram" and store the natural language text as the recommendation alert template. Alternatively, user a may save the natural language text "between 2020 and 2021, the sales of product B per month is what, and generate a corresponding histogram" save only, but not share as a recommendation alert template. Alternatively, user a may generate a corresponding histogram of the natural language text "between 2020 and 2021, on what sales are per month for product B" without saving.
In this embodiment, after the chart is generated, the user may save the natural language text for generating the chart as the recommendation prompt template according to his own will, and/or share the recommendation prompt template, so that the user may perform the query again more quickly and conveniently, and meanwhile, different users may perform template sharing, so that the query data between users is faster and more convenient.
In some embodiments, before the step of saving the natural language text as the shared recommendation alert template, the method may further include: field desensitization is performed on natural language text.
For example, the natural language text may include a corresponding sensitive field, and when the natural language text is shared as a recommendation prompt template, the natural language text needs to be subjected to field desensitization.
For example, the user a needs to share the natural language text corresponding to the recommendation prompt template as "between 2020 and 2021, what sales of the product B are in each month, and generate a corresponding histogram", where the query results of the product B and sales are sensitive fields, and the sensitive fields in the natural language text need to be desensitized before the natural language text is shared as the recommendation prompt template.
According to the embodiment, the natural language text is desensitized before the user shares the natural language text as the recommendation prompt template, so that the safety of user information is ensured.
In some embodiments, before the step of field desensitizing the natural language text, the method may further include: and displaying prompt information, wherein the prompt information is used for indicating a user to select a desensitization field in the natural language text. The step of field desensitizing the natural language text may include: and field desensitization is carried out on the natural language text according to the desensitization field selected by the user.
For example, a prompt may be displayed prior to desensitizing a field in natural language text.
In some implementations, the hint information may be used to prompt the user to field desensitize the natural language text. The user may select and delete sensitive fields in the natural language text. The field desensitization of the natural language text according to the desensitization field selected by the user refers to: and updating the natural language text in response to the operation of deleting the sensitive field by the user.
In other implementations, the hint information may include sensitive fields in natural language text. For example, the sensitive fields in the natural language text may be identified according to a preset sensitive field identification rule, where the sensitive field identification rule is not limited. The user can selectively delete sensitive fields in the natural language text according to the prompt information.
For example, the user a shares the natural language text corresponding to the recommended prompt template as "between 2020 and 2021, the sales of the product B in each month is what, and a corresponding bar chart is generated", and the prompt information displayed in the prompt information is "product B" and "sales", so that the user can select all or part of sensitive fields in the natural language text in the prompt information, which need to be desensitized. And desensitizing the natural language text according to all or part of sensitive fields in the prompt information selected by the user.
For another example, the user b shares the natural language text corresponding to the recommendation prompt template as "between 2020 and 2021, the sales of the M brand M1 mobile phone in each month is what, a corresponding histogram is generated", according to a preset sensitivity field identification rule, the sensitivity field in the identified natural language text is "M brand M1 mobile phone" and "sales", the sensitivity field selected by the user according to the identified sensitivity field is "M brand M1 mobile phone" and "sales", the sensitivity field selected by the user according to the user is desensitized, and the natural language text generated after desensitization is: "between 2020 and 2021, the sales of product X is what is per month, a corresponding histogram is generated", and the desensitized natural language text is shared as a shared recommendation prompt template.
In this embodiment, the desensitization field which can be selected by the user is displayed in the prompt information, and the user can freely select the desensitization field in the prompt information according to the prompt information and desensitize the natural language text. The selectivity of the prompt information can enable the user to freely select the sensitive field which needs to be desensitized, so that the user can be prevented from forgetting to desensitize the sensitive data before sharing the natural language text, and the information safety of the user is greatly ensured.
In order to make the solution of the embodiment of the present disclosure clearer, the solution of the embodiment of the present disclosure is further described below by way of a specific example with reference to fig. 6.
Fig. 6 is a schematic diagram of a graph generating method according to an embodiment of the present disclosure. As shown in FIG. 6, in one particular example, the template lookup and management module may include a lookup hint template module, a rights control system module, a hint template library module, a target hint template module, and a store as a new hint template module. The natural language chart conversion module may include an input text module, a prompt model triggering call module, a code module that converts to a data query SQL, a code module that converts to a generate chart, a generate chart module, a generate target chart module, an execute query statement module, and a return data module. The model training module may include a prompt model module, a portion of raw data text code, etc. input modules, and a large model module. The foregoing modules may be software modules or hardware modules, or a combination of software and hardware modules.
When a user selects to create a chart based on the shared prompt template after entering the user operation page, a search prompt template module in the template search and management module responds to the operation of creating the chart based on the shared prompt template selected by the user and sends a signal to the permission control system module, the permission control system module determines the user permission, the prompt template library module searches the recommended prompt template according to the user permission and displays the recommended prompt template, the user selects a target prompt template in the recommended prompt template, and the target prompt template module acquires and displays target prompt template information. After selecting the target prompt template, the user adjusts the natural language text in the target prompt template, an input text module in a natural language graph conversion module acquires the natural language text and sends a signal to a prompt model trigger calling module, the prompt model trigger calling module is combined with a metadata management system module, the natural language text is respectively converted into a data query SQL code module and a code module for generating graphs, the data query SQL code and the code for generating graphs are converted into the data query SQL code, a query statement module is executed in a database, a query result is generated, the data return module returns the query result to the code module for generating graphs, the code module for generating graphs generates target graphs according to the code for generating graphs and the query result, and the graph generation module acquires target graph information and displays the target graphs in a front page to finish the query.
When the user selects not to create the chart based on the shared prompt template after entering the user operation page, the user can directly input text. An input text module in the natural language graph conversion module acquires a natural language text and sends a signal to a prompt model triggering and calling module, the prompt model triggering and calling module is combined with a metadata management system module, the natural language text is respectively converted into a data query SQL code module and a graph generation code module in the data query SQL code module, a query statement module is executed in a database, the data query SQL code is executed, a query result is generated, the data return module returns the query result to the graph generation code module, the graph generation code module generates a target graph according to the graph generation code and the query result, and the graph generation module acquires target graph information and displays the target graph in a front page to finish the query.
When the user selects to not create the chart based on the shared prompt template after entering the user operation page, the user can newly create the prompt template. An input text module in the natural language graph conversion module acquires a natural language text and sends a signal to a prompt model triggering and calling module, the prompt model triggering and calling module is combined with a metadata management system module, the natural language text is respectively converted into a data query SQL code module and a graph generation code module in the data query SQL code module, a query statement module is executed in a database, the data query SQL code is executed, a query result is generated, the data return module returns the query result to the graph generation code module, the graph generation code module generates a target graph according to the graph generation code and the query result, and the graph generation module acquires target graph information and displays the target graph in a front page to finish the query.
The input modules such as partial metadata, text, codes and the like in the model training module can acquire partial original data and text which are input, corresponding codes and the like, and acquire preset large model information, and the large model module is used for storing the preset large model information. And inputting partial metadata, texts, codes and the like into the large model for training to generate a prompt model, namely the preset AI model, and after the prompt model module acquires the natural language text, processing the natural language text through the preset AI model to output a data query SQL code and a code for generating a chart. The preset AI model may be stored as different versions in the iterative process, and may also include a diversity or rigorous trend configuration according to different input parameters of a part of the preset AI model.
Alternatively, after the generation of the target graph module is complete, the user may choose to store the target graph as a new hint template, at which point the template lookup and management template module stores the target graph in a hint template library.
In an exemplary embodiment, the embodiment of the present disclosure further provides a chart generating apparatus, which may be used to implement the chart generating method as in the foregoing embodiment. Fig. 7 is a schematic diagram of the composition of the chart generating apparatus provided in the embodiment of the present disclosure. As shown in fig. 7, the apparatus may include: an acquisition unit 701, a generation unit 702, an execution unit 703, and a response unit 704.
The acquiring unit 701 is configured to receive a natural language text input by a user, and receive an operation of selecting a target AI model from available preset AI models by the user, where the natural language text is used to indicate generation of a target chart corresponding to the target data.
And the generating unit 702 is used for inputting the natural language text and the metadata information into the target AI model, and generating a data query code and a chart generating code corresponding to the natural language text through the target AI model.
An execution unit 703, configured to execute a data query code, perform a data query, and obtain target data; executing the chart generating code, and performing chart conversion on the target data to obtain a target chart corresponding to the target data.
And a response unit 704, configured to respond to the user triggering the operation of starting to create the chart, and display a first function control and a second function control, where the first function control is used to trigger the new prompt template, and the second function control is used to trigger the search of the recommended prompt template. The method is further used for displaying a text input box in response to the operation of clicking the first functional control by a user or displaying at least one recommendation prompt template optionally in response to the operation of clicking the second functional control by the user.
Optionally, the acquiring unit 701 is specifically configured to receive the natural language text input by the user in the text input box. Or receiving a target prompt template selected by a user from at least one recommended prompt template as natural language text. Or, after receiving that the user selects the target prompt template from the at least one recommended prompt template, the text modified by the target prompt template is used as the natural language text.
Optionally, the response to the operation of clicking the second function control by the user displays at least one recommendation alert template, and the response unit 704 is specifically configured to display at least one of the following identification information in response to the operation of clicking the second function control by the user: chart type identification, data topic identification, data analysis index identification and AI model identification; and responding to the selection operation of at least one piece of target identification information in the identification information, and displaying at least one recommendation prompt template corresponding to the target identification information.
Optionally, the response unit 704 is further configured to display at least one recommendation alert template when the text input box is displayed.
Optionally, the displaying at least one recommendation alert template, the responding unit 704 is further configured to screen the at least one recommendation alert template according to one or more of the authority of the user, the heat of each recommendation alert template, and the relevance of each recommendation alert template; and displaying the filtered recommendation prompt template.
Optionally, after receiving the natural language text input by the user in the text input box and/or after receiving the text modified by the target prompt template as the natural language text after the target prompt template is selected from the at least one recommended prompt templates by the user, the response unit 704 is further configured to save the natural language text as the recommended prompt template in response to a save operation of the natural language text by the user.
Optionally, the response unit 704 is specifically configured to store the natural language text, the information of the target chart, and the information of the target AI model as the recommendation alert template.
Optionally, the recommendation alert template includes a recommendation alert template corresponding to the user and a sharing recommendation alert template, where the natural language text is saved as the recommendation alert template, and the response unit 704 is specifically configured to save the natural language text as the recommendation alert template corresponding to the user and/or the sharing recommendation alert template.
Optionally, before the saving the natural language text as the shared recommendation alert template, the response unit 704 is further configured to field desensitize the natural language text.
Optionally, before field desensitizing the natural language text, the response unit 704 is further configured to display a prompt message, where the prompt message is used to instruct the user to select a desensitized field in the natural language text. The field desensitization is performed on the natural language text, and the response unit 704 is specifically configured to perform field desensitization on the natural language text according to the desensitization field selected by the user.
In the technical scheme of the disclosure, the acquisition, storage, application and the like of the related user personal information all conform to the regulations of related laws and regulations, and the public sequence is not violated.
According to embodiments of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium, a computer program product.
In an exemplary embodiment, an electronic device includes: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method as described in the above embodiments.
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 according to the above embodiment.
In an exemplary embodiment, the computer program product comprises a computer program which, when executed by a processor, implements the method according to the above embodiments.
Fig. 8 illustrates a schematic block diagram of an example electronic device 800 that may be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 8, the electronic device 800 includes a computing unit 801 that 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. In the RAM 803, various programs and data required for the operation of the electronic device 800 can also be stored. The computing unit 801, the ROM 802, and the RAM 803 are connected to each other by a bus 804. An input/output (I/O) interface 805 is also connected to the bus 804.
Various components in electronic device 800 are connected to I/O interface 805, including: an input unit 806 such as a keyboard, mouse, etc.; an output unit 807 such as various types of displays, speakers, and the like; a storage unit 808, such as a magnetic disk, optical disk, etc.; and a communication unit 809, such as a network card, modem, wireless communication transceiver, or the like. The communication unit 809 allows the electronic device 800 to exchange information/data with other devices through a computer network such as the internet and/or various telecommunication networks.
The computing unit 801 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 801 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized 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 calculation unit 801 performs the respective methods and processes described above, for example, a chart generation method. For example, in some embodiments, the chart generation method may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as the storage unit 808. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 800 via the ROM 802 and/or the communication unit 809. When a computer program is loaded into RAM 803 and executed by computing unit 801, one or more steps of the chart generation method described above may be performed. Alternatively, in other embodiments, the computing unit 801 may be configured to perform the chart generation method by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for carrying out methods of the present disclosure may be written in any combination of one or more programming languages. These 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 the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the internet.
The computer system may include a client and a server. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server may be a cloud server, a server of a distributed system, or a server incorporating a blockchain.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps recited in the present disclosure may be performed in parallel, sequentially, or in a different order, provided that the desired results of the disclosed aspects are achieved, and are not limited herein.
The above detailed description should not be taken as limiting the scope of the present disclosure. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present disclosure are intended to be included within the scope of the present disclosure.
Claims (20)
1. A chart generation method, the method comprising:
receiving natural language text input by a user, and receiving operation of screening a target AI model from selectable preset AI models by the user, wherein the natural language text is used for indicating generation of a target chart corresponding to target data;
inputting the natural language text and metadata information into the target AI model, and generating a data query code and a chart generation code corresponding to the natural language text through the target AI model;
Executing the data query code, and performing data query to obtain the target data;
executing the chart generating code, and performing chart conversion on the target data to obtain the target chart corresponding to the target data.
2. The method of claim 1, the method further comprising:
responding to the operation of starting to create the chart triggered by the user, displaying a first functional control and a second functional control, wherein the first functional control is used for triggering a newly built prompt template, and the second functional control is used for triggering searching a recommended prompt template;
displaying a text input box in response to the operation of clicking the first function control by the user, or displaying at least one recommendation prompt template in response to the operation of clicking the second function control by the user;
the receiving the natural language text input by the user comprises the following steps:
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, after receiving that the user selects a target prompt template from the at least one recommended prompt template, the text modified by the target prompt template is used as the natural language text.
3. The method of claim 2, the method further comprising:
and responding to the operation of clicking the second function control by the user, and displaying at least one piece of identification information as follows: chart type identification, data topic identification, data analysis index identification and AI model identification;
and responding to the selection operation of at least one piece of target identification information in the identification information, and displaying at least one recommendation prompt template corresponding to the target identification information.
4. A method according to claim 2 or 3, the method further comprising:
at least one recommendation alert template is displayed while the text entry box is displayed.
5. The method of any of claims 2-4, the displaying at least one recommendation alert template comprising:
screening the at least one recommendation prompt template according to one or more of the authority of the user, the heat of each recommendation prompt template and the relativity of each recommendation prompt template;
and displaying the filtered recommendation prompt template.
6. The method of any of claims 2-5, after receiving the natural language text entered by the user in the text entry box and/or after receiving the modified text of the target alert template as the natural language text after the user selects the target alert template from the at least one recommended alert template, the method further comprising:
And responding to the saving operation of the user on the natural language text, and saving the natural language text as a recommendation prompt template.
7. The method of claim 6, the saving the natural language text as a recommendation alert template, comprising:
and storing the natural language text, the information of the target chart and the information of the target AI model as the recommendation prompt template.
8. The method of claim 6 or 7, the recommendation alert template comprising a recommendation alert template and a sharing recommendation alert template corresponding to the user;
the storing the natural language text as a recommendation prompt template comprises the following steps:
and saving the natural language text as a recommendation prompt template corresponding to the user and/or sharing the recommendation prompt template.
9. The method of claim 8, the method further comprising, prior to saving the natural language text as a shared recommendation alert template:
and field desensitizing the natural language text.
10. The method of claim 9, the method further comprising, prior to field desensitizing the natural language text:
displaying prompt information, wherein the prompt information is used for indicating the user to select a desensitization field in the natural language text;
The field desensitizing the natural language text comprises the following steps:
and field desensitization is carried out on the natural language text according to the desensitization field selected by the user.
11. A chart generation apparatus, the apparatus comprising:
the acquisition unit is used for receiving a natural language text input by a user and receiving an operation of selecting a target AI model from selectable preset AI models by the user, wherein the natural language text is used for indicating to generate a target chart corresponding to target data;
the generation unit is used for inputting the natural language text and the metadata information into the target AI model, and generating a data query code and a chart generation code corresponding to the natural language text through the target AI model;
the execution unit is used for executing the data query code, and performing data query to obtain the target data; executing the chart generating code, and performing chart conversion on the target data to obtain the target chart corresponding to the target data.
12. The apparatus of claim 11, the apparatus further comprising:
the response unit is used for responding to the operation of starting to create the chart triggered by the user, displaying a first functional control and a second functional control, wherein the first functional control is used for triggering a newly-built prompt template, and the second functional control is used for triggering searching the recommended prompt template;
Displaying a text input box in response to the operation of clicking the first function control by the user, or displaying at least one recommendation prompt template in response to the operation of clicking the second function control by the user;
the receiving the natural language text input by the user, the obtaining unit is specifically configured to:
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, after receiving that the user selects a target prompt template from the at least one recommended prompt template, the text modified by the target prompt template is used as the natural language text.
13. The apparatus according to claim 12, wherein the response unit is configured to display at least one recommendation alert template in response to the operation of clicking the second functionality control by the user, and the response unit is specifically configured to:
and responding to the operation of clicking the second function control by the user, and displaying at least one piece of identification information as follows: chart type identification, data topic identification, data analysis index identification and AI model identification;
And responding to the selection operation of at least one piece of target identification information in the identification information, and displaying at least one recommendation prompt template corresponding to the target identification information.
14. The apparatus according to claim 12 or 13, the response unit further configured to:
at least one recommendation alert template is displayed while the text entry box is displayed.
15. The apparatus according to claims 12-14, said displaying at least one recommendation alert template, said response unit being specifically adapted to:
screening the at least one recommendation prompt template according to one or more of the authority of the user, the heat of each recommendation prompt template and the relativity of each recommendation prompt template;
and displaying the filtered recommendation prompt template.
16. The apparatus according to any of claims 12-15, said receiving said user after entering said natural language text in said text entry box and/or said receiving said user after selecting a target alert template from said at least one recommended alert template, after modifying said target alert template as said natural language text, said response unit further configured to:
And responding to the saving operation of the user on the natural language text, and saving the natural language text as a recommendation prompt template.
17. The apparatus of claim 16, wherein the saving the natural language text as a recommendation alert template is specifically configured to:
and storing the natural language text, the information of the target chart and the information of the target AI model as the recommendation prompt template.
18. An electronic device, comprising: at least one processor; and a memory communicatively coupled to the at least one processor;
wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-10.
19. A non-transitory computer readable storage medium storing computer instructions for causing a computer to perform the method of any one of claims 1-10.
20. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any of claims 1-10.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310325224.9A CN116152384A (en) | 2023-03-29 | 2023-03-29 | Chart generation method, device, equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310325224.9A CN116152384A (en) | 2023-03-29 | 2023-03-29 | Chart generation method, device, equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116152384A true CN116152384A (en) | 2023-05-23 |
Family
ID=86362006
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310325224.9A Pending CN116152384A (en) | 2023-03-29 | 2023-03-29 | Chart generation method, device, equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116152384A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117556109A (en) * | 2023-11-10 | 2024-02-13 | 腾云悦智科技(深圳)有限责任公司 | A full-process visualization method based on large models |
-
2023
- 2023-03-29 CN CN202310325224.9A patent/CN116152384A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117556109A (en) * | 2023-11-10 | 2024-02-13 | 腾云悦智科技(深圳)有限责任公司 | A full-process visualization method based on large models |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11347783B2 (en) | Implementing a software action based on machine interpretation of a language input | |
JP7395445B2 (en) | Methods, devices and electronic devices for human-computer interactive interaction based on search data | |
JP2021197137A (en) | Method, device, electronic apparatus, storage medium, and computer program for training model | |
KR20210132578A (en) | Method, apparatus, device and storage medium for constructing knowledge graph | |
KR20210056961A (en) | Semantic processing method, device, electronic equipment and medium | |
CN111680517B (en) | Method, apparatus, device and storage medium for training model | |
US20220284060A1 (en) | Question Answering Method and Apparatus Based on Knowledge Graph | |
CN111090991B (en) | Scene error correction method, device, electronic equipment and storage medium | |
CN114036443A (en) | Page generation method and device | |
KR20210038471A (en) | Text query method and apparatus, device and storage medium | |
CN114138817A (en) | Data query method, device, medium and product based on relational database | |
CN116841506B (en) | Program code generation method and device, and model training method and device | |
CN116152384A (en) | Chart generation method, device, equipment and storage medium | |
KR20230006601A (en) | Alignment methods, training methods for alignment models, devices, electronic devices and media | |
CN115169316A (en) | Data processing template generation method and device, electronic equipment and storage medium | |
RU2679971C2 (en) | Implementation of access to semantic content in development system | |
CN111506775A (en) | Label processing method and device, electronic equipment and readable storage medium | |
EP4071690A2 (en) | Method and apparatus for task information management, device and storage medium | |
CN117492743A (en) | Target application generation method and device based on large language model and storage medium | |
JP2020052767A (en) | Vulnerability estimation device and vulnerability estimation method | |
CN116050371A (en) | Report generation method, device, equipment and program product | |
CN112100362B (en) | Document format recommendation model training method and device and electronic equipment | |
US11328018B2 (en) | System and method for state dependency based task execution and natural language response generation | |
CN114020245A (en) | Page construction method and apparatus, device and medium | |
CN111625706A (en) | Information retrieval method, device, equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |