CN112463920A - Information response method and device - Google Patents

Information response method and device Download PDF

Info

Publication number
CN112463920A
CN112463920A CN202011339392.6A CN202011339392A CN112463920A CN 112463920 A CN112463920 A CN 112463920A CN 202011339392 A CN202011339392 A CN 202011339392A CN 112463920 A CN112463920 A CN 112463920A
Authority
CN
China
Prior art keywords
common sense
information
keyword
concept
common
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
CN202011339392.6A
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.)
Lenovo Beijing Ltd
Original Assignee
Lenovo Beijing 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 Lenovo Beijing Ltd filed Critical Lenovo Beijing Ltd
Priority to CN202011339392.6A priority Critical patent/CN112463920A/en
Publication of CN112463920A publication Critical patent/CN112463920A/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/3343Query execution using phonetics
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis
    • G06F40/35Discourse or dialogue representation

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Artificial Intelligence (AREA)
  • Mathematical Physics (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Computer Interaction (AREA)
  • Acoustics & Sound (AREA)
  • Machine Translation (AREA)

Abstract

The application discloses an information response method and device, wherein the method comprises the following steps: matching at least one intention message to be detected based on the input information of the user; acquiring reply information corresponding to the intention information; judging whether the intention information accords with common knowledge or not based on the input information and reply information corresponding to the intention information to be detected so as to determine at least one target intention information which accords with common knowledge; in response to the target intention information, reply information corresponding to the target intention is output. According to the method and the device, whether the matched intention information accords with the common sense or not is determined by judging the matched intention information, so that the matched intention information is more reasonable, and finally, the response information output based on the intention information is more reasonable and accurate.

Description

Information response method and device
Technical Field
The present application relates to the field of natural language processing technologies, and in particular, to an information response method and apparatus.
Background
With the continuous development of network technology, the application of intelligent customer service is more and more popular. In the existing intelligent customer service system, a Natural Language Understanding (NLU) module is usually adopted for parsing to obtain a corresponding structured parsing result, and then reply information for a problem is generated based on the result and a conversational template and returned to a user.
However, due to limited precision of the NLU module, such as incomplete coverage of the categories of the classifier, interference caused by non-key features of the input content of the user, and the like, the classifier generates incorrect understanding, and particularly when TOP N categories are pushed to the user (the system returns multiple alternative answers), partially unreasonable categories are often output by adopting a filtering method based on confidence ranking or based on a confidence threshold, so that the matching intention information is not accurate enough.
Disclosure of Invention
The embodiment of the application aims to provide an information response method and device. The embodiment of the application adopts the following technical scheme: an information response method, comprising:
matching at least one intention message to be detected based on the input information of the user;
acquiring reply information corresponding to the intention information;
judging whether the intention information accords with common knowledge or not based on the input information and reply information corresponding to the intention information to be detected so as to determine at least one target intention information which accords with common knowledge;
in response to the target intention information, reply information corresponding to the target intention is output.
Optionally, judging whether the intention information conforms to common knowledge based on the input information and the reply information corresponding to the intention information to be detected specifically includes:
determining a first set of common sense keywords based on the input information and the reply information;
determining a second common sense keyword set corresponding to the reply information based on the reply information;
respectively calculating based on the second common sense keyword set and the first common sense keyword set to obtain set similarity corresponding to the second common sense keyword set so as to obtain confidence of intention information corresponding to the second common sense keyword set; the confidence level is used for representing the credibility that the intention information accords with common knowledge;
and judging whether the intention information conforms to common sense or not based on the confidence of the intention information.
Optionally, the respectively calculating based on the second common sense keyword set and the first common sense keyword set to obtain the set similarity corresponding to the second common sense keyword set specifically includes:
acquiring a second common sense concept keyword in the second common sense keyword set;
acquiring a first common sense concept keyword in the first common sense keywords;
respectively calculating the common sense concept association degrees of the second common sense concept keyword and the first common sense concept keyword to obtain the common sense concept association degree corresponding to the second common sense concept keyword;
and calculating and obtaining the set similarity corresponding to the second common sense keyword set based on the common sense concept association degree corresponding to the second common sense concept keyword in the second common sense keyword set.
Optionally, the method further comprises: analyzing the semantic similarity degree of the second common sense concept keyword and the first common sense concept keyword to obtain the semantic similarity corresponding to the second common sense concept keyword;
and calculating and obtaining the set similarity corresponding to the second common sense keyword set based on the common sense concept association degree and the semantic similarity corresponding to the second common sense concept keyword in the second common sense keyword set.
Optionally, the method further includes: constructing a plurality of common sense concept trees for calculating the association degree of the common sense concepts, wherein the construction steps comprise:
determining a plurality of common sense concept objects;
determining, based on each of the common sense concept objects, a number of common sense concept elements associated with each of the common sense concept objects;
and determining the hierarchical relationship between the common sense concept objects and the common sense concept elements and between the common sense concept elements and the common sense concept elements based on the common sense concept objects and the common sense concept elements corresponding to the common sense concept objects so as to construct and obtain a plurality of common sense concept trees.
Optionally, the calculating the degree of association between the second common sense concept keyword and the concept structure of the first common sense concept keyword to obtain the degree of association between the concept structure corresponding to the second common sense concept keyword specifically includes:
judging whether the second common sense concept keyword is the same as the first common sense concept keyword or not;
in the case where it is judged that the second common sense concept keyword is identical to the first common sense concept keyword:
determining a level depth of the first common sense concept keyword or the second common sense concept keyword in a target common sense concept tree; determining the conceptual structural relatedness based on the hierarchy depth;
under the condition that the second common sense concept keyword is judged to be different from the first common sense concept keyword:
determining common upper nodes of the first common sense concept keyword and the second common sense concept keyword in a target common sense concept tree;
determining a level depth of the common upper node in a target common sense concept tree, so as to take a level depth value corresponding to the level depth as the common sense concept relevancy.
Optionally, in the case that a plurality of pieces of common sense objective intention information are determined, the method further includes:
and ranking each piece of target intention information based on the confidence degree of each piece of target intention information so as to respond to each piece of target intention according to the ranking obtained order.
Optionally, judging whether the intention information conforms to common knowledge based on the confidence level of the intention information specifically includes:
comparing the confidence with a preset threshold;
judging that the intention information accords with common knowledge under the condition that the confidence coefficient is greater than or equal to the preset threshold value;
and under the condition that the confidence degree is smaller than a preset threshold value, judging that the intention information is not in accordance with common knowledge.
Optionally, the matching of the input information based on the user and the at least one piece of intention information to be detected specifically includes:
determining a target question based on input information of a user;
analyzing the target problem based on a preset natural language understanding model, and obtaining at least one intention message corresponding to the target problem so as to obtain the intention message to be detected.
The embodiment of the application adopts the following technical scheme: an information answering device, comprising:
the matching module is used for matching at least one piece of intention information to be detected based on input information of a user;
the acquisition module is used for acquiring reply information corresponding to the intention information;
the determining module is used for judging whether the intention information accords with common knowledge or not based on the input information and the reply information corresponding to the intention information to be detected so as to determine at least one target intention information which accords with common knowledge;
an output module for outputting reply information corresponding to the target intention in response to the target intention information.
According to the method and the device, whether the matched intention information accords with the common sense or not is determined by judging the matched intention information, so that the matched intention information is more reasonable, and finally, the response information output based on the intention information is more reasonable and accurate.
Drawings
Fig. 1 is a flowchart of an information response method according to an embodiment of the present application;
fig. 2 is a flowchart of an information response method according to another embodiment of the present application;
fig. 3 is a flowchart of an information response method according to another embodiment of the present application;
FIG. 4 is a schematic diagram of a common sense concept tree in the present application;
fig. 5 is a block diagram of an information responding apparatus according to another embodiment of the present application.
Detailed Description
Various aspects and features of the present application are described herein with reference to the drawings.
It will be understood that various modifications may be made to the embodiments of the present application. Accordingly, the foregoing description should not be construed as limiting, but merely as exemplifications of embodiments. Those skilled in the art will envision other modifications within the scope and spirit of the application.
The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the application and, together with a general description of the application given above and the detailed description of the embodiments given below, serve to explain the principles of the application.
These and other characteristics of the present application will become apparent from the following description of preferred forms of embodiment, given as non-limiting examples, with reference to the attached drawings.
It should also be understood that, although the present application has been described with reference to some specific examples, a person of skill in the art shall certainly be able to achieve many other equivalent forms of application, having the characteristics as set forth in the claims and hence all coming within the field of protection defined thereby.
The above and other aspects, features and advantages of the present application will become more apparent in view of the following detailed description when taken in conjunction with the accompanying drawings.
Specific embodiments of the present application are described hereinafter with reference to the accompanying drawings; however, it is to be understood that the disclosed embodiments are merely exemplary of the application, which can be embodied in various forms. Well-known and/or repeated functions and constructions are not described in detail to avoid obscuring the application of unnecessary or unnecessary detail. Therefore, specific structural and functional details disclosed herein are not to be interpreted as limiting, but merely as a basis for the claims and as a representative basis for teaching one skilled in the art to variously employ the present application in virtually any appropriately detailed structure.
The specification may use the phrases "in one embodiment," "in another embodiment," "in yet another embodiment," or "in other embodiments," which may each refer to one or more of the same or different embodiments in accordance with the application.
An embodiment of the application provides an information response method, which can be applied to scenes such as intelligent customer service, natural language understanding and deep learning. As shown in fig. 1, the information response method in the present application includes the following steps:
step S101, matching at least one piece of intention information to be detected based on input information of a user;
in this step, the text information input by the user or the voice information of the user can be received, and then the natural language understanding module can be used for performing semantic recognition on the text information or the voice information so as to obtain a plurality of intention information matched with the text information input by the user or the voice information of the user. For example, when the user inputs "I don't knock wyy I can't enable my bluetooth on my phone", that is, when the user inputs "I don't know why I cannot turn on bluetooth on my mobile phone", the language understanding module may be used to perform semantic recognition on the input information input by the user, so as to obtain intention information corresponding to the user input information. For example, the matching intention information may be "Unable to turn on Bluetooth", and in a specific implementation, several intention information may be matched based on the user input information.
If the input information input by the user is "real camera still not working", that is, "the Rear camera still cannot work", three intention information can be matched for the input information, wherein the first intention information is as follows: "Unable to open camera" means "cannot open the camera". The second is: "Unable to turn on Bluetooth" means "cannot turn on Bluetooth". The third is: "My rear camera is not working" means that My rear image is bad.
Step S102, obtaining reply information corresponding to the intention information;
in this step, the corresponding reply information may be matched to each intention information in advance, so that the reply information corresponding to the intention information may be obtained after the intention information is determined.
For example, the intention information "reader camera still not working", that is, "Rear camera still cannot work", the answer information matched thereto in advance is "click set button, then click camera button, and finally click enable button to enable camera". The intention information "unknown to turn on Bluetooth" means "cannot open Bluetooth", the reply information matched with the intention information is "click set button, then click Bluetooth button, finally click connect button corresponding to Bluetooth device model", the intention information "My rear camera is not work" means "My rear camera is bad", the reply information matched with the intention information is "detect whether the front camera is normal, if not, click set button, then click camera button, finally click enable button to start camera".
Step S103, judging whether the intention information accords with common knowledge or not based on the input information and reply information corresponding to the intention information to be detected so as to determine at least one target intention information which accords with common knowledge;
after the plurality of pieces of intention information and the reply information corresponding to the intention information are obtained in the step, whether the matched intention information conforms to the common sense or not can be determined based on the input information and the reply information, so that the target intention information conforming to the common sense can be determined, and a basis is provided for accurately determining the reply information in the follow-up process.
For example, common sense judgment may be performed on three intention information "Unable to open camera", "Unable to turn on not Bluetooth" and "My wheel camera is not work" matched with the input information "reader camera still not work", specifically, common sense judgment may be performed according to reply information corresponding to the three intention information and input information of the user, so as to determine that "Unable to open camera" and "My wheel camera is not work" are consistent with common sense, and "Unable to turn on not Bluetooth" is not consistent with common sense.
Step S104, in response to the target intention information, outputting reply information corresponding to the target intention.
According to the method and the device, whether the matched intention information accords with the common sense or not is determined by judging the matched intention information, so that the matched intention information is more reasonable, and finally, the response information output based on the intention information is more reasonable and accurate.
Another embodiment of the present application provides an information response method, as shown in fig. 2, including the following steps:
step S201, matching at least one intention message to be detected based on the input information of the user;
in the implementation process of the step, the target problem can be determined based on input information of a user; and then analyzing the target problem based on a preset natural language understanding model to obtain at least one intention message corresponding to the target problem so as to obtain the intention message to be detected.
Step S202, obtaining reply information corresponding to the intention information;
in this step, after the target intention information is determined, reply information corresponding to the target intention information may be acquired, and the reply information may be output. The specific output mode may be to display the output of the reply message in a text mode or to play the reply message in a voice mode.
Step S203, determining a first common sense keyword set based on the input information and the reply information;
in this step, after the reply information of each intention information is acquired, the common sense concept keywords in the input information and each reply information may be extracted, so as to acquire the first common sense keyword set. That is, the first common sense concept keyword set in this step includes the common sense concept keywords of each reply message and the common sense concept keywords of the input message. The common sense concept keywords are words with fixed meanings, which are well known in various industry fields, such as words of mobile phone, computer, tablet computer, camera, device, storage, software, application, display brightness, makeup removal, installation, deletion, and recovery, and are not described herein in detail.
Step S204, determining a second common sense keyword set corresponding to the reply information based on the reply information;
in this step, after the first common sense keyword set is obtained, the common sense concept keywords in each reply message may be extracted, so as to obtain a second common sense keyword set corresponding to each reply message.
Step S205, respectively calculating based on the second common sense keyword set and the first common sense keyword set, and obtaining set similarity corresponding to the second common sense keyword set so as to obtain confidence of intention information corresponding to the second common sense keyword set; the confidence level is used to characterize the confidence level that the intention information is in accordance with common sense.
After the set similarity is obtained in this step, the set similarity can be used as the confidence of the corresponding intention information, that is, the higher the similarity between each second common sense keyword set and the first common sense concept keyword set is, the higher the confidence of the intention information corresponding to each second common sense keyword set is, that is, the intention information conforms to common sense.
Step S206, judging whether the intention information accords with common knowledge or not based on the confidence of the intention information so as to determine at least one piece of target intention information which accords with common knowledge;
in the step, the confidence coefficient may be compared with a preset threshold value in the implementation process; judging that the intention information accords with common knowledge under the condition that the confidence coefficient is greater than or equal to the preset threshold value; and under the condition that the confidence degree is smaller than a preset threshold value, judging that the intention information is not in accordance with common knowledge. Therefore, the determined target intention information is more reasonable and accurate.
Step S207, in response to the target intention information, outputs reply information corresponding to the target intention.
In this step, in an implementation process, before the reply information is output, the pieces of target intention information may be sorted based on the confidence of the pieces of target intention information, so as to respond to the pieces of target intention in the order obtained by sorting, and then respond to the pieces of target intention information in the order of the pieces of target intention information, and output the pieces of reply information, specifically, the reply information of one target intention with the highest confidence may also be output. By sequentially outputting the reply information of the target intention according to the confidence level, the output reply information can be made more suitable for the needs of the user. In a specific application scenario, response information may be output one by one according to a user operation, for example, after response information with the highest confidence is output first, a user may determine whether a problem is solved by clicking a button, if the user clicks "yes", the response information is not output any more, if the user clicks "no", response information of a next target intention may be output according to a ranking of confidence of the target intention information until the problem of the user is solved and clicked "yes", or after a predetermined time, the user has no other operation, and the response is ended.
Another embodiment of the present application provides an information response method, as shown in fig. 3, including the following steps:
step S301, matching at least one intention message to be detected based on the input information of the user;
step S302, obtaining reply information corresponding to the intention information.
Step S303, determining a first common sense keyword set based on the input information and the reply information.
In this step, after the reply information of each intention information is acquired, the common sense concept keywords in the input information and each reply information may be extracted, so as to acquire the first common sense keyword set. That is, the first common sense concept keyword set in this step includes the common sense concept keywords of each reply message and the common sense concept keywords of the input message. The common sense concept keywords are words with fixed meanings, which are well known in various industry fields, such as words of mobile phone, computer, tablet computer, camera, device, storage, software, application, display brightness, makeup removal, installation, deletion, and recovery, and are not described herein in detail.
Step S304, a second common sense keyword set corresponding to the reply information is determined based on the reply information.
In this step, after the first common sense keyword set is obtained, the common sense concept keywords in each reply message may be extracted, so as to obtain a second common sense keyword set corresponding to each reply message.
Step S305, acquiring a second common sense concept keyword in the second common sense keyword set; acquiring a first common sense concept keyword in the first common sense keywords; and respectively calculating the common sense concept association degrees of the second common sense concept keyword and the first common sense concept keyword so as to obtain the common sense concept association degree corresponding to the second common sense concept keyword.
In this step, the degree of association of the common sense concepts means whether the two vocabularies are related from the perspective of the industry field, the category, the attribute and the like, for example, the two fields of the common sense concept keywords of "mobile phone" and "banana" are different, so that the degree of association of the common sense concepts is low, while the "mobile phone" and the "camera" are different in category, but the degree of association of the two common sense concept key concepts is high because the "mobile phone" includes the "camera".
Specifically, before calculating the common sense concept association degree, it is necessary to construct a plurality of common sense concept trees shown in fig. 4, and calculate the common sense concept association degree by using the common sense concept trees. The step of specifically constructing the common sense concept tree comprises the following steps: determining a plurality of common sense concept objects; determining, based on each of the common sense concept objects, a number of common sense concept elements associated with each of the common sense concept objects; and determining the hierarchical relationship between the common sense concept objects and the common sense concept elements and between the common sense concept elements and the common sense concept elements based on the common sense concept objects and the common sense concept elements corresponding to the common sense concept objects so as to construct and obtain a plurality of common sense concept trees. In this embodiment, the common sense concept object may be specifically determined based on the name and category of the article, for example, determining "mobile phone" as the common sense concept object, and then using the common sense concept object as a root node of the common sense concept tree. After the common sense concept object is determined, several common sense concept elements associated with the "mobile phone" can be determined based on the common sense concept object "mobile phone", for example, the determined common sense concept elements include: "hardware", "sound", "connection", "file", "display", "operation", "storage", "application", "call", "brightness", "color temperature", "contrast", "resolution", and the like. After the plurality of common sense concept elements are determined, the position of each common sense concept element in the common sense concept tree can be determined according to the hierarchical relationship between each common sense concept element and the common sense concept object or the hierarchical relationship between each common sense concept element and each common sense concept element. For example, if it is determined that the common sense concept elements "hardware", "sound", "connection", "file", "display", "operation", "storage", "application", "call", and "brightness" are in a direct hierarchical relationship with the common sense concept object "mobile phone", the common sense concept elements "hardware", "sound", "connection", "file", "display", "operation", "storage", "application", "call", and "brightness" may be used as a next level of the common sense concept object "mobile phone", that is, as a child node of the common sense concept tree. Further, the common sense concept elements of brightness, color temperature, contrast and resolution are determined to be in direct hierarchical relation with the common sense concept elements of display, so that the common sense concept elements of brightness, color temperature, contrast and resolution can be used as the next level of the common sense concept elements of display, namely as the grandchild nodes of the common sense concept tree, and a plurality of common sense concept trees can be constructed. In the common sense concept tree in this embodiment, the root node is a mobile phone, which indicates the segment industry to which the root node belongs. The second layer of the common sense concept tree represents a level of common sense concepts which are further divided according to industry knowledge and conventions in the mobile phone subdivision industry, such as display, and represents various common sense concepts related to the mobile phone display. The third layer of the common sense concept tree represents the second-level common sense concept obtained by subdividing the first-level common sense concept, such as screen brightness, color temperature, contrast, soft light and resolution, which are the subdivided common sense concepts under the display of the first-level common sense concept. The fourth layer of the common sense concept tree is a subdivision of the second level common sense concepts.
In this step, after the common sense concept trees are constructed, the common sense concept association degree can be calculated, specifically, a target common sense concept tree is selected from a plurality of common sense concept trees according to specific requirements, specifically, the target common sense concept tree can be determined according to the proportion of the first common sense concept keyword in the first common sense keyword set in each common sense concept tree, that is, the common sense concept tree containing the most first common sense concept keywords is selected as the target common sense concept tree, and then the common sense concept association degree is calculated. The specific calculation process of the common sense concept relevance is as follows: judging whether the second common sense concept keyword is the same as the first common sense concept keyword or not; in the case where it is judged that the second common sense concept keyword is identical to the first common sense concept keyword: determining a level depth of the first common sense concept keyword or the second common sense concept keyword in a target common sense concept tree; determining the conceptual structural relatedness based on the hierarchical depth. Under the condition that the second common sense concept keyword is judged to be different from the first common sense concept keyword: determining common upper nodes of the first common sense concept keyword and the second common sense concept keyword in a target common sense concept tree; determining a level depth of the common upper node in a target common sense concept tree, so as to take a level depth value corresponding to the level depth as the common sense concept relevancy. For example, the first common sense concept keyword in the first common sense keyword set is: the "hardware", "sound", and "brightness", the second common sense concept keyword in the second common sense keyword set includes: "hardware" and "brightness". The concept structure association degree of each second common sense concept keyword comprises: tree _ sim (hardware ), tree _ sim (hardware, sound), tree _ sim (hardware, brightness), tree _ sim (brightness, hardware), tree _ sim (brightness, sound), and tree _ sim (brightness ). Further, if the common sense concept tree shown in fig. 4 is used to determine the concept association degree tree _ sim (hardware ) of the second common sense concept keyword, and the second common sense concept keyword "hardware" related to the second common sense concept keyword "hardware" is the same as the first common sense concept keyword "hardware", it may be determined that the level depth of the first common sense concept keyword or the second common sense concept keyword "hardware" in the target common sense concept tree is 2, and thus the concept structure association degree tree _ sim (hardware ) may be determined to be 2 based on the level depth 2. Then, according to the common sense concept tree shown in fig. 4, determining that the second common sense concept keyword "hardware" related to the common sense concept association degree tree _ sim (hardware, voice) of the second common sense concept keyword is different from the first common sense concept keyword "voice", and determining that a common upper node of the "hardware" and the "voice" located in the target common sense concept tree is a "mobile phone"; and determining that the level depth of the common upper node 'mobile phone' in the target common sense concept tree is 1, and further determining that the common sense concept association degree tree _ sim (hardware, voice) is 1. In the same way, the common sense concept association degree tree _ sim (hardware, brightness) is 1, the common sense concept association degree tree _ sim (brightness, hardware) is 1, the common sense concept association degree tree _ sim (brightness, sound) is 1, and the common sense concept association degree tree _ sim (brightness ) is 3 can be determined.
Step S306, calculating and obtaining the set similarity corresponding to the second common sense keyword set based on the common sense concept association degree corresponding to the second common sense concept keyword in the second common sense keyword set so as to obtain the confidence degree of the intention information corresponding to the second common sense keyword set; the confidence level is used to characterize the confidence level that the intention information is in accordance with common sense.
In this step, after the degree of common sense concept association between each second common sense concept keyword and the first common sense concept keyword is obtained through calculation, the degree of concept structure association of each second common sense concept keyword in the same set may be weighted to serve as the similarity between the second common sense keyword set and the first common sense keyword set.
Step S307, judging whether the intention information accords with common knowledge or not based on the confidence of the intention information so as to determine at least one piece of target intention information which accords with common knowledge;
step S308, in response to the target intention information, outputting reply information corresponding to the target intention.
In the application, the common sense concept tree is constructed, and the concept structure association degree of each second common sense concept keyword and the first common sense concept keyword is carried out according to the common sense concept tree, so that the similarity of each second common sense keyword set and the first common sense keyword set can be determined, the confidence degree of each intention information is further obtained, and a foundation is laid for subsequently and accurately determining the target intention and outputting the reply information based on the target intention.
Another embodiment of the present application provides an information response method, including the steps of:
step S401, matching at least one intention message to be detected based on the input information of the user;
step S402, acquiring reply information corresponding to the intention information;
step S403, determining a first common sense keyword set based on the input information and the reply information;
step S404, determining a second common sense keyword set corresponding to the reply information based on the reply information;
step S405, obtaining a second common sense concept keyword in the second common sense keyword set; acquiring a first common sense concept keyword in the first common sense keywords; and respectively calculating the common sense concept association degrees of the second common sense concept keyword and the first common sense concept keyword so as to obtain the common sense concept association degree corresponding to the second common sense concept keyword.
Step S406, analyzing the semantic similarity between the second common sense concept keyword and the first common sense concept keyword to obtain the semantic similarity corresponding to the second common sense concept keyword.
Step S407, calculating and obtaining the set similarity corresponding to the second common sense keyword set based on the common sense concept association degree and the semantic similarity corresponding to the second common sense concept keyword in the second common sense keyword set so as to obtain the confidence of the intention information corresponding to the second common sense keyword set; the confidence level is used to characterize the confidence level that the intention information is in accordance with common sense.
Step S408, judging whether the intention information accords with common sense or not based on the confidence of the intention information so as to determine at least one piece of target intention information which accords with common sense;
step S409, in response to the target intention information, outputs reply information corresponding to the target intention.
In the application, when the set similarity between each second common sense keyword set and the first common sense keyword set is calculated, on one hand, the concept structure association degree of each second common sense concept keyword and the first common sense concept keyword needs to be calculated, on the other hand, the semantic similarity between each second common sense concept keyword and each first common sense concept keyword needs to be calculated, and then the set similarity of each second common sense concept keyword set is calculated by combining the concept structure association degree and the semantic similarity, so that the calculation of the set similarity is more accurate, and a basis is provided for the subsequent accurate determination of the target intention of common sense and the output of the response information.
For further explanation, the following description is made in conjunction with a specific application scenario, for example, if the input information of the user is Q, the input information Q passes through the NLU understanding module, i.e., the natural language understanding module, and outputs the intention information of TOP N, here, TOP-3, i.e., the NLU module outputs three intention information I1, I2, and I3, for example. According to Top-3 intention information I1, I2 and I3, response information corresponding to the three intention information is obtained from the knowledge base query and is A1, A2 and A3 respectively. The input information Q is then combined with the 3 intents I1, I2 and I3 and the corresponding answers a1, a2 and A3, resulting in three triplets, namely the three sets < Q, I1, a1>, < Q, I2, a2> and < Q, I3, A3 >.
For the three triples < Q, I1, a1>, < Q, I2, a2> and < Q, I3, A3>, the common sense concept keywords in the user input information Q and the reply information a1, a2 and A3 are extracted, respectively, so as to obtain a first common sense keyword set Q _ C. Then, the common sense concept keywords in the respective pieces of reply information a1, a2, and A3 are extracted, respectively, and the second common sense keyword set a1_ C corresponding to the piece of reply information a1, the second common sense keyword set a2_ C corresponding to the piece of reply information a2, and the second common sense keyword set A3_ C corresponding to the piece of reply information A3 are obtained.
And determining a target common sense concept tree from the plurality of common sense concept trees according to the first common sense keyword set Q _ C, and calculating the similarity of each second common sense keyword set and the first common sense keyword set according to the target common sense concept tree, namely calculating the similarity of < Q _ C, A1_ C >, < Q _ C, A1_ C >, < Q _ C, A2_ C >, < Q _ C and A3_ C >. Taking < Q _ C, a1_ C > as an example, when calculating the similarity, the common sense concept keywords in the first common sense keyword set Q _ C and the second common sense keyword set a1_ C are first converted into vector representations, which can be accomplished by means of a word vector model, or encoded by using a pre-training model widely used at present. Then combining each first common sense concept keyword c1 and each second common sense concept keyword c2 in the two sets in pairs to calculate the common sense concept association degree and the semantic similarity of each second common sense concept keyword, and finally performing weighted calculation on the common sense concept association degree and the semantic similarity of each second common sense concept keyword so as to obtain the set similarity corresponding to each second common sense keyword set. Specifically, the set similarity of the second common sense keyword set, a1_ C, can be calculated by using the following calculation formula:
Figure BDA0002798163290000161
wherein N is more than or equal to 1 and less than or equal to N, and M is more than or equal to 1 and less than or equal to M. In the formula, Sim < Q _ C, A1_ C > represents the second common sense keyword set A1_ C and the first common sense keyword set QSimilarity of _ C; n represents the number of the first common sense keywords in the first common sense keyword set Q _ C; m represents the number of second common sense keywords in the second common sense keyword set A1_ C; word sim (c 1)n,c2m) Representing the semantic similarity between the mth second common sense keyword c2 and the nth first common sense keyword c 1; tree _ sim (c 1)n,c2m) The concept structure relationship between the mth second common sense keyword c2 and the nth first common sense keyword c1 is shown.
In this embodiment, the common sense concept association degree calculation method includes: judging whether the second common sense concept keyword c2 is the same as the first common sense concept keyword c 1; in the case where the second common sense concept keyword c2 is judged to be identical to the first common sense concept keyword c 1: determining a level depth of the first common sense concept keyword or the second common sense concept keyword in a target common sense concept tree; determining the conceptual structural relatedness based on the hierarchical depth. In the case where it is judged that the second common sense concept keyword c2 is not identical to the first common sense concept keyword c 1: determining common upper nodes of the first common sense concept keyword and the second common sense concept keyword in a target common sense concept tree; determining a level depth of the common upper node in a target common sense concept tree, so as to take a level depth value corresponding to the level depth as the common sense concept relevancy.
By the method, the set similarity of < Q _ C, A1_ C >, < Q _ C, A2_ C > and < Q _ C, A3_ C > can be respectively calculated, so that the confidence degrees of the intention information corresponding to the second common sense keyword sets can be further determined, then the target intention is determined by comparing the confidence degrees with the preset threshold value, and therefore the answer information can be further determined and made more accurate and reasonable.
Another embodiment of the present application provides an information responding apparatus, as shown in fig. 5, including:
the matching module 1 is used for matching at least one piece of intention information to be detected based on input information of a user;
an obtaining module 2, configured to obtain reply information corresponding to the intention information;
the determining module 3 is configured to determine whether the intention information conforms to common knowledge based on the input information and reply information corresponding to the intention information to be detected, so as to determine at least one piece of target intention information conforming to common knowledge;
and the output module 4 is used for responding to the target intention information and outputting reply information corresponding to the target intention.
In a specific implementation process of this embodiment, the determining module is specifically configured to: determining a first set of common sense keywords based on the input information and the reply information; determining a second common sense keyword set corresponding to the reply information based on the reply information; respectively calculating based on the second common sense keyword set and the first common sense keyword set to obtain set similarity corresponding to the second common sense keyword set so as to obtain confidence of intention information corresponding to the second common sense keyword set; the confidence level is used for representing the credibility that the intention information accords with common knowledge; and judging whether the intention information conforms to common sense or not based on the confidence of the intention information.
In the information responding apparatus in this embodiment, the determining module is specifically configured to: acquiring a second common sense concept keyword in the second common sense keyword set; acquiring a first common sense concept keyword in the first common sense keywords; respectively calculating the common sense concept association degrees of the second common sense concept keyword and the first common sense concept keyword to obtain the common sense concept association degree corresponding to the second common sense concept keyword; and calculating and obtaining the set similarity corresponding to the second common sense keyword set based on the common sense concept association degree corresponding to the second common sense concept keyword in the second common sense keyword set.
The information response device in this embodiment further includes an obtaining module, where the obtaining module is configured to: and analyzing the semantic similarity degree of the second common sense concept keyword and the first common sense concept keyword to obtain the semantic similarity corresponding to the second common sense concept keyword. The determination module is further to: and calculating and obtaining the set similarity corresponding to the second common sense keyword set based on the common sense concept association degree and the semantic similarity corresponding to the second common sense concept keyword in the second common sense keyword set.
The information response device in this embodiment further includes a building module that builds a plurality of common sense concept trees for calculating the common sense concept association degree, where the building module is specifically configured to: determining a plurality of common sense concept objects; determining, based on each of the common sense concept objects, a number of common sense concept elements associated with each of the common sense concept objects; and determining the hierarchical relationship between the common sense concept objects and the common sense concept elements and between the common sense concept elements and the common sense concept elements based on the common sense concept objects and the common sense concept elements corresponding to the common sense concept objects so as to construct and obtain a plurality of common sense concept trees.
The determining module, when being configured to calculate a degree of association between the second common sense concept keyword and the concept structure of the first common sense concept keyword to obtain a degree of association between the concept structure corresponding to the second common sense concept keyword, is specifically configured to: judging whether the second common sense concept keyword is the same as the first common sense concept keyword or not; in the case where it is judged that the second common sense concept keyword is identical to the first common sense concept keyword: determining a level depth of the first common sense concept keyword or the second common sense concept keyword in a target common sense concept tree; determining the conceptual structural relatedness based on the hierarchy depth; under the condition that the second common sense concept keyword is judged to be different from the first common sense concept keyword: determining common upper nodes of the first common sense concept keyword and the second common sense concept keyword in a target common sense concept tree; determining a level depth of the common upper node in a target common sense concept tree, so as to take a level depth value corresponding to the level depth as the common sense concept relevancy.
The information response device in this embodiment further includes a sorting module, where the sorting module is configured to: and sorting the target intention information based on the confidence degree of the target intention information so that the output module responds to the target intention according to the order obtained by sorting.
When the determining module in this embodiment is configured to determine whether the intention information conforms to common sense based on the confidence level of the intention information, the determining module is specifically configured to: comparing the confidence with a preset threshold; judging that the intention information accords with common knowledge under the condition that the confidence coefficient is greater than or equal to the preset threshold value; and under the condition that the confidence degree is smaller than a preset threshold value, judging that the intention information is not in accordance with common knowledge.
In the information response apparatus in this embodiment, the matching module is specifically configured to: determining a target question based on input information of a user; analyzing the target problem based on a preset natural language understanding model, and obtaining at least one intention message corresponding to the target problem so as to obtain the intention message to be detected.
In the embodiment, whether the matched intention information accords with the common knowledge or not is determined by judging the matched intention information, so that the matched intention information is more reasonable, and finally, the response information output based on the intention information is more reasonable and accurate.
The above embodiments are only exemplary embodiments of the present application, and are not intended to limit the present application, and the protection scope of the present application is defined by the claims. Various modifications and equivalents may be made by those skilled in the art within the spirit and scope of the present application and such modifications and equivalents should also be considered to be within the scope of the present application.

Claims (10)

1. An information answering method, the method comprising:
matching at least one intention message to be detected based on the input information of the user;
acquiring reply information corresponding to the intention information;
judging whether the intention information accords with common knowledge or not based on the input information and reply information corresponding to the intention information to be detected so as to determine at least one target intention information which accords with common knowledge;
in response to the target intention information, reply information corresponding to the target intention is output.
2. The method according to claim 1, wherein the step of judging whether the intention information conforms to common knowledge or not based on the input information and the reply information corresponding to the intention information to be detected specifically comprises the steps of:
determining a first set of common sense keywords based on the input information and the reply information;
determining a second common sense keyword set corresponding to the reply information based on the reply information;
respectively calculating based on the second common sense keyword set and the first common sense keyword set to obtain set similarity corresponding to the second common sense keyword set so as to obtain confidence of intention information corresponding to the second common sense keyword set; the confidence level is used for representing the credibility that the intention information accords with common knowledge;
and judging whether the intention information conforms to common sense or not based on the confidence of the intention information.
3. The method according to claim 2, wherein the calculating based on the second common sense keyword set and the first common sense keyword set respectively to obtain the set similarity corresponding to the second common sense keyword set specifically comprises:
acquiring a second common sense concept keyword in the second common sense keyword set;
acquiring a first common sense concept keyword in the first common sense keywords;
respectively calculating the common sense concept association degrees of the second common sense concept keyword and the first common sense concept keyword to obtain the common sense concept association degree corresponding to the second common sense concept keyword;
and calculating and obtaining the set similarity corresponding to the second common sense keyword set based on the common sense concept association degree corresponding to the second common sense concept keyword in the second common sense keyword set.
4. The method of claim 3, further comprising:
analyzing the semantic similarity degree of the second common sense concept keyword and the first common sense concept keyword to obtain the semantic similarity corresponding to the second common sense concept keyword;
and calculating and obtaining the set similarity corresponding to the second common sense keyword set based on the common sense concept association degree and the semantic similarity corresponding to the second common sense concept keyword in the second common sense keyword set.
5. The method of claim 3, further comprising: constructing a plurality of common sense concept trees for calculating the association degree of the common sense concepts, wherein the construction steps comprise:
determining a plurality of common sense concept objects;
determining, based on each of the common sense concept objects, a number of common sense concept elements associated with each of the common sense concept objects;
and determining the hierarchical relationship between the common sense concept objects and the common sense concept elements and between the common sense concept elements and the common sense concept elements based on the common sense concept objects and the common sense concept elements corresponding to the common sense concept objects so as to construct and obtain a plurality of common sense concept trees.
6. The method according to claim 5, wherein the calculating the degree of association between the second common sense concept keyword and the concept structure of the first common sense concept keyword to obtain the degree of association between the concept structure corresponding to the second common sense concept keyword specifically comprises:
judging whether the second common sense concept keyword is the same as the first common sense concept keyword or not;
in the case where it is judged that the second common sense concept keyword is identical to the first common sense concept keyword:
determining a level depth of the first common sense concept keyword or the second common sense concept keyword in a target common sense concept tree; determining the conceptual structural relatedness based on the hierarchy depth;
under the condition that the second common sense concept keyword is judged to be different from the first common sense concept keyword:
determining common upper nodes of the first common sense concept keyword and the second common sense concept keyword in a target common sense concept tree;
determining a level depth of the common upper node in a target common sense concept tree, so as to take a level depth value corresponding to the level depth as the common sense concept relevancy.
7. The method of claim 2, in the case where a number of common sense objective intention information is determined, the method further comprising:
and ranking each piece of target intention information based on the confidence degree of each piece of target intention information so as to respond to each piece of target intention according to the ranking obtained order.
8. The method according to claim 2, wherein the determining whether the intention information conforms to common sense based on the confidence level of the intention information specifically comprises:
comparing the confidence with a preset threshold;
judging that the intention information accords with common knowledge under the condition that the confidence coefficient is greater than or equal to the preset threshold value;
and under the condition that the confidence degree is smaller than a preset threshold value, judging that the intention information is not in accordance with common knowledge.
9. The method according to claim 1, wherein the matching of the at least one item of intention information to be detected based on the input information of the user specifically comprises:
determining a target question based on input information of a user;
analyzing the target problem based on a preset natural language understanding model, and obtaining at least one intention message corresponding to the target problem so as to obtain the intention message to be detected.
10. An information answering device, comprising:
the matching module is used for matching at least one piece of intention information to be detected based on input information of a user;
the acquisition module is used for acquiring reply information corresponding to the intention information;
the determining module is used for judging whether the intention information accords with common knowledge or not based on the input information and the reply information corresponding to the intention information to be detected so as to determine at least one target intention information which accords with common knowledge;
an output module for outputting reply information corresponding to the target intention in response to the target intention information.
CN202011339392.6A 2020-11-25 2020-11-25 Information response method and device Pending CN112463920A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011339392.6A CN112463920A (en) 2020-11-25 2020-11-25 Information response method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011339392.6A CN112463920A (en) 2020-11-25 2020-11-25 Information response method and device

Publications (1)

Publication Number Publication Date
CN112463920A true CN112463920A (en) 2021-03-09

Family

ID=74807867

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011339392.6A Pending CN112463920A (en) 2020-11-25 2020-11-25 Information response method and device

Country Status (1)

Country Link
CN (1) CN112463920A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113705186A (en) * 2021-07-22 2021-11-26 上海原圈网络科技有限公司 Automatic reply method and device under message semantic analysis

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108897867A (en) * 2018-06-29 2018-11-27 北京百度网讯科技有限公司 For the data processing method of knowledge question, device, server and medium
CN109871543A (en) * 2019-03-12 2019-06-11 广东小天才科技有限公司 Intention acquisition method and system
CN110069614A (en) * 2019-04-28 2019-07-30 北京车薄荷科技有限公司 A kind of question and answer exchange method and device
CN111858840A (en) * 2019-04-23 2020-10-30 广东小天才科技有限公司 Intention identification method and device based on concept graph

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108897867A (en) * 2018-06-29 2018-11-27 北京百度网讯科技有限公司 For the data processing method of knowledge question, device, server and medium
CN109871543A (en) * 2019-03-12 2019-06-11 广东小天才科技有限公司 Intention acquisition method and system
CN111858840A (en) * 2019-04-23 2020-10-30 广东小天才科技有限公司 Intention identification method and device based on concept graph
CN110069614A (en) * 2019-04-28 2019-07-30 北京车薄荷科技有限公司 A kind of question and answer exchange method and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113705186A (en) * 2021-07-22 2021-11-26 上海原圈网络科技有限公司 Automatic reply method and device under message semantic analysis
CN113705186B (en) * 2021-07-22 2023-12-22 上海原圈网络科技有限公司 Automatic reply method and device under message semantic analysis

Similar Documents

Publication Publication Date Title
CN108345690B (en) Intelligent question and answer method and system
CN110837550B (en) Knowledge graph-based question answering method and device, electronic equipment and storage medium
CN109582793B (en) Model training method, customer service system, data labeling system and readable storage medium
CN107797984B (en) Intelligent interaction method, equipment and storage medium
CN107515877B (en) Sensitive subject word set generation method and device
JP5282658B2 (en) Image learning, automatic annotation, search method and apparatus
CN113139036B (en) Information interaction method and equipment
CN109960722B (en) Information processing method and device
CN111179935B (en) Voice quality inspection method and device
CN110765348B (en) Hot word recommendation method and device, electronic equipment and storage medium
CN116795973A (en) Text processing method and device based on artificial intelligence, electronic equipment and medium
WO2023040516A1 (en) Event integration method and apparatus, and electronic device, computer-readable storage medium and computer program product
CN110727769B (en) Corpus generation method and device and man-machine interaction processing method and device
CN114741581A (en) Image classification method and device, computer equipment and medium
CN111625636A (en) Man-machine conversation refusal identification method, device, equipment and medium
CN112463920A (en) Information response method and device
CN112417174A (en) Data processing method and device
CN111223014B (en) Method and system for online generation of subdivision scene teaching courses from a large number of subdivision teaching contents
CN111460119A (en) Intelligent question and answer method and system for economic knowledge and intelligent equipment
CN115098655A (en) Common question answering method, system, equipment and medium
CN115545960A (en) Electronic information data interaction system and method
CN113886535A (en) Knowledge graph-based question and answer method and device, storage medium and electronic equipment
CN117909557B (en) Man-machine interaction method, system, equipment and storage medium based on large language model
CN110175241A (en) Question and answer base construction method, device, electronic equipment and computer-readable medium
CN117972160B (en) Multi-mode information processing method and device

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