Chart generation method and device, electronic equipment and storage medium

By displaying the initial analysis intention and question template, combined with the structured input of the drop-down box and the input box, the problem that users find it difficult to ask high-quality questions in data analysis is solved, and the efficiency and accuracy of chart generation are improved.

CN120068823APending Publication Date: 2025-05-30ZHUHAI KINGSOFT OFFICE SOFTWARE +2
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202311610904.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-28
Publication Date
2025-05-30

AI Technical Summary

Technical Problem

In the data analysis scenario, users lack clues when facing blank question boxes, resulting in the generated chart results failing to meet expectations, and the existing technology is difficult to effectively guide users to make high-quality chart adjustments and modifications.

Method used

By displaying the initial analysis intention, the fields and fixed statements entered by the user are combined to generate a question sentence pattern, guide the user to conduct structured data analysis, use the drop-down box and the input box to improve the quality of the question, and support the secondary adjustment and modification of the chart.

Benefits of technology

It improves the efficiency and accuracy of chart generation, makes the generated chart more in line with user expectations, and improves user satisfaction and the level of customization of charts.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120068823A_ABST
    Figure CN120068823A_ABST
Patent Text Reader

Abstract

The invention provides a chart generation method and device, electronic equipment and a storage medium, and relates to the technical field of data analys.The chart generation method comprises the steps that in response to a data analysis instruction for a target data source, at least one initial analysis intention is displayed; in response to the intention selection instruction, determining a target analysis intention from the at least one initial analysis intention based on the intention selection instruction; displaying a question template corresponding to the target analysis intention; receiving an input field aiming at each first slot position in the question template, and combining the input field with a first fixed statement in the question template to generate a question sentence pattern; and performing chart generation processing on the target data source based on the question sentence pattern to obtain a target chart. By introducing the structured input mode, the user is restrained from asking questions too divergently, the quality of the question sentence pattern is improved, the efficiency and accuracy of chart generation are improved, the generated chart better conforms to the expectation of the user, and the satisfaction degree of the user is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data analysis, and in particular, to a method, device, electronic device, and storage medium for generating charts. Background Art

[0002] With the rapid development of data analysis technology, the technology of using the data existing in a data table to generate a chart recommendation list has emerged. The current data analysis tools on the market can generate charts and conclusion summaries in combination with large language models according to the data provided by users.

[0003] However, in the data analysis scenario, in the face of a blank question box, users often have no clue to ask questions, and low-quality questions lead to the output results not meeting the user's expectations. Therefore, an effective solution is urgently needed to solve the above problems. Summary of the Invention

[0004] In view of the problems existing in the prior art, embodiments of the present invention provide a method, device, electronic device, and storage medium for generating charts.

[0005] The present invention provides a method for generating a chart, including:

[0006] Responding to a data analysis instruction for a target data source, and displaying at least one initial analysis intention;

[0007] Responding to an intention selection instruction, and determining a target analysis intention from the at least one initial analysis intention based on the intention selection instruction;

[0008] Displaying a question template corresponding to the target analysis intention, where the question template includes at least one first slot and a first fixed statement;

[0009] Receiving input fields for each of the first slots, and combining the input fields and the first fixed statement to generate a question sentence pattern;

[0010] Based on the question sentence pattern, performing chart generation processing on the target data source to obtain a target chart.

[0011] According to the method for generating a chart provided by the present invention, the first slot is a drop-down box;

[0012] The receiving of the input fields for the first slots includes:

[0013] Responding to a trigger operation for the drop-down box, and displaying at least one selectable field corresponding to the drop-down box;

[0014] Responding to a field selection instruction for the at least one selectable field, and determining the selectable field corresponding to the field selection instruction as the input field.

[0015] According to a chart generation method provided by the present invention, before presenting at least one selectable field corresponding to the drop-down box, it further includes:

[0016] Identifying at least one initial field included in the target data source;

[0017] For each initial field, classifying the initial field into a categorical field or a numerical field;

[0018] When the first slot is associated with the categorical field, using each of the initial fields included in the categorical field as the selectable field corresponding to the drop-down box;

[0019] When the first slot is associated with the numerical field, using each of the initial fields included in the numerical field as the selectable field corresponding to the drop-down box.

[0020] According to a chart generation method provided by the present invention, when the first slot is associated with the categorical field, using each of the initial fields included in the categorical field as the selectable field corresponding to the drop-down box includes:

[0021] When the first slot is associated with the categorical field, screening out target fields related to the target analysis intention from each of the initial fields under the categorical field;

[0022] Using the target fields as the selectable fields corresponding to the drop-down box.

[0023] According to a chart generation method provided by the present invention, the at least one initial analysis intention includes at least one of a comparison intention, a composition intention, a trend intention, a connection intention, a distribution intention, and a custom intention;

[0024] The comparison intention is used to compare the numerical fields of different categorical fields;

[0025] The composition intention is used to analyze the composition of the numerical fields of different categorical fields;

[0026] The trend intention is used to analyze the change trend of different numerical fields according to a set period, and the set period is set based on requirements;

[0027] The connection intention is used to analyze the connection between different specified fields, and the specified fields include categorical fields and numerical fields;

[0028] The distribution intention is used to analyze the distribution of the numerical fields of different categorical fields;

[0029] The custom intention is used to perform analysis based on the user's custom input.

[0030] A chart generation method provided by the present invention, based on the interrogation sentence pattern, performing chart generation processing on the target data source to obtain a target chart, including:

[0031] Based on the interrogation sentence pattern, performing chart generation processing on the target data source to obtain an initial chart;

[0032] In response to an adjustment instruction for the initial chart, presenting an adjustment statement input interface;

[0033] Based on the adjustment statement input interface, receiving an adjustment statement for the initial chart;

[0034] Adjusting the initial chart according to the adjustment statement to obtain a target chart.

[0035] According to a chart generation method provided by the present invention, the adjustment statement input interface includes at least one initial adjustment statement example;

[0036] The receiving an adjustment statement for the initial chart based on the adjustment statement input interface includes:

[0037] Receiving a statement selection instruction, and based on the statement selection instruction, determining a target adjustment statement example from the at least one initial adjustment statement example;

[0038] Determining an adjustment statement for the initial chart according to the target adjustment statement example.

[0039] According to a chart generation method provided by the present invention, the determining an adjustment statement for the initial chart according to the target adjustment statement example includes:

[0040] Obtaining and presenting a statement template corresponding to the target adjustment statement example, the statement template including at least one second slot and a second fixed statement;

[0041] Receiving input text for each of the second slots, and combining the input text and the second fixed statement to obtain an adjustment statement for the initial chart.

[0042] According to a chart generation method provided by the present invention, the second slot is an input box;

[0043] The receiving input text for each of the second slots includes:

[0044] Receiving an input instruction for the input box, the input instruction carrying text content;

[0045] Taking the text content as the input text.

[0046] A chart generation method provided by the present invention, wherein adjusting the initial chart according to the adjustment statement to obtain a target chart includes:

[0047] Performing semantic recognition on the adjustment statement to obtain adjustment semantics; the adjustment semantics includes at least one of modification semantics, annotation semantics, and prediction semantics;

[0048] When the adjustment semantics includes modification semantics, modifying the initial chart according to the adjustment statement and the target data source to obtain a target chart;

[0049] When the adjustment semantics includes annotation semantics, annotating the initial chart according to the adjustment statement to obtain a target chart;

[0050] When the adjustment semantics includes prediction semantics, determining prediction data according to the adjustment statement and the target data source; adding the prediction data to the initial chart to obtain a target chart.

[0051] A chart generation method provided by the present invention, wherein combining the input field and the first fixed statement to generate an interrogative sentence includes:

[0052] Inserting the input field into the first fixed statement based on the position of the first slot in the first fixed statement to obtain the interrogative sentence.

[0053] A chart generation method provided by the present invention, the method further includes:

[0054] Analyzing the target data source based on the interrogative sentence to obtain a target conclusion.

[0055] A chart generation method provided by the present invention, wherein analyzing the target data source based on the interrogative sentence to obtain a target conclusion includes:

[0056] Analyzing the target data source based on the interrogative sentence to obtain an initial conclusion;

[0057] When receiving an adjustment statement, updating the initial conclusion according to the adjustment statement and / or the target chart adjusted based on the adjustment statement to obtain a target conclusion.

[0058] The present invention also provides a chart generation device, including:

[0059] A first display module, configured to display at least one initial analysis intention in response to a data analysis instruction for a target data source;

[0060] A determination module, configured to determine a target analysis intention from the at least one initial analysis intention based on the intention selection instruction in response to the intention selection instruction;

[0061] A second display module, configured to display a question template corresponding to the target analysis intention, where the question template includes at least one first slot and a first fixed statement;

[0062] A receiving module, configured to receive input fields for each of the first slots, combine the input fields and the first fixed statement to generate a question sentence pattern;

[0063] A processing module, configured to perform chart generation processing on the target data source based on the question sentence pattern to obtain a target chart.

[0064] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where when the processor executes the program, it implements the chart generation method as described in any one of the above.

[0065] The present invention also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the chart generation method as described in any one of the above.

[0066] The present invention also provides a computer program product, including a computer program, and when the computer program is executed by a processor, it implements the chart generation method as described in any one of the above.

[0067] The chart generation method, device, electronic device, and storage medium provided by the present invention, by responding to a data analysis instruction for a target data source, display at least one initial analysis intention; in response to an intention selection instruction, based on the intention selection instruction, determine a target analysis intention from the at least one initial analysis intention; display a question template corresponding to the target analysis intention, where the question template includes at least one first slot and a first fixed statement; receive input fields for each of the first slots, combine the input fields and the first fixed statement to generate a question sentence pattern; based on the question sentence pattern, perform chart generation processing on the target data source to obtain a target chart. The present invention introduces a structured input method through the target analysis intention and the question template, restricts users from asking overly divergent questions, guides users to ask high-quality questions with low threshold, not only improves the quality of the question sentence pattern, but also helps to improve the efficiency and accuracy of chart generation, so that the generated chart better meets the user's expectations, and further improves user satisfaction. Description of the Drawings

[0068] To more clearly illustrate the technical solutions in the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0069] Figure 1 It is a schematic flowchart of the chart generation method provided by the present invention;

[0070] Figure 2 It is a display interface of the initial analysis intention and question sentence patterns provided by the present invention;

[0071] Figure 3 It is a schematic flowchart of the process of generating question sentence patterns provided by the present invention;

[0072] Figure 4 It is a display interface of the statement template provided by the present invention;

[0073] Figure 5 It is a schematic diagram of the interface for displaying charts provided by the present invention

[0074] Figure 6 It is a schematic diagram of the interface for adjusting charts provided by the present invention;

[0075] Figure 7 It is a schematic structural diagram of the chart generation device provided by the present invention;

[0076] Figure 8 It is a schematic structural diagram of the electronic device provided by the present invention. Detailed implementation manners

[0077] To make the objectives, technical solutions, and advantages of the present invention clearer, the following will clearly and completely describe the technical solutions in the present invention in conjunction with the drawings in the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. Based on the embodiments in the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of protection of the present invention.

[0078] To facilitate a clearer understanding of the embodiments of the present invention, the following will first introduce some relevant background knowledge.

[0079] With the rapid development of computer computing and the increasing growth of user needs, some data analysis tools provide a technology for generating a list of chart suggestions using the data existing in a data table. This technology generally combines the charts and conclusion summaries generated by a large language model based on the data provided by the user, such as the AI (Artificial Intelligence) function of a certain document editing software.

[0080] However, in the scenario of AI data analysis, when faced with a blank question box, users often have no clue on how to ask questions, and low-quality questions lead to the results output by the AI not meeting the user's expectations.

[0081] In addition, although the existing technologies can meet the basic data visualization requirements, when users need to make secondary adjustments, modifications or supplements to the generated charts, the operations are relatively difficult and lack effective guidance and support. Limited by the existing technologies, users must have certain knowledge of data analysis and chart production, and adjust the chart type, chart name or add trend lines through mouse clicks and other operations to further improve and adjust to produce more demand-compliant charts.

[0082] To this end, the present invention provides a chart generation method, device, electronic device and storage medium. By responding to a data analysis instruction for a target data source, at least one initial analysis intention is displayed; in response to an intention selection instruction, based on the intention selection instruction, a target analysis intention is determined from the at least one initial analysis intention; a question template corresponding to the target analysis intention is displayed, and the question template includes at least one first slot and a first fixed statement; input fields for each of the first slots are received, and the input fields and the first fixed statement are combined to generate a question sentence pattern; based on the question sentence pattern, chart generation processing is performed on the target data source to obtain a target chart. Through the target analysis intention and the question template, the present invention introduces a structured input method, restricts users from asking questions too divergently, guides users to ask high-quality questions with low threshold, not only improves the quality of the question sentence pattern, but also helps to improve the efficiency and accuracy of chart generation, so that the generated chart is more in line with the user's expectations, thereby improving user satisfaction.

[0083] The following combines Figures 1 - 8 to describe the chart generation method, device, electronic device and storage medium of the present invention.

[0084] Figure 1 is a schematic flowchart of the chart generation method provided by the present invention. Refer to Figure 1 as shown, which includes steps 101-step 105, where:

[0085] Step 101: Respond to a data analysis instruction for a target data source, and display at least one initial analysis intention.

[0086] First of all, it should be noted that the execution subject of the present invention can be any electronic device that generates charts, such as any one of a smart phone, a smart watch, a desktop computer, a laptop computer, etc.

[0087] Specifically, the data source can be the data in a tabular document, the data in a text document or a slide document, such as tabular data, data sorted in a certain format, or others. The target data source refers to the data source for which a chart needs to be analyzed and generated.

[0088] The analysis intention refers to the idea of conducting data analysis to achieve a certain purpose.

[0089] In practical applications, before responding to the data analysis instruction for the target data source, it is necessary to first obtain the target data source. There are various ways to obtain the target data source:

[0090] For example, the user uploads the target data source through the upload page provided by the chart generation platform, and correspondingly, the execution entity obtains the target data source.

[0091] Another example is that the execution entity receives a chart generation instruction or a target data source acquisition instruction, and correspondingly, the execution entity obtains the target data source to be described from the storage area pointed to by the chart generation instruction or the target data source acquisition instruction.

[0092] Still another example is that the execution entity displays the initial data source, and the user selects the target data source from the initial data source through a selection operation, and correspondingly, the execution entity obtains the target data source. The present invention does not limit this.

[0093] Further, after the execution entity obtains the target data source, if the user performs a data analysis operation on the target data source, such as triggering the data analysis control on the display interface, and the display interface is used to display the target data source, correspondingly, the execution entity receives a data analysis instruction for the target data source.

[0094] Next, in response to the data analysis instruction, at least one initial analysis intention pre-constructed is displayed for the user to select the intention for which the user conducts data analysis.

[0095] Step 102: In response to the intention selection instruction, based on the intention selection instruction, determine the target analysis intention from the at least one initial analysis intention.

[0096] Specifically, after displaying at least one initial analysis intention to the user, the user can select the initial analysis intention that is closest to the user's needs from the at least one initial analysis intention. Correspondingly, the execution entity receives an intention selection instruction carrying a first intention identifier.

[0097] Further, the execution entity matches the first intention identifier carried by the intention selection instruction with the second intention identifiers of each initial analysis intention, and determines the initial analysis intention corresponding to the successfully matched second intention identifier as the target analysis intention.

[0098] In addition, the user can also modify or replace the selected target analysis intention through modification operations.

[0099] Step 103: Display the question template corresponding to the target analysis intention, where the question template includes at least one first slot and a first fixed statement.

[0100] Specifically, the slot is used for the user to fill in content, and the fixed statement is used to represent the user's intention and guide the user to fill in content in the slot. The slot can be a blank slot or a prompt slot, that is, a slot containing an initial recommended field, and the initial recommended field can be modified by the user. The question template is used to guide the user to ask more accurate and high-quality questions. For example, "Analyze the composition of different _____ of _____", where the text part is the fixed statement, and "_____" represents the slot.

[0101] After determining the target analysis intention, further, extract the question template corresponding to the target intention from the question template library and display the question template to the user for viewing through a display device, so that the user can fill in content in the first slot based on the first fixed statement in the question template.

[0102] Step 104: Receive the input fields for each of the first slots, and combine the input fields and the first fixed statement to generate a question sentence pattern.

[0103] Specifically, the input field refers to the content entered by the user in the first slot. The question sentence pattern is used to prompt the executing entity which type of analysis needs to be performed on the target data source and which part of the data in the target data source needs to be specifically analyzed.

[0104] The user can fill in content, that is, the input field, in each first slot respectively based on the semantics of the first fixed statement in the question template. Correspondingly, the executing entity receives the input fields for each first slot.

[0105] Further, the executing entity combines each input field and the first fixed statement according to the position of each first slot in the first fixed statement, so as to obtain a complete question sentence pattern.

[0106] Step 105: Based on the question sentence pattern, perform chart generation processing on the target data source to obtain a target chart.

[0107] Specifically, after obtaining the prompt sentence pattern, determine the data to be processed for generating a chart from the target data source based on the input fields in the question sentence pattern; determine the processing method for the data to be processed based on the fixed statement in the question sentence pattern; and then perform chart generation processing on the data to be processed according to the processing method, so as to obtain a target chart that meets the target analysis intention.

[0108] The chart generation method provided by the present invention shows at least one initial analysis intention by responding to a data analysis instruction for a target data source; determines a target analysis intention from the at least one initial analysis intention based on the intention selection instruction in response to the intention selection instruction; shows a question template corresponding to the target analysis intention, where the question template includes at least one first slot and a first fixed statement; receives input fields for each of the first slots, combines the input fields and the first fixed statement to generate a question sentence pattern; and performs chart generation processing on the target data source based on the question sentence pattern to obtain a target chart. Through the target analysis intention and the question template, the present invention introduces a structured input method, restricts users from asking overly divergent questions, guides users to ask high-quality questions with low threshold, not only improves the quality of the question sentence pattern, but also helps to improve the efficiency and accuracy of chart generation, so that the generated chart better meets the user's expectations, thereby improving user satisfaction.

[0109] In one or more alternative embodiments of the present invention, the first slot is a drop-down box; the specific implementation process of receiving the input field for the first slot can be as follows:

[0110] In response to a trigger operation on the drop-down box, show at least one selectable field corresponding to the drop-down box;

[0111] In response to a field selection instruction for the at least one selectable field, determine the selectable field corresponding to the field selection instruction as the input field.

[0112] Specifically, a drop-down box is a selection control containing at least one option. Usually, each option contained in the drop-down box is in a hidden state, and after the drop-down box is triggered, each option is displayed. The selectable field is also the option contained in the drop-down box.

[0113] In practical applications, users can trigger the drop-down box through click, long press, double click and other trigger operations of a mouse, touch interface, keyboard, etc. Correspondingly, the execution entity responds to the trigger operation, and displays each selectable field included or corresponding to the drop-down box through the drop-down window of the drop-down box for the user to select the input field therefrom.

[0114] After showing each selectable field included or corresponding to the drop-down box to the user, the user can select the selectable field closest to the user's needs from each selectable field. Correspondingly, the execution entity receives a field selection instruction carrying a first field identifier.

[0115] Furthermore, the execution entity matches the first field identifier carried by the field selection instruction with the second field identifiers of each selectable field, and determines the selectable field corresponding to the successfully matched second field identifier as the input field.

[0116] In this way, through the drop-down box and the selection field, users can be enabled to select input fields therefrom, restricting users from asking questions too divergently and guiding users to ask high-quality questions with a low threshold. This not only reduces the threshold for users to ask questions, but also improves the quality of the question patterns through the selection field, thereby improving the efficiency and accuracy of chart generation.

[0117] In one or more alternative embodiments of the present invention, the first slot includes a drop-down box and an input box; the process of receiving the input field for the first slot can be specifically implemented as follows:

[0118] In response to a trigger operation on the drop-down box, at least one selection field corresponding to the drop-down box is displayed; in response to a field selection instruction for the at least one selection field, the selection field corresponding to the field selection instruction is determined as the first alternative input field; and / or, in response to an input operation on the input box, the second alternative input field carried by the input operation is extracted;

[0119] If there is a second alternative input field, the second alternative input field is used as the target input field;

[0120] If there is no second alternative input field, the first alternative input field is used as the target input field.

[0121] In practical applications, the first slot can include a drop-down box and an input box. Users can choose to input content in the input box, that is, the second alternative input field, or select the first alternative input field from the drop-down box.

[0122] When the user inputs the second alternative input field in the input box, the second alternative input field is preferentially used as the target input field; if the user does not input the second alternative input field in the input box, but selects the first alternative input field through the drop-down box, the first alternative input field is used as the target input field at this time.

[0123] In this way, through the selection field in the drop-down box, input guidance can be provided for users, that is, users can be guided to input a second alternative input field that better meets their needs in the input box. At this time, the second alternative input field is used as the target input field, which not only improves the matching degree between the input field and the user's needs, but also improves the accuracy of the prompt sentence pattern determined based on the target input field, so that the generated chart better meets the user's expectations and improves user satisfaction.

[0124] In one or more alternative embodiments of the present invention, the selection field corresponding to the drop-down box is determined based on the target data source. That is, before the at least one selection field corresponding to the drop-down box is displayed, it further includes:

[0125] Identify at least one initial field included in the target data source;

[0126] For each initial field, classify the initial field into a categorical field or a numerical field;

[0127] When the first slot is associated with the categorical field, use each initial field included in the categorical field as the selection field corresponding to the drop-down box;

[0128] When the first slot is associated with the numerical field, use each initial field included in the numerical field as the selection field corresponding to the drop-down box.

[0129] In practical applications, the target data source may contain at least one initial field.

[0130] For example, the target data source is a staff basic data statistical table, which may contain initial fields such as name, gender, department, contact information, and home address.

[0131] The target data source may contain at least one category name. Perform field identification on the category names to determine the initial fields corresponding to each category name.

[0132] For example, the target data source is the fruit sales table shown in Table 1. Perform field identification on "July", "August", and "September" to obtain the initial field "month". Perform field identification on "apple" and "pear" to obtain the initial field "fruit category". Perform field identification on "500 kg", "600 kg", "300 kg", "700 kg", "800 kg", and "200 kg" to obtain the initial field "sales volume". Perform field identification on "1000 yuan", "1800 yuan", "900 yuan", "1750 yuan", "2400 yuan", and "600 yuan" to obtain the initial field "sales amount".

[0133] Table 1 Fruit Sales Table

[0134]

[0135] After obtaining each initial field, divide the initial fields into two categories: categorical fields and numerical fields.

[0136] Exemplarily, classify "name", "gender", and "department" into categorical fields, and classify "contact information" and "home address" into numerical fields;

[0137] Exemplarily, classify "month" and "fruit category" into categorical fields, and classify "sales volume" and "sales amount" into numerical fields.

[0138] Each first slot corresponds to a type of field.

[0139] Exemplarily, a prompt word is displayed in the first slot, such as an initial recommendation field, and the prompt word is a classification field or a numerical field. If the prompt word in the current first slot is a classification field, each initial field included in the classification field is used as a selection field corresponding to the drop-down box; if the prompt word in the current first slot is a numerical field, each initial field included in the numerical field is used as a selection field corresponding to the drop-down box.

[0140] Exemplarily, according to the position of the first slot in the first statement, the field type corresponding to the first slot is determined. If the field type of the current first slot is a classification field, each initial field included in the classification field is used as a selection field corresponding to the drop-down box; if the field type of the current first slot is a numerical field, each initial field included in the numerical field is used as a selection field corresponding to the drop-down box.

[0141] In this way, using the initial fields extracted from the target data source as the selection fields of the drop-down box can improve the relevance between the question pattern and the target data source, and further improve the matching degree between the target chart and the target data source, thereby improving user satisfaction. In addition, selecting different initial fields as field options according to the field type can improve the question quality and semantic expression ability of the question pattern, and further improve the processing efficiency of generating charts for the target data source.

[0142] In one or more alternative embodiments of the present invention, for different analysis intents, the corresponding selection fields are different. That is, when the first slot is associated with the classification field, each of the initial fields included in the classification field is used as the selection field corresponding to the drop-down box. The specific implementation process can be as follows:

[0143] When the first slot is associated with the classification field, target fields related to the target analysis intent are screened out from each of the initial fields under the classification field;

[0144] The target fields are used as the selection fields corresponding to the drop-down box.

[0145] In practical applications, if the first slot is associated with the classification field, it is necessary to match each initial field under the classification field with the target analysis intent, use the initial field that successfully matches the target analysis intent as the target field, and use each target field as the selection field corresponding to the drop-down box in the first slot. In this way, according to different analysis intents, available initial intents are screened out from the classification field as selection fields, which can not only improve the selection accuracy, but also avoid the influence of incorrect initial intents on the accuracy of the question pattern, that is, it can improve the accuracy of the target chart.

[0146] In one or more alternative embodiments of the present invention, the at least one initial analysis intention includes at least one of a comparison intention, a composition intention, a trend intention, a connection intention, a distribution intention, and a custom intention;

[0147] The comparison intention is used to compare numerical fields of different classification fields;

[0148] The composition intention is used to analyze the composition of numerical fields of different classification fields;

[0149] The trend intention is used to analyze the change trend of different numerical fields according to a set period, and the set period is set based on requirements;

[0150] The connection intention is used to analyze the connection between different specified fields, and the specified fields include classification fields and numerical fields;

[0151] The distribution intention is used to analyze the distribution of numerical fields of different classification fields;

[0152] The custom intention is used to perform analysis based on the user's custom input.

[0153] Wherein, the set period refers to a set time length, such as by month, by year, by quarter, etc. Setting the period based on requirements means selecting the set period from multiple time periods based on user requirements. The requirements therein are the requirements for the user to analyze the target data source, which can be set by the user or automatically determined according to the user data (the user data is obtained on the basis of obtaining user authorization).

[0154] Specifically, in the question box for data analysis, that is, the display area of the initial analysis intention, at least one of the following six initial analysis intentions is provided for the user to select: custom intention, comparison intention, composition intention, trend intention, connection intention, and distribution intention. A structured question template can be configured according to the target analysis intention selected by the user in combination with the attributes of two different fields.

[0155] Exemplarily, the question template corresponding to the custom intention is empty, but may include a prompt of "user freely type in the description", and analysis can be performed based on the user's custom input.

[0156] Exemplarily, the question template corresponding to the comparison intention can be: Compare the [numerical field] of different [classification fields]. Wherein, "[classification field]" represents the first slot associated with the classification field, and "[numerical field]" represents the first slot associated with the numerical field.

[0157] Exemplarily, the question template corresponding to the composition intention can be: Analyze the composition of the [numerical field] of different [classification fields]. Among them, "[classification field]" represents the first slot associated with the classification field, and "[numerical field]" represents the first slot associated with the numerical field.

[0158] Exemplarily, the question template corresponding to the trend can be: Analyze the change trend of the [numerical field] [by time]. Among them, "[by time]" represents the third slot according to the set period. The third slot includes an input box and / or a drop-down box for inputting the set period. For the drop-down box in the third slot, it contains pre-set time options, such as by month, by year, by quarter, etc.

[0159] Exemplarily, the question template corresponding to the relationship can be: Analyze the relationship between [all fields] and [all fields]. Among them, "[all fields]" represents the first slot associated with the classification field and / or the numerical field.

[0160] Exemplarily, the question template corresponding to the distribution can be: Analyze the distribution of the [numerical field] of different [classification fields]. Among them, "[classification field]" represents the first slot associated with the classification field, and "[numerical field]" represents the first slot associated with the numerical field.

[0161] By setting custom intentions, comparison intentions, composition intentions, trend intentions, relationship intentions, and distribution intentions, the intentions of users for data analysis can be comprehensively covered, ensuring that the target analysis intentions that meet the user's needs can be provided to users, thereby improving user satisfaction.

[0162] Exemplarily, see Figure 2 , Figure 2 The display interface of the initial analysis intention and question sentence patterns provided by the present invention shown in the figure: For the "comparison" intention, an example is given with the question sentence pattern of "Compare the [sales amount] of different [product categories]"; for the "comparison" intention, an example is given with the question sentence pattern of "Compare the [sales amount] of different [product categories]". For the "composition" intention, an example is given with the question sentence pattern of "Analyze the composition of the [sales amount] of different [product categories]"; for the "trend" intention, an example is given with the question sentence pattern of "Analyze the change trend of the [sales amount] [by month]"; for the "relationship" intention, an example is given with the question sentence pattern of "Analyze the correlation between the [sales amount] and the [product category]"; for the "distribution" intention, an example is given with the question sentence pattern of "Analyze the distribution of the [sales amount] of different [product categories]"; for the "custom" intention, an example is given with the question sentence pattern of "For example: Compare the sales amounts of different product categories".

[0163] It should be noted that the user's custom input can be all or part of the data in the target data source, serving as the input for comparative analysis, component analysis, trend analysis, correlation analysis, distribution analysis, etc. The user's custom input can include initial fields or not.

[0164] Exemplarily, the initial fields corresponding to Table 1 include "Month", "Fruit Category", "Sales Volume", and "Sales Amount". "Compare the sales volume and sales amount in different months" is the user's custom input that includes initial fields, and "Compare the unit price of apples in July and September" is the user's custom input that does not include initial fields.

[0165] For the user's custom input that includes initial fields, the user's custom input can be used as an interrogative sentence pattern. Further, based on the interrogative sentence pattern, chart generation processing is performed on the target data source to obtain the target chart.

[0166] Among them, in the case where the target analysis intention is a custom intention, the first fixed statement in its question template is empty, and the input field is the user's custom input.

[0167] For the user's custom input that does not include initial fields, the user's custom input can be used as the initial interrogative sentence pattern, and then the initial interrogative sentence pattern is adjusted to the target interrogative sentence pattern associated with the initial fields. For example, "unit price" in "Compare the unit price of apples in July and September" is the ratio of "sales amount" to "sales volume", so the initial interrogative sentence pattern "Compare the unit price of apples in July and September" can be transformed into "Compare the unit price of apples in July and September, where the unit price is the ratio of the sales amount to the sales volume". Further, based on the interrogative sentence pattern, chart generation processing is performed on the target data source to obtain the target chart.

[0168] In addition, each initial analysis intention can be displayed simultaneously on the same interface, or each initial analysis intention can be displayed in the form of a drop-down box.

[0169] See Figure 3 , Figure 3 the flowchart of generating an interrogative sentence pattern provided by the present invention shown, and it is described using the target data source as tabular data.

[0170] First, obtain the table data, extract the initial fields of each column in the table data, that is, extract all column fields. Then distinguish the field types of each initial field, and then according to the target analysis intention selected by the user, obtain the question template corresponding to the target analysis intention, that is, match the question template according to the question type. Among them, 1. Custom: The user freely types in a description; 2. Comparison: Compare the

numerical field

categorical fields

numerical field

categorical fields

numerical field

over time

all fields

all fields

numerical field

categorical fields

[0171] In one or more alternative embodiments of the present invention, based on the question sentence, perform chart generation processing on the target data source to obtain a target chart. The specific implementation process can be as follows:

[0172] Based on the question sentence, perform chart generation processing on the target data source to obtain an initial chart;

[0173] In response to an adjustment instruction for the initial chart, display an adjustment statement input interface;

[0174] Based on the adjustment statement input interface, receive an adjustment statement for the initial chart;

[0175] According to the adjustment statement, adjust the initial chart to obtain a target chart.

[0176] In practical applications, based on the question sentence, perform chart generation processing on the target data source to obtain an initial chart. Further, the user can perform secondary adjustment and modification on the initial chart to generate a target chart.

[0177] Specifically, after generating the initial chart, display the initial chart through a chart display interface, where the chart display interface also includes a chart adjustment control. The user can trigger the adjustment control, and then the execution entity receives an instruction to adjust the initial chart, that is, an adjustment instruction.

[0178] In response to this adjustment instruction, display an adjustment statement input interface, where the adjustment statement input interface is used to receive the adjustment statement input by the user. Then, the user inputs an adjustment statement in the adjustment statement input interface. Correspondingly, the execution entity performs semantic recognition on the adjustment statement and adjusts the initial chart according to the semantic recognition result to obtain an adjusted target chart.

[0179] Thus, for the scenario of chart recommendation in data analysis, a function of adjusting the chart and performing secondary operations on the chart is provided, which improves the adjustment efficiency and accuracy. By extending the chart adjustment process, users can ask questions and perform secondary editing on the recommended chart. This includes making fine modifications, annotations, and predictive modeling on the chart. This process not only improves the customization level of the chart but also promotes the formation of more accurate data insights and conclusions.

[0180] In one or more alternative embodiments of the present invention, the adjustment statement input interface includes at least one initial adjustment statement example; based on the adjustment statement input interface, receiving an adjustment statement for the initial chart, the specific implementation process can be as follows:

[0181] Receiving a statement selection instruction, and based on the statement selection instruction, determining a target adjustment statement example from the at least one initial adjustment statement example;

[0182] According to the target adjustment statement example, determining an adjustment statement for the initial chart.

[0183] Specifically, an adjustment statement example refers to an adjustment statement shown to guide users.

[0184] In practical applications, at least one initial adjustment statement example is displayed in the adjustment statement input interface, and users can select the initial adjustment statement example that is closest to their adjustment requirements from the at least one initial adjustment statement example. Accordingly, the execution entity receives a statement selection instruction carrying a first example identifier.

[0185] Further, the execution entity matches the first example identifier carried by the statement selection instruction with the second example identifiers of each initial adjustment statement example, and determines the initial adjustment statement example corresponding to the successfully matched second example identifier as the target adjustment statement example. Furthermore, an adjustment statement for the initial chart by the user can be determined based on the target adjustment statement example.

[0186] Thus, through at least one initial adjustment statement example in the adjustment statement input interface, users can be guided to input adjustment statements, which can not only lower the adjustment threshold for users but also improve the quality of adjustment statements by selecting initial adjustment statement examples, thereby improving the efficiency and accuracy of adjusting charts.

[0187] In one or more alternative embodiments of the present invention, the process of determining an adjustment statement for the initial chart according to the target adjustment statement example can be: using the target adjustment statement example as the adjustment statement for the initial chart. In this way, the rate of determining the adjustment statement can be increased.

[0188] In one or more alternative embodiments of the present invention, the process of determining the adjustment statement for the initial chart according to the target adjustment statement example may be specifically implemented as follows:

[0189] Obtain and display the statement template corresponding to the target adjustment statement example, where the statement template includes at least one second slot and a second fixed statement;

[0190] Receive the input text for each of the second slots, and combine the input text and the second fixed statement to obtain the adjustment statement for the initial chart.

[0191] Specifically, the statement template is used to guide the user to ask more accurate and high-quality adjustment questions about the initial chart, such as "Mark the _____ of the _____ indicator", where the text part is the fixed statement and "_____" represents the slot.

[0192] In practical applications, after determining the target adjustment statement example, obtain the statement template corresponding to the target adjustment statement example from the statement template library, and display the statement template to the user through a display device for viewing, so that the user can fill in the content in the second slot based on the second fixed statement and the target adjustment statement example in the statement template.

[0193] Specifically, the input content refers to the content input by the user in the second slot. The adjustment statement is used to prompt the execution entity for what adjustments need to be made to the initial chart.

[0194] The user can fill in the content in each second slot based on the semantics of the second fixed statement in the statement template, that is, the input content. Correspondingly, the execution entity receives the input content for each second slot.

[0195] Furthermore, the execution entity combines each input content and the second fixed statement according to the position of each second slot in the second fixed statement, so as to obtain the complete adjustment statement.

[0196] In this way, by introducing a structured statement template, it guides the user to input more accurate and high-quality adjustment statements, enabling the user to easily and accurately express their needs even when facing complex chart adjustments, thereby improving the accuracy of the adjustment.

[0197] In one or more alternative embodiments of the present invention, the second slot includes an input box; the process of receiving the input text for each of the second slots may be specifically implemented as follows:

[0198] Receive the input instruction for the input box, where the input instruction carries text content;

[0199] Use the text content as the input text.

[0200] Specifically, the input box is used for the user to input text content.

[0201] In practical applications, the user can perform input operations on the input box through a mouse, a touch interface, a keyboard, etc., that is, add text content to the input box. Correspondingly, the execution entity receives an input instruction carrying the text content.

[0202] In response to the input instruction, the execution entity uses the text content carried in the input instruction as the input text. In this way, the efficiency and accuracy of determining the input text can be improved, and by using the input box to guide the user to add text content in a fill-in-the-blank manner, the accuracy of the input text can be improved.

[0203] In addition, a prompt text can also be provided in the second slot, and the prompt text is used to guide the user to add text content in the input box.

[0204] By integrating interactive structured inputs such as selection and fill-in-the-blank, the user is guided to ask questions in a more refined manner, thus precisely matching the analysis capabilities of the AI. This method effectively improves the standardization of questions and the query efficiency for the AI, ensuring a significant enhancement in the accuracy and reliability of the analysis results.

[0205] See Figure 4 , Figure 4 which is the display interface of the statement template provided by the present invention. Among them, the adjustment statement is a "custom" adjustment, and examples are given with the statement templates of "mark the

maximum value / minimum value / average value

sales amount

sales amount

next month

[0206] In one or more alternative embodiments of the present invention, the process of adjusting the initial chart according to the adjustment statement to obtain the target chart may be specifically implemented as follows:

[0207] Perform semantic recognition on the adjustment statement to obtain adjustment semantics; the adjustment semantics includes at least one of modification semantics, annotation semantics, and prediction semantics;

[0208] When the adjustment semantics includes modification semantics, modify the initial chart according to the adjustment statement and the target data source to obtain the target chart;

[0209] When the adjustment semantics includes annotation semantics, annotate the initial chart according to the adjustment statement to obtain the target chart;

[0210] When the adjustment semantics includes prediction semantics, determine prediction data according to the adjustment statement and the target data source; add the prediction data to the initial chart to obtain the target chart.

[0211] Specifically, modify the semantic representation to modify the content of the initial chart; annotate the semantic representation to add annotations to the initial chart; adjust the semantic representation to add predicted data to the initial chart.

[0212] In practical applications, based on the received adjustment statement, semantic recognition can be performed on the adjustment statement. For example, use a semantic recognition model to extract the semantics of the adjustment statement to obtain the adjustment semantics. Among them, the adjustment semantics is at least one of the modification semantics, annotation semantics, and prediction semantics;

[0213] When the adjustment semantics includes the modification semantics, such as adding an average line, the data to be modified in the initial chart can be determined according to the adjustment statement, and data analysis can be performed on the target data source according to the adjustment statement to obtain the target modification data. Then, use the target modification data to overwrite the data to be modified in the initial chart to obtain the target chart.

[0214] When the adjustment semantics includes the annotation semantics, such as highlighting some data, the annotation content and the data to be annotated in the initial chart can be determined according to the adjustment statement, and the data to be annotated can be standardized according to the annotation content to obtain the target chart.

[0215] When the adjustment semantics includes the prediction semantics, the reference data can be determined from the target data source according to the adjustment statement, a suitable prediction model can be selected based on the reference data, and the reference data can be input into the prediction model to obtain the predicted data. Further, add the predicted data to the initial chart to obtain the target chart.

[0216] Exemplarily, if the adjustment statement is to predict the sales volume in December, the adjustment semantics of this adjustment statement is the prediction semantics. Extract the sales volume from January to November, that is, the reference data, from the adjustment statement from the target data source, select or fit a suitable prediction model, input the sales volume from January to November into the prediction model for prediction, obtain the sales volume in December, and plot the sales volume in December in the initial chart to obtain the target chart.

[0217] In this way, fine modification, annotation, and prediction can be performed on the chart, improving the customization level of the chart.

[0218] In one or more alternative embodiments of the present invention, the process of combining the input field and the first fixed statement to generate an interrogation sentence can be specifically implemented as follows:

[0219] Based on the position of the first slot in the first fixed statement, insert the input field into the first fixed statement to obtain the interrogation sentence.

[0220] Specifically, for each first slot, determine the position of the first slot in the first fixed statement, such as between the first character and the second character, or before the first character, etc. Then, insert the input field obtained based on the first slot into the first fixed statement according to this position. Traverse each input field to obtain the questioning sentence pattern. In this way, the accuracy of the questioning sentence pattern can be improved.

[0221] In one or more alternative embodiments of the present invention, the method further includes:

[0222] Based on the questioning sentence pattern, analyze the target data source to obtain a target conclusion.

[0223] In practical applications, not only can a chart be generated based on the questioning sentence pattern and the target data source, but also a conclusion can be generated, such as "The sales volume in July of this year is the largest".

[0224] Exemplarily, provide a "recommended interpretation" control on the data analysis interface. When the "recommended interpretation" control is triggered, perform a visual analysis on the target data source based on the questioning sentence pattern to obtain a target chart and a corresponding target conclusion. In this way, the user can quickly understand the file representation of the entire target data source, improving user satisfaction.

[0225] In one or more alternative embodiments of the present invention, the process of analyzing the target data source based on the questioning sentence pattern to obtain a target conclusion can be specifically implemented as follows:

[0226] Analyze the target data source based on the questioning sentence pattern to obtain an initial conclusion;

[0227] When a adjustment statement is received, update the initial conclusion according to the adjustment statement and / or the target chart adjusted based on the adjustment statement to obtain a target conclusion.

[0228] Specifically, on the basis of determining the questioning sentence pattern, a chart generation process and analysis can be performed on the target data source based on the questioning sentence pattern to obtain an initial chart and an initial conclusion. If the user triggers an adjustment control to adjust the initial chart, that is, a adjustment instruction is received, correspondingly, the execution entity adjusts the initial chart based on the adjustment statement, thereby obtaining an adjusted target chart, and updates the initial conclusion based on the adjustment statement, or updates the initial conclusion by analyzing the target chart, or updates the initial conclusion based on the adjustment statement and the target chart to obtain an updated initial conclusion, that is, the target conclusion.

[0229] In this way, by guiding the user to describe the questions about chart adjustment in a structured manner with a low threshold, that is, the adjustment statement, a more targeted conclusion description, that is, the target conclusion, can be generated according to the adjusted chart, thereby improving user satisfaction.

[0230] The following combines Figure 5 and Figure 6 to further illustrate the chart generation provided by the present invention.

[0231] Refer to Figure 5 , Figure 5 which is a schematic diagram of the interface for displaying charts provided by the present invention. By extracting and identifying the fields of the target data source (such as the tabular data in Figure 5 ), the fields are divided into two types: classification fields and numerical fields. Six analysis intentions are provided in the question box for data analysis for users to choose: customization, comparison, composition, trend, association, and distribution. According to the analysis intention selected by the user and combined with the different attributes of the two types of fields, a structured question template is formulated: 1. Customization: The user freely types in a description; 2. Comparison: Compare the [numerical fields] of different [classification fields]; 3. Composition: Analyze the composition of the [numerical fields] of different [classification fields]; 4. Trend: Analyze the change trend of the [numerical fields] [by time]; 5. Association: Analyze the association between [all fields] and [all fields]; 6. Distribution: Analyze the distribution of the [numerical fields] of different [classification fields]. The user can complete a standard question by selecting fields through a drop-down box, that is, generate a question sentence pattern. Then, based on the question sentence pattern, chart generation is performed on the target data source to obtain an initial chart. For example, for the question sentence pattern "Composition analysis of branches and profits", the target data source is analyzed to generate a pie chart, and for the question sentence pattern "Trend analysis of order date and profits", the target data source is analyzed to generate a bar chart. Among them, the initial chart can also be explained, such as "More than half of the profit amount of the branches is concentrated in the third branch and the first branch, accounting for 53%", "The profit in July is the highest". In addition, a re-analysis control is also provided for re-analyzing the target data source.

[0232] That is, with the support of the AI large language model, this application can generate an initial chart and basic conclusions (initial conclusions) based on the data (target data source) provided by the user. For example Figure 5 "Recommended Interpretation" is designed in

[0233] to perform visual analysis on the overall data of the target data source, generate recommended charts and corresponding insight conclusions for users to quickly understand the performance of the overall data file.

[0234] Refer to Figure 6 ,Figure 6 It is a schematic diagram of the interface for adjusting the chart provided by the present invention. Click "Chart Adjustment" at the chart result, and you can select the question examples corresponding to different capabilities. Through the structured questioning method, users can modify the chart, such as modifying the values, chart types, chart colors, legends, chart titles, XY-axis conversion, etc. In addition, the chart can also be annotated, such as adding average lines, trend lines, marking the maximum and minimum extreme values, as well as area markings and specified item markings, etc.

[0235] It also supports the merging and splitting of charts and outputs the corresponding conclusions. In particular, through structured question guidance, the present invention also provides a prediction ability. The AI selects the optimal prediction model to predict and plot the chart indicators. All in all, this design guides users to describe questions about chart adjustment with a low threshold through structured questions, and at the same time accurately returns the charts that meet the user's needs, and can generate more targeted conclusion descriptions based on the adjusted charts. When the user completes the secondary adjustment of the chart, click "Insert Chart" to insert the chart into the worksheet and complete the process of data analysis and AI chart generation.

[0236] Specifically, as Figure 6 shown in the left figure of Figure 6 click the "Chart Adjustment" control to display the initial adjustment statement examples, such as "Change the color of the chart to gray" and "Mark the maximum value in the chart indicators". As Figure 6 shown in the middle figure of

[0237] The embodiments provided by the present invention can optimize the user's question-asking experience: by introducing structured question-asking methods, such as dropdown selection and fill-in-the-blank methods, to guide users to ask more accurate and high-quality questions; combined with intelligent matching of various analysis intentions and data fields, users can easily and accurately express their needs even when facing complex data analysis tasks. It can enhance the customizability and interpretability of charts: not only support generating initial visual charts, but also allow users to make rich adjustments and modifications to the charts, such as changing the chart type, adding annotations and predictions, etc., making the generated charts more in line with the personalized needs of users and more convenient for users to understand and analyze. It can improve the overall process efficiency of data analysis: through structured question-asking and flexible adjustment of charts, the present invention supports the overall process of data analysis from question-asking to chart generation and then to result optimization, enabling users to explore and analyze data more efficiently and deeply. It can make data analysis and chart generation more user-friendly, more flexible and accurate, and meet the deeper data analysis needs of users.

[0238] The chart generation device provided by the present invention will be described below. The chart generation device described below can be mutually referred to the chart generation method described above.

[0239] Figure 7 is a schematic structural diagram of the chart generation device provided by the present invention, as Figure 7 shown, the chart generation device 700 includes: a first display module 701, a determination module 702, a second display module 703, a reception module 704, and a processing module 705, where:

[0240] The first display module 701 is configured to display at least one initial analysis intention in response to a data analysis instruction for a target data source;

[0241] The determination module 702 is configured to determine a target analysis intention from the at least one initial analysis intention based on the intention selection instruction in response to the intention selection instruction;

[0242] The second display module 703 is configured to display a question template corresponding to the target analysis intention, where the question template includes at least one first slot and a first fixed statement;

[0243] The reception module 704 is configured to receive input fields for each of the first slots, and combine the input fields and the first fixed statement to generate a question sentence pattern;

[0244] The processing module 705 is configured to perform chart generation processing on the target data source based on the question sentence pattern to obtain a target chart.

[0245] The chart generation device provided by the present invention shows at least one initial analysis intention in response to a data analysis instruction for a target data source; determines a target analysis intention from the at least one initial analysis intention based on the intention selection instruction in response to the intention selection instruction; shows a question template corresponding to the target analysis intention, where the question template includes at least one first slot and a first fixed statement; receives input fields for each of the first slots, combines the input fields and the first fixed statement to generate a question sentence pattern; and performs chart generation processing on the target data source based on the question sentence pattern to obtain a target chart. Through the target analysis intention and the question template, the present invention introduces a structured input method, restricts the overly divergent questions of users, guides users to ask high-quality questions with low thresholds, not only improves the quality of the question sentence pattern, but also helps to improve the efficiency and accuracy of chart generation, so that the generated chart better meets the user's expectations, thereby improving user satisfaction.

[0246] In one or more alternative embodiments of the present invention, the first slot is a drop-down box;

[0247] The receiving module 704 is further configured to:

[0248] In response to a trigger operation on the drop-down box, show at least one selectable field corresponding to the drop-down box;

[0249] In response to a field selection instruction for the at least one selectable field, determine the selectable field corresponding to the field selection instruction as the input field.

[0250] In one or more alternative embodiments of the present invention, the chart generation device 700 further includes an identification module, configured to:

[0251] Identify at least one initial field included in the target data source;

[0252] For each initial field, classify the initial field into a categorical field or a numerical field;

[0253] When the first slot is associated with the categorical field, use each of the initial fields included in the categorical field as the selectable field corresponding to the drop-down box;

[0254] When the first slot is associated with the numerical field, use each of the initial fields included in the numerical field as the selectable field corresponding to the drop-down box.

[0255] In one or more alternative embodiments of the present invention, the identification module is further configured to:

[0256] When the first slot is associated with the classification field, from each of the initial fields under the classification field, filter out the target fields related to the target analysis intention;

[0257] Use the target field as the selection field corresponding to the dropdown box.

[0258] In one or more alternative embodiments of the present invention, the at least one initial analysis intention includes at least one of a comparison intention, a composition intention, a trend intention, a connection intention, a distribution intention, and a custom intention;

[0259] The comparison intention is used to compare the numerical fields of different classification fields;

[0260] The composition intention is used to analyze the composition of the numerical fields of different classification fields;

[0261] The trend intention is used to analyze the change trend of different numerical fields according to a set period, and the set period is set based on requirements;

[0262] The connection intention is used to analyze the connection between different specified fields, and the specified fields include classification fields and numerical fields;

[0263] The distribution intention is used to analyze the distribution of the numerical fields of different classification fields;

[0264] The custom intention is used to perform analysis based on the user's custom input.

[0265] In one or more alternative embodiments of the present invention, the processing module 705 is further configured to:

[0266] Based on the questioning sentence pattern, perform chart generation processing on the target data source to obtain an initial chart;

[0267] In response to an adjustment instruction for the initial chart, display an adjustment statement input interface;

[0268] Based on the adjustment statement input interface, receive an adjustment statement for the initial chart;

[0269] According to the adjustment statement, adjust the initial chart to obtain a target chart.

[0270] In one or more alternative embodiments of the present invention, the adjustment statement input interface includes at least one initial adjustment statement example;

[0271] The processing module 705 is further configured to:

[0272] Receive a statement selection instruction, and determine a target adjustment statement example from the at least one initial adjustment statement example based on the statement selection instruction;

[0273] Determine an adjustment statement for the initial chart according to the target adjustment statement example.

[0274] In one or more alternative embodiments of the present invention, the processing module 705 is further configured to:

[0275] Obtain and display a statement template corresponding to the target adjustment statement example, where the statement template includes at least one second slot and a second fixed statement;

[0276] Receive input text for each of the second slots, and combine the input text and the second fixed statement to obtain an adjustment statement for the initial chart.

[0277] In one or more alternative embodiments of the present invention, the second slot is an input box;

[0278] The processing module 705 is further configured to:

[0279] Receive an input instruction for the input box, where the input instruction carries text content;

[0280] Use the text content as the input text.

[0281] In one or more alternative embodiments of the present invention, the processing module 705 is further configured to:

[0282] Perform semantic recognition on the adjustment statement to obtain an adjustment semantics; the adjustment semantics includes at least one of a modification semantics, a marking semantics, and a prediction semantics;

[0283] In the case where the adjustment semantics includes a modification semantics, modify the initial chart according to the adjustment statement and the target data source to obtain a target chart;

[0284] In the case where the adjustment semantics includes a marking semantics, mark the initial chart according to the adjustment statement to obtain a target chart;

[0285] In the case where the adjustment semantics includes a prediction semantics, determine prediction data according to the adjustment statement and the target data source; add the prediction data to the initial chart to obtain a target chart.

[0286] In one or more alternative embodiments of the present invention, the receiving module 704 is further configured to:

[0287] Based on the position of the first slot in the first fixed statement, insert the input field into the first fixed statement to obtain the question pattern.

[0288] In one or more alternative embodiments of the present invention, the chart generation device 700 further includes an analysis module configured to:

[0289] Based on the question pattern, analyze the target data source to obtain a target conclusion.

[0290] In one or more alternative embodiments of the present invention, the analysis module is further configured to:

[0291] Analyze the target data source based on the question pattern to obtain an initial conclusion;

[0292] In the case of receiving an adjustment statement, update the initial conclusion according to the adjustment statement and / or the target chart adjusted based on the adjustment statement to obtain a target conclusion.

[0293] Figure 8 An example of a schematic physical structure diagram of an electronic device is shown as Figure 8 shown. The electronic device may include: a processor 810, a communication interface 820, a memory 830, and a communication bus 840. Among them, the processor 810, the communication interface 820, and the memory 830 communicate with each other through the communication bus 840. The processor 810 can call the logical instructions in the memory 830 to execute a chart generation method, which includes: in response to a data analysis instruction for a target data source, display at least one initial analysis intention; in response to an intention selection instruction, based on the intention selection instruction, determine a target analysis intention from the at least one initial analysis intention; display a question template corresponding to the target analysis intention, where the question template includes at least one first slot and a first fixed statement; receive input fields for each of the first slots, combine the input fields and the first fixed statement to generate a question pattern; based on the question pattern, perform chart generation processing on the target data source to obtain a target chart.

[0294] In addition, when the logical instructions in the above-mentioned memory 830 are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical discs that can store program codes.

[0295] On the other hand, the present invention also provides a computer program product. The computer program product includes a computer program that can be stored on a computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the chart generation method provided by the above-mentioned various methods. The method includes: in response to a data analysis instruction for a target data source, displaying at least one initial analysis intention; in response to an intention selection instruction, based on the intention selection instruction, determining a target analysis intention from the at least one initial analysis intention; displaying a question template corresponding to the target analysis intention, where the question template includes at least one first slot and a first fixed statement; receiving input fields for each of the first slots, combining the input fields and the first fixed statement to generate a question sentence pattern; and based on the question sentence pattern, performing chart generation processing on the target data source to obtain a target chart.

[0296] In yet another aspect, the present invention also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, it is configured to execute the chart generation method provided by the above-mentioned various methods. The method includes: in response to a data analysis instruction for a target data source, displaying at least one initial analysis intention; in response to an intention selection instruction, based on the intention selection instruction, determining a target analysis intention from the at least one initial analysis intention; displaying a question template corresponding to the target analysis intention, where the question template includes at least one first slot and a first fixed statement; receiving input fields for each of the first slots, combining the input fields and the first fixed statement to generate a question sentence pattern; and based on the question sentence pattern, performing chart generation processing on the target data source to obtain a target chart.

[0297] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. A person of ordinary skill in the art can understand and implement it without creative work.

[0298] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the essence of the above technical solution, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0299] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments or equivalently replace some of the technical features. These modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for generating a chart, characterized in that, it includes: responding to a data analysis instruction for a target data source, and presenting at least one initial analysis intention; responding to an intention selection instruction, and determining a target analysis intention from the at least one initial analysis intention based on the intention selection instruction; presenting a question template corresponding to the target analysis intention, where the question template includes at least one first slot and a first fixed statement; receiving input fields for each of the first slots, and combining the input fields and the first fixed statement to generate a question sentence pattern; based on the question sentence pattern, performing chart generation processing on the target data source to obtain a target chart.

2. The chart generation method according to claim 1, characterized in that, the first slot is a dropdown box; the receiving input fields for the first slot includes: responding to a trigger operation for the dropdown box, and presenting at least one selectable field corresponding to the dropdown box; responding to a field selection instruction for the at least one selectable field, and determining the selectable field corresponding to the field selection instruction as the input field.

3. The chart generation method according to claim 2, characterized in that, before presenting the at least one selectable field corresponding to the dropdown box, it further includes: identifying at least one initial field included in the target data source; for each initial field, classifying the initial field into a classification field or a numerical field; when the first slot is associated with the classification field, using each initial field included in the classification field as the selectable field corresponding to the dropdown box; when the first slot is associated with the numerical field, using each initial field included in the numerical field as the selectable field corresponding to the dropdown box.

4. The chart generation method according to claim 3, characterized in that, when the first slot is associated with the classification field, using each initial field included in the classification field as the selectable field corresponding to the dropdown box, includes: when the first slot is associated with the classification field, screening out target fields related to the target analysis intention from each initial field under the classification field; using the target fields as the selectable fields corresponding to the dropdown box.

5. The chart generation method according to any one of claims 1 to 4, characterized in that, the at least one initial analysis intention includes at least one of a comparison intention, a composition intention, a trend intention, a connection intention, a distribution intention, and a custom intention; the comparison intention is used to compare numerical fields of different classification fields; the composition intention is used to analyze the composition of numerical fields of different classification fields; the trend intention is used to analyze the change trend of different numerical fields according to a set period, and the set period is set based on requirements; the connection intention is used to analyze the connection between different specified fields, and the specified fields include classification fields and numerical fields; the distribution intention is used to analyze the distribution of numerical fields of different classification fields; the custom intention is used to perform analysis based on a user's custom input.

6. The chart generation method according to any one of claims 1 to 4, wherein, the performing chart generation processing on the target data source based on the question formula to obtain a target chart includes: performing chart generation processing on the target data source based on the question formula to obtain an initial chart; responding to an adjustment instruction for the initial chart, and displaying an adjustment statement input interface; receiving an adjustment statement for the initial chart based on the adjustment statement input interface; adjusting the initial chart according to the adjustment statement to obtain a target chart.

7. The chart generation method according to claim 6, wherein, the adjustment statement input interface includes at least one initial adjustment statement example; the receiving an adjustment statement for the initial chart based on the adjustment statement input interface includes: receiving a statement selection instruction, and determining a target adjustment statement example from the at least one initial adjustment statement example based on the statement selection instruction; determining an adjustment statement for the initial chart according to the target adjustment statement example.

8. The chart generation method according to claim 7, wherein, the determining an adjustment statement for the initial chart according to the target adjustment statement example includes: acquiring and displaying a statement template corresponding to the target adjustment statement example, the statement template including at least one second slot and a second fixed statement; receiving input text for each of the second slots, and combining the input text and the second fixed statement to obtain an adjustment statement for the initial chart.

9. The chart generation method according to claim 8, wherein, the second slot is an input box; the receiving input text for each of the second slots includes: receiving an input instruction for the input box, the input instruction carrying text content; using the text content as the input text.

10. The chart generation method according to claim 6, wherein, the adjusting the initial chart according to the adjustment statement to obtain a target chart includes: performing semantic recognition on the adjustment statement to obtain an adjustment semantics; the adjustment semantics includes at least one of a modification semantics, a marking semantics, and a prediction semantics; in the case where the adjustment semantics includes a modification semantics, modifying the initial chart according to the adjustment statement and the target data source to obtain a target chart; in the case where the adjustment semantics includes a marking semantics, marking the initial chart according to the adjustment statement to obtain a target chart; in the case where the adjustment semantics includes a prediction semantics, determining prediction data according to the adjustment statement and the target data source; adding the prediction data to the initial chart to obtain a target chart.

11. The chart generation method according to claim 1, wherein, the combining the input field and the first fixed statement to generate a question formula includes: inserting the input field into the first fixed statement based on the position of the first slot in the first fixed statement to obtain the question formula.

12. The chart generation method according to claim 1, wherein, the method further includes: analyzing the target data source based on the question pattern to obtain a target conclusion.

13. The chart generation method according to claim 12, wherein, the analyzing the target data source based on the question pattern to obtain a target conclusion includes: analyzing the target data source based on the question pattern to obtain an initial conclusion; upon receiving an adjustment statement, updating the initial conclusion according to the adjustment statement and / or the target chart adjusted based on the adjustment statement to obtain a target conclusion.

14. A chart generation device, wherein, it includes: a first display module configured to display at least one initial analysis intention in response to a data analysis instruction for a target data source; a determination module configured to determine a target analysis intention from the at least one initial analysis intention based on the intention selection instruction in response to the intention selection instruction; a second display module configured to display a question template corresponding to the target analysis intention, where the question template includes at least one first slot and a first fixed statement; a receiving module configured to receive input fields for each of the first slots, and combine the input fields and the first fixed statement to generate a question pattern; a processing module configured to perform chart generation processing on the target data source based on the question pattern to obtain a target chart.

15. An electronic device includes a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein, when the processor executes the program, it implements the chart generation method according to any one of claims 1 to 13.

16. A computer-readable storage medium having a computer program stored thereon, wherein, when the computer program is executed by a processor, it implements the chart generation method according to any one of claims 1 to 13.

Citation Information

Cited By

  • Data analysis method and device, equipment, storage medium and program product

    CN121092020A