Automatic question answering method, device and equipment for business data and storage medium

By combining the generative pre-trained language model with the traditional question and answer system, using keyword word segmentation and similarity matching technology, the prompt word engineering of the generative pre-trained language model is optimized, and the problems of low efficiency and accuracy of the traditional question and answer system are solved, and efficient and accurate business data query is achieved.

CN120371944APending Publication Date: 2025-07-25SF TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410101068.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-01-24
Publication Date
2025-07-25

AI Technical Summary

Technical Problem

When traditional question-and-answer systems deal with complex natural language expressions and novel problems, they are less efficient and accurate, making it difficult to meet users' query needs.

Method used

Combining the generative pre-trained language model and the traditional question-and-answer system, the Q&A results are generated through keyword word segmentation processing, similarity matching and structured queries, and the prompt word engineering of the generative pre-trained language model is optimized to realize automatic question-and-answer.

Benefits of technology

It improves the efficiency and accuracy of business data query, reduces manual intervention, simplifies the query process, and meets the diverse query needs of users.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120371944A_ABST
    Figure CN120371944A_ABST
Patent Text Reader

Abstract

The invention discloses an automatic question answering method and device for business data, equipment and a storage medium, and the method comprises the steps: obtaining a first question input by a user in a first dialogue interface, and calling a generative pre-training language model to carry out keyword segmentation processing on the first question; performing similarity matching on the obtained first keywords and a lexicon configuration table to obtain a plurality of matched fields; in response to a selection operation acting on the plurality of matching fields, generating a second questioning question based on the obtained target keyword field; performing data query on a service database according to the second questioning question to obtain a first question and answer result, and displaying the first question and answer result to the user based on a first dialogue interface; compared with the prior art, the technical scheme of the invention can improve the business data query efficiency and query accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of natural language processing, and particularly to an automatic question-answering method, device, equipment and storage medium for business data. Background Art

[0002] Traditional question-answering systems usually process users' questions by creating a series of predefined rules and keywords. When a user enters a question, the system attempts to match the user's input with the predefined rules or keywords and provides a corresponding response based on the matching result. Although traditional customer service systems perform well in handling simple questions, for complex natural language expressions and novel questions, their limitation to the fixed rules and keyword matching method may lead to a decline in the efficiency and accuracy of answers.

[0003] ChatGPT is a machine conversation technology based on natural language processing. It trains the model through a large-scale pre-training data set, enabling the model to have powerful natural language understanding and generation capabilities. When conversing with users, ChatGPT can understand the user's intention based on the context and generate reasonable and coherent responses; since November 30, 2022, ChatGPT, a new conversational AI model fine-tuned from the GPT-3.5 series of large speech models by OpenAI, has been officially released, and the form and application boundary of AI products will continue to expand.

[0004] How to combine ChatGPT with traditional question-answering systems, using the machine conversation technology based on natural language processing as an intelligent customer service role to solve the problems of declining question-answering efficiency and accuracy existing in traditional question-answering systems is a technical problem that urgently needs to be solved at present. Summary of the Invention

[0005] The technical problem to be solved by the present invention is: to provide an automatic question-answering method, device, equipment and storage medium for business data, which can improve the query efficiency and query accuracy of business data.

[0006] To solve the above technical problem, the present invention provides an automatic question-answering method for business data, including: obtaining a first question entered by a user on a first conversation interface, calling a generative pre-trained language model to perform keyword tokenization processing on the first question to obtain a plurality of first keywords; respectively performing similarity matching on each first keyword with a thesaurus configuration table to obtain a plurality of matching fields, and pushing the plurality of matching fields to the user through the first conversation interface; responding to a selection operation on the plurality of matching fields to obtain a target keyword field, and generating a second question based on the target keyword field; performing data query on a business database according to the second question to obtain a first question-answering result, and displaying the first question-answering result to the user based on the first conversation interface.

[0007] In a possible implementation, after obtaining the first question entered by the user on the first dialogue interface, it further includes: obtaining the first backend threshold prompt word, encapsulating the first question and the first backend threshold prompt word to obtain a first encapsulated question; calling a generative pre-trained language model to determine whether the first encapsulated question contains time. If so, based on the first backend threshold prompt word, return the first threshold prompt word; otherwise, return the second threshold prompt word.

[0008] In a possible implementation, after presenting the first Q&A result to the user based on the first dialogue interface, it further includes: responding to a display instruction entered by the user on the first dialogue interface, where the display instruction includes a structured query statement display instruction and a chart display instruction;

[0009] When the display instruction is a structured query statement display instruction, present the first structured query statement to the user based on the first dialogue interface; when the display instruction is a chart display instruction, generate multiple chart parameters based on the first Q&A result, and push the multiple chart parameters to the user based on the first dialogue interface; respond to a selection operation on the multiple chart parameters to determine the target chart parameter, and generate a first Q&A result chart based on the target chart parameter.

[0010] In a possible implementation, respectively perform similarity matching of each first keyword with a thesaurus configuration table to obtain multiple matching fields, specifically including: obtaining all tags in the thesaurus configuration table, respectively performing similarity matching of each first keyword with all tags to obtain a first tag corresponding to the first keyword; obtaining all fields corresponding to the first tag based on the thesaurus configuration table, and using all the fields as the multiple matching fields corresponding to the first keyword.

[0011] In a possible implementation, before obtaining the first question entered by the user on the first dialogue interface, it further includes: responding to the selected Q&A type by the user. When the Q&A type is an interactive Q&A, display the first dialogue interface of the generative pre-trained language model.

[0012] In a possible implementation, after responding to the selected Q&A type by the user, it further includes: when the Q&A type is a direct Q&A, display the second dialogue interface of the generative pre-trained language model; obtain the third question entered by the user on the second dialogue interface; optimize the prompt engineering in the generative pre-trained language model to obtain an optimized generative pre-trained language model; call the optimized generative pre-trained language model to generate a second structured query statement corresponding to the third question, perform data query on the business database according to the second structured query statement to obtain a second Q&A result, and present the second Q&A result to the user based on the second dialogue interface.

[0013] In a possible implementation, after obtaining the third question input by the user on the second dialogue interface, it further includes: determining whether there is a preset specified word in the third question; if so, obtaining the real-time system time, replacing the specified word in the third question with the real-time system time to update the third question; obtaining the second backend threshold prompt word, and performing encapsulation processing on the updated third question and the second backend threshold prompt word to obtain a second encapsulated question; calling the generative pre-trained language model to determine whether the second encapsulated question contains year information, if not, pushing an input prompt to the user based on the second dialogue interface.

[0014] In a possible implementation, the prompt engineering in the generative pre-trained language model is optimized to obtain an optimized generative pre-trained language model, specifically including: setting multiple disassembly tasks for the prompt engineering in the generative pre-trained language model to obtain an optimized generative pre-trained language model, where the multiple disassembly tasks include disassembling regional dimension information, disassembling date information, and generating plain text statements based on pre-designed calculation rules and preset field requirements.

[0015] The present invention also provides an automatic question-answering device for business data, including: a first dialogue interface display module, a keyword tokenization module, a similarity matching module, a target keyword field selection module, and a first data query module; wherein, the keyword tokenization module is used to obtain the first question input by the user on the first dialogue interface, and call the generative pre-trained language model to perform keyword tokenization processing on the first question to obtain multiple first keywords; the similarity matching module is used to respectively perform similarity matching on each first keyword with the thesaurus configuration table to obtain multiple matching fields, and push the multiple matching fields to the user through the first dialogue interface; the target keyword field selection module is used to respond to the selection operation on the multiple matching fields to obtain a target keyword field, and generate a second question based on the target keyword field; the first data query module is used to perform data query on the business database according to the second question to obtain a first question-answering result, and display the first question-answering result to the user based on the first dialogue interface.

[0016] The automatic question-answering device for business data provided by the present invention further includes: a time information judgment module; the time information judgment module is used to obtain the first backend threshold prompt word, perform encapsulation processing on the first question and the first backend threshold prompt word to obtain a first encapsulated question; the time information judgment module is used to call the generative pre-trained language model to determine whether the first encapsulated question contains time, if so, return the first threshold prompt word based on the first backend threshold prompt word, otherwise, return the second threshold prompt word.

[0017] An automatic question-answering device for business data provided by the present invention further includes: a question-answering result display module; the question-answering result display module is used to respond to a display instruction input by the user on the first dialogue interface, where the display instruction includes a structured query statement display instruction and a chart display instruction; the question-answering result display module is used to, when the display instruction is a structured query statement display instruction, display a first structured query statement to the user based on the first dialogue interface; the question-answering result display module is used to, when the display instruction is a chart display instruction, generate multiple chart parameters based on the first question-answering result, and push the multiple chart parameters to the user based on the first dialogue interface; the question-answering result display module is used to respond to a selection operation on the multiple chart parameters, determine a target chart parameter, and generate a first question-answering result chart based on the target chart parameter.

[0018] In a possible implementation manner, a similarity matching module is used to perform similarity matching on each first keyword with a thesaurus configuration table respectively to obtain multiple matching fields, specifically including: obtaining all tags in the thesaurus configuration table, performing similarity matching on each first keyword with all tags respectively to obtain a first tag corresponding to the first keyword; obtaining all fields corresponding to the first tag based on the thesaurus configuration table, and using all the fields as multiple matching fields corresponding to the first keyword.

[0019] An automatic question-answering device for business data provided by the present invention further includes: a first dialogue interface display module; the first dialogue interface display module is used to respond to the selected question-answering type by the user, and when the question-answering type is an interactive question-answering type, display the first dialogue interface of the generative pre-trained language model.

[0020] An automatic question-answering device for business data provided by the present invention further includes: a second dialogue interface display module, a model optimization module, and a second data query module; wherein, the second dialogue interface display module is used to, when the question-answering type is a direct question-answering type, display the second dialogue interface of the generative pre-trained language model; the model optimization module is used to optimize the prompt engineering in the generative pre-trained language model to obtain an optimized generative pre-trained language model; the second data query module is used to obtain a third question input by the user on the second dialogue interface, call the optimized generative pre-trained language model to generate a second structured query statement corresponding to the third question, perform data query on the business database according to the second structured query statement to obtain a second question-answering result, and display the second question-answering result to the user based on the second dialogue interface.

[0021] An automatic question-answering device for service data provided by the present invention further includes: a year information judgment module; the year information judgment module is used to judge whether there is a preset specified word in the third question, and if so, obtain the real-time system time, and replace the specified word in the third question with the real-time system time to update the third question; the year information judgment module is used to obtain the second backend threshold prompt word, and perform encapsulation processing on the updated third question and the second backend threshold prompt word to obtain a second encapsulated question; the year information judgment module is used to call a generative pre-trained language model to judge whether the second encapsulated question contains year information, and if not, push an input prompt to the user based on the second dialogue interface.

[0022] In a possible implementation manner, a model optimization module is used to optimize the prompt engineering in the generative pre-trained language model to obtain an optimized generative pre-trained language model, specifically including: setting multiple disassembly tasks for the prompt engineering in the generative pre-trained language model to obtain an optimized generative pre-trained language model, where the multiple disassembly tasks include disassembling regional dimension information, disassembling date information, and generating a plain text statement based on a pre-designed calculation rule and a preset field requirement.

[0023] The present invention also provides a terminal device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the automatic question-answering method for service data as described in any one of the above.

[0024] The present invention also provides a computer-readable storage medium, which includes a stored computer program. When the computer program runs, it controls the device where the computer-readable storage medium is located to execute the automatic question-answering method for service data as described in any one of the above.

[0025] The automatic question-answering method, device, equipment, and storage medium for service data in the embodiments of the present invention have the following beneficial effects compared with the prior art:

[0026] By obtaining the first question input by the user in the first dialogue interface of the generative pre-trained language model and invoking the generative pre-trained language model, it is possible to implement automatic question answering based on natural language understanding and generation technologies, avoiding the costs and time of manual intervention; performing keyword tokenization on the question, and combining similarity matching technology to obtain the most matching field to generate a second question, and then generating a structured query statement for the second question based on the generative pre-trained language model, so as to accurately find the query data required by the user, improving the accuracy of question answering. Through this method, the user only needs to input a question in the first dialogue interface and select the target keyword field to automatically execute the data query operation, saving the complex query process and improving the query efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1 is a schematic flowchart of an embodiment of an automatic question answering method for business data provided by the present invention;

[0028] Figure 2 is a schematic diagram showing the fixed formula of NL2SQL prompts in an embodiment provided by the present invention;

[0029] Figure 3 is a schematic diagram showing the application information configuration in an embodiment provided by the present invention;

[0030] Figure 4 is a schematic structural diagram of an embodiment of an automatic question answering device for business data provided by the present invention;

[0031] Figure 5 is a schematic structural diagram of another embodiment of an automatic question answering device for business data provided by the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0032] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0033] Embodiment 1, see Figure 1 , Figure 1 which is a schematic flowchart of an embodiment of an automatic question answering method for business data provided by the present invention. As Figure 1 shown, the method includes steps 101-step 104, specifically as follows:

[0034] Step 101: Obtain the first question input by the user on the first dialogue interface, and call the generative pre-trained language model to perform keyword tokenization on the first question, obtaining multiple first keywords.

[0035] In one embodiment, the automatic question-answering method for business data can be applied to intelligent terminal devices, including but not limited to smartphones, laptop computers, tablet computers, desktop computers, and physical servers and cloud servers connected with display units, etc.

[0036] In one embodiment, in order to meet the usage requirements of different users, a selectable question-answering type mechanism is provided so that users can select a suitable question-answering method based on their current needs; therefore, before the question-answering starts, the user first selects the question-answering type, and different question-answering operations are performed by responding to the selected question-answering type of the user.

[0037] In one embodiment, before obtaining the first question input by the user on the first dialogue interface, it further includes: responding to the selected question-answering type of the user, and when the question-answering type is an interactive question-answering type, displaying the first dialogue interface of the generative pre-trained language model.

[0038] In one embodiment, the generative pre-trained language model (Chat Generative Pre-Trained Transformer, ChatGPT) is set to GPT3.5. Similarly, the generative pre-trained language model can also be set to GPT4.

[0039] In one embodiment, the interactive question-answering type allows the user to interact with ChatGPT step by step, ask multiple related questions and obtain corresponding answers; this question-answering method can better meet the user's follow-up question needs and help the user explore different aspects of a topic or question in depth; through step-by-step guidance and interaction, ChatGPT can provide more accurate and detailed answers and make further adjustments and iterations according to the user's feedback.

[0040] In one embodiment, the first dialogue interface is the dialogue page obtained after the user selects the interactive question-answering type and initiates a question on the AI Chat interface. It is generated through front-end initialization and is used to display the interactive interface of the generative pre-trained language model. It can be displayed on the user's display device in the form of text, images, or even audio or video, etc., so that the user can intuitively understand and participate in the dialogue.

[0041] In one embodiment, by detecting the first target input area in the first dialogue interface, when a trigger operation is detected in the first target input area, the first question input by the user on the first dialogue interface is obtained.

[0042] Specifically, the first target input area includes, but is not limited to, the send button set in the first dialogue interface; the triggering operation includes, but is not limited to, operations such as mouse clicking or gesture touching.

[0043] In one embodiment, for multiple types of business databases, a corresponding subject domain is set for each type of business database. After obtaining the first question, the first question is classified to determine the first subject domain corresponding to the first question. Based on the first subject domain, the business database corresponding to the first question is determined.

[0044] In one embodiment, when there is too much business data, if the time limit is not imposed on the queried business data, it will lead to too much final query data, and problems such as excessive data load and slow data response efficiency are likely to occur. Based on this, in this embodiment, after obtaining the first question, the generative pre-trained language model is also called to determine whether the first question contains time information, so as to avoid the problem of excessive data load caused by a large quantity and improve the data response speed.

[0045] Moreover, since the training time of the generative pre-trained language model is generally less than the actual usage time, when the user does not specify a specific date, the generative pre-trained language model will generate SQL according to the model training time or throw an exception of "I don't know. As an AI language model, I have no concept of time and no real-time date and time information". Therefore, the first step before generating SQL is to determine whether the user's question contains a date, which can reduce the occurrence of errors and exceptions.

[0046] In one embodiment, since the generative pre-trained language model needs to be called, preset words also need to be prepared. Specifically, after the user inputs the first question in the first dialogue interface, the first question is also passed to the application server based on the system parameters, so that the application server uses the preset words to encapsulate the first question and sends the encapsulated first question to the generative pre-trained language model.

[0047] Specifically, for the preset words, the NL2SQL prompt word fixed phrase table is stored in the business database Mysql. The NL2SQL prompt word fixed phrase table contains four preset words: CONFIG (loading table structure), PRECHECK (pre-check), PARTICIPLE (word segmentation return format), and QUESTION (question format), as Figure 2 shown Figure 2It is the intention expression of the fixed formula of NL2SQL prompts. Among them, CONFIG is used to convert the first question input by the user into the {first question sentence} structure; PRECHECK is used to determine whether the {first question sentence} contains time? If it contains, only return 1, if not, return 0; PARTICIPLE is used to extract the keywords in the {first question sentence} and return the extracted keywords in the format of an Array; QUESTION is used to convert the {first question sentence} into sql format. Figure 2 The fixed formula table of NL2SQL prompts in it is only for illustrative purposes, and the specific fixed formula table of NL2SQL prompts can be set based on business requirements.

[0048] In one embodiment, when determining whether the first question contains time information based on the backend call to the generative pre-trained language model, by obtaining the first backend threshold prompt, the first question and the first backend threshold prompt are encapsulated to obtain the first encapsulated question; the generative pre-trained language model is called to determine whether the first encapsulated question contains time. If so, based on the first backend threshold prompt, the first threshold prompt is returned, otherwise, the second threshold prompt is returned.

[0049] Specifically, the first backend threshold prompt refers to the keyword or phrase used to trigger subsequent processing steps; the set first backend threshold prompt is whether this sentence contains time? If it contains, only return 1, if not, return 0.

[0050] Specifically, when the first question is sentence, the first question is converted into the first table structure {sentence}; the first table structure {sentence} and the first backend threshold prompt are encapsulated to obtain the first encapsulated question as whether the sentence "{sentence}" contains time? If it contains, only return 1, if not, return 0; and use this sentence pattern to ask the generative pre-trained language model a question.

[0051] Specifically, based on the first backend threshold prompt, the first threshold prompt and the second threshold prompt are set. Among them, the first threshold prompt and the second threshold prompt are the identification information used to represent different situations, and are marked according to the judgment result of the generative pre-trained language model on the first encapsulated question, so that the subsequent system can perform corresponding processing according to these marks.

[0052] Specifically, the first backend threshold prompt is 1 and the second backend threshold prompt is 0.

[0053] Specifically, when the generative pre-trained language model determines that the first encapsulated question contains time, it directly returns the first threshold prompt word 1. When the generative pre-trained language model determines that the first encapsulated question does not contain time, it directly returns the second threshold prompt word 0.

[0054] In one embodiment, when it is detected that the generative pre-trained language model returns the second threshold prompt word, an input prompt is pushed to the user through the first dialogue interface, so that the user can re-output the first question containing time information based on the input prompt.

[0055] In one embodiment, when it is detected that the generative pre-trained language model returns the first threshold prompt word, the generative pre-trained language model is called again based on the backend to perform keyword tokenization on the first question, obtaining multiple first keywords.

[0056] Specifically, by encapsulating the first question, a first keyword question is obtained. For the first keyword question, the generative pre-trained language model is called to extract keywords from the first keyword question, obtaining multiple first keywords corresponding to the first question, and returning the multiple first keywords in the Array format, where the Array format is [keyword1, keyword2,...].

[0057] As an excellent example of performing keyword tokenization on the first question to obtain multiple first keywords in this embodiment: when the first question is "Give the sum of the opinion feedback amounts in the last seven days", the first question is encapsulated as "Give the sum of the opinion feedback amounts in the last seven days" through a preset formula, and the keywords of this sentence are given; and the generative pre-trained language model is called to extract keywords from the first question "Give the sum of the opinion feedback amounts in the last seven days", obtaining multiple keywords, which are opinion feedback amount, last seven days, and summation respectively, and returning them in the format of [opinion feedback amount, last seven days, summation].

[0058] Step 102: Match the similarity of each first keyword with the thesaurus configuration table respectively, obtaining multiple matching fields, and pushing the multiple matching fields to the user through the first dialogue interface.

[0059] In one embodiment, a vocabulary configuration table is also stored in the business database Mysql, which is a vocabulary list for keywords that need to be matched for similarity. The data on the left side of the separator in the vocabulary configuration table is set as a label value, and the data on the right side of the separator in the vocabulary configuration table is set as a related vocabulary; for example, for the label value "income", the corresponding related vocabulary is "income, revenue, profit, profit, net income, net income, profit, revenue, surplus, income achievement"; for the label value "feedback", the corresponding related vocabulary is "opinion, feedback, feedback volume, feedback rate"; for the label value "incentive", the corresponding related vocabulary is "reward, bonus, incentive money, incentive volume, incentive amount"; for the label value "piece quantity", the corresponding related vocabulary is "piece quantity, number of tickets, single quantity, piece quantity achievement"; for the label value "fulfillment rate", the corresponding related vocabulary is "fulfillment rate, fulfillment, performance, breach of contract, time-limited fulfillment".

[0060] The specific vocabulary configuration table can be set based on business needs, that is, the label values in the vocabulary configuration table include but are not limited to data such as revenue, feedback, incentives, number of pieces and fulfillment rate.

[0061] In one embodiment, an application information configuration table is also stored in the business database Mysql, and the application information configuration table is used to set the prompt word project in the generative pre-trained language model. The application information configuration table is configured with matching fields corresponding to different keywords, such as daily income: d_fee_amt double; city name: city_namestring; date: inc_day; region, headquarters: zone_name string, etc. The application information configuration table is only for schematic explanation, and the specific application information configuration table can be set based on business needs.

[0062] In one embodiment, each first keyword is matched with the vocabulary configuration table for similarity to obtain multiple matching fields. Specifically, all tags in the vocabulary configuration table are obtained, and each first keyword is matched with all tags for similarity to obtain the first tag corresponding to the first keyword; all fields corresponding to the first tag are obtained based on the vocabulary configuration table, and all fields are used as multiple matching fields corresponding to the first keyword.

[0063] Specifically, a label in the vocabulary configuration table includes multiple fields with close or similar meanings. By establishing a corresponding relationship between labels and keywords, the corresponding labels can be obtained by clustering the meanings of the keywords, and then all the fields contained in the labels can be obtained.

[0064] Specifically, when each first keyword is respectively matched with all tags to obtain the first tag corresponding to the first keyword, each first keyword is respectively matched with all relevant words in the thesaurus configuration table to obtain target relevant words, and the tags corresponding to the target relevant words are used as the first tags corresponding to the first keyword.

[0065] Preferably, when the first keyword is matched with all tags for similarity, if the first tag corresponding to the first keyword is not matched, the first keyword is discarded.

[0066] Preferably, when each first keyword is respectively matched with all tags for similarity, the Word Embedding model in natural language processing technology can be used to calculate the similarity between words; the Word Embedding model can represent words as vectors with semantic information, and the similarity between two words can be measured according to the distance or similarity between the vectors.

[0067] In one embodiment, the matching fields include the Chinese name of the field and the English name of the field.

[0068] In one embodiment, after obtaining multiple matching fields, multiple matching fields are returned to the front end, and multiple matching fields are pushed to the user in the form of a drop-down box based on the first dialogue interface; preferably, the selection method of multiple matching fields is set to be multi-selectable.

[0069] As an excellent example in this embodiment of respectively matching each first keyword with the thesaurus configuration table to obtain multiple matching fields and pushing multiple matching fields to the user through the first dialogue interface:

[0070] After obtaining multiple first keywords "Opinion feedback volume", "Last 7 days" and "Sum", "Opinion feedback volume" is matched with all tags "Income", "Opinion feedback", "Incentive", "Number of pieces" and "Performance rate" in the thesaurus configuration table. Since "Opinion feedback" is included in the right-side thesaurus of "Opinion feedback", it is considered that the first keyword "Opinion feedback volume" hits the "Opinion feedback" tag. At the same time, the fields included in the table structure related to "Opinion feedback" such as "Opinion feedback volume on express delivery timeliness date" and "Opinion feedback volume on damage and loss date" are returned to the front end and selected by the user in the form of a drop-down box; for the first keywords "Last 7 days" and "Sum", since no tags are hit, they are discarded.

[0071] Step 103: Respond to the selection operation on the multiple matching fields to obtain a target keyword field, and generate a second question based on the target keyword field.

[0072] In one embodiment, since multiple matching fields are pushed to the user in the form of a drop-down box through the first dialogue interface, when the user selects one or more matching fields by clicking with the mouse or touching with the finger, a target keyword field is obtained by responding to the selection operation on the multiple matching fields.

[0073] In one embodiment, when generating the second question based on the target keyword field, the corresponding relationship between the target keyword field and the first keyword is obtained, and based on the corresponding relationship, the first keyword in the first question is replaced with the target keyword field to generate the second question.

[0074] Step 104: Query the business database according to the second question to obtain a first question-and-answer result, and display the first question-and-answer result to the user based on the first dialogue interface.

[0075] In one embodiment, a first structured query statement for generating the second question is called by a generative pre-trained language model, and the business database is queried according to the first structured query statement to obtain a first question-and-answer result.

[0076] In one embodiment, the second question and the application information configuration table are sent to the generative pre-trained language model, so that the prompt engineering in the generative pre-trained language model generates a first structured query statement corresponding to the second question based on the application information configuration table, where the first structured query statement is SQL.

[0077] An example is given to illustrate the generation process of the first structured query statement: The user enters the first question in the first dialogue interface: "Give the sum of the opinion feedback amounts in the last seven days". At this time, the backend first calls ChatGPT to encapsulate and process the first question, obtaining the first keyword question: "What are the keywords for giving the sum of the opinion feedback amounts in the last seven days", and calls ChatGPT to extract keywords from the first keyword question, obtaining multiple keywords: "opinion feedback amount", "last seven days", and "summation"; Each first keyword is respectively matched with the thesaurus configuration table for similarity, and the fields related to the opinion feedback amount are obtained, including d_cos_tickets: daily opinion feedback amount; d_cos_rate: daily opinion feedback rate; d_cos_cnt_a: daily month-on-month change in opinion feedback amount. The multiple matching fields returned by ChatGPT are displayed to the user through the first dialogue interface. After the user selects the required matching field: d_cos_tickets: daily opinion feedback amount; The first keyword is replaced with the required matching field selected by the user to obtain the second question, that is, the first keyword "opinion feedback amount" is replaced with d_cos_tickets: daily opinion feedback amount, obtaining the second question "Give the sum of d_cos_tickets: daily opinion feedback amount in the last seven days", call ChatGPT to generate the first structured query statement for the second question, and return the first structured query statement SQL.

[0078] In one embodiment, through the SQL execution interface provided by the business database, the first structured query statement is sent to the business database for data query, so that the business database retrieves the data that meets the conditions from the corresponding data tables according to the conditions and logic in the first structured query statement, and returns the query result, and the query result is used as the Q&A result and directly displayed through the first dialogue interface.

[0079] For example, when the user enters in the first dialogue interface: "What is the sum of the income and the opinion feedback amount in Shenzhen area on June 20, 2023?", the specific data corresponding to the sum of the opinion feedback amounts and the specific data corresponding to the income are displayed on the first dialogue interface.

[0080] In one embodiment, StarRocks is an open-source distributed real-time analysis database. Since StarRocks is compatible with the Mysql protocol, it supports multiple replicas and has elastic fault tolerance capabilities; at the same time, StarRocks can automatically optimize complex queries through the CBO optimizer (CostBased Optimizer), greatly improving the data analysis efficiency; Therefore, the business data is stored in StarRocks to generate the business database.

[0081] In one embodiment, to meet the usage requirements of different users, a direct question method is also provided. For direct Q&A, it is applicable to scenarios where users only need a simple and direct answer; users can directly ask a question, and ChatGPT will give a short and accurate answer as soon as possible without the need for step-by-step interaction. This Q&A method is very efficient and can quickly meet users' information needs.

[0082] In one embodiment, when the Q&A type is direct Q&A, a second dialogue interface of the generative pre-trained language model is displayed.

[0083] In one embodiment, the second dialogue interface is a dialogue page obtained after the user selects direct Q&A and initiates a question in the AI Chat interface. It is generated through front-end initialization and is used to display the interaction interface of the generative pre-trained language model. It can be displayed on the user's display device in the form of text, images, or even audio or video, etc., so that users can intuitively understand and participate in the dialogue.

[0084] In one embodiment, the third question entered by the user in the second dialogue interface is obtained.

[0085] Specifically, by detecting the second target input area in the second dialogue interface, when a trigger operation is detected in the second target input area, the third question entered by the user in the second dialogue interface is obtained.

[0086] Specifically, the second target input area includes, but is not limited to, the send button set in the second dialogue interface; the trigger operation includes, but is not limited to, operations such as mouse clicking or gesture touching.

[0087] In one embodiment, after obtaining the third question entered by the user in the second dialogue interface, it is also determined whether there is a preset specified word in the third question. If so, the real-time system time is obtained, and the specified word in the third question is replaced with the real-time system time to update the third question.

[0088] Specifically, since the training time of the generative pre-trained language model is less than the actual usage time, when there are words such as "today" or "this year" in the question entered by the user based on the second dialogue interface, the generative pre-trained language model may have a date misjudgment situation. Therefore, to solve the date misjudgment situation, by setting a preset specified word, when determining whether there is a preset specified word in the third question entered by the user, when calling the back-end interface, the real-time system time of the terminal device obtained by the interface is used, and the specified word in the third question is replaced with the real-time system time.

[0089] Example illustration: Set the preset specified words to include "today" and "this year". When the third question entered by the user is: "Give the sum of the opinion feedback amounts today", since the preset specified word "today" exists in the third question, at this time, obtain the real-time system time XXX year XXX month XXX day, and replace "today" with "XXX year XXX month XXX day", and the more reliable third question obtained is: Give the sum of the opinion feedback amounts on XXX year XXX month XXX day.

[0090] In one embodiment, obtain the second back-end threshold prompt word, and perform encapsulation processing on the updated third question and the second back-end threshold prompt word to obtain the second encapsulated question.

[0091] Specifically, the second back-end threshold prompt word refers to the keyword or phrase used to trigger the subsequent processing steps; set the second back-end threshold prompt word to "Does this sentence contain year information?".

[0092] Specifically, when the third question is sentence3, convert the third question into the second table structure {sentence3}; encapsulate the second table structure {sentence3} with the second back-end threshold prompt word, and the obtained second encapsulated question is "Does the sentence {sentence3} contain year information?", and use this sentence pattern to send a question to the generative pre-trained language model.

[0093] In one embodiment, call the generative pre-trained language model to determine whether the second encapsulated question contains year information. If not, push an input prompt to the user based on the second dialogue interface. Example illustration, push to the user through the second dialogue interface: Need to input a specific time, you can try to ask questions like: What is the sum of the incomes in Shenzhen area in 2023? Summary of the incomes in Shenzhen area in April 2023? What is the income in Yunnan area on April 20, 2023? What is the total income from April 1 to 7, 2023? What is the daily volume of packages in Shenzhen area from May 1 to 3, 2023? Based on the above input prompt push, intuitively show the user the standard question input format to facilitate the user to quickly input effective questions.

[0094] In one embodiment, when the generative pre-trained language model determines that the second encapsulated question contains year information, do not process the second encapsulated question.

[0095] In one embodiment, optimize the prompt engineering in the generative pre-trained language model to obtain an optimized generative pre-trained language model.

[0096] Specifically, multiple disassembly tasks are set for the prompt engineering in the generative pre-trained language model to obtain an optimized generative pre-trained language model. Among them, the multiple disassembly tasks include disassembling regional dimension information, disassembling date information, and generating plain text statements based on pre-designed calculation rules and preset field requirements.

[0097] In one embodiment, by performing multiple disassembly tasks on the prompt engineering in the generative pre-trained language model, complex problems can be disassembled into different sub-tasks, enabling the model to more clearly understand different aspects and features of the problems, which helps improve the accuracy and parsing ability of the model; for problems involving regional dimensions, such as queries related to geographical locations, they are isolated as a sub-task for disassembly processing. This allows the model to better understand regional dimension information and generate more accurate structured query statements; for query problems related to time dimensions such as dates and times, they are disassembled into an independent sub-task for processing, enabling the model to better understand and process date information and generate structured query statements related to time. In the disassembled sub-tasks, based on pre-designed algorithm rules and preset field requirements, the problems can be transformed into the generation of plain text statements. In this way, plain text statements that meet the requirements of the business database can be generated more accurately, improving the accuracy and effectiveness of query results. Preferably, the plain text statement is a plain text SQL statement.

[0098] Preferably, for disassembling regional dimension information: consider the regional dimensions implied by the following problems: large region, region (business area), city. The large region includes four 'East China Region', 'South China Region', 'North China Region', and 'Central and Western Region'.

[0099] Preferably, for disassembling date information: the partition in the application information configuration table structure is called 'inc_day' and the format is 'yyyyMMdd'.

[0100] Preferably, for generating plain text statements based on pre-designed calculation rules and preset field requirements, it includes: (1) clearly use standard StarRocks syntax and follow SQL syntax to generate SQL; (2) must generate Chinese field names; (3) if the problem requires calculating 'average ticket revenue', use calculation formulas such as 'and' / 'and', and if it requires calculating 'average ticket incentive', then use calculation formulas such as sum(d_claim_amt) / sum(d_tickets); (4) the SQL should be returned in plain text form.

[0101] In one embodiment, the optimized generative pre-trained language model is called to generate the second structured query statement corresponding to the third question.

[0102] Specifically, the third question is sent to the generative pre-trained language model so that the optimized prompt engineering in the generative pre-trained language model generates a second structured query statement corresponding to the third question, where the second structured query statement is SQL.

[0103] In one embodiment, data query is performed on the business database according to the second structured query statement to obtain a second Q&A result, and the second Q&A result is displayed to the user based on the second dialogue interface.

[0104] In one embodiment, after the first Q&A result is displayed to the user based on the first dialogue interface, a display instruction input by the user on the first dialogue interface is also responded to, where the display instruction includes a structured query statement display instruction and a chart display instruction.

[0105] Preferably, the structured query statement display instruction is displayed as "Display SQL" on the first dialogue interface; the chart display instruction includes a line chart, a bar chart, a column chart, and a scatter chart; the chart display instruction is displayed as a line chart, a bar chart, a column chart, and a scatter chart on the first dialogue interface.

[0106] In one embodiment, when the display instruction is a structured query statement display instruction, the first structured query statement is displayed to the user based on the first dialogue interface.

[0107] In one embodiment, when the display instruction is a chart display instruction, based on the first Q&A result, multiple chart parameters are generated, and the multiple chart parameters are pushed to the user based on the first dialogue interface; in response to a selection operation on the multiple chart parameters, a target chart parameter is determined, and based on the target chart parameter, a first Q&A result chart is generated.

[0108] Preferably, the multiple chart parameters include but are not limited to an x-axis parameter and a y-axis parameter. By way of example, by selecting the x-axis parameter as the date and the y-axis parameter as the number of opinion feedbacks, a curve chart with the date as the abscissa and the number of opinion feedbacks as the ordinate can be generated in real time.

[0109] In one embodiment, after the second Q&A result is displayed to the user based on the second dialogue interface, a display instruction input by the user on the second dialogue interface is also responded to, where the display instruction includes a structured query statement display instruction and a chart display instruction.

[0110] In summary, the automatic question-answering method for business data provided in this embodiment can respond to the selected question-answering type. When the question-answering type is an interactive question-answering, it displays the first dialogue interface of the generative pre-trained language model, which enables users to ask questions and communicate in the form of a dialogue, increasing the flexibility and interactivity of the question-answering. In the first dialogue interface, by performing keyword tokenization on the first question input by the user, the system can obtain multiple first keywords. These keywords are matched with the thesaurus configuration table for similarity, and multiple matching fields are pushed to the user. This way can help users more accurately understand and select relevant questions and information. And based on the selected target keyword field by the user, the system generates a second question and calls the generative pre-trained language model to generate the first structured query statement corresponding to this question. This can convert the user's question into a structured query statement understandable by the database, facilitating data query of the business database. According to the first structured query statement, data query is performed on the business database, and the system obtains the first question-answering result and displays it to the user through the first dialogue interface, so that users can intuitively see the obtained question-answering result, improving the query efficiency. When the question-answering type is a direct question-answering, by optimizing the prompt engineering in the generative pre-trained language model, the accuracy and response efficiency of the question-answering can be improved. The optimized model can better understand the user's question and generate a more accurate structured query statement.

[0111] Embodiment 2, see Figure 4 , Figure 4 is a schematic structural diagram of an embodiment of an automatic question-answering device for business data provided by the present invention, as Figure 4 shown. The device includes a keyword tokenization module 201, a similarity matching module 202, a target keyword field selection module 203, and a first data query module 204, specifically as follows:

[0112] The keyword tokenization module 201 is configured to obtain the first question input by the user in the first dialogue interface, and call the generative pre-trained language model to perform keyword tokenization on the first question to obtain multiple first keywords.

[0113] The similarity matching module 202 is configured to perform similarity matching on each first keyword with the thesaurus configuration table respectively to obtain multiple matching fields, and push the multiple matching fields to the user through the first dialogue interface.

[0114] The target keyword field selection module 203 is configured to respond to the selection operation on the multiple matching fields to obtain the target keyword field, and generate a second question based on the target keyword field.

[0115] The first data query module 204 is configured to query the business database according to the second question, obtain a first Q&A result, and display the first Q&A result to the user based on the first dialogue interface.

[0116] An automatic Q&A device for business data provided in this embodiment further includes: a first dialogue interface display module 200.

[0117] In one embodiment, the first dialogue interface display module 200 is configured to respond to the selected Q&A type by the user. When the Q&A type is an interactive Q&A, display the first dialogue interface of the generative pre-trained language model.

[0118] An automatic Q&A device for business data provided in this embodiment further includes: a time information judgment module.

[0119] In one embodiment, the time information judgment module is configured to obtain a first backend threshold prompt word, encapsulate the first question and the first backend threshold prompt word to obtain a first encapsulated question.

[0120] In one embodiment, the time information judgment module is configured to call the generative pre-trained language model to determine whether the first encapsulated question contains time. If so, based on the first backend threshold prompt word, return the first threshold prompt word; otherwise, return the second threshold prompt word.

[0121] In one embodiment, an automatic Q&A device for business data further includes: a Q&A result display module 205.

[0122] In one embodiment, the Q&A result display module 205 is configured to respond to a display instruction input by the user on the first dialogue interface, where the display instruction includes a structured query statement display instruction and a chart display instruction.

[0123] In one embodiment, the Q&A result display module 205 is configured to, when the display instruction is the structured query statement display instruction, display the first structured query statement to the user based on the first dialogue interface.

[0124] In one embodiment, the Q&A result display module 205 is configured to, when the display instruction is the chart display instruction, generate a plurality of chart parameters based on the first Q&A result, and push the plurality of chart parameters to the user based on the first dialogue interface;

[0125] In one embodiment, the Q&A result display module 205 is configured to respond to a selection operation on the plurality of chart parameters, determine a target chart parameter, and generate a first Q&A result chart based on the target chart parameter.

[0126] In one embodiment, the similarity matching module 202 is configured to perform similarity matching between each first keyword and the thesaurus configuration table to obtain a plurality of matching fields, specifically including: obtaining all tags in the thesaurus configuration table, performing similarity matching between each first keyword and all the tags respectively to obtain a first tag corresponding to the first keyword; obtaining all fields corresponding to the first tag based on the thesaurus configuration table, and using all the fields as a plurality of matching fields corresponding to the first keyword.

[0127] An automatic question and answer device for business data provided in this embodiment further includes: a second dialogue interface display module 206, a model optimization module 207, and a second data query module 208; as Figure 5 shown, Figure 5 is a structural schematic diagram of another embodiment of an automatic question and answer device for business data provided in this embodiment.

[0128] The second dialogue interface display module 206 is configured to display a second dialogue interface of the generative pre-trained language model when the question and answer type is a direct question and answer type.

[0129] The model optimization module 207 is configured to perform optimization settings on the prompt engineering in the generative pre-trained language model to obtain an optimized generative pre-trained language model.

[0130] The second data query module 208 is configured to obtain a third question input by the user on the second dialogue interface, call the optimized generative pre-trained language model to generate a second structured query statement corresponding to the third question, perform data query on the business database according to the second structured query statement to obtain a second question and answer result, and display the second question and answer result to the user based on the second dialogue interface.

[0131] An automatic question and answer device for business data provided in this embodiment further includes: a year information judgment module 2061.

[0132] In one embodiment, the year information judgment module 2061 is configured to judge whether there is a preset specified vocabulary in the third question. If so, obtain the real-time system time, and replace the specified vocabulary in the third question with the real-time system time to update the third question.

[0133] In one embodiment, the year information judgment module 2061 is configured to obtain a second backend threshold prompt word, and perform encapsulation processing on the updated third question and the second backend threshold prompt word to obtain a second encapsulated question.

[0134] In one embodiment, the year information determination module 2061 is configured to call the generative pre-trained language model to determine whether the second packaged question contains year information. If not, an input prompt is pushed to the user based on the second dialogue interface.

[0135] In one embodiment, the model optimization module 207 is configured to optimize the prompt engineering in the generative pre-trained language model to obtain an optimized generative pre-trained language model. Specifically, it includes: setting multiple disassembly tasks for the prompt engineering in the generative pre-trained language model to obtain an optimized generative pre-trained language model, where the multiple disassembly tasks include disassembling regional dimension information, disassembling date information, and generating plain text statements based on pre-designed calculation rules and preset field requirements.

[0136] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the above-described devices can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated herein.

[0137] It should be noted that the embodiments of the above-described automatic question-answering device for business data are merely illustrative. The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0138] Based on the embodiments of the above-described automatic question-answering method for business data, another embodiment of the present invention provides an automatic question-answering terminal device for business data. The automatic question-answering terminal device for business data includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, the automatic question-answering method of any embodiment of the present invention is implemented.

[0139] Exemplarily, in this embodiment, the computer program can be divided into one or more modules. The one or more modules are stored in the memory and executed by the processor to complete the present invention. The one or more modules can be a series of computer program instruction segments capable of performing specific functions, and these instruction segments are used to describe the execution process of the computer program in the automatic question-answering terminal device for business data.

[0140] The automatic question-answering terminal device for business data can be a computing device such as a desktop computer, a notebook, a palm computer, and a cloud server. The automatic question-answering terminal device for business data may include, but is not limited to, a processor and a memory.

[0141] The so-called processor may be a Central Processing Unit (CPU), or may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate Arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The processor is the control center of the automatic question-answering terminal device for the service data, and connects various parts of the automatic question-answering terminal device for the service data through various interfaces and lines.

[0142] The memory can be used to store the computer programs and / or modules. The processor realizes various functions of the automatic question-answering terminal device for the service data by running or executing the computer programs and / or modules stored in the memory, and by calling the data stored in the memory. The memory mainly includes a program storage area and a data storage area. Among them, the program storage area can store an operating system, application programs required for at least one function, etc.; the data storage area can store data created according to the use of the mobile phone, etc. In addition, the memory can include high-speed random access memory, and can also include non-volatile memory, such as a hard disk, memory, plug-in hard disk, Smart Media Card (SMC), Secure Digital (SD) card, Flash Card, at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage devices.

[0143] Based on the embodiments of the above automatic question-answering method for service data, another embodiment of the present invention provides a storage medium, which includes a stored computer program. When the computer program runs, it controls the device where the storage medium is located to execute the automatic question-answering method for service data in any embodiment of the present invention.

[0144] In this embodiment, the above storage medium is a computer-readable storage medium, and the computer program includes computer program code, which can be in the form of source code, object code, executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disc, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electrical carrier signal, telecommunication signal, and software distribution medium, etc. It should be noted that the content included in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electrical carrier signals and telecommunication signals.

[0145] In summary, an automatic question-answering method, device, equipment and storage medium for service data provided by the present invention obtain a first question input by a user on a first dialogue interface, call a generative pre-trained language model to perform keyword tokenization processing on the first question, and respectively perform similarity matching on the obtained multiple first keywords with a thesaurus configuration table to obtain multiple matching fields; in response to a selection operation on the multiple matching fields, generate a second question based on the obtained target keyword field; query the service database according to the second question to obtain a first question-answering result, and display the first question-answering result to the user based on the first dialogue interface; compared with the prior art, the technical solution of the present invention can improve the service data query efficiency and query accuracy.

[0146] The above are only the preferred embodiments of the present invention. It should be pointed out that for those of ordinary skill in the art, without departing from the technical principle of the present invention, several improvements and substitutions can be made, and these improvements and substitutions should also be regarded as the protection scope of the present invention.

Claims

1. An automatic question-answering method for business data, characterized in that Including: Obtain the first question input by the user on the first dialogue interface, call the generative pre-trained language model to perform keyword tokenization processing on the first question, and obtain multiple first keywords; Respectively perform similarity matching of each first keyword with the thesaurus configuration table to obtain multiple matching fields, and push the multiple matching fields to the user through the first dialogue interface; Respond to the selection operation on the multiple matching fields to obtain a target keyword field, and generate a second question based on the target keyword field; Perform data query on the business database according to the second question to obtain a first Q&A result, and display the first Q&A result to the user based on the first dialogue interface.

2. The automatic question-answering method for service data according to claim 1, wherein After obtaining the first question input by the user on the first dialogue interface, it further includes: Obtain the first backend threshold prompt word, and perform encapsulation processing on the first question and the first backend threshold prompt word to obtain a first encapsulated question; Call the generative pre-trained language model to determine whether the first encapsulated question contains time. If so, return the first threshold prompt word based on the first backend threshold prompt word, otherwise, return the second threshold prompt word.

3. The automatic question-answering method for service data according to claim 1, characterized in that, After displaying the first Q&A result to the user based on the first dialogue interface, it further includes: Respond to the display instruction input by the user on the first dialogue interface, where the display instruction includes a structured query statement display instruction and a chart display instruction; When the display instruction is the structured query statement display instruction, display the first structured query statement to the user based on the first dialogue interface; When the display instruction is the chart display instruction, generate multiple chart parameters based on the first Q&A result, and push the multiple chart parameters to the user based on the first dialogue interface; Respond to the selection operation on the multiple chart parameters to determine the target chart parameter, and generate a first Q&A result chart based on the target chart parameter.

4. The automatic question answering method for service data according to claim 1, characterized in that, Respectively perform similarity matching of each first keyword with the thesaurus configuration table to obtain multiple matching fields, specifically including: Obtain all tags in the thesaurus configuration table, respectively perform similarity matching of each first keyword with all the tags to obtain the first tag corresponding to the first keyword; Obtain all fields corresponding to the first tag based on the thesaurus configuration table, and use all the fields as the multiple matching fields corresponding to the first keyword.

5. The automatic question answering method for service data according to claim 1, characterized in that, Before obtaining the first question input by the user on the first dialogue interface, it further includes: Respond to the selected Q&A type by the user. When the Q&A type is an interactive Q&A, display the first dialogue interface of the generative pre-trained language model.

6. The automatic question answering method for service data according to claim 5, wherein After responding to the selected Q&A type by the user, it further includes: When the Q&A type is a direct Q&A, display the second dialogue interface of the generative pre-trained language model; Obtain the third question input by the user on the second dialogue interface; Optimize the prompt engineering in the generative pre-trained language model to obtain an optimized generative pre-trained language model. Call the optimized generative pre-trained language model to generate a second structured query statement corresponding to the third question, and query the business database according to the second structured query statement to obtain a second question-and-answer result, and display the second question-and-answer result to the user based on the second dialogue interface.

7. The automatic question-answering method for service data according to claim 6, characterized in that After obtaining the third question input by the user on the second dialogue interface, it further includes: Judge whether there is a preset specified word in the third question. If so, obtain the real-time system time, and replace the specified word in the third question with the real-time system time to update the third question; Obtain a second backend threshold prompt word, and perform encapsulation processing on the updated third question and the second backend threshold prompt word to obtain a second encapsulated question; Call the generative pre-trained language model to judge whether the second encapsulated question contains year information. If not, push an input prompt to the user based on the second dialogue interface.

8. The automatic question answering method for service data according to claim 6, wherein, Optimize the prompt engineering in the generative pre-trained language model to obtain an optimized generative pre-trained language model, specifically including: Set multiple disassembly tasks for the prompt engineering in the generative pre-trained language model to obtain an optimized generative pre-trained language model, where the multiple disassembly tasks include disassembling regional dimension information, disassembling date information, and generating plain text statements based on pre-designed calculation rules and preset field requirements.

9. An automatic question answering device for service data, characterized in that, It includes: A keyword tokenization module, a similarity matching module, a target keyword field selection module, and a first data query module; Among them, the keyword tokenization module is used to obtain the first question input by the user on the first dialogue interface, and call the generative pre-trained language model to perform keyword tokenization processing on the first question to obtain multiple first keywords; The similarity matching module is used to respectively perform similarity matching of each first keyword with the thesaurus configuration table to obtain multiple matching fields, and push the multiple matching fields to the user through the first dialogue interface; The target keyword field selection module is used to respond to the selection operation on the multiple matching fields to obtain a target keyword field, and generate a second question based on the target keyword field; The first data query module is used to query the business database according to the second question to obtain a first question-and-answer result, and display the first question-and-answer result to the user based on the first dialogue interface.

10. A terminal device, characterized in that, It includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the automatic question-and-answer method for business data according to any one of claims 1 to 8.

11. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored computer program, wherein when the computer program runs, it controls the device where the computer-readable storage medium is located to execute the automatic question-and-answer method for business data according to any one of claims 1 to 8.