Question and answer method and device, medium and product
By providing question-and-answer methods in the enterprise intelligent assistant, identifying the intent type of question and querying the corresponding database, the problem of insufficient real-time data processing capabilities of general enterprise intelligent assistants is solved, and fast and accurate answer output and more efficient application performance are achieved.
Patent Information
- Application Number
- CN202411678985.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-21
- Publication Date
- 2025-03-07
AI Technical Summary
General-purpose enterprise intelligent assistants lack the ability to process and analyze real-time data, resulting in limitations in practical applications.
Provide a question-and-answer method, by receiving questions, identifying the intent type of the question, calling the corresponding answer template, querying the answer from the database corresponding to the intent type, and outputting the answer. The method also includes calling the operating entity's private database to obtain private data when the problem is related to the operating entity, and creating multiple categories of databases based on the categories of private data and public data.
It realizes the rapid and accurate output of question answers, and can query the corresponding database according to the intent type, meets the processing and analysis needs of real-time data, and improves the application efficiency of enterprise intelligent assistants.
Smart Images

Figure CN119577091A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of intelligent question-answering technology, and in particular to a question-answering method, device, medium and product. Background Art
[0002] With the development of artificial intelligence (AI) technology, AI technology continues to optimize user experience. Among them, AI technology represented by smart assistants can handle complex tasks according to user needs through intelligent data analysis and machine algorithm learning.
[0003] Smart assistants for enterprises usually obtain enterprise-related data from enterprises and perform machine algorithm learning based on enterprise-related data and historical data from the Internet. Enterprise smart assistants can perform data analysis based on static data such as enterprise-related data and historical data to respond to user needs.
[0004] However, general enterprise intelligent assistants lack the ability to process and analyze real-time data. Therefore, general enterprise intelligent assistants have limitations in practical applications. Summary of the invention
[0005] The embodiments of the present disclosure provide a question-answering method, device, medium, and product, which are intended to address the limitations of general enterprise intelligent assistants in practical applications.
[0006] In order to achieve the above purpose, this application adopts the following technical solutions:
[0007] First, a question-answering method is provided, including: receiving a question and identifying the question intent; determining the intent type of the question intent; calling an answer template corresponding to the intent type, querying the answer to the question from a database of the category corresponding to the intent type, and outputting the answer.
[0008] Optionally, when the question is related to the operating entity, the question-and-answer method also includes: calling the operating entity's private database to obtain the operating entity's private data, and obtaining public data of the industry to which the operating entity belongs; creating multiple categories of databases based on the categories of private data and public data; the categories include at least one of the following: dialogue category, concept category, and indicator category.
[0009] Optionally, when the categories include indicator classes, multiple categories of databases are created according to the categories of private data and public data, including: obtaining the original data corresponding to the private data and the original data corresponding to the public data; processing the original data corresponding to the private data and the original data corresponding to the public data into indicator class data, and creating an indicator class database based on the indicator class data.
[0010] Optionally, the question-answering method further includes: when the question is in voice form, converting the voice question into a text question.
[0011] Optionally, call the answer template corresponding to the intent type, query the answer to the question from the database of the category corresponding to the intent type, and output the answer, including: querying the target data corresponding to the question from the database corresponding to the intent type; filling the target data into the answer template corresponding to the intent type to determine the answer to the question.
[0012] Optionally, querying target data corresponding to the question from a database corresponding to the intent type, including: determining key information in the text form of the question; the key information includes at least one of the following: time, region, indicator category; based on the key information, querying target indicator data from the indicator database; the degree of correlation between the target indicator data and the key information is greater than a preset degree of correlation.
[0013] Optionally, the intent type includes: indicator data query class, the target data includes: first indicator data; the first indicator data is used to calculate the answer; filling the target data into the answer template corresponding to the intent type to determine the answer to the question, including: filling the first indicator data into the answer template corresponding to the indicator query class to determine the answer to the question.
[0014] Optionally, the intent type includes: indicator data prediction class, the target data includes: second indicator data; the second indicator data is used to predict the answer; the target data is filled into the answer template corresponding to the intent type to determine the answer to the question, including: determining the indicator prediction result based on the second indicator data; the indicator prediction result is filled into the answer template corresponding to the indicator prediction class to determine the answer to the question.
[0015] Optionally, the target data includes: a preset answer, and querying the target data corresponding to the question from the database corresponding to the intent type, including: querying the preset question from the database corresponding to the intent type based on the question in text form; the similarity between the question in text form and the preset question is greater than the preset similarity; querying the preset answer corresponding to the preset question from the database corresponding to the intent type.
[0016] Optionally, the intent type includes: dialogue type or concept query type, filling the target data into the answer template corresponding to the intent type to determine the answer to the question, including: filling the preset answer into the answer template corresponding to the intent type to determine the answer to the question.
[0017] Optionally, outputting the answer includes: when the answer to the question is in text form, converting the text answer into a voice answer and broadcasting the voice answer; or, when the answer to the question is in chart form, outputting the chart answer.
[0018] On the second aspect, a question-and-answer device is provided, which includes: a communication unit and a processing unit; the communication unit is used to receive questions and identify the question intent of the question; the processing unit is used to determine the intent type of the question intent; the processing unit is also used to call an answer template corresponding to the intent type, query the answer to the question from a database of categories corresponding to the intent type, and output the answer.
[0019] Optionally, when the question is related to the operating entity, the communication unit is also used to call the operating entity's private database to obtain the operating entity's private data, and obtain public data of the industry to which the operating entity belongs; the processing unit is also used to create multiple categories of databases based on the categories of private data and public data; the categories include at least one of the following: dialogue category, concept category, and indicator category.
[0020] Optionally, when the category includes an indicator class, the processing unit is specifically used to: obtain the original data corresponding to the private data and the original data corresponding to the public data; process the original data corresponding to the private data and the original data corresponding to the public data into indicator class data, and create an indicator class database based on the indicator class data.
[0021] Optionally, the processing unit is further configured to convert the voice-form question into a text-form question when the question is in voice-form.
[0022] Optionally, the processing unit is specifically used to: query target data corresponding to the question from a database corresponding to the intent type; fill the target data into an answer template corresponding to the intent type to determine the answer to the question.
[0023] Optionally, the processing unit is specifically used to: determine key information in the text-based question; the key information includes at least one of the following: time, region, indicator category; based on the key information, query target indicator data from the indicator database; the degree of correlation between the target indicator data and the key information is greater than a preset degree of correlation.
[0024] Optionally, the intent type includes: indicator data query class, the target data includes: first indicator data; the first indicator data is used to calculate the answer; the processing unit is specifically used to: fill the first indicator data into the answer template corresponding to the indicator query class to determine the answer to the question.
[0025] Optionally, the intention type includes: indicator data prediction class, the target data includes: second indicator data; the second indicator data is used to predict the answer; the processing unit is specifically used to: determine the indicator prediction result based on the second indicator data; fill the indicator prediction result into the answer template corresponding to the indicator prediction class to determine the answer to the question.
[0026] Optionally, the target data includes: preset answers, and a processing unit specifically used to: query the preset question from a database corresponding to the intent type based on the question in text form; the similarity between the question in text form and the preset question is greater than a preset similarity; query the preset answer corresponding to the preset question from the database corresponding to the intent type.
[0027] Optionally, the intent type includes: a dialogue type or a concept query type, and the processing unit is specifically used to: fill a preset answer into an answer template corresponding to the intent type to determine the answer to the question.
[0028] Optionally, the processing unit is specifically used to: when the answer to the question is in text form, convert the text answer into a voice answer and broadcast the voice answer; or, when the answer to the question is in chart form, output the chart answer.
[0029] In a third aspect, a question-and-answer device is provided, comprising a memory and a processor; the memory is used to store computer-executable instructions, and the processor and the memory are connected via a bus; when the question-and-answer device is running, the processor executes the computer-executable instructions stored in the memory, so that the question-and-answer device performs the question-and-answer method of the first aspect.
[0030] The question-and-answer device may be an electronic device or a part of an electronic device, such as a chip system in an electronic device. The chip system is used to support the electronic device to implement the functions involved in the first aspect and any possible implementation thereof, for example, to obtain and determine the data and / or information involved in the above-mentioned question-and-answer method. The chip system includes a chip and may also include other discrete devices or circuit structures.
[0031] In a fourth aspect, a computer-readable storage medium is provided, the computer-readable storage medium comprising computer execution instructions, and when the computer execution instructions are executed on a computer, the computer executes the question-answering method described in the first aspect.
[0032] In a fifth aspect, a computer program product is also provided. The computer program product includes a computer program or instructions. When the computer instructions are executed on the question-and-answer device, the question-and-answer device executes the question-and-answer method as described in the first aspect above.
[0033] It should be noted that the above computer instructions may be stored in whole or in part on a computer-readable storage medium, wherein the computer-readable storage medium may be packaged together with the processor of the question-answering device, or may be packaged separately from the processor of the question-answering device, which is not limited in the embodiments of the present application.
[0034] The description of the second, third, fourth and fifth aspects of the present application can refer to the detailed description of the first aspect.
[0035] In the embodiments of the present application, the name of the question-and-answer device does not limit the device or functional module itself. In actual implementation, these devices or functional modules may appear with other names. For example, the receiving unit may also be called a receiving module, a receiver, etc. As long as the functions of each device or functional module are similar to those of the present application, they fall within the scope of the claims of the present application and their equivalent technologies.
[0036] The technical solution provided by this application brings at least the following beneficial effects:
[0037] Based on any of the above aspects, an embodiment of the present application provides a question-answering method, first, receiving a question and identifying the question intent of the question. Then, determining the intent type of the question intent. Next, calling an answer template corresponding to the intent type, querying the answer to the question from a database of categories corresponding to the intent type, and outputting the answer.
[0038] As can be seen from the above, this application can identify the question intent of the question and determine the intent type of the question intent, so as to call the answer template corresponding to the intent type and query the answer to the question from the database corresponding to the intent type. In this way, this application can query the database corresponding to the intent type according to the intent type, and can quickly and accurately output the answer to the question.
[0039] The beneficial effects of the first, second, third, fourth and fifth aspects of the present application can all be referred to the analysis of the above beneficial effects, which will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 A schematic diagram of the structure of a question-answering system provided in an embodiment of the present application;
[0041] Figure 2 A structural diagram of another question-answering system provided in an embodiment of the present application;
[0042] Figure 3 A schematic diagram of a hardware structure of a communication device provided in an embodiment of the present application;
[0043] Figure 4 A flowchart of a question-and-answer method provided in an embodiment of the present application;
[0044] Figure 5 A flowchart of another question-and-answer method provided in an embodiment of the present application;
[0045] Figure 6 A flowchart of another question-and-answer method provided in an embodiment of the present application;
[0046] Figure 7 A flowchart of another question-and-answer method provided in an embodiment of the present application;
[0047] Figure 8 A flowchart of another question-and-answer method provided in an embodiment of the present application;
[0048] Fig. 9 A flowchart of another question-and-answer method provided in an embodiment of the present application;
[0049] Fig.10 A flowchart of another question-and-answer method provided in an embodiment of the present application;
[0050] Fig.11 A flowchart of another question-and-answer method provided in an embodiment of the present application;
[0051] Fig.12 A flowchart of another question-and-answer method provided in an embodiment of the present application;
[0052] Fig.13 A flowchart of another question-and-answer method provided in an embodiment of the present application;
[0053] Fig.14 A flowchart of another question-and-answer method provided in an embodiment of the present application;
[0054] Fig.15 A schematic diagram of the structure of a question-and-answer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0055] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0056] It should be noted that, in the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0057] In order to facilitate a clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as "first" and "second" are used to distinguish between identical or similar items with substantially the same functions and effects. Those skilled in the art can understand that words such as "first" and "second" do not limit the quantity and order of execution.
[0058] Before introducing the question-and-answer method provided by this application in detail, a brief introduction to the application scenarios and implementation environment involved in this application is first given.
[0059] First, a brief introduction to the application scenarios involved in this application is given.
[0060] As described in the background technology, with the development of AI technology, AI-related technologies and products involve multiple fields. For example, voice assistants, recommendation systems, automation tools in smartphones, and intelligent customer service systems (also known as question-and-answer systems) in enterprises. Through intelligent data analysis and machine learning algorithms, the above products can understand natural language to help users handle complex tasks (including data analysis, personalized recommendations, decision support, customer service, etc.) in multiple fields (including medical, financial, and education) to optimize the user experience.
[0061] As can be seen from the above, the intelligent assistants for enterprises usually obtain enterprise-related data from the enterprise and learn machine algorithms based on enterprise-related data and historical data from the Internet. Enterprise intelligent assistants can perform data analysis based on static data such as enterprise-related data and historical data to respond to user needs.
[0062] However, in actual applications, data changes in real time. Real-time data can reflect the latest dynamics, environmental changes and user needs. General-purpose enterprise intelligent assistants lack deep integration of enterprise data, lack the ability to process and analyze real-time data, and cannot adapt to the rapidly changing environment and user needs in a timely manner. Therefore, general-purpose enterprise intelligent assistants have limitations in actual applications.
[0063] In response to the above problems, an embodiment of the present application provides a question-answering method. First, a question is received and the question intent is identified. Then, the intent type of the question intent is determined. Next, an answer template corresponding to the intent type is called, the answer to the question is queried from a database of categories corresponding to the intent type, and the answer is output.
[0064] As can be seen from the above, this application can identify the question intent of the question and determine the intent type of the question intent, so as to call the answer template corresponding to the intent type and query the answer to the question from the database corresponding to the intent type. In this way, this application can query the database corresponding to the intent type according to the intent type, and can quickly and accurately output the answer to the question.
[0065] The implementation environment of the above question-and-answer method may be the question-and-answer system provided in the embodiment of the present application.
[0066] Figure 1 FIG. 1 shows a schematic diagram of the structure of a question-answering system provided in an embodiment of the present application. Figure 1As shown, the question-answering system includes: an interactive device 101, a question-answering device 102, a data storage device 103 and a communication device 104 which are connected in sequence.
[0067] The interactive device 101 is used to realize the interaction between the user and the question-answering system.
[0068] Specifically, the user inputs a question based on the interactive device 101. The interactive device 101 is also used to output and display the answer.
[0069] The answers include: answers in voice form and answers in chart form.
[0070] Charts include: bar chart, line chart and pie chart.
[0071] Optionally, the intercommunication device 101 also supports downloading and exporting of charts.
[0072] The question-answering device 102 is used to determine answers based on user questions.
[0073] The question-and-answer device 102 includes a variety of AI models. The user device can identify question graphs based on the AI models and query answers to questions from the data storage device 103 .
[0074] In an embodiment of the present application, the data storage device 103 is used to provide data for determining an answer (e.g., an answer template, indicator data, concept data, dialogue data) to the question and answer device 102, so that the question and answer device 102 determines the answer based on the data sent by the data storage device 103.
[0075] The communication device 104 is used to communicate with the private database of the operating entity to obtain the private data of the operating entity. The communication device 104 is also used to obtain the public data of the industry to which the operating entity belongs. The private data and public data are classified and stored in the data storage device 103.
[0076] Optionally, the interactive device 101, the question-and-answer device 102, the data storage device 103 and the communication device 104 may be a server, a terminal, or other types of electronic devices, which is not limited in the embodiments of the present application.
[0077] Optionally, the terminal may be a device that provides voice and / or data connectivity to a user, a handheld device with wireless connection function, or other processing device connected to a wireless modem. The wireless terminal may communicate with one or more core networks via a radio access network (RAN). The wireless terminal may be a mobile terminal, such as a mobile phone (or "cellular" phone) and a computer with a mobile terminal, or a portable, pocket-sized, handheld, computer-built-in or vehicle-mounted mobile device that exchanges language and / or data with a radio access network, such as a mobile phone, tablet computer, laptop computer, netbook, personal digital assistant (PDA).
[0078] Optionally, the above-mentioned server can be a server in a server cluster (consisting of multiple servers), or a chip in the server, or a system on a chip in the server, or can be implemented by a virtual machine (VM) deployed on a physical machine, which is not limited in the embodiments of the present application.
[0079] In some embodiments, the question-answering system may be divided into different layers according to its functions, and each device may exist in a layered form. Figure 2 A structural diagram of another question-answering system is shown.
[0080] In one achievable manner, the interactive device 101 may exist in the form of a front-end interface layer (also referred to as an interface display layer), the question-and-answer device 102 may exist in the form of an AI capability layer (also referred to as a core capability layer), the data storage device 103 may exist in the form of a data layer, and the communication device 104 may exist in the form of an indicator configuration layer (also referred to as an indicator configuration platform).
[0081] The front-end interface layer includes: a three-dimensional (3D) digital human module and a dialog module.
[0082] Both the 3D digital human module and the dialog module can support the input of voice questions and the output of voice answers.
[0083] Optionally, the 3D digital human module can announce and display the answer.
[0084] The 3D digital human module uses the front-end 3D framework Three.js, and through 3D modeling and animation technology, it displays answers (also known as information) in a vivid and interactive way to enhance the user's visual experience and make the information transmission more interesting and attractive.
[0085] Optionally, the front-end interface layer can provide intuitive answer display based on the model template.
[0086] In some embodiments, the front-end interface layer uses an Electron framework combined with front-end page technology, so that the front-end interface layer has higher stability and compatibility.
[0087] Because the Electron framework can run across platforms, the question-answering system can be applied on multiple operating systems (e.g., Windows, macOS, Linux) and can provide a consistent user experience.
[0088] In some embodiments, the front-end page portion can be developed using a modern front-end framework (e.g., React, Vue.js) so that the front-end interface has higher flexibility and responsiveness.
[0089] In the question-answering system, the AI capability layer includes: Chat Generative Language Model (chatGLM), Bidirectional Encoder Representations from Transformers (BERT) model, Fun Automatic Speech Recognition (FunASR) model, Word-level Interactive Speech-to-Text Processing and Recognition (Wisper) model, similarity calculation module, and time series prediction module.
[0090] Among them, chatGLM is a natural language processing model based on GLM technology. chatGLM has strong language understanding capabilities and can generate natural and fluent responses based on the context. Specific functions include: intelligent dialogue, text generation, knowledge question and answer, sentiment analysis, and language translation.
[0091] Specifically, the chatGLM of the present application may be the third-generation generative language model chatGLM3.
[0092] The BERT model is a pre-trained language model based on the Transformer architecture. The BRRT model understands the context and semantic relationships of language and recognizes intent.
[0093] The FunASR model is an industrial-level model that integrates speech endpoint detection, speech recognition, punctuation and sentence segmentation. The FunASR model can be used to convert audio into text.
[0094] The Wisper model is a speech-to-text model. The Wisper model can be used to convert audio into text.
[0095] The similarity calculation module determines the similarity between the user question and the text in the database to determine the data related to the user question.
[0096] Specifically, the similarity calculation module includes: a word to vector (Word to Vector, Word2Vec) model.
[0097] The Word2Vec model is a natural language processing model based on neural networks. The Word2Vec model can represent words in vector form.
[0098] The time series prediction module is used to call the time series prediction algorithm and analyze the prediction indicator data.
[0099] Optionally, the AI capability layer also includes: Chat Text-To-Speech (chatTTS) model.
[0100] The chatTTS model is a text-to-speech model. The chatTTS model is used to convert text information into speech in a chat scenario.
[0101] In an embodiment of the present application, the question-answering system can convert voice questions into text questions based on the Wisper model and the FunASR model in the AI service layer.
[0102] Specifically, the Wisper model is used to recognize offline speech (i.e. speech that no longer changes) and convert it into text information. The FunASR model is used to recognize streaming speech (i.e. speech that is updated in real time) and convert it into text information.
[0103] In this way, the question-answering system can improve its ability to process various voice inputs, and ensure the accuracy and reliability of voice recognition in both offline and online real-time communication environments.
[0104] In an embodiment of the present application, the question-answering system can realize text information, intent recognition and similarity calculation of text information based on chatGLM3, BERT model, and Word2Vec model in the AI service layer.
[0105] In this way, the question-answering system can improve its understanding of user questions.
[0106] In an embodiment of the present application, the user question and answer system can also predict future data and identify potential anomalies and trends based on the time series prediction algorithm of the time series prediction module.
[0107] In this way, the question-answering system can provide users with forward-looking decision support and improve the accuracy and effectiveness of business forecasts.
[0108] Optionally, the question-answering system can implement text matching and data prediction based on the cosine similarity calculation algorithm of the similarity calculation module and the time series prediction algorithm of the time series prediction module to provide more intelligent services.
[0109] In an embodiment of the present application, the question-answering system can convert the text-based answers into natural, fluent and vivid voices based on the chatTTS model and broadcast them.
[0110] Optionally, the question-answering system can also adjust the voice style according to user needs.
[0111] In this way, the question-and-answer system can improve the naturalness and expressiveness of voice broadcasts, enhance the user's interactive experience, and make information delivery more vivid and engaging.
[0112] As can be seen above, the AI service layer integrates a variety of AI models and algorithms (involving natural language processing (NLP) and speech recognition). Among them, ChatGLM, BERT model and Word2Vec model have strong performance and stability. Whisper model and FunASR model can provide high-precision offline speech and streaming speech recognition functions. ChatTTS model can generate natural and fluent speech. The time series prediction module can provide forward-looking decision support.
[0113] In this way, the AI service layer can improve the depth and breadth of data processing through dynamic analysis of indicator data (including: trends and categories of indicator data), and provide users with intuitive analysis results. The AI service layer can also combine industry information and related documents in conceptual databases with analysis results to provide reasonable suggestions. Enhance the application scenarios of data analysis so that the analysis results are closer to actual business needs and assist users in making decisions. Therefore, the question-and-answer device can efficiently provide accurate, effective, and reliable answers based on the AI service layer, and promote the intelligent development of the business of the operating entity.
[0114] In the question-answering system, the data layer includes: indicator database (also called indicator database) and concept database (also called knowledge base).
[0115] The indicator database is used to store indicator data, for example, the operation-related data of the operating entity (which can be an enterprise).
[0116] Concept databases are used to store conceptual data, such as internal documents and materials of business entities.
[0117] In some embodiments, the data layer further includes: a conversation database. The conversation database is used to store conversation data.
[0118] In some embodiments, the indicator database may use MyStructured Query Language version 5.7 (MySQL 5.7) or a relational cloud database. The above database has strong data processing capabilities and scalability, and can support large-scale data storage and efficient query.
[0119] In some embodiments, the concept database may store internal enterprise files and industry data via a File Transfer Protocol (FTP) server.
[0120] Optionally, conceptual databases can also introduce more secure storage solutions, such as private clouds and encrypted storage, to meet modern security requirements.
[0121] The indicator configuration layer includes: direct database connection module, interface call module, data receiving module, static file processing module, data arrangement module, and indicator management module.
[0122] The direct database connection module is used to directly connect to a private database (also called an internal database of an enterprise) and actively obtain private data of the private database.
[0123] In one achievable manner, the indicator configuration layer can execute database query statements based on the direct database module to obtain private data in the private database.
[0124] The interface calling module is used to call the private data in the private database and actively obtain the private data.
[0125] In one achievable manner, the indicator configuration layer can call the module based on the interface, call the interface, and obtain private data from the private database.
[0126] Optionally, the indicator configuration layer may periodically obtain private data from a private database, or periodically call an interface of another platform to obtain private data from a private database.
[0127] The data receiving module is used to directly connect to the private database and passively receive the private data sent by the private database.
[0128] In one practicable manner, the indicator configuration layer may receive the private data in the private database through a data receiving module.
[0129] Optionally, the indicator configuration layer can process the edited data and store it in the data layer.
[0130] The static file processing module is used to process the data in the static file (for example, the data stored in the table) and convert the data in the static file into indicator data.
[0131] The data arrangement module is used to convert the acquired data (including private data and public data) into unified indicator data and store it in the data layer.
[0132] The indicator management module is used to manage indicator data in the indicator database (including: adding, deleting, modifying, and checking) to achieve efficient storage and management of data.
[0133] In one possible implementation, the indicator configuration layer uses the view layer framework (Vue), the quick start elastic (Spring) framework application building framework (Spring Boot), and MySQL technology to convert the data into indicator data. In this way, confusing answers due to different data formats can be avoided. The indicator configuration layer can be based on the data orchestration module and divided by time zone to orchestrate related data together. In this way, the data management of the data layer is more structured and can support complex data operations and query requirements.
[0134] As can be seen above, the indicator configuration layer can update data in real time to quickly adapt to data changes to ensure the real-time nature of query answers. The indicator configuration layer has efficient data processing capabilities (including: data induction, calculation, and processing), and can standardize various types of data into clearly formatted and structured indicator data to enhance data readability and consistency.
[0135] As can be seen above, the question-answering system integrates a variety of advanced technologies, including text analysis, speech recognition, speech synthesis, data management, and 3D modeling. Based on the above technologies, the question-answering system can improve the functionality of the system and enhance the synergy of each module, thereby providing more intelligent, efficient, and vivid data processing and display capabilities.
[0136] The question-answering devices in the question-answering system include: Figure 3 The following are the components included. Figure 3 Taking the communication device shown in the figure as an example, the hardware structure of the question-answering device is introduced.
[0137] Figure 3, which is a schematic diagram of a hardware structure of a communication device provided in an embodiment of the present application. The communication device includes a processor 31, a memory 32, a communication interface 33, and a bus 34. The processor 31, the memory 32, and the communication interface 33 can be connected via a bus 34.
[0138] The processor 31 is the control center of the communication device, which can be a processor or a general term for multiple processing elements. For example, the processor 31 can be a general-purpose central processing unit (CPU) or other general-purpose processors. Among them, the general-purpose processor can be a microprocessor or any conventional processor.
[0139] As an embodiment, the processor 31 may include one or more CPUs, such as Figure 3 CPU0 and CPU1 are shown in the figure.
[0140] The memory 32 may be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (RAM) or other type of dynamic storage device that can store information and instructions, an electrically erasable programmable read-only memory (EEPROM), a disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto.
[0141] In a possible implementation, the memory 32 may exist independently of the processor 31, and the memory 32 may be connected to the processor 31 via a bus 34 for storing instructions or program codes. When the processor 31 calls and executes the instructions or program codes stored in the memory 32, the question-and-answer method provided in the following embodiments of the present application can be implemented.
[0142] In the embodiment of the present application, for the communication device, the software programs stored in the memory 32 are different, so the functions implemented by the communication device are different. The functions performed by each device will be described in conjunction with the following flowchart.
[0143] In another possible implementation, the memory 32 may also be integrated with the processor 31 .
[0144] The communication interface 33 is used for the communication device to connect with other devices through a communication network, and the communication network may be Ethernet, wireless access network, wireless local area network (WLAN), etc. The communication interface 33 may include a receiving unit for receiving data and a sending unit for sending data.
[0145] The bus 34 may be an industry standard architecture (ISA) bus, a peripheral component interconnect (PCI) bus, or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 3 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0146] It should be pointed out that Figure 3 The structure shown in the figure does not constitute a limitation on the communication device, except Figure 3 In addition to the components shown, the communication device may include more or fewer components than shown, or combine certain components, or arrange the components differently.
[0147] The question-and-answer method provided in the embodiment of the present application is described in detail below with reference to the accompanying drawings.
[0148] The question-answering method provided in the embodiment of the present application is applied to Figure 1 The question-answering device 102 in the question-answering system shown in FIG. Figure 4 As shown, the question-answering method provided in the embodiment of the present application includes:
[0149] S401. Receive a question and identify the question intent.
[0150] In one possible implementation, the question-answering device can receive a question and identify the question intent of the question. In this way, the question-answering device can determine the intent type of the question intent, call the answer template corresponding to the intent type, and query the answer to the question from a database of categories corresponding to the intent type.
[0151] Combination Figure 1 , the question-and-answer device can receive user questions obtained by the interactive device.
[0152] User questions may include: dialogue questions, indicator query questions, indicator prediction questions, and concept questions.
[0153] User questions include: questions in text form and questions in voice form.
[0154] The voice form questions include: streaming voice form questions and offline voice form questions.
[0155] Combination Figure 2 , users can input user questions through the 3D digital human module and the dialog module.
[0156] Specifically, the user can input questions in streaming voice form through the 3D digital human module. The user can input questions in offline voice form or text form through the dialog module.
[0157] Combination Figure 2 , the question-answering device can identify the question intent based on the model in the AI capability layer.
[0158] S402: Determine the intention type of the question intention.
[0159] In one possible implementation, the question-answering device can determine the intent type of the question intent, so that the question-answering device can call the answer template corresponding to the intent type and query the answer to the question from a database of categories corresponding to the intent type.
[0160] Intent types may include: conversation type, indicator query type, indicator prediction type, and concept query type.
[0161] When the intent type is a conversation type, the user question can be text data or voice data of daily communication.
[0162] When the intent type is indicator query, the user's question may be to query a certain indicator in a certain area during a certain period of time.
[0163] When the intent type is indicator prediction, the user's question may be to predict an indicator of a certain area within a certain period of time in the future.
[0164] When the intent type is a conceptual query, the user's question may be to inquire about the concept or meaning of a certain industry term.
[0165] S403: Call the answer template corresponding to the intent type, query the answer to the question from the database of the category corresponding to the intent type, and output the answer.
[0166] In one possible implementation, the question-answering device can call the answer template corresponding to the intent type, query the answer to the question from the database of the category corresponding to the intent type, and output the answer. In this way, the question-answering device can query the database corresponding to the intent type according to the intent type, and can output the answer quickly and accurately.
[0167] The answer templates include: dialogue answer template, indicator query answer template, indicator prediction answer template, and concept answer template.
[0168] The question-answering device can generate answers based on the answer template of the input prompt text (prompt) of the language model.
[0169] When the intent type is dialog-type, the question-answering device calls the dialog-type answer template, queries the answer to the question from the dialog-type database, and outputs the answer.
[0170] Optionally, when the intent type is a dialogue type, the question-and-answer device can determine and output the answer based on the dialogue capability of the chatGLM large model.
[0171] When the intent type is dialogue type, the question-answering device can implement dialogue communication based on the user's questions.
[0172] Combination Figure 2 ,When the intent type is a concept query class, the question and answer device calls the ,answer template of the concept query class, queries the answer to the question from the ,concept class database, and outputs the answer.
[0173] When the intent type is a concept query, the user's question may be to inquire about the concept / meaning of a certain industry term. The question-and-answer device can query the corresponding concept data based on the user's question and generate an answer.
[0174] Combination Figure 2 ,When the intent type is the indicator query class, the question and answer device calls the ,answer template of the indicator query class, queries the answer to the question from the ,indicator class database, and outputs the answer.
[0175] When the intent type is indicator query, the user's question may be to inquire about an indicator of a certain area in a certain period of time. The question-and-answer device can query the corresponding indicator data based on the user's question and generate an answer.
[0176] Combination Figure 2 ,When the intent type is the indicator prediction class, the question and answer device calls the ,answer template of the indicator prediction class, queries the answer to the question from the ,indicator class database, and outputs the answer.
[0177] When the intent type is indicator prediction, the user's question may be to predict an indicator of a certain area within a certain period of time in the future. The question-and-answer device can query the corresponding historical indicator data based on the user's question to predict the answer.
[0178] In some embodiments, outputting an answer specifically includes:
[0179] When the answer to the question is in text form, the text answer is converted into a voice answer, and the voice answer is announced.
[0180] Alternatively, when the answer to the question is in the form of a graph, the answer in the form of a graph is output.
[0181] In some embodiments, when the problem is related to the operating entity, Figure 4 ,like Figure 5 As shown, the question-answering method further includes:
[0182] S501. Call the private database of the operating entity to obtain the private data of the operating entity, and obtain the public data of the industry to which the operating entity belongs.
[0183] In one possible implementation, the question-answering device can obtain the private data of the operating entity by calling the private database of the operating entity, and obtain the public data of the industry to which the operating entity belongs. Multiple categories of databases can be created based on the categories of private data and public data. In this way, the question-answering device can query the database corresponding to the intent type according to the intent type, and can quickly and accurately output the answer to the question.
[0184] Combination Figure 1 ,The question and answer device can obtain the private data of the operating entity and the public data of the industry to which the operating entity belongs through communication equipment.
[0185] Combination Figure 2 ,The question and answer device can call the private database of the operating entity based on the direct database module, interface calling module, and receiving data module of the indicator configuration layer, to obtain the private data of the operating entity and the public data of the industry to which the operating entity belongs.
[0186] Optionally, the question-and-answer device may obtain public data on the industry to which the operating entity belongs from a cloud database.
[0187] S502: Create multiple categories of databases according to the categories of private data and public data.
[0188] Categories include at least one of the following: conversational, conceptual, and indicator.
[0189] In one possible implementation, the question-answering device can create multiple categories of databases based on the categories of private data and public data. In this way, the question-answering device can query the database corresponding to the intent type based on the intent type, and can quickly and accurately output the answer to the question.
[0190] The question-and-answer device can create multiple categories of databases based on the categories of private data and public data.
[0191] The database includes: dialogue database, indicator database, and concept database.
[0192] In some embodiments, when the category includes an indicator class, Figure 5 ,like Figure 6 As shown, in S502, multiple categories of databases are created according to the categories of private data and public data, specifically including:
[0193] S601. Obtain original data corresponding to private data and original data corresponding to public data.
[0194] In one possible implementation, the question-answering device can obtain the original data corresponding to the private data and the original data corresponding to the public data, that is, the unprocessed data. The original data corresponding to the private data and the original data corresponding to the public data are processed into indicator data, and an indicator database is created based on the indicator data. In this way, when the intent type is an indicator query type or an indicator prediction type, the question-answering device can query the indicator database and output the answer to the question quickly and accurately.
[0195] The question-and-answer device can obtain original data corresponding to private data and original data corresponding to public data.
[0196] Combination Figure 1 , the question-and-answer device can obtain the original data corresponding to the private data and the original data corresponding to the public data through the communication device.
[0197] Combination Figure 2 , the question-and-answer device can obtain the original data corresponding to the private data and the original data corresponding to the public data based on the direct-connected database module of the indicator configuration layer.
[0198] Optionally, the question-and-answer device may call interfaces of other platforms based on the interface calling module of the indicator configuration layer to obtain original data corresponding to private data and original data corresponding to public data.
[0199] Optionally, the question-and-answer device may receive original data corresponding to the private data and original data corresponding to the public data through a data receiving module of the indicator configuration layer.
[0200] S602: Process the original data corresponding to the private data and the original data corresponding to the public data into indicator data, and create an indicator database according to the indicator data.
[0201] In one possible implementation, the question-answering device can process the original data corresponding to the private data and the original data corresponding to the public data into indicator data, and create an indicator database based on the indicator data. In this way, when the intent type is an indicator query or indicator prediction type, the question-answering device can query the indicator database and output the answer to the question quickly and accurately.
[0202] Combination Figure 2 The question-and-answer device can process the original data corresponding to the private data and the original data corresponding to the public data into indicator data based on the static file processing module and the data arrangement module of the indicator configuration layer.
[0203] The question-and-answer device can create an indicator database based on indicator data.
[0204] Optionally, the question-and-answer device may store the processed indicator data into an indicator database.
[0205] In some embodiments, in combination Figure 4 ,like Figure 7 As shown, the question-answering method further includes:
[0206] S701. When the question is in voice form, convert the voice question into text form.
[0207] In one possible implementation, when the question is in voice form, the question-answering device can convert the voice question into a text question, so that the question-answering device can continue to process the text question, determine key information, further query the database, and quickly and accurately output the answer to the question.
[0208] In the case where the question is in voice form, the question-answering device may convert the voice-form question into a text-form question.
[0209] Combination Figure 2 , the question-answering device can convert questions in streaming voice form into text form based on the FunASR model in the AI capability layer.
[0210] Combination Figure 2 , the question-answering device can convert offline voice questions into text questions based on the Wisper model in the AI capability layer.
[0211] In some embodiments, in combination Figure 7 ,like Figure 8 As shown, in S403, the answer template corresponding to the intent type is called, the answer to the question is queried from the database of the category corresponding to the intent type, and the answer is output, which specifically includes:
[0212] S801. Query target data corresponding to the question from a database corresponding to the intent type.
[0213] In one achievable method, the question-and-answer device may query the target data corresponding to the question from a database corresponding to the intent type, fill the target data into an answer template corresponding to the intent type, and quickly and accurately determine the answer to the question.
[0214] The question-and-answer device can query the target data corresponding to the question from the database corresponding to the intent type.
[0215] For example, when the intent type is an indicator query, and the user's question is "what was the revenue of the company in the past month", the Q&A device can query the target data related to revenue in the past month from the indicator database. The target data includes: cost in the past month, loss in the past month, income in the past month, etc.
[0216] S802. Fill the target data into the answer template corresponding to the intent type to determine the answer to the question.
[0217] In one achievable manner, the question-answering device may fill in the target data into an answer template corresponding to the intent type to quickly and accurately determine the answer to the question.
[0218] For example, when the intent type is an indicator query, the user's question is "What was the company's revenue in the past month?" The answer template can be "In the past period of time, the revenue was A, the cost was B, and the loss was C. Therefore, in the past period of time, the company's revenue was D." Therefore, when the cost in the past month was 5 million yuan, the loss in the past month was 1.5 million yuan, and the revenue in the past month was 10 million yuan, the answer determined by the question-and-answer device is: In the past month, the revenue was 10 million yuan, the cost was 5 million yuan, and the loss was 1.5 million yuan. Therefore, in the past period of time, the company's revenue was 3.5 million yuan.
[0219] In some embodiments, in combination Figure 8 ,like Fig. 9 As shown, in S801, the target data corresponding to the question is queried from the database corresponding to the intent type, specifically including:
[0220] S901. Determine the key information in the text-based question.
[0221] Among them, the key information includes at least one of the following: time, region, and indicator category.
[0222] In one possible implementation, the question-answering device can determine key information in a text-based question, and query target indicator data from an indicator database based on the key information, so as to fill the target data into an answer template and quickly and accurately determine the answer to the question.
[0223] For example, when the intent type is an indicator query, the user's question is "the revenue of the company in the past month". Therefore, the question-answering device can determine that the key information is: revenue in the past month (for example, October 2024).
[0224] In another example, when the intent type is an indicator query, the user's question is "predict the revenue of the enterprise in region A next month." Therefore, the question-answering device may determine that the key information is: next month (for example, December 2024), region A, and revenue.
[0225] S902. Query target indicator data from the indicator database according to key information.
[0226] Among them, the correlation degree between the target indicator data and the key information is greater than the preset correlation degree.
[0227] In one possible implementation, the question-answering device can query the target indicator data from the indicator database based on the key information, so as to fill the target data into the answer template and quickly and accurately determine the answer to the question.
[0228] For example, when the key information is: revenue in the past month (e.g., October 2024), the question-answering device can query the target indicator data from the indicator database. The target indicator data includes: cost in October 2024, loss in October 2024, and revenue in October 2024.
[0229] In another example, when the key information is: forecast, next month (e.g., December 2024), region A, and revenue, the question-answering device can query the target indicator data from the indicator database. The target indicator data includes: cost from June 2024 to November 2024, loss from June 2024 to November 2024, and revenue from June 2024 to November 2024.
[0230] In some embodiments, the intent type includes: indicator data query class, the target data includes: first indicator data, combined with Fig. 9 ,like Fig.10 As shown, in S802, the target data is filled into the answer template corresponding to the intent type to determine the answer to the question, specifically including:
[0231] S1001. Fill the first indicator data into the answer template corresponding to the indicator query class to determine the answer to the question.
[0232] The first indicator data is used to calculate the answer.
[0233] In one practicable manner, the question-answering device may fill in the target data into an answer template to quickly and accurately determine the answer to the question.
[0234] For example, when the intent type is indicator query, the user question is "the company's revenue in the past month", and the answer template can be "'time', the company's revenue is A, the cost is B, and the loss is C, so the company's revenue is 'revenue amount'". And when the cost in the past month is 5 million yuan, the loss in the past month is 1.5 million yuan, and the revenue in the past month is 10 million yuan, the answer determined by the question and answer device is: In October 2024, the company's revenue was 10 million yuan, the cost was 5 million yuan, and the loss was 1.5 million yuan, so the company's revenue was 3.5 million yuan.
[0235] In some embodiments, the intent type includes: indicator data prediction class, the target data includes: second indicator data, combined with Fig. 9 ,like Fig.11 As shown, in S802, the target data is filled into the answer template corresponding to the intent type to determine the answer to the question, specifically including:
[0236] S1101. Determine an indicator prediction result based on the second indicator data.
[0237] The second indicator data is used to predict the answer.
[0238] In one achievable manner, the question-and-answer device can determine the indicator prediction result based on the second indicator data, so as to fill the indicator prediction result into the answer template corresponding to the indicator prediction class, and quickly and accurately determine the answer to the question.
[0239] The second indicator data is usually historical indicator data, and the question-and-answer device can determine the indicator prediction result based on the second indicator data.
[0240] For example, when the intent type is an indicator query and the user question is "predict the company's revenue in region A next month", the second indicator data includes: the cost of region A from June 2024 to November 2024, the loss of region A from June 2024 to November 2024, and the revenue of region A from June 2024 to November 2024. In the database, the cost of region A from June to November 2024 is 5 million yuan, the loss of region A from June to November 2024 is 1.5 million yuan, 1.4 million yuan, 1.3 million yuan, 1.2 million yuan, 1.1 million yuan, and 1.05 million yuan respectively, and the revenue of region A from June to November 2024 is 10 million yuan, 10.5 million yuan, 11 million yuan, 11.5 million yuan, 12 million yuan, and 12.5 million yuan respectively. The question-answering device can determine the indicator prediction result as 7 million yuan based on the second indicator data.
[0241] Combination Figure 2 , the question-and-answer device can predict the revenue in December 2024 based on the time series prediction module of the AI service layer.
[0242] S1102. Fill the indicator prediction result into the answer template corresponding to the indicator prediction class to determine the answer to the question.
[0243] In one practicable manner, the question-answering device may fill the indicator prediction result into an answer template corresponding to the indicator prediction class to quickly and accurately determine the answer to the question.
[0244] For example, when the intent type is indicator prediction, the user question is "predict the company's revenue in region A next month", and the answer template can be ""time period", the company's revenue is increasing / declining, based on the data of the past six months, the company's revenue in region A is predicted to be "revenue amount"". In the database, the cost of region A from June to November 2024 is 5 million yuan, and the losses of region A from June to November 2024 are 1.5 million yuan, 1.4 million yuan, 1.3 million yuan, 1.2 million yuan, 1.1 million yuan, and 1.05 million yuan respectively. The revenue of region A from June to November 2024 is 10 million yuan, 10.5 million yuan, 11 million yuan, 11.5 million yuan, 12 million yuan, and 12.5 million yuan respectively. The indicator prediction result is: 7 million yuan. Therefore, the answer determined by the question and answer device is: In the past six months, the company's revenue has been on an upward trend. Based on the data of the past six months, it is predicted that the company's revenue in region A in December 2024 will be 7 million yuan.
[0245] In some embodiments, the target data includes: a preset answer, combined with Figure 8 ,like Fig.12 As shown, in S801, the target data corresponding to the question is queried from the database corresponding to the intent type, specifically including:
[0246] S1201. According to the question in text form, a preset question is searched from a database corresponding to the intent type.
[0247] Among them, the similarity between the questions in text form and the preset questions is greater than the preset similarity.
[0248] In one possible implementation, the question-answering device can query a preset question from a database corresponding to the intent type based on the text-based question, and query a preset answer corresponding to the preset question from the database corresponding to the intent type. In this way, the question-answering device can fill the preset answer into the answer template corresponding to the intent type, and quickly and accurately determine the answer to the question.
[0249] In one possible implementation, preset questions and answers corresponding to the preset questions may be stored in a database.
[0250] The question-answering device can query preset questions from the database corresponding to the intent type based on the text-based questions.
[0251] Combination Figure 2 The question-answering device can calculate the similarity between the text-based question and the preset question based on the similarity calculation module of the AI service layer. When the similarity between the text-based question and the preset question is greater than the preset similarity, the preset question is queried from the database corresponding to the intent type.
[0252] S1202. Query a preset answer corresponding to the preset question from a database corresponding to the intent type.
[0253] In one possible implementation, the question-answering device can query the preset answer corresponding to the preset question from the database corresponding to the intent type. In this way, the question-answering device can fill the preset answer into the answer template corresponding to the intent type to quickly and accurately determine the answer to the question.
[0254] The question-and-answer device can query the preset answers corresponding to the preset questions from the database corresponding to the intent type.
[0255] Exemplarily, when the intent type is a concept query type, the question-and-answer device can query a preset question from a database corresponding to the intent type based on the question in text form, and query a preset answer corresponding to the preset question from the database corresponding to the intent type.
[0256] In some embodiments, the intent type includes: a conversation type or a concept query type, combined with Fig.12 ,like Fig.13 As shown, in S802, the target data is filled into the answer template corresponding to the intent type to determine the answer to the question, specifically including:
[0257] S1301. Fill in the preset answer into the answer template corresponding to the intent type to determine the answer to the question.
[0258] In one practicable manner, when the intent type includes: a dialogue type or a concept query type, the question-and-answer device may fill in a preset answer into an answer template corresponding to the intent type to determine the answer to the question.
[0259] The question-and-answer device can fill in the preset answer into the answer template corresponding to the intent type to determine the answer to the question.
[0260] For example, Fig.14 A flowchart of a question-answering method is shown.
[0261] First, the user inputs a question. The user can input the question in the form of streaming voice based on the 3D digital human module, in the form of offline voice based on the dialog module, or in the form of text based on the dialog module.
[0262] Then, the question-answering device determines whether the question input by the user is a question in the form of streaming voice.
[0263] When the user's question is in the form of streaming voice, the question-answering device can call the FunASR model to convert the text, convert the question in the form of streaming voice into a question in text form, and perform intent recognition at the end of each sentence.
[0264] In the case that the user's question is not a question in the form of streaming voice, the question-answering device may determine whether the user's question is a question in the form of voice.
[0265] When the user's question is in voice form (also called offline voice question), the question-answering device calls the Whisper model to convert the text, converts the offline voice question into text, and performs intent recognition.
[0266] When the user question is not a question in voice form (may also be referred to as a question in text form), intent recognition is performed.
[0267] Next, the question-and-answer device determines the intent of the question.
[0268] When the intent type is conversational, the question-answering device determines the answer to the question based on the basic conversation capabilities of the chatGLM model.
[0269] When the intent type is indicator data query, the Q&A device extracts entity information of time, region, and indicator, queries the database based on the entity information, and fills the queried data into the prompt template. The Q&A device generates answers based on the template based on the chatGLM model.
[0270] When the intent type is indicator data prediction, the Q&A device extracts entity information of time, region, and indicator, and calls the time series prediction algorithm to generate prediction results. The Q&A device generates answers based on the prediction results and templates based on the chatGLM model.
[0271] When the intent type is a conceptual query, the question-answering device retrieves the conceptual database based on the chatGLM model and generates an answer.
[0272] Then, the question-and-answer device displays the results based on the front-end interface and calls the chatTTS model for broadcast, that is, converting the answers in text form into voice answers.
[0273] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of the method. In order to realize the above functions, it includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.
[0274] The embodiment of the present application can divide the question-and-answer device into functional modules according to the above method example. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware or in the form of software functional modules. Optionally, the division of modules in the embodiment of the present application is schematic and is only a logical functional division. There may be other division methods in actual implementation.
[0275] Fig.15 FIG. 1 shows a schematic diagram of the structure of a question-answering device provided in an embodiment of the present application. Fig.15 As shown, the question-answering device includes: a communication unit 1501 and a processing unit 1502; the communication unit 1501 is used to receive questions and identify the question intent; the processing unit 1502 is used to determine the intent type of the question intent; the processing unit 1502 is also used to call the answer template corresponding to the intent type, query the answer to the question from the database of the category corresponding to the intent type, and output the answer.
[0276] Optionally, when the question is related to the operating entity, the communication unit 1501 is also used to call the operating entity's private database to obtain the operating entity's private data, and obtain the public data of the industry to which the operating entity belongs; the processing unit 1502 is also used to create multiple categories of databases based on the categories of private data and public data; the categories include at least one of the following: dialogue category, concept category and indicator category.
[0277] Optionally, when the category includes an indicator class, the processing unit 1502 is specifically used to: obtain the original data corresponding to the private data and the original data corresponding to the public data; process the original data corresponding to the private data and the original data corresponding to the public data into indicator class data, and create an indicator class database based on the indicator class data.
[0278] Optionally, the processing unit 1502 is further configured to convert the voice-based question into a text-based question when the question is in voice-based form.
[0279] Optionally, the processing unit 1502 is specifically used to: query target data corresponding to the question from a database corresponding to the intent type; fill the target data into an answer template corresponding to the intent type to determine the answer to the question.
[0280] Optionally, processing unit 1502 is specifically used to: determine key information in the text-based question; the key information includes at least one of the following: time, region, indicator category; based on the key information, query target indicator data from the indicator database; the degree of correlation between the target indicator data and the key information is greater than a preset degree of correlation.
[0281] Optionally, the intent type includes: indicator data query class, the target data includes: first indicator data; the first indicator data is used to calculate the answer; the processing unit 1502 is specifically used to: fill the first indicator data into the answer template corresponding to the indicator query class to determine the answer to the question.
[0282] Optionally, the intention type includes: indicator data prediction class, the target data includes: second indicator data; the second indicator data is used to predict the answer; the processing unit 1502 is specifically used to: determine the indicator prediction result according to the second indicator data; fill the indicator prediction result into the answer template corresponding to the indicator prediction class to determine the answer to the question.
[0283] Optionally, the target data includes: preset answers, and the processing unit 1502 is specifically used to: query the preset question from the database corresponding to the intent type according to the question in text form; the similarity between the question in text form and the preset question is greater than the preset similarity; query the preset answer corresponding to the preset question from the database corresponding to the intent type.
[0284] Optionally, the intent type includes: a dialogue type or a concept query type, and the processing unit 1502 is specifically used to fill a preset answer into an answer template corresponding to the intent type to determine the answer to the question.
[0285] Optionally, processing unit 1502 is specifically used to: when the answer to the question is in text form, convert the text answer into a voice answer and broadcast the voice answer; or, when the answer to the question is in chart form, output the chart answer.
[0286] An embodiment of the present application also provides a computer-readable storage medium, which includes computer execution instructions. When the computer execution instructions are executed on a computer, the computer executes the question-and-answer method provided in the above embodiment.
[0287] An embodiment of the present application also provides a computer program, which can be directly loaded into a memory and contains software code. After being loaded and executed by a computer, the computer program can implement the question-and-answer method provided in the above embodiment.
[0288] Those skilled in the art should be aware that in one or more of the above examples, the functions described in this application can be implemented using hardware, software, firmware, or any combination thereof. When implemented using software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. Computer-readable media include computer-readable storage media and communication media, wherein communication media include any media that facilitates the transmission of computer programs from one place to another. Storage media can be any available media that can be accessed by general or special-purpose computers.
[0289] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0290] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the modules or units is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the coupling or direct coupling or communication connection between each other shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms. The unit described as a separate component may or may not be physically separated, and the component displayed as a unit may be a physical unit or multiple physical units, that is, it may be located in one place, or it may be distributed in multiple different places. Some or all of the units can be selected according to actual needs to achieve the purpose of the scheme of this embodiment.
[0291] In addition, each functional unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional unit. If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on such an understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the general technology or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a U disk, a mobile hard disk, a ROM, a RAM, a disk, or an optical disk.
[0292] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A question-answering method, characterized in that: The method comprises: Receive questions and identify the question intent of said questions; Determine the type of intent of the stated question; Call the answer template corresponding to the intent type, query the answer to the question from the database of the category corresponding to the intent type, and output the answer.
2. The method according to claim 1, characterized in that When the problem is a problem related to the operating entity, the method further includes: Calling the private database of the operating entity to obtain the private data of the operating entity, and obtaining the public data of the industry to which the operating entity belongs; A database of multiple categories is created according to the categories of the private data and the public data; the categories include at least one of the following: a dialogue category, a concept category, and an indicator category.
3. The method according to claim 2, characterized in that When the category includes the indicator class, creating a plurality of categories of databases according to the categories of the private data and the public data includes: Acquire original data corresponding to the private data and original data corresponding to the public data; The original data corresponding to the private data and the original data corresponding to the public data are processed into indicator data, and a database of the indicator class is created according to the indicator data.
4. The method according to claim 3, characterized in that The method further comprises: In the case where the question is in voice form, the voice form question is converted into a text form question.
5. The method according to claim 4, characterized in that The calling of the answer template corresponding to the intention type, querying the answer to the question from a database of the category corresponding to the intention type, and outputting the answer includes: Querying the target data corresponding to the question from the database corresponding to the intention type; Fill the target data into the answer template corresponding to the intention type to determine the answer to the question.
6. The method according to claim 5, characterized in that The querying the target data corresponding to the question from the database corresponding to the intention type includes: Determine the key information in the text-based question; the key information includes at least one of the following: time, region, and indicator category; According to the key information, target indicator data is queried from the indicator database; the degree of correlation between the target indicator data and the key information is greater than a preset degree of correlation.
7. The method according to claim 6, characterized in that The intent type includes: an indicator data query class, the target data includes: first indicator data; the first indicator data is used to calculate the answer; the target data is filled into the answer template corresponding to the intent type to determine the answer to the question, including: Fill the first indicator data into the answer template corresponding to the indicator query class to determine the answer to the question.
8. The method according to claim 6, characterized in that The intention type includes: indicator data prediction class, the target data includes: second indicator data; the second indicator data is used to predict the answer; the filling of the target data into the answer template corresponding to the intention type to determine the answer to the question includes: Determining an indicator prediction result according to the second indicator data; Fill the indicator prediction result into the answer template corresponding to the indicator prediction class to determine the answer to the question.
9. The method according to claim 5, characterized in that The target data includes: a preset answer, and the querying of the target data corresponding to the question from the database corresponding to the intention type includes: According to the question in text form, a preset question is searched from a database corresponding to the intention type; the similarity between the question in text form and the preset question is greater than a preset similarity; The preset answer corresponding to the preset question is queried from a database corresponding to the intention type.
10. The method according to claim 9, characterized in that The intention type includes: a dialogue type or a concept query type, and the step of filling the target data into an answer template corresponding to the intention type to determine the answer to the question includes: Fill the preset answer into the answer template corresponding to the intention type to determine the answer to the question.
11. The method according to claim 1, characterized in that The output answer includes: If the answer to the question is in text form, converting the text answer into a voice answer and announcing the voice answer; Alternatively, when the answer to the question is in the form of a graph, the answer in the form of a graph is output.
12. A question-answering device, characterized in that: The device comprises: a communication unit and a processing unit; The communication unit is used to receive a question and identify the question intent of the question; The processing unit is used to determine the intention type of the question intention; The processing unit is further used to call the answer template corresponding to the intention type, query the answer to the question from the database of the category corresponding to the intention type, and output the answer.
13. A question-answering device, characterized in that: include: A processor and a memory; wherein the memory is used to store one or more programs, and the one or more programs include computer-executable instructions. When the device is running, the processor executes the computer-executable instructions stored in the memory to enable the device to perform the method described in any one of claims 1 to 11.
14. A computer-readable storage medium, characterized in that: When the computer-executable instructions stored in the computer-readable storage medium are executed by a processor of a question-answering device, the question-answering device can perform the method according to any one of claims 1 to 11.
15. A computer program product, characterized in that The computer program product comprises: a computer program or instructions, and when the computer program or instructions are run on a computer, the computer is caused to perform the method according to any one of claims 1 to 11.