CN111639160A - Domain identification method, interaction method, electronic device and storage medium - Google Patents

Domain identification method, interaction method, electronic device and storage medium Download PDF

Info

Publication number
CN111639160A
CN111639160A CN202010476833.0A CN202010476833A CN111639160A CN 111639160 A CN111639160 A CN 111639160A CN 202010476833 A CN202010476833 A CN 202010476833A CN 111639160 A CN111639160 A CN 111639160A
Authority
CN
China
Prior art keywords
text information
candidate
subcategory
domain
query statement
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010476833.0A
Other languages
Chinese (zh)
Inventor
付霞
杨俊�
王正魁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Cloudminds Robotics Co Ltd
Original Assignee
Cloudminds Robotics Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Cloudminds Robotics Co Ltd filed Critical Cloudminds Robotics Co Ltd
Priority to CN202010476833.0A priority Critical patent/CN111639160A/en
Publication of CN111639160A publication Critical patent/CN111639160A/en
Priority to PCT/CN2021/096548 priority patent/WO2021239078A1/en
Pending legal-status Critical Current

Links

Images

Classifications

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Computational Linguistics (AREA)
  • Artificial Intelligence (AREA)
  • Human Computer Interaction (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Machine Translation (AREA)

Abstract

The embodiment of the invention relates to the field of natural language processing, and discloses a field identification method, an interaction method, electronic equipment and a storage medium. The method for identifying the field in the invention comprises the following steps: determining the probability that the query statement of the user belongs to each preset field; selecting a candidate subcategory from a plurality of preset subcategories according to the query statement; wherein the candidate subcategory is a subcategory to which the query statement belongs; the plurality of subcategories includes a subcategory of the each domain; calculating a score for the candidate subcategory; and correcting the probability of the query statement belonging to each field according to the scores of the candidate subcategories to obtain the field of the query statement. By adopting the embodiment, the field of the query sentence of the user can be accurately identified.

Description

Domain identification method, interaction method, electronic device and storage medium
Technical Field
The embodiment of the invention relates to the field of natural language processing, in particular to a field identification method, an interaction method, electronic equipment and a storage medium.
Background
The domain recognition means that for different question sentences given by the user, the domain recognition model can give the correct domain to which the question sentence belongs, for example, the user says "weather in Beijing" and can be classified into the weather domain, the "story of Nippon girl" can be classified into the story domain, the "speaking jokes" can be classified into the jokes domain, and the like. Whether a robot can communicate with a user without obstacles, understanding the actual needs of the user and giving a response are important criteria for measuring whether a robot is intelligent, and the robot can be a service type robot, a functional robot, and the like. The domain identification can enable the robot to acquire the domain to which the question of the user belongs, and narrow the scope of language processing, so that the robot can quickly acquire the accurate intention of the user and provide corresponding service and answer for the user. If the user inquires that the weather is 'what the weather is like today', the field recognition model divides the question into story fields, the response given by the robot is that a story is played at random, and the accuracy of recognition in the visible field directly influences the accuracy of feedback of the robot.
The inventors found that at least the following problems exist in the related art: the current domain identification method cannot accurately identify the domain of the question and influences the feedback of the robot to the question.
Disclosure of Invention
An object of embodiments of the present invention is to provide a domain identification method, an interaction method, an electronic device, and a storage medium, which enable accurate identification of a domain to which a query statement of a user belongs.
In order to solve the above technical problem, an embodiment of the present invention provides a method for identifying a domain, including: determining the probability that the query statement of the user belongs to each preset field; selecting candidate subcategories from a plurality of preset subcategories according to the query statement; the candidate subcategories refer to subcategories to which the query sentences belong; the plurality of subcategories includes a subcategory of each domain; calculating scores of the candidate subcategories; and correcting the probability of the query sentence belonging to each preset field according to the scores of the candidate subcategories to obtain the field of the query sentence.
The embodiment of the invention also provides an interaction method, which comprises the following steps: identifying the field of the query statement by adopting the field identification method; determining an intent of the query statement based on the identified domain of belongingness; feedback information of the query statement is determined according to the intention.
An embodiment of the present invention also provides an electronic device, including: at least one processor, and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method for field identification or the method for interaction described above.
Embodiments of the present invention also provide a computer-readable storage medium storing a computer program, which when executed by a processor implements the above-mentioned method for field identification or the above-mentioned method for interaction.
Compared with the prior art, the method and the device have the advantages that the preset multiple subclasses are included in the subclasses of each field, and the content of each field is enriched; the method comprises the steps of selecting a candidate subcategory to which a query statement belongs from a plurality of preset subcategories, calculating scores of the candidate subcategories, correcting the probability that the query statement belongs to each preset field according to the scores of the candidate subcategories, and accordingly determining the field to which the query statement belongs more accurately.
In addition, the plurality of subcategories are provided with corresponding first text information; selecting a candidate subcategory from a plurality of subcategories according to the query statement, wherein the candidate subcategory comprises: searching first text information matched with the query statement; and taking the subcategory corresponding to the matched first text information as a candidate subcategory. The plurality of sub-categories are provided with the corresponding first text information, so that the candidate sub-categories to which the query sentence belongs can be selected from the plurality of sub-categories through the first text information, the selection mode of the candidate sub-categories is simple, and the selection of the candidate sub-categories is accurate.
In addition, calculating scores for the candidate subcategories includes: determining the ratio of the character length of the matched first text information to the character length of the query sentence; the ratio is taken as the score of the candidate subcategory. The larger the ratio between the character length of the matched first text information and the character length of the query sentence is, the more accurate the matched first text information is, and the score of the candidate subcategory can be accurately represented by the ratio between the character length of the matched first text information and the character length of the query sentence.
In addition, searching for the first text information matched with the query sentence comprises: searching second text information from the plurality of first text information, wherein the second text information refers to the first text information contained in the query sentence; judging whether the searched second text information has wrong second text information, if so, deleting the wrong second text information, and taking the remaining second text information as the matched first text information; otherwise, the searched second text information is used as the matched first text information. And deleting the wrong second text information, and taking the residual second text information as the matched first text information, thereby ensuring the accuracy of the matched first text information.
In addition, the determining whether there is an erroneous second text message in the searched second text message includes: for each of the second text information, the following processing is performed: judging whether the grammatical structure of the second text information belongs to the abnormal grammatical structure, and if so, determining that the second text information is wrong second text information; and/or judging whether a plurality of second text messages belonging to the same subcategory exist or not, if so, determining that an error second text message exists, wherein the error second text message is the second text message except the second text message with the maximum character length in the plurality of second text messages of the same subcategory. A plurality of modes for judging whether the second text information has errors are provided, and the judgment can be flexibly carried out.
In addition, the method for correcting the probability of the query sentence belonging to each field according to the scores of the candidate subcategories to obtain the field of the query sentence belongs to comprises the following steps: and inputting the scores of the candidate subcategories and the probability of the query sentences belonging to each field into a preset field recognition model to obtain the fields of the query sentences, wherein the field recognition model is a pre-trained neural network model. The domain to which the query statement belongs can be quickly and accurately identified through the domain identification model.
In addition, before searching for the first text information matching the query sentence, the method further comprises: and storing the first text information corresponding to each sub-category according to the structure of the dictionary tree. And by adopting a storage mode of the dictionary tree, the subsequent searching of the second text information is faster, and the searching time is shortened.
Drawings
One or more embodiments are illustrated by way of example in the accompanying drawings, which correspond to the figures in which like reference numerals refer to similar elements and which are not to scale unless otherwise specified.
FIG. 1 is a flow chart of a method for domain identification provided in accordance with a first embodiment of the present invention;
FIG. 2 is a diagram illustrating an implementation of searching for a first text message matching a query statement according to a second embodiment of the present invention;
FIG. 3 is a flow chart of a method of interaction provided in accordance with a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, embodiments of the present invention will be described in detail below with reference to the accompanying drawings. However, it will be appreciated by those of ordinary skill in the art that numerous technical details are set forth in order to provide a better understanding of the present application in various embodiments of the present invention. However, the technical solution claimed in the present application can be implemented without these technical details and various changes and modifications based on the following embodiments.
The inventor finds that most of existing field recognition methods are implemented based on text classification methods, but since machines do not have much common knowledge like humans, it is difficult for machines to give accurate answers to problems beyond the scope of machine learning, for example, when a person hears the sentence "i want to listen to miss director", the brain of a person can deduce that "miss director" is a song name of a song based on common knowledge, but when the electronic device acquires "miss i want to listen to", if the electronic device does not know that "miss director" is a song, the electronic device is difficult to correctly classify the question "miss i want to listen to miss" into the music field, and it is very likely that the "miss i want to go to miss" is classified into the listening field or into other wrong fields. It is clear that the recognition accuracy of the current domain recognition methods still needs to be improved.
A first embodiment of the invention relates to a method of domain identification. The method for identifying the field can be applied to electronic equipment, such as computers, servers, robots and other equipment, and the specific flow of the method for identifying the field is shown in fig. 1:
step 101: and determining the probability that the query statement of the user belongs to each preset domain.
And acquiring a query statement of the user, wherein the query statement can be acquired by acquiring the audio of the user or can be acquired by an input interface. The query statement may be in any language, and the language of the query statement is not limited in this application.
In one example, the probability that the query statement belongs to each preset domain is determined according to the query statement and a preset initial domain prediction model, and the initial domain recognition model is a pre-trained neural network model.
Specifically, the initial domain recognition model can be trained in advance, and the accuracy of text classification of the initial domain recognition model can be improved by adopting a transfer learning technology. It can be understood that the fields, the number of the fields, the training sample data, the parameters of the neural network model, and the like can be preset as required, the input sample of the training sample data is various query statements, the output sample is the field corresponding to each query statement, the neural network model is trained according to the training sample data, and the initial field prediction model can be obtained, and it can be understood that the output result of the initial field prediction model is the probability of each field. And inputting the query statement into the initial domain prediction model to obtain the probability that the query statement belongs to each preset domain.
Step 102: selecting candidate subcategories from a plurality of preset subcategories according to the query statement; the candidate subcategories refer to subcategories to which the query sentences belong; the plurality of subcategories includes subcategories for each domain.
Specifically, the number of the preset plurality of sub-categories may be determined according to the number of the sub-categories of each domain, for example, there are m domains, each domain includes 2 sub-categories, and then the number n of the preset plurality of sub-categories is m × 2, although in practical applications, the number of the sub-categories of each domain does not need to be the same. The preset plurality of subcategories include subcategories of each field, for example, if there are a music field and a drama field, the music field includes two subcategories of singer and song name, and the drama field includes: three subcategories of the name of the opera, the person of the opera and the type of the opera are selected, and then the preset subcategories are as follows: singer, name of song, name of opera, operant, type of opera.
The preset sub-categories can be stored in the electronic equipment or in an additional hard disk, and the preset sub-categories can be loaded when the electronic equipment needs to be used.
In one example, the plurality of sub-categories are provided with corresponding first text information; the process of selecting a candidate sub-category from a preset plurality of sub-categories according to the query statement includes: searching first text information matched with the query statement; and taking the subcategory corresponding to the matched first text information as a candidate subcategory.
Specifically, the first text information corresponding to each sub-category may be stored according to a structure of the dictionary tree. And searching second text information in a dictionary tree mode, wherein the second text information refers to the first text information contained in the query sentence. And taking the searched second text information as the matched first text information, and taking the subcategory corresponding to the matched first text information as a candidate subcategory. The process of selecting candidate sub-categories is described as an example below:
the query statement is "better in tomorrow", and subcategories include: song names, wherein the first text information corresponding to the song names is as follows: the 'better tomorrow' is searched according to the structure query of the dictionary tree, and the first text information of the 'better tomorrow' is searched, and the first text information corresponds to the song name, so that the candidate subcategory can be determined to be the song name. If the matched first text information is not inquired, no candidate subcategory exists.
Step 103: the scores of the candidate subcategories are calculated.
In one example, a ratio between a character length of the matched first text information and a character length of the query sentence is determined; the ratio is taken as the score of the candidate subcategory.
Specifically, if there are a plurality of matching first text messages, scores of a plurality of corresponding candidate subcategories can be calculated. For example, if there are n matched first text messages and the n matched first text messages correspond to sub-categories as candidate sub-categories, scores of the n candidate sub-categories may be obtained, and the scores may be expressed as formula (1):
Figure BDA0002516110560000051
where L denotes a character length of the matched first text information, L denotes a character length of the query sentence, kjRepresenting the score of the query statement on the jth candidate sub-category. The scores for the multiple candidate subcategories may be expressed as: k ═ K1,k2,k3……,kj,……,kn]。
Step 104: and correcting the probability of the query sentence belonging to each preset field according to the scores of the candidate subcategories to obtain the field of the query sentence.
In one example, the scores of the candidate sub-categories and the probability that the query statement belongs to each field are input into a preset field recognition model to obtain the field to which the query statement belongs, and the field recognition model is a pre-trained neural network model.
Specifically, the domain identification model may be trained in advance, the input data of the domain identification model includes scores of candidate subcategories and probabilities of query sentences belonging to each domain, confidence levels of the query sentences belonging to each domain are output, and the domain with the highest confidence level is selected as the domain to which the query sentences belong. The domain identification model may employ a neural network model.
Compared with the prior art, the method and the device have the advantages that the preset multiple subclasses are included in the subclasses of each field, and the content of each field is enriched; the method comprises the steps of selecting a candidate subcategory to which a query statement belongs from a plurality of preset subcategories, calculating scores of the candidate subcategories, correcting the probability that the query statement belongs to each preset field according to the scores of the candidate subcategories, and accordingly determining the field to which the query statement belongs more accurately.
A second embodiment of the invention relates to a method of domain identification. The second embodiment is another implementation manner of searching for the first text information matched with the query statement in the first embodiment, and a specific flow is shown in fig. 2:
step 201: and searching second text information from the plurality of first text information, wherein the second text information refers to the first text information contained in the query sentence.
Specifically, the first text information corresponding to each sub-category may be stored according to a structure of the dictionary tree. And searching second text information in a dictionary tree mode, wherein the second text information refers to the first text information contained in the query sentence. The process of finding the second text information is described below as an example:
for example, the query statement is "better for tomorrow" and subcategories include: song name, date, weather. The first text information corresponding to the song name is as follows: "tomorrow is better", and the first text information corresponding to the date is "tomorrow"; the first text information corresponding to weather is 'rainy in tomorrow'; then according to the structure query of the dictionary tree, the 'tomorrow' and 'tomorrow is better' contained in the query sentence are found, and the 'tomorrow is rainy' is not contained in the query sentence, so that the 'tomorrow' and 'tomorrow is better' is the found second text information.
Step 202: judging whether the searched second text information has wrong second text information or not; if so, go to step 203, otherwise, go to step 204.
In one example, the following is performed for each second text information: and judging whether the grammatical structure of the second text information belongs to the abnormal grammatical structure, and if so, determining that the second text information is wrong second text information.
Specifically, the following processing is performed for each piece of second text information: and judging whether the grammar structure of the second text information belongs to an abnormal grammar structure, wherein the abnormal grammar structure refers to an abnormal grammar structure in the current language, such as a grammar structure lacking a predicate in Chinese. For example, if the second text message is "you can", the second text message only has subject and verb, and cannot form a sentence, and belongs to an abnormal grammatical structure.
In another example, the determining whether there is an error in the searched second text information may further include: and judging whether a plurality of second text messages belonging to the same subcategory exist, if so, determining that the wrong second text message exists, wherein the wrong second text message is the second text message except the second text message with the maximum character length in the plurality of second text messages of the same subcategory.
Specifically, whether a plurality of second text messages belonging to the same subcategory exist or not is judged, if yes, the second text messages with errors exist, and the second text messages with errors are the second text messages except the second text message with the maximum character length in the plurality of second text messages of the same subcategory; for example, if the query statement is "better for tomorrow", then "better for tomorrow" and "better for tomorrow" are found, the two second text messages both belong to the category of songs, "better for tomorrow" is the second text message with the largest character length in the sub-category of songs, and then the wrong second text message is "tomorrow". The two determination methods may be used together or separately.
Step 203: and deleting the wrong second text information, and taking the remaining second text information as the matched first text information.
When there are a plurality of second text messages, all the second text messages belonging to the abnormal syntax structure are detected, and the erroneous second text messages are deleted.
By deleting the wrong second text information, the interference of the wrong information can be reduced, and the candidate subcategories can be accurately selected.
Step 204: and taking the searched second text information as the matched first text information.
And if the second text information does not have errors, directly taking the found second text information as the matched first text information.
In the method for identifying the field provided in this embodiment, the second text information with errors is deleted, and the remaining second text information is used as the matched first text information, so that the accuracy of the matched first text information is ensured.
The steps of the above methods are divided for clarity, and the implementation may be combined into one step or split some steps, and the steps are divided into multiple steps, so long as the same logical relationship is included, which are all within the protection scope of the present patent; it is within the scope of the patent to add insignificant modifications to the algorithms or processes or to introduce insignificant design changes to the core design without changing the algorithms or processes.
The third embodiment of the present invention relates to an interaction method, which can be applied to an electronic device, such as a robot, a computer, a server, and the like. The specific flow of the interaction method is shown in fig. 3.
Step 301: the domain to which the query statement belongs is identified by using a domain identification method, which is the domain identification method in the first embodiment or the second embodiment.
Specifically, the electronic device interacts with a person through the interaction method, or interacts with other terminals. In this example, the user and the electronic device are taken as an example for interaction. The query sentence of the user is "play night music", and after the electronic device obtains the query sentence, the domain to which the query sentence belongs is identified as the music domain by the domain identification method in the first embodiment or the second embodiment.
Step 302: determining an intent of the query statement based on the identified domain of belongingness.
And searching an intention identification model corresponding to the field, and identifying the intention of the query statement to obtain the corresponding intention and slot position. For example, "play a night song" is intended to be "play", the slot is "song name", and the slot value corresponding to the slot is "night song".
Step 303: feedback information of the query statement is determined according to the intention.
And determining the feedback information of the query statement according to the intention, the slot position and the slot position value. For example, according to the intention, slot position, and slot position value of "play the night song", the feedback information may be determined as "start the player and play the song of the night song", and the electronic device may start the player according to the feedback information and play the song of the night song.
According to the interaction method provided by the embodiment, the field of the query sentence can be accurately determined, so that accurate feedback information can be determined.
A fourth embodiment of the present invention relates to an electronic device 40, as shown in fig. 4, including: at least one processor 401, and a memory 402 communicatively coupled to the at least one processor 401; the memory 402 stores instructions executable by the at least one processor 401, and the instructions are executed by the at least one processor 401, so that the at least one processor 401 can execute the method for field recognition of the first embodiment or the second embodiment, or the method for interaction in the third embodiment.
The memory 402 and the processor 401 are connected by a bus, which may include any number of interconnected buses and bridges that link one or more of the various circuits of the processor 401 and the memory 402. The bus may also link various other circuits such as peripherals, voltage regulators, power management circuits, and the like, which are well known in the art, and therefore, will not be described any further herein. A bus interface provides an interface between the bus and the transceiver. The transceiver may be one element or a plurality of elements, such as a plurality of receivers and transmitters, providing a means for communicating with various other apparatus over a transmission medium. The data processed by the processor is transmitted over a wireless medium via an antenna, which further receives the data and transmits the data to the processor.
The processor 401 is responsible for managing the bus and general processing and may provide various functions including timing, peripheral interfaces, voltage regulation, power management, and other control functions. And the memory may be used to store data used by the processor in performing operations.
A fifth embodiment of the present invention relates to a computer-readable storage medium storing a computer program which, when executed by a processor, implements the method for field recognition of the first or second embodiment or implements the method for interaction of the third embodiment.
Those skilled in the art can understand that all or part of the steps in the method of the foregoing embodiments may be implemented by a program to instruct related hardware, where the program is stored in a storage medium and includes several instructions to enable a device (which may be a single chip, a chip, etc.) or a processor (processor) to execute all or part of the steps of the method described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
It will be understood by those of ordinary skill in the art that the foregoing embodiments are specific examples for carrying out the invention, and that various changes in form and details may be made therein without departing from the spirit and scope of the invention in practice.
The embodiment of the application discloses A1. a method for identifying a field, which comprises the following steps:
determining the probability that the query statement of the user belongs to each preset field;
selecting a candidate subcategory from a plurality of preset subcategories according to the query statement; wherein the candidate subcategory is a subcategory to which the query statement belongs; the plurality of subcategories includes a subcategory of the each domain;
calculating a score for the candidate subcategory;
and correcting the probability of the query statement belonging to each preset field according to the scores of the candidate subcategories to obtain the field of the query statement.
A2. According to the method for recognizing the field A1, the plurality of subcategories are provided with corresponding first text information;
selecting a candidate sub-category from a plurality of preset sub-categories according to the query statement, wherein the selecting comprises:
searching first text information matched with the query statement;
and taking the subcategory corresponding to the matched first text information as a candidate subcategory.
A3. The method of domain identification according to a2, the calculating a score for the candidate subcategory comprising:
determining a ratio between the character length of the matched first text information and the character length of the query sentence;
taking the ratio as a score for the candidate sub-category.
A4. The method for domain identification according to A2 or A3, wherein the searching for the first text information matching the query statement comprises:
searching second text information from the plurality of first text information, wherein the second text information refers to the first text information contained in the query sentence;
judging whether the searched second text information has wrong second text information or not, if so, deleting the wrong second text information, and taking the remaining second text information as the matched first text information; otherwise, the searched second text information is used as the matched first text information.
A5. The method for recognizing a domain according to a4, wherein the determining whether there is an erroneous second text message in the second text message includes:
for each of the second text information, the following processing is performed: judging whether the grammatical structure of the second text information belongs to an abnormal grammatical structure, if so, determining that the second text information is wrong second text information;
and/or the presence of a gas in the gas,
and judging whether a plurality of second text messages belonging to the same subcategory exist, if so, determining that wrong second text messages exist, wherein the wrong second text messages are second text messages except the second text message with the maximum character length in the plurality of second text messages of the same subcategory.
A6. The method for domain identification according to any one of a 1-a 5, the rectifying the probability that the query sentence belongs to each domain according to the scores of the candidate subcategories to obtain the domain to which the query sentence belongs, comprising:
and inputting the scores of the candidate subcategories and the probability of the query sentence belonging to each field into a preset field recognition model to obtain the field of the query sentence, wherein the field recognition model is a pre-trained neural network model.
A7. The method of domain identification of any of A2-A6, prior to the finding the first textual information that matches the query statement, the method further comprising:
and storing the first text information corresponding to each sub-category according to the structure of the dictionary tree.
A8. The method for domain identification according to any one of A1-A7, wherein the determining the probability that the user's query statement belongs to each preset domain comprises:
and determining the probability that the query statement belongs to each preset field according to the query statement and a preset initial field prediction model, wherein the initial field recognition model is a pre-trained neural network model.
The embodiment of the application discloses B1. an interaction method, which comprises the following steps:
adopting the method for identifying the domain of any one of A1-A8 to identify the domain of the query statement;
determining an intention of the query statement according to the identified domain of interest;
and determining feedback information of the query statement according to the intention.
The embodiment of the application discloses C1 electronic equipment, includes:
at least one processor, and,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform a method for domain identification as any one of A1-A8 or a method for interaction as B1.
The embodiment of the application discloses D1. a computer readable storage medium, which stores a computer program, wherein the computer program is used for realizing the method for identifying the field in any one of A1-A8 or the method for interacting according to B1 when being executed by a processor.

Claims (10)

1. A method of domain identification, comprising:
determining the probability that the query statement of the user belongs to each preset field;
selecting a candidate subcategory from a plurality of preset subcategories according to the query statement; wherein the candidate subcategory is a subcategory to which the query statement belongs; the plurality of subcategories includes a subcategory of the each domain;
calculating a score for the candidate subcategory;
and correcting the probability of the query statement belonging to each preset field according to the scores of the candidate subcategories to obtain the field of the query statement.
2. The method of domain identification according to claim 1, wherein the plurality of sub-categories are provided with corresponding first textual information;
selecting a candidate sub-category from a plurality of preset sub-categories according to the query statement, wherein the selecting comprises:
searching first text information matched with the query statement;
and taking the subcategory corresponding to the matched first text information as a candidate subcategory.
3. The method of domain identification according to claim 2, wherein said calculating a score for said candidate subcategory comprises:
determining a ratio between the character length of the matched first text information and the character length of the query sentence;
taking the ratio as a score for the candidate sub-category.
4. The method for identifying areas according to claim 2 or 3, wherein the searching for the first text information matching the query sentence comprises:
searching second text information from the plurality of first text information, wherein the second text information refers to the first text information contained in the query sentence;
judging whether the searched second text information has wrong second text information or not, if so, deleting the wrong second text information, and taking the remaining second text information as the matched first text information; otherwise, the searched second text information is used as the matched first text information.
5. The method for recognizing a domain according to claim 4, wherein the determining whether there is an erroneous second text message in the searched second text message comprises:
for each of the second text information, the following processing is performed: judging whether the grammatical structure of the second text information belongs to an abnormal grammatical structure, if so, determining that the second text information is wrong second text information;
and/or the presence of a gas in the gas,
and judging whether a plurality of second text messages belonging to the same subcategory exist, if so, determining that wrong second text messages exist, wherein the wrong second text messages are second text messages except the second text message with the maximum character length in the plurality of second text messages of the same subcategory.
6. The method for domain identification according to any one of claims 1 to 5, wherein the rectifying the probability of the query sentence belonging to each domain according to the score of the candidate subcategory to obtain the domain to which the query sentence belongs comprises:
and inputting the scores of the candidate subcategories and the probability of the query sentence belonging to each field into a preset field recognition model to obtain the field of the query sentence, wherein the field recognition model is a pre-trained neural network model.
7. The method of domain identification according to any of claims 2 to 6, wherein prior to said finding the first textual information that matches the query sentence, the method further comprises:
and storing the first text information corresponding to each sub-category according to the structure of the dictionary tree.
8. A method of interaction, comprising:
identifying a domain to which a query statement belongs, using a method of domain identification as claimed in any one of claims 1 to 7;
determining an intention of the query statement according to the identified domain of interest;
and determining feedback information of the query statement according to the intention.
9. An electronic device, comprising:
at least one processor, and,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform a method of domain identification as claimed in any one of claims 1 to 7 or to perform a method of interaction as claimed in claim 8.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method for domain identification of any one of claims 1 to 7 or the method for interaction of claim 8.
CN202010476833.0A 2020-05-29 2020-05-29 Domain identification method, interaction method, electronic device and storage medium Pending CN111639160A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202010476833.0A CN111639160A (en) 2020-05-29 2020-05-29 Domain identification method, interaction method, electronic device and storage medium
PCT/CN2021/096548 WO2021239078A1 (en) 2020-05-29 2021-05-27 Field recognition method, interaction method, electronic device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010476833.0A CN111639160A (en) 2020-05-29 2020-05-29 Domain identification method, interaction method, electronic device and storage medium

Publications (1)

Publication Number Publication Date
CN111639160A true CN111639160A (en) 2020-09-08

Family

ID=72331545

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010476833.0A Pending CN111639160A (en) 2020-05-29 2020-05-29 Domain identification method, interaction method, electronic device and storage medium

Country Status (2)

Country Link
CN (1) CN111639160A (en)
WO (1) WO2021239078A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113254615A (en) * 2021-05-31 2021-08-13 中国移动通信集团陕西有限公司 Text processing method, device, equipment and medium
WO2021239078A1 (en) * 2020-05-29 2021-12-02 达闼机器人有限公司 Field recognition method, interaction method, electronic device, and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8620951B1 (en) * 2012-01-28 2013-12-31 Google Inc. Search query results based upon topic
CN108563790A (en) * 2018-04-28 2018-09-21 科大讯飞股份有限公司 A kind of semantic understanding method and device, equipment, computer-readable medium
CN109918673A (en) * 2019-03-14 2019-06-21 湖北亿咖通科技有限公司 Semantic referee method, device, electronic equipment and computer readable storage medium
CN111091011A (en) * 2019-12-20 2020-05-01 科大讯飞股份有限公司 Domain prediction method, domain prediction device and electronic equipment

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11081106B2 (en) * 2017-08-25 2021-08-03 Microsoft Technology Licensing, Llc Contextual spoken language understanding in a spoken dialogue system
CN110377916B (en) * 2018-08-17 2022-12-16 腾讯科技(深圳)有限公司 Word prediction method, word prediction device, computer equipment and storage medium
CN110210022B (en) * 2019-05-22 2022-12-27 北京百度网讯科技有限公司 Title identification method and device
CN110162795A (en) * 2019-05-30 2019-08-23 重庆大学 A kind of adaptive cross-cutting name entity recognition method and system
CN111126084B (en) * 2019-12-11 2023-06-27 Oppo广东移动通信有限公司 Data processing method, device, electronic equipment and storage medium
CN111639160A (en) * 2020-05-29 2020-09-08 达闼机器人有限公司 Domain identification method, interaction method, electronic device and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8620951B1 (en) * 2012-01-28 2013-12-31 Google Inc. Search query results based upon topic
CN108563790A (en) * 2018-04-28 2018-09-21 科大讯飞股份有限公司 A kind of semantic understanding method and device, equipment, computer-readable medium
CN109918673A (en) * 2019-03-14 2019-06-21 湖北亿咖通科技有限公司 Semantic referee method, device, electronic equipment and computer readable storage medium
CN111091011A (en) * 2019-12-20 2020-05-01 科大讯飞股份有限公司 Domain prediction method, domain prediction device and electronic equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021239078A1 (en) * 2020-05-29 2021-12-02 达闼机器人有限公司 Field recognition method, interaction method, electronic device, and storage medium
CN113254615A (en) * 2021-05-31 2021-08-13 中国移动通信集团陕西有限公司 Text processing method, device, equipment and medium

Also Published As

Publication number Publication date
WO2021239078A1 (en) 2021-12-02

Similar Documents

Publication Publication Date Title
US10115056B2 (en) Method and apparatus for responding to an inquiry
US20240028837A1 (en) Device and method for machine reading comprehension question and answer
US9582757B1 (en) Scalable curation system
CN110727779A (en) Question-answering method and system based on multi-model fusion
CN109165291B (en) Text matching method and electronic equipment
WO2017181834A1 (en) Intelligent question and answer method and device
CN108170859A (en) Method, apparatus, storage medium and the terminal device of speech polling
WO2022237253A1 (en) Test case generation method, apparatus and device
US11531693B2 (en) Information processing apparatus, method and non-transitory computer readable medium
WO2018057427A1 (en) Syntactic re-ranking of potential transcriptions during automatic speech recognition
CN111832305B (en) User intention recognition method, device, server and medium
CN110162675B (en) Method and device for generating answer sentence, computer readable medium and electronic device
US11526512B1 (en) Rewriting queries
CN113326702B (en) Semantic recognition method, semantic recognition device, electronic equipment and storage medium
CN112686051B (en) Semantic recognition model training method, recognition method, electronic device and storage medium
WO2021239078A1 (en) Field recognition method, interaction method, electronic device, and storage medium
CN110717021A (en) Input text and related device for obtaining artificial intelligence interview
CN114678027A (en) Error correction method and device for voice recognition result, terminal equipment and storage medium
CN111708870A (en) Deep neural network-based question answering method and device and storage medium
CN113157887A (en) Knowledge question-answering intention identification method and device and computer equipment
CN113705207A (en) Grammar error recognition method and device
CN112632956A (en) Text matching method, device, terminal and storage medium
CN116028626A (en) Text matching method and device, storage medium and electronic equipment
CN114242047A (en) Voice processing method and device, electronic equipment and storage medium
CN113806475A (en) Information reply method and device, electronic 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
CB02 Change of applicant information

Address after: 200245 Building 8, No. 207, Zhongqing Road, Minhang District, Shanghai

Applicant after: Dayu robot Co.,Ltd.

Address before: 201100 2nd floor, building 2, No. 1508, Kunyang Road, Minhang District, Shanghai

Applicant before: Dalu Robot Co.,Ltd.

CB02 Change of applicant information