CN113806475B - Information reply method, device, electronic equipment and storage medium - Google Patents
Information reply method, device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN113806475B CN113806475B CN202110419128.1A CN202110419128A CN113806475B CN 113806475 B CN113806475 B CN 113806475B CN 202110419128 A CN202110419128 A CN 202110419128A CN 113806475 B CN113806475 B CN 113806475B
- Authority
- CN
- China
- Prior art keywords
- replied
- named entity
- information
- question
- word
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 59
- 230000011218 segmentation Effects 0.000 claims description 6
- 238000004590 computer program Methods 0.000 claims description 4
- 230000001960 triggered effect Effects 0.000 claims description 3
- 230000003993 interaction Effects 0.000 abstract description 10
- 230000008569 process Effects 0.000 description 13
- 238000004891 communication Methods 0.000 description 8
- 238000011084 recovery Methods 0.000 description 8
- 238000012549 training Methods 0.000 description 8
- 230000006870 function Effects 0.000 description 7
- 238000012545 processing Methods 0.000 description 6
- 238000010586 diagram Methods 0.000 description 5
- 238000003058 natural language processing Methods 0.000 description 5
- PCHJSUWPFVWCPO-UHFFFAOYSA-N gold Chemical compound [Au] PCHJSUWPFVWCPO-UHFFFAOYSA-N 0.000 description 4
- 239000010931 gold Substances 0.000 description 4
- 229910052737 gold Inorganic materials 0.000 description 4
- 238000003491 array Methods 0.000 description 2
- 230000002452 interceptive effect Effects 0.000 description 2
- 238000002372 labelling Methods 0.000 description 2
- 239000000463 material Substances 0.000 description 2
- 241000227425 Pieris rapae crucivora Species 0.000 description 1
- 230000004913 activation Effects 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 230000002457 bidirectional effect Effects 0.000 description 1
- 238000013527 convolutional neural network Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000000802 evaporation-induced self-assembly Methods 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 230000000873 masking effect Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 230000008520 organization Effects 0.000 description 1
- 230000001151 other effect Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 238000011176 pooling Methods 0.000 description 1
- 238000013519 translation Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/30—Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
- G06F16/33—Querying
- G06F16/332—Query formulation
- G06F16/3329—Natural language query formulation or dialogue systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/30—Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
- G06F16/33—Querying
- G06F16/3331—Query processing
- G06F16/334—Query execution
- G06F16/3344—Query execution using natural language analysis
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/30—Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
- G06F16/33—Querying
- G06F16/3331—Query processing
- G06F16/334—Query execution
- G06F16/3346—Query execution using probabilistic model
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/30—Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
- G06F16/35—Clustering; Classification
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/20—Natural language analysis
- G06F40/205—Parsing
- G06F40/211—Syntactic parsing, e.g. based on context-free grammar [CFG] or unification grammars
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/20—Natural language analysis
- G06F40/205—Parsing
- G06F40/216—Parsing using statistical methods
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/20—Natural language analysis
- G06F40/279—Recognition of textual entities
- G06F40/289—Phrasal analysis, e.g. finite state techniques or chunking
- G06F40/295—Named entity recognition
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/045—Combinations of networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/047—Probabilistic or stochastic networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Computational Linguistics (AREA)
- Artificial Intelligence (AREA)
- Data Mining & Analysis (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Mathematical Physics (AREA)
- Databases & Information Systems (AREA)
- Computing Systems (AREA)
- Molecular Biology (AREA)
- Evolutionary Computation (AREA)
- Biophysics (AREA)
- Software Systems (AREA)
- Biomedical Technology (AREA)
- Probability & Statistics with Applications (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Life Sciences & Earth Sciences (AREA)
- Human Computer Interaction (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Machine Translation (AREA)
Abstract
The application provides an information reply method, an information reply device, electronic equipment and a storage medium, wherein the information reply method comprises the following steps: obtaining a problem to be replied, comparing the similarity between the problem to be replied and each preset problem with a preset similarity threshold, and under the condition that the similarity between the problem to be replied and each preset problem is smaller than the preset similarity threshold, carrying out named entity recognition on the problem to be replied to obtain a named entity recognition result of the problem to be replied, determining reply information of the problem to be replied according to the named entity recognition result, and outputting the reply information. Therefore, the similarity between the received problem to be replied and each preset problem is smaller than the preset similarity threshold, named entity identification is carried out on the problem to be replied, and reply information of the problem to be replied is determined according to the named entity identification result of the problem to be replied, so that the problem to be replied is replied, and man-machine interaction experience is improved.
Description
Technical Field
The present application relates to the field of computers, and in particular, to an information reply method, an information reply device, an electronic device, and a storage medium.
Background
In the related art, in the current intelligent customer service system of the chat robot in the vertical field, in the process of interacting with the intelligent customer service system, after a user inputs problem information to the intelligent customer service system, when it is determined that a problem similar to the technical problem does not exist in a knowledge base, the intelligent customer service system directly outputs a clear speech. The interaction mode which only gives clear words is too simple, and the man-machine interaction experience of the user is affected.
Disclosure of Invention
The application provides an information reply method, an information reply device, electronic equipment and a storage medium.
In one aspect, an embodiment of the present application provides an information reply method, including: acquiring a problem to be replied; under the condition that the similarity between the to-be-replied problem and each preset problem is smaller than a preset similarity threshold, carrying out named entity recognition on the to-be-replied problem to obtain a named entity recognition result of the to-be-replied problem; determining reply information of the to-be-replied problem according to the named entity identification result; and outputting the reply information.
In one embodiment of the present application, the identifying the named entity of the to-be-replied question to obtain a named entity identification result of the to-be-replied question includes: and inputting the to-be-replied problem into a pre-trained named entity recognition model to obtain a named entity recognition result of the to-be-replied problem.
In an embodiment of the present application, the named recognition model includes a semantic representation layer, a conditional random field layer, and a full connection layer that are sequentially connected, and the inputting the to-be-replied question into a pre-trained named entity recognition model to obtain a named entity recognition result of the to-be-replied question includes: inputting the to-be-replied problem into the semantic representation layer to obtain semantic representation characteristics of the to-be-replied problem; inputting the semantic representation features to the conditional random field layer to obtain the probability of the named entity category corresponding to each word in the to-be-replied problem; and inputting the probability of the named entity category corresponding to each word segmentation to a full-connection layer to obtain a named entity identification result corresponding to the to-be-replied problem.
In one embodiment of the present application, before the determining the reply message of the to-be-replied question according to the named entity recognition result, the method includes: determining the category number of the named entity categories according to the named entity identification result; and under the condition that the number of the categories is one, generating corresponding question-back statement information according to the text information corresponding to the named entity category, and taking the question-back statement information as the reply information of the to-be-replied question.
In one embodiment of the application, the method further comprises: under the condition that the number of categories is a plurality of, disassembling the to-be-replied problem to disassemble the to-be-replied problem into a plurality of sentences; determining a named entity category of each sentence, and generating back-question sentence information corresponding to the sentence according to text information corresponding to the named entity category; and generating reply information of the to-be-replied problem according to the corresponding question-back statement information of each statement.
In one embodiment of the present application, the generating corresponding query sentence information according to the text information corresponding to the named entity category includes: judging whether the number of the operation words is a plurality of operation words or not under the condition that the named entity category is the operation word; and if the number of the operation words is a plurality of, generating corresponding question-back statement information according to the text information corresponding to each operation word.
In one embodiment of the application, the method further comprises: if the number of the operation words is one, acquiring text information corresponding to the operation words; acquiring entity word information corresponding to the text information; and generating corresponding question-back statement information according to the entity word information.
In one embodiment of the present application, the obtaining entity word information corresponding to the text information includes: acquiring service information corresponding to the to-be-replied problem; acquiring an entity word information set corresponding to the service information; and acquiring entity word information corresponding to the text information from the entity word information set.
In the information replying method, in the process of receiving the reply information of the to-be-replied problem, the similarity between the to-be-replied problem and each preset problem is compared with a preset similarity threshold, and under the condition that the similarity between the to-be-replied problem and each preset problem is smaller than the preset similarity threshold, named entity recognition is carried out on the to-be-replied problem, so that a named entity recognition result of the to-be-replied problem is obtained, the reply information of the to-be-replied problem is determined according to the named entity recognition result, and the reply information is output. Therefore, the similarity between the received to-be-replied problem and each preset problem is smaller than a preset similarity threshold value, named entity identification is carried out on the to-be-replied problem, and reply information of the to-be-replied problem is determined according to the named entity identification result of the to-be-replied problem. Therefore, the recovery of the problem to be recovered is realized by combining the named entity recognition result of the problem to be recovered, and the man-machine interaction experience is improved.
Another embodiment of the present application provides an information reply device, including: the acquisition module is used for acquiring the problem to be replied; the named entity recognition module is used for carrying out named entity recognition on the to-be-replied problem under the condition that the similarity between the to-be-replied problem and each preset problem is smaller than a preset similarity threshold value so as to obtain a named entity recognition result of the to-be-replied problem; the first determining module is used for determining reply information of the to-be-replied problem according to the named entity identification result; and the output module is used for outputting the reply information.
In one embodiment of the present application, the named entity recognition module includes: and the named entity recognition unit is used for inputting the to-be-replied problem into a pre-trained named entity recognition model so as to obtain a named entity recognition result of the to-be-replied problem.
In one embodiment of the present application, the named entity recognition model includes a semantic representation layer, a conditional random field layer, and a fully connected layer connected in sequence, and the named entity recognition unit is specifically configured to: inputting the to-be-replied problem into the semantic representation layer to obtain semantic representation characteristics of the to-be-replied problem; inputting the semantic representation features to the conditional random field layer to obtain the probability of the named entity category corresponding to each word in the to-be-replied problem; and inputting the probability of the named entity category corresponding to each word segmentation to a full-connection layer to obtain a named entity identification result corresponding to the to-be-replied problem.
In one embodiment of the application, the apparatus comprises: the second determining module is used for determining the category number of the named entity categories according to the named entity identification result; the first reply determining module is used for generating corresponding back-question sentence information according to the text information corresponding to the named entity category under the condition that the category number is one, and taking the back-question sentence information as reply information of the to-be-replied problem.
In one embodiment of the application, the apparatus further comprises: the disassembly module is used for disassembling the problem to be replied under the condition that the number of the categories is multiple so as to disassemble the problem to be replied into a plurality of sentences; the first question-back sentence determining module is used for determining a named entity category of each sentence, and generating question-back sentence information corresponding to the sentence according to text information corresponding to the named entity category; and the second reply determining module is used for generating reply information of the to-be-replied problem according to the back-to-back statement information corresponding to each statement.
In one embodiment of the present application, the first query term determining module is specifically configured to: judging whether the number of the operation words is a plurality of operation words or not under the condition that the named entity category is the operation word; and if the number of the operation words is a plurality of, generating corresponding question-back statement information according to the text information corresponding to each operation word.
In one embodiment of the application, the apparatus further comprises: the second question-back sentence determining module is used for acquiring text information corresponding to the operation words if the number of the operation words is one; acquiring entity word information corresponding to the text information; and generating corresponding question-back statement information according to the entity word information.
In one embodiment of the present application, the second query term determining module is specifically configured to: acquiring service information corresponding to the to-be-replied problem; acquiring an entity word information set corresponding to the service information; and acquiring entity word information corresponding to the text information from the entity word information set.
In the information replying device provided by the embodiment of the application, in the process of receiving the reply information of the to-be-replied problem, the similarity between the to-be-replied problem and each preset problem is compared with a preset similarity threshold, and under the condition that the similarity between the to-be-replied problem and each preset problem is smaller than the preset similarity threshold, the named entity recognition is carried out on the to-be-replied problem, so that the named entity recognition result of the to-be-replied problem is obtained, the reply information of the to-be-replied problem is determined according to the named entity recognition result, and the reply information is output. Therefore, the similarity between the received to-be-replied problem and each preset problem is smaller than a preset similarity threshold value, named entity identification is carried out on the to-be-replied problem, and reply information of the to-be-replied problem is determined according to the named entity identification result of the to-be-replied problem. Therefore, the recovery of the problem to be recovered is realized by combining the named entity recognition result of the problem to be recovered, and the man-machine interaction experience is improved.
Another embodiment of the present application provides an electronic device, including: the system comprises a memory, a processor and a computer program stored in the memory and capable of running on the processor, wherein the processor executes the program to realize the information recovery method in the embodiment of the application.
Another embodiment of the present application proposes a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the information retrieval method of the embodiment of the present application.
Other effects of the above alternative will be described below in connection with specific embodiments.
Drawings
The drawings are included to provide a better understanding of the present application and are not to be construed as limiting the application. Wherein:
fig. 1 is a flowchart of an information reply method according to an embodiment of the present application.
Fig. 2 is a flowchart of another information reply method according to an embodiment of the present application.
Fig. 3 is a detailed flowchart of an information reply method according to an embodiment of the present application.
Fig. 4 is a schematic structural diagram of an information reply device according to an embodiment of the application.
Fig. 5 is a schematic structural diagram of an information restoring apparatus according to another embodiment of the present application.
Fig. 6 is a block diagram of an electronic device according to one embodiment of the application.
Detailed Description
Embodiments of the present invention are described in detail below, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to like or similar elements or elements having like or similar functions throughout. The embodiments described below by referring to the drawings are illustrative and intended to explain the present invention and should not be construed as limiting the invention.
The following describes an information reply method, an information reply device and electronic equipment according to the embodiment of the application with reference to the accompanying drawings.
Fig. 1 is a flowchart of an information reply method according to an embodiment of the present application. It should be noted that, the main execution body of the information reply method provided in this embodiment is an information reply device, where the information reply device may be implemented in a software and/or hardware manner, the information reply device in this embodiment may be configured in an electronic device, and the electronic device in this embodiment may include devices such as a terminal device and a server, and this embodiment does not specifically limit the electronic device.
Fig. 1 is a flowchart of an information reply method according to an embodiment of the present application.
As shown in fig. 1, the information reply method may include:
step 101, obtaining a problem to be replied.
Specifically, the questions to be replied received in the present application refer to the questions presented by the user.
Step 102, performing named entity recognition on the to-be-recovered problem under the condition that the similarity between the to-be-recovered problem and each preset problem is smaller than a preset similarity threshold value, so as to obtain a named entity recognition result of the to-be-recovered problem.
In this embodiment, after the problem to be replied is obtained, the problem may be matched with each problem in the knowledge base, so as to obtain the similarity between the problem and each problem.
In this embodiment, after determining the similarity between the to-be-recovered problem and each preset problem, it may be determined whether the similarity between the to-be-recovered problem and each preset problem is smaller than a preset similarity threshold, and if both the similarity is smaller than the similarity threshold, at this time, the named entity recognition may be performed on the received to-be-recovered problem according to a preset manner, so as to obtain a named entity recognition result of the to-be-recovered problem.
In some embodiments, the named entity recognition can be performed on the received to-be-replied question according to a preset named entity recognition rule, so as to obtain a named entity recognition result of the to-be-replied question.
Specifically, as a simple example, the sentence "8 am hours goes to school for lessons. In the process, the named entity identification is carried out, the information can be extracted, and the name of a person is: sheet, time: 8 am, location: school.
The named entity Recognition (NAMED ENTITY Recognition, referred to as NER for short) is an important basic tool in application fields such as information extraction, question-answering systems, syntactic analysis, machine translation and the like, and plays an important role in the process of the natural language processing technology going to practical use. In general, the task of named entity recognition is to identify named entities of three major classes (entity class, time class and digit class) and seven minor classes (person name, organization name, place name, time, date, currency and percentage) in the text to be processed.
And step 103, determining the reply information of the to-be-replied problem according to the named entity recognition result.
And 104, outputting the reply information.
In some embodiments, the intelligent machine may display the reply message on the interactive interface. In some embodiments, the intelligent machine may output the reply message by way of voice playing. In other embodiments, the intelligent machine may also output the reply information simultaneously through the interactive interface and the voice playing mode. The smart machine outputs the reply message without being limited thereto, and the manner of outputting the reply message is not particularly limited in this embodiment.
In the information replying method of the embodiment of the application, in the process of receiving the reply information of the problem to be replied, the similarity between the problem to be replied and each preset problem is compared with the preset similarity threshold, and under the condition that the similarity between the problem to be replied and each preset problem is smaller than the preset similarity threshold, the named entity recognition is carried out on the problem to be replied, so as to obtain the named entity recognition result of the problem to be replied, and the reply information of the problem to be replied is determined and the reply information is output according to the named entity recognition result. Therefore, the similarity between the received to-be-replied problem and each preset problem is smaller than a preset similarity threshold value, named entity identification is carried out on the to-be-replied problem, and reply information of the to-be-replied problem is determined according to the named entity identification result of the to-be-replied problem. Therefore, the recovery of the problem to be recovered is realized by combining the named entity recognition result of the problem to be recovered, and the man-machine interaction experience is improved.
Fig. 2 is a flowchart of another information reply method according to an embodiment of the present application.
As shown in fig. 2, the method may include:
in step 201, a question to be replied is obtained.
Step 202, under the condition that the similarity between the to-be-recovered problem and each preset problem is smaller than the preset similarity threshold, inputting the to-be-recovered problem into a pre-trained named entity recognition model to obtain a named entity recognition result of the to-be-recovered problem.
In some embodiments of the present application, in order to accurately determine a named entity recognition result of a to-be-replied problem through a named entity recognition model, the named entity recognition model in this embodiment may include a semantic representation layer, a conditional random field layer, and a full connection layer that are sequentially connected, and one possible implementation manner of inputting the to-be-replied problem into a pre-trained named entity recognition model to obtain the named entity recognition result of the to-be-replied problem is as follows: inputting the problem to be replied into a semantic representation layer to obtain semantic representation characteristics of the problem to be replied; inputting semantic representation features into a conditional random field layer to obtain the probability of the named entity category corresponding to each word in the problem to be replied; and inputting the probability of the named entity category corresponding to each word segmentation into the full-connection layer to obtain a named entity identification result corresponding to the problem to be replied.
In this embodiment, in order to accurately determine a named entity recognition result of a problem to be replied through a named entity recognition model, the named entity recognition model may be trained in combination with training data. Among the exemplary embodiments of training named recognition models are: obtaining training data, wherein the training data comprises sample problems and named entity identification marking data of the sample problems, the sample problems can be input into a semantic representation model to obtain semantic representation features of the sample problems, the semantic representation features are input into a conditional random field layer to obtain probabilities of named entity categories corresponding to each word in the problems to be replied, probabilities of named entity categories corresponding to each word are input into a full-connection layer to obtain named entity identification results corresponding to the problems to be replied, and parameters of the conditional random field layer and the full-connection layer in the named entity identification model are adjusted according to the named entity identification results and the named entity identification marking data until the named entity model meets preset conditions to obtain the trained named entity identification model. In some embodiments, the semantic representation layer may be a pre-trained language model in order to accurately represent the semantic features to be answered. As an exemplary embodiment, the pre-trained language model described above may be BERT (Bidirectional Encoder Representations from Transformers) models, or enhanced semantic representation models ERNIE (Enhanced Language Representation with Informative Entities).
The BERT model is a pre-training language model which is learned by performing non-supervision learning pre-training on a large-scale non-labeling corpus by using a framework of a transducer; the goal of the BERT model is to obtain the presentation of text containing rich semantic information using large scale unlabeled corpus training [ i.e.: semantic representation of text ]. The semantic representation of the text is then fine-tuned in the particular natural language processing (Natural Language Processing) NLP task, ultimately applied to the NLP task. BERT training procedure introduction: BERT is also pre-trained. Its weight is learned in advance by two unsupervised tasks. These two tasks are: masking language model (masked language model, MLM) and next sentence prediction (next sentence prediction). BERT application mode introduction BERT does not need to be trained from scratch for every new task. Instead, fine-tuning (fine-tuning) is performed on the pre-trained weights.
In some embodiments, the conditional random field layer may be a conditional random field model. The conditional random field CRF (conditional random fields) is a differential probability model, which is a random field, and is commonly used to label or analyze sequence data, and is a conditional probability distribution model P (y|x), which represents a markov random field for another set of output random variables Y given a set of input random variables X, that is, CRF is characterized by assuming that the output random variables constitute the markov random field. Conditional random fields can be seen as a generalization of the maximum entropy markov model over labeling problems.
Wherein the fully connected layer (fully connected layers, FC) acts as a "classifier" throughout the convolutional neural network. If the operations of the convolution layer, the pooling layer, the activation function layer, and the like are to map the original data to the hidden layer feature space, the fully connected layer functions to map the learned "distributed feature representation" to the sample mark space. In actual use, the full connection layer may be implemented by a convolution operation: the fully connected layer which is fully connected to the front layer can be converted into convolution with convolution kernel of 1x 1; whereas the fully connected layer, which is the convolutional layer, can be converted into a global convolution with a convolutional kernel hxw, h and w are the height and width of the convolutional result of the preceding layer, respectively.
Step 203, determining the reply information of the to-be-replied question according to the named entity recognition result.
In one embodiment of the present application, in order to accurately determine the reply information of the to-be-recovered problem, one possible implementation manner of determining the reply information of the to-be-recovered problem according to the named entity recognition result is as follows: determining the category number of the named entity categories according to the named entity identification result; and under the condition that the number of the categories is one, generating corresponding question-back statement information according to the text information corresponding to the named entity category, and taking the question-back statement information as the reply information of the to-be-replied question.
In some embodiments, in the case that the number of categories is multiple, the problem to be replied is disassembled, so that the problem to be replied is disassembled into multiple sentences; for each sentence, determining the named entity category of the sentence, and generating the corresponding back-question sentence information of the sentence according to the text information corresponding to the named entity category; and generating reply information of the to-be-replied problem according to the back-asking statement information corresponding to each statement.
In some embodiments of the present application, in the case that the name recognition category is an entity word type, corresponding question-back sentence information may be generated according to text information corresponding to the entity word.
For example, in the case where it is determined that the named entity category of the question to be replied is an entity word category, and the "white bar" corresponding to the entity word category, according to the text information corresponding to the entity word category, the generated question-back sentence information may be "please ask, what question of the white bar is you want to be consulted? ".
For another example, the question to be replied is "what is this white bar, what is the gold bar? The password entity category in the problem to be replied can be determined to be the entity word category through named entity recognition, text information corresponding to the entity word category is 'white bar' and 'gold bar', and the generated reverse question sentence information can be 'according to the text information corresponding to the entity word category': please ask you want to consult the white bar, which question of the gold bar? ".
In other embodiments, when the named entity type is an attribute word type, corresponding query sentence information may be generated according to text information corresponding to the attribute word type.
For example, in the case where the named entity category of the question to be replied is determined to be the attribute word category, and the "amount" corresponding to the attribute word is determined, according to the text information corresponding to the attribute word type, the generated question-in-return statement information may be "please ask, what business amount question you want to know? ".
For example, the question to be replied is "the amount and the balance", the named entity type of the question to be replied is determined to be the category of the attribute word by identifying the named entity of the question to be replied, and two attribute words are respectively "the amount" and "the balance", at this time, according to the text information corresponding to the category of the attribute word, the generated question-in-question sentence information is "please ask, you want to know which question woolen in the amount and the balance".
In other embodiments, in the case where the named entity class is an operation word, determining whether the number of operation words is plural; if the number of the operation words is a plurality of, corresponding question-back sentence information is generated according to the text information corresponding to each operation word.
For example, when determining that the named entity category of the question to be replied is an operation word, and "how open, how active, how query" corresponding to the operation word, according to the text information corresponding to the operation word type, the generated question-reversing sentence information may be "please ask, how open, how active, how query which question? ".
In other embodiments, if the number of the operation words is one, text information corresponding to the operation words is acquired, entity word information corresponding to the text information is acquired, and corresponding question-back sentence information is generated according to the entity word information.
For example, when determining that the named entity category of the question to be replied is an operation word, and in the case of "how open" corresponding to the operation word, according to the text information corresponding to the operation word category, the generated question-reversing sentence information may be "please ask, you want to know which open question in a common white bar, a gold bar, and a small treasury? ".
It can be understood that, in different application scenarios, the above-mentioned ways of obtaining the entity word information corresponding to the text information are different, for example, as follows:
As an exemplary embodiment, the entity word information corresponding to the text information may be obtained according to a correspondence relationship between the text information corresponding to the operation word and the entity word information stored in advance.
It should be noted that, the text information and the entity word information corresponding to the operation word in the corresponding relation are identified by a named entity identification model. Specifically, a plurality of entity words corresponding to each operation word can be counted, and a corresponding relation between the operation word and the entity word is established.
As another exemplary embodiment, in order to quickly and accurately determine the entity word information corresponding to the text information, one possible implementation manner of obtaining the entity word information corresponding to the text information is: and acquiring corresponding service information, acquiring an entity word information set corresponding to the service information, and acquiring entity word information corresponding to the text information from the entity word information set.
The service information may include service name information and/or service identification information, and the embodiment is not particularly limited.
Step 204, outputting the reply message.
In the information replying method of the embodiment of the application, in the process of receiving the reply information of the problem to be replied, the similarity between the problem to be replied and each preset problem is compared with the preset similarity threshold, and under the condition that the similarity between the problem to be replied and each preset problem is smaller than the preset similarity threshold, the named entity recognition is carried out on the problem to be replied, so as to obtain the named entity recognition result of the problem to be replied, and the reply information of the problem to be replied is determined and the reply information is output according to the named entity recognition result. Therefore, the similarity between the received to-be-replied problem and each preset problem is smaller than a preset similarity threshold value, named entity identification is carried out on the to-be-replied problem, and reply information of the to-be-replied problem is determined according to the named entity identification result of the to-be-replied problem. Therefore, the recovery of the problem to be recovered is realized by combining the named entity recognition result of the problem to be recovered, and the man-machine interaction experience is improved.
In order to make the technical solution of the present application clear to those skilled in the art, the technical solution of this embodiment will be further described with reference to fig. 3, where subj in fig. 3 represents an entity word, pred represents an operation word, and prop represents an attribute word.
Specifically, in step 301, after the user inputs a query term (query), the query term may be used as a question to be replied to. Correspondingly, the named entity recognition model can be used for carrying out named entity recognition model on the query word through the named entity recognition model so as to obtain a named entity recognition result of the problem to be replied.
Correspondingly, in step 302, several categories in the named entity recognition result are determined. In this embodiment, three types are taken as examples, which are entity word type, operation word type and attribute word type. That is, several categories in the named entity recognition result are determined.
Step 303, judging the category in the named entity recognition result, judging whether the named entity recognition result is a plurality of sentences, and if not, outputting a clear conversation; if the sentence is multiple, the sentence is split and decomposed into multiple single element lists.
Step 304, in the case where one category is included in the named entity recognition result, may perform a single element range according to one of three categories:
If the number of categories identified by the named entity only contains one subj, then the question "please ask, what questions of what are you want to consult subj? "; if it contains > =2 or more subj, then ask "ask you want to consult what question subj, subj, subj3..is? "
Step 306, if only one prop is contained, ask back "please ask you want to know what service's prop? "; if there are > 2 or more pro, then ask "please ask what question do you want pro 1, pro 2, pro 3 …? "
Step 307, if only one pred is contained, returning an entity query list according to the pred; if there are >2 preds, then ask "please ask you want to consult which question of pred1, pred2, pred3 …? "
In some embodiments, where multiple types are included in the named entity recognition result, multiple element processing logic may be employed to symbolically break sentences, each sentence being processed by single element processing logic.
An exemplary process of post-query logic processing is as follows: three slots are opened up in redis before the challenge logic is performed: subj, pred, prop, are all initially empty, if only one subj is contained, then ask "please ask, what questions of subj you want to be consulted? ". After the user inputs the query, the model identifies subj, the subj is filled into subj slots, after the user answers the questions, the element NER identification is carried out according to the questions answered by the user, pred or prop are identified, the corresponding slots are filled, the answer logic is triggered again after the questions are spliced, and after the domain words are switched, all slots are cleared. If it contains > =2 or more subj, then ask "ask you want to consult what question subj, subj, subj3..is? ". The user answers subj, fills in subj corresponding slots, walks the list element to query the logic, and asks to continue filling in slots until a faq answer is found.
Wherein, redis is all called: remote Dictionary Server (remote data service), which is a high-performance key-value database based on memory. faq is an abbreviation for Frequently Asked Questions, i.e. "frequently asked questions".
In the information replying method of the embodiment of the application, in the process of receiving the reply information of the problem to be replied, the similarity between the problem to be replied and each preset problem is compared with the preset similarity threshold, and under the condition that the similarity between the problem to be replied and each preset problem is smaller than the preset similarity threshold, the problem to be replied is named and identified through a pre-trained named entity identification model, so that a named entity identification result of the problem to be replied is obtained, and the reply information of the problem to be replied is determined and the reply information is output according to the named entity identification result. Therefore, the similarity between the received to-be-replied problem and each preset problem is smaller than a preset similarity threshold value, named entity identification is carried out on the to-be-replied problem, and reply information of the to-be-replied problem is determined according to the named entity identification result of the to-be-replied problem. Therefore, the recovery of the problem to be recovered is realized by combining the named entity recognition result of the problem to be recovered, and the man-machine interaction experience is improved.
FIG. 4 is a schematic diagram illustrating an information retrieval apparatus according to an embodiment of the present application
As shown in fig. 4, the information reply device 400 includes:
the obtaining module 401 is configured to obtain a problem to be replied.
The named entity recognition module 402 is configured to perform named entity recognition on the to-be-recovered problem to obtain a named entity recognition result of the to-be-recovered problem when the similarity between the to-be-recovered problem and each preset problem is smaller than a preset similarity threshold.
The first determining module 403 is configured to determine reply information of the to-be-replied question according to the named entity recognition result.
And the output module 404 is configured to output the reply information.
In the information replying device provided by the embodiment of the application, in the process of receiving the reply information of the to-be-replied problem, the similarity between the to-be-replied problem and each preset problem is compared with the preset similarity threshold, and in the case that the similarity between the to-be-replied problem and each preset problem is determined to be smaller than the preset similarity threshold, the named entity recognition is carried out on the to-be-replied problem, so that the named entity recognition result of the to-be-replied problem is obtained, the reply information of the to-be-replied problem is determined according to the named entity recognition result, and the reply information is output. Therefore, the similarity between the received to-be-replied problem and each preset problem is smaller than a preset similarity threshold value, named entity identification is carried out on the to-be-replied problem, and reply information of the to-be-replied problem is determined according to the named entity identification result of the to-be-replied problem. Therefore, the recovery of the problem to be recovered is realized by combining the named entity recognition result of the problem to be recovered, and the man-machine interaction experience is improved.
In one embodiment of the present application, as shown in fig. 5, the named entity identifying module 402 may include:
The named entity recognition unit 4021 is configured to input a to-be-replied question into a pre-trained named entity recognition model to obtain a named entity recognition result of the to-be-replied question.
In one embodiment of the present application, the named entity recognition model may include a semantic representation layer, a conditional random field layer, and a fully connected layer, which are sequentially connected, and the named entity recognition unit 4021 is specifically configured to:
inputting the problem to be replied into a semantic representation layer to obtain semantic representation characteristics of the problem to be replied;
inputting semantic representation features into a conditional random field layer to obtain the probability of the named entity category corresponding to each word in the problem to be replied;
And inputting the probability of the named entity category corresponding to each word segmentation into the full-connection layer to obtain a named entity identification result corresponding to the problem to be replied.
In one embodiment of the present application, as shown in fig. 5, the apparatus may further include:
The second determining module 405 is configured to determine, according to the named entity recognition result, a category number of the named entity category.
The first reply determination module 406 is configured to generate corresponding question-back sentence information according to text information corresponding to the named entity category when the number of categories is one, and take the question-back sentence information as reply information of the question to be replied.
The disassembly module 407 is configured to disassemble the to-be-replied question into a plurality of sentences when the number of categories is a plurality of.
A first question-back sentence determining module 408, configured to determine, for each sentence, a named entity category of the sentence, and generate question-back sentence information corresponding to the sentence according to text information corresponding to the named entity category;
the second reply determining module 409 is configured to generate reply information of the to-be-replied question according to the query statement information corresponding to each statement.
In one embodiment of the present application, the first query term determining module 408 is specifically configured to: and under the condition that the named entity category is the operation word, judging whether the number of the operation words is a plurality of operation words, and if the number of the operation words is a plurality of operation words, generating corresponding back-question sentence information according to text information corresponding to each operation word.
In one embodiment of the present application, as shown in fig. 5, the apparatus may further include:
a second query term determining module 410, configured to obtain text information corresponding to the operation term if the number of the operation terms is one; acquiring entity word information corresponding to the text information; and generating corresponding question-back statement information according to the entity word information.
In one embodiment of the present application, the second query term determination module 410 is specifically configured to: acquiring service information corresponding to the to-be-replied problem; acquiring an entity word information set corresponding to the service information; and acquiring entity word information corresponding to the text information from the entity word information set.
In the information replying device provided by the embodiment of the application, in the process of receiving the reply information of the to-be-replied problem, the similarity between the to-be-replied problem and each preset problem is compared with the preset similarity threshold, and in the case that the similarity between the to-be-replied problem and each preset problem is determined to be smaller than the preset similarity threshold, the named entity recognition is carried out on the to-be-replied problem, so that the named entity recognition result of the to-be-replied problem is obtained, the reply information of the to-be-replied problem is determined according to the named entity recognition result, and the reply information is output. Therefore, the similarity between the received to-be-replied problem and each preset problem is smaller than a preset similarity threshold value, named entity identification is carried out on the to-be-replied problem, and reply information of the to-be-replied problem is determined according to the named entity identification result of the to-be-replied problem. Therefore, the recovery of the problem to be recovered is realized by combining the named entity recognition result of the problem to be recovered, and the man-machine interaction experience is improved.
According to an embodiment of the present application, the present application also provides an electronic device and a readable storage medium.
As shown in fig. 6, is a block diagram of an electronic device according to one embodiment of the application.
As shown in fig. 6, the electronic device includes:
Memory 601, processor 602, and computer instructions stored on memory 601 and executable on processor 602.
The processor 602, when executing instructions, implements the information retrieval method provided in the above embodiments.
Further, the electronic device further includes:
a communication interface 603 for communication between the memory 601 and the processor 602.
A memory 601 for storing computer instructions executable on the processor 602.
The memory 601 may comprise a high-speed RAM memory or may further comprise a non-volatile memory (non-volatile memory), such as at least one disk memory.
A processor 602, configured to implement the information reply method of the above embodiment when executing a program.
If the memory 601, the processor 602, and the communication interface 603 are implemented independently, the communication interface 603, the memory 601, and the processor 602 may be connected to each other through a bus and perform communication with each other. The bus may be an industry standard architecture (Industry Standard Architecture, abbreviated ISA) bus, an external device interconnect (PERIPHERAL COMPONENT, abbreviated PCI) bus, or an extended industry standard architecture (Extended Industry Standard Architecture, abbreviated EISA) bus, among others. The buses may be divided into address buses, data buses, control buses, etc. For ease of illustration, only one thick line is shown in fig. 6, but not only one bus or one type of bus.
Alternatively, in a specific implementation, if the memory 601, the processor 602, and the communication interface 603 are integrated on a chip, the memory 601, the processor 602, and the communication interface 603 may perform communication with each other through internal interfaces.
The processor 602 may be a central processing unit (Central Processing Unit, abbreviated as CPU), or an Application SPECIFIC INTEGRATED Circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the application.
Furthermore, the terms "first," "second," and the like, are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In the description of the present invention, the meaning of "plurality" means at least two, for example, two, three, etc., unless specifically defined otherwise.
In the description of the present specification, a description referring to terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present invention. In this specification, schematic representations of the above terms are not necessarily directed to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, the different embodiments or examples described in this specification and the features of the different embodiments or examples may be combined and combined by those skilled in the art without contradiction.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and additional implementations are included within the scope of the preferred embodiment of the present application in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order from that shown or discussed, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the embodiments of the present application.
Logic and/or steps represented in the flowcharts or otherwise described herein, e.g., a ordered listing of executable instructions for implementing logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium may even be paper or other suitable medium upon which the program is printed, as the program may be electronically captured, via, for instance, optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner, if necessary, and then stored in a computer memory.
It is to be understood that portions of the present application may be implemented in hardware, software, firmware, or a combination thereof. In the above-described embodiments, the various steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. As with the other embodiments, if implemented in hardware, may be implemented using any one or combination of the following techniques, as is well known in the art: discrete logic circuits having logic gates for implementing logic functions on data signals, application specific integrated circuits having suitable combinational logic gates, programmable Gate Arrays (PGAs), field Programmable Gate Arrays (FPGAs), and the like.
Those of ordinary skill in the art will appreciate that all or part of the steps carried out in the method of the above-described embodiments may be implemented by a program to instruct related hardware, and the program may be stored in a computer readable storage medium, where the program when executed includes one or a combination of the steps of the method embodiments.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing module, or each unit may exist alone physically, or two or more units may be integrated in one module. The integrated modules may be implemented in hardware or in software functional modules. The integrated modules may also be stored in a computer readable storage medium if implemented as software functional modules and sold or used as a stand-alone product.
While embodiments of the present invention have been shown and described above, it will be understood that the above embodiments are illustrative and not to be construed as limiting the invention, and that variations, modifications, alternatives and variations may be made to the above embodiments by one of ordinary skill in the art within the scope of the invention.
Claims (16)
1. An information reply method, characterized in that the method comprises:
acquiring a problem to be replied;
under the condition that the similarity between the to-be-replied problem and each preset problem is smaller than a preset similarity threshold, carrying out named entity recognition on the to-be-replied problem to obtain a named entity recognition result of the to-be-replied problem;
determining reply information of the to-be-replied problem according to the named entity identification result;
Outputting the reply information;
The step of identifying the named entity of the to-be-replied question to obtain the named entity identification result of the to-be-replied question comprises the following steps:
Inputting the to-be-replied problem into a pre-trained named entity recognition model to obtain a named entity recognition result of the to-be-replied problem, wherein the named entity recognition result comprises: after the user inputs the to-be-replied question, the pre-trained named entity recognition model recognizes the entity word class, the entity word class is filled in the entity word class slot, after the user answers the question, element NER recognition is carried out according to the question answered by the user, the operation word class or the attribute word class is recognized to be filled in the corresponding slot, answer logic is triggered again after the question is spliced, and all slots are cleared until the domain word is switched.
2. The method of claim 1, wherein the named entity recognition model includes a semantic representation layer, a conditional random field layer, and a fully connected layer connected in sequence, the inputting the question to be replied to a pre-trained named entity recognition model to obtain a named entity recognition result of the question to be replied, comprising:
Inputting the to-be-replied problem into the semantic representation layer to obtain semantic representation characteristics of the to-be-replied problem;
inputting the semantic representation features to the conditional random field layer to obtain the probability of the named entity category corresponding to each word in the to-be-replied problem;
and inputting the probability of the named entity category corresponding to each word segmentation to a full-connection layer to obtain a named entity identification result corresponding to the to-be-replied problem.
3. The method of claim 1, wherein determining the reply message to the question to be replied according to the named entity recognition result comprises:
determining the category number of the named entity categories according to the named entity identification result;
And under the condition that the number of the categories is one, generating corresponding question-back statement information according to the text information corresponding to the named entity category, and taking the question-back statement information as the reply information of the to-be-replied question.
4. A method as claimed in claim 3, wherein the method further comprises:
Under the condition that the number of categories is a plurality of, disassembling the to-be-replied problem to disassemble the to-be-replied problem into a plurality of sentences;
Determining a named entity category of each sentence, and generating back-question sentence information corresponding to the sentence according to text information corresponding to the named entity category;
and generating reply information of the to-be-replied problem according to the corresponding question-back statement information of each statement.
5. The method of claim 3, wherein generating corresponding query term information from text information corresponding to the named entity category comprises:
judging whether the number of the operation words is a plurality of operation words or not under the condition that the named entity category is the operation word;
And if the number of the operation words is a plurality of, generating corresponding question-back statement information according to the text information corresponding to each operation word.
6. The method of claim 5, wherein the method further comprises:
If the number of the operation words is one, acquiring text information corresponding to the operation words;
Acquiring entity word information corresponding to the text information;
and generating corresponding question-back statement information according to the entity word information.
7. The method of claim 6, wherein the obtaining entity word information corresponding to the text information comprises:
acquiring service information corresponding to the to-be-replied problem;
Acquiring an entity word information set corresponding to the service information;
And acquiring entity word information corresponding to the text information from the entity word information set.
8. An information retrieval apparatus, the apparatus comprising:
The acquisition module is used for acquiring the problem to be replied;
the named entity recognition module is used for carrying out named entity recognition on the to-be-replied problem under the condition that the similarity between the to-be-replied problem and each preset problem is smaller than a preset similarity threshold value so as to obtain a named entity recognition result of the to-be-replied problem;
the first determining module is used for determining reply information of the to-be-replied problem according to the named entity identification result;
the output module is used for outputting the reply information;
the named entity recognition module comprises:
The named entity recognition unit is used for inputting the to-be-replied problem into a pre-trained named entity recognition model to obtain a named entity recognition result of the to-be-replied problem, and the named entity recognition result comprises: after the user inputs the to-be-replied question, the pre-trained named entity recognition model recognizes the entity word class, the entity word class is filled in the entity word class slot, after the user answers the question, element NER recognition is carried out according to the question answered by the user, the operation word class or the attribute word class is recognized to be filled in the corresponding slot, answer logic is triggered again after the question is spliced, and all slots are cleared until the domain word is switched.
9. The apparatus of claim 8, wherein the named entity recognition model comprises a semantic representation layer, a conditional random field layer, and a fully connected layer connected in sequence, the named entity recognition unit being specifically configured to:
Inputting the to-be-replied problem into the semantic representation layer to obtain semantic representation characteristics of the to-be-replied problem;
inputting the semantic representation features to the conditional random field layer to obtain the probability of the named entity category corresponding to each word in the to-be-replied problem;
and inputting the probability of the named entity category corresponding to each word segmentation to a full-connection layer to obtain a named entity identification result corresponding to the to-be-replied problem.
10. The apparatus of claim 8, wherein the apparatus comprises:
The second determining module is used for determining the category number of the named entity categories according to the named entity identification result;
the first reply determining module is used for generating corresponding back-question sentence information according to the text information corresponding to the named entity category under the condition that the category number is one, and taking the back-question sentence information as reply information of the to-be-replied problem.
11. The apparatus of claim 10, wherein the apparatus further comprises:
The disassembly module is used for disassembling the problem to be replied under the condition that the number of the categories is multiple so as to disassemble the problem to be replied into a plurality of sentences;
the first question-back sentence determining module is used for determining a named entity category of each sentence, and generating question-back sentence information corresponding to the sentence according to text information corresponding to the named entity category;
And the second reply determining module is used for generating reply information of the to-be-replied problem according to the back-to-back statement information corresponding to each statement.
12. The apparatus of claim 11, wherein the first query term determination module is specifically configured to:
judging whether the number of the operation words is a plurality of operation words or not under the condition that the named entity category is the operation word;
And if the number of the operation words is a plurality of, generating corresponding question-back statement information according to the text information corresponding to each operation word.
13. The apparatus of claim 12, wherein the apparatus further comprises:
the second question-back sentence determining module is used for acquiring text information corresponding to the operation words if the number of the operation words is one; acquiring entity word information corresponding to the text information; and generating corresponding question-back statement information according to the entity word information.
14. The apparatus of claim 13, wherein the second challenge sentence determination module is specifically configured to:
acquiring service information corresponding to the to-be-replied problem;
Acquiring an entity word information set corresponding to the service information;
And acquiring entity word information corresponding to the text information from the entity word information set.
15. An electronic device, comprising:
Memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the information retrieval method according to any of claims 1-7 when executing the program.
16. A computer-readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the information retrieval method according to any one of claims 1-7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110419128.1A CN113806475B (en) | 2021-04-19 | 2021-04-19 | Information reply method, device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110419128.1A CN113806475B (en) | 2021-04-19 | 2021-04-19 | Information reply method, device, electronic equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113806475A CN113806475A (en) | 2021-12-17 |
CN113806475B true CN113806475B (en) | 2024-07-19 |
Family
ID=78892941
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110419128.1A Active CN113806475B (en) | 2021-04-19 | 2021-04-19 | Information reply method, device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113806475B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115525804A (en) * | 2022-09-23 | 2022-12-27 | 中电金信软件有限公司 | Information query method and device, electronic equipment and storage medium |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112287090A (en) * | 2020-11-23 | 2021-01-29 | 深圳季连科技有限公司 | Financial question asking back method and system based on knowledge graph |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108153800B (en) * | 2016-12-06 | 2023-05-23 | 松下知识产权经营株式会社 | Information processing method, information processing apparatus, and recording medium |
US11200266B2 (en) * | 2019-06-10 | 2021-12-14 | International Business Machines Corporation | Identifying named entities in questions related to structured data |
US11334719B2 (en) * | 2020-11-09 | 2022-05-17 | The Abstract Operations Company | Systems and methods for predicting mapping between named entities and parameters using a model based on same predefined number of words that occur prior to the named entity via machine learning techniques |
-
2021
- 2021-04-19 CN CN202110419128.1A patent/CN113806475B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112287090A (en) * | 2020-11-23 | 2021-01-29 | 深圳季连科技有限公司 | Financial question asking back method and system based on knowledge graph |
Also Published As
Publication number | Publication date |
---|---|
CN113806475A (en) | 2021-12-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110442718B (en) | Statement processing method and device, server and storage medium | |
CN110188202B (en) | Training method and device of semantic relation recognition model and terminal | |
CN113672708B (en) | Language model training method, question-answer pair generation method, device and equipment | |
CN110727779A (en) | Question-answering method and system based on multi-model fusion | |
CN111046133A (en) | Question-answering method, question-answering equipment, storage medium and device based on atlas knowledge base | |
CN111708869B (en) | Processing method and device for man-machine conversation | |
CN111177350A (en) | Method, device and system for forming dialect of intelligent voice robot | |
CN108304387B (en) | Method, device, server group and storage medium for recognizing noise words in text | |
CN114757176A (en) | Method for obtaining target intention recognition model and intention recognition method | |
CN111177307A (en) | Test scheme and system based on semantic understanding similarity threshold configuration | |
CN111753553B (en) | Statement type identification method and device, electronic equipment and storage medium | |
CN110717021A (en) | Input text and related device for obtaining artificial intelligence interview | |
CN112579733A (en) | Rule matching method, rule matching device, storage medium and electronic equipment | |
CN111353026A (en) | Intelligent law attorney assistant customer service system | |
CN111625636A (en) | Man-machine conversation refusal identification method, device, equipment and medium | |
CN113806475B (en) | Information reply method, device, electronic equipment and storage medium | |
CN111309882B (en) | Method and device for realizing intelligent customer service question and answer | |
CN112818096A (en) | Dialog generating method and device | |
CN112632956A (en) | Text matching method, device, terminal and storage medium | |
CN109977420B (en) | Offline semantic recognition adjusting method, device, equipment and storage medium | |
CN116186219A (en) | Man-machine dialogue interaction method, system and storage medium | |
CN113743126B (en) | Intelligent interaction method and device based on user emotion | |
CN112989003B (en) | Intention recognition method, device, processing equipment and medium | |
CN113434630B (en) | Customer service evaluation method, customer service evaluation device, terminal equipment and medium | |
CN115881108A (en) | Voice recognition method, device, equipment and storage medium |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |