Request statement processing method and device, storage medium and electronic equipment

By performing semantic recognition and slot filling processing on request statements, the inefficiency problem of sessions caused by missing information in the prior art is solved, and fast and accurate request statement processing and dialogue efficiency are achieved.

CN119558320APending Publication Date: 2025-03-04JD DIGITS HAIYI INFORMATION TECHNOLOGY CO LTD

Patent Information

Application Number
CN202311100133.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-29
Publication Date
2025-03-04

AI Technical Summary

Technical Problem

When processing request statements in a session, the prior art tends to return response statements that do not correspond to the requested content during the identification process due to lack of information, thereby reducing session efficiency.

Method used

By receiving the request statement, semantic recognition is performed to obtain the request intent and the target entity, fill the slots in the request intent based on the target entity, and generate the corresponding request result or clarification speech if the slot filling is successful or failed.

Benefits of technology

It realizes fast and accurate processing of request statements, improves dialogue efficiency, and ensures the correspondence between the processing results of request statements and the request content.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119558320A_ABST
    Figure CN119558320A_ABST
Patent Text Reader

Abstract

The invention provides a request statement processing method and device, electronic equipment and a storage medium, and relates to the technical field of computers. The method comprises the following steps: receiving a request statement; performing semantic recognition on the request statement to obtain a request intention of the request statement and a target entity in the request statement; filling slots in the request intention based on the target entity, and determining a result of successful filling or failed filling of each slot; generating a request result of the request statement under the condition that all the slots are successfully filled; and generating a clear verbal skill of the request statement under the condition that the slot position failing to fill exists. According to the method, the entity content required by the request intention can be found out based on the request statement, and then the request result or the clear verbal skill is directly generated, so that the effects of quickly and accurately processing the request statement and improving the conversation efficiency are achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] With the continuous development of computer technology and artificial intelligence technology, the application of natural language processing technology is becoming more and more important. Among them, the processing method of natural language in conversation greatly affects the efficiency of conversation.

[0003] In the related art, when processing a request statement in a conversation, the request statement is usually semantically recognized as a whole, and a response statement is returned based on the result of the semantic recognition. Since it is a holistic recognition, when information is missing during the recognition process, a response statement that does not correspond to the request content is often obtained, resulting in low conversation efficiency.

[0004] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention

[0005] The purpose of the present disclosure is to provide a method, device, electronic device and storage medium for processing request statements, so as to quickly and accurately process request statements and improve dialogue efficiency.

[0006] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by the practice of the present disclosure.

[0007] According to one aspect of the present disclosure, a method for processing a request statement is provided, including: receiving a request statement; performing semantic recognition on the request statement to obtain the request intent of the request statement and a target entity in the request statement; filling slots in the request intent based on the target entity, and determining the results of success or failure in filling each slot; generating a request result of the request statement when all slots are successfully filled; and generating clarification words for the request statement when there are slots that fail to be filled.

[0008] In one embodiment of the present disclosure, slots in the request intent are filled based on the target entity, and the results of success or failure in filling each slot are determined, including: for each slot, according to the entity type required by the slot, determining whether there is an entity to be filled corresponding to the slot among all target entities; when there is one corresponding entity to be filled in the slot, filling the slot with the entity to be filled and determining that the slot is successfully filled; when there are multiple corresponding entities to be filled in the slot, determining that the slot has failed to be filled.

[0009] In one embodiment of the present disclosure, the slots in the request intent are filled based on the target entity, and the results of success or failure in filling each slot are determined, which also includes: when there is no corresponding entity to be filled in the slot, determining whether there is an inheritance entity corresponding to the slot in the session information of the session where the request statement is located; when there is a corresponding inheritance entity in the slot, filling the inheritance entity into the slot and determining that the slot is successfully filled; when there is no corresponding inheritance entity in the slot, or when there are multiple corresponding inheritance entities in the slot, determining that the slot has failed to be filled.

[0010] In one embodiment of the present disclosure, determining whether there is an inheritance entity corresponding to a slot in session information of a session in which a request statement is located includes: obtaining a dialog state tracking result of the session; determining from the dialog state tracking result whether there is a historical entity whose entity type is the same as the entity type required by the slot; and if there is a historical entity, determining from the historical entity by a Bayesian belief network model whether there is an inheritance entity corresponding to the slot.

[0011] In one embodiment of the present disclosure, when there is a slot that fails to be filled, clarification words are generated for the request statement, including: when there are multiple corresponding entities to be filled or multiple corresponding inherited entities for the slot that fails to be filled, generating clarification words based on the multiple corresponding entities to be filled or multiple corresponding inherited entities; when there is no corresponding inherited entity for the slot that fails to be filled, generating clarification words based on the slot that fails to be filled.

[0012] In one embodiment of the present disclosure, before performing semantic recognition on a request statement, the method for processing the request statement also includes: when there is a pronoun in the request statement, obtaining historical conversation sentences in the conversation where the request statement is located; performing pronoun resolution processing on the request statement according to the historical conversation sentences to obtain entity words corresponding to the pronouns; and replacing the pronouns with entity words to update the request statement.

[0013] In one embodiment of the present disclosure, semantic recognition is performed on a request sentence to obtain a request intent of the request sentence and a target entity in the request sentence, including: inputting the request sentence into an intent-entity joint recognition model to recognize the request sentence through the intent-entity joint recognition model, thereby obtaining the request intent of the request sentence and entity words in the request sentence; obtaining a standard entity set, and comparing the entity word with the standard words in the standard entity set; when the entity word does not belong to the standard entity set, determining a target standard word related to the entity word from the standard entity set, and using the target standard word as the target entity in the request sentence; and, when the entity word belongs to the standard entity set, using the entity word as the target entity in the request sentence.

[0014] In one embodiment of the present disclosure, a target standard word related to an entity word is determined from a standard entity set, including: performing entity retrieval in the standard entity set based on the entity word to obtain candidate standard words related to the entity word; determining a relevance value between the entity word and each candidate standard word; and selecting a target standard word from the candidate standard words according to the relevance value.

[0015] According to another aspect of the present disclosure, a request statement processing device is provided, including: a receiving module for receiving a request statement; an identification module for performing semantic identification on the request statement to obtain the request intent of the request statement and the target entity in the request statement; a filling module for filling the slots in the request intent based on the target entity, and determining the results of success or failure in filling each slot; a generation module for generating a request result of the request statement when all slots are successfully filled; and generating a clarification script for the request statement when there are slots that fail to be filled.

[0016] According to another aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the method for processing a request statement described above is implemented.

[0017] According to another aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute the above-mentioned request statement processing method by executing the executable instructions.

[0018] The method for processing request statements provided by the embodiments of the present disclosure can first identify the request statement, obtain the request intent of the request statement and the target entity in the request statement, wherein the request intent can include slot information; then try to fill the slots in the request intent based on the target entity, and generate a request result when all slots are successfully filled, and generate a clarification speech when there are slots that fail to be filled. It can be seen that this method can try to find the entity content required for the request intent based on the request statement, and then directly generate a request result or generate a clarification speech, so as to achieve the effect of quickly and accurately processing the request statement and improving the efficiency of the conversation.

[0019] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.

[0021] Figure 1 A schematic diagram showing an exemplary system architecture to which the method for processing request statements according to an embodiment of the present disclosure can be applied;

[0022] Figure 2 A flowchart showing a method for processing a request statement according to an embodiment of the present disclosure is shown;

[0023] Figure 3 A flowchart of filling a slot in a method for processing a request statement according to an embodiment of the present disclosure is shown;

[0024] Figure 4 A flowchart of performing reference resolution in a method for processing a request statement according to an embodiment of the present disclosure is shown;

[0025] Figure 5 A flowchart of semantic recognition of a request statement in a method for processing a request statement according to an embodiment of the present disclosure is shown;

[0026] Figure 6 A block diagram showing a request statement processing device according to an embodiment of the present disclosure; and

[0027] Figure 7 A structural block diagram of a computer device for processing a request statement in an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0028] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that the disclosure will be more comprehensive and complete and to fully convey the concepts of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.

[0029] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.

[0030] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the present disclosure, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0031] Figure 1 A schematic diagram showing an exemplary system architecture to which the method for processing request statements according to an embodiment of the present disclosure can be applied.

[0032] like Figure 1 As shown, the system architecture may include a server 101, a network 102, and a client 103. The network 102 is used to provide a medium for a communication link between the client 103 and the server 101. The network 102 may include various connection types, such as wired, wireless communication links, or optical fiber cables.

[0033] In an exemplary embodiment, the server 101 may be a server that provides various services, such as a background management server that provides support for the device operated by the user using the client 103. The background management server may analyze and process the received request and other data, and feed back the processing results to the client 103. The server 101 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. In some practical applications, the server 101 may also be a server of a network platform, which may be, for example, a trading platform, a live broadcast platform, a social platform, or a music platform, etc., which is not limited in the embodiments of the present disclosure. Among them, the server may be a single server or a cluster formed by multiple servers, and the present disclosure does not limit the specific architecture of the server.

[0034] In an exemplary embodiment, the client 103 that transmits data with the server 101 may include, but is not limited to, electronic devices such as smart phones, desktop computers, tablet computers, laptops, smart speakers, digital assistants, AR (Augmented Reality) devices, VR (Virtual Reality) devices, and smart wearable devices, but is not limited to these.

[0035] In an exemplary embodiment, the process of server 101 for implementing a method for processing request statements may be: server 101 receives a request statement; server 101 performs semantic recognition on the request statement to obtain the request intent of the request statement and the target entity in the request statement; server 101 fills the slots in the request intent based on the target entity, and determines the results of success or failure in filling each slot; server 101 generates a request result of the request statement when all slots are successfully filled; and generates clarification words for the request statement when there are slots that fail to be filled.

[0036] In addition, it should be noted that Figure 1 What is shown is only one application environment of the request statement processing method provided by the present disclosure. Figure 1 The numbers of servers 101, networks 102 and clients 103 are merely illustrative, and any number of clients, networks and servers may be provided according to actual needs.

[0037] In order to enable ordinary persons in the art to better understand the technical solution of the present disclosure, each step of the method for processing a request statement in an exemplary embodiment of the present disclosure will be described in more detail below with reference to the accompanying drawings and embodiments.

[0038] Figure 2 A flowchart of a method for processing a request statement according to an embodiment of the present disclosure is shown. The method provided by the embodiment of the present disclosure can be performed as follows: Figure 1 The server 101 or the client 103 shown is executed, but the present disclosure is not limited to this.

[0039] In the following examples, the server 101 is used as the execution subject for example description.

[0040] like Figure 2 As shown, the method for processing a request statement provided by the embodiment of the present disclosure may include the following steps.

[0041] Step S201, receiving a request statement.

[0042] The request statement may be sent by the client. For example, the request statement may be a statement that the user sends by operating the session system on the client and hopes to get a reply, such as "How is the weather today?", "How much is the movie ticket for a certain movie?", etc. The request statement may be a statement in a session, and its form may be one or more of text information, voice information, video information, and audio information, etc., which is not limited in the present disclosure.

[0043] Step S203, perform semantic recognition on the request statement to obtain the request intent of the request statement and the target entity in the request statement.

[0044] The trained neural network model can be used to identify request statements. For example, the model can be trained in advance using conversation samples with intent labels to obtain an intent recognition model that can recognize request intent. The model can also be trained in advance using conversation samples with entity labels to obtain an entity recognition model that can recognize entity words. The trained intent recognition model and the trained entity recognition model are then used to process request statements respectively, thereby obtaining the request intent of the request statement and the target entity in the request statement.

[0045] The request intent of a request statement may include an intent type and a slot corresponding to the intent type. For example, for the request statement "How is the weather today?", the intent type may be identified as "Ask about the weather", and the slots corresponding to the intent type may be identified as <time> and <location>.

[0046] The target entity in the request sentence can be an entity word directly identified from the request sentence. For example, for the request sentence "How is the weather today?", the identified "today" can be used as the target entity.

[0047] The target entity in the request statement can also be an entity word with clear meaning after identification and correction, so as to facilitate filling the slots in the request intent in the subsequent steps. For example, the entity tags of the sample session can be limited when training the relevant neural network model, so that the trained neural network model can directly output entity words with clear meanings as target entities. For another example, the trained neural network model can also directly output entity words obtained from the request statement, and then convert the entity words into target entities with clear meanings based on a preset standard entity set.

[0048] Step S205, filling the slots in the request intent based on the target entity, and determining the results of success or failure in filling each slot.

[0049] You can obtain the entity type of each target entity in the request statement, as well as the entity type of each slot in the request intent, and then match the target entity of the same entity type with the slot to fill the slot with the target entity. Specifically, if the target entity that matches the slot is unique, the slot can be considered to have been filled successfully. If there are multiple target entities that match the slot, the slot can be considered to have failed to be filled. Among them, the target entity that can successfully match the slot can be regarded as the information required by the request intent.

[0050] Among them, the entity type of the target entity in the request statement can be determined in the process of identifying the target entity in step S203. For example, when training an entity recognition model that can recognize entity words, the entity label of the conversation sample can include a detailed entity type of the entity word.

[0051] For example, for the request statement "How is the weather in place A today?", assuming that the intent type of the request statement can be identified as "asking about the weather" and the target entities in the request statement can be identified as "today" and "place A", and it can be known that the slots in the intent of "asking about the weather" are <time> and <place>, then <time> and <place> can be filled based on the two target entities "today" and "place A". Specifically, if the entity type of "today" in the request statement "How is the weather in place A today?" is obtained as time, then "today" can be successfully matched with the slot <time>, and if the entity type of "place A" in the request statement "How is the weather in place A today?" is obtained as place, then "place A" can be successfully matched with the slot <place>. Furthermore, it can be considered that both the slots <time> and <place> are successfully filled.

[0052] For another example, for the request statement "How much is the air ticket from place A to place B?", assuming that the intent type of the request statement can be identified as "ask for air ticket prices" and the target entities in the request statement can be identified as "place A" and "place B", and it can be known that the slots in the intent of "ask for air ticket prices" are <place of departure> and <place of destination>, then <place of departure> and <place of destination> can be filled based on the two target entities of "place A" and "place B". Specifically, if the entity type of "place A" in the request statement "How much is the air ticket from place A to place B?" is obtained as the place of departure, then "place A" can be successfully matched with the slot of <place of departure>, and if the entity type of "place B" in the request statement "How much is the air ticket from place A to place B?" is obtained as the destination, then "place B" can be successfully matched with the slot of <place of destination>. Furthermore, it can be considered that both the slots of <place of departure> and <place of destination> are successfully filled.

[0053] Step S207, when all slots are successfully filled, a request result of the request statement is generated; when there are slots that fail to be filled, a clarification script of the request statement is generated.

[0054] In this step, if all slots are filled successfully, it means that the request intent corresponding to the request statement is complete and clear. You can query based on each slot and the entity filled in it, and then generate the request result of the request statement based on the queried information. Among them, you can query in the preset knowledge base or in other connected data systems. If there are slots that fail to be filled, it means that there is information that needs to be clarified in the request intent corresponding to the request statement. Then, the content of the clarification words can be determined based on the slots that failed to be filled, in the hope that the user can return content that helps determine the request result based on the clarification words, thereby improving the efficiency of the conversation.

[0055] In some practical applications, a DPL (Decision Programming Language) module may be set to store the results of success or failure of filling each slot in the current request statement, and then the DPL module may be used to decide whether to perform a query or generate a clarification statement.

[0056] After the request result or clarification words are generated, the request result or clarification words may be output as a response statement to the request statement and displayed to the user.

[0057] Through the request statement processing method provided by the present disclosure, the request statement can be first identified to obtain the request intent of the request statement and the target entity in the request statement, wherein the request intent can include slot information; then try to fill the slots in the request intent based on the target entity, and generate a request result when all slots are successfully filled, and generate a clarification speech when there are slots that fail to be filled. It can be seen that this method can try to find the entity content required for the request intent based on the request statement, and then directly generate a request result or generate a clarification speech, so as to achieve the effect of quickly and accurately processing the request statement and improving the efficiency of the conversation.

[0058] In some embodiments, step S205 may include: for each slot, determining whether there is an entity to be filled corresponding to the slot among all target entities based on the entity type required for the slot; if there is a corresponding entity to be filled in the slot, filling the entity to be filled into the slot and determining that the slot is filled successfully; if there are multiple corresponding entities to be filled in the slot, determining that the slot has failed to be filled.

[0059] That is, if the target entity filled into the slot is unique, it can be determined that the slot is filled successfully. If the target entity filled into the slot is multiple (ie greater than or equal to 2), it can be determined that the slot is filled unsuccessfully.

[0060] In some embodiments, step S205 may also include: if there is no corresponding entity to be filled in the slot, determining whether there is an inheritance entity corresponding to the slot in the session information of the session where the request statement is located; if there is a corresponding inheritance entity in the slot, filling the slot with the inheritance entity and determining that the slot is filled successfully; if there is no corresponding inheritance entity in the slot, or if there are multiple corresponding inheritance entities in the slot, determining that the slot has failed to be filled.

[0061] Further, in some embodiments, determining whether there is an inheritance entity corresponding to the slot in the session information of the session where the request statement is located includes: obtaining the dialog state tracking result of the session; determining from the dialog state tracking result whether there is a historical entity whose entity type is the same as the entity type required by the slot; if there is a historical entity, determining whether there is an inheritance entity corresponding to the slot from the historical entity through a Bayesian belief network model.

[0062] Among them, the slot does not have a corresponding entity to be filled, which means that when trying to fill the slot using only the target entity, it is found that the filling fails. In this case, entity inheritance can be used to try to find an inherited entity that can fill the slot from the session information of the session where the request statement is located, and the inherited entity can be inferred through the Bayesian belief network to ensure the semantic accuracy of the inherited entity in the request statement.

[0063] Figure 3 FIG. 1 is a flowchart showing a method for processing a request statement according to an embodiment of the present disclosure for filling a slot. Figure 3 As shown, filling the slots may include the following steps.

[0064] Step S301, obtain the request intent of the request statement and the target entity in the request statement, and determine the target slot currently to be filled in the request intent.

[0065] Step S303, according to the entity type required by the target slot, determine whether there is an entity to be filled corresponding to the target slot among all the target entities. If yes, execute step S305; if no, execute step 311.

[0066] Step S305, determine whether the entity to be filled is unique. If yes, execute step S307; if no, execute step S309.

[0067] Step S307, filling the entity to be filled into the target slot, and determining whether the target slot is filled successfully.

[0068] Step S309, determining that the target slot has failed to be filled.

[0069] Step S311, obtaining the session information of the session where the request statement is located, and determining whether there is an inheritance entity corresponding to the target slot in the session information. If yes, executing step S313; if no, executing step S309.

[0070] The session information may be a result of tracking the status of a conversation.

[0071] Step S313, determine whether the inheritance entity is unique. If yes, execute step S315; if no, execute step S309.

[0072] Step S315, filling the inherited entity into the target slot, and determining whether the target slot is filled successfully.

[0073] Figure 3 The other contents of the embodiment can refer to the other embodiments mentioned above, and the present disclosure will not elaborate on them here.

[0074] In some embodiments, "in the case that there is a slot that fails to be filled, generating clarification words for the request statement" in step S207 may include: in the case that there are multiple corresponding entities to be filled or multiple corresponding inherited entities for the slot that fails to be filled, generating clarification words based on the multiple corresponding entities to be filled or multiple corresponding inherited entities; in the case that there is no corresponding inherited entity for the slot that fails to be filled, generating clarification words based on the slot that fails to be filled.

[0075] Among them, "how many corresponding entities exist in the slots that failed to be filled" can be sent to the DPL module, and then the DPL module is used to decide whether to generate clarification words for the entity or for the slot.

[0076] In some practical applications, before performing semantic recognition on a request statement, it is also possible to first determine whether there are pronouns in the request statement, and if there are pronouns, perform pronoun resolution on the request statement to update the request statement with words that are more semantically clear and accurate, thereby solving the pronoun problem in the request statement.

[0077] Figure 4 FIG. 1 is a flowchart showing a method for performing reference resolution in a request statement processing method according to an embodiment of the present disclosure. Figure 4 As shown, in some embodiments, before executing the step S203 of "performing semantic recognition on the request statement", the method for processing the request statement may further include the following steps.

[0078] Step S401: when there is a pronoun in the request statement, obtain the historical conversation statements in the conversation where the request statement is located.

[0079] Among them, a regular expression can be set in advance, and then the request statement and the regular expression are matched regularly to determine whether there are pronouns in the request statement by regular matching. For example, the presence of pronouns such as "it", "this" or "this" in the request statement can be identified by regular matching. For another example, when the request statement is identified to be missing a subject or object by regular matching, it can be determined that the request statement contains pronouns; wherein, the request statement missing a subject or object can be, for example, "How to get there?", "How to do it?" and other statements.

[0080] Step S403: perform reference resolution processing on the request sentence according to the historical conversation sentences to obtain entity words corresponding to the reference words.

[0081] Among them, a deep network model can be used to process historical conversation sentences, determine the corresponding entity information (i.e., the corresponding entity word) for the pronoun in the request sentence from the historical conversation sentences, or determine the missing subject or object for the request sentence from the historical conversation sentences.

[0082] Step S405: Use entity words to replace pronouns to update the request statement.

[0083] In this embodiment, a trained neural network model such as the MT5 multi-round dialogue rewriting model can be used to perform reference resolution processing and query (query text) rewriting processing to achieve the update of the request statement.

[0084] Figure 5 FIG. 1 is a flowchart of semantic recognition of a request statement in a method for processing a request statement according to an embodiment of the present disclosure. Figure 5 As shown, in some embodiments, step S203 may further include the following steps.

[0085] Step S501, input the request sentence into the intention-entity joint recognition model to recognize the request sentence through the intention-entity joint recognition model, and then obtain the request intent of the request sentence and the entity words in the request sentence.

[0086] The intent-entity joint recognition model may be a pre-trained neural network model, such as a pre-trained JointBERT model. The model may be used to simultaneously output the request intent of a request statement and entity words in the request statement, with a fast recognition speed.

[0087] Step S503: Obtain a standard entity set, and compare the entity word with the standard words in the standard entity set.

[0088] The standard entity set may be pre-set, and the standard words therein may be entity words with clear meanings.

[0089] Step S505: In the case where the entity word does not belong to the standard entity set, determine a target standard word related to the entity word from the standard entity set, and use the target standard word as the target entity in the request statement; and, in the case where the entity word belongs to the standard entity set, use the entity word as the target entity in the request statement.

[0090] In some embodiments, "determining a target standard word related to the entity word from the standard entity set" in step S505 may include: performing entity retrieval based on the entity word in the standard entity set to obtain candidate standard words related to the entity word; determining the relevance values between the entity word and each candidate standard word; and selecting the target standard word from the candidate standard words according to the relevance values.

[0091] Among them, the process of performing entity retrieval may be to select standard words containing the entity word or standard words with similar meanings. For example, for the unclear "Jing", "Beijing" and "Nanjing" with clear meanings can be retrieved as candidate standard words related to "Jing".

[0092] Then, an entity relevance filtering algorithm can be used to determine the relevance values between the entity word and each candidate standard word, and then use the candidate standard words with relevance values higher than the preset threshold as the target standard words. The preset threshold can be set based on the actual situation, such as values of 0.6, 0.8, etc. The higher the value, the greater the relevance between the selected candidate standard word and the entity word.

[0093] Through the above steps of entity retrieval and relevance filtering based on the standard entity set, unclear entity words can be corrected and the entity scope can be narrowed, which is beneficial to the implementation of subsequent steps (i.e., filling the slots in the request intention).

[0094] In addition, in the foregoing process, it is allowed that the intent entity joint recognition model cannot recognize the entity word from the request statement, and it is also allowed that there is no target standard word related to the entity word in the standard entity set; for example, if the request statement consists of multiple function words, or if the entity word in the request statement cannot match any standard word in the standard entity set, it is a situation where the entity word cannot be recognized or the target standard word cannot be determined. In these cases, it means that the target entity of the request statement is a null value. For this situation, it can be determined that there is no corresponding entity to be filled in the slot, and then it can be接着 determined whether there is an inherited entity corresponding to the slot in the session information of the session where the request statement is located to continue attempting to fill the slot.

[0095] It should be noted that the above figures are only schematic illustrations of the processes included in the method according to an exemplary embodiment of the present invention, and are not intended to be limiting. It is easy to understand that the processes shown in the above figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.

[0096] Figure 6 A block diagram of a request statement processing device 600 according to an embodiment of the present disclosure is shown; Figure 6 As shown, it includes: a receiving module 601, which is used to receive a request statement; an identification module 602, which is used to perform semantic identification on the request statement, and obtain the request intent of the request statement and the target entity in the request statement; a filling module 603, which is used to fill the slots in the request intent based on the target entity, and determine the results of success or failure in filling each slot; a generation module 604, which is used to generate a request result of the request statement when all slots are successfully filled; and generate a clarification script for the request statement when there are slots that fail to be filled.

[0097] Through the request statement processing device provided by the present disclosure, the request statement can be first identified to obtain the request intent of the request statement and the target entity in the request statement, wherein the request intent can include slot information; then try to fill the slots in the request intent based on the target entity, and generate a request result when all slots are successfully filled, and generate a clarification speech when there are slots that fail to be filled. It can be seen that this method can try to find the entity content required for the request intent based on the request statement, and then directly generate a request result or generate a clarification speech, so as to achieve the effect of quickly and accurately processing the request statement and improving the efficiency of the conversation.

[0098] In some embodiments, the filling module 603 fills the slots in the request intent based on the target entity, and determines the results of success or failure in filling each slot, including: for each slot, according to the entity type required by the slot, determining whether there is an entity to be filled corresponding to the slot among all target entities; if there is a corresponding entity to be filled in the slot, fill the entity to be filled into the slot and determine that the slot is filled successfully; if there are multiple corresponding entities to be filled in the slot, determine that the slot has failed to be filled.

[0099] In some embodiments, the filling module 603 fills the slots in the request intent based on the target entity, determines the results of success or failure in filling each slot, and also includes: when there is no corresponding entity to be filled in the slot, determining whether there is an inheritance entity corresponding to the slot in the session information of the session where the request statement is located; when there is a corresponding inheritance entity in the slot, fill the inheritance entity into the slot and determine that the slot is successfully filled; when there is no corresponding inheritance entity in the slot, or when there are multiple corresponding inheritance entities in the slot, determine that the slot has failed to be filled.

[0100] In some embodiments, the filling module 603 determines whether there is an inheritance entity corresponding to the slot in the session information of the session where the request statement is located, including: obtaining the dialog state tracking result of the session; determining from the dialog state tracking result whether there is a historical entity whose entity type is the same as the entity type required by the slot; if there is a historical entity, determining from the historical entity through a Bayesian belief network model whether there is an inheritance entity corresponding to the slot.

[0101] In some embodiments, when there is a slot that fails to be filled, the generation module 604 generates clarification words for the request statement, including: when there are multiple corresponding entities to be filled or multiple corresponding inherited entities for the slot that fails to be filled, generating clarification words based on the multiple corresponding entities to be filled or multiple corresponding inherited entities; when there is no corresponding inherited entity for the slot that fails to be filled, generating clarification words based on the slot that fails to be filled.

[0102] In some embodiments, the request statement processing device 600 also includes a resolution module 605; before the recognition module 602 performs semantic recognition on the request statement, the resolution module 605 is used to obtain historical conversation sentences in the conversation where the request statement is located when there is a pronoun in the request statement; perform reference resolution processing on the request statement according to the historical conversation sentences to obtain entity words corresponding to the pronouns; and replace the pronouns with entity words to update the request statement.

[0103] In some embodiments, the recognition module 602 performs semantic recognition on the request statement to obtain the request intent of the request statement and the target entity in the request statement, including: inputting the request statement into the intent-entity joint recognition model to recognize the request statement through the intent-entity joint recognition model, and then obtaining the request intent of the request statement and the entity words in the request statement; obtaining a standard entity set, and comparing the entity words with the standard words in the standard entity set; when the entity word does not belong to the standard entity set, determining the target standard words related to the entity word from the standard entity set, and using the target standard words as the target entity in the request statement; and, when the entity word belongs to the standard entity set, using the entity word as the target entity in the request statement.

[0104] In some embodiments, the recognition module 602 determines a target standard word related to the entity word from the standard entity set, including: performing entity retrieval in the standard entity set based on the entity word to obtain candidate standard words related to the entity word; determining a correlation value between the entity word and each candidate standard word; and selecting a target standard word from the candidate standard words based on the correlation value.

[0105] Figure 6 For other contents of the embodiment, reference can be made to the other embodiments mentioned above.

[0106] It will be appreciated by those skilled in the art that various aspects of the present invention may be implemented as a system, method or program product. Therefore, various aspects of the present invention may be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to herein as a "circuit", "module" or "system".

[0107] Figure 7 The block diagram of a computer device for processing a request statement in an embodiment of the present disclosure is shown. It should be noted that the electronic device shown in the figure is only an example and should not bring any limitation to the function and scope of use of the embodiment of the present invention.

[0108] Refer to the following Figure 7 An electronic device 700 according to this embodiment of the present invention will be described. Figure 7 The electronic device 700 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0109] like Figure 7 As shown, the electronic device 700 is in the form of a general computing device. The components of the electronic device 700 may include but are not limited to: at least one processing unit 710, at least one storage unit 720, and a bus 730 connecting different system components (including the storage unit 720 and the processing unit 710).

[0110] The storage unit stores program codes, which can be executed by the processing unit 710, so that the processing unit 710 performs the steps according to various exemplary embodiments of the present invention described in the above “Exemplary Method” section of this specification. For example, the processing unit 710 can perform the following steps: Figure 2 The method shown in .

[0111] The storage unit 720 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 7201 and / or a cache storage unit 7202 , and may further include a read-only storage unit (ROM) 7203 .

[0112] The storage unit 720 may also include a program / utility 7204 having a set (at least one) of program modules 7205, such program modules 7205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0113] Bus 730 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.

[0114] The electronic device 700 may also communicate with one or more external devices 800 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 700, and / or communicate with any device that enables the electronic device 700 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 750. Furthermore, the electronic device 700 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 760. As shown, the network adapter 760 communicates with other modules of the electronic device 700 via a bus 730. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 700, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.

[0115] In an exemplary embodiment of the present disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the above method of the present specification is stored. In some possible implementations, various aspects of the present invention can also be implemented in the form of a program product, which includes a program code, and when the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps according to various exemplary embodiments of the present invention described in the above "Exemplary Method" section of the present specification.

[0116] The program product for implementing the above method according to the embodiment of the present invention may adopt a portable compact disk read-only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto, and in this document, a readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, apparatus, or device.

[0117] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0118] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0119] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.

[0120] Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).

[0121] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.

[0122] In addition, although the steps of the method in the present disclosure are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.

[0123] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the implementation of the present disclosure.

[0124] According to one aspect of the present disclosure, a computer program product or a computer program is provided, the computer program product or the computer program including computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the methods provided in various optional implementations of the above-mentioned embodiments.

[0125] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any modification, use or adaptation of the present disclosure, which follows the general principles of the present disclosure and includes common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the appended claims.

Claims

1. A method for processing a request statement, characterized in that: include: Receive request statement; Performing semantic recognition on the request statement to obtain the request intent of the request statement and the target entity in the request statement; Filling the slots in the request intent based on the target entity, determining the result of success or failure in filling each slot; When all slots are filled successfully, a request result of the request statement is generated; when there are slots that fail to be filled, a clarification statement of the request statement is generated.

2. The method according to claim 1, characterized in that: Filling the slots in the request intent based on the target entity, determining the result of success or failure of filling each slot, including: For each slot, according to the entity type required by the slot, determine whether there is an entity to be filled corresponding to the slot among all target entities; If there is a corresponding entity to be filled in the slot, fill the entity to be filled into the slot, and determine that the slot is successfully filled; In the case that there are multiple corresponding entities to be filled in the slot, it is determined that the slot filling fails.

3. The method according to claim 2, characterized in that Filling the slots in the request intent based on the target entity, determining the result of success or failure of filling each slot, further comprising: In the case that the slot does not have a corresponding entity to be filled, determining whether there is an inheritance entity corresponding to the slot in the session information of the session where the request statement is located; If there is a corresponding successor entity in the slot, fill the slot with the successor entity, and determine that the slot is successfully filled; In the case that there is no corresponding successor entity for the slot, or in the case that there are multiple corresponding successor entities for the slot, it is determined that the slot filling fails.

4. The method according to claim 3, characterized in that Determining whether there is an inheritance entity corresponding to the slot in the session information of the session where the request statement is located includes: Obtaining a dialog state tracking result of the session; Determining from the dialog state tracking result whether there is a historical entity with the same entity type as the entity type required by the slot; In the case where the historical entity exists, it is determined from the historical entity by using a Bayesian belief network model whether there is a successor entity corresponding to the slot.

5. The method according to claim 3, characterized in that: In the case where there is a slot that fails to be filled, a clarification statement for the request statement is generated, including: In the case where the slot that fails to be filled has multiple corresponding entities to be filled or multiple corresponding inherited entities, generating clarification words based on the multiple corresponding entities to be filled or the multiple corresponding inherited entities; In the case that there is no corresponding successor entity for the slot that fails to be filled, a clarification statement is generated based on the slot that fails to be filled.

6. The method according to any one of claims 1 to 5, characterized in that: Before performing semantic recognition on the request statement, the method further includes: When there is a pronoun in the request statement, obtaining historical conversation sentences in the conversation where the request statement is located; Performing a pronoun resolution process on the request sentence according to the historical conversation sentence to obtain an entity word corresponding to the pronoun; The entity word is used to replace the pronoun to update the request statement.

7. The method according to any one of claims 1 to 5, characterized in that: Performing semantic recognition on the request statement to obtain the request intent of the request statement and the target entity in the request statement includes: Inputting the request sentence into an intention-entity joint recognition model to recognize the request sentence through the intention-entity joint recognition model, thereby obtaining a request intent of the request sentence and entity words in the request sentence; Obtain a standard entity set, and compare the entity word with the standard words in the standard entity set; In the case where the entity word does not belong to the standard entity set, determining a target standard word related to the entity word from the standard entity set, and using the target standard word as the target entity in the request sentence; and In the case where the entity word belongs to the standard entity set, the entity word is used as the target entity in the request sentence.

8. The method according to claim 7, characterized in that Determining a target standard word related to the entity word from the standard entity set includes: Performing entity retrieval in the standard entity set based on the entity word to obtain candidate standard words related to the entity word; Determine the relevance value between the entity word and each of the candidate standard words; The target standard word is selected from the candidate standard words according to the relevance value.

9. A request statement processing device, characterized in that: include: A receiving module, used for receiving a request statement; An identification module, used to perform semantic identification on the request statement to obtain the request intent of the request statement and the target entity in the request statement; A filling module, used to fill the slots in the request intent based on the target entity, and determine the result of success or failure in filling each slot; A generation module is used to generate a request result of the request statement when all slots are successfully filled; and to generate a clarification script of the request statement when there are slots that fail to be filled.

10. A computer-readable storage medium having a computer program stored thereon, wherein when the program is executed by a processor, the method for processing a request statement according to any one of claims 1 to 8 is implemented.

11. An electronic device, characterized in that: include: one or more processors; A storage device, used to store one or more programs, when the one or more programs are executed by the one or more processors, enables the one or more processors to implement the request statement processing method as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Answer feedback method and device in chat robot, computer equipment and medium

    CN111353027A

  • Voice interaction method and device and terminal equipment

    CN111428483A

  • Intelligent response method and device, equipment and storage medium

    CN111611364A

  • Task-based dialogue method and device, electronic equipment and storage medium

    CN113743127A

Cited By

  • Problem clarification method, device and equipment based on entity and intention fuzziness analysis

    CN120371982A

  • Question clarification methods, apparatuses, and devices based on entity and intent ambiguity analysis

    CN120371982B

  • Request processing method and device of intelligent cabin and vehicle

    CN120409685A