Intelligent question answering method and device, electronic equipment and storage medium

By constructing an intelligent question-and-answer method that combines static and dynamic information databases, the problem of intelligent inquiry devices being unable to adapt to knowledge and personalized needs in changing environments is solved, thus achieving efficient and accurate question-and-answer services.

CN122262273APending Publication Date: 2026-06-23GRG INTELLIGENT TECH SOLUTION CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610288138.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-03-10
Publication Date
2026-06-23

AI Technical Summary

Technical Problem

Existing intelligent inquiry devices struggle to cover the vast and frequently changing knowledge base of a venue, and cannot adapt to the personalized needs of different customers, resulting in low question-and-answer efficiency and a high error rate.

Method used

A static information database is constructed to store question-answer pairs, and a dynamic information database is constructed to store knowledge vectors. Answers are provided through a combination of static information retrieval and question-answering models. The static information database covers information with low change frequency, while the dynamic information database adapts to personalized expressions through knowledge vectors.

Benefits of technology

It improved the speed and accuracy of question and answer, reduced the workload of manual data entry, enhanced the adaptability to personalized expressions, and improved the efficiency of question and answer.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122262273A_ABST
    Figure CN122262273A_ABST
Patent Text Reader

Abstract

The application discloses an intelligent question answering method and device, electronic equipment and storage medium, and belongs to the technical field of artificial intelligence. The method comprises the following steps: acquiring question information; searching a first knowledge base according to the question information; the first knowledge base stores a plurality of question-answer pairs constructed according to static information data; if a matched target question is searched, outputting the corresponding answer; otherwise, inputting the question information into a question answering model to obtain an answer output based on a second knowledge base; the second knowledge base stores a plurality of knowledge vectors constructed according to dynamic information data. According to the application, the question-answer pairs are constructed according to the static information data, and the knowledge vectors are constructed according to the dynamic information data, so that the workload of manually entering data can be reduced, and the timeliness of the answering basis can be improved; by searching the first knowledge base first, and outputting the answer based on the second knowledge base by the question answering model in the case of a miss, the answering failure or error can be reduced, and the question answering efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of artificial intelligence technology, and in particular relates to an intelligent question-answering method, device, electronic device and storage medium. Background Technology

[0002] In places like subways, hospitals, and shopping malls, dedicated staff such as customer service representatives and guides are usually stationed to answer customer questions about procedures, facility locations, and pricing. However, the number of staff in these positions is limited, making it difficult to meet the demand for information during peak hours. Therefore, these venues typically install smart information kiosks as a supplementary or alternative service channel.

[0003] In related technologies, employees typically collect and record frequently asked questions and write corresponding answers manually, then input them into the backend database of intelligent inquiry devices according to a fixed format. When the intelligent inquiry device receives a question input by a user, it can only recognize a small number of fixed keywords or phrases and output a fixed answer text as a reply. This model is difficult to cover the large-scale and frequently changing knowledge system of a venue, and it is difficult to adapt to the personalized needs and expression styles of different customers. It is prone to situations where it cannot answer or gives incorrect answers, and customers still need to seek help from human customer service, which seriously affects the efficiency of question and answering. Summary of the Invention

[0004] This application aims to address at least one of the technical problems existing in the prior art. To this end, this application proposes an intelligent question-answering method, apparatus, electronic device, and storage medium to improve question-answering efficiency.

[0005] Firstly, this application provides an intelligent question-answering method, including:

[0006] Obtain user problem information; Based on the question information, a first knowledge base is retrieved; the first knowledge base stores multiple question-answer pairs, each of which is constructed based on static information data; if a target question matching the question information is found, a first target answer corresponding to the target question is output. If no target question matching the question information is found, the question information is input into the question answering model to obtain the second target answer output by the question answering model based on the second knowledge base; the second knowledge base stores multiple knowledge vectors, each of which is constructed based on dynamic information data.

[0007] This application embodiment constructs question-answer pairs based on static information data, enabling the first knowledge base to cover static information with low change frequency; by constructing knowledge vectors based on dynamic information data, it reduces the workload of manually extracting questions and writing answers, and improves the timeliness of information stored in the second knowledge base; by first retrieving the first knowledge base based on question information and outputting the corresponding answer, it reduces the need to call the question-answering model, thereby improving the speed of question answering; by having the question-answering model output the answer based on the second knowledge base when no matching target question is found, it can adapt to the personalized expression styles of different users, reduce the situation of being unable to answer or answering incorrectly, thereby improving the efficiency of question answering.

[0008] According to one embodiment of this application, the first knowledge base is constructed according to the following method: Acquire static information data; the static information data is data whose update period is greater than or equal to a first target threshold. Based on the target question-and-answer template, the static information data is parsed to obtain multiple sets of question-and-answer pairs and the knowledge categories corresponding to each question-and-answer pair; Based on the knowledge categories, store each of the question-answer pairs to construct the first knowledge base.

[0009] In this embodiment, by updating static information data at a period greater than or equal to the first target threshold, the workload of manual data entry can be reduced; by parsing static information data according to the target question-and-answer template, the possibility of manual entry errors can be reduced, and the format standardization of question-and-answer pairs can be improved; by parsing the knowledge categories corresponding to each set of question-and-answer pairs and storing each question-and-answer pair according to the knowledge categories, subsequent retrieval can be performed using the knowledge categories as indexes, thereby improving retrieval efficiency.

[0010] According to one embodiment of this application, the step of retrieving the first knowledge base based on the problem information includes: Identify the target knowledge category to which the problem information belongs; Retrieve question-answer pairs stored under the target knowledge category in the first knowledge base; If no target question matching the question information is found under the target knowledge category, then the first knowledge base is searched globally.

[0011] In this embodiment, by identifying the target knowledge category to which the question information belongs, a search is first performed under the target knowledge category, and a global search is performed only if no match is found. This reduces the computational load of searching the first knowledge base and improves the search speed.

[0012] According to one embodiment of this application, the second knowledge base is constructed according to the following method: Acquire dynamic information data; the dynamic information data is data whose update cycle is less than a second target threshold, and the second target threshold is less than a first target threshold. The dynamic information data is divided into multiple knowledge segments; Feature extraction is performed on each of the knowledge segments to obtain the knowledge vector corresponding to each knowledge segment; The knowledge fragments are associated with and stored with the corresponding knowledge vectors to construct the second knowledge base.

[0013] In this embodiment, by updating dynamic information data at a period less than the second target threshold, the accuracy and timeliness of the second database content can be improved, reducing the possibility of incorrect answers due to outdated dynamic information data. By dividing dynamic information data into multiple knowledge fragments and then extracting the knowledge vectors corresponding to each knowledge fragment, the situation of semantic ambiguity and information dilution caused by long texts containing multiple topics can be reduced, thereby improving the accuracy of knowledge vectors. By associating and storing knowledge fragments with their corresponding knowledge vectors, it is convenient to call the question-answering model in the future, thereby improving the efficiency of question answering.

[0014] According to one embodiment of this application, dividing the dynamic information data into multiple knowledge fragments includes: The dynamic information data is preprocessed, and the preprocessing includes at least one of text extraction, text cleaning, and text normalization; The preprocessed dynamic information data is divided according to the target segmentation rules to obtain multiple knowledge fragments; Alternatively, the target segment identifier and / or target segment length input by the user can be obtained, and the preprocessed dynamic information data can be divided to obtain multiple knowledge fragments.

[0015] In this embodiment, by preprocessing the dynamic information data, the interference caused by noise and format differences in the dynamic information data can be reduced, thereby improving the quality of the dynamic information data. By segmenting according to the target segmentation rules or the target segmentation identifier and / or target segmentation length input by the user, the segmentation method can be adjusted according to the actual situation and user needs, reducing the possibility of segmentation logic errors, thereby improving the semantic integrity and consistency of the content in each knowledge fragment.

[0016] According to one embodiment of this application, the method further includes: Identify whether the problem information contains a business processing request; If a business processing request is detected, the corresponding business instruction is retrieved from the business scenario instruction library; Execute the aforementioned business instructions.

[0017] In this embodiment, by identifying whether the problem information contains a business processing request, and automatically retrieving and executing the corresponding business instruction when a business processing request is identified, the work of users in finding the business processing location and starting the business processing process can be reduced, thereby improving service efficiency and enhancing user experience.

[0018] Secondly, this application provides an intelligent question-answering device, comprising: The acquisition module is used to obtain the user's problem information; The first question-answering module is used to retrieve a first knowledge base based on the question information; the first knowledge base stores multiple question-answer pairs, each of which is constructed based on static information data; if a target question matching the question information is found, the first target answer corresponding to the target question is output. The second question-answering module is used to input the question information into the question-answering model if no target question matching the question information is found, and to obtain the second target answer output by the question-answering model based on the second knowledge base; the second knowledge base stores multiple knowledge vectors, each of which is constructed based on dynamic information data.

[0019] According to the intelligent question-answering device of this application, by constructing question-answer pairs based on static information data, the resulting first knowledge base can cover static information with low change frequency; by constructing knowledge vectors based on dynamic information data, the workload of manually extracting questions and writing answers can be reduced, and the timeliness of information stored in the second knowledge base can be improved; by first retrieving the first knowledge base based on question information and outputting the corresponding answer, the need to call the question-answering model can be reduced, thereby improving the speed of question answering; by having the question-answering model output the answer based on the second knowledge base when no matching target question is retrieved, it can adapt to the personalized expression style of different users, reduce the situation of being unable to answer or answering incorrectly, thereby improving the efficiency of question answering.

[0020] Thirdly, this application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the intelligent question-answering method as described in the first aspect above.

[0021] Fourthly, this application provides a subway intelligent inquiry terminal, including a display screen and a controller; the controller is used to execute the intelligent question-and-answer method as described in the first aspect above.

[0022] Fifthly, this application provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the intelligent question-answering method as described in the first aspect above.

[0023] In a sixth aspect, this application provides a chip including a processor and a communication interface, the communication interface being coupled to the processor, the processor being used to run programs or instructions to implement the intelligent question-answering method as described in the first aspect above.

[0024] In a seventh aspect, this application provides a computer program product, including a computer program that, when executed by a processor, implements the intelligent question-answering method as described in the first aspect above.

[0025] The above-described one or more technical solutions in the embodiments of this application have at least one of the following technical effects: According to the intelligent question-answering method of this application, by constructing question-answer pairs based on static information data, the resulting first knowledge base can cover static information with low change frequency; by constructing knowledge vectors based on dynamic information data, the workload of manually extracting questions and writing answers can be reduced, and the timeliness of information stored in the second knowledge base can be improved; by first retrieving the first knowledge base based on question information and outputting the corresponding answer, the need to call the question-answering model can be reduced, thereby improving the speed of question answering; by having the question-answering model output the answer based on the second knowledge base when no matching target question is found, it can adapt to the personalized expression style of different users, reduce the situation of being unable to answer or answering incorrectly, thereby improving the efficiency of question answering.

[0026] In some embodiments, updating static information data at a period greater than or equal to a first target threshold can reduce the workload of manual data entry; parsing static information data according to the target question-and-answer template can reduce manual entry errors and improve the format standardization of question-and-answer pairs; and parsing the knowledge categories corresponding to each set of question-and-answer pairs and storing each question-and-answer pair according to the knowledge categories enables subsequent retrieval using the knowledge categories as indexes, thereby improving retrieval efficiency.

[0027] In some embodiments, by identifying the target knowledge category to which the question information belongs, a search is first performed under the target knowledge category, and a global search is performed only if no match is found. This can reduce the computational load of searching the first knowledge base and improve the search speed.

[0028] In some embodiments, by updating dynamic information data at a period less than the second target threshold, the accuracy and timeliness of the second database content can be improved, reducing the possibility of incorrect answers due to outdated dynamic information data. By dividing dynamic information data into multiple knowledge fragments and then extracting the knowledge vectors corresponding to each knowledge fragment, the situation of semantic ambiguity and information dilution caused by long texts containing multiple topics can be reduced, thereby improving the accuracy of knowledge vectors. By associating and storing knowledge fragments with their corresponding knowledge vectors, it is convenient to call subsequent question-answering models, thereby improving question-answering efficiency.

[0029] In some embodiments, preprocessing dynamic information data can reduce noise and interference caused by format differences, thereby improving the quality of dynamic information data. By segmenting according to target segmentation rules or user-input target segmentation identifiers and / or target segmentation lengths, the segmentation method can be adjusted according to actual conditions and user needs, reducing the occurrence of segmentation logic errors, thereby improving the semantic integrity and consistency of content in each knowledge fragment.

[0030] In some embodiments, by identifying whether the problem information contains a business processing request, and automatically retrieving and executing the corresponding business instruction when a business processing request is identified, the work of users in finding the business processing location and starting the business processing process can be reduced, thereby improving service efficiency and enhancing user experience.

[0031] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description

[0032] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0033] Figure 1 This is a flowchart illustrating the intelligent question-answering method provided in an embodiment of this application; Figure 2 This is a schematic diagram of the intelligent question-answering process provided in the embodiments of this application; Figure 3 This is a schematic diagram of the structure of the intelligent question-answering device provided in the embodiments of this application; Figure 4 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0034] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.

[0035] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.

[0036] The intelligent question-answering method, device, electronic device, and storage medium provided in this application will be described in detail below with reference to the accompanying drawings and through specific embodiments and application scenarios.

[0037] Among them, the intelligent question-answering method can be applied to the terminal, specifically executed by the hardware or software in the terminal.

[0038] The terminal includes, but is not limited to, portable communication devices such as mobile phones or tablets with touch-sensitive surfaces (e.g., touchscreen displays and / or touchpads). It should also be understood that, in some embodiments, the terminal may not be a portable communication device, but rather a desktop computer with touch-sensitive surfaces (e.g., touchscreen displays and / or touchpads).

[0039] The following embodiments describe a terminal including a display and a touch-sensitive surface. However, it should be understood that the terminal may include one or more other physical user interface devices such as a physical keyboard, mouse, and joystick.

[0040] The intelligent question-answering method provided in this application embodiment can be executed by an electronic device or a functional module or entity in an electronic device that can implement the intelligent question-answering method. The electronic devices mentioned in this application embodiment include, but are not limited to, mobile phones, tablets, computers, etc. The intelligent question-answering method provided in this application embodiment is described below using an electronic device as the execution subject.

[0041] like Figure 1 As shown, the intelligent question-answering method includes steps 110, 120 and 130.

[0042] Step 110: Obtain the user's problem information.

[0043] In this embodiment of the application, the user's question information is the query, instruction or request content expressed by the user in natural language, which can be in the form of text, string, etc. For example, in the scenario of asking and answering questions about subway-related information, the user needs to query the departure time of the last subway train to plan the trip, and the question information is "What is the departure time of the last train on Line Z?"

[0044] The system can acquire text input by the user via keyboard and use the resulting text directly as the question information; alternatively, it can acquire voice data input by the user via microphone, parse the voice data using a speech-to-text tool, and use the parsed text as the question information. Of course, other methods can also be used to acquire the user's question information, such as displaying multiple preset questions in a graphical user interface and using the preset question selected by the user through clicking the mouse, clicking the touchscreen, etc., as the question information. This application embodiment does not limit this approach.

[0045] Step 120: Based on the question information, retrieve the first knowledge base; the first knowledge base stores multiple question-answer pairs, each of which is constructed based on static information data; if a target question matching the question information is found, output the first target answer corresponding to the target question.

[0046] In this application embodiment, static information data is data that describes factual content with a low update frequency, such as data describing subway lines and stations, station structure, fare rules, etc., and can be in the form of text, tables, documents, etc.

[0047] A question-answer pair is a type of data stored according to a preset structure, including a question and its corresponding answer, for example: {question: "What is the departure time of the last train on line Z?", answer: "Towards A: 23:30; Towards B: 00:00."}. The question and answer can be in the form of text, strings, keyword arrays, etc., and can also include links, images, tables, and other data. Question-answer pairs can also contain other information, such as similar questions, related questions, tags, keywords, etc., but this embodiment does not limit this.

[0048] Each question-answer pair is constructed based on static information data. Users can pre-define parsing rules to parse the static information data and obtain the corresponding question-answer pairs. For example, if the static information data is in tabular form, with columns labeled "Question" and "Answer," and each row recording one question and its corresponding answer, the user can set the parsing rules to read each row of the table sequentially, using the content of column 1 as the question and the content of column 2 as the answer. After obtaining the parsing rules, the input table is parsed according to these rules to obtain multiple sets of question-answer pairs.

[0049] After obtaining multiple sets of question-answer pairs constructed from static information data, they are stored in the first knowledge base. The first knowledge base is a dataset used to store question-answer pairs. A relational database can be established as the first knowledge base. For example, a MySQL database DB1 can be created, and a data table QA can be created using SQL (Structured Query Language) statements to store the question-answer pairs. Table QA contains fields for id, question, and answer. Using SQL statements, each set of question-answer pairs is imported into table QA. For example, "What is the last departure time of the Z line?" is used as the question field, and "Towards A: 23:30; Towards B: 00:00." is used as the answer field, automatically assigning an identifier id. After the import is complete, the resulting database DB1 stores each set of question-answer pairs and supports querying via SQL statements.

[0050] After obtaining the user's question information, the first knowledge base is searched based on this information. The question information can be preprocessed to extract keywords, which can then be used for retrieval. For example, word segmentation tools such as jieba and HanLP can be used to divide the question information into multiple words or phrases. For instance, for the question "What is the departure time of the last bus on Route Z?", the segmentation results would be ["Route Z", "last bus", "of", "departure time", "is", "what"]. Based on user-defined filtering rules, meaningless function words and modifiers can be removed from the segmentation results, such as ["of", "is", "what"]. The remaining words or phrases after filtering are then used as keywords, such as ["Route Z", "last bus", "departure time"]. After obtaining the keywords, the first knowledge base is searched based on them. For example, in DB1, records where the question field contains "Route Z", "last bus", and "departure time" can be queried. If a record that meets the requirements exists in DB1, its question field will be used as the target question for matching, and the corresponding answer field will be the first target answer.

[0051] Of course, in addition to relational databases, other database structures such as document databases like Elasticsearch and graph databases like Neo4j can be used as the first knowledge base, or other forms such as knowledge graphs and vector indexes can be used to store each question-answer pair as the first knowledge base; in addition to keyword-based matching, other methods such as fuzzy matching based on edit distance and pattern matching through regular expressions can also be used to match question information with the target question, and this application embodiment does not limit this.

[0052] After retrieving a target question that matches the question information, the first target answer corresponding to the target question is output. For example, if the retrieved target question is "What is the departure time of the last train on line Z?", then the corresponding answer "Towards A: 23:30; Towards B: 00:00" is determined as the first target answer and output.

[0053] After obtaining the first target answer, it can be displayed to the user through methods such as showing it in a graphical user interface or broadcasting it via voice. Of course, other information, such as related questions, can also be displayed at the same time, but this embodiment of the application does not limit this.

[0054] Step 130: If no target question matching the question information is found, the question information is input into the question answering model to obtain the second target answer output by the question answering model based on the second knowledge base; the second knowledge base stores multiple knowledge vectors, each of which is constructed based on dynamic information data.

[0055] In this embodiment of the application, dynamic information data refers to data describing factual content that is updated frequently, such as data describing facilities around subway stations, arrival times, station passenger flow status, emergency announcements, etc., and can be in the form of text, tables, documents, slides, web pages, images, etc.

[0056] A knowledge vector is a vector composed of multiple numerical values ​​that describes the semantic information contained in dynamic information data. Knowledge vectors corresponding to semantically similar content are geometrically close in vector space. Each knowledge vector is constructed based on the dynamic information data. For example, for each file file(i) contained in the dynamic information data, the text content can be extracted using a document loader such as LlamaIndex. The extracted text content is then input into the text vectorization model M_t2v, and the vector v(i) output by M_t2v is used as the knowledge vector corresponding to file file(i). The text vectorization model is a machine learning model that learns the semantic, syntactic, or statistical features of text to transform text data into fixed-length low-dimensional vectors. Historical dynamic information data can be collected as training data to train a machine learning model with a BERT (Bidirectional Encoder Representations from Transformers) architecture as the text vectorization model M_t2v. Of course, other machine learning models with different architectures, such as Longformer, can also be used as M_t2v, or pre-trained general models such as BGE (BAAI General Embedding) and OpenAI text-embedding can be directly called. This application does not limit this.

[0057] After obtaining multiple knowledge vectors constructed from dynamic information data, they are stored in a second knowledge base. The second knowledge base is a dataset used to store these knowledge vectors. A relational database can be established as the second knowledge base. For example, a MySQL database DB2 can be created, and a data table KV can be created using SQL statements to store the knowledge vectors. Table KV contains fields id, vector, and file. Using SQL statements, the storage paths of each knowledge vector and its corresponding file are imported into table KV. After the import is complete, the resulting database DB2 stores the sets of knowledge vectors and supports queries via SQL statements.

[0058] Question answering models are machine learning models that analyze input question information and generate answers in natural language based on a second knowledge base. A large language model M_answer can be accessed through local deployment or by calling an API (Application Programming Interface) provided by a cloud service provider. This large language model can be trained using knowledge vectors and files stored in the second knowledge base, enabling it to answer input questions based on the second knowledge base. The trained large language model can be used as M_answer, and its output can be used as the second target answer.

[0059] Alternatively, the question information can be first input into a text vectorization model to extract the corresponding question vector v_question; then, the cosine similarity between each knowledge vector in the second knowledge base and the question vector v_question can be calculated sequentially, and the files corresponding to the K knowledge vectors with the highest cosine similarity are used as the answer basis, where the value of K can be preset by the user; based on the question information and each answer basis, a prompt is constructed according to a preset template, such as "Based on reference materials {file1}{file2}...{filek}, answer the question {question information}"; the prompt containing reference materials and question information is input into M_answer, and the output of M_answer is used as the second target answer.

[0060] After obtaining the second target answer, it can be displayed to the user through methods such as showing it in a graphical user interface or broadcasting it via voice. Of course, other information, such as related questions, can also be displayed at the same time, but this embodiment of the application does not limit this.

[0061] The intelligent question-answering method provided in this application constructs question-answer pairs based on static information data, enabling the first knowledge base to cover static information with low change frequency; constructs knowledge vectors based on dynamic information data, reducing the workload of manually extracting questions and writing answers, and improving the timeliness of information stored in the second knowledge base; by first retrieving the first knowledge base based on question information and outputting the corresponding answer, the need to call the question-answering model can be reduced, thereby improving the speed of question answering; and by having the question-answering model output the answer based on the second knowledge base when no matching target question is found, it can adapt to the personalized expression methods of different users, reducing the situation of being unable to answer or answering incorrectly, thereby improving the efficiency of question answering.

[0062] In some embodiments, the first knowledge base is constructed according to the following method: Acquire static information data; static information data is data whose update cycle is greater than or equal to the first target threshold. Based on the target question-and-answer template, static information data is parsed to obtain multiple sets of question-and-answer pairs and the knowledge categories corresponding to each question-and-answer pair. Based on knowledge categories, store question-answer pairs to build the first knowledge base.

[0063] In this embodiment, the update cycle refers to the time interval between two updates of static information data. The first target threshold is a numerical value describing the length of time, which can be preset by the user. For example, the first target threshold T1 can be set to 30 days, meaning that after each update of static information data, an update will only occur again after at least 30 days. Static information data can be obtained by receiving files uploaded to the cloud by the user, or by periodically reading content stored in a specified path.

[0064] After acquiring the static information data, it is parsed according to the target question-and-answer template. The target question-and-answer template describes the standard structure of question-and-answer pairs and knowledge categories, and can include question formats, answer formats, and a list of knowledge categories. It can be a configuration file, an automation script, or prompt words for the large language model. Knowledge categories describe the category to which the content of the question-and-answer pairs belongs, such as "ticketing services," "registration services," or "site information," and can be in the form of descriptive text or tags. Users can pre-define the knowledge category list, and during the parsing of the static information data, the obtained question-and-answer pairs are categorized into the known knowledge categories in the list. For example, if the target question-and-answer template is a prompt word in natural language, the extraction rules for question-and-answer pairs and the classification rules for knowledge categories can be defined in the prompt word. The output format is then limited according to the architecture of the first knowledge base. The prompt word and the static information data are input into the large language model, allowing the large language model to analyze the content of the static information data based on the prompt word and output the question-and-answer pairs and their corresponding knowledge categories in the specified format.

[0065] After parsing, each question-answer pair is stored according to the knowledge category. This can be done through physical grouping, assigning a dedicated storage area to each knowledge category (e.g., creating a dedicated database table or folder), storing each question-answer pair within the corresponding knowledge category's storage area. Alternatively, a logical grouping approach can be used, centrally storing each question-answer pair and using the knowledge category as an additional field for the question-answer pair; for example, storing all question-answer pairs in the same database table and using the knowledge category as a field in that table. A graph database storage structure can also be used, storing both knowledge categories and question-answer pairs as graph nodes, establishing relationships between nodes through edges of types such as "belongs to" and "associated with." Of course, other storage methods can also be used, and this embodiment does not limit this approach.

[0066] In this embodiment, by updating static information data at a period greater than or equal to the first target threshold, the workload of manual data entry can be reduced; by parsing static information data according to the target question-and-answer template, the possibility of manual entry errors can be reduced, and the format standardization of question-and-answer pairs can be improved; by parsing the knowledge categories corresponding to each set of question-and-answer pairs and storing each question-and-answer pair according to the knowledge categories, subsequent retrieval can be performed using the knowledge categories as indexes, thereby improving retrieval efficiency.

[0067] In some embodiments, retrieving a first knowledge base based on question information includes: Identify the target knowledge category to which the problem information belongs; Retrieve question-answer pairs stored under the target knowledge category in the first knowledge base; If no matching question is found under the target knowledge category, the first knowledge base will be searched globally.

[0068] In this embodiment, the target knowledge category to which the question information belongs is first identified, that is, the question information is classified into a predefined knowledge category based on its content. A rule-based classification method can be used, defining a series of keywords, phrases, or pattern matching rules for each knowledge category, and classifying according to the predefined rules. For example, the classification rule could be defined as "if the question information contains the words 'purchase tickets' or 'buy tickets,' then the target knowledge category is determined as 'ticket purchase business.'" Alternatively, a machine learning model can be used for identification. For example, multiple question information items labeled with knowledge categories can be collected as training data, and an SVM (Support Vector Machine) classifier can be trained as a classification model. The question information is then input into the trained classification model, and the output knowledge category is determined as the target knowledge category. Of course, other methods can also be used to identify the target knowledge category to which the question information belongs, such as clustering methods, etc., and this embodiment does not limit this approach.

[0069] After identifying the target knowledge category to which the question information belongs, the system retrieves question-answer pairs stored under that target knowledge category in the first knowledge base. If no matching question is found under the target knowledge category, the entire first knowledge base is searched. For example, the first knowledge base stores N question-answer pairs, which contain K knowledge categories. The i-th knowledge category stores... If a question and answer are correct, and the target knowledge category of the question information is "ticketing business," then first filter for questions and answers with the knowledge category "ticketing business." The search is performed on each question-answer pair, sequentially determining whether each question matches the question information; if no matching question is found, the search continues on the remaining pairs. Search within question-answer pairs.

[0070] In this embodiment, by identifying the target knowledge category to which the question information belongs, a search is first performed under the target knowledge category, and a global search is performed only if no match is found. This reduces the computational load of searching the first knowledge base and improves the search speed.

[0071] In some embodiments, the second knowledge base is constructed according to the following method: Acquire dynamic information data; dynamic information data is data whose update cycle is less than the second target threshold, and the second target threshold is less than the first target threshold. Dynamic information data is divided into multiple knowledge fragments; Feature extraction is performed on each knowledge segment to obtain the knowledge vector corresponding to each knowledge segment; Knowledge fragments are associated with and stored with their corresponding knowledge vectors to construct a second knowledge base.

[0072] In this embodiment, the second target threshold is a numerical value describing the length of time, which is smaller than the first target threshold. The user can preset the second target threshold based on the first target threshold. For example, if the first target threshold T1 = 30 days, the second target threshold T2 = 1 day can be set, and the dynamic information data will be updated at most every one day. Dynamic information data can be obtained by receiving user-uploaded data, periodically reading content stored in a specified path, etc.

[0073] After acquiring the dynamic information data, it is divided into multiple knowledge fragments. This division involves segmenting the complete original dynamic information data according to certain rules, resulting in multiple discrete local data points, each of which constitutes a knowledge fragment. Users can pre-define segmentation rules, and the data is segmented according to these rules; for example, each page of the dynamic information data file can be divided into a knowledge fragment.

[0074] After dividing the knowledge into multiple knowledge segments, feature extraction is performed on each segment to obtain the corresponding knowledge vector. Feature extraction is a data processing method that refers to the process of converting raw, high-dimensional data containing redundant information into low-dimensional data (features) that are more representative and discriminative, according to certain rules. In this embodiment, it involves analyzing the content of the knowledge segments and converting them into fixed-length low-dimensional vectors (knowledge vectors) according to certain rules. Historical knowledge segment data can be collected as training data to train a machine learning model M_f based on architectures such as BERT or Longformer, enabling it to analyze input knowledge segments and extract their feature vectors. Each knowledge segment is input into M_f, and the feature vector output by M_f is used as the corresponding knowledge vector for that knowledge segment. Of course, pre-trained general models such as BGE and OpenAI text-embedding can also be directly called as M_f; in addition to machine learning-based methods, traditional methods such as TF-IDF (Term Frequency-Inverse Document Frequency) vectorization and GloVe (Global Vectors for Word Representation) word vector averaging can also be used for feature extraction, and this application does not limit these methods.

[0075] Historical knowledge fragments can be collected as training data to train a machine learning model with architectures such as BERT or Longformer as a vector extraction model, or pre-trained general models such as BGE or OpenAI text-embedding can be directly called. This application does not limit this approach.

[0076] After obtaining the knowledge vector corresponding to the knowledge fragment, the knowledge fragment and its corresponding knowledge vector are associated and stored to construct a second knowledge base. When storing the knowledge vector, the file path pointing to the knowledge fragment's storage location can be stored simultaneously, for example, by adding a corresponding field to a database table or establishing a relationship between the knowledge vector data table and the knowledge fragment data table using primary and foreign keys. Of course, other methods can also be used to associate and store knowledge fragments and their corresponding knowledge vectors; this embodiment does not limit this approach.

[0077] In this embodiment, by updating dynamic information data at a period less than the second target threshold, the accuracy and timeliness of the second database content can be improved, reducing the possibility of incorrect answers due to outdated dynamic information data. By dividing dynamic information data into multiple knowledge fragments and then extracting the knowledge vectors corresponding to each knowledge fragment, the situation of semantic ambiguity and information dilution caused by long texts containing multiple topics can be reduced, thereby improving the accuracy of knowledge vectors. By associating and storing knowledge fragments with their corresponding knowledge vectors, it is convenient to call the question-answering model in the future, thereby improving the efficiency of question answering.

[0078] In some embodiments, dynamic information data is divided into multiple knowledge fragments, including: The dynamic information data is preprocessed, including at least one of text extraction, text cleaning, and text normalization. The preprocessed dynamic information data is divided into multiple knowledge segments according to the target segmentation rules; Alternatively, the target segment identifier and / or target segment length input by the user can be obtained, and the preprocessed dynamic information data can be divided to obtain multiple knowledge fragments.

[0079] In this embodiment of the application, preprocessing refers to a series of operations performed on the data before formally extracting vectors from dynamic information data and performing analysis, including at least one of text extraction, text cleaning, and text normalization.

[0080] Text extraction refers to the identification and extraction of plain text content from raw data in various formats such as documents, slides, and images. The format of the dynamic information data can be determined first, and a corresponding text extraction tool can be selected. For example, PyPDF2 can be used to extract text from PDF (Portable Document Format) documents, python-docx can be used to extract text from Word documents, and OCR (Optical Character Recognition) can be used to extract text from images. Alternatively, multi-format integration tools can be used to process dynamic information data of various formats uniformly, such as using Apache Tika or LlamaIndex document loaders to extract text. This application does not limit this approach.

[0081] Text cleaning refers to correcting and filtering text content according to certain rules, such as deleting special characters, removing extra spaces, correcting spelling errors, and filtering stop words. Users can pre-define text cleaning rules and write corresponding regular expressions for text cleaning; alternatively, they can use text cleaning tools such as HanLP and PyTorch-NLP for processing. This application does not limit this approach.

[0082] Text normalization refers to converting text into a uniform format, such as standardizing the expression of numbers, units, and dates, and standardizing character encoding and punctuation. Users can pre-define the target format and use tools such as the Unicode normalization library and textnorm for text normalization.

[0083] Of course, other preprocessing can be performed on dynamic information data, such as word segmentation, entity recognition and linking, detection and removal of duplicate information, etc., but this application embodiment does not limit this.

[0084] In this embodiment, by preprocessing the dynamic information data, the interference caused by noise and format differences in the dynamic information data can be reduced, thereby improving the quality of the dynamic information data.

[0085] After preprocessing, the preprocessed dynamic information data is divided into multiple knowledge fragments according to the target segmentation rules. The segmentation rules refer to the standards and algorithms followed in the process of segmenting the dynamic information data. These rules can include information such as the method for analyzing the input content, the conditions for triggering segmentation, the segmentation tools called, and parameters. They can be in the form of configuration files, code, etc. For example, the TextTiling algorithm can be used to calculate the lexical similarity between adjacent text blocks in the input content, and segmentation can be performed when the lexical similarity is lower than a preset threshold. A segmentation function implementing this process can be written as the target segmentation rule. After preprocessing, the segmentation function is called to process the preprocessed dynamic information data to obtain multiple knowledge fragments. Of course, other segmentation methods such as segmentation based on semantic coherence or segmentation based on keyword density can also be used, and corresponding segmentation rules can be set. This application embodiment does not limit this approach.

[0086] The user-defined segmentation rules can be used as the target segmentation rules. For example, the contents of the user-specified configuration file can be read directly and the corresponding function can be called to divide the preprocessed dynamic information data into multiple knowledge fragments.

[0087] Alternatively, the target segment identifier and / or target segment length input by the user can be obtained, and the preprocessed dynamic information data can be divided to obtain multiple knowledge fragments.

[0088] The target segment identifier is a symbol that identifies the segment position and can be a specific symbol, label, keyword, etc. The target segment identifier can be preset by the user. For example, "##" can be set as the target segment identifier. The preprocessed dynamic information data is read sequentially, the position of "##" is determined, and the content between two adjacent "##" is divided into a knowledge segment. For example, if the dynamic information data is ["##A site announcement: ……。##B site announcement: ……。##"], then the resulting knowledge segments would be ["A site announcement: ……。", "B site announcement: ……。"].

[0089] The target segment length is a numerical value describing the amount of text content contained in a knowledge segment, which can be measured in units such as the number of characters, words, or sentences. The target segment length can be preset by the user. For example, if the target segment length is set to "300 characters," then for dynamic information data of 800 characters in length, characters 1-300 are divided into knowledge segment 1, characters 301-600 into knowledge segment 2, and characters 601-800 into knowledge segment 3.

[0090] The system can obtain the content input by the user via the keyboard and use the obtained content as the target segment identifier or target segment length. Of course, the target segment identifier and target segment length input by the user can also be obtained in other ways, such as displaying multiple preset segment identifiers and preset segment lengths in the user's graphical interface, and using the preset segment identifier and preset segment length selected by the user by clicking the mouse, clicking the touch screen, etc., as the target segment identifier and target segment length, etc. This application embodiment does not limit this.

[0091] In this embodiment, by segmenting according to the target segmentation rules or the target segmentation identifier and / or target segmentation length input by the user, the segmentation method can be adjusted according to the actual situation and user needs, reducing the possibility of segmentation logic errors, thereby improving the semantic integrity and consistency of the content in each knowledge fragment.

[0092] In some embodiments, the intelligent question-answering method further includes: Identify whether the problem information contains a business processing request; If a business processing request is detected, the corresponding business instruction is retrieved from the business scenario instruction library. Execute business instructions.

[0093] In this embodiment, a business processing request refers to a specific requirement to perform a business processing operation, such as "purchase a ticket" or "register." Pattern matching can be used to identify whether the question information contains a business processing request. For example, the user can preset a keyword list; when the question information contains a preset keyword, it is determined that the question information contains a corresponding business processing request. For instance, if the question information contains "I want to buy a ticket," it is determined that it contains a "purchase a ticket" business processing request. Of course, other methods can also be used for identification, such as using machine learning models, which is not limited in this embodiment.

[0094] If a service request is identified, the corresponding service instruction is retrieved from the service scenario instruction library. A service instruction is a specific command that controls related devices to perform a service operation; it can be instruction encoding, a pre-encapsulated series of function calls, API calls, etc. The service scenario instruction library is a data set storing multiple sets of service requests and their corresponding service instructions; it can be a database. An exact match method can be used to retrieve target service requests that are identical to the identified service request, and the service instruction associated with the target service request will be used as the corresponding service instruction. For example, if the service request obtained from identifying the problem information is "purchase ticket," then the instruction corresponding to the "purchase ticket" service will be retrieved from the service scenario instruction library.

[0095] After retrieving the business instruction corresponding to the business processing request, the business instruction is executed, such as redirecting to the ticket purchase page or starting the registration process, so that the user can directly start processing the corresponding business.

[0096] In this embodiment, by identifying whether the problem information contains a business processing request, and automatically retrieving and executing the corresponding business instruction when a business processing request is identified, the work of users in finding the business processing location and starting the business processing process can be reduced, thereby improving service efficiency and enhancing user experience.

[0097] The following scenario example illustrates the intelligent question-answering method provided in this application's embodiments. For example... Figure 2 As shown in the example scenario, taking the Q&A session on subway-related information as an example, the user needs to check whether the trip plan is feasible. At the self-service ticketing terminal, the user inputs the question information by voice as "Can I catch the last train on line Z at transfer station Y?"

[0098] After obtaining the user's question information, the system identifies whether the question information contains a business processing request. If a business processing request is identified, the corresponding business instruction is retrieved from the business scenario instruction library and executed. If no business processing request is identified, the system identifies the target knowledge category to which the question information belongs and retrieves the question-answer pairs stored under the target knowledge category in the first knowledge base. If a matching target question is found, the corresponding first target answer is output. If no matching target question is found under the target knowledge category, the first knowledge base is searched globally. If no matching target question is still found, the question information is input into the question-answering model, and the model outputs a second target answer based on the knowledge vectors stored in the second knowledge base. For example, the second target answer output by the question-answering model might be: "The last train on line Z heading towards A departs at 23:30 and is expected to arrive at transfer station Y at 23:45. The current time is 23:40. You can catch the last train on line Z heading towards A at transfer station Y." After obtaining the second target answer, it is displayed on the user interface via a screen.

[0099] Users can continue to ask questions. For example, after learning that they can catch the last train, they can enter "I want to buy a ticket" via voice. After obtaining new question information, the system will continue to analyze whether it contains a business processing request. If it recognizes that it contains the business processing request "buy a ticket", it will retrieve the corresponding business instruction for "buy a ticket" from the business scenario instruction library and execute it, such as jumping to the ticket purchase page.

[0100] The intelligent question-answering method provided in this application can be executed by an intelligent question-answering device. This application uses an intelligent question-answering device executing the intelligent question-answering method as an example to illustrate the intelligent question-answering device provided in this application.

[0101] This application also provides an intelligent question-and-answer device.

[0102] like Figure 3 As shown, the intelligent question-and-answer device includes: Module 310 is used to obtain user problem information; The first question-and-answer module 320 is used to retrieve information from the first knowledge base based on the question information. The first knowledge base stores multiple question-and-answer pairs, each of which is constructed based on static information data. If a target question that matches the question information is found, the first target answer corresponding to the target question is output. The second question-answering module 330 is used to input the question information into the question-answering model if no target question matching the question information is found, and to obtain the second target answer output by the question-answering model based on the second knowledge base; the second knowledge base stores multiple knowledge vectors, each of which is constructed based on dynamic information data.

[0103] According to the intelligent question-answering device of this application, by constructing question-answer pairs based on static information data, the resulting first knowledge base can cover static information with low change frequency; by constructing knowledge vectors based on dynamic information data, the workload of manually extracting questions and writing answers can be reduced, and the timeliness of information stored in the second knowledge base can be improved; by first retrieving the first knowledge base based on question information and outputting the corresponding answer, the need to call the question-answering model can be reduced, thereby improving the speed of question answering; by having the question-answering model output the answer based on the second knowledge base when no matching target question is retrieved, it can adapt to the personalized expression style of different users, reduce the situation of being unable to answer or answering incorrectly, thereby improving the efficiency of question answering.

[0104] In some embodiments, the first question-answering module 320 is further configured to: construct a first knowledge base, including: Acquire static information data; static information data is data whose update cycle is greater than or equal to the first target threshold. Based on the target question-and-answer template, static information data is parsed to obtain multiple sets of question-and-answer pairs and the knowledge categories corresponding to each question-and-answer pair. Based on knowledge categories, store question-answer pairs to build the first knowledge base.

[0105] In some embodiments, the first question-answering module 320 is further configured to: retrieve information from a first knowledge base based on question information, including: Identify the target knowledge category to which the problem information belongs; Retrieve question-answer pairs stored under the target knowledge category in the first knowledge base; If no matching question is found under the target knowledge category, the first knowledge base will be searched globally.

[0106] In some embodiments, the second question-answering module 330 is further configured to: construct a second knowledge base, including: Acquire dynamic information data; dynamic information data is data whose update cycle is less than the second target threshold, and the second target threshold is less than the first target threshold. Dynamic information data is divided into multiple knowledge fragments; Feature extraction is performed on each knowledge segment to obtain the knowledge vector corresponding to each knowledge segment; Knowledge fragments are associated with and stored with their corresponding knowledge vectors to construct a second knowledge base.

[0107] In some embodiments, the second question-answering module 330 is further configured to: divide dynamic information data into multiple knowledge fragments, including: The dynamic information data is preprocessed, including at least one of text extraction, text cleaning, and text normalization. The preprocessed dynamic information data is divided according to the target segmentation rules to obtain multiple knowledge fragments; Alternatively, the target segment identifier and / or target segment length input by the user can be obtained, and the preprocessed dynamic information data can be divided to obtain multiple knowledge fragments.

[0108] In some embodiments, the second question-answering module 330 is further configured to: Identify whether the problem information contains a business processing request; If a business processing request is detected, the corresponding business instruction is retrieved from the business scenario instruction library. Execute business instructions.

[0109] The intelligent question-answering device in this application embodiment can be an electronic device or a component within an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other devices besides a terminal. For example, the electronic device can be a mobile phone, tablet computer, laptop computer, PDA, in-vehicle electronic device, mobile internet device (MID), augmented reality (AR) / virtual reality (VR) device, robot, wearable device, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc. It can also be a server, network attached storage (NAS), personal computer (PC), television (TV), ATM, or self-service machine, etc. This application embodiment does not specifically limit the specific type of device.

[0110] The intelligent question-answering device in this application embodiment can be a device with an operating system. This operating system can be a Microsoft (Windows) operating system, an Android operating system, an iOS operating system, or other possible operating systems; this application embodiment does not specifically limit the specific operating system.

[0111] In some embodiments, such as Figure 4 As shown, this application embodiment also provides an electronic device 400, including a processor 401, a memory 402, and a computer program stored in the memory 402 and executable on the processor 401. When the program is executed by the processor 401, it implements the various processes of the above-described intelligent question-answering method embodiment and can achieve the same technical effect. To avoid repetition, it will not be described again here.

[0112] It should be noted that the electronic devices in the embodiments of this application include the aforementioned mobile electronic devices and non-mobile electronic devices.

[0113] This application also provides a non-transitory computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the various processes of the above-described intelligent question-answering method embodiments and achieves the same technical effect. To avoid repetition, it will not be described again here.

[0114] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.

[0115] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described intelligent question-answering method.

[0116] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.

[0117] In some embodiments, this application also provides a subway intelligent inquiry terminal, including a display screen and a controller. The controller is used to execute the various processes of the above-described intelligent question-and-answer method embodiments and can achieve the same technical effect. To avoid repetition, it will not be described again here.

[0118] This application also provides a chip, which includes a processor and a communication interface. The communication interface and the processor are coupled. The processor is used to run programs or instructions to implement the various processes of the above-described intelligent question-answering method embodiments and achieve the same technical effect. To avoid repetition, it will not be described again here.

[0119] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.

[0120] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.

[0121] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0122] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.

[0123] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "illustrative embodiment," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0124] Although embodiments of this application have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of this application, the scope of which is defined by the claims and their equivalents.

Claims

1. An intelligent question-answering method, characterized in that, include: Obtain user problem information; Based on the question information, retrieve the first knowledge base; The first knowledge base stores multiple sets of question-answer pairs, each of which is constructed based on static information data; If a target question matching the aforementioned question information is found, the first target answer corresponding to the target question is output. If no target question matching the question information is found, the question information is input into the question answering model to obtain the second target answer output by the question answering model based on the second knowledge base; the second knowledge base stores multiple knowledge vectors, each of which is constructed based on dynamic information data.

2. The method according to claim 1, characterized in that, The first knowledge base was constructed using the following method: Acquire static information data; the static information data is data whose update period is greater than or equal to a first target threshold. Based on the target question-and-answer template, the static information data is parsed to obtain multiple sets of question-and-answer pairs and the knowledge categories corresponding to each question-and-answer pair; Based on the knowledge categories, store each of the question-answer pairs to construct the first knowledge base.

3. The method according to claim 2, characterized in that, The step of retrieving the first knowledge base based on the question information includes: Identify the target knowledge category to which the problem information belongs; Retrieve question-answer pairs stored under the target knowledge category in the first knowledge base; If no target question matching the question information is found under the target knowledge category, then the first knowledge base is searched globally.

4. The method according to claim 1, characterized in that, The second knowledge base was constructed using the following method: Acquire dynamic information data; the dynamic information data is data whose update cycle is less than a second target threshold, and the second target threshold is less than a first target threshold. The dynamic information data is divided into multiple knowledge segments; Feature extraction is performed on each of the knowledge segments to obtain the knowledge vector corresponding to each knowledge segment; The knowledge fragments are associated with and stored with the corresponding knowledge vectors to construct the second knowledge base.

5. The method according to claim 4, characterized in that, The process of dividing the dynamic information data into multiple knowledge fragments includes: The dynamic information data is preprocessed, and the preprocessing includes at least one of text extraction, text cleaning, and text normalization; The preprocessed dynamic information data is divided according to the target segmentation rules to obtain multiple knowledge fragments; Alternatively, the target segment identifier and / or target segment length input by the user can be obtained, and the preprocessed dynamic information data can be divided to obtain multiple knowledge fragments.

6. The method according to claim 1, characterized in that, include: Identify whether the problem information contains a business processing request; If a business processing request is detected, the corresponding business instruction is retrieved from the business scenario instruction library; Execute the aforementioned business instructions.

7. An intelligent question-and-answer device, characterized in that, include: The acquisition module is used to obtain the user's problem information; The first question-and-answer module is used to retrieve information from the first knowledge base based on the question information. The first knowledge base stores multiple sets of question-answer pairs, each of which is constructed based on static information data; If a target question matching the aforementioned question information is found, the first target answer corresponding to the target question is output. The second question-answering module is used to input the question information into the question-answering model if no target question matching the question information is found, and to obtain the second target answer output by the question-answering model based on the second knowledge base; the second knowledge base stores multiple knowledge vectors, each of which is constructed based on dynamic information data.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the intelligent question-answering method as described in any one of claims 1-6.

9. A smart inquiry terminal for subways, characterized in that, It includes a display screen and a controller; the controller is used to perform the intelligent question-answering method as described in any one of claims 1-6.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the intelligent question-answering method as described in any one of claims 1-6.