Interactive chart generation method and device, electronic equipment and storage medium

By introducing the RAG system into the interactive chart generation system, the problems of poor scalability, insufficient stability and ease of use in the prior art are solved, and the stability and ease of use of the system are improved, saving time and hardware costs.

CN120067127APending Publication Date: 2025-05-30XIAMEN HYMAKE TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510068121.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-16
Publication Date
2025-05-30

AI Technical Summary

Technical Problem

When using large language models to generate database query statements, the prior art has problems such as poor scalability, stability and ease of use, especially when targeted problems are encountered, it is difficult to effectively solve and is not friendly to end users.

Method used

Introduce the RAG system, standardize the input data and input it to the RAG system, output the RAG query results, and then generate a table or picture based on the results to display it to the user. This method improves the scalability and stability of the system, simplifies user operations, and saves time and hardware costs.

Benefits of technology

Through the introduction of the RAG system, the scalability and stability of the system have been greatly improved, user operations have become more friendly, and time and hardware costs have been saved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120067127A_ABST
    Figure CN120067127A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses an interactive chart generation method and device, electronic equipment and a storage medium, due to the fact that an RAG system is added, the system has excellent expansibility, a solution is introduced through the RAG system when a very targeted problem is encountered, the stability and usability of the system are greatly improved, and the user experience is improved. And a large amount of time cost and hardware cost are saved. The method comprises the steps of obtaining input data; under the condition that the type of the input data is about a data query type, performing normalization processing on the input data to obtain normalized input data; inputting the normalized input data into an RAG system, and outputting an RAG query result; and according to the normalized input data and the RAG query result, obtaining a table and / or a picture, and displaying the table and / or the picture.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of digital information technology, and in particular, to a method, device, electronic device, and storage medium for generating interactive charts. Background Art

[0002] Some current solutions focus on the generation of query statements. For example, by fine-tuning large language models, the large language models are made more targeted and accurate in generating query statements. There are also some solutions that focus on improving the accuracy of query statement generation through the optimization of prompt words. Generally speaking, they are limited to using large language models to generate database query statements, rather than a complete data generation solution for end users. Summary of the Invention

[0003] Embodiments of this application provide a method, device, electronic device, and storage medium for generating interactive charts. By incorporating a RAG system, the system has excellent scalability. When encountering highly targeted problems, solutions are introduced through the RAG system, greatly improving the stability and usability of the system, and saving a large amount of time and hardware costs.

[0004] In a first aspect of this application, a method for generating interactive charts is provided, which may include: obtaining input data; when the type of the input data is related to the data query type, performing normalization processing on the input data to obtain normalized input data; inputting the normalized input data into a RAG system to output a RAG query result; and obtaining a table, and / or, a picture based on the normalized input data and the RAG query result and displaying them.

[0005] Optionally, in some possible implementation manners, the step of inputting the normalized input data into a RAG system to output a RAG query result may include: matching a corresponding target RAG system according to the normalized input data; and inputting the normalized input data into the target RAG system to output a RAG query result.

[0006] Optionally, in some possible implementation manners, the step of obtaining a table, and / or, a picture based on the normalized input data and the RAG query result and displaying them may include: querying a corresponding database or running code according to the normalized input data and the RAG query result to obtain a query result or a running result; and converting the query result or the running result into a table, and / or, a picture and displaying it.

[0007] Optionally, in some possible implementation manners, converting the query result or the operation result into a table, and / or, a picture and displaying it may include: when detecting a table conversion operation on the query result or the operation result, converting the query result or the operation result into a table, obtaining the corresponding table and displaying it; and / or, when detecting a picture conversion operation on the query result or the operation result, converting the query result or the operation result into a picture, obtaining the corresponding picture and displaying it.

[0008] Optionally, in some possible implementation manners, the method further includes:

[0009] When detecting a download operation on the table, and / or, the picture, downloading the table, and / or, the picture; or,

[0010] When detecting a print operation on the table, and / or, the picture, printing the table, and / or, the picture.

[0011] Optionally, in some possible implementation manners, when the type of the input data is a data query type, normalizing the input data to obtain normalized input data may include: when the type of the input data is a data query type, inputting the input data into a large language model for normalization processing to obtain normalized input data.

[0012] Optionally, in some possible implementation manners, obtaining the input data may include:

[0013] Responding to the user's text input operation to obtain the input data; or,

[0014] Responding to the user's voice input operation to obtain the input data.

[0015] A second aspect of this application provides a device for generating an interactive chart, which may include:

[0016] An acquisition module, configured to acquire input data;

[0017] A processing module, configured to, when the type of the input data is a data query type, normalize the input data to obtain normalized input data; input the normalized input data into a RAG system, and output a RAG query result;

[0018] A display module, configured to obtain a table, and / or, a picture according to the normalized input data and the RAG query result and display it.

[0019] Optionally, in some possible implementation manners, the processing module is specifically configured to match a corresponding target RAG system according to the normalized input data; input the normalized input data into the target RAG system, and output a RAG query result.

[0020] Optionally, in some possible implementation manners, the display module is specifically configured to query a corresponding database or run code according to the normalized input data and the RAG query result to obtain a query result or a running result; convert the query result or the running result into a table, and / or, a picture and display it.

[0021] Optionally, in some possible implementation manners, the display module is specifically configured to perform a table conversion on the query result or the running result to obtain a corresponding table and display it when detecting a table conversion operation on the query result or the running result; and / or, perform a picture conversion on the query result or the running result to obtain a corresponding picture and display it when detecting a picture conversion operation on the query result or the running result.

[0022] Optionally, in some possible implementation manners,

[0023] The processing module is further configured to download the table, and / or, the picture when detecting a download operation on the table, and / or, the picture; or,

[0024] The processing module is further configured to print the table, and / or, the picture when detecting a print operation on the table, and / or, the picture.

[0025] Optionally, in some possible implementation manners, the processing module is specifically configured to input the input data into a large language model for normalization processing to obtain normalized input data when the type of the input data is a data query type.

[0026] Optionally, in some possible implementation manners, the acquisition module is specifically configured to acquire input data in response to a user's text input operation; or, acquire input data in response to a user's voice input operation.

[0027] In a third aspect of the present application, a terminal device is provided, including a memory, one or more processors, and a display, the memory is coupled to the processor, the memory is used to store computer program code, the computer program code includes computer instructions, and when the processor executes the computer instructions, the terminal device executes the method according to any one of the first aspect.

[0028] In a fourth aspect of the present application, a chip is provided. The chip includes a processor, a memory, and a display. The processor may be a logic circuit, an integrated circuit, or a general-purpose processor, etc. Instructions are stored in the memory. The processor may implement the method in the first aspect above by reading the software code stored in the memory. The memory may be integrated in the processor or may exist independently outside the processor.

[0029] In a fifth aspect of the present application, a chip system is provided. The chip system is applied to a terminal device. The chip system includes one or more interface circuits, one or more processors, and a display. The interface circuits and the processors are interconnected by lines. The interface circuits are configured to receive signals from the memory of the terminal device and send the signals to the processors. The signals include computer instructions stored in the memory. When the processors execute the computer instructions, the terminal device executes the method according to any one of the first aspect.

[0030] In a sixth aspect of the present application, a computer program product is provided. The computer program product includes a computer program (which may also be referred to as code or instructions). When the computer program is run, it causes the computer to execute the method in the first aspect above.

[0031] In a seventh aspect of the present application, a computer-readable storage medium is provided. The computer-readable storage medium stores a computer program (which may also be referred to as code or instructions). When it runs on a computer, it causes the computer to execute the method in the first aspect above.

[0032] As can be seen from the above technical solutions, the embodiments of the present application have the following advantages:

[0033] In the embodiments of the present application, input data is obtained; when the type of the input data is a data query type, the input data is normalized to obtain normalized input data; the normalized input data is input into the RAG system to output a RAG query result; according to the normalized input data and the RAG query result, a table and / or a picture is obtained and displayed. Since the RAG system is added, the system has excellent scalability. When encountering very targeted problems, solutions are introduced through the RAG system, greatly improving the stability and usability of the system and saving a large amount of time cost and hardware cost. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for describing the embodiments and the prior art will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can also be obtained according to these drawings.

[0035] Figure 1 Schematic diagram of an embodiment of the method for generating an interactive chart in an embodiment of the present application;

[0036] Figure 2A Schematic diagram of an interactive interface in an embodiment of the present application;

[0037] Figure 2B Schematic diagram of a process for generating an interactive chart in an embodiment of the present application;

[0038] Figure 3 Schematic diagram of an apparatus for generating an interactive chart in an embodiment of the present application;

[0039] Figure 4 Schematic diagram of an embodiment of an electronic device in an embodiment of the present application;

[0040] Figure 5 Schematic diagram of an embodiment of a terminal device in an embodiment of the present application. Detailed implementation manners

[0041] The embodiments of the present application provide a method, an apparatus, an electronic device and a storage medium for generating an interactive chart. By adding a RAG system, the system has excellent scalability. When encountering very targeted problems, the RAG system is used to introduce solutions, greatly improving the stability and usability of the system, and saving a large amount of time cost and hardware cost.

[0042] In order to enable those skilled in the art to better understand the solution of the present application, the technical solutions in the embodiments of the present application will be described below in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. All embodiments based on the embodiments of the present application should fall within the protection scope of the present application.

[0043] The following briefly describes some terms involved in the present application, as follows:

[0044] A large language model (LLM) refers to a deep learning model trained using a large amount of text data, enabling the model to generate natural language text or understand the meaning of language text. These models can provide in-depth knowledge and language production on various topics by training on a large dataset. The core idea is to learn the patterns and structures of natural language through large-scale unsupervised training, and to simulate the human language cognition and generation process to a certain extent.

[0045] Retrieval-augmented Generation, abbreviated as RAG, is one of the cutting-edge technologies of large models. The retrieval-augmented generation model combines language models and information retrieval technologies. Specifically, when the model needs to generate text or answer questions, it first retrieves relevant information from a large collection of documents and then uses this retrieved information to guide the generation of text, thereby improving the quality and accuracy of predictions.

[0046] Typically in a computer network, an Agent acts as an activation process in a computer. When it is needed for an external entity, it is responsible for specific types of behaviors. For example, in an SNMP (Simple Network Management Protocol) system, an agent is responsible for the parameters in the Management Information Base (MIB) and reports them as required to a console.

[0047] In various information systems, data operations are relatively core requirements, such as querying, statistics, reporting, parsing, plotting, etc. Data operation requirements are diverse, and to respond flexibly, traditional methods require a large amount of template definition, query customization, condition combination, etc., which are extremely unfriendly to end-users.

[0048] Existing technologies focus on two categories. One is to improve the accuracy of query statement generation by fine-tuning large language models, and the other is to improve the accuracy of query statement generation by optimizing prompt words. Of course, the two can be combined, but these solutions mainly focus on the generation of query statements. These two solutions will encounter some problems in actual use. For example, the cost of fine-tuning the model is relatively high, and the collection and collation of fine-tuning data need to cover a wide range of situations. When there are needs outside the coverage of the dataset, such as relatively personalized queries, it is necessary to reorganize the dataset to fine-tune the model, which is highly complex and unfriendly to end-users, and depends on the technical supplier or team having corresponding resources to carry out. The method of optimizing prompt words has unstable effects and also requires the support of a large number of cases. When the default optimization method is not ideal, it is also unfriendly to end-users.

[0049] In the embodiments of the present application, the electronic device may be a terminal device. The terminal device may be a mobile phone, a tablet computer (Pad), a computer with wireless transceiver function, a virtual reality (VR) terminal device, an augmented reality (AR) terminal device, a wireless terminal device in industrial control, a wireless terminal device in self-driving, a wireless terminal device in remote medical, a wireless terminal device in smart grid, a wireless terminal device in transportation safety, a wireless terminal device in smart city, or a wireless terminal device in smart home, etc.

[0050] By way of example and not limitation, in the embodiments of the present application, the terminal device may also be a wearable device with a display interface. A wearable device can also be called a wearable intelligent device, which is a general term for devices developed by applying wearable technology to the intelligent design of daily wear, such as glasses, gloves, watches, clothing, and shoes. A wearable device is a portable device that is directly worn on the body or integrated into the user's clothes or accessories. A wearable device is not only a hardware device, but also realizes powerful functions through software support, data interaction, and cloud interaction. Broadly speaking, wearable intelligent devices include those with complete functions and large sizes that can realize complete or partial functions without relying on a smart phone, such as smart watches or smart glasses, etc., and those that only focus on a certain type of application function and need to cooperate with other devices such as smart phones, such as various smart bracelets and smart jewelry for physical sign monitoring.

[0051] The technical solution of the present application proposes a comprehensive solution. In addition to using the above-mentioned model fine-tuning and prompt optimization, the key lies in introducing RAG and constructing a data operation knowledge base. On the basis of keeping the model relatively stable, the query accuracy is optimized by expanding the data operation knowledge base constructed by RAG. At the same time, the solution has diversified processing in the interaction form and result output, making the interaction process more friendly and the results easier to use. Here, introducing RAG and constructing a data operation knowledge base, for example, the RAG system usually slices the data and then vectorizes it. The slicing corresponds to the vectorization. When searching, the input is vectorized, and the data with a certain similarity is considered relevant through vector comparison, and then the slice (i.e., the original data) in the knowledge base is obtained through vector indexing.

[0052] The technical solution of the present invention will be further described below by way of embodiments, such as Figure 1As shown, it is a schematic diagram of an embodiment of the method for generating an interactive chart in an embodiment of the present application, which may include:

[0053] 101. Obtain input data.

[0054] In some possible implementation manners, the obtaining of the input data may include:

[0055] Respond to the user's text input operation to obtain input data; or,

[0056] Respond to the user's voice input operation to obtain input data.

[0057] Exemplarily, on the interaction interface of an electronic device, the interaction entry can be triggered in various ways, such as the system menu, the right-click menu, etc. This application only gives the main design of the interaction interface. The interaction design mainly includes a dialogue area and a function area. Among them, the dialogue area mainly includes user input (which can be in text form or voice form) and system response, and the function area includes viewing historical records, settings, etc. The function area is not the main technical content of the solution and is skipped. Here, the user input is the input data.

[0058] The system response mainly refers to that after the user inputs data requirements, the system of the electronic device displays the processing result of the system in the interaction interface, similar to the processing method of most current AI dialogues. As Figure 2A As shown, it is a schematic diagram of an interaction interface in an embodiment of the present application. For example: in the design diagram of the interaction interface, the icon of a person represents user input, the icon of a robot represents system output, and the dialog box is the area where the user can input text or voice.

[0059] The interaction interface design mainly highlights the dialogue form to illustrate how the system responds. The function area is not the focus and is not shown. For example, there are usually some buttons on the left side of the interface. After clicking, historical conversations, parameter settings, etc. can be displayed. This type of design is relatively common. The focus of the present invention is to propose that in addition to continuously training the model to generate Structured Query Language (SQL) and optimizing prompts, combining RAG will make the system have better scalability, rather than needing to frequently update the model or adjust prompt optimization.

[0060] 102. When the type of the input data is a data query type, perform normalization processing on the input data to obtain normalized input data.

[0061] In some possible implementation manners, when the type of the input data is related to the data query type, normalizing the input data to obtain the normalized input data may include: when the type of the input data is related to the data query type, inputting the input data into a large language model for normalization processing to obtain the normalized input data.

[0062] In the technical solution of the present application, if the type of the input data is a data query request, the input data can be normalized to obtain the normalized input data. Thus, subsequent operations such as database query can be performed more accurately.

[0063] After the system of the electronic device receives the user input, it first performs content classification and recognition to determine whether the user input is a data query requirement. If so, it processes according to the process proposed in this application. If it is a general question, it responds according to the question and answer of the conventional large language model or switches to other specific large language model services. General questions are not within the scope of discussion of this application.

[0064] For example: The discrimination here mainly refers to distinguishing whether the user input is for obtaining data. For example, if the user asks "I want to query the cement price from January to June", this is a data query requirement and is within the scope of discussion of this application. If the user asks questions such as "Where can I find the operation manual of the system" or "What day of the week is today", it does not belong to the processing scope discussed in this application, and there are other corresponding processing methods, which are not within the scope of discussion of this application.

[0065] When the electronic device determines that the type of the input data is related to the data query type, it parses the requirements of the user input data. After the system of the electronic device receives the user input data, it first uses some preset conditions of the system, such as which knowledge base to use and the corresponding database information, etc., for the system to connect to the database and the corresponding knowledge base.

[0066] The system determines the agent (Agent) to be used according to the preset conditions. For example, it uses the database Agent to connect to the database used by the system, that is, the system obtains data only from the database it uses, and uses the RAG Agent to connect to the relevant knowledge base to process the relevant RAG retrieval. After the system of the electronic device optimizes the user input, it enters the next step of processing.

[0067] The Agent here refers to an AI Agent, that is, an AI proxy, which can be considered as an Agent that automatically processes requests. For example, if the user says to query a certain piece of data and the system determines that this query requires connecting to the database, the system has a corresponding agent for processing data connection, connects to the database, and obtains the corresponding information in the database, such as what tables are in the database and what fields these tables have.

[0068] 103. Input the normalized input data into the RAG system to output the RAG query result.

[0069] In some possible implementation manners, the step of inputting the normalized input data into the RAG system to output the RAG query result may include: matching the corresponding target RAG system according to the normalized input data; inputting the normalized input data into the target RAG system to output the RAG query result.

[0070] Exemplarily, the system of the electronic device sends the optimized input data into the RAG system (i.e., the RAG query knowledge base), and determines whether there is relevant content in the knowledge base? The retrieval result of the relevant knowledge base is obtained, which can also be called the RAG query result. If the input data of the user gets the corresponding output in the RAG stage, that is, the RAG query result, the system combines the input data (i.e., the user input) and the RAG query result (i.e., the content of the knowledge base) for comprehensive optimization to perform the next operation. If there is no corresponding RAG query result output, the system directly performs generation optimization according to the input data of the user to obtain query statements, codes, etc.

[0071] The RAG system, that is, the retrieval-augmented generation system, can generate slices and indexes of the original data. When receiving a query request, the content of the query request is retrieved through the index to obtain the original data slices after processing, and the original data (possibly multiple related data) is reorganized through the large model and returned as part of the input for subsequent processing. The RAG stage refers to the process stage of performing retrieval in the process, and the RAG query result is the system output obtained after performing the retrieval.

[0072] Regarding the content of the RAG knowledge base, the present application can use a Q&A-like manner. Specifically, the content format in the knowledge base includes two parts. One part is the description of the data requirement, and the other part is the data processing method that should be generated, such as query statements, codes, etc. An example is shown in Table 1 below:

[0073]

[0074]

[0075] Table 1

[0076] Exemplarily, for example, if the requirement is "give the price of steel bars with a diameter less than 20 mm", the system will generate the query statement that should be used according to this condition (that is, the column of the system output). If the user requests to draw the data into a chart, etc., the system should output a piece of code that receives the input data and can finally generate the corresponding chart after the code is executed.

[0077] In this technical solution, according to the normalized input data, the corresponding target RAG system is matched; the normalized input data is input into the target RAG system, and a RAG query result is output, which improves the feasibility of the solution.

[0078] 104. According to the normalized input data and the RAG query result, a table and / or a picture are obtained and displayed.

[0079] In some possible implementation manners, the obtaining a table and / or a picture according to the normalized input data and the RAG query result and displaying them may include: according to the normalized input data and the RAG query result, a corresponding database is called for querying or code is run to obtain a query result or a running result; the query result or the running result is converted to obtain a table and / or a picture and displayed.

[0080] Exemplarily, after the system comprehensively optimizes the user's input data and the RAG query result, corresponding query statements or code are generated, etc., a corresponding Agent is called to execute database query or run code, and the query result or the running result is submitted to the next step. After the system obtains the query result or the running result, the data is converted into a table and / or a picture according to requirements and output for the user to confirm.

[0081] In this technical solution, a further description is made on obtaining a table and / or a picture according to the normalized input data and the RAG query result and displaying them. First, according to the normalized input data and the RAG query result, a corresponding database is called for querying or code is run to obtain a query result or a running result; then the query result or the running result is converted to obtain a table and / or a picture and displayed, which improves the feasibility of the solution.

[0082] In some possible implementation manners, the converting the query result or the running result to obtain a table and / or a picture and displaying them may include:

[0083] In the case of detecting a table conversion operation on the query result or the running result, the query result or the running result is subjected to table conversion to obtain a corresponding table and displayed;

[0084] and / or,

[0085] In the case of detecting a picture conversion operation on the query result or the running result, the query result or the running result is subjected to picture conversion to obtain a corresponding picture and displayed.

[0086] In this technical solution, when it is detected that a table conversion operation is performed on the query result or the operation result, the query result or the operation result is converted into a table and displayed; and / or, when it is detected that a picture conversion operation is performed on the query result or the operation result, the query result or the operation result is converted into a picture and displayed. The user can view the output picture and / or table, and if it meets the requirements, can enter subsequent processing.

[0087] In some possible implementation manners, the method further includes:

[0088] When it is detected that a download operation is performed on the table and / or the picture, the table and / or the picture is downloaded; or,

[0089] When it is detected that a print operation is performed on the table and / or the picture, the table and / or the picture is printed.

[0090] In this technical solution, the user can verify the table and / or the picture, that is, the user can view the output query result / operation result / picture / table, and if it meets the requirements, can enter subsequent processing, such as downloading, printing, etc. If there are further requirements, such as whether to adjust the requirements, that is, the user can input again (for example, the user adjusts the data query requirements or adds requirements), and the system will perform relevant operations according to the information such as the context history.

[0091] In the embodiment of this application, input data is obtained; when the type of the input data is a data query type, the input data is normalized to obtain normalized input data; the normalized input data is input into the RAG system to output a RAG query result; according to the normalized input data and the RAG query result, a table and / or a picture is obtained and displayed. The addition of the RAG system enables the system to have excellent scalability. When encountering very targeted problems, solutions are introduced through the RAG system, greatly improving the stability and usability of the system and saving a large amount of time and hardware costs.

[0092] With the continuous development of large language models, the application scenarios have also been continuously enriched. This application aims to utilize the capabilities of large language models in code generation, through the form of natural language interaction, combined with the knowledge base expansion of Retrieval-augmented Generation (RAG) and Artificial Intelligence Agent (AI Agent) to obtain, process, and generate charts, meeting the diverse data operation needs of end users. This application is mainly applied in the field of digital information technology, aiming to combine large language models with RAG and generate and execute data queries, chart generation, etc. based on natural language interaction. As Figure 2B shown, it is a schematic flowchart of interactive chart generation in an embodiment of this application.

[0093] The technical solution of this application is a comprehensive technical solution, mainly using technical means such as large language models, RAG, and AI Agent to provide flexible data operation functions for end users. Compared with existing invention solutions, it pays more attention to serving end users. Fine-tuning the model, optimizing prompts, etc. are only a part of this solution, and the key lies in that this application's technical solution incorporates the RAG system, making the system have excellent scalability. When encountering very targeted problems, solutions are introduced through the RAG system, greatly improving the stability and usability of the system, and saving a large amount of time and hardware costs. In addition, the output forms of this application's technical solution are diverse, supporting various forms such as text, data tables, and charts, greatly meeting the data output requirements of users in different scenarios. Traditional retrieval methods have limited understanding of the diverse expressions of language, which will directly lead to a decline in retrieval relevance, thus affecting a series of subsequent queries or code generation, etc.

[0094] As Figure 3 shown, it is a schematic diagram of an apparatus for interactive chart generation in an embodiment of this application, which may include:

[0095] An acquisition module 301, configured to acquire input data;

[0096] A processing module 302, configured to, when the type of the input data is a data query type, perform normalization processing on the input data to obtain normalized input data; input the normalized input data into the RAG system and output a RAG query result;

[0097] A display module 303, configured to obtain a table and / or a picture according to the normalized input data and the RAG query result and display them.

[0098] Optionally, in some possible implementation manners, the processing module 302 is specifically configured to match a corresponding target RAG system according to the normalized input data; input the normalized input data into the target RAG system, and output a RAG query result.

[0099] Optionally, in some possible implementation manners, the display module 303 is specifically configured to query a corresponding database or run code according to the normalized input data and the RAG query result to obtain a query result or a running result; convert the query result or the running result into a table and / or a picture and display it.

[0100] Optionally, in some possible implementation manners, the display module 303 is specifically configured to, when detecting a table conversion operation on the query result or the running result, perform a table conversion on the query result or the running result to obtain a corresponding table and display it; and / or, when detecting a picture conversion operation on the query result or the running result, perform a picture conversion on the query result or the running result to obtain a corresponding picture and display it.

[0101] Optionally, in some possible implementation manners,

[0102] The processing module 302 is further configured to, when detecting a download operation on the table and / or the picture, download the table and / or the picture; or,

[0103] The processing module 302 is further configured to, when detecting a print operation on the table and / or the picture, print the table and / or the picture.

[0104] Optionally, in some possible implementation manners, the processing module 302 is specifically configured to, when the type of the input data is a data query type, input the input data into a large language model for normalization processing to obtain normalized input data.

[0105] Optionally, in some possible implementation manners, the obtaining module 301 is specifically configured to obtain input data in response to a user's text input operation; or obtain input data in response to a user's voice input operation.

[0106] As Figure 4 shown, it is a schematic diagram of an embodiment of an electronic device in an embodiment of the present application, which may include a device for generating an interactive chart as Figure 3 shown.

[0107] The electronic device in the embodiment of the present application is described by taking a terminal device as an example. As Figure 5As shown, it is a schematic diagram of an embodiment of the terminal device in the embodiment of the present application. The following will be combined with Figure 5 Specifically introduce each component of the mobile phone in the terminal device:

[0108] The RF circuit 510 can be used for receiving and sending signals during information reception or call processes. Specifically, after receiving the downlink information from the base station, it is given to the processor 580 for processing; in addition, the designed uplink data is sent to the base station. Generally, the RF circuit 510 includes, but is not limited to, antennas, at least one amplifier, a transceiver, a coupler, a low-noise amplifier (LNA), a duplexer, etc. In addition, the RF circuit 510 can also communicate with the network and other devices through wireless communication. The above wireless communication can use any communication standard or protocol, including but not limited to Global System of Mobile communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (SMS), etc.

[0109] The memory 520 can be used to store software programs and modules. The processor 580 executes various functional applications and data processing of the mobile phone by running the software programs and modules stored in the memory 520. The memory 520 mainly includes a program storage area and a data storage area. Among them, the program storage area can store an operating system, applications required for at least one function (such as a sound playback function, an image playback function, etc.); the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.). In addition, the memory 520 can include high-speed random access memory and can also include non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other non-volatile solid-state storage devices.

[0110] The input unit 530 can be used to receive input numerical or character information and generate key signal inputs related to the user settings and function controls of the mobile phone. Specifically, the input unit 530 can include a touch panel 531 and other input devices 532. The touch panel 531, also known as a touch screen, can collect touch operations of the user thereon or nearby (such as operations of the user using any suitable object or accessory such as a finger or a stylus on or near the touch panel 531), and drive corresponding connection devices according to a preset program. Optionally, the touch panel 531 can include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the touch position of the user, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, then sends it to the processor 580, and can receive and execute commands sent by the processor 580. In addition, multiple types such as resistive, capacitive, infrared, and surface acoustic wave can be used to implement the touch panel 531. In addition to the touch panel 531, the input unit 530 can also include other input devices 532. Specifically, the other input devices 532 can include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, power on / off keys, etc.), a trackball, a mouse, a joystick, etc.

[0111] The display unit 540 can be used to display information input by the user or information provided to the user and various menus of the mobile phone. The display unit 540 can include a display panel 541. Optionally, the display panel 541 can be configured in forms such as a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc. Further, the touch panel 531 can cover the display panel 541. After the touch panel 531 detects a touch operation thereon or nearby, it is transmitted to the processor 580 to determine the type of touch event. Subsequently, the processor 580 provides corresponding visual output on the display panel 541 according to the type of touch event. Although in Figure 5 it, the touch panel 531 and the display panel 541 are implemented as two independent components to realize the input and input functions of the mobile phone, but in some embodiments, the touch panel 531 and the display panel 541 can be integrated to realize the input and output functions of the mobile phone.

[0112] The mobile phone may further include at least one sensor 550, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor. Among them, the ambient light sensor can adjust the brightness of the display panel 541 according to the brightness of the ambient light, and the proximity sensor can turn off the display panel 541 and / or the backlight when the mobile phone is moved to the ear. As a kind of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in all directions (generally three axes), and can detect the magnitude and direction of gravity when stationary, and can be used in applications for identifying the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for other sensors that the mobile phone can also be configured with, such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., they will not be elaborated here.

[0113] The audio circuit 560, the speaker 561, and the microphone 562 can provide an audio interface between the user and the mobile phone. The audio circuit 560 can transmit the electrical signal converted from the received audio data to the speaker 561, and the speaker 561 converts it into a sound signal for output; on the other hand, the microphone 562 converts the collected sound signal into an electrical signal, which is received by the audio circuit 560 and then converted into audio data. After the audio data is output to the processor 580 for processing, it is sent to another mobile phone, for example, via the RF circuit 510, or the audio data is output to the memory 520 for further processing.

[0114] Wi-Fi belongs to short-range wireless transmission technology. The mobile phone can help users send and receive emails, browse the web, and access streaming media through the Wi-Fi module 570, which provides users with wireless broadband Internet access. Although Figure 5 the Wi-Fi module 570 is shown, it can be understood that it does not belong to an essential component of the mobile phone and can be omitted entirely within the scope of not changing the essence of the invention according to needs.

[0115] The processor 580 is the control center of the mobile phone, connecting various parts of the entire mobile phone through various interfaces and lines. By running or executing software programs and / or modules stored in the memory 520, and by calling data stored in the memory 520, it executes various functions of the mobile phone and processes data, thereby monitoring the mobile phone as a whole. Optionally, the processor 580 may include one or more processing units; preferably, the processor 580 may integrate an application processor and a modem processor. Among them, the application processor mainly processes the operating system, user interface, and application programs, etc., and the modem processor mainly processes wireless communication. It can be understood that the above-mentioned modem processor may not be integrated into the processor 580 either.

[0116] The mobile phone further includes a power supply 590 (such as a battery) for powering each component. Preferably, the power supply can be logically connected to the processor 580 through a power management system, so as to realize functions such as management of charging, discharging, and power consumption management through the power management system.

[0117] Although not shown, the mobile phone may further include a camera, a Bluetooth module, etc., which will not be elaborated here.

[0118] In the embodiment of the present application, the processor 580 is configured to obtain input data; when the type of the input data is a data query type, normalize the input data to obtain the normalized input data; input the normalized input data into the RAG system and output a RAG query result.

[0119] The display unit 540 is configured to obtain a table, and / or a picture according to the normalized input data and the RAG query result and display them.

[0120] Optionally, in some possible implementation manners, the processor 580 is specifically configured to match a corresponding target RAG system according to the normalized input data; input the normalized input data into the target RAG system and output a RAG query result.

[0121] Optionally, in some possible implementation manners, the display unit 540 is specifically configured to query a corresponding database or run code according to the normalized input data and the RAG query result to obtain a query result or a running result; convert the query result or the running result to obtain a table, and / or a picture and display them.

[0122] Optionally, in some possible implementation manners, the display unit 540 is specifically configured to perform a table conversion on the query result or the running result to obtain a corresponding table and display it when detecting a table conversion operation on the query result or the running result; and / or perform a picture conversion on the query result or the running result to obtain a corresponding picture and display it when detecting a picture conversion operation on the query result or the running result.

[0123] Optionally, in some possible implementation manners,

[0124] The processor 580 is further configured to download the table, and / or the picture when detecting a download operation on the table, and / or the picture; or,

[0125] The processor 580 is further configured to print the table, and / or the picture when detecting a printing operation on the table, and / or the picture.

[0126] Optionally, in some possible implementation manners, the processor 580 is specifically configured to input the input data into a large language model for normalization processing to obtain normalized input data when the type of the input data is a data query type.

[0127] Optionally, in some possible implementation manners, the processor 580 is specifically configured to obtain input data in response to a user's text input operation; or obtain input data in response to a user's voice input operation.

[0128] The embodiment of the present application further provides a computer-readable storage medium storing computer instructions, which, when running on an electronic device, cause the electronic device to execute the above method for generating an interactive chart.

[0129] The above computer-readable storage medium may adopt any combination of one or more computer-readable media. The computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples (non-exhaustive list) of the computer-readable storage medium include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), or a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, the computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0130] The computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take various forms, including - but not limited to - an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer-readable signal medium may also be any computer-readable medium other than the computer-readable storage medium, which can send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0131] The program code contained on a computer-readable medium can be transmitted by any suitable medium, including - but not limited to - wireless, wire, optical fiber cable, radio frequency (RF), etc., or any suitable combination of the above.

[0132] The computer program code for performing the operations of this specification can be written in one or more programming languages or combinations thereof. The programming languages include object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, executed as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (for example, by using an Internet service provider to connect through the Internet).

[0133] The embodiments of this application also provide a computer program product. When the computer program product runs on a computer, it causes the computer to execute some or all of the steps in the above method embodiments.

[0134] The embodiments of this application provide a chip system. The chip system includes a processor and may also include a memory for implementing the functions of an electronic device in the foregoing method. The chip system can be composed of chips or can include chips and other discrete devices.

[0135] Those skilled in the art can clearly understand that for the convenience and conciseness of description, the specific working processes of the systems, devices, and units described above can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated here.

[0136] In several embodiments provided by this application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division, and there can be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces, and the indirect couplings or communication connections of devices or units can be in electrical, mechanical, or other forms.

[0137] The unit described as a separation component may or may not be physically separated. The component shown as a unit may or may not be a physical unit, that is, it may be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0138] In addition, each functional unit in various embodiments of the present application may be integrated in a processing unit, may exist separately as individual physical units, or two or more units may be integrated in one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.

[0139] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This 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 application. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs that can store program codes.

[0140] As described above, the above embodiments are only used to illustrate the technical solution of the present application and are not intended to limit it; although the present application 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 perform equivalent replacements for some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of various embodiments of the present application.

Claims

1. A method for generating an interactive chart, characterized in that: include: Get input data; In the case where the type of the input data is a data query type, normalizing the input data to obtain normalized input data; Inputting the normalized input data into the RAG system and outputting the RAG query result; Based on the normalized input data and the RAG query result, a table and / or a picture is obtained and displayed.

2. The method according to claim 1, characterized in that The step of inputting the normalized input data into the RAG system and outputting the RAG query result comprises: According to the normalized input data, matching a corresponding target RAG system; The normalized input data is input into the target RAG system, and the RAG query result is output.

3. The method according to claim 1 or 2, characterized in that: The step of obtaining and displaying a table and / or a picture according to the normalized input data and the RAG query result comprises: According to the normalized input data and the RAG query result, calling the corresponding database to query or run the code to obtain the query result or the running result; The query result or the operation result is converted into a table and / or a picture and displayed.

4. The method according to claim 3, characterized in that The query result or the operation result is converted into a table and / or a picture and displayed, including: In the case where a table conversion operation is detected for the query result or the operation result, the query result or the operation result is converted into a table to obtain a corresponding table and display it; and / or, In the case where it is detected that a picture conversion operation is performed on the query result or the operation result, the query result or the operation result is converted into a picture to obtain a corresponding picture and display it.

5. The method according to claim 1 or 2, characterized in that: The method further comprises: In case a download operation is detected for the table and / or the picture, the table and / or the picture is downloaded; or, When a printing operation is detected for the table and / or the picture, the table and / or the picture is printed.

6. The method according to claim 1 or 2, characterized in that: When the type of the input data is a data query type, normalizing the input data to obtain normalized input data includes: In the case where the type of the input data is a data query type, the input data is input into a large language model for normalization processing to obtain normalized input data.

7. The method according to claim 1 or 2, characterized in that: The obtaining of input data comprises: Respond to the user's text input operation and obtain input data; or, Respond to the user's voice input operation and obtain input data.

8. A device for generating an interactive chart, characterized in that: include: An acquisition module, used to obtain input data; A processing module, configured to, when the type of the input data is a data query type, perform normalization processing on the input data to obtain normalized input data; Inputting the normalized input data into the RAG system and outputting the RAG query result; The display module is used to obtain and display a table and / or a picture according to the normalized input data and the RAG query result.

9. An electronic device, characterized in that: include: A memory, a processor, and a display, wherein the memory stores a computer program that can be run on the processor, and when the electronic device executes the program, the method according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.