Platform dialogue method, device and system based on artificial intelligence and medium

By building LLM model and API interface information for multi-model tasks, the problems of long development cycle and single functions of BI platform are solved, and the user experience and platform common capabilities are achieved quickly understand user needs and optimize the BI platform, which is improved.

CN119202191APending Publication Date: 2024-12-27CHINA PING AN PROPERTY INSURANCE CO LTD

Patent Information

Application Number
CN202411362776.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-27
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

The existing BI platform has a long development cycle, single generation results, weak functional scalability, and cannot meet users' personalized needs.

Method used

By obtaining API interface information associated with user problems, a multi-model task LLM model is built, and based on this information, training and inference, assembling user problems to input LLM models for prompt words, predicting user intentions and slots, obtaining API data, and using LLM The model provides factual descriptions.

Benefits of technology

It has achieved rapid understanding of user needs, optimized and reconstructed the BI platform through the LLM model, shortened development cycle, reduced costs, enhanced platform universal capabilities, improved user experience and lowered usage thresholds.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119202191A_ABST
    Figure CN119202191A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of artificial intelligence and natural language processing, and discloses an artificial intelligence-based platform dialogue method, which comprises the following steps of: obtaining API (Application Program Interface) information associated with a user question; constructing an LLM model comprising a plurality of model tasks, and training and reasoning the LLM model based on API interface information; assembling the user problems into cue words, inputting the cue words into an LLM model, and predicting user intentions and slot positions according to the user problems to obtain corresponding API data; and carrying out factual verbal skill description on the API data by using an LLM model to obtain and output a conversation verbal skill. According to the method, the requirements of a user can be quickly understood in a context multi-round dialogue mode, results generated by various tasks based on the LLM model can be mutually verified through a known API, the understanding ability, the generation ability and the controllability of the large model are fully exerted, and the BI platform is optimized and reconstructed through the LLM model. The development cycle of the project can be effectively shortened, the project development cost is reduced, and the universality of the BI platform is enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the fields of artificial intelligence, natural language processing technology and financial technology, and in particular to an artificial intelligence-based platform dialogue method, device, system and medium. Background Art

[0002] Large Language Model (LLM) is a generative large language model in the field of artificial intelligence that aims to understand and generate human language. It can perform a series of natural language processing tasks such as text generation, text summarization, machine translation, semantic understanding, etc., and is widely used in search, dialogue, code development, copywriting, etc. In recent years, conversational AI based on LLM has been applied to various consumer and enterprise terminals, such as intelligent voice assistants on in-vehicle systems and mobile terminals, making it easy for users to input operating instructions and assisting users in online shopping or online payment on mobile terminals.

[0003] At present, the training process of LLM is a large model that generates text based on human preferences. The ability to understand text is constantly improving, but there are still problems such as untimely knowledge updates and easy generation of false and erroneous knowledge. Therefore, a controlled LLM is the key to implementation. The authenticity, accuracy and ethics of the generated content should be considered when building a controlled LLM system. The knowledge-based prompt engineering (prompt engineering for short) can greatly reduce the illusion of LLM. Business intelligence (BI for short) is usually understood as a financial tool that converts existing data in an enterprise into knowledge and helps enterprises make wise business decisions. On the BI platform, users want to see the latest consulting and reports in various business fields, which can help users conduct market research and analysis. Traditional BI is based on the underlying database of the business and developed into various application programming interfaces (API interfaces for short) for scheduling and display on the system. The development cycle is long, the generated results are relatively simple, and the functional scalability is weak, which cannot meet the personalized needs of users. Summary of the invention

[0004] In view of the above-mentioned deficiencies in the prior art, the purpose of the present invention is to provide an artificial intelligence-based platform dialogue method, device, system and medium that can be applied to artificial intelligence or other related fields, so as to solve the problems that the existing BI platform has a long development cycle, generates relatively simple results, has weak functional scalability, and cannot meet the personalized needs of users.

[0005] In a first aspect, the present invention provides a platform dialogue method based on artificial intelligence, comprising:

[0006] Get API interface information associated with the user's question;

[0007] Constructing an LLM model including multiple model tasks, and training and reasoning the LLM model based on the API interface information;

[0008] Assemble the user questions into prompt words and input them into the LLM model, and predict the user intention and slot according to the user questions to obtain corresponding API data;

[0009] The API data is described in factual terms using the LLM model to obtain and output the dialogue terms.

[0010] In a second aspect, the present invention provides a platform dialogue device based on artificial intelligence, comprising:

[0011] The acquisition module is used to obtain API interface information associated with the user's question;

[0012] A construction module, used to construct an LLM model including multiple model tasks, and train and reason about the LLM model based on the API interface information;

[0013] An input module, used to assemble the user question into prompt words and input them into the LLM model, and predict the user intention and slot according to the user question to obtain corresponding API data;

[0014] The processing module is used to describe the API data in factual terms using the LLM model, and obtain and output the dialogue terms.

[0015] In a third aspect, the present invention provides an artificial intelligence-based platform dialogue system, the system comprising at least one processor; and

[0016] a memory communicatively connected to the at least one processor; wherein,

[0017] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the above-mentioned artificial intelligence-based platform dialogue method.

[0018] A fourth aspect of the present invention provides a non-volatile computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are executed by one or more processors, the one or more processors can execute the above-mentioned artificial intelligence-based platform dialogue method.

[0019] Beneficial effects: The present invention discloses a platform dialogue method, device, system and medium based on artificial intelligence. Compared with the prior art, the embodiment of the present invention obtains API interface information associated with user questions; constructs an LLM model including multiple model tasks, and trains and infers the LLM model based on the API interface information; assembles the user questions into prompt words and inputs them into the LLM model, and predicts the user intention and slot according to the user questions to obtain corresponding API data; describes the API data with factual speech using the LLM model, obtains and outputs the dialogue speech. According to the present invention, the user's needs can be quickly understood through the form of multi-round dialogue in context, and the results generated by various tasks based on the LLM model can be mutually verified through known APIs, giving full play to the understanding ability, generation ability and controllability of the large model, and optimizing and reconstructing the functions of the BI platform through the LLM model, which can effectively shorten the project development cycle, reduce project development costs, enhance the general capabilities of the BI platform, improve user experience and lower the user's usage threshold. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The present invention will be further described below with reference to the accompanying drawings and embodiments, in which:

[0021] Figure 1 A schematic diagram of an application environment for an artificial intelligence-based platform dialogue method provided in an embodiment of the present invention.

[0022] Figure 2 A flow chart of a platform dialogue method based on artificial intelligence provided by an embodiment of the present invention;

[0023] Figure 3 A flowchart of step S100 in the platform dialogue method based on artificial intelligence provided by an embodiment of the present invention;

[0024] Figure 4 A flowchart of step S200 in the platform dialogue method based on artificial intelligence provided by an embodiment of the present invention;

[0025] Figure 5 A flowchart of step S210 in the platform dialogue method based on artificial intelligence provided by an embodiment of the present invention;

[0026] Figure 6 A flowchart of step S220 in the platform dialogue method based on artificial intelligence provided by an embodiment of the present invention;

[0027] Figure 7 A flowchart of step S230 in the platform dialogue method based on artificial intelligence provided by an embodiment of the present invention;

[0028] Figure 8Flow chart of step S300 in the platform dialogue method based on artificial intelligence provided by an embodiment of the present invention

[0029] Fig. 9 A schematic diagram of functional modules of an artificial intelligence-based platform dialogue device provided in an embodiment of the present invention;

[0030] Fig.10 A schematic diagram of the structure of an artificial intelligence-based platform dialogue device provided in an embodiment of the present invention.

[0031] Fig.11 Another structural schematic diagram of an artificial intelligence-based platform dialogue device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0032] In order to make the purpose, technical solution and effect of the present invention clearer and more specific, the present invention is further described in detail below. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. The embodiments of the present invention are described below in conjunction with the accompanying drawings.

[0033] The platform dialogue method based on artificial intelligence provided by the embodiment of the present invention can be applied in Figure 1 In an application environment, the client communicates with the server through the network, and the server can obtain API interface information associated with the user question; an LLM model containing multiple model tasks is constructed, and the LLM model is trained and inferred based on the API interface information; the user question is assembled into prompt words and input into the LLM model, and the user intention and slot are predicted according to the user question to obtain the corresponding API data; the API data is described in factual speech using the LLM model, and the dialogue speech is obtained and output. The LLM model is trained through deep learning technology and can process and respond to various queries and requests to provide a personalized user experience.

[0034] The application scenarios of the artificial intelligence-based platform dialogue include business intelligence (BI platform for short) scenarios. The rainfall scenarios are often very complex, and it can help companies collect, analyze and present key business data. Through the BI platform, users can obtain the latest consultations and reports in various business areas in real time, so as to better understand market trends, customer needs and competitors. In addition, the BI platform can also help companies discover potential business opportunities and risks, and conduct market research and analysis for companies. Among them, the client can be but is not limited to various personal computers, laptops, smart phones, tablet computers and portable wearable devices. The server can be implemented with an independent server or a server cluster consisting of multiple servers. The present invention is described in detail below through specific embodiments.

[0035] In order to solve the above problems, the present invention proposes a platform dialogue method based on artificial intelligence. Figure 2 For a flowchart of an embodiment of the platform dialogue method based on artificial intelligence provided by the present invention, please refer to Figure 2 , the method specifically comprises the following steps:

[0036] S100, obtaining API interface information associated with the user's question;

[0037] The artificial intelligence-based platform dialogue method provided by the present invention can be applied to intelligent question-and-answer engines such as intelligent customer service or intelligent assistants in various application scenarios. The intelligent question-and-answer engine is usually implemented through a server, which can receive user questions in real time. For example, in the application field of business intelligence platforms, users often need to use business intelligence platforms to help companies obtain the latest consultations and reports, and often need to use intelligent business platforms to display some business data reports about companies, so that users can query the latest relevant information to meet the personalized needs of users.

[0038] For example, the system needs to receive and understand the user's natural language input. This usually involves the front-end interface of the dialogue management system, where users can enter their questions or needs through text or voice. The system uses natural language processing (NLP) techniques, such as word segmentation, named entity recognition (NER), and intent recognition, to extract key information from the user's question. This key information may include time, place, person, event, etc. Based on the extracted key information, the system searches the back-end database for the API interface associated with the user's question. The API interface may be pre-defined and used to execute specific business logic, such as querying a database, calling an external service, or performing calculations. Once a suitable API interface is found, the system will construct the necessary request parameters based on the user's question. These parameters will be encapsulated into the format required for API calls, such as JSON or XML, to facilitate subsequent calls to the API interface information.

[0039] Among them, Figure 3 As shown, the step S100 of obtaining the API interface information associated with the user question includes:

[0040] S110, obtaining the domain name, input parameter, output parameter and function document of each API interface of the BI platform according to the user question;

[0041] S120. List the parameters and questions involved in the actual business scenarios of the BI platform according to the input and output parameters of the API interface.

[0042] In this embodiment, for steps S110-S120, when building a BI platform, it is first necessary to obtain detailed information on each API interface. This information includes domain name, input parameters, output parameters, and functional documentation, which are crucial to understanding the functions and usage of the API. Usually, this information can be obtained from the developer documentation or API management tools of the BI platform. The developer documentation usually describes in detail the functions, usage methods, and required parameters of each API interface. For example, an API interface for querying premium income may require the following parameters: time range (such as start date and end date), institution name, indicator name, etc. These parameters will help the API accurately return the required data.

[0043] In addition to understanding the basic information of the API interface, you also need to determine which parameters are necessary based on the actual business scenario. For example, if a user wants to query this year's premium income, he or she may need to determine the following parameters:

[0044] Time range: To get data for this year, you need to specify a start date (usually the beginning of the year) and an end date (usually the end of the year).

[0045] Institution Name: Premium income may be classified by institution, so you need to specify the institution name you want to query.

[0046] Indicator name: Premium income is a specific indicator and its name needs to be clearly specified.

[0047] In addition, other parameters that may affect the results need to be considered, such as region, product type, etc. By listing the parameters and questions involved in actual business scenarios, you can better understand the requirements of the API interface and ensure that they are used correctly.

[0048] In the actual development process, you also need to pay attention to the output parameter format of the API interface. Usually, the API returns data in JSON or XML format. Developers need to parse and process the results according to the returned data structure. For example, if the data returned is in JSON format, you can use the JSON parsing library in the programming language to extract the required information.

[0049] In short, obtaining detailed information about each API interface of the BI platform is one of the key steps in building an application. By carefully reading the developer documentation and API management tools, and determining the necessary parameters according to actual business needs, you can ensure the correct use of the API, thereby providing users with accurate data and functions.

[0050] S200, constructing an LLM model including multiple model tasks, and training and reasoning the LLM model based on the API interface information;

[0051] When using the LLM model for training and reasoning, the functionality of the LLM model is enhanced by combining the API interface information. Through training, the LLM model can learn how to generate appropriate API calls and data queries based on the user's questions and business scenario parameters. This integrated approach enables the model to understand different business needs and automatically construct corresponding API requests to obtain or process data. For example, when a user asks "query this year's premium income", the model can generate an API call containing the correct time range, institution name, and indicator name, and effectively return the required data results. This intelligent processing not only improves the efficiency of data processing, but also ensures the accuracy and practicality of the data.

[0052] Among them, Figure 4 As shown, the construction includes an LLM model containing multiple model tasks, including:

[0053] S210: Construct an inheritance model to determine whether the user questions are in the same sub-session.

[0054] In this embodiment, the inheritance model is an important concept in programming and software development, which refers to the ability of a class (called a subclass or derived class) to inherit the properties and methods of another class (called a parent class or base class). This mechanism allows code reuse, allowing developers to create new classes to extend or modify the behavior of existing classes, and the inheritance model can be used to determine whether the user question is within the same subsession. Different programming languages ​​have different inheritance syntaxes. For example, in Java, the extends keyword is used to implement inheritance between classes; in Python, inheritance is implemented by specifying the parent class in the class definition; in JavaScript, the prototype chain or the class keyword can be used to implement inheritance.

[0055] In practical applications, inheritance models can be used to implement a variety of design patterns, such as template method pattern, strategy pattern, etc., which help build flexible and extensible software systems. In the Django framework, inheritance models are also used to define database models. Django supports multi-table inheritance, allowing developers to define a base class model and then create new models by inheriting this base class, each with its own table in the database. This mechanism makes the relationship between models clearer and allows common fields and methods to be reused. For example, a Place model can be defined as a base class that contains basic information about the place, such as name and address. Then a Restaurant subclass can be created that inherits from Place and adds restaurant-specific information, such as whether hot dogs or pizza are served. In this way, the Restaurant model can not only access the fields of the Place model, but also have its own specific fields.

[0056] Among them, Figure 5 As shown, the step of constructing the inheritance model in step S210 to predict the question points of the user's question includes:

[0057] S211, determining whether the user question context is relevant during the conversation;

[0058] S212. If the context is relevant, inherit the API parameters of the previous question; if the context is not relevant, obtain the API parameters of the user question through the intent model and the slot model.

[0059] In this embodiment, in the dialogue system, determining whether the user's question context is relevant is a key step, which involves understanding and processing the user's input in order to provide an appropriate response. The system first analyzes the user's input to determine whether it is relevant to the previous dialogue context. This usually involves natural language understanding (NLU) technology, which is used to identify the intent and relevance of the user's input. If the user's current question is relevant to the previous question context, the system will inherit the API parameters of the previous question. This means that the system will use the previously determined parameters to build a response to maintain the continuity of the dialogue. If the user's input is not relevant to the previous context, the system will process the new input through the intent model and the slot model, that is, it can obtain the API parameters of the user's question, that is, the API parameters of the new question, through the intent model and the slot model. The intent model is used to identify the user's intent, while the slot model is used to extract key information, such as date, time, location, etc. Based on the results of the intent model and the slot model, the system will obtain or generate new API parameters. The API parameters will be used to call the corresponding API to obtain the required information or perform a specific task. Once the system determines the user's intent and necessary parameters, it will generate an appropriate response. This may include calling an API to retrieve information, perform a task, or provide feedback.

[0060] S220: Build an intention model to predict the question points of the user's question.

[0061] The intent model is a key component in natural language processing (NLP). It is used to identify and understand the intent or purpose in the text input by the user, and can be used to predict the question points of the user's question. Intent recognition is an important task in applications such as dialogue systems, search engines, and question-answering systems. It helps the system determine the user's needs and respond accordingly. The implementation principle of the intent model includes collecting and annotating training data, which contains the user's questions and corresponding intent labels, and extracting features from the text that are helpful for intent recognition. These features may include word vector representations such as bag of words models, TF-IDF, Word2Vec, and BERT. The model is trained using machine learning or deep learning algorithms. Common algorithms include support vector machines (SVM), logistic regression, random forests, neural networks, etc. The text entered by the user is classified through the trained model to determine its intent.

[0062] In one embodiment, Figure 6 As shown, the step of constructing the intention model in step S220 to predict the question points of the user's question includes:

[0063] S221, identifying the question points of the user's question;

[0064] S222: Use a bidirectional encoder representation model to perform text classification on the question points of the user's question.

[0065] In this embodiment, the question point identification of the user's question is a natural language processing (NLP) task, which aims to understand the questions raised by the user and determine its core questions. This usually involves text analysis and understanding in order to accurately identify the type of information the user wants to obtain. Using the bidirectional encoder representation model (BERT) to perform text classification on the question points of the user's question is an advanced machine learning method. BERT is a pre-trained deep learning model that learns the complex patterns and relationships of language by training on a large amount of text data. BERT is particularly good at understanding context. Unlike traditional unidirectional language models, BERT uses bidirectional training, which means that the model considers the entire context information when processing each word, including the text before and after the word. BERT is based on the Transformer model, which is an architecture based on the self-attention mechanism that can capture the relationship between words. BERT is pre-trained on a large-scale text corpus and has learned rich language knowledge and patterns. BERT can be applied to various downstream tasks such as text classification, sentiment analysis, named entity recognition, etc. by fine-tuning. BERT’s training consists of a masked language model task where some words are randomly masked and the model is then asked to predict these masked words.

[0066] First, convert the user's question into a format that the model can understand, which may include word segmentation, conversion to lowercase, adding special tags, etc. The preprocessed text is input into the BERT model, and the BERT model outputs embedded representations of the text. These representations capture the semantic information of the text. Use the output of BERT as a feature to determine the question points through one or more classification layers. Finally, the model outputs a classification result indicating what the main question points of the user's question are. This process can help automated systems better understand user needs and provide more accurate answers or responses. BERT and other similar models play an important role in improving the ability of machines to understand natural language.

[0067] S230: construct a slot model to extract key fields of the user question.

[0068] The slot model can be used to extract the key fields of the user question. Its core function is to identify and extract specific information units in the user question. These information units are called "slots". Slots usually correspond to key information in a conversation or query, such as time, place, name, etc. The implementation principle includes extracting features from the text that help identify slots. These features may include part-of-speech tags, syntactic structures, named entity recognition results, etc., and using machine learning or deep learning algorithms, such as conditional random fields (CRF), recurrent neural networks (RNN), long short-term memory networks (LSTM) or Transformer models, to train the slot model. The slot model can learn how to predict the slot label of each word or phrase based on the input text and features. In a new conversation or text, the trained slot model can predict and extract the corresponding slot information.

[0069] Among them, Figure 7 As shown, the step of constructing a slot model in step S230 for extracting key fields of user questions includes:

[0070] S231, predicting the key fields of the user's question;

[0071] S232. Convert the key fields into JSON format, and establish mapping logic between slots and API input parameters.

[0072] In this embodiment, predicting the key fields of user questions usually involves text processing and feature extraction techniques. In natural language processing (NLP), this can be achieved by using machine learning models such as the Bidirectional Encoder Representation Model (BERT). BERT is a Transformer-based pre-trained language model that can capture bidirectional contextual information of text by combining Tokenization, multiple Embeddings, and task-specific output layers, and performs well in various natural language processing tasks.

[0073] Converting key fields into JSON format and establishing mapping logic between slots and API input parameters is a common technical operation to ensure effective transmission and processing of data between different systems. In the API Gateway, parameter mapping and validation rules support reading parameters from various locations in the HTTP request, and performing type judgment and validation of parameter values, and mapping to the backend. For example, the API Gateway can configure a parameter mapping template, define parameters to be extracted from requests or responses, and convert these parameters through expressions and mapping rules to meet the parameter format requirements of the backend service.

[0074] In actual operation, the extracted parameters can be mapped to predefined JSON fields by defining a JSON structure. First, the required JSON structure, including field names and data types, needs to be determined. Then, the corresponding parameter values ​​are extracted based on the data in the request header, query parameters, form data, or request body. Next, these parameter values ​​are filled into the corresponding fields in the predefined JSON structure. Finally, the generated JSON object can be used for further processing or transmission.

[0075] In this way, the consistency and integrity of the data can be ensured, and the subsequent processing process can be simplified. At the same time, the flexibility of the JSON structure also makes it easy to adjust the fields and data types according to requirements. In addition, using the JSON format can also facilitate data exchange and integration, because JSON is a widely supported standard format.

[0076] Among them, JSON (JavaScript Object Notation) is a lightweight data exchange format that is text-based and easy for people to read and write, as well as easy for machines to parse and generate. The JSON structure consists of key-value pairs and is commonly used for data transmission in network communications, especially in Web APIs. Each element in JSON is a key-value pair, where the key is a string that must be enclosed in double quotes, and the value can be a variety of data types.

[0077] S240: construct a correction model to verify the results of the intention model and the slot model.

[0078] In natural language processing (NLP), a correction model generally refers to a model used to correct erroneous or inaccurate information in a text. The correction model can be used to verify the results of the intent model and the slot model, and can also be used for spelling checking, grammar correction, or other forms of text quality improvement. The principle of its implementation includes that first, the model needs to identify potential errors in the text. This may involve using specific algorithms to analyze text patterns and identify words or phrases that do not conform to language rules or context. Once an error is detected, the model generates a set of possible correct candidates. These candidates may be based on language models, dictionaries, or other resources. The correction model evaluates each candidate and selects the most likely correct option to replace the original erroneous text. This process may involve calculating the confidence or probability of each candidate. In order to correct errors more accurately, the correction model needs to understand the context of the text. This may include analyzing sentence structure, semantic relationships, and other language features.

[0079] The following is an example to demonstrate the functions of each model.

[0080] prompt: You are an expert in reading comprehension. XXX. Current time: 2023-10-19

[0081] Question 1: How much is Ping An’s insurance premium this year?

[0082] Inherit model result: true.

[0083] Intent model: Ask for metrics.

[0084] Slot model: {"stat_date":["2023"],"index":["Premium income"],"company":["Ping An Property & Casualty Insurance"]}.

[0085] Correction model: {"std":["What is Ping An Property & Casualty Insurance's premium income in 2023"]}, true.

[0086] Question 2: What about the Shenzhen institutions?

[0087] Inherit model result: true.

[0088] Intent model: ask about dimensions -> ask about indicators.

[0089] Slot model: {"dept":["Shenzhen"]}->{"stat_date":["2023"],"index":["Premium Income"],"company":["Ping An Property & Casualty Insurance"],"dept":["Shenzhen"]}.

[0090] Correction model: {"std":["What is the premium income of Ping An Property & Casualty Insurance Shenzhen in 2023"]}, true.

[0091] Question 3: How much is the cost in May?

[0092] Inherit model result: false.

[0093] Intent model: Ask for metrics.

[0094] Slot model: {"stat_date":["2023-05"],"index":["cost"]}.

[0095] Correction model: {"std":["How much will it cost in May 2023"]}, true.

[0096] Through the inheritance model, the intent model, the slot model and the correction model, the user's needs can be quickly understood through multiple rounds of contextual dialogue. The results generated by various tasks based on LLM can be mutually verified through known APIs, giving full play to the understanding, generation and controllability of the large model. At the application level, by optimizing and reconstructing the functions of the BI platform through LLM, the project development cycle can be effectively shortened, project development costs can be reduced, the general capabilities of the BI platform can be enhanced, the user experience can be improved and the user's usage threshold can be lowered. With continuous interaction with users, the adaptive capabilities of the BI platform become more intelligent and user-friendly.

[0097] S300: Assemble the user questions into prompt words and input them into the LLM model, and predict the user intention and slot according to the user questions to obtain corresponding API data.

[0098] When a user asks a question, the system assembles the question into prompt words and then inputs them into the LLM model. This processing method enables the model to predict the user's true intention and the required information slots based on the user's question. For example, when a user asks "How is the premium income this year?", the system converts this question into prompt words containing key information (such as time and indicator name). Then, the LLM model understands the user's real needs by parsing these prompt words and determines the necessary parameters.

[0099] The LLM model then retrieves data from the corresponding API interface based on these parameters. In this process, the model automatically constructs and issues API requests using the API call logic learned during its training process. The data returned by the API response is then processed by the model to extract and present the results that best match the user's query. This approach not only improves the accuracy of data processing, but also optimizes the user experience, making the information retrieval process more efficient and intuitive.

[0100] In addition, this integration method combining LLM model and API technology provides strong support for solving complex business problems. It enables the system to adapt to changing query requirements while ensuring the flexibility and scalability of data processing.

[0101] Among them, Figure 8 As shown, the step S300 of assembling the user question into prompt words and inputting them into the LLM model, and predicting the user intention and slot according to the user question to obtain corresponding API data includes:

[0102] S301, respectively obtaining the API interface domain name and API parameters corresponding to the user question through the intent model and the slot model;

[0103] S302: Acquire the API data through an existing API interface according to the API interface domain name and the API parameters.

[0104] In this embodiment, to obtain the API interface domain name and API parameters corresponding to the user question through the intent model and the slot model, it is first necessary to understand the user's query intent and related key information, and first use the intent model (such as a BERT-based model) to determine the user's main needs or purposes. For example, if the user asks about the weather, the intent model will identify the intent of "querying the weather". After determining the intent, the slot model will further analyze the keywords or information in the user's question, which are usually used as parameters for API calls, such as location, time, etc. These parameters are called slots. According to the identified intent and extracted slots, the system will map to the corresponding API interface domain name and parameters. For example, if the intent is to query the weather, the system may map to a weather API service and use the extracted location as a parameter. Finally, the system will use these parameters to build an HTTP request, call the actual service through the API interface domain name, and obtain data. After obtaining the data returned by the API, the system may need to further process or format the data so that it can be presented in a user-friendly manner.

[0105] For example, if a user asks "What will the weather be like in Beijing tomorrow?", the intent model may identify the intent of "query weather", and the slot model may extract "Beijing" and "tomorrow" as key information. This information is then used to call the weather API, such as https: / / api.weather.com? city=Beijing&date=tomorrow, which ultimately returns the weather conditions in Beijing tomorrow. This process requires precise model training and understanding of API documentation to ensure accurate identification of intents and slots, and correct mapping to API calls.

[0106] It should be noted that when the intent model recognizes that the second question input by the user is related to the previous question, the inheritance model will inherit the parameters related to the previous question. For example, the user's first question is: "What is the per capita income in Shenzhen in 2024?", and the second question is: "What about Guangzhou?" At this time, the inheritance model will inherit the year of the previous question (2024) and the indicator asked (per capita income). After the inheritance model inherits the relevant parameters of the previous question, the API interface domain name and API parameters of the second question are obtained according to the results output by the intent model and the slot model, and then the corresponding API data can be retrieved from the existing API interface according to the API interface domain name and the API parameters.

[0107] If the second question input by the user has no correlation with the previous question, the intent and the slot model will output the new API interface domain name and the API parameters, and then call the new API parameters through the existing API interface according to the API interface domain name and the API parameters. After the intent model and the slot model are completed, the intent result and the slot JSON result can be used to generate the standard format of the original question through the correction model. When the standard format of the original question is semantically consistent with the original question, it is considered that the intent model and the slot model results are correctly identified, otherwise not. At the same time, the results of the correction model are added to the training set of the LLM model for retraining or collection of error cases to improve the generalization ability of the LLM model.

[0108] S400: Use the LLM model to describe the API data in factual terms, and obtain and output the dialogue terms.

[0109] This data is then used by the LLM model to generate factual descriptions to ensure the accuracy and reliability of the conversation content.

[0110] Finally, the system converts these descriptions into fluent conversational words and outputs them to the user. In this way, the user can get an accurate and natural answer, thus improving the user experience and satisfaction. In this way, the system can effectively understand user needs and provide accurate information and services, greatly enhancing the efficiency and quality of user interaction.

[0111] Compared with the prior art, the technical solution of the present invention can quickly understand the needs of users through multiple rounds of contextual dialogues. The results generated based on the LLM model can be mutually verified through known APIs, giving full play to the understanding, generation and controllability of the large model. At the application level, by optimizing and reconstructing the functions of the BI platform through LLM, the project development cycle can be effectively shortened, the project development cost can be reduced, the general capabilities of the BI platform can be enhanced, the user experience can be improved and the user's usage threshold can be lowered. With continuous interaction with users, the adaptive capabilities of the BI platform are more intelligent and humane.

[0112] In one embodiment, step S400 uses the LLM model to describe the API data in factual speech, obtains and outputs the dialogue speech, specifically, the system first obtains the required data from the relevant API interface. This data may include information requested by the user, such as weather forecast, stock price, news summary, etc. The obtained API data usually exists in a structured format (such as JSON), and the system needs to parse this data to extract key information, such as date, time, value, text description, etc. Using the LLM model, the system converts the extracted API data into a natural language description. This process involves mapping the data to a predefined or dynamically generated speech template. Based on the type and content of the API data, the system selects a suitable speech template. These templates are designed to ensure that the generated description is both accurate and easy to understand. The system may personalize the speech based on the user's preferences, historical interactions, and contextual information. For example, if the user prefers an informal way of communication, the system can adjust the tone of the speech. When generating the speech, the system will consider the context of the conversation to ensure that the generated description is consistent and coherent with the previous communication content. Once the speech is generated, the system will output it to the user. This can be achieved through text messages, speech synthesis, or other user interface elements.

[0113] After receiving the conversation, the user may provide feedback, which the system collects and uses to optimize future conversation generation. For systems with multi-language support, the LLM model needs to be able to process API data in different languages ​​and generate descriptions in the corresponding languages. Through this process, the system is able to convert boring API data into natural language descriptions that are easy for users to understand and accept, thereby providing a richer and more humane interactive experience.

[0114] In step S300, the user question is assembled into prompt words and input into the LLM model, and the user intention and slot are predicted according to the user question to obtain the corresponding API data, and in step S400, the API data is described with the LLM model in factual speech, and the dialogue speech is obtained and output, which is illustrated as follows with a specific embodiment:

[0115] For example: What will the premium be in May 2023, and how much will it cost.

[0116] Data: The premium income for 2023-05 is 1234.32321231, and the cost for 2023-05 is 233.312.

[0117] Data substitution: M1 = 1234.32321231, M2 = 233.312

[0118] Factual rhetoric: The premium income in May 2023 is M1, and the cost in May 2023 is M2

[0119] The LLM model says: Hello, the premium for May 2023 is 1234.32321231, and the cost is 233.312.

[0120] Another embodiment of the present invention provides a platform dialogue device based on artificial intelligence, such as Fig. 9 As shown, the device 1 comprises:

[0121] The acquisition module 11 is used to acquire API interface information associated with the user's question;

[0122] A construction module 12 is used to construct an LLM model including multiple model tasks, and train and reason about the LLM model based on the API interface information;

[0123] An input module 13, used to assemble the user question into prompt words and input them into the LLM model, and predict the user intention and slot according to the user question to obtain corresponding API data;

[0124] The processing module 14 is used to describe the API data in factual terms using the LLM model, and obtain and output the dialogue terms.

[0125] The module referred to in the present invention refers to a series of computer program instruction segments that can perform specific functions, which are more suitable for describing the execution process of platform dialogue based on artificial intelligence than programs. For the specific implementation methods of each module, please refer to the corresponding method embodiments above, which will not be repeated here.

[0126] It can be seen that in the above scheme, the LLM model is used to quickly understand the user's needs in the form of multiple rounds of dialogue with the user's context. The results generated by various tasks based on LLM can be mutually verified through known APIs, giving full play to the understanding, generation and controllability of the large model. At the application level, through LLM optimization and reconstruction of the functions of the BI platform, the project development cycle can be effectively shortened, the project development cost can be reduced, the general capabilities of the BI platform can be enhanced, the functional extensibility is strong, and the personalized needs of users can be met.

[0127] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.

[0128] In one embodiment, the acquisition module 11 includes:

[0129] A collection unit, used to obtain the domain name, input parameters, output parameters and function documents of each API interface of the BI platform according to the user question;

[0130] The listing unit is used to list the parameters and questions involved in the actual business scenario of the BI platform according to the input parameters and output parameters of the API interface.

[0131] In one embodiment, the device 1 further includes:

[0132] A first training module is used to build an inheritance model to determine whether the user questions are in the same sub-session;

[0133] The second training module is used to build an intention model for predicting the question points of the user's question;

[0134] A third training module is used to extract key fields of the user question;

[0135] The fourth training module is used to verify the results of the intention model and the slot model.

[0136] In one embodiment, the first training module includes:

[0137] A first recognition unit, used to determine whether the user question context is relevant during the conversation;

[0138] The judgment unit is used to inherit the API parameters of the previous question if the context is relevant; if the context is not relevant, obtain the API parameters of the user question through the intent model and the slot model.

[0139] In one embodiment, the second training module includes:

[0140] A second identification unit, used to identify the question points of the user's question;

[0141] The classification unit is used to perform text classification on the question points of the user question using the bidirectional encoder representation model.

[0142] In one embodiment, the third training module includes:

[0143] A prediction unit, used to predict key fields of the user question;

[0144] The conversion unit is used to convert the key fields into JSON format and establish a mapping logic between slots and API input parameters.

[0145] In one embodiment, the input module 13 includes:

[0146] An acquisition unit, used to respectively acquire the API interface domain name and API parameters corresponding to the user question through the intent model and the slot model;

[0147] The calling unit is used to obtain the API data through the existing API interface according to the API interface domain name and the API parameters.

[0148] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Fig.10 As shown. The computer device includes a processor, a memory, a network interface and a database connected via a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile and / or volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external client through a network connection. When the computer program is executed by the processor, it realizes a function or step on the server side of a platform dialogue method based on artificial intelligence.

[0149] In one embodiment, a computer device is provided. The computer device may be a client, and its internal structure diagram may be as follows: Fig.11 As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external server through a network connection. When the computer program is executed by the processor, it realizes the functions or steps on the client side of a platform dialogue method based on artificial intelligence

[0150] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:

[0151] Get API interface information associated with the user's question;

[0152] Constructing an LLM model including multiple model tasks, and training and reasoning the LLM model based on the API interface information;

[0153] Assemble the user questions into prompt words and input them into the LLM model, and predict the user intention and slot according to the user questions to obtain corresponding API data;

[0154] The API data is described in factual terms using the LLM model to obtain and output the dialogue terms.

[0155] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0156] Get API interface information associated with the user's question;

[0157] Constructing an LLM model including multiple model tasks, and training and reasoning the LLM model based on the API interface information;

[0158] Assemble the user questions into prompt words and input them into the LLM model, and predict the user intention and slot according to the user questions to obtain corresponding API data;

[0159] The API data is described in factual terms using the LLM model to obtain and output the dialogue terms.

[0160] It should be noted that the above functions or steps that can be implemented by the computer-readable storage medium or computer device can refer to the relevant descriptions on the server side and the client side in the aforementioned method embodiment. To avoid repetition, they will not be described one by one here.

[0161] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0162] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0163] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention. It should be noted that if software tools or components other than those of the company appear in the embodiments of the present application, they are only used for example introduction and do not represent actual use.

Claims

1. A platform dialogue method based on artificial intelligence, characterized in that: include: Get API interface information associated with the user's question; Constructing an LLM model including multiple model tasks, and training and reasoning the LLM model based on the API interface information; Assemble the user questions into prompt words and input them into the LLM model, and predict the user intention and slot according to the user questions to obtain corresponding API data; The API data is described in factual terms using the LLM model to obtain and output the dialogue terms.

2. The platform dialogue method based on artificial intelligence according to claim 1, characterized in that: The step of obtaining API interface information associated with the user question includes: Obtain the domain name, input parameters, output parameters and function documents of each API interface of the BI platform according to the user's question; According to the input and output parameters of the API interface, the parameters and questions involved in the actual business scenarios of the BI platform are listed.

3. The platform dialogue method based on artificial intelligence according to claim 1, characterized in that: The construction of the LLM model includes multiple model tasks, including: Constructing an inheritance model to determine whether the user questions are in the same subsession; Constructing an intent model to predict the question points of the user's question; Constructing a slot model to extract key fields of the user question; A correction model is constructed to verify the results of the intent model and the slot model.

4. The platform dialogue method based on artificial intelligence according to claim 3 is characterized in that: The step of constructing an inheritance model for predicting the question points of user questions includes: Determine whether the user question context is relevant during the conversation; If the context is relevant, the API parameters of the previous question are inherited; if the context is not relevant, the API parameters of the user question are obtained through the intent model and the slot model.

5. The platform dialogue method based on artificial intelligence according to claim 3 is characterized in that: The steps of constructing an intention model for predicting the question points of user questions include: Identify the question mark of the user question; A bidirectional encoder representation model is used to perform text classification on the question points of the user's question.

6. The platform dialogue method based on a large model according to claim 3 is characterized in that: The step of constructing a slot model for extracting key fields of user questions includes: Predicting key fields of the user question; Convert the key fields into JSON format and establish the mapping logic between slots and API input parameters.

7. The platform dialogue method based on artificial intelligence according to claim 2, characterized in that: The step of assembling the user question into prompt words and inputting them into the LLM model, and predicting the user intention and slot according to the user question to obtain corresponding API data includes: Obtain the API interface domain name and API parameters corresponding to the user question respectively through the intent model and the slot model; The API data is obtained through an existing API interface according to the API interface domain name and the API parameters.

8. A platform dialogue device based on artificial intelligence, characterized in that: include: The acquisition module is used to obtain API interface information associated with the user's question; A construction module, used to construct an LLM model including multiple model tasks, and train and reason about the LLM model based on the API interface information; An input module, used to assemble the user question into prompt words and input them into the LLM model, and predict the user intention and slot according to the user question to obtain corresponding API data; The processing module is used to describe the API data in factual terms using the LLM model, and obtain and output the dialogue terms.

9. An artificial intelligence-based platform dialogue system, characterized in that: The system includes at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the artificial intelligence-based platform dialogue method described in any one of claims 1-7.

10. A non-volatile computer-readable storage medium, characterized in that: The non-volatile computer-readable storage medium stores computer-executable instructions, which, when executed by one or more processors, enable the one or more processors to execute the artificial intelligence-based platform dialogue method described in any one of claims 1-7.

Citation Information

Patent Citations

  • Intelligent customer service method and system based on multiple rounds of dialogues

    CN116150338A

  • Method and system for realizing natural language conversational API (Application Program Interface)

    CN117112261A

  • Intelligent dialogue system and method based on large model and electronic equipment

    CN117453899A

  • Generation method and device of intention slot position recognition model, and electronic equipment

    CN117520793A

Cited By

  • Business data extraction system and method based on large model language

    CN119996401A

  • Model repairing method, electronic equipment and computer readable storage medium

    CN120611763A

  • Semantic response method and system based on large model and knowledge interface

    CN121009133A