CN114186048A - Question-answer replying method and device based on artificial intelligence, computer equipment and medium - Google Patents

Question-answer replying method and device based on artificial intelligence, computer equipment and medium Download PDF

Info

Publication number
CN114186048A
CN114186048A CN202111527618.XA CN202111527618A CN114186048A CN 114186048 A CN114186048 A CN 114186048A CN 202111527618 A CN202111527618 A CN 202111527618A CN 114186048 A CN114186048 A CN 114186048A
Authority
CN
China
Prior art keywords
question
replied
answer
reply
personnel
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111527618.XA
Other languages
Chinese (zh)
Inventor
孙辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
OneConnect Financial Technology Co Ltd Shanghai
Original Assignee
OneConnect Financial Technology Co Ltd Shanghai
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by OneConnect Financial Technology Co Ltd Shanghai filed Critical OneConnect Financial Technology Co Ltd Shanghai
Priority to CN202111527618.XA priority Critical patent/CN114186048A/en
Publication of CN114186048A publication Critical patent/CN114186048A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/332Query formulation
    • G06F16/3329Natural language query formulation or dialogue systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing
    • G06F16/334Query execution
    • G06F16/3344Query execution using natural language analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/35Clustering; Classification
    • G06F16/353Clustering; Classification into predefined classes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis
    • G06F40/35Discourse or dialogue representation

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Computational Linguistics (AREA)
  • Artificial Intelligence (AREA)
  • Mathematical Physics (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Computer Interaction (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application is suitable for the technical field of artificial intelligence, and provides a question-answer replying method, a question-answer replying device, computer equipment and a medium based on artificial intelligence, wherein the method comprises the following steps: matching the question category of the question to be replied with the question-answer database, and if the question to be replied is not matched with the question-answer database, performing semantic segmentation according to the question semantics of the question to be replied to obtain a segmented question; performing question answering and replying according to the question answers of all the segmentation questions; if an error response aiming at the question answer is received, determining the question grade of the question to be replied according to the question semantics, and determining a question replying person according to the question grade and the question category; and performing question and answer reply on the question to be replied according to the reply information of the question replying personnel. The question answering reply is carried out on the question to be replied through the question answers and the reply information of each segmentation question, the phenomenon that the question answers cannot be given or irrelevant replies in the prior art is avoided, and the accuracy of the question answering reply and the use experience of a user are improved.

Description

Question-answer replying method and device based on artificial intelligence, computer equipment and medium
Technical Field
The present application relates to the field of artificial intelligence technologies, and in particular, to a question-answer replying method and apparatus, a computer device, and a medium based on artificial intelligence.
Background
The intelligent reply system is an artificial intelligent system which can be on-line at any time by means of communication means and can communicate with people through natural language. Intelligent answering is essentially an automatic question-answering system, also called a question answering system, which is a computer processing system that memorizes a large corpus, automatically searches for and answers questions of users.
The existing intelligent question-answering reply can only reply to simple and repeated problems, cannot provide a solution for complex problems, or provides irrelevant replies, so that the user experience is poor.
Disclosure of Invention
In view of this, embodiments of the present application provide a question and answer reply method, device, computer device, and medium based on artificial intelligence, so as to solve a phenomenon that a user experience is poor due to a fact that a solution cannot be provided for a complex problem in an existing question and answer reply using process.
A first aspect of an embodiment of the present application provides a question-answer replying method based on artificial intelligence, including:
receiving a question to be replied, determining a question category according to a question keyword in the question to be replied, and matching the question to be replied with a question-answer database according to the question category;
if the question to be replied is not matched with the question-answer database, performing semantic analysis on the question to be replied to obtain question semantics, and performing semantic segmentation on the question to be replied according to the question semantics to obtain a segmentation question;
respectively determining the question answers of all the segmentation questions according to the question-answer database, and performing question-answer reply on the questions to be replied by the question answers of all the segmentation questions;
if an error response aiming at the question answer is received, determining the question grade of the question to be replied according to the question semantics, and determining question replying personnel according to the question grade and the question category;
and sending the questions to be replied to the question replying personnel, and performing question and answer replying on the questions to be replied according to reply information of the question replying personnel.
Further, the determining the question category according to the question keyword in the question to be replied includes:
performing word segmentation on the problem to be replied to obtain word segmentation words, and respectively determining word characteristics of each word segmentation word, wherein the word characteristics comprise one or more combinations of parts of speech, word frequency or inverse text frequency;
determining problem keywords in the word segmentation words according to the word characteristics, and performing vector conversion on the problem to be replied to obtain a context vector;
and inputting the context vector and the problem keywords in the word segmentation vocabulary into a pre-trained problem category model for category analysis to obtain the problem category.
Further, the determining of the question responders according to the question grade and the question category includes:
determining a reply personnel list according to the question category, and matching the question grade with the reply personnel list to obtain at least one candidate personnel;
respectively obtaining the personnel states of all candidate personnel, and screening the candidate personnel according to the personnel states;
and respectively sending question prompts to the screened candidate personnel, and determining question replying personnel according to the prompt responses of the screened candidate personnel to the question prompts.
Further, after matching the question to be replied with a question-answer database according to the question category, the method further includes:
and if the question to be replied is matched with any sample question in the question-answer database, inquiring the question reply of the matched sample question, and performing question-answer reply on the question to be replied by the inquired question reply.
Further, the replying the queried question to the question to be replied includes:
acquiring a reply mode of the question reply, and acquiring a device operation environment of the user device corresponding to the question to be replied;
and if the equipment running environment of the user equipment is not matched with the reply mode of the question reply, performing mode conversion on the question reply, and sending the converted question reply to the user equipment.
Further, after performing question answering and answering on the question to be answered according to the answering information of the question answering personnel, the method further comprises the following steps:
receiving a question and answer score of a user corresponding to the question to be replied aiming at the reply information;
and if the question-answer score is larger than a score threshold value, correspondingly storing the reply information and the question to be replied to the question-answer database.
Further, performing semantic segmentation on the to-be-replied question according to the question semantics to obtain a segmentation question, including:
extracting semantic entities in the problem semantics, and combining the extracted semantic identifications respectively to obtain a semantic group;
and respectively obtaining the semantic score of each semantic group, screening each semantic group according to the semantic score, and performing semantic segmentation on the problem to be replied according to each screened semantic group to obtain the segmentation problem.
A second aspect of the embodiments of the present application provides a question answering device, including:
the question matching module is used for receiving a question to be replied, determining a question category according to a question keyword in the question to be replied, and matching the question to be replied with a question-answer database according to the question category;
the semantic segmentation module is used for performing semantic analysis on the question to be replied to obtain question semantics if the question to be replied is not matched with the question-answer database, and performing semantic segmentation on the question to be replied to obtain a segmented question according to the question semantics;
the first question-answer reply module is used for respectively determining question answers of all the segmentation questions and carrying out question-answer reply on the questions to be replied by the question answers of all the segmentation questions;
the question grade determining module is used for determining the question grade of the question to be replied according to the question semantics and determining question repliers according to the question grade and the question category if an error response aiming at the question answer is received;
and the second question-answer reply module is used for sending the question to be replied to the question replying personnel and carrying out question-answer reply on the question to be replied according to reply information of the question replying personnel.
A third aspect of the embodiments of the present application provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the computer device, where the processor implements the steps of the artificial intelligence-based question-answer replying method provided in the first aspect when executing the computer program.
A fourth aspect of the embodiments of the present application provides a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the computer program implements the steps of the artificial intelligence-based question-answer replying method provided in the first aspect.
The question answering method, the question answering device, the computer equipment and the medium based on artificial intelligence are provided by the embodiment of the application, the question to be answered is matched with the question answering database through question categories, whether the question to be answered exists in the question answering database or not can be effectively inquired, if the question to be answered is not matched with the question answering database, the question semantics can be obtained by performing semantic analysis on the question to be answered, the question to be answered can be effectively segmented into segmentation questions based on the question semantics, the question answering accuracy of the question answering is improved by performing question answering on the question to be answered through question answers of all the segmentation questions, if an error response aiming at the question answers is received, the question category of the question to be answered is determined based on the question semantics, question answering personnel corresponding to the question to be answered can be effectively determined based on the question category and the question category, and the question answering personnel are sent to the question answering personnel, and the question answering is replied to the question to be replied through the reply information of the question replying personnel, so that the phenomenon that the question answer cannot be given or irrelevant reply is given in the prior art is prevented, and the accuracy of the question answering reply and the use experience of the user are improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
FIG. 1 is a flowchart illustrating an implementation of a question-answer reply method based on artificial intelligence according to an embodiment of the present disclosure;
FIG. 2 is a flowchart illustrating an implementation of a question-answer reply method based on artificial intelligence according to another embodiment of the present application;
fig. 3 is a block diagram illustrating a structure of a question answering device according to an embodiment of the present disclosure;
fig. 4 is a block diagram of a computer device according to an embodiment of the present disclosure.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The embodiment of the application can acquire and process related data based on an artificial intelligence technology. Among them, Artificial Intelligence (AI) is a theory, method, technique and application system that simulates, extends and expands human Intelligence using a digital computer or a machine controlled by a digital computer, senses the environment, acquires knowledge and uses the knowledge to obtain the best result.
The artificial intelligence infrastructure generally includes technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technologies, operation/interaction systems, mechatronics, and the like. The artificial intelligence software technology mainly comprises a computer vision technology, a robot technology, a biological recognition technology, a voice processing technology, a natural language processing technology, machine learning/deep learning and the like.
In the embodiment of the application, the question answering method based on artificial intelligence is realized on the basis of the artificial intelligence technology, and the question to be answered provided by any user is automatically answered.
Referring to fig. 1, fig. 1 is a flowchart illustrating an implementation of an artificial intelligence based question answering method provided in an embodiment of the present application, where the artificial intelligence based question answering method is applied to any computer device, where the computer device may be a server, a mobile phone, a tablet, or a wearable intelligent device, and the artificial intelligence based question answering method includes:
step S10, receiving a question to be replied, determining a question type according to a question keyword in the question to be replied, and matching the question to be replied with a question-answer database according to the question type;
the problem to be replied can be transmitted in a text, image, voice or video mode, in the step, the problem keywords in the problem to be replied can be extracted based on any pre-trained keyword extraction model or keyword extraction algorithm, the keyword extraction model comprises a word graph model, a theme model or a deep learning model, and the like, and the keyword extraction algorithm comprises a term frequency-inverse file frequency extraction algorithm (TF-IDF) or a TextRank keyword extraction algorithm, and the like.
In the step, the question category corresponding to the question to be replied can be effectively determined based on the question keyword, the question field or the question scene and other information corresponding to the question to be replied can be effectively represented based on the question category, the question-answer database is inquired for the sample question matched with the question to be replied based on the question category, and when the sample question inquired according to the question category is the same as or similar to the question to be replied, the sample question inquired currently is judged to be matched with the question to be replied.
Optionally, in this step, after matching the question to be answered with the question-and-answer database according to the question category, the method further includes:
if the question to be replied is matched with any sample question in the question-answer database, inquiring the question reply of the matched sample question, and performing question-answer reply on the question to be replied by the inquired question reply;
if the question to be replied is matched with any sample question, the question to be replied is judged to be the same as or similar to the matched sample question, therefore, the question reply of the matched sample question can be applied to the question-answer reply of the question to be replied, the question reply of the matched sample question is inquired, and the question reply of the inquired sample question is carried out to the question to be replied, so that the effect of automatic question-answer reply is achieved.
In this step, if the number of sample questions matched to the question to be answered is greater than 1, the question similarity between the question to be answered and the matched sample questions is determined, and the question of the sample question corresponding to the largest question similarity is answered to answer the question to be answered.
Further, in this step, the replying the queried question to the question to be replied includes:
acquiring a reply mode of the question reply, and acquiring a device operation environment of the user device corresponding to the question to be replied; the reply mode comprises text, voice, pictures or videos and the like, and the running environment of the equipment comprises environment information such as the environment where the equipment is located, the network environment of the equipment, the light environment of the equipment and the like;
if the equipment running environment of the user equipment is not matched with the reply mode of the question reply, performing mode conversion on the question reply, and sending the converted question reply to the user equipment; the problem reply method comprises the steps of receiving a question reply, sending a question reply to a user equipment, wherein the question reply is carried out in a mode conversion mode, the problem reply is prevented from being mismatched between the equipment operation environment of the user equipment and the reply mode of the question reply, and the problem reply accuracy is low.
Step S20, if the question to be replied is not matched with the question-answer database, performing semantic analysis on the question to be replied to obtain question semantics, and performing semantic segmentation on the question to be replied according to the question semantics to obtain a segmented question;
the problem semantics representing the content of the problem to be replied is obtained by performing semantic analysis on the problem to be replied, and the problem to be replied is subjected to semantic segmentation based on the problem semantics, so that the problem to be replied can be effectively segmented into segmentation problems.
Optionally, in this step, semantic entities in the problem semantics are extracted, the extracted semantic identifications are combined respectively to obtain semantic groups, the semantic scores of the semantic groups are obtained respectively, the semantic groups are screened according to the semantic scores, and the to-be-replied problem is semantically segmented according to the screened semantic groups to obtain the segmentation problem;
the semantic score is used for representing the degree of association between different semantic entities in the same semantic group, in the step, the semantic score is obtained by respectively matching each semantic group with a pre-stored association query table, the association query table stores the corresponding relationship between different semantic groups and corresponding semantic scores, in the step, each semantic group is sorted through the semantic score, and the semantic groups sorted in a preset sequence number are obtained, so that the screening effect of the semantic groups is achieved.
Furthermore, in the step, the problem to be replied is subjected to semantic segmentation according to the problem semantics to obtain two segmentation problems, when only one semantic entity in the problem semantics is extracted, the semantic entity is determined as a semantic group, the problem to be replied is subjected to semantic segmentation according to the semantic group to obtain the segmentation problems, the problem to be replied is segmented in a random segmentation mode to obtain the segmentation problems, and therefore the phenomenon of semantic segmentation errors caused by the fact that only one segmentation problem is obtained when the problem to be replied is subjected to semantic segmentation according to the problem semantics is prevented.
Step S30, respectively determining the question answers of all the segmentation questions according to the question-answer database, and performing question-answer reply on the questions to be replied by the question answers of all the segmentation questions;
the questions to be replied are semantically segmented through question semantics, sentences can be effectively performed on the questions to be replied, question-answer replies can be accurately provided for the questions to be replied by respectively determining question answers of the segmented questions and performing question-answer replies on the questions to be replied through the question answers of the segmented questions, for example, when the question a1 to be replied is not matched with the sample question, semantic analysis is performed on the question a1 to obtain question semantics b1, the question a1 to be replied is semantically segmented according to the question semantics b1 to obtain a segmented question c1, a segmented question c2 and a segmented question c3, and the question answers of the segmented question c1, the segmented question c2 and the segmented question c3 are performed question-answer replies on the question a1 to be replied.
For example, when the to-be-recovered question a1 is what the price of the car insurance package is, the price of discount activity in months is lower than 800 yuan, the question semantic b1 is, the car insurance package-price-months-discount activity-lower than 800 yuan, the split question c1 is the price of the car insurance package, the split question c2 is, the discount activity in months of the car insurance package, the split question c3 is, the car insurance package is, months of months is lower than 800 yuan, the answers of the split questions c1, c2 and c3 are respectively inquired according to the question-answer database, and the answer of the question to be-recovered question a1 of the split question c1, c2 and c3 is respectively answered, for example, the answer of the question c1 is 1000 yuan, the answer of the split question c2 is 10 months and 11 months, the answer of the question c3 is 750 months, at this time, each of the divided questions and the corresponding question answer are displayed respectively, so as to achieve the question-answer reply effect of the question to be replied.
Step S40, if an error response aiming at the question answer is received, determining the question grade of the question to be replied according to the question semantics, and determining a question replying person according to the question grade and the question category;
if an error response aiming at the question answer is received, it is judged that the user does not receive an effective answer of the question to be replied, the question grade is used for representing the question difficulty degree of the question to be replied, in the step, the corresponding question replying personnel can be directly determined based on the question grade and the question category, the personnel who can answer the question to be replied can be answered without manual query, and the question answering efficiency is improved.
Optionally, in this step, the determining a question replying person according to the question level and the question category includes:
determining a reply personnel list according to the question category, and matching the question grade with the reply personnel list to obtain at least one candidate personnel;
matching the question category with a pre-stored list relation query table to obtain a reply personnel list corresponding to the question to be replied, wherein the list relation query table stores corresponding relations between different question categories and corresponding reply personnel lists, and optionally, the reply personnel list stores corresponding relations between different question grades and corresponding candidate personnel;
respectively obtaining the personnel states of all candidate personnel, and screening the candidate personnel according to the personnel states; wherein the personnel state comprises a busy state and an idle state;
and respectively sending question prompts to the screened candidate personnel, and determining question replying personnel according to the prompt responses of the screened candidate personnel to the question prompts.
Further, in this step, the determining the question level of the question to be answered according to the question semantics includes:
determining a category database according to the problem category, and matching the problem semantics with data information in the category data to obtain matching information;
the problem semantic information is matched with any data information, and the data information is judged to be matched information associated with the problem data to be replied;
and determining the problem grade of the problem to be replied according to the matching information, wherein the problem grade is obtained by calculating the sum of the difficulty values of the matching information, and the corresponding difficulty value is stored in each data information in the category database and is used for representing the difficulty degree of the corresponding data information.
And step S50, sending the question to be replied to the question replying personnel, and performing question and answer replying on the question to be replied according to the reply information of the question replying personnel.
In the embodiment, the question-answer reply method based on artificial intelligence can be applied to an audio tool for carrying out automatic question-answer reply of intelligent customer service, in the audio tool, data are collected through a big data platform, a problem database is continuously updated, the identification precision is improved, and a more accurate and detailed solution is provided for a user. The data acquisition comprises problem data acquisition and solution data acquisition, the data of the problems and the solutions are divided into types of characters, voice, pictures and videos, the data are imported into a relational database after being input into a character input system, and the data are imported into a non-relational database after being input into a voice, picture and video input system. After the user question is provided, the system extracts data such as characters, voice, pictures and the like in the question, the data is imported into a big data platform, the data is classified through keywords in the question, the data is matched with specific questions in a question bank after the classification is completed, a corresponding solution is associated after the matching is successful, and the solution is pushed to the user and comprises the characters, the pictures, the videos and the like. If the customer problem can not be matched with the solution, the task is directly distributed to a professional (problem replying person) to provide help for the user, and when the customer problem can not be matched with the solution, the task needs to be distributed to the professional. Keywords or pictures in user problems are identified and analyzed through a big data platform, the keywords or the pictures are matched with task level information and task category information in a database, after matching is successful, the task levels (simple and complex) and the task categories (professional technology category, business category and other categories) are divided, after classification is completed, the keywords or the pictures are matched with the staff levels, and after matching is completed, tasks are distributed to related professional technicians and business personnel, so that help is provided for users.
In the embodiment, the question to be replied is matched with the question-answer database by question category, whether the question to be replied is the same as the question to be replied exists in the question-answer database can be effectively inquired, if the question to be replied is not matched with the question-answer database, the question semantics can be obtained by performing semantic analysis on the question to be replied, the question to be replied can be effectively divided into divided questions based on the question semantics, the question to be replied is replied by question answers of the divided questions, the accuracy of question-answer is improved, if an error response to the question answers is received, the question category of the question to be replied is determined based on the question semantics, question repliers corresponding to the question to be replied can be effectively determined based on the question categories and question repliers, the question to be replied is sent to the question repliers, and the question to be replied by the reply information of the question repliers, the problem that answers to questions cannot be given or irrelevant answers are given in the prior art is avoided, and the accuracy of question answering answers and the use experience of a user are improved.
Referring to fig. 2, fig. 2 is a flowchart illustrating an implementation of a question-answering reply method based on artificial intelligence according to another embodiment of the present application. With respect to the embodiment of fig. 1, the question answering method based on artificial intelligence provided by this embodiment is used to further refine step S10 in the embodiment of fig. 1, and includes:
step S11, performing word segmentation on the question to be replied to obtain word segmentation words, and respectively determining the word characteristics of each word segmentation word;
in the step, the problem to be replied is matched with a pre-stored vocabulary query table, and the problem to be replied is participled according to a matching result between the problem to be replied and the vocabulary query table to obtain participle vocabularies; in the step, the part of speech, the word frequency or the inverse text frequency of each word segmentation word is respectively calculated to obtain the word characteristics;
step S12, determining the problem keywords in the word segmentation words according to the word characteristics, and performing vector conversion on the problem to be replied to obtain context vectors;
determining word segmentation vocabularies corresponding to the vocabulary characteristics of the part of speech, the word frequency and/or the inverse text frequency in a preset value range as the problem keywords, performing matrix transformation on the problem to be replied to obtain a transformation matrix, and performing vector transformation according to the transformation matrix to obtain a context vector corresponding to the problem to be replied;
step S13, inputting the context vector and the question keywords in the word segmentation vocabulary into a pre-trained question category model for category analysis to obtain the question category;
the pre-trained problem category model can effectively identify the corresponding relations among different context vectors, problem keywords and corresponding problem categories; optionally, in this embodiment, after performing question and answer reply on the question to be replied according to the reply information of the question replying person, the method further includes:
receiving a question and answer score of a user corresponding to the question to be replied aiming at the reply information; the question-answer score is used for standardizing the satisfaction degree of the user on the reply information, and when the question-answer score is higher, the satisfaction degree of the user on the reply information is judged to be higher, namely the reply information is more accurate.
If the question-answer score is greater than the score threshold, the reply information and the question to be replied are correspondingly stored in the question-answer database, wherein the score threshold can be set according to requirements, the score threshold is used for judging whether the reply information is a standard answer of the question to be replied, and when the question-answer score is greater than the score threshold, the reply information is judged to be the standard answer of the question to be replied.
In the embodiment, the word segmentation is carried out on the problem to be replied to obtain the word segmentation words, so that the word characteristics of each word segmentation word are convenient to determine, the word characteristics of each word segmentation word are respectively determined, the accuracy of the problem keyword determination is improved, the context vector is obtained by carrying out vector conversion on the problem to be replied, the context vector and the problem keyword are input into the pre-trained problem category model for category analysis, and the problem category of the problem to be replied can be effectively determined.
Referring to fig. 3, fig. 3 is a block diagram illustrating a question answering device 100 according to an embodiment of the present disclosure. The question answering device 100 in this embodiment includes units for executing the steps in the embodiments corresponding to fig. 1 and 2. Please refer to fig. 1 and fig. 2 and the related descriptions in the embodiments corresponding to fig. 1 and fig. 2. For convenience of explanation, only the portions related to the present embodiment are shown. Referring to fig. 3, the question answering apparatus 100 includes: the question matching module 10, the semantic segmentation module 11, the first question answering module 12, the question grade determination module 13 and the second question answering module 14, wherein:
the question matching module 10 is configured to receive a question to be answered, determine a question category according to a question keyword in the question to be answered, and match the question to be answered with a question-and-answer database according to the question category. The problem to be replied can be transmitted in a text, image, voice or video mode, in the module, the problem keywords in the problem to be replied can be extracted based on any pre-trained keyword extraction model or keyword extraction algorithm, the keyword extraction model comprises a word graph model, a theme model or a deep learning model, and the like, and the keyword extraction algorithm comprises a term frequency-inverse file frequency extraction algorithm (TF-IDF) or a TextRank keyword extraction algorithm, and the like. In the module, the question category corresponding to the question to be replied can be effectively determined based on the question key words, the question field or the question scene and other information corresponding to the question to be replied can be effectively represented based on the question category, the question-answer database is inquired for the sample question matched with the question to be replied based on the question category, and when the sample question inquired according to the question category is the same as or similar to the question to be replied, the sample question inquired currently is judged to be matched with the question to be replied.
Optionally, the question matching module is further configured to: performing word segmentation on the problem to be replied to obtain word segmentation words, and respectively determining word characteristics of each word segmentation word, wherein the word characteristics comprise one or more combinations of parts of speech, word frequency or inverse text frequency;
determining problem keywords in the word segmentation words according to the word characteristics, and performing vector conversion on the problem to be replied to obtain a context vector;
and inputting the context vector and the problem keywords in the word segmentation vocabulary into a pre-trained problem category model for category analysis to obtain the problem category.
And the semantic segmentation module 11 is configured to, if the question to be replied is not matched with the question-answer database, perform semantic analysis on the question to be replied to obtain a question semantic, and perform semantic segmentation on the question to be replied according to the question semantic to obtain a segmented question. The problem semantics representing the content of the problem to be replied is obtained by performing semantic analysis on the problem to be replied, and the problem to be replied is subjected to semantic segmentation based on the problem semantics, so that the problem to be replied can be effectively segmented into segmentation problems.
Optionally, the semantic segmentation module 11 is further configured to: performing semantic segmentation on the problem to be replied according to the problem semantics to obtain a segmentation problem, wherein the semantic segmentation comprises the following steps:
extracting semantic entities in the problem semantics, and combining the extracted semantic identifications respectively to obtain a semantic group;
and respectively obtaining the semantic score of each semantic group, screening each semantic group according to the semantic score, and performing semantic segmentation on the problem to be replied according to each screened semantic group to obtain the segmentation problem.
The first question-answer replying module 12 is configured to determine question answers of the respective split questions according to the question-answer database, and perform question-answer reply on the to-be-replied question with the question answer of the respective split question. The questions to be replied are semantically segmented through question semantics, sentences can be effectively performed on the questions to be replied, question-answer replies can be accurately provided for the questions to be replied by respectively determining question answers of the segmented questions and performing question-answer replies on the questions to be replied through the question answers of the segmented questions, for example, when the question a1 to be replied is not matched with the sample question, semantic analysis is performed on the question a1 to obtain question semantics b1, the question a1 to be replied is semantically segmented according to the question semantics b1 to obtain a segmented question c1, a segmented question c2 and a segmented question c3, and the question answers of the segmented question c1, the segmented question c2 and the segmented question c3 are performed question-answer replies on the question a1 to be replied.
Optionally, the first question-answering module 12 is further configured to: and if the question to be replied is matched with any sample question in the question-answer database, inquiring the question reply of the matched sample question, and performing question-answer reply on the question to be replied by the inquired question reply. If the question to be replied is matched with any sample question, the question to be replied is judged to be the same as or similar to the matched sample question, therefore, the question reply of the matched sample question can be applied to the question-answer reply of the question to be replied, the question reply of the matched sample question is inquired, and the question reply of the inquired sample question is carried out to the question to be replied, so that the effect of automatic question-answer reply is achieved.
In the module, if the number of the sample questions matched with the questions to be answered is more than 1, the question similarity between the questions to be answered and the matched sample questions is respectively determined, and the question of the sample question corresponding to the maximum question similarity is answered to answer the questions to be answered.
Further, the first question-answering module 12 is further configured to: acquiring a reply mode of the question reply, and acquiring a device operation environment of the user device corresponding to the question to be replied; the reply mode comprises text, voice, pictures or videos and the like, and the running environment of the equipment comprises environment information such as the environment where the equipment is located, the network environment of the equipment, the light environment of the equipment and the like;
if the equipment running environment of the user equipment is not matched with the reply mode of the question reply, performing mode conversion on the question reply, and sending the converted question reply to the user equipment; the problem reply method comprises the steps of receiving a question reply, sending a question reply to a user equipment, wherein the question reply is carried out in a mode conversion mode, the problem reply is prevented from being mismatched between the equipment operation environment of the user equipment and the reply mode of the question reply, and the problem reply accuracy is low.
And the question grade determining module 13 is configured to determine, if an error response to the answer to the question is received, a question grade of the question to be answered according to the question semantics, and determine a question answering person according to the question grade and the question category. If an error response aiming at the question answer is received, the fact that the user does not receive an effective answer of the question to be replied is judged, the question grade is used for representing the question difficulty degree of the question to be replied, in the module, the corresponding question replying personnel can be directly determined based on the question grade and the question category, the personnel who answer the question to be replied can be answered without manual query, and the question answering efficiency is improved.
Optionally, the problem level determining module 13 is further configured to: determining a reply personnel list according to the question category, and matching the question grade with the reply personnel list to obtain at least one candidate personnel; matching the question category with a pre-stored list relation query table to obtain a reply personnel list corresponding to the question to be replied, wherein the list relation query table stores corresponding relations between different question categories and corresponding reply personnel lists, and optionally, the reply personnel list stores corresponding relations between different question grades and corresponding candidate personnel;
respectively obtaining the personnel states of all candidate personnel, and screening the candidate personnel according to the personnel states;
and respectively sending question prompts to the screened candidate personnel, and determining question replying personnel according to the prompt responses of the screened candidate personnel to the question prompts.
Further, the problem level determination module 13 is further configured to: determining a category database according to the problem category, and matching the problem semantics with data information in the category data to obtain matching information; the problem category determination database improves the accuracy of information matching between the problem semantics and each data message, and when the problem semantics are matched with any data message, the data message is judged to be the matching information associated with the problem data to be replied
And determining the problem grade of the problem to be replied according to the matching information, wherein the problem grade is obtained by calculating the sum of the difficulty values of the matching information, and the corresponding difficulty value is stored in each data information in the category database and is used for representing the difficulty degree of the corresponding data information.
The second question-answering reply module 14 is configured to send the question to be replied to the question replying staff, and to perform question-answering reply on the question to be replied according to reply information of the question replying staff.
Optionally, the second question-answering module 14 is further configured to: receiving a question and answer score of a user corresponding to the question to be replied aiming at the reply information;
and if the question-answer score is larger than a score threshold value, correspondingly storing the reply information and the question to be replied to the question-answer database.
In the embodiment, the question to be replied is matched with the question-answer database by question category, whether the question to be replied is the same as the question to be replied exists in the question-answer database can be effectively inquired, if the question to be replied is not matched with the question-answer database, the question semantics can be obtained by performing semantic analysis on the question to be replied, the question to be replied can be effectively divided into divided questions based on the question semantics, the question to be replied is replied by question answers of the divided questions, the accuracy of question-answer is improved, if an error response to the question answers is received, the question category of the question to be replied is determined based on the question semantics, question repliers corresponding to the question to be replied can be effectively determined based on the question categories and question repliers, the question to be replied is sent to the question repliers, and the question to be replied by the reply information of the question repliers, the problem that answers to questions cannot be given or irrelevant answers are given in the prior art is avoided, and the accuracy of question answering answers and the use experience of a user are improved.
Fig. 4 is a block diagram of a computer device 2 according to another embodiment of the present application. As shown in fig. 4, the computer device 2 of this embodiment includes: a processor 20, a memory 21 and a computer program 22 stored in said memory 21 and executable on said processor 20, such as a program based on an artificial intelligence question-answering method. The processor 20, when executing the computer program 22, implements the steps of the above-mentioned artificial intelligence-based question-answering method embodiments, such as S10-S50 shown in fig. 1 or S11-S13 shown in fig. 2. Alternatively, when the processor 20 executes the computer program 22, the functions of the units in the embodiment corresponding to fig. 3, for example, the functions of the units 10 to 14 shown in fig. 3, are implemented, for which reference is specifically made to the relevant description in the embodiment corresponding to fig. 3, and details are not described here.
Illustratively, the computer program 22 may be divided into one or more units, which are stored in the memory 21 and executed by the processor 20 to accomplish the present application. The one or more units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution of the computer program 22 in the computer device 2. For example, the computer program 22 may be divided into a question matching module 10, a semantic division module 11, a first question and answer reply module 12, a question level determination module 13 and a second question and answer reply module 14, and the specific functions of each unit are as described above.
The computer device may include, but is not limited to, a processor 20, a memory 21. Those skilled in the art will appreciate that fig. 4 is merely an example of a computer device 2 and is not intended to limit the computer device 2 and may include more or fewer components than shown, or some components may be combined, or different components, e.g., the computer device may also include input output devices, network access devices, buses, etc.
The processor 20 may be a Central Processing Unit (CPU), other general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 21 may be an internal storage unit of the computer device 2, such as a hard disk or a memory of the computer device 2. The memory 21 may also be an external storage device of the computer device 2, such as a plug-in hard disk, a Smart Memory Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like provided on the computer device 2. Further, the memory 21 may also include both an internal storage unit and an external storage device of the computer device 2. The memory 21 is used for storing the computer program and other programs and data required by the computer device. The memory 21 may also be used to temporarily store data that has been output or is to be output.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated module, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in a computer readable storage medium. The computer readable storage medium may be non-volatile or volatile. Based on such understanding, all or part of the flow in the method of the embodiments described above can be realized by a computer program, which can be stored in a computer readable storage medium and can realize the steps of the embodiments of the methods described above when the computer program is executed by a processor. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable storage medium may include: any entity or device capable of carrying computer program code, recording medium, U.S. disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution media, and the like. It should be noted that the computer readable storage medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable storage media that does not include electrical carrier signals and telecommunications signals in accordance with legislation and patent practice.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (10)

1. A question-answer reply method based on artificial intelligence is characterized by comprising the following steps:
receiving a question to be replied, determining a question category according to a question keyword in the question to be replied, and matching the question to be replied with a question-answer database according to the question category;
if the question to be replied is not matched with the question-answer database, performing semantic analysis on the question to be replied to obtain question semantics, and performing semantic segmentation on the question to be replied according to the question semantics to obtain a segmentation question;
respectively determining the question answers of all the segmentation questions according to the question-answer database, and performing question-answer reply on the questions to be replied by the question answers of all the segmentation questions;
if an error response aiming at the question answer is received, determining the question grade of the question to be replied according to the question semantics, and determining question replying personnel according to the question grade and the question category;
and sending the questions to be replied to the question replying personnel, and performing question and answer replying on the questions to be replied according to reply information of the question replying personnel.
2. The artificial intelligence-based question-answer replying method according to claim 1, wherein the determining of question categories according to the question keywords in the question to be replied comprises:
performing word segmentation on the problem to be replied to obtain word segmentation words, and respectively determining word characteristics of each word segmentation word, wherein the word characteristics comprise one or more combinations of parts of speech, word frequency or inverse text frequency;
determining problem keywords in the word segmentation words according to the word characteristics, and performing vector conversion on the problem to be replied to obtain a context vector;
and inputting the context vector and the problem keywords in the word segmentation vocabulary into a pre-trained problem category model for category analysis to obtain the problem category.
3. The artificial intelligence based question-answer answering method according to claim 1, wherein the determining of question answering persons according to the question grades and the question categories comprises:
determining a reply personnel list according to the question category, and matching the question grade with the reply personnel list to obtain at least one candidate personnel;
respectively obtaining the personnel states of all candidate personnel, and screening the candidate personnel according to the personnel states;
and respectively sending question prompts to the screened candidate personnel, and determining question replying personnel according to the prompt responses of the screened candidate personnel to the question prompts.
4. The artificial intelligence-based question-answer answering method according to claim 1, wherein after matching the question to be answered with a question-answer database according to the question category, the method further comprises:
and if the question to be replied is matched with any sample question in the question-answer database, inquiring the question reply of the matched sample question, and performing question-answer reply on the question to be replied by the inquired question reply.
5. The artificial intelligence-based question-answer replying method according to claim 4, wherein the question replying to the question to be replied by the queried question reply comprises:
acquiring a reply mode of the question reply, and acquiring a device operation environment of the user device corresponding to the question to be replied;
and if the equipment running environment of the user equipment is not matched with the reply mode of the question reply, performing mode conversion on the question reply, and sending the converted question reply to the user equipment.
6. The question-answer reply method based on artificial intelligence of claim 1, wherein after the question to be replied is replied by question reply according to reply information of the question replying personnel, the method further comprises:
receiving a question and answer score of a user corresponding to the question to be replied aiming at the reply information;
and if the question-answer score is larger than a score threshold value, correspondingly storing the reply information and the question to be replied to the question-answer database.
7. The question-answer replying method based on artificial intelligence according to any one of claims 1 to 6, wherein the semantically segmenting the question to be replied according to the question semantics to obtain segmented questions comprises:
extracting semantic entities in the problem semantics, and combining the extracted semantic identifications respectively to obtain a semantic group;
and respectively obtaining the semantic score of each semantic group, screening each semantic group according to the semantic score, and performing semantic segmentation on the problem to be replied according to each screened semantic group to obtain the segmentation problem.
8. A question-answering apparatus, comprising:
the question matching module is used for receiving a question to be replied, determining a question category according to a question keyword in the question to be replied, and matching the question to be replied with a question-answer database according to the question category;
the semantic segmentation module is used for performing semantic analysis on the question to be replied to obtain question semantics if the question to be replied is not matched with the question-answer database, and performing semantic segmentation on the question to be replied to obtain a segmented question according to the question semantics;
the first question-answer reply module is used for respectively determining question answers of all the segmentation questions and carrying out question-answer reply on the questions to be replied by the question answers of all the segmentation questions;
the question grade determining module is used for determining the question grade of the question to be replied according to the question semantics and determining question repliers according to the question grade and the question category if an error response aiming at the question answer is received;
and the second question-answer reply module is used for sending the question to be replied to the question replying personnel and carrying out question-answer reply on the question to be replied according to reply information of the question replying personnel.
9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 7.
CN202111527618.XA 2021-12-14 2021-12-14 Question-answer replying method and device based on artificial intelligence, computer equipment and medium Pending CN114186048A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111527618.XA CN114186048A (en) 2021-12-14 2021-12-14 Question-answer replying method and device based on artificial intelligence, computer equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111527618.XA CN114186048A (en) 2021-12-14 2021-12-14 Question-answer replying method and device based on artificial intelligence, computer equipment and medium

Publications (1)

Publication Number Publication Date
CN114186048A true CN114186048A (en) 2022-03-15

Family

ID=80543764

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111527618.XA Pending CN114186048A (en) 2021-12-14 2021-12-14 Question-answer replying method and device based on artificial intelligence, computer equipment and medium

Country Status (1)

Country Link
CN (1) CN114186048A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117876036A (en) * 2024-03-12 2024-04-12 成都信通信息技术有限公司 Method and system for managing on-line questioning and answering point rewards of trade questions

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117876036A (en) * 2024-03-12 2024-04-12 成都信通信息技术有限公司 Method and system for managing on-line questioning and answering point rewards of trade questions
CN117876036B (en) * 2024-03-12 2024-05-07 成都信通信息技术有限公司 Method and system for managing on-line questioning and answering point rewards of trade questions

Similar Documents

Publication Publication Date Title
CN111046133B (en) Question and answer method, equipment, storage medium and device based on mapping knowledge base
CN110168535B (en) Information processing method and terminal, computer storage medium
CN109408821B (en) Corpus generation method and device, computing equipment and storage medium
US10922342B2 (en) Schemaless systems and methods for automatically building and utilizing a chatbot knowledge base or the like
CN111078837A (en) Intelligent question and answer information processing method, electronic equipment and computer readable storage medium
CN111241260A (en) Data processing method, device and equipment based on human-computer interaction and storage medium
CN112417158A (en) Training method, classification method, device and equipment of text data classification model
CN112699645B (en) Corpus labeling method, apparatus and device
CN110825860A (en) Knowledge base question and answer extraction method and system, mobile terminal and storage medium
CN110580516A (en) interaction method and device based on intelligent robot
CN114783421A (en) Intelligent recommendation method and device, equipment and medium
CN117520503A (en) Financial customer service dialogue generation method, device, equipment and medium based on LLM model
CN116882372A (en) Text generation method, device, electronic equipment and storage medium
CN114186048A (en) Question-answer replying method and device based on artificial intelligence, computer equipment and medium
CN114186041A (en) Answer output method
CN114186040A (en) Operation method of intelligent robot customer service
US11361032B2 (en) Computer driven question identification and understanding within a commercial tender document for automated bid processing for rapid bid submission and win rate enhancement
CN116542676A (en) Intelligent customer service system based on big data analysis and method thereof
CN111651554A (en) Insurance question-answer method and device based on natural language understanding and processing
CN115019788A (en) Voice interaction method, system, terminal equipment and storage medium
CN112989001B (en) Question and answer processing method and device, medium and electronic equipment
CN113010664A (en) Data processing method and device and computer equipment
CN112383593B (en) Intelligent content pushing method and device based on offline accompanying visit and computer equipment
CN112565663B (en) Demand question reply method and device, terminal equipment and storage medium
Moré López et al. A semi-automated system for recognizing prior knowledge

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination