CN114691921A - Retrieval method, retrieval device, computer readable storage medium and terminal equipment - Google Patents

Retrieval method, retrieval device, computer readable storage medium and terminal equipment Download PDF

Info

Publication number
CN114691921A
CN114691921A CN202011628804.8A CN202011628804A CN114691921A CN 114691921 A CN114691921 A CN 114691921A CN 202011628804 A CN202011628804 A CN 202011628804A CN 114691921 A CN114691921 A CN 114691921A
Authority
CN
China
Prior art keywords
weight value
entity
determining
domain
candidate
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
CN202011628804.8A
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.)
Shenzhen TCL New Technology Co Ltd
Original Assignee
Shenzhen TCL New Technology 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 Shenzhen TCL New Technology Co Ltd filed Critical Shenzhen TCL New Technology Co Ltd
Priority to CN202011628804.8A priority Critical patent/CN114691921A/en
Publication of CN114691921A publication Critical patent/CN114691921A/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/60Information retrieval; Database structures therefor; File system structures therefor of audio data
    • G06F16/68Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/683Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases
    • G06F16/288Entity relationship models
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis

Landscapes

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

Abstract

The invention discloses a retrieval method, a retrieval device, a computer readable storage medium and terminal equipment, wherein the method comprises the steps of acquiring voice information to be processed; retrieving a preset database according to the voice information to obtain an initial data set; performing domain recognition on the voice information, and determining a plurality of candidate domains corresponding to the voice information in a preset knowledge domain; and determining a domain weight value corresponding to each candidate domain according to the initial data set and the voice information, and determining a target data subset in the initial data set according to the domain weight value. The invention can improve the accuracy of the retrieval result when the same noun has different meanings in different fields.

Description

Retrieval method, retrieval device, computer readable storage medium and terminal equipment
Technical Field
The present invention relates to the field of retrieval technologies, and in particular, to a retrieval method, a retrieval apparatus, a computer-readable storage medium, and a terminal device.
Background
With the development of information technology, the distance between a person and information is reduced, but this also brings a huge amount of data. However, the personal energy is limited, and therefore, it is a challenge in the current search field to quickly find out the data desired by the user from the massive data.
The current information retrieval mainly depends on mapping tables and knowledge graph realization. In order to meet the requirements of different users, a mapping table or a knowledge map is generally constructed on all data, then after a retrieval instruction of the user is received, related data are retrieved in a database respectively according to a plurality of key words in the retrieval instruction, and finally intersection is taken for the retrieved data, so that the data to be retrieved by the user are determined. However, the retrieval mode mainly depends on keywords without renaming problems. Especially, when the duplicate names appear in different domains, the accuracy of the retrieval result is greatly reduced.
Disclosure of Invention
The technical problem to be solved by the present invention is to provide a search method for overcoming the disadvantages of the prior art.
In order to solve the technical problems, the technical scheme adopted by the invention is as follows:
a method of retrieval, the method comprising:
acquiring voice information to be processed;
retrieving a preset database according to the voice information to obtain an initial data set;
performing domain recognition on the voice information, and determining a plurality of candidate domains corresponding to the voice information in a preset knowledge domain;
and determining a domain weight value corresponding to each candidate domain according to the initial data set and the voice information, and determining a target data subset in the initial data set according to the domain weight value.
The retrieval method, wherein the domain weight values include a first weight value and a second weight value, and determining the domain weight value corresponding to each of the candidate domains according to the initial data set and the voice information includes:
aiming at each candidate field, determining a target slot position result corresponding to the candidate field according to the voice information;
determining a first weight value corresponding to the candidate field according to the target slot position result;
and determining a second weight value corresponding to the candidate field according to the initial data set.
The retrieval method comprises the steps that the target slot position result comprises a target slot position and a target slot position value; determining a target slot position result corresponding to the candidate field according to the voice information, wherein the determining comprises:
performing part-of-speech tagging on the voice information to obtain initial slot positions and initial slot position values corresponding to the initial slot positions;
and aiming at each candidate field, determining a target slot position corresponding to the candidate field and a target slot position value corresponding to each target slot position according to the initial slot position.
The retrieval method comprises the steps that the target slot position comprises an entity slot position, and the first weight value comprises an entity weight value; determining a first weight value corresponding to the candidate field according to the target slot position result includes:
determining an entity relation value between slot position values of the entity slot positions according to the entity mapping file corresponding to the candidate field;
and determining an entity weight value corresponding to the candidate field according to the entity relation value.
In the retrieval method, the entity mapping file includes a domain knowledge graph corresponding to the candidate domain.
The searching method, wherein the determining an entity weight value corresponding to the candidate domain according to the entity relationship value includes:
when the entity relation value is a null value, taking a preset entity weight threshold value as an entity weight value corresponding to the candidate field;
and when the entity relation value is a non-null value, determining an entity weight value corresponding to the candidate field according to the size of the entity relation value.
The retrieval method, wherein the first weight value further comprises a non-entity weight value; determining a first weight value corresponding to the candidate field according to the target slot position result includes:
when the slot position result comprises a non-entity slot position and the slot position value of the non-entity slot position corresponds to the candidate field, taking a preset gain weight value as a non-entity weight value of the candidate field; and/or the first and/or second light sources,
and when the slot position result does not comprise a non-entity slot position or the slot position value of the non-entity slot position does not correspond to the candidate field, taking a preset attenuation weight value as the non-entity weight value of the candidate field.
The searching method, wherein the determining a second weight value corresponding to the candidate domain according to the initial data set, includes:
counting the number of retrieval data corresponding to the candidate field in the initial data set;
and determining a second weight value corresponding to the candidate field according to the quantity.
The retrieval method, wherein the determining a target data subset in the initial data set according to the domain weight value includes:
sorting the retrieval data according to the domain weight value corresponding to each candidate domain and the knowledge domain corresponding to the retrieval data in the initial data set to obtain a sorting result;
and determining a target data subset in the initial data set according to the sequencing result.
The retrieval method, wherein retrieving a preset database according to the voice information to obtain an initial data set, includes:
and searching the database according to the target slot position value corresponding to each candidate field to obtain search data corresponding to the target slot position value, and taking all the searches as an initial data set.
The retrieval method, wherein after determining a domain weight value corresponding to each of the candidate domains according to the initial data set and the voice information, and determining a target data subset in the initial data set according to the domain weight value, further includes:
determining a dialog text corresponding to the voice information according to the target data subset;
and generating and outputting a dialogue audio corresponding to the voice information according to the dialogue text.
A retrieval apparatus, wherein the retrieval apparatus comprises:
the acquisition module is used for acquiring voice information to be processed;
the retrieval module is used for retrieving a preset database according to the voice information to obtain an initial data set;
the candidate field module is used for carrying out field recognition on the voice information and determining a plurality of candidate fields corresponding to the language information in a preset knowledge field;
and the screening module is used for determining a domain weight value corresponding to each candidate domain according to the initial data set and the voice information, and determining a target data subset in the initial data set according to the domain weight value.
A computer readable storage medium storing one or more programs, the one or more programs being executable by one or more processors to implement steps in a retrieval method as recited in any of the above.
A terminal device, comprising: a processor, a memory, and a communication bus; the memory has stored thereon a computer readable program executable by the processor;
the communication bus realizes connection communication between the processor and the memory;
the processor, when executing the computer readable program, implements the steps in the retrieval method as described in any of the above.
Has the advantages that: compared with the prior art, the invention provides a retrieval method, a computer readable storage medium and a terminal device.
Drawings
Fig. 1 is a process of processing a language text in a conventional dialog system.
Fig. 2 is a flowchart of a retrieval method provided by the present invention.
Fig. 3 is a schematic diagram of a domain knowledge graph corresponding to the music domain as the knowledge domain in the retrieval method provided by the present invention.
Fig. 4 is a schematic diagram of a domain knowledge graph corresponding to the movie and television domain in the knowledge domain in the retrieval method provided by the present invention.
Fig. 5 is a flowchart of the dialog system processing language text in the retrieval method provided by the present invention.
Fig. 6 is a dialog flow chart of the dialog system in the search method provided by the present invention.
Fig. 7 is a schematic structural diagram of a terminal device provided in the present invention.
Detailed Description
The present invention provides a search method, a computer-readable storage medium and a terminal device, and in order to make the objects, technical solutions and effects of the present invention clearer and clearer, the present invention will be further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
As used herein, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may also be present. Further, "connected" or "coupled" as used herein may include wirelessly connected or wirelessly coupled. As used herein, the term "and/or" includes all or any element and all combinations of one or more of the associated listed items.
It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
The inventor researches and discovers that when the keywords in the content to be searched have the condition of duplicate names, especially when the duplicate names appear in different fields, the accuracy of the search result is greatly reduced.
In order to solve the above problem, in the embodiment of the present invention, to-be-processed voice information is acquired; retrieving a preset database according to the voice information to obtain an initial data set; performing domain recognition on the voice information, and determining a plurality of candidate domains corresponding to the voice information in a preset knowledge domain; and determining a domain weight value corresponding to each candidate domain according to the initial data set and the voice information, and determining a target data subset in the initial data set according to the domain weight value.
For example, the embodiment of the invention can be applied to a search-based dialog system. As shown in fig. 1, a dialog system widely used today is a system that uses various advanced intelligent algorithms such as machine learning, deep learning, reinforcement learning, and transfer learning to allow a machine to understand a human language and effectively communicate with a human, and further understand and execute a specific task or answer according to an intention in the human language. In short, it is a process of retrieving and outputting the most suitable result according to the language text input by the user. For example, a plurality of dialogs, "weather is good today", "Wednesday" today, and the like are preset, and the most suitable one among them is selected and outputted according to the language text inputted by the user, thereby completing the machine-to-human conversation. The current conventional Dialog system converts the Speech input by the user into a Language text by an Automatic Speech Recognition (ASR), then preprocesses the Language text, such as word segmentation and part-of-Speech tagging, and then inputs the preprocessed result into a Natural Language Understanding (NLU) process, where the NLU includes domain segmentation and intention Recognition, and inputs the Natural Language Understanding into a Dialog Management (DM) of multiple rounds of Dialog, and the DM interacts with a database to retrieve relevant information and then outputs the retrieved information or selects an appropriate Dialog output according to the information, where the Dialog system further includes a Natural Language Generation (NLG) technology, and generates a corresponding answer based on the Dialog issued by the user. The embodiment describes an implementation process of the search method of the present invention by taking a search-based dialog system as an example.
It will be appreciated that the retrieval method of the present invention can be used in fields other than application to dialog systems, where the technology is applied to information retrieval.
It should be noted that the above application scenarios are only presented to facilitate understanding of the present invention, and the embodiments of the present invention are not limited in any way in this respect. Rather, embodiments of the present invention may be applied to any scenario where applicable.
The invention will be further explained by the description of the embodiments with reference to the drawings.
As shown in fig. 2, the present implementation provides a retrieval method, which may include the steps of:
and S100, acquiring voice information to be processed.
Specifically, when the dialog system is started, the speech spoken by the user is collected, and audio information to be processed is generated. The audio information is then converted to speech information in text form based on ASR techniques. When the retrieval is needed, the voice information is firstly acquired.
And S200, retrieving a preset database according to the voice information to obtain an initial data set.
Specifically, after the voice information is obtained, a preset database is retrieved according to the voice information, and an initial data set which can be obtained based on the voice information is obtained. The database can be retrieved by adopting a mapping table-based, user-past retrieval preference-based, knowledge map-based and other modes.
Further, in this embodiment, the manner of obtaining the initial data set by searching is to implement the slot value obtained by filling the slot according to the voice information, and the details of the slot value part obtained in the following description are not repeated herein.
S300, performing domain recognition on the voice information, and determining a plurality of candidate domains corresponding to the language information in a preset knowledge domain.
Specifically, a plurality of knowledge fields such as movie, opera, and music are set in advance. After the voice information is obtained, the voice information is subjected to domain recognition, the association degree between the knowledge domains and the voice information is calculated, then the knowledge domains with the first several degrees of association degree ranking are selected as the knowledge domains corresponding to the voice information according to a certain screening rule, and the knowledge domains corresponding to the voice information are called as candidate domains.
S400, according to the initial data set and the voice information, determining a domain weight value corresponding to each candidate domain, and according to the domain weight value, determining a target data subset in the initial data set.
Specifically, the domain weight value is a bias for evaluating the knowledge domain in which the candidate domain is the data actually sought by the user. Because there are generally a plurality of candidate domains available in the domain identification, each data in the initial data set should correspond to a knowledge domain, and if the domain weight value of a certain candidate domain is larger, the data corresponding to the candidate domain in the initial data set is more likely to be the data required by the user; if the domain weight value of a certain candidate domain is smaller, the data corresponding to the candidate domain is less likely to be the data required by the user. Therefore, after the domain weight value corresponding to each candidate domain is determined, the data in the initial data set can be screened based on the knowledge domain corresponding to each data in the initial data set, so as to determine the data which is more likely to be required by the user in the initial data set, and the screened data is the target data subset required by the user.
In the present embodiment, the main way to determine the domain weight values of the candidate domains is determined from the initial data set and the voice information.
In a first implementation manner of this embodiment, the domain weight value includes a first weight value and a second weight value. The process of determining the domain weight value of each candidate domain is as follows:
and A10, determining a target slot position result corresponding to each candidate field according to the voice information.
Specifically, one or more semantic slots are preset, each semantic slot includes a plurality of preset slot (slots), but each slot does not have a corresponding value, and it is necessary to perform sequence labeling on the voice information to determine a value corresponding to each slot, which is called slot filling. And aiming at each candidate field, determining a target slot position result corresponding to the candidate field according to the voice information.
Take the candidate domain as the music domain as an example. In a first way of obtaining the target slot result in this embodiment, the slot result is directly obtained according to the slot after the part of speech tagging and the slot value corresponding to each slot.
A semantic slot is set for each candidate domain in advance. For example, the slots of semantic slots in the music field have "songs" and "singers". Firstly, carrying out sequence marking on voice information to obtain marking information corresponding to each character in the voice information, and then determining a slot position value in the voice information according to the marking information. The slot position result refers to the filled semantic slot, including the slot positions existing in the semantic slot and the slot position value corresponding to each slot position. If the situation that the voice slot is not completely filled exists, on one hand, the user can supplement related contents by adopting modes such as conversation reminding and the like, and on the other hand, the user can continue subsequent retrieval according to the incomplete semantic slot as a slot position result.
In a second way of obtaining a target slot position result in this embodiment, an initial semantic slot is set, and a target slot position result including a target slot position and a target slot position value is obtained based on a candidate field; the process specifically comprises the following steps:
performing part-of-speech tagging on the voice information to obtain initial slot positions and initial slot position values corresponding to the initial slot positions;
and aiming at each candidate field, determining a target slot position corresponding to the candidate field and a target slot position value corresponding to each target slot position according to the initial slot position.
Specifically, an initial semantic slot with coarse granularity is preset, and for example, the slot includes "work name" and "author". Firstly, the obtained voice information is subjected to part-of-speech tagging to obtain initial slot positions and initial slot position values corresponding to the initial slot positions.
And then refining the coarse-grained initial slot position based on the candidate fields of the slot position result to be obtained, so as to obtain a target slot position and a target slot position value corresponding to each candidate field. For example, if the original slot obtained before is "work name", the original slot position value is "karman", and the candidate field is music field, the target slot obtained after refining is "song", and the target slot position value is "karman".
Further, based on the slot position result obtained by the method, the present embodiment provides another method for retrieving a database to obtain an initial data set. And searching the database according to the target slot position value corresponding to each candidate field to obtain search data corresponding to the target slot position value, and taking all the searches as an initial data set. That is, in this embodiment, the step of retrieving may be performed in a conventional retrieval manner before the slot result is obtained, or may be performed according to the target slot value in the slot result after the slot result is obtained.
And A20, determining a first weight value corresponding to the candidate field according to the target slot position result.
Specifically, the first weight value refers to a domain weight value determined according to the target slot position result. As shown in fig. 5, after the target slot result corresponding to each candidate field is obtained, the relationship between the slot values of the entity slots in the voice information is quantized according to whether the slot value in the slot result has a relationship, strength of the relationship, and the like in the candidate field, so as to determine the first weight value corresponding to the candidate field.
In the first way of determining the first weight value in this embodiment, the first weight value is implemented based on an entity slot in the target slot. The target slot position comprises an entity slot position, and the first weight value comprises an entity weight value; determining a first weight value corresponding to the candidate field according to the target slot position result includes:
and B10, determining an entity relation value between the slot values of the entity slots according to the entity mapping file corresponding to the candidate field.
Specifically, an entity mapping file is set for each candidate domain in advance, and the entity mapping file includes entities related to the candidate domain and a relationship between each entity. For example, the resulting physical slots are "songs" and "compositions," and the slot values are "Karman" and "talent," respectively. And respectively searching whether the entity of the 'card door' has a relationship with the 'talent' or/and whether the entity of the 'talent' has a relationship with the entity of the 'card door' in the entity mapping file according to the two slot values, thereby determining the entity relationship value between the slot values of the entity slots. The entity relationship value refers to a quantized value of the entity relationship between slot values, the stronger the entity relationship, the larger the entity relationship value, and when the entity relationship does not exist, the entity relationship value is null.
And B20, determining the entity weight value corresponding to the candidate field according to the entity relation value.
Specifically, if the two entities or the two entities have no entity relationship in the entity mapping file if the karman or the talent is not found in the search, the preset entity weight threshold is used as the candidate field to obtain the entity weight value correspondingly. In general, the entity weight threshold may be set to zero or a minimum value, or even a negative number.
In this embodiment, the entity mapping file may be in the form of an entity mapping table, or may be determined by constructing a domain knowledge graph for each knowledge domain, and retrieving the domain knowledge graph when determining the entity relationship values between slot values of the entity slots. The process of constructing the domain knowledge graph corresponding to each candidate domain is as follows:
acquiring text data of each knowledge field;
aiming at each knowledge field, extracting entities in the text data and entity relations between the entities according to entity rules corresponding to the knowledge field;
and constructing a domain knowledge graph corresponding to the knowledge domain according to the entity and the entity relation.
Specifically, the text data of each knowledge domain is obtained first, and the source of the text data may be websites such as each big data platform. An entity rule is preset for each knowledge field, and the entity rule is used for extracting entity character strings in the text data. Then, according to the extracted relationship between the entities, as shown in fig. 3 and 4, for example, in the movie domain, the relationship between the name of the work and the type of the work exists; a winning relationship exists between the work name and the winning prize; a publishing relationship exists between the name of the work and the publication time; there is a belonging relationship between the work name and the issuing company; there is also a belonging relationship between actors and companies; there are also relations between actors and directors, respectively, and countries. Aiming at each knowledge domain, taking the entities in the knowledge domain as nodes and taking the entity relationship between the entities as edges, thereby constructing a domain knowledge graph corresponding to the knowledge domain. The edge between the entities can be used for identifying the type of entity relationship between the entities and the strength of the entity relationship besides being used for identifying the existence of the edge between the two entities. For example, the same movie, there may be edges with different actors, but the physical relationship of the hero to the movie is generally weaker than the physical relationship of the gamete to the movie.
For example, the slot values of the entity slots are 'kamen' and 'talent', the two entities are searched in the domain knowledge graph, and because the edge between each entity exists through the relationship between the entities, after the entities are searched, the judgment of whether the edge exists between the two entities can determine whether the relationship exists between the slot values, the type, the strength and the like of the relationship, and accordingly the weight value of the entities is determined.
For example, when the entity relationship value is a null value, a preset entity weight threshold value is used as the entity weight value corresponding to the candidate domain. And when the entity relation value is a non-null value, determining an entity weight value corresponding to the candidate field according to the size of the entity relation value.
The entity relation value is a null value, that is, there is no entity relation between the two entities, and the probability that the candidate domain is the knowledge domain that the user wants to retrieve is lower, so the entity weight threshold value is used as the entity weight value corresponding to the candidate domain to avoid that the data corresponding to the candidate domain is selected. When the entity relationship is a non-null value, it indicates that the two entities have an entity relationship in the candidate field, the probability that the candidate field is the knowledge field to be retrieved by the user is higher, and the stronger the entity relationship between the two entities, the higher the probability that the candidate field is the knowledge field to be retrieved by the user is, so that the entity weight value corresponding to the candidate field is determined according to the magnitude of the entity relationship value, and the larger the entity relationship value is, the larger the entity weight value corresponding to the candidate field is.
Further, the slot result includes a non-entity slot in addition to the entity slot, and the non-entity slot can also play a role in determining the knowledge field to be retrieved by the user. For example, the knowledge domain corresponding to the data desired by the user including "desired to listen" is a music domain with a high probability, and the domain corresponding to the voice information including "desired to see" is a movie domain, an opera domain, or the like with a high probability. Therefore, in this embodiment, the first weight value further includes a non-entity weight value, where the non-entity weight value is a field weight value determined according to a slot position value of a non-entity slot in the voice message. The process of determining the non-entity weight value according to the non-entity slot position comprises the following steps:
when the slot position result comprises a non-entity slot position and the slot position value of the non-entity slot position corresponds to the candidate field, taking a preset gain weight value as a non-entity weight value of the candidate field; or the like, or, alternatively,
and when the slot position result does not comprise a non-entity slot position or the slot position value of the non-entity slot position does not correspond to the candidate field, taking a preset attenuation weight value as the non-entity weight value of the candidate field.
Specifically, the corresponding candidate fields, such as the field of music corresponding to "listen" and the field of music corresponding to "play", the field of movies and television, etc., are determined in advance for the slot values of different non-physical slots.
And when the slot result comprises the non-entity slot and the non-entity slot corresponds to the candidate field, indicating that the candidate field is the knowledge field where the retrieval result required by the user is more likely to be. For example, if the obtained non-entity slot is "want to listen", and the candidate field is the music field, the preset gain weight value is used as the non-entity weight value of the music field. The gain weight value can be added to a domain weight value corresponding to the candidate domain.
Or when the slot result does not include the non-entity slot, the preset attenuation weight value is used as the non-entity weight value of the candidate field, and the slot result is obtained according to the voice information, so that the non-entity slot does not exist, and the non-entity weight values of all the candidate fields are all the attenuation weight values. When the slot value of the non-entity slot in the slot result does not correspond to the candidate field, for example, the slot value of the non-entity slot is 'watch', so that the probability that the music field is the knowledge field in which the retrieval result required by the user is located is low, and therefore, the preset attenuation weight value is used as the non-entity weight value of the candidate field.
And A30, determining a second weight value corresponding to the candidate domain according to the initial data set.
Specifically, the initial data set includes a plurality of search data, and the knowledge domain corresponding to different search data should be different. If the data amount of the search data corresponding to the knowledge domain, i.e., the music domain, is the largest, the user is more likely to want to search the search data in the music domain. Therefore, in this embodiment, the second weight value corresponding to the candidate domain may be determined according to the knowledge domain corresponding to the search data in the initial data set.
In this embodiment, the process of determining the second weight value is:
counting the number of retrieval data corresponding to the candidate field in the initial data set;
and determining a second weight value corresponding to the candidate field according to the quantity.
Specifically, according to the candidate fields, the retrieval data in the initial data set is classified, and the number of the retrieval data corresponding to each candidate field is counted. Then, according to the magnitude of the number, a second weighted value corresponding to each candidate domain is determined, for example, the larger the number of the search data corresponding to the music domain is, the larger the second weighted value corresponding to the domain is.
The number of pieces of search data is equal to the sum of counts of pieces of data. Further, when the amount of data in a knowledge domain is larger, the amount of data to be retrieved belonging to the knowledge domain should be larger. Therefore, if the conventional method that the count value of one retrieved data is 1 is adopted, the knowledge domain where the data required by the user is located may be biased, or the data amount is not large, but a large amount of data with weak correlation exists in another knowledge domain, and the second weight value corresponding to the knowledge domain that the user really wants to retrieve is rather lower due to the difference in the data amount. Therefore, in the present embodiment, the count of the search data is not determined in a manner that the corresponding count of 1 search data is 1 as in the conventional case, but is determined according to the sequence number value of the search data in the suzuohu initial data set. The existing retrieval mode assigns a sequence number value to each retrieval data, and the larger the sequence number value is, the higher the probability that the retrieval data is the target data is based on the adopted retrieval algorithm. Therefore, in the present embodiment, in order to comprehensively consider the reliability of the retrieved data in the conventional retrieval manner, the count value corresponding to each retrieved data in the present embodiment is inversely related to the sequence number value of the retrieved data in the initial data set. For example, if the sequence number of the search data 1 in the initial data set is 1, the corresponding count value is 100, and if the sequence number of the search data 2 in the initial data set is 100, the corresponding count value is 1, so as to compensate for the data amount difference caused by the conventional technology.
Further, the determining a target data subset in the initial data set according to the domain weight value includes:
sorting the retrieval data according to the domain weight value corresponding to each candidate domain and the knowledge domain corresponding to the retrieval data in the initial data set to obtain a sorting result;
and determining a target data subset in the initial data set according to the sequencing result.
Specifically, after the domain weight value corresponding to each candidate domain is obtained, each retrieval data in the initial data set has a knowledge domain corresponding thereto, so that each retrieval data can be sorted according to the weight value corresponding to the candidate domain.
In this embodiment, for example, the domain weight values are the first weight value and the second weight value, if it is determined that the closer the entity relationship between the slot position values of the entity slot positions is or the slot position values of the music domain and the non-entity slot positions correspond to each other based on the entity mapping file of the music domain, the larger the first weight value corresponding to the music domain is; the larger the number of search data corresponding to the music field in the initial data set, the larger the second weight value, and therefore, the more likely a candidate field is to be a knowledge field selected by the user. When the larger probability of a candidate domain is the knowledge domain to which the retrieval data required by the user belongs, the larger probability of the retrieval data corresponding to the candidate domain is the retrieval result desired by the user. Therefore, the retrieval data are sorted through the first weight value and the second weight value, and a sorting result is obtained.
Further, when each retrieval data is evaluated according to a first weight value and a second weight value, a manner of calculating a retrieval value corresponding to each retrieval data according to the first weight value and the second weight value may be adopted, for example, a calculation formula is preset, and a sum or a weighted sum is performed according to the first weight value and the second weight value of the candidate field corresponding to the retrieval data, so as to obtain the retrieval value corresponding to the retrieval data. Then, the search data is sorted based on the size of the search value, and the search data with the larger search value is arranged in the front row, thereby obtaining a sorting result.
And after the sequencing result is obtained, determining a target data subset in the initial data set according to the sequencing result. For example, how many data are selected as the retrieval data in the target data subset is preset, or the sorted retrieval data are directly selected as the target data subset. In addition, the number of the retrieval data in the target data subset may be only one, and after the target data subset is determined, the media files corresponding to the retrieval data, such as audio and video, are directly loaded to the display interface and played.
As shown in fig. 6, based on the dialog system, after determining the target data subset, the present embodiment further includes:
determining a dialog text corresponding to the voice information according to the target data subset;
and generating and outputting a dialogue audio corresponding to the voice information according to the dialogue text.
Specifically, a dialog text corresponding to the voice information is generated according to the retrieval result in the target data subset.
The dialog text generation may be implemented based on the dialog template, for example, if the result of the search in the target data subset is a song karman of a talent, then "song karman" is filled in the set dialog template, and dialog text is generated, for example, "whether you are a song karman to listen to a talent", "next song karman to play a talent" and so on. Different dialogue templates can be set for each knowledge domain to meet the form of data of different knowledge domains.
In addition, the generation of the dialog text can also be realized by adopting a preset text set containing a large number of texts, and after the target data subset is obtained, the text corresponding to the target data subset is searched in the text set and is used as the dialog text corresponding to the voice information.
And after the dialog text is obtained, converting the dialog text into a dialog audio by adopting an NLG (non line segment) technology, thereby obtaining and outputting the dialog audio corresponding to the voice information.
Based on the above retrieval method, the present embodiment provides a retrieval apparatus, where the retrieval apparatus includes:
the acquisition module is used for acquiring voice information to be processed;
the retrieval module is used for retrieving a preset database according to the voice information to obtain an initial data set;
the candidate field module is used for carrying out field recognition on the voice information and determining a plurality of candidate fields corresponding to the language information in a preset knowledge field;
and the screening module is used for determining a domain weight value corresponding to each candidate domain according to the initial data set and the voice information, and determining a target data subset in the initial data set according to the domain weight value.
Wherein, the domain weight value includes a first weight value and a second weight value, the filtering module includes a weight unit and a determining unit, wherein, the weight unit includes:
the target slot position result subunit is used for determining a target slot position result corresponding to each candidate field according to the voice information;
the first weight value subunit is used for determining a first weight value corresponding to the candidate field according to the target slot position result;
and the second weight value subunit is used for determining a second weight value corresponding to the candidate field according to the initial data set.
Wherein the target slot position result comprises a target slot position and a target slot position value; the target slot result subunit is specifically configured to:
performing part-of-speech tagging on the voice information to obtain initial slot positions and initial slot position values corresponding to the initial slot positions;
and aiming at each candidate field, determining a target slot position corresponding to the candidate field and a target slot position value corresponding to each target slot position according to the initial slot position.
The target slot position comprises an entity slot position, and the first weight value comprises an entity weight value; the first weight value subunit is specifically configured to:
determining an entity relation value between slot position values of the entity slot positions according to the entity mapping file corresponding to the candidate field;
and determining an entity weight value corresponding to the candidate field according to the entity relation value.
Wherein the entity mapping file comprises a domain knowledge graph corresponding to the candidate domain.
Wherein, the determining the entity weight value corresponding to the candidate field according to the entity relationship value includes:
when the entity relation value is a null value, taking a preset entity weight threshold value as an entity weight value corresponding to the candidate field;
and when the entity relation value is a non-null value, determining an entity weight value corresponding to the candidate field according to the size of the entity relation value.
Wherein the first weight value further comprises a non-entity weight value; the first weight value subunit is further configured to:
when the slot position result comprises a non-entity slot position and the slot position value of the non-entity slot position corresponds to the candidate field, taking a preset gain weight value as a non-entity weight value of the candidate field; and/or the first and/or second light sources,
and when the slot position result does not comprise a non-entity slot position or the slot position value of the non-entity slot position does not correspond to the candidate field, taking a preset attenuation weight value as the non-entity weight value of the candidate field.
Wherein the second weight value subunit is further configured to:
counting the number of retrieval data corresponding to the candidate field in the initial data set;
and determining a second weight value corresponding to the candidate field according to the quantity.
Wherein the determination unit includes:
the sorting subunit is configured to sort the search data according to the domain weight value corresponding to each candidate domain and the knowledge domain corresponding to the search data in the initial data set, so as to obtain a sorting result;
and the determining subunit is used for determining the target data subset in the initial data set according to the sequencing result.
Wherein the retrieval module is specifically configured to:
and searching the database according to the target slot position value corresponding to each candidate field to obtain search data corresponding to the target slot position value, and taking all the searches as an initial data set.
Wherein, the retrieval apparatus further comprises a voice module, and the voice module comprises:
the text unit is used for determining a dialog text corresponding to the voice information according to the target data subset;
and the dialogue unit is used for generating and outputting dialogue audio corresponding to the voice information according to the dialogue text.
Based on the above-described retrieval method, the present embodiment provides a computer-readable storage medium storing one or more programs, which are executable by one or more processors to implement the steps in the retrieval method as described in the above embodiments.
Based on the above retrieval method, the present invention further provides a terminal device, as shown in fig. 7, which includes at least one processor (processor) 20; a display screen 21; and a memory (memory)22, and may further include a communication Interface (Communications Interface)23 and a bus 24. The processor 20, the display 21, the memory 22 and the communication interface 23 can communicate with each other through the bus 24. The display screen 21 is configured to display a user guidance interface preset in the initial setting mode. The communication interface 23 may transmit information. The processor 20 may call logic instructions in the memory 22 to perform the methods in the embodiments described above.
Furthermore, the logic instructions in the memory 22 may be implemented in software functional units and stored in a computer readable storage medium when sold or used as a stand-alone product.
The memory 22, which is a computer-readable storage medium, may be configured to store a software program, a computer-executable program, such as program instructions or modules corresponding to the methods in the embodiments of the present disclosure. The processor 20 executes the functional application and data processing, i.e. implements the method in the above-described embodiments, by executing the software program, instructions or modules stored in the memory 22.
The memory 22 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal device, and the like. Further, the memory 22 may include a high speed random access memory and may also include a non-volatile memory. For example, a variety of media that can store program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk, may also be used as the transient computer readable storage medium.
In addition, the specific processes loaded and executed by the instruction processors in the computer-readable storage medium and the terminal device are described in detail in the method, and are not stated herein.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (14)

1. A method of searching, the method comprising:
acquiring voice information to be processed;
retrieving a preset database according to the voice information to obtain an initial data set;
performing domain recognition on the voice information, and determining a plurality of candidate domains corresponding to the voice information in a preset knowledge domain;
and determining a domain weight value corresponding to each candidate domain according to the initial data set and the voice information, and determining a target data subset in the initial data set according to the domain weight value.
2. The retrieval method according to claim 1, wherein the domain weight values include a first weight value and a second weight value, and the determining a domain weight value corresponding to each of the candidate domains according to the initial data set and the voice information includes:
aiming at each candidate field, determining a target slot position result corresponding to the candidate field according to the voice information;
determining a first weight value corresponding to the candidate field according to the target slot position result;
and determining a second weight value corresponding to the candidate field according to the initial data set.
3. The retrieval method of claim 1, wherein the target slot result comprises a target slot and a target slot location value; determining a target slot position result corresponding to the candidate field according to the voice information, wherein the determining comprises:
performing part-of-speech tagging on the voice information to obtain initial slot positions and initial slot position values corresponding to the initial slot positions;
and aiming at each candidate field, determining a target slot position corresponding to the candidate field and a target slot position value corresponding to each target slot position according to the initial slot position.
4. The retrieval method of claim 2, wherein the target slot comprises an entity slot, and wherein the first weight value comprises an entity weight value; determining a first weight value corresponding to the candidate field according to the target slot position result includes:
determining an entity relation value between slot position values of the entity slot positions according to the entity mapping file corresponding to the candidate field;
and determining an entity weight value corresponding to the candidate field according to the entity relation value.
5. The method of claim 4, wherein the entity map file comprises a domain knowledge graph corresponding to the candidate domain.
6. The method of claim 4, wherein determining the entity weight value corresponding to the candidate domain according to the entity relationship value comprises:
when the entity relation value is a null value, taking a preset entity weight threshold value as an entity weight value corresponding to the candidate field;
and when the entity relation value is a non-null value, determining an entity weight value corresponding to the candidate field according to the size of the entity relation value.
7. The retrieval method of claim 2, wherein the first weight value further comprises a non-entity weight value; determining a first weight value corresponding to the candidate field according to the target slot position result includes:
when the slot position result comprises a non-entity slot position and the slot position value of the non-entity slot position corresponds to the candidate field, taking a preset gain weight value as a non-entity weight value of the candidate field; and/or the first and/or second light sources,
and when the slot position result does not comprise a non-entity slot position or the slot position value of the non-entity slot position does not correspond to the candidate field, taking a preset attenuation weight value as the non-entity weight value of the candidate field.
8. The method of claim 2, wherein determining the second weight value corresponding to the candidate domain according to the initial data set comprises:
counting the number of retrieval data corresponding to the candidate field in the initial data set;
and determining a second weight value corresponding to the candidate field according to the number.
9. The method of claim 1, wherein the determining the target data subset in the initial data set according to the domain weight value comprises:
sorting the retrieval data according to the domain weight value corresponding to each candidate domain and the knowledge domain corresponding to the retrieval data in the initial data set to obtain a sorting result;
and determining a target data subset in the initial data set according to the sequencing result.
10. The method according to claim 3, wherein the retrieving a preset database according to the voice information to obtain an initial data set comprises:
and searching the database according to the target slot position value corresponding to each candidate field to obtain search data corresponding to the target slot position value, and taking all the searches as an initial data set.
11. The method according to any one of claims 1 to 10, wherein after determining a domain weight value corresponding to each of the candidate domains according to the initial data set and the voice information, and determining a target data subset in the initial data set according to the domain weight value, the method further comprises:
determining a dialog text corresponding to the voice information according to the target data subset;
and generating and outputting a dialogue audio corresponding to the voice information according to the dialogue text.
12. A retrieval apparatus, characterized in that the retrieval apparatus comprises:
the acquisition module is used for acquiring voice information to be processed;
the retrieval module is used for retrieving a preset database according to the voice information to obtain an initial data set;
the candidate field module is used for carrying out field recognition on the voice information and determining a plurality of candidate fields corresponding to the language information in a preset knowledge field;
and the screening module is used for determining a domain weight value corresponding to each candidate domain according to the initial data set and the voice information, and determining a target data subset in the initial data set according to the domain weight value.
13. A computer-readable storage medium storing one or more programs, the one or more programs being executable by one or more processors to perform the steps in the retrieval method of any one of claims 1-11.
14. A terminal device, comprising: a processor, a memory, and a communication bus; the memory has stored thereon a computer readable program executable by the processor;
the communication bus realizes connection communication between the processor and the memory;
the processor, when executing the computer readable program, implements the steps in the retrieval method of any of claims 1-11.
CN202011628804.8A 2020-12-30 2020-12-30 Retrieval method, retrieval device, computer readable storage medium and terminal equipment Pending CN114691921A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011628804.8A CN114691921A (en) 2020-12-30 2020-12-30 Retrieval method, retrieval device, computer readable storage medium and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011628804.8A CN114691921A (en) 2020-12-30 2020-12-30 Retrieval method, retrieval device, computer readable storage medium and terminal equipment

Publications (1)

Publication Number Publication Date
CN114691921A true CN114691921A (en) 2022-07-01

Family

ID=82133618

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011628804.8A Pending CN114691921A (en) 2020-12-30 2020-12-30 Retrieval method, retrieval device, computer readable storage medium and terminal equipment

Country Status (1)

Country Link
CN (1) CN114691921A (en)

Similar Documents

Publication Publication Date Title
US11816441B2 (en) Device and method for machine reading comprehension question and answer
CN108304375B (en) Information identification method and equipment, storage medium and terminal thereof
WO2021093755A1 (en) Matching method and apparatus for questions, and reply method and apparatus for questions
KR102288249B1 (en) Information processing method, terminal, and computer storage medium
WO2020140373A1 (en) Intention recognition method, recognition device and computer-readable storage medium
CN110019732B (en) Intelligent question answering method and related device
CN111125334A (en) Search question-answering system based on pre-training
CN111324771B (en) Video tag determination method and device, electronic equipment and storage medium
CN112035599B (en) Query method and device based on vertical search, computer equipment and storage medium
US8731930B2 (en) Contextual voice query dilation to improve spoken web searching
CN106570180A (en) Artificial intelligence based voice searching method and device
JPWO2008023470A1 (en) SENTENCE UNIT SEARCH METHOD, SENTENCE UNIT SEARCH DEVICE, COMPUTER PROGRAM, RECORDING MEDIUM, AND DOCUMENT STORAGE DEVICE
CN111090771B (en) Song searching method, device and computer storage medium
CN112328800A (en) System and method for automatically generating programming specification question answers
KR20220134695A (en) System for author identification using artificial intelligence learning model and a method thereof
CN111767393A (en) Text core content extraction method and device
CN112347223A (en) Document retrieval method, document retrieval equipment and computer-readable storage medium
JP2006227823A (en) Information processor and its control method
CN110874408B (en) Model training method, text recognition device and computing equipment
CN113505196B (en) Text retrieval method and device based on parts of speech, electronic equipment and storage medium
CN112905752A (en) Intelligent interaction method, device, equipment and storage medium
CN114691921A (en) Retrieval method, retrieval device, computer readable storage medium and terminal equipment
CN113434639A (en) Audit data processing method and device
CN111476028A (en) Chinese phrase identification method, system, storage medium and electronic equipment
CN110750967A (en) Pronunciation labeling method and device, computer 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