WO2021151271A1 - 基于命名实体的文本问答的方法、装置、设备及存储介质 - Google Patents
基于命名实体的文本问答的方法、装置、设备及存储介质 Download PDFInfo
- Publication number
- WO2021151271A1 WO2021151271A1 PCT/CN2020/098956 CN2020098956W WO2021151271A1 WO 2021151271 A1 WO2021151271 A1 WO 2021151271A1 CN 2020098956 W CN2020098956 W CN 2020098956W WO 2021151271 A1 WO2021151271 A1 WO 2021151271A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- answer
- question
- text
- corpus
- segmentation
- Prior art date
Links
Images
Classifications
-
- 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
- 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/35—Clustering; Classification
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/30—Semantic analysis
-
- 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/049—Temporal neural networks, e.g. delay elements, oscillating neurons or pulsed inputs
-
- 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
Definitions
- This application relates to the field of artificial intelligence data processing, and in particular to a method, device, device, and storage medium for text question and answer based on named entities.
- the first type of question answering system based on the word vector transformation method because the method is simple, it often fails to meet the requirements of the current scene because the method is simple, and the second type of question answering system based on the deep learning model can meet the requirements of the current scene, the inventor Realize that because the deep learning model requires a large amount of data calculations, if multiple users use the Q&A system at the same time, due to the high amount of calculation, the Q&A system often cannot respond in time, and the timeliness is poor.
- This application provides a text question answering method, device, equipment and storage medium based on named entities, the main purpose of which is to solve the problem of large amount of calculation in the text answering process and poor answering effect.
- a text question answering method based on named entities includes:
- this application also provides a text question answering device based on named entities, the device comprising:
- Entity text calculation module used to receive the consultation text input by the user, perform named entity recognition on the consultation text, and obtain the entity text set;
- Question and answer corpus calculation module used to obtain a question and answer corpus, and perform named entity recognition and named entity division on the question and answer corpus to obtain multiple question and answer corpus subsets;
- Coding module used to extract question and answer corpus subsets related to the consultation text from a plurality of said question and answer corpus subsets to form an answer text set, and perform segmentation and coding operations on the answer text set to obtain a question and answer code set ;
- Answer text calculation module used to input the question answering code set into the pre-trained deep learning question answering model to obtain the answer text of the consultation text.
- the present application also provides a computer device, including a memory, a processor, and a computer program stored in the memory and running on the processor, and the processor executes the computer program when the computer program is executed. The following steps:
- the present application also provides a computer-readable storage medium on which a computer program is stored, wherein, when the computer program is executed by a processor, the following steps are implemented:
- the embodiment of this application first performs named entity recognition on the received consultation text to obtain an entity text set.
- the named entity recognition operation can change the consultation text into an entity text set including person names, place names, organization names, proper nouns, etc., for the first time Reduce the amount of data; at the same time, perform the named entity recognition operation on the obtained question and answer corpus, and perform the second time to reduce the amount of data; in addition, the answer text set obtained by completing the named entity recognition is encoded and input into the deep learning question and answer model.
- the learning question answering model is more accurate in the answer text obtained by calculation. Therefore, this application solves the problem of high calculation amount and poor timeliness in the text answer process.
- FIG. 1 is a schematic flowchart of a text question answering method based on named entities provided by an embodiment of this application;
- FIG. 3 is a schematic diagram of modules of a text question answering device based on named entities provided by an embodiment of this application;
- FIG. 4 is a schematic diagram of the internal structure of a computer device for implementing a text question answering method based on a named entity provided by an embodiment of the application;
- This application provides a text question answering method based on named entities.
- FIG. 1 it is a schematic flowchart of a text question answering method based on named entities provided by an embodiment of this application.
- the method can be executed by a device, and the device can be implemented by software and/or hardware.
- the text question answering method based on named entities includes:
- the named entity recognition (Named Entity Recognition, NER for short) is also called “proper name recognition", which refers to identifying entities with specific meanings in a text, including names of persons, places, organizations, proper nouns, etc.
- SNER Stanford Named Entity Recognizer
- the Stanford recognition model is a named entity recognition program implemented in the Java programming language.
- the consultation text A entered by the user is: "I have diabetes for many years. I recently went to a hospital in Wuhan, but the effect was not very good. So I want to know whether there is a better treatment for diabetes in Beijing hospitals.” Recognize the model and perform named entity recognition on the consultation text A, so as to obtain entity text collections such as "diabetes”, “Wuhan”, “hospital”, and "Beijing".
- the embodiment of the application can obtain the question and answer corpus in a variety of ways, such as using crawlers to crawl relevant text data from the Internet and sort out the question and answer corpus, and use a public corpus that is currently published and downloadable, such as the country Language Commission Modern Chinese Corpus, Modern Chinese Marked Corpus, etc.
- the embodiment of the present application performs named entity recognition and named entity division processing on the obtained question and answer corpus.
- the S2 includes: performing named entity recognition on the question and answer corpus to obtain a question and answer entity set, and performing text division on the question and answer corpus according to the question and answer entities included in the question and answer entity set to obtain multiple questions and answers Corpus subset.
- the recognition model for named entity recognition in this step can be the Stanford recognition model described in S1, and other recognition models can also be used to recognize the question and answer corpus.
- corpus A_1 is: “Among all hospitals in Wuhan, Wuhan First People's Hospital is the most authoritative for diabetes treatment.” Then the question and answer entities included in corpus A_1 are “diabetes”, “Wuhan” and “Wuhan First People's Hospital", and so on, the question and answer entities “pneumonia” and "Tianjin” included in corpus A_2, and the question and answer entities "Beijing” included in corpus A_3 "", “diabetes”, etc., so it is necessary to divide the named entities by the question and answer entities included in each group of corpus, so as to obtain multiple question and answer corpus subsets with the same question and answer entity. For example, the question and answer corpus subset of "diabetes” is corpus A_1 and Corpus A_3, the question and answer corpus of "Pneumonia” is A_2,
- the embodiment of the application has divided the question and answer corpus into multiple question and answer corpus subsets according to the different named entities.
- the question and answer corpus subset the question and answer corpus subsets related to the consultation text are extracted to form an answer text set, and at the same time, the data of the text set is encoded to obtain an encoding set based on word vectors.
- the question and answer corpus of "diabetes” mentioned above is corpus A_1 and corpus A_3, and the question and answer corpus of "pneumonia” is A_2, etc., but because the user cares about "diabetes” rather than "pneumonia", the "pneumonia" is removed A subset of question and answer corpus is obtained, and a subset of question and answer corpus corresponding to the entity text set is obtained, and then the answer text set is formed.
- this application In order to better encode the data of the text set to obtain a word vector-based encoding set, this application first needs to perform a segmentation operation on the answer text set to facilitate subsequent encoding.
- the S32 includes: extracting each answer text in the answer text set, segmenting the answer text according to a preset segmentation rule to obtain answer segmentation words, and judging that the answer segmentation words are in the Whether the segmentation dictionary appears, if the answer segmentation word does not appear in the segmentation dictionary, segment the answer text again, if the answer segmentation word appears in the segmentation dictionary, continue to answer the answer The text is segmented until the answer text set is extracted to obtain the question and answer phrase set.
- the segmentation specifications include segmentation order, segmentation number, and segmentation tolerance.
- corpus A_1 is: "Wuhan First People's Hospital is the first authority for diabetes treatment among all hospitals in Wuhan.”
- the segmentation order is reverse segmentation, the segmentation number is 2 words, and the segmentation tolerance is 2, then the first segmentation corpus A_1 will get “hospital”, and judge whether there is "hospital” in the pre-built segmentation dictionary, if so
- corpus A_1 becomes: “Among all hospitals in Wuhan, the first authoritative ranking of diabetes treatment is the first people in Wuhan”, and the second segmentation is performed to obtain “people”.
- the encoding operation may use Google's Word2vec tool or the Huffman encoding method to perform an encoding operation on the question and answer phrase set to obtain a question and answer encoding set.
- Q&A coding sets are generally vector sets. Since vectors have good semantic characteristics, they can be used to characterize the characteristics of each text.
- the method further includes training the deep learning question answering model, wherein the training includes:
- Step A Combine multiple groups of long and short-term memory networks according to the preset network combination weight function to obtain the deep learning question answering model to be trained, and obtain the question answer training set and question answer label set, and input the question answer training set to all Describe the deep learning question answering model to be trained;
- Step B Calculate the correlation weight between each group of long and short-term memory networks to obtain the correlation weight set
- Step C Perform weighted summation and activation processing on the associated weight set to obtain a question and answer prediction set;
- Step D Calculate the error value of the question and answer prediction set and the question and answer label set, if the error value is greater than the preset error threshold, recalculate the association between each group of long and short-term memory networks according to the pre-built optimization function The weights get the associated weight set, and return to step C;
- Step E If the error value is less than or equal to the error threshold value, the trained deep learning question answering model is obtained.
- the Long-Short Term Memory is a kind of neural network that can memorize event information for a time length to complete classification and prediction.
- the long-short-term memory network includes input processing Status, forgetting processing status, and output processing status.
- the network combination weight function is as follows:
- h i represents the long and short-term memory network
- i is the number of each group of long- and short-term memory networks
- ⁇ t,i corresponds to the combined weight of the i-th long and short-term memory network at time t.
- the calculation of the correlation weight between each group of long and short-term memory networks to obtain the correlation weight set adopts the following calculation formula:
- u t, i represents the associated weight of the i th short and long term memory network weights
- V i, W i denote internal parameters depth study Q model
- h i denotes short and long term memory network
- S t indicate corresponding at time t The data processing state of the i-th long and short-term memory network.
- the method further includes normalizing the associated weight set.
- the normalization process adopts the following formula:
- T represents the total number of the associated weight sets
- u t,i represents the associated weight of the i-th long-short-term memory network
- at,i represents the normalized association of the i-th long-short-term memory network Weights.
- the activation process includes:
- f is the pre-built activation function
- C t represents the value after the weighted summation
- St-1 represents the data processing state of the i-th long and short-term memory network at time t-1
- y t-1 represents t
- y t is the predicted text of the question and answer at time t.
- the calculation of the error value of the question and answer prediction set and the question and answer label set may adopt a currently published exponential loss function or a square loss function.
- the deep learning question answering model after the training of the deep learning question answering model is completed, it can directly accept the question answering code set for intelligent answers.
- the consultation text A entered by the user is: "I have diabetes for many years. I recently went to a hospital in Wuhan, but the effect was not very good, so I want to know whether there is a better treatment for diabetes in Beijing hospitals.”
- S1 After S3 processing and inputting the encoded text into the trained deep learning question and answer model, you can get an answer similar to "Compared to all hospitals in Wuhan and Beijing, the most authoritative treatment for diabetes is Peking Union Medical College Hospital”.
- the embodiment of this application first performs named entity recognition on the received consultation text to obtain an entity text set.
- the named entity recognition operation can change the consultation text into an entity text set including person names, place names, organization names, proper nouns, etc., for the first time Reduce the amount of data; at the same time, perform the named entity recognition operation on the obtained question and answer corpus, and perform the second time to reduce the amount of data; in addition, the answer text set obtained by completing the named entity recognition is encoded and input into the deep learning question and answer model.
- the learning question answering model is more accurate in the answer text obtained by calculation. Therefore, this application solves the problem of high calculation amount and poor timeliness in the text answer process.
- FIG. 3 it is a functional module diagram of the text question answering device based on named entities in this application.
- the text question answering apparatus 100 based on named entity described in this application can be installed in a computer device.
- the text question answering device based on named entities may include an entity text calculation module 101, a question and answer corpus calculation module 102, an encoding module 103, and an answer text calculation module 104.
- the module described in the present invention can also be called a unit, which refers to a series of computer program segments that can be executed by the processor of a computer device and can complete fixed functions, and are stored in the memory of the computer device.
- each module/unit is as follows:
- the entity text calculation module 101 is configured to receive a consultation text input by a user, perform named entity recognition on the consultation text, and obtain an entity text set.
- the named entity recognition (Named Entity Recognition, NER for short) is also called “proper name recognition", which refers to identifying entities with specific meanings in a text, including names of persons, places, organizations, proper nouns, etc.
- the entity text calculation module 101 in the embodiment of the present application may use the currently published Stanford Named Entity Recognizer (SNER) to perform named entity recognition on the consultation text data.
- SNER Stanford Named Entity Recognizer
- the Stanford recognition model is a named entity recognition program implemented in the Java programming language.
- the consultation text A entered by the user is: "I have diabetes for many years. I recently went to a hospital in Wuhan, but the effect was not very good. So I want to know whether there is a better treatment for diabetes in Beijing hospitals.” Recognize the model and perform named entity recognition on the consultation text A, so as to obtain entity text collections such as "diabetes”, “Wuhan”, “hospital”, and "Beijing".
- the question and answer corpus calculation module 102 is used to obtain a question and answer corpus, and perform named entity recognition and named entity division on the question and answer corpus to obtain multiple question answer corpus subsets.
- the question and answer corpus calculation module 102 described in the embodiment of the present application can obtain the question and answer corpus in a variety of ways, such as using crawlers to crawl relevant text data from the Internet and sort out the question and answer corpus, which is currently public and downloadable
- the public corpus such as the National Language Commission Modern Chinese Corpus, Modern Chinese Marked Corpus, etc.
- the question and answer corpus calculation module 102 is used to perform named entity recognition and named entity division processing on the obtained question and answer corpus.
- the question and answer corpus calculation module 102 is specifically configured to perform named entity recognition on the question and answer corpus to obtain a question and answer entity set, and perform text on the question and answer corpus according to the question and answer entities included in the question and answer entity set. Divide, get multiple question and answer corpus subsets.
- the recognition model for named entity recognition used in the question and answer corpus calculation module 102 may be the aforementioned Stanford recognition model, and other recognition models may also be used to recognize the question and answer corpus.
- corpus A_1 is: “Among all hospitals in Wuhan, Wuhan First People's Hospital is the most authoritative for diabetes treatment.” Then the question and answer entities included in corpus A_1 are “diabetes”, “Wuhan” and “Wuhan First People's Hospital”, and so on, the question and answer entities “pneumonia” and "Tianjin” included in corpus A_2, and the question and answer entities "Beijing" included in corpus A_3 ", "diabetes”, etc., so the question and answer corpus calculation module 102 needs to divide the named entities by the question and answer entities included in each group of corpus, so as to obtain multiple question and answer corpus subsets with the same question and answer entity, such as the question and answer of "diabetes"
- the corpus subset is corpus A_1 and corpus A_3, and the question and answer corpus subset
- the coding module 103 is configured to extract a question and answer corpus subset related to the consultation text from the plurality of question and answer corpus subsets to form an answer text set, and perform segmentation and encoding operations on the answer text set to obtain a question and answer code set.
- the question and answer corpus has been divided into multiple question and answer corpus subsets according to the different named entities.
- the encoding module 103 needs to be used from multiple question and answer corpora.
- the question and answer corpus subset the question and answer corpus subsets related to the consultation text are extracted to form an answer text set, and at the same time, the data of the text set is encoded to obtain an encoding set based on word vectors.
- the encoding module 103 is specifically configured to: select a subset of the question and answer corpus corresponding to the entity text set from a plurality of the subsets of the question and answer corpus to form an answer text set; Perform a segmentation operation on the answer text set to obtain a question and answer phrase set; perform an encoding operation on the question and answer phrase set to obtain a question and answer code set.
- the question and answer corpus of "diabetes” above is corpus A_1 and corpus A_3, and the question and answer corpus of "pneumonia” is A_2, etc., but because the user cares about "diabetes” rather than "pneumonia", the "pneumonia" is removed A subset of question and answer corpus is obtained, and a subset of question and answer corpus corresponding to the entity text set is obtained, and then the answer text set is formed.
- this application In order to better encode the data of the text set to obtain an encoding set based on word vectors, this application first needs to perform a segmentation operation on the answer text set to facilitate subsequent encoding.
- the segmentation operation includes: extracting each answer text in the answer text set, segmenting the answer text according to a preset segmentation rule to obtain answer segmentation words, and judging the answer segmentation. Whether the word segmentation appears in the segmentation dictionary, if the answer segmentation word does not appear in the segmentation dictionary, segment the answer text again, if the answer segmentation word appears in the segmentation dictionary, continue The answer text is segmented until the answer text set is extracted to obtain the question and answer phrase set.
- the segmentation specifications include segmentation order, segmentation number, and segmentation tolerance.
- corpus A_1 is: "Wuhan First People's Hospital is the first authority for diabetes treatment among all hospitals in Wuhan.”
- the order of segmentation is reverse segmentation, the number of segmentation is 2 words, and the segmentation tolerance is 2, then the first segmentation corpus A_1 will get “hospital”, judge whether there is "hospital” in the pre-built segmentation dictionary, if so
- corpus A_1 becomes: “Among all hospitals in Wuhan, the first authoritative ranking of diabetes treatment is the first people in Wuhan”, and the second segmentation is performed to obtain “people”.
- the encoding operation may use Google's Word2vec tool or the Huffman encoding method to perform an encoding operation on the question and answer phrase set to obtain a question and answer encoding set.
- Q&A coding sets are generally vector sets. Since vectors have good semantic characteristics, they can be used to characterize the characteristics of each text.
- the answer text calculation module 104 is configured to input the question answering code set into the pre-trained deep learning question answering model to obtain answer text of the consultation text.
- the text question answering device 100 based on named entities described in this application further includes a model training module 105 for:
- the trained deep learning question answering model is obtained.
- the Long-Short Term Memory is a kind of neural network that can memorize event information for a time length to complete classification and prediction.
- the long-short-term memory network includes input processing Status, forgetting processing status, and output processing status.
- the network combination weight function is as follows:
- h i represents the long and short-term memory network
- i is the number of each group of long- and short-term memory networks
- ⁇ t,i corresponds to the combined weight of the i-th long and short-term memory network at time t.
- the calculation of the correlation weight between each group of long and short-term memory networks to obtain the correlation weight set adopts the following calculation formula:
- u t, i represents the associated weight of the i th short and long term memory network weights
- V i, W i denote internal parameters depth study Q model
- S t represents the corresponding at time t i-th short and long term memory network Data processing status.
- the method further includes normalizing the associated weight set.
- the normalization process adopts the following formula:
- T represents the total number of the associated weight sets
- u t,i represents the associated weight of the i-th long-short-term memory network
- at,i represents the normalized association of the i-th long-short-term memory network Weights.
- the activation process includes:
- f is the pre-built activation function
- C t represents the value after the weighted summation
- St-1 represents the data processing state of the i-th long and short-term memory network at time t-1
- y t-1 represents t
- y t is the predicted text of the question and answer at time t.
- the calculation of the error value of the question and answer prediction set and the question and answer label set may adopt a currently published exponential loss function or a square loss function.
- the deep learning question answering model after the training of the deep learning question answering model is completed, it can directly accept the question answering code set for intelligent answers.
- the consultation text A entered by the user is: "I have diabetes for many years. I recently went to a hospital in Wuhan, but the effect was not very good, so I want to know whether there is a better treatment for diabetes in Beijing hospitals.”
- S1 After S3 processing and inputting the encoded text into the trained deep learning question and answer model, you can get an answer similar to "Compared to all hospitals in Wuhan and Beijing, the most authoritative treatment for diabetes is Peking Union Medical College Hospital”.
- the embodiment of this application first performs named entity recognition on the received consultation text to obtain an entity text set.
- the named entity recognition operation can change the consultation text into an entity text set including person names, place names, organization names, proper nouns, etc., for the first time Reduce the amount of data; at the same time, perform the named entity recognition operation on the obtained question and answer corpus, and perform the second time to reduce the amount of data; in addition, the answer text set obtained by completing the named entity recognition is encoded and input into the deep learning question and answer model.
- the learning question answering model is more accurate in the answer text obtained by calculation. Therefore, this application solves the problem of high calculation amount and poor timeliness in the text answer process.
- FIG. 4 it is a schematic diagram of the structure of a computer device that implements a text question answering method based on a named entity in this application.
- the computer device 1 may include a processor 10, a memory 11, and a bus, and may also include a computer program stored in the memory 11 and running on the processor 10, such as a text question answering program 12 based on a named entity.
- the memory 11 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, mobile hard disk, multimedia card, card-type memory (for example: SD or DX memory, etc.), magnetic memory, magnetic disk, CD etc.
- the memory 11 may be an internal storage unit of the computer device 1 in some embodiments, for example, a mobile hard disk of the computer device 1.
- the memory 11 may also be an external storage device of the computer device 1, such as a plug-in mobile hard disk, a smart media card (SMC), and a secure digital (Secure Digital) equipped on the computer device 1. , SD) card, flash card (Flash Card), etc.
- the memory 11 may also include both an internal storage unit of the computer device 1 and an external storage device.
- the memory 11 can be used not only to store application software and various data installed in the computer device 1, such as the code of a text question and answer program based on a named entity, etc., but also to temporarily store data that has been output or will be output.
- the processor 10 may be composed of integrated circuits in some embodiments, for example, may be composed of a single packaged integrated circuit, or may be composed of multiple integrated circuits with the same function or different functions, including one or more Combinations of central processing unit (CPU), microprocessor, digital processing chip, graphics processor, and various control chips, etc.
- the processor 10 is the control unit of the computer device, which uses various interfaces and lines to connect the various components of the entire computer device, and runs or executes programs or modules stored in the memory 11 (such as executing A text question-and-answer program based on named entities, etc.), and call data stored in the memory 11 to execute various functions of the computer device 1 and process data.
- the bus may be a peripheral component interconnect standard (PCI) bus or an extended industry standard architecture (EISA) bus, etc.
- PCI peripheral component interconnect standard
- EISA extended industry standard architecture
- the bus can be divided into address bus, data bus, control bus and so on.
- the bus is configured to implement connection and communication between the memory 11 and at least one processor 10 and the like.
- FIG. 4 only shows a computer device with components. Those skilled in the art can understand that the structure shown in FIG. 4 does not constitute a limitation on the computer device 1, and may include fewer or more components than shown in the figure. Components, or a combination of certain components, or different component arrangements.
- the computer device 1 may also include a power source (such as a battery) for supplying power to various components.
- the power source may be logically connected to the at least one processor 10 through a power management device, thereby controlling power
- the device implements functions such as charge management, discharge management, and power consumption management.
- the power supply may also include any components such as one or more DC or AC power supplies, recharging devices, power failure detection circuits, power converters or inverters, and power status indicators.
- the computer device 1 may also include various sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.
- the computer device 1 may also include a network interface.
- the network interface may include a wired interface and/or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is usually used in the computer equipment 1 Establish a communication connection with other computer equipment.
- the computer device 1 may also include a user interface.
- the user interface may be a display (Display) and an input unit (such as a keyboard (Keyboard)).
- the user interface may also be a standard wired interface or a wireless interface.
- the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode, organic light-emitting diode) touch device, etc.
- the display can also be called a display screen or a display unit as appropriate, and is used to display the information processed in the computer device 1 and to display a visualized user interface.
- the named entity-based text question answering program 12 stored in the memory 11 in the computer device 1 is a combination of multiple instructions. When running in the processor 10, it can realize:
- the integrated module/unit of the computer device 1 can be stored in a computer readable storage medium. It can be non-volatile or volatile.
- the computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory) .
- modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
- the functional modules in the various embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
- the above-mentioned integrated unit may be implemented in the form of hardware, or may be implemented in the form of hardware plus software functional modules.
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)
- Mathematical Physics (AREA)
- Data Mining & Analysis (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- Biophysics (AREA)
- Biomedical Technology (AREA)
- Life Sciences & Earth Sciences (AREA)
- Software Systems (AREA)
- Evolutionary Computation (AREA)
- Databases & Information Systems (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Human Computer Interaction (AREA)
- Machine Translation (AREA)
Abstract
一种基于命名实体的文本问答方法、装置、设备及存储介质,所述方法包括:接收用户输入的咨询文本,对所述咨询文本执行命名实体识别得到实体文本集(S1);获取问答语料集,并对所述问答语料集执行命名实体识别及命名实体划分,得到多个问答语料子集(S3),从多个所述问答语料子集中提取与所述咨询文本相关的问答语料子集,组成回答文本集,并将所述回答文本集进行切分及编码操作,得到问答编码集(S3),将所述问答编码集输入至预训练完成的深度学习问答模型中,得到所述咨询文本的回答文本(S4)。所述方法可以解决文本回答过程计算量大,回答效果差的问题。
Description
本申请要求于2020年5月20日提交中国专利局、申请号为CN202010434262.4,发明名称为“基于命名实体的文本问答方法、装置及可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请涉及人工智能的数据处理领域,尤其涉及一种基于命名实体的文本问答的方法、装置、设备及存储介质。
随着近年大数据以及人工智能技术在各行各业的普及与发展,各行各业的智能场景层出不穷,其中问答系统为主要的智能场景代表。
目前问答系统主要有下述两种:一、以词向量转变方法为基础,先将用户输入文本转变为词向量,并计算与词库的文本向量在空间距离的大小,并选择空间距离最小的词库文本完成问答;二、以深度学习模型为基础完成问答。其中第一种以词向量转变方法为基础的问答系统,由于方法简单往往答非所问无法满足当前场景的要求,而第二种以深度学习模型为基础的问答系统虽然可满足当前场景的要求,发明人意识到由于深度学习模型需要进行大量的数据计算,若多个用户同时使用问答系统时,由于计算量高,问答系统往往不能及时响应,时效性较差。
发明内容
本申请提供一种基于命名实体的文本问答方法、装置、设备及存储介质,其主要目的解决文本回答过程计算量大,回答效果差的问题。
为实现上述目的,本申请提供的一种基于命名实体的文本问答方法,包括:
接收用户输入的咨询文本,对所述咨询文本执行命名实体识别得到实体文本集;
获取问答语料集,并对所述问答语料集执行命名实体识别及命名实体划分,得到多个问答语料子集;
从多个所述问答语料子集中提取与所述咨询文本相关的问答语料子集,组成回答文本集,并将所述回答文本集进行切分及编码操作,得到问答编码集;
将所述问答编码集输入至预训练完成的深度学习问答模型中,得到所述咨询文本的回答文本。
为了解决上述问题,本申请还提供一种基于命名实体的文本问答装置,所述装置包括:
实体文本计算模块:用于接收用户输入的咨询文本,对所述咨询文本执行命名实体识别,得到实体文本集;
问答语料计算模块:用于获取问答语料集,并对所述问答语料集执行命名实体识别及命名实体划分,得到多个问答语料子集;
编码模块:用于从多个所述问答语料子集中提取与所述咨询文本相关的问答语料子集,组成回答文本集,并将所述回答文本集进行切分及编码操作,得到问答编码集;
回答文本计算模块:用于将所述问答编码集输入至预训练完成的深度学习问答模型中,得到所述咨询文本的回答文本。
为了解决上述问题,本申请还提供一种计算机设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如下步骤:
接收用户输入的咨询文本,对所述咨询文本执行命名实体识别得到实体文本集;
获取问答语料集,并对所述问答语料集执行命名实体识别及命名实体划分,得到多个问答语料子集;
从多个所述问答语料子集中提取与所述咨询文本相关的问答语料子集,组成回答文本集,并将所述回答文本集进行切分及编码操作,得到问答编码集;
将所述问答编码集输入至预训练完成的深度学习问答模型中,得到所述咨询文本的回答文本。
为了解决上述问题,本申请还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,其中,所述计算机程序被处理器执行时实现如下步骤:
接收用户输入的咨询文本,对所述咨询文本执行命名实体识别得到实体文本集;
获取问答语料集,并对所述问答语料集执行命名实体识别及命名实体划分,得到多个问答语料子集;
从多个所述问答语料子集中提取与所述咨询文本相关的问答语料子集,组成回答文本集,并将所述回答文本集进行切分及编码操作,得到问答编码集;
将所述问答编码集输入至预训练完成的深度学习问答模型中,得到所述咨询文本的回答文本。
本申请实施例先将接收到的咨询文本进行命名实体识别得到实体文本集,命名实体识别操作可将咨询文本变为包括人名、地名、机构名、专有名词等的实体文本集,第一次缩小了数据量;同时将获取到的问答语料集执行命名实体识别操作,进行第二次缩小数据量;另外,将完成命名实体识别得到的回答文本集进行编码输入至深度学习问答模型,由于深度学习问答模型相比于传统的词向量转变方法,计算得到的回答文本更精确,因此本申请解决文本回答过程计算量高,时效性较差的问题。
图1为本申请一实施例提供的基于命名实体的文本问答方法的流程示意图;
图2为本申请一实施例提供的基于命名实体的文本问答方法中S3的详细流程示意图;
图3为本申请一实施例提供的基于命名实体的文本问答装置的模块示意图;
图4为本申请一实施例提供的实现基于命名实体的文本问答方法的计算机设备的内部结构示意图;
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。
应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
本申请提供一种基于命名实体的文本问答方法。参照图1所示,为本申请一实施例提供的基于命名实体的文本问答方法的流程示意图。该方法可以由一个装置执行,该装置可以由软件和/或硬件实现。
在本实施例中,所述基于命名实体的文本问答方法包括:
S1、接收用户输入的咨询文本,对所述咨询文本执行命名实体识别,得到实体文本集。
所述命名实体识别(Named Entity Recognition,简称NER)又称作“专名识别”,是指识别文本中具有特定意义的实体,主要包括人名、地名、机构名、专有名词等。本申请实施例中可采用当前已公开的斯坦福识别模型(Stanford Named Entity Recognizer,简称为SNER)对所述咨询文本数据执行命名实体识别。所述斯坦福识别模型是一种以Java编程语言实现的命名实体识别程序。
如用户输入的咨询文本A为:“我糖尿病多年,最近在武汉的医院看病,可是效果不太好,所以想知道,北京的医院,对糖尿病是否有更好的治疗手段”,利用上述的斯坦福识 别模型,对咨询文本A执行命名实体识别,从而得到“糖尿病”、“武汉”、“医院”、“北京”等实体文本集。
S2、获取问答语料集,并对所述问答语料集执行命名实体识别及命名实体划分,得到多个问答语料子集。
本申请实施例可以采用多种方式获取所述问答语料集,比如利用爬虫手段从网络中爬取相关的文本数据并整理得到问答语料集,采用当前已公开并可下载的公开语料集,如国家语委现代汉语语料库、近代汉语标记语料库等。
由于所述问答语料集一般数量庞大,若直接利用所述问答语料集进行文本问答,需要进行遍历查找与用户输入的咨询文本对应的回答文本,因此,会占用大量的计算资源,难以达到预期要求,因此本申请实施例对获取到的问答语料集进行命名实体识别及命名实体划分处理。
进一步地,所述S2包括:对所述问答语料集执行命名实体识别,得到问答实体集,根据所述问答实体集所包括的问答实体,对所述问答语料集进行文本划分,得到多个问答语料子集。
详细地,此步骤中的命名实体识别的识别模型可采用S1所述的斯坦福识别模型,同样也可采用其他识别模型对所述问答语料集进行识别。
由于问答语料集中包括多组语料,每组语料所包括的问答实体不尽相同,如语料A_1为:“在武汉所有的医院中,对糖尿病治疗的权威排名第一是武汉第一人民医院”,则语料A_1所包括问答实体为“糖尿病”、“武汉”“武汉第一人民医院”,以此类推得到语料A_2包括的问答实体“肺炎”、“天津”,以及语料A_3包括的问答实体“北京”、“糖尿病”等,因此需要通过每组语料所包括的问答实体进行命名实体划分,从而得到具有相同问答实体的多个问答语料子集,如“糖尿病”的问答语料子集为语料A_1和语料A_3,“肺炎”的问答语料子集为A_2等。
S3、从所述多个问答语料子集中提取与咨询文本相关的问答语料子集,组成回答文本集,并将所述回答文本集进行切分及编码操作,得到问答编码集。
经过S2步骤的处理,本申请实施例已将问答语料集按照命名实体的不同划分为多个问答语料子集,但由于很多问答语料子集完全不符合用户输入的咨询文本,因此需要从多个问答语料子集中提取与咨询文本相关的问答语料子集,组成回答文本集,并同时将文本集的数据进行编码得到以词向量为基础的编码集。
进一步地,所述S3请参阅图2的详细流程示意图,包括:
S31、从多个所述问答语料子集中选择与所述实体文本集对应的问答语料子集,组成回答文本集;
如上述“糖尿病”的问答语料子集为语料A_1和语料A_3,“肺炎”的问答语料子集为A_2等,但由于用户关心的是“糖尿病”而非“肺炎”,因此去除关于“肺炎”的问答语料子集,从而得到与实体文本集对应的问答语料子集,进而组成回答文本集。
S32、根据预构建的切分词典,对所述回答文本集执行切分操作,得到问答词组集;
为了更好的将文本集的数据进行编码得到以词向量为基础的编码集,本申请先需要将所述回答文本集进行切分操作,以方便后续的编码。
详细地,所述S32包括:提取所述回答文本集内每个回答文本,按照预设的切分规则,对所述回答文本进行切分得到回答切分词,判断所述回答切分词在所述切分词典是否出现,若所述回答切分词在所述切分词典不出现,重新对所述回答文本进行切分,若所述回答切分词在所述切分词典出现,继续对所述回答文本进行切分,直至所述回答文本集提取完成得到所述问答词组集。
所述切分规格包括切分顺序、切分数量和切分公差,如语料A_1为:“在武汉所有的医院中,对糖尿病治疗的权威排名第一是武汉第一人民医院”,预设切分顺序为逆向切分、 切分数量为2个字、切分公差为2,则第一次切分语料A_1得到“医院”,判断在预构建的切分词典是否有“医院”,若有“医院”的话,则语料A_1变为:“在武汉所有的医院中,对糖尿病治疗的权威排名第一是武汉第一人民”,并进行第二次切分得到“人民”,若在预构建的切分词典没有“医院”,则语料A_1依然为:“在武汉所有的医院中,对糖尿病治疗的权威排名第一是武汉第一人民医院”,并根据切分公差为2得到“人民医院”,以此类推得到若干词组并汇总得到问答词组集。
S33、对所述问答词组集执行编码操作得到问答编码集。
在本申请实施例中,所述编码操作可采用Google的Word2vec工具或Huffman编码方法对所述问答词组集执行编码操作得到问答编码集。问答编码集一般为向量集,由于向量具有良好的语义特性,可用于表征各文本所具有的特征。
S4、将所述问答编码集输入至预训练完成的深度学习问答模型中,得到所述咨询文本的回答文本。
详细地,该方法还包括训练所述深度学习问答模型,其中,所述训练包括:
步骤A:根据预先设定的网络组合权重函数,对多组长短期记忆网络进行组合,得到待训练深度学习问答模型,并获取问答训练集和问答标签集,将所述问答训练集输入至所述待训练深度学习问答模型;
步骤B:计算每组长短期记忆网络之间的关联权重得到关联权重集;
步骤C:对所述关联权重集的进行加权求和及激活处理得到问答预测集;
步骤D:计算所述问答预测集和所述问答标签集的误差值,若所述误差值大于预设的误差阈值,根据预构建的优化函数,重新计算每组长短期记忆网络之间的关联权重得到关联权重集,并返回步骤C;
步骤E:若所述误差值小于或等于所述误差阈值,得到训练完成的所述深度学习问答模型。
本申请实施例中,所述长短期记忆网络(Long-Short Term Memory,简称LSTM)是一种类神经网络,可以以时间长度记忆事件信息,从而完成分类及预测,其中长短期记忆网络包括输入处理状态、遗忘处理状态及输出处理状态。
较佳地,所述网络组合权重函数如下所示:
C
t=α
t,1·h
1+α
t,2·h
2+...α
t,T·h
T
上述函数中,h
i表示长短期记忆网络,i为每组长短期记忆网络的编号,α
t,i对应t时刻下第i个长短期记忆网络的组合权重。
进一步地,所述计算每组长短期记忆网络之间的关联权重得到关联权重集采用如下计算公式:
u
t,i=V
itanh(W
ih
i+S
t)
其中,u
t,i表示第i个长短期记忆网络的关联权重,V
i,W
i分别表示深度学习问答模型的内部参数,h
i表示长短期记忆网络,S
t表示在t时刻下对应的第i个长短期记忆网络的数据处理状态。
所述对所述关联权重集的进行加权求和及激活处理得到问答预测集之前,还包括,对所述关联权重集进行归一化处理。其中,所述归一化处理采用下述公式:
上述公式中,T表示所述关联权重集的数量总数,u
t,i表示第i个长短期记忆网络的关联权重,a
t,i表示归一化后的第i个长短期记忆网络的关联权重。
进一步地,所述加权求和的计算公式为:
所述激活处理包括:
y
t=f(S
t-1,[y
t-1;C
t])
其中,f为预构建的激活函数,C
t表示加权求和后的数值,S
t-1表示t-1时刻下对应的第i个长短期记忆网络的数据处理状态,y
t-1表示t-1时刻下的问答预测文本,y
t为t时刻下的问答预测文本。
本申请优选实施例中,所述计算所述问答预测集和所述问答标签集的误差值可采用当前已公开的指数损失函数或平方损失函数等。
本申请实施例中,所述深度学习问答模型训练完成后,可直接接受问答编码集进行智能化的回答。例如,用户输入的咨询文本A为:“我糖尿病多年,最近在武汉的医院看病,可是效果不太好,所以想知道,北京的医院,对糖尿病是否有更好的治疗手段”,通过上述S1至S3处理得到编码文本输入至训练完成的深度学习问答模型后,可以得到类似于“相比于武汉和北京所有医院中,对糖尿病最权威的治疗为北京协和医院”的回答结果。
本申请实施例先将接收到的咨询文本进行命名实体识别得到实体文本集,命名实体识别操作可将咨询文本变为包括人名、地名、机构名、专有名词等的实体文本集,第一次缩小了数据量;同时将获取到的问答语料集执行命名实体识别操作,进行第二次缩小数据量;另外,将完成命名实体识别得到的回答文本集进行编码输入至深度学习问答模型,由于深度学习问答模型相比于传统的词向量转变方法,计算得到的回答文本更精确,因此本申请解决文本回答过程计算量高,时效性较差的问题。
如图3所示,是本申请基于命名实体的文本问答装置的功能模块图。
本申请所述基于命名实体的文本问答装置100可以安装于计算机设备中。根据实现的功能,所述基于命名实体的文本问答装置可以包括实体文本计算模块101、问答语料计算模块102、编码模块103、回答文本计算模块104。本发所述模块也可以称之为单元,是指一种能够被计算机设备处理器所执行,并且能够完成固定功能的一系列计算机程序段,其存储在计算机设备的存储器中。
在本实施例中,关于各模块/单元的功能如下:
所述实体文本计算模块101,用于接收用户输入的咨询文本,对所述咨询文本执行命名实体识别,得到实体文本集。
所述命名实体识别(Named Entity Recognition,简称NER)又称作“专名识别”,是指识别文本中具有特定意义的实体,主要包括人名、地名、机构名、专有名词等。本申请实施例中所述实体文本计算模块101可采用当前已公开的斯坦福识别模型(Stanford Named Entity Recognizer,简称为SNER)对所述咨询文本数据执行命名实体识别。所述斯坦福识别模型是一种以Java编程语言实现的命名实体识别程序。
如用户输入的咨询文本A为:“我糖尿病多年,最近在武汉的医院看病,可是效果不太好,所以想知道,北京的医院,对糖尿病是否有更好的治疗手段”,利用上述的斯坦福识别模型,对咨询文本A执行命名实体识别,从而得到“糖尿病”、“武汉”、“医院”、“北京”等实体文本集。
所述问答语料计算模块102,用于获取问答语料集,并对所述问答语料集执行命名实体识别及命名实体划分,得到多个问答语料子集。
本申请实施例所述问答语料计算模块102可以采用多种方式获取所述问答语料集,比如利用爬虫手段从网络中爬取相关的文本数据并整理得到问答语料集,采用当前已公开并可下载的公开语料集,如国家语委现代汉语语料库、近代汉语标记语料库等。
由于所述问答语料集一般数量庞大,若直接利用所述问答语料集进行文本问答,需要进行遍历查找与用户输入的咨询文本对应的回答文本,因此,会占用大量的计算资源,难以达到预期要求,因此本申请实施例利用所述问答语料计算模块102对获取到的问答语料集进行命名实体识别及命名实体划分处理。
详细地,所述问答语料计算模块102具体用于:对所述问答语料集执行命名实体识别,得到问答实体集,根据所述问答实体集所包括的问答实体,对所述问答语料集进行文本划分,得到多个问答语料子集。
优选地,所述问答语料计算模块102中采用的命名实体识别的识别模型可以是上述所述的斯坦福识别模型,同样也可采用其他识别模型对所述问答语料集进行识别。
由于问答语料集中包括多组语料,每组语料所包括的问答实体不尽相同,如语料A_1为:“在武汉所有的医院中,对糖尿病治疗的权威排名第一是武汉第一人民医院”,则语料A_1所包括问答实体为“糖尿病”、“武汉”“武汉第一人民医院”,以此类推得到语料A_2包括的问答实体“肺炎”、“天津”,以及语料A_3包括的问答实体“北京”、“糖尿病”等,因此所述问答语料计算模块102需要通过每组语料所包括的问答实体进行命名实体划分,从而得到具有相同问答实体的多个问答语料子集,如“糖尿病”的问答语料子集为语料A_1和语料A_3,“肺炎”的问答语料子集为A_2等。
所述编码模块103,用于从所述多个问答语料子集中提取与咨询文本相关的问答语料子集,组成回答文本集,并将所述回答文本集进行切分及编码操作,得到问答编码集。
本申请实施例已将问答语料集按照命名实体的不同划分为多个问答语料子集,但由于很多问答语料子集完全不符合用户输入的咨询文本,因此需要利用所述编码模块103从多个问答语料子集中提取与咨询文本相关的问答语料子集,组成回答文本集,并同时将文本集的数据进行编码得到以词向量为基础的编码集。
详细地,所述编码模块103具体用于:从多个所述问答语料子集中选择与所述实体文本集对应的问答语料子集,组成回答文本集;根据预构建的切分词典,对所述回答文本集执行切分操作,得到问答词组集;对所述问答词组集执行编码操作得到问答编码集。
如上述“糖尿病”的问答语料子集为语料A_1和语料A_3,“肺炎”的问答语料子集为A_2等,但由于用户关心的是“糖尿病”而非“肺炎”,因此去除关于“肺炎”的问答语料子集,从而得到与实体文本集对应的问答语料子集,进而组成回答文本集。
为了更好的将文本集的数据进行编码得到以词向量为基础的编码集,本申请先需要将所述回答文本集进行切分操作,以方便后续的编码。
详细地,具体地所述切分操作包括:提取所述回答文本集内每个回答文本,按照预设的切分规则,对所述回答文本进行切分得到回答切分词,判断所述回答切分词在所述切分词典是否出现,若所述回答切分词在所述切分词典不出现,重新对所述回答文本进行切分,若所述回答切分词在所述切分词典出现,继续对所述回答文本进行切分,直至所述回答文本集提取完成得到所述问答词组集。
所述切分规格包括切分顺序、切分数量和切分公差,如语料A_1为:“在武汉所有的医院中,对糖尿病治疗的权威排名第一是武汉第一人民医院”,预设切分顺序为逆向切分、切分数量为2个字、切分公差为2,则第一次切分语料A_1得到“医院”,判断在预构建的切分词典是否有“医院”,若有“医院”的话,则语料A_1变为:“在武汉所有的医院中,对糖尿病治疗的权威排名第一是武汉第一人民”,并进行第二次切分得到“人民”,若在预构建的切分词典没有“医院”,则语料A_1依然为:“在武汉所有的医院中,对糖尿病治疗的权威排名第一是武汉第一人民医院”,并根据切分公差为2得到“人民医院”,以此类推得到若干词组并汇总得到问答词组集。
在本申请实施例中,所述编码操作可采用Google的Word2vec工具或Huffman编码方法对所述问答词组集执行编码操作得到问答编码集。问答编码集一般为向量集,由于向量具有良好的语义特性,可用于表征各文本所具有的特征。
所述回答文本计算模块104,用于将所述问答编码集输入至预训练完成的深度学习问答模型中,得到所述咨询文本的回答文本。
进一步地,本申请所述基于命名实体的文本问答装置100还包括模型训练模块105, 用于:
根据预先设定的网络组合权重函数,对多组长短期记忆网络进行组合,得到待训练深度学习问答模型,并获取问答训练集和问答标签集,将所述问答训练集输入至所述待训练深度学习问答模型;
计算每组长短期记忆网络之间的关联权重得到关联权重集;
对所述关联权重集的进行加权求和及激活处理得到问答预测集;
计算所述问答预测集和所述问答标签集的误差值;
在所述误差值小于或等于预设的误差阈值时,得到训练完成的深度学习问答模型。
本申请实施例中,所述长短期记忆网络(Long-Short Term Memory,简称LSTM)是一种类神经网络,可以以时间长度记忆事件信息,从而完成分类及预测,其中长短期记忆网络包括输入处理状态、遗忘处理状态及输出处理状态。
较佳地,所述网络组合权重函数如下所示:
C
t=α
t,1·h
1+α
t,2·h
2+...α
t,T·h
T
上述函数中,h
i表示长短期记忆网络,i为每组长短期记忆网络的编号,α
t,i对应t时刻下第i个长短期记忆网络的组合权重。
进一步地,所述计算每组长短期记忆网络之间的关联权重得到关联权重集采用如下计算公式:
u
t,i=V
itanh(W
ih
i+S
t)
其中,u
t,i表示第i个长短期记忆网络的关联权重,V
i,W
i分别表示深度学习问答模型的内部参数,S
t表示在t时刻下对应的第i个长短期记忆网络的数据处理状态。
所述对所述关联权重集的进行加权求和及激活处理得到问答预测集之前,还包括,对所述关联权重集进行归一化处理。其中,所述归一化处理采用下述公式:
上述公式中,T表示所述关联权重集的数量总数,u
t,i表示第i个长短期记忆网络的关联权重,a
t,i表示归一化后的第i个长短期记忆网络的关联权重。
进一步地,所述加权求和的计算公式为:
所述激活处理包括:
y
t=f(S
t-1,[y
t-1;C
t])
其中,f为预构建的激活函数,C
t表示加权求和后的数值,S
t-1表示t-1时刻下对应的第i个长短期记忆网络的数据处理状态,y
t-1表示t-1时刻下的问答预测文本,y
t为t时刻下的问答预测文本。
本申请优选实施例中,所述计算所述问答预测集和所述问答标签集的误差值可采用当前已公开的指数损失函数或平方损失函数等。
本申请实施例中,所述深度学习问答模型训练完成后,可直接接受问答编码集进行智能化的回答。例如,用户输入的咨询文本A为:“我糖尿病多年,最近在武汉的医院看病,可是效果不太好,所以想知道,北京的医院,对糖尿病是否有更好的治疗手段”,通过上述S1至S3处理得到编码文本输入至训练完成的深度学习问答模型后,可以得到类似于“相比于武汉和北京所有医院中,对糖尿病最权威的治疗为北京协和医院”的回答结果。
本申请实施例先将接收到的咨询文本进行命名实体识别得到实体文本集,命名实体识别操作可将咨询文本变为包括人名、地名、机构名、专有名词等的实体文本集,第一次缩小了数据量;同时将获取到的问答语料集执行命名实体识别操作,进行第二次缩小数据量;另外,将完成命名实体识别得到的回答文本集进行编码输入至深度学习问答模型,由于深 度学习问答模型相比于传统的词向量转变方法,计算得到的回答文本更精确,因此本申请解决文本回答过程计算量高,时效性较差的问题。
如图4所示,是本申请实现基于命名实体的文本问答方法的计算机设备的结构示意图。
所述计算机设备1可以包括处理器10、存储器11和总线,还可以包括存储在所述存储器11中并可在所述处理器10上运行的计算机程序,如基于命名实体的文本问答程序12。
其中,所述存储器11至少包括一种类型的可读存储介质,所述可读存储介质包括闪存、移动硬盘、多媒体卡、卡型存储器(例如:SD或DX存储器等)、磁性存储器、磁盘、光盘等。所述存储器11在一些实施例中可以是计算机设备1的内部存储单元,例如该计算机设备1的移动硬盘。所述存储器11在另一些实施例中也可以是计算机设备1的外部存储设备,例如计算机设备1上配备的插接式移动硬盘、智能存储卡(Smart Media Card,SMC)、安全数字(Secure Digital,SD)卡、闪存卡(Flash Card)等。进一步地,所述存储器11还可以既包括计算机设备1的内部存储单元也包括外部存储设备。所述存储器11不仅可以用于存储安装于计算机设备1的应用软件及各类数据,例如基于命名实体的文本问答程序的代码等,还可以用于暂时地存储已经输出或者将要输出的数据。
所述处理器10在一些实施例中可以由集成电路组成,例如可以由单个封装的集成电路所组成,也可以是由多个相同功能或不同功能封装的集成电路所组成,包括一个或者多个中央处理器(Central Processing unit,CPU)、微处理器、数字处理芯片、图形处理器及各种控制芯片的组合等。所述处理器10是所述计算机设备的控制核心(Control Unit),利用各种接口和线路连接整个计算机设备的各个部件,通过运行或执行存储在所述存储器11内的程序或者模块(例如执行基于命名实体的文本问答程序等),以及调用存储在所述存储器11内的数据,以执行计算机设备1的各种功能和处理数据。
所述总线可以是外设部件互连标准(peripheral component interconnect,简称PCI)总线或扩展工业标准结构(extended industry standard architecture,简称EISA)总线等。该总线可以分为地址总线、数据总线、控制总线等。所述总线被设置为实现所述存储器11以及至少一个处理器10等之间的连接通信。
图4仅示出了具有部件的计算机设备,本领域技术人员可以理解的是,图4示出的结构并不构成对所述计算机设备1的限定,可以包括比图示更少或者更多的部件,或者组合某些部件,或者不同的部件布置。
例如,尽管未示出,所述计算机设备1还可以包括给各个部件供电的电源(比如电池),优选地,电源可以通过电源管理装置与所述至少一个处理器10逻辑相连,从而通过电源管理装置实现充电管理、放电管理、以及功耗管理等功能。电源还可以包括一个或一个以上的直流或交流电源、再充电装置、电源故障检测电路、电源转换器或者逆变器、电源状态指示器等任意组件。所述计算机设备1还可以包括多种传感器、蓝牙模块、Wi-Fi模块等,在此不再赘述。
进一步地,所述计算机设备1还可以包括网络接口,可选地,所述网络接口可以包括有线接口和/或无线接口(如WI-FI接口、蓝牙接口等),通常用于在该计算机设备1与其他计算机设备之间建立通信连接。
可选地,该计算机设备1还可以包括用户接口,用户接口可以是显示器(Display)、输入单元(比如键盘(Keyboard)),可选地,用户接口还可以是标准的有线接口、无线接口。可选地,在一些实施例中,显示器可以是LED显示器、液晶显示器、触控式液晶显示器以及OLED(Organic Light-Emitting Diode,有机发光二极管)触摸器等。其中,显示器也可以适当的称为显示屏或显示单元,用于显示在计算机设备1中处理的信息以及用于显示可视化的用户界面。
应该了解,所述实施例仅为说明之用,在专利申请范围上并不受此结构的限制。
所述计算机设备1中的所述存储器11存储的基于命名实体的文本问答程序12是多个 指令的组合,在所述处理器10中运行时,可以实现:
接收用户输入的咨询文本,对所述咨询文本执行命名实体识别得到实体文本集;
获取问答语料集,并对所述问答语料集执行命名实体识别及命名实体划分,得到多个问答语料子集;
从多个所述问答语料子集中提取与所述咨询文本相关的问答语料子集,组成回答文本集,并将所述回答文本集进行切分及编码操作,得到问答编码集;
将所述问答编码集输入至预训练完成的深度学习问答模型中,得到所述咨询文本的回答文本。
具体地,所述处理器10对上述指令的具体实现方法可参考图1对应实施例中相关步骤的描述,在此不赘述。
进一步地,所述计算机设备1集成的模块/单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中,所述计算机可读存储介质可以是非易失性,也可以是易失性。所述计算机可读介质可以包括:能够携带所述计算机程序代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)。
在本申请所提供的几个实施例中,应该理解到,所揭露的设备,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。
所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能模块的形式实现。
对于本领域技术人员而言,显然本申请不限于上述示范性实施例的细节,而且在不背离本申请的精神或基本特征的情况下,能够以其他的具体形式实现本申请。
因此,无论从哪一点来看,均应将实施例看作是示范性的,而且是非限制性的,本申请的范围由所附权利要求而不是上述说明限定,因此旨在将落在权利要求的等同要件的含义和范围内的所有变化涵括在本申请内。不应将权利要求中的任何附关联图标记视为限制所涉及的权利要求。
此外,显然“包括”一词不排除其他单元或步骤,单数不排除复数。系统权利要求中陈述的多个单元或装置也可以由一个单元或装置通过软件或者硬件来实现。第二等词语用来表示名称,而并不表示任何特定的顺序。
最后应说明的是,以上实施例仅用以说明本申请的技术方案而非限制,尽管参照较佳实施例对本申请进行了详细说明,本领域的普通技术人员应当理解,可以对本申请的技术方案进行修改或等同替换,而不脱离本申请技术方案的精神和范围。
Claims (20)
- 一种基于命名实体的文本问答方法,其中,所述方法包括:接收用户输入的咨询文本,对所述咨询文本执行命名实体识别,得到实体文本集;获取问答语料集,并对所述问答语料集执行命名实体识别及命名实体划分,得到多个问答语料子集;从多个所述问答语料子集中提取与所述咨询文本相关的问答语料子集,组成回答文本集,并将所述回答文本集进行切分及编码操作,得到问答编码集;将所述问答编码集输入至预训练完成的深度学习问答模型中,得到所述咨询文本的回答文本。
- 如权利要求1所述的基于命名实体的文本问答方法,其中,所述将所述回答文本集进行切分及编码操作,得到问答编码集,包括:根据预构建的切分词典,对所述回答文本集执行切分操作得到问答词组集;对所述问答词组集执行所述编码操作得到问答编码集。
- 如权利要求2所述的基于命名实体的文本问答方法,其中,所述根据预构建的切分词典,对所述回答文本集执行切分操作得到问答词组集,包括:步骤Ⅰ:提取所述回答文本集内每个回答文本;步骤Ⅱ:按照预设的切分规则,对所述回答文本进行切分得到回答切分词;步骤Ⅲ:判断所述回答切分词在所述切分词典是否出现,若所述回答切分词在所述切分词典不出现,返回步骤Ⅱ;步骤Ⅳ:若所述回答切分词在所述切分词典出现,继续对所述回答文本进行切分,直至所述回答文本集提取完成得到所述问答词组集。
- 如权利要求1所述的基于命名实体的文本问答方法,其中,该方法还包括训练所述深度学习问答模型,其中所述训练包括:步骤A:根据预先设定的网络组合权重函数,对多组长短期记忆网络进行组合得到待训练深度学习问答模型,并获取问答训练集和问答标签集,将所述问答训练集输入至所述待训练深度学习问答模型;步骤B:计算每组长短期记忆网络之间的关联权重得到关联权重集;步骤C:对所述关联权重集的进行加权求和及激活处理得到问答预测集;步骤D:计算所述问答预测集和所述问答标签集的误差值,若所述误差值大于预设的误差阈值,根据预构建的优化函数,重新计算每组长短期记忆网络之间的关联权重得到关联权重集,并返回步骤C;步骤E:若所述误差值小于或等于所述误差阈值,得到训练完成的所述深度学习问答模型。
- 如权利要求1至4中任意一项所述的基于命名实体的文本问答方法,其中,所述对所述问答语料集执行命名实体识别及命名实体划分,得到多个问答语料子集,包括:对所述问答语料集执行命名实体识别得到问答实体集;根据所述问答实体集所包括的问答实体,对所述问答语料集进行文本划分得到多个所述问答语料子集。
- 如权利要求4所述的基于命名实体的文本问答方法,其中,所述计算每组长短期记忆网络之间的关联权重得到关联权重集的计算公式包括:u t,i=V itanh(W ih i+S t)其中,u t,i表示第i个长短期记忆网络的关联权重,V i,W i分别表示深度学习问答模型的内部参数,h i表示长短期记忆网络,S t表示在t时刻下对应的第i个长短期记忆网络的数据处理状态。
- 如权利要求4所述的基于命名实体的文本问答方法,其中,所述激活处理包括:y t=f(S t-1,[y t-1;C t])其中,f为预构建的激活函数,C t表示加权求和后的数值,S t-1表示t-1时刻下对应的第i个长短期记忆网络的数据处理状态,y t-1表示t-1时刻下的问答预测文本,y t为t时刻下的问答预测文本。
- 一种基于命名实体的文本问答装置,其中,所述装置包括:实体文本计算模块:用于接收用户输入的咨询文本,对所述咨询文本执行命名实体识别,得到实体文本集;问答语料计算模块:用于获取问答语料集,并对所述问答语料集执行命名实体识别及命名实体划分,得到多个问答语料子集;编码模块:用于从多个所述问答语料子集中提取与所述咨询文本相关的问答语料子集,组成回答文本集,并将所述回答文本集进行切分及编码操作,得到问答编码集;回答文本计算模块:用于将所述问答编码集输入至预训练完成的深度学习问答模型中,得到所述咨询文本的回答文本。
- 一种计算机设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,其中,所述处理器执行所述计算机程序时实现如下步骤:接收用户输入的咨询文本,对所述咨询文本执行命名实体识别,得到实体文本集;获取问答语料集,并对所述问答语料集执行命名实体识别及命名实体划分,得到多个问答语料子集;从多个所述问答语料子集中提取与所述咨询文本相关的问答语料子集,组成回答文本集,并将所述回答文本集进行切分及编码操作,得到问答编码集;将所述问答编码集输入至预训练完成的深度学习问答模型中,得到所述咨询文本的回答文本。
- 如权利要求9所述的计算机设备,其中,所述将所述回答文本集进行切分及编码操作,得到问答编码集,包括:根据预构建的切分词典,对所述回答文本集执行切分操作得到问答词组集;对所述问答词组集执行所述编码操作得到问答编码集。
- 如权利要求10所述的计算机设备,其中,所述根据预构建的切分词典,对所述回答文本集执行切分操作得到问答词组集,包括:步骤Ⅰ:提取所述回答文本集内每个回答文本;步骤Ⅱ:按照预设的切分规则,对所述回答文本进行切分得到回答切分词;步骤Ⅲ:判断所述回答切分词在所述切分词典是否出现,若所述回答切分词在所述切分词典不出现,返回步骤Ⅱ;步骤Ⅳ:若所述回答切分词在所述切分词典出现,继续对所述回答文本进行切分,直至所述回答文本集提取完成得到所述问答词组集。
- 如权利要求9所述的计算机设备,其中,所述处理器执行所述计算机程序时还实现训练所述深度学习问答模型,其中所述训练包括:步骤A:根据预先设定的网络组合权重函数,对多组长短期记忆网络进行组合得到待训练深度学习问答模型,并获取问答训练集和问答标签集,将所述问答训练集输入至所述待训练深度学习问答模型;步骤B:计算每组长短期记忆网络之间的关联权重得到关联权重集;步骤C:对所述关联权重集的进行加权求和及激活处理得到问答预测集;步骤D:计算所述问答预测集和所述问答标签集的误差值,若所述误差值大于预设的误差阈值,根据预构建的优化函数,重新计算每组长短期记忆网络之间的关联权重得到关联权重集,并返回步骤C;步骤E:若所述误差值小于或等于所述误差阈值,得到训练完成的所述深度学习问答模型。
- 如权利要求9至12中任意一项所述的计算机设备,其中,所述对所述问答语料集执行命名实体识别及命名实体划分,得到多个问答语料子集,包括:对所述问答语料集执行命名实体识别得到问答实体集;根据所述问答实体集所包括的问答实体,对所述问答语料集进行文本划分得到多个所述问答语料子集。
- 如权利要求12所述的计算机设备,其中,所述计算每组长短期记忆网络之间的关联权重得到关联权重集的计算公式包括:u t,i=V itanh(W ih i+S t)其中,u t,i表示第i个长短期记忆网络的关联权重,V i,W i分别表示深度学习问答模型的内部参数,h i表示长短期记忆网络,S t表示在t时刻下对应的第i个长短期记忆网络的数据处理状态。
- 如权利要求12所述的计算机设备,其中,所述激活处理包括:y t=f(S t-1,[y t-1;C t])其中,f为预构建的激活函数,C t表示加权求和后的数值,S t-1表示t-1时刻下对应的第i个长短期记忆网络的数据处理状态,y t-1表示t-1时刻下的问答预测文本,y t为t时刻下的问答预测文本。
- 一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,其中,所述计算机程序被处理器执行时实现如下步骤:接收用户输入的咨询文本,对所述咨询文本执行命名实体识别,得到实体文本集;获取问答语料集,并对所述问答语料集执行命名实体识别及命名实体划分,得到多个问答语料子集;从多个所述问答语料子集中提取与所述咨询文本相关的问答语料子集,组成回答文本集,并将所述回答文本集进行切分及编码操作,得到问答编码集;将所述问答编码集输入至预训练完成的深度学习问答模型中,得到所述咨询文本的回答文本。
- 如权利要求16所述的计算机可读存储介质,其中,所述将所述回答文本集进行切分及编码操作,得到问答编码集,包括:根据预构建的切分词典,对所述回答文本集执行切分操作得到问答词组集;对所述问答词组集执行所述编码操作得到问答编码集。
- 如权利要求17所述的计算机可读存储介质,其中,所述根据预构建的切分词典,对所述回答文本集执行切分操作得到问答词组集,包括:步骤Ⅰ:提取所述回答文本集内每个回答文本;步骤Ⅱ:按照预设的切分规则,对所述回答文本进行切分得到回答切分词;步骤Ⅲ:判断所述回答切分词在所述切分词典是否出现,若所述回答切分词在所述切分词典不出现,返回步骤Ⅱ;步骤Ⅳ:若所述回答切分词在所述切分词典出现,继续对所述回答文本进行切分,直至所述回答文本集提取完成得到所述问答词组集。
- 如权利要求16所述的计算机可读存储介质,其中,所述计算机程序被处理器执行时还实现训练所述深度学习问答模型,其中所述训练包括:步骤A:根据预先设定的网络组合权重函数,对多组长短期记忆网络进行组合得到待训练深度学习问答模型,并获取问答训练集和问答标签集,将所述问答训练集输入至所述待训练深度学习问答模型;步骤B:计算每组长短期记忆网络之间的关联权重得到关联权重集;步骤C:对所述关联权重集的进行加权求和及激活处理得到问答预测集;步骤D:计算所述问答预测集和所述问答标签集的误差值,若所述误差值大于预设的误差阈值,根据预构建的优化函数,重新计算每组长短期记忆网络之间的关联权重得到关联权重集,并返回步骤C;步骤E:若所述误差值小于或等于所述误差阈值,得到训练完成的所述深度学习问答模型。
- 如权利要求16至19中任意一项所述的计算机可读存储介质,其中,所述对所述问答语料集执行命名实体识别及命名实体划分,得到多个问答语料子集,包括:对所述问答语料集执行命名实体识别得到问答实体集;根据所述问答实体集所包括的问答实体,对所述问答语料集进行文本划分得到多个所述问答语料子集。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010434262.4A CN111695354A (zh) | 2020-05-20 | 2020-05-20 | 基于命名实体的文本问答方法、装置及可读存储介质 |
CN202010434262.4 | 2020-05-20 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2021151271A1 true WO2021151271A1 (zh) | 2021-08-05 |
Family
ID=72478029
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2020/098956 WO2021151271A1 (zh) | 2020-05-20 | 2020-06-29 | 基于命名实体的文本问答的方法、装置、设备及存储介质 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN111695354A (zh) |
WO (1) | WO2021151271A1 (zh) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113887930A (zh) * | 2021-09-29 | 2022-01-04 | 平安银行股份有限公司 | 问答机器人健康度评估方法、装置、设备及存储介质 |
CN115292461A (zh) * | 2022-08-01 | 2022-11-04 | 北京伽睿智能科技集团有限公司 | 基于语音识别的人机交互学习方法及系统 |
CN116662523A (zh) * | 2023-08-01 | 2023-08-29 | 宁波甬恒瑶瑶智能科技有限公司 | 一种基于gpt模型的生化知识问答方法、系统及存储介质 |
CN116662522A (zh) * | 2023-07-28 | 2023-08-29 | 阿里巴巴达摩院(杭州)科技有限公司 | 问题答案推荐方法、存储介质和电子设备 |
CN117235240A (zh) * | 2023-11-14 | 2023-12-15 | 神州医疗科技股份有限公司 | 一种基于异步消费队列的多模型结果融合问答方法及系统 |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US11374882B2 (en) * | 2020-10-21 | 2022-06-28 | International Business Machines Corporation | Intelligent chat channel processor |
CN112528010B (zh) * | 2020-12-15 | 2022-09-02 | 建信金融科技有限责任公司 | 知识推荐方法、装置、计算机设备及可读存储介质 |
CN112989829B (zh) * | 2021-02-10 | 2024-03-08 | 卡奥斯数字科技(上海)有限公司 | 一种命名实体识别方法、装置、设备及存储介质 |
CN115270799B (zh) * | 2022-09-27 | 2023-01-06 | 北京云迹科技股份有限公司 | 命名实体识别方法及装置 |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100191532A1 (en) * | 2009-01-28 | 2010-07-29 | Xerox Corporation | Model-based comparative measure for vector sequences and word spotting using same |
CN108846130A (zh) * | 2018-06-29 | 2018-11-20 | 北京百度网讯科技有限公司 | 一种问题文本生成方法、装置、设备和介质 |
CN109299478A (zh) * | 2018-12-05 | 2019-02-01 | 长春理工大学 | 基于双向长短期记忆神经网络的智能自动问答方法及系统 |
CN110297893A (zh) * | 2019-05-16 | 2019-10-01 | 平安科技(深圳)有限公司 | 自然语言问答方法、装置、计算机装置及存储介质 |
-
2020
- 2020-05-20 CN CN202010434262.4A patent/CN111695354A/zh active Pending
- 2020-06-29 WO PCT/CN2020/098956 patent/WO2021151271A1/zh active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100191532A1 (en) * | 2009-01-28 | 2010-07-29 | Xerox Corporation | Model-based comparative measure for vector sequences and word spotting using same |
CN108846130A (zh) * | 2018-06-29 | 2018-11-20 | 北京百度网讯科技有限公司 | 一种问题文本生成方法、装置、设备和介质 |
CN109299478A (zh) * | 2018-12-05 | 2019-02-01 | 长春理工大学 | 基于双向长短期记忆神经网络的智能自动问答方法及系统 |
CN110297893A (zh) * | 2019-05-16 | 2019-10-01 | 平安科技(深圳)有限公司 | 自然语言问答方法、装置、计算机装置及存储介质 |
Non-Patent Citations (1)
Title |
---|
BOTONG ZHOU, CHENGJIE SUN, LEI LIN, BINGQUAN LIU: "LSTM Based Question Answering for Large Scale Knowledge Base", BEIJING DAXUE XUEBAO ZERAN KEXUE BAN - ACTA SCIENTIARUMNATURALIUM UNIVERSITATIS PEKINENSIS, BEIJING DAXUE CHUBANSHE, BEIJING, CN, vol. 54, no. 2, 1 January 2018 (2018-01-01), CN, pages 286 - 292, XP055832315, ISSN: 0479-8023, DOI: 10.13209/j.0479-8023.2017.155 * |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113887930A (zh) * | 2021-09-29 | 2022-01-04 | 平安银行股份有限公司 | 问答机器人健康度评估方法、装置、设备及存储介质 |
CN113887930B (zh) * | 2021-09-29 | 2024-04-23 | 平安银行股份有限公司 | 问答机器人健康度评估方法、装置、设备及存储介质 |
CN115292461A (zh) * | 2022-08-01 | 2022-11-04 | 北京伽睿智能科技集团有限公司 | 基于语音识别的人机交互学习方法及系统 |
CN115292461B (zh) * | 2022-08-01 | 2024-03-12 | 北京伽睿智能科技集团有限公司 | 基于语音识别的人机交互学习方法及系统 |
CN116662522A (zh) * | 2023-07-28 | 2023-08-29 | 阿里巴巴达摩院(杭州)科技有限公司 | 问题答案推荐方法、存储介质和电子设备 |
CN116662522B (zh) * | 2023-07-28 | 2023-12-12 | 阿里巴巴达摩院(杭州)科技有限公司 | 问题答案推荐方法、存储介质和电子设备 |
CN116662523A (zh) * | 2023-08-01 | 2023-08-29 | 宁波甬恒瑶瑶智能科技有限公司 | 一种基于gpt模型的生化知识问答方法、系统及存储介质 |
CN116662523B (zh) * | 2023-08-01 | 2023-10-20 | 宁波甬恒瑶瑶智能科技有限公司 | 一种基于gpt模型的生化知识问答方法、系统及存储介质 |
CN117235240A (zh) * | 2023-11-14 | 2023-12-15 | 神州医疗科技股份有限公司 | 一种基于异步消费队列的多模型结果融合问答方法及系统 |
CN117235240B (zh) * | 2023-11-14 | 2024-02-20 | 神州医疗科技股份有限公司 | 一种基于异步消费队列的多模型结果融合问答方法及系统 |
Also Published As
Publication number | Publication date |
---|---|
CN111695354A (zh) | 2020-09-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2021151271A1 (zh) | 基于命名实体的文本问答的方法、装置、设备及存储介质 | |
CN112131366B (zh) | 训练文本分类模型及文本分类的方法、装置及存储介质 | |
WO2021121198A1 (zh) | 基于语义相似度的实体关系抽取方法、装置、设备及介质 | |
WO2021164199A1 (zh) | 基于多粒度融合模型的中文句子语义智能匹配方法及装置 | |
WO2020237856A1 (zh) | 基于知识图谱的智能问答方法、装置及计算机存储介质 | |
CN110705301B (zh) | 实体关系抽取方法及装置、存储介质、电子设备 | |
WO2021042516A1 (zh) | 命名实体识别方法、装置及计算机可读存储介质 | |
WO2023029502A1 (zh) | 基于问诊会话构建用户画像的方法、装置、设备和介质 | |
CN116795973B (zh) | 基于人工智能的文本处理方法及装置、电子设备、介质 | |
CN113722483B (zh) | 话题分类方法、装置、设备及存储介质 | |
CN112131883B (zh) | 语言模型训练方法、装置、计算机设备和存储介质 | |
CN113553412B (zh) | 问答处理方法、装置、电子设备和存储介质 | |
CN113392209B (zh) | 一种基于人工智能的文本聚类方法、相关设备及存储介质 | |
WO2020073533A1 (zh) | 自动问答方法及装置 | |
CN113378970B (zh) | 语句相似性检测方法、装置、电子设备及存储介质 | |
WO2021129123A1 (zh) | 语料数据处理方法、装置、服务器和存储介质 | |
CN112052318A (zh) | 一种语义识别方法、装置、计算机设备和存储介质 | |
CN113204611A (zh) | 建立阅读理解模型的方法、阅读理解方法及对应装置 | |
CN110795544B (zh) | 内容搜索方法、装置、设备和存储介质 | |
WO2023173554A1 (zh) | 坐席违规话术识别方法、装置、电子设备、存储介质 | |
WO2023178979A1 (zh) | 问题标注方法、装置、电子设备及存储介质 | |
CN116821373A (zh) | 基于图谱的prompt推荐方法、装置、设备及介质 | |
CN116450829A (zh) | 医疗文本分类方法、装置、设备及介质 | |
CN114662484A (zh) | 语义识别方法、装置、电子设备及可读存储介质 | |
CN113704481B (zh) | 一种文本处理方法、装置、设备及存储介质 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 20917179 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 20917179 Country of ref document: EP Kind code of ref document: A1 |