Information extraction method and device

By extracting the initial key text in the intelligent customer service system and generating the target key text, combining historical reference text and reply templates, the problems of the intelligent customer service system in extracting complex slot information are solved, and efficient information extraction and user feedback are achieved.

CN115146041BActive Publication Date: 2025-02-11ALIBABA (CHINA) CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210588281.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-27
Publication Date
2025-02-11
Estimated Expiration
2042-05-27

AI Technical Summary

Technical Problem

When the existing intelligent customer service system expresses complex slot information through multiple rounds of expression, it cannot effectively extract slot information, resulting in communication failure and poor user experience.

Method used

By obtaining pending text and historical reference text, determining the text type, and extracting the initial key text under the information extraction type, generating the target key text based on the initial key text and historical reference text, determining the reply template and generating the reply text to achieve slots Effective extraction and feedback of information.

Benefits of technology

It realizes the effective extraction of slot information from multiple rounds of conversations, and improves the communication efficiency and user experience of the intelligent customer service system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115146041B_ABST
    Figure CN115146041B_ABST
Patent Text Reader

Abstract

The embodiments of this specification provide an information extraction method and device, wherein the information extraction method includes: obtaining a text to be processed and a historical reference text corresponding to the text to be processed, and determining the text type corresponding to the text to be processed; when the text type is information extraction, extracting the initial key text in the text to be processed; generating a target key text based on the initial key text and the historical reference text; determining a reply template corresponding to the text to be processed based on the target key text; and generating a reply text corresponding to the text to be processed based on the reply template and the target key text. By generating the target key text to be extracted this time based on the initial key text and the historical reference text, key information can be extracted from multiple rounds of interactive communication, a reply text is generated based on the reply template and the target key text, and a reply text for feedback and user dialogue is automatically generated, providing the user with an intelligent dialogue experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of this specification relate to the field of human-computer interaction technology, and more particularly to an information extraction method. One or more embodiments of this specification also relate to an information extraction device, a computing device, and a computer-readable storage medium. Background Art

[0002] With the development and application of artificial intelligence technology, the application of artificial intelligence is involved in many fields. For example, in the scenario of the customer service system, the user will first communicate with the intelligent robot. When the intelligent robot cannot solve the user's needs, it will provide manual customer service to the user. When the user communicates with the intelligent robot, the intelligent robot will collect the user's voice, reply to the user with the corresponding sentence based on the user's expression, and can also convert the voice into text and extract the required slot information from the text. However, when the user expresses complex slot information, it may be expressed in multiple sentences, so that the intelligent robot cannot extract the slot information from the voice at one time, resulting in invalid communication caused by the failure of slot information extraction, which brings a very poor user experience to the user. Therefore, how to extract key slot information from complex conversations and interact with users to complete feedback is a problem that needs to be solved urgently. Summary of the invention

[0003] In view of this, an embodiment of this specification provides an information extraction method. One or more embodiments of this specification also relate to an information extraction device, a computing device, a computer-readable storage medium and a computer program to solve the technical defects existing in the prior art.

[0004] According to a first aspect of an embodiment of this specification, there is provided an information extraction method, comprising:

[0005] Acquire a text to be processed and a historical reference text corresponding to the text to be processed, and determine the text type corresponding to the text to be processed;

[0006] In the case where the text type is information extraction, extracting initial key text from the text to be processed;

[0007] generating a target key text according to the initial key text and the historical reference text;

[0008] Determine a reply template corresponding to the text to be processed according to the target key text;

[0009] Generate a reply text corresponding to the text to be processed based on the reply template and the target key text.

[0010] According to a second aspect of the embodiments of this specification, there is provided an information extraction device, including:

[0011] An acquisition module is configured to acquire a text to be processed and a historical reference text corresponding to the text to be processed, and determine a text type corresponding to the text to be processed;

[0012] An extraction module is configured to extract initial key text from the text to be processed when the text type is information extraction;

[0013] A first generating module is configured to generate a target key text according to the initial key text and the historical reference text;

[0014] A determination module, configured to determine a reply template corresponding to the to-be-processed text according to the target key text;

[0015] The second generating module is configured to generate a reply text corresponding to the to-be-processed text based on the reply template and the target key text.

[0016] According to a third aspect of an embodiment of this specification, a computing device is provided, comprising a memory, a processor, and computer instructions stored in the memory and executable on the processor, wherein the processor implements the steps of the information extraction method when executing the computer instructions.

[0017] According to a fourth aspect of the embodiments of this specification, a computer-readable storage medium is provided, which stores computer instructions, and when the computer instructions are executed by a processor, the steps of the information extraction method are implemented.

[0018] According to a fifth aspect of the embodiments of this specification, a computer program is provided, wherein when the computer program is executed in a computer, the computer is caused to execute the steps of the above-mentioned information extraction method.

[0019] The information extraction method provided in this specification obtains a text to be processed and a historical reference text corresponding to the text to be processed, and determines the text type corresponding to the text to be processed; when the text type is information extraction, extracts the initial key text in the text to be processed; generates a target key text based on the initial key text and the historical reference text; determines a reply template corresponding to the text to be processed based on the target key text; and generates a reply text corresponding to the text to be processed based on the reply template and the target key text.

[0020] An embodiment of the present specification realizes the extraction of initial key text from the text to be processed, and generates the target key text to be extracted this time based on the initial key text and the historical reference text, so as to extract key information from multiple rounds of interactive communication. In addition, a reply template corresponding to the text to be processed can be determined based on the extracted target key text, and a reply text corresponding to the text to be processed can be generated based on the reply template and the target key text, and a reply text for feedback and user dialogue can be automatically generated, bringing an intelligent dialogue experience to the user. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 is a flow chart of an information extraction method provided by an embodiment of this specification;

[0022] Figure 2 This is a schematic diagram of the architecture of a human-computer dialogue system provided by an embodiment of this specification;

[0023] Figure 3 It is a schematic diagram of a framework of a state update model provided by an embodiment of this specification;

[0024] Figure 4 It is a schematic diagram of a framework of a strategy prediction model provided by an embodiment of this specification;

[0025] Figure 5 is a processing flow chart of an information extraction method provided by an embodiment of this specification;

[0026] Figure 6 is a structural schematic diagram of an information extraction device provided by an embodiment of this specification;

[0027] Figure 7 It is a structural block diagram of a computing device provided by an embodiment of this specification. DETAILED DESCRIPTION

[0028] Many specific details are described in the following description to facilitate a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of this specification, so this specification is not limited to the specific implementation disclosed below.

[0029] The terms used in one or more embodiments of this specification are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of this specification. The singular forms of "a", "said" and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in one or more embodiments of this specification refers to any or all possible combinations of one or more associated listed items.

[0030] It should be understood that although the terms first, second, etc. may be used to describe various information in one or more embodiments of this specification, this information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0031] First, the terms involved in one or more embodiments of this specification are explained.

[0032] Slot information: Slot information is the key information defined in the user request, that is, the key information that the machine needs to collect in the human-computer interaction scenario. For example, when a user orders a train ticket, the slot information collected by the machine may be the departure time, departure place, destination, etc.

[0033] Autoregressive model: A linear prediction model that uses the linear combination of random variables at several previous moments to describe the linear regression model of random variables at a later moment. This model is a serial prediction and can only be predicted word by word in text generation.

[0034] Non-autoregressive model: Unlike the autoregressive model, which needs to use the generated words to predict the next word, the non-autoregressive model breaks the serial order during generation and can decode the entire target sentence, thus solving the serial prediction performance problem caused by autoregression.

[0035] For the intelligent customer service system in the voice interaction scenario, after receiving the user's request, the first thing the machine side needs to do is to identify the intent and fill in the slots. Slot filling is to collect some key information of the user. For example, when the user buys a ticket through the intelligent customer service system, the machine side needs to collect the user's name, mobile phone number, departure place and other key slot information. At present, when collecting slot information, the traditional intelligent customer service system extracts the slot information of the entire slot granularity at one time based on the user's current round of expression and fills it into the corresponding slot. For example, if the user's current round of expression is "I want to buy a ticket to place A", then "place A" is extracted and filled into the "destination" slot. However, for some complex slot information, users often go through multiple rounds of expressions when expressing the information. For example, when expressing a mobile phone number, the user will say "188, then 1234, ****". When the user communicates with the intelligent customer service system, the system cannot extract the complete mobile phone number at one time, and the final extraction result may be "****". Then the intelligent customer service system cannot fill the normal slot information into the corresponding slot, resulting in communication failure and a poor user experience.

[0036] In this specification, an information extraction method is provided to meet the need to extract slot information from multiple rounds of dialogue in complex dialogue scenarios, and refine the extraction of slot information from slot granularity to two granularities: segment and bit. The segment granularity is to divide the slot into multiple segments for operation, and the bit granularity is to divide the slot information by bit for operation. Through multiple rounds of dialogue communication, a slot information can be maintained, and the slot information is updated each time by performing segment / bit operations until the entire slot information is collected, thereby solving the problem that complex slot information expressed through multiple rounds cannot be collected in an intelligent customer service system or a human-computer interaction system. This specification also relates to an information extraction device, a computing device, a computer-readable storage medium, and a computer program, which are described in detail one by one in the following embodiments.

[0037] Figure 1 A flowchart of an information extraction method provided according to an embodiment of the present specification is shown, including steps 102 to 110.

[0038] Step 102: Acquire a text to be processed and a historical reference text corresponding to the text to be processed, and determine the text type corresponding to the text to be processed.

[0039] The text to be processed can be understood as the text converted from the user's current round of expression. For example, when the user says during the interaction: "My mobile phone number is ***", the machine side can convert it into text, i.e., the text to be processed, after receiving the user's voice expression. The text to be processed is "My mobile phone number is ***". The historical reference text includes the historical conversation content text and the historical key text extracted in the previous round. The historical conversation content text can be understood as the text converted from the conversation content before the text to be processed. Generally, the historical text is the expression content 3 to 4 rounds before the text to be processed; the historical key text can be understood as the slot information extracted by the machine side based on the previous round of conversation. For example, the historical key text can be "*** (mobile phone number, key text extracted from the previous round of text to be processed)".

[0040] The text type corresponding to the text to be processed can be understood as the operation type to which the text to be processed belongs. Determining the text type corresponding to the text to be processed can also be understood as the machine side's understanding of the dialogue expressed by the user. For example, when the text to be processed is "My mobile phone number is ***", the text type corresponding to the text to be processed is the information extraction type, and the slot information needs to be extracted from the text to be processed; when the text to be processed is "Hello", the text type corresponding to the text to be processed is the daily action type, and the machine side will reply to the user with some fixed words based on the text to be processed.

[0041] In actual implementation, three types of text were constructed, including information extraction type, daily action type, and system type. The information extraction type includes five different application types, as follows:

[0042] Provide type: For example, when the text to be processed is "My number is 188", it means the corresponding type is extraction;

[0043] Affirmative type: For example, when the text to be processed is "OK", "Yes", etc., it means that it corresponds to the affirmative type;

[0044] Negative type: For example, when the text to be processed is some negative answers, it represents the corresponding negative type;

[0045] Correction type: For example, when the text to be processed is "No, my number is 188", the corresponding type is correction;

[0046] Repeat type: For example, when the text to be processed is "Let me say it again, the number is 188", the corresponding type is the repeat type.

[0047] There are 4 different application types in the daily action type, as follows:

[0048] Greeting type: For example, when the text to be processed is "Hello" or "Hi", it means that it corresponds to the greeting type;

[0049] Goodbye type: For example, when the text to be processed is "bye" or "goodbye", it means that it corresponds to the goodbye type;

[0050] Waiting type: For example, when the text to be processed is "wait", it means the corresponding waiting type;

[0051] Tone continuation type: For example, when the text to be processed is a meaningless expression such as "ah..." or "hmm...", it corresponds to the tone continuation type.

[0052] There are two different application types in the system type, as follows:

[0053] Other related types: For example, when the text to be processed is other information text in the interactive information, such as "Whose number is this", it represents the corresponding other related types;

[0054] Other irrelevant types: For example, when the text to be processed is other information besides interactive information, such as "I want to check the weather", it represents the corresponding other irrelevant types.

[0055] When the machine side identifies the text to be processed as one of the five application types in the above-mentioned information extraction type, it means that the text to be processed is of the information extraction type, and the slot information needs to be operated, including the extraction, confirmation, deletion, update, and reset of the slot information. When the text to be processed is identified as one of the four application types in the above-mentioned daily action type, it means that the text to be processed is of the daily action type, and some fixed words will be replied to the user based on the text to be processed. When the text to be processed is identified as one of the two application types in the system type, it means that the text to be processed is not in a complex information collection scenario, and it directly returns to the initial state, or allows other modules of the human-computer dialogue system to provide services to the user.

[0056] In actual applications, when users perform related operations through the intelligent customer service system, when the user's expression content is in a complex information collection scenario, the machine side of the intelligent customer service system will receive the user's voice and convert it into text content, and extract key slot information from the text content. When the user expresses the content of a slot through multiple rounds of voice, the machine side will correct the previously extracted text information to be processed according to the current round of text to be processed until complete and correct slot information is collected.

[0057] In one embodiment of this specification, a user purchases a ticket through an intelligent customer service system, and the conversation between the user and the intelligent customer service system is: "A: Please tell me your mobile phone number. B: My mobile phone number is 1881234****." At this time, the machine side obtains the text to be processed as "My mobile phone number is 1881234****", and the historical reference text is "Please tell me your mobile phone number". Since it is the first time to collect information for the mobile phone number slot, the historical reference text only includes the historical conversation text content, and the key text extracted from the history can be an 11-bit null value. Determine that the text type corresponding to the text to be processed is an information extraction type, indicating that slot information needs to be extracted from the text to be processed.

[0058] In another embodiment of the present specification, a user purchases a ticket through an intelligent customer service system, and the conversation between the user and the intelligent customer service system is: "A: Please tell me your mobile phone number. B: My mobile phone number is 1881234****. A: Please confirm that your mobile phone number is 1881234****. B: No, it is 1239." The text to be processed obtained by the machine side is "No, it is 1239", and the historical reference text is "Please tell me your mobile phone number. My mobile phone number is 1881234****. Please confirm that your mobile phone number is 1881234****." The historical key text is the mobile phone number slot information "1881234****" extracted from the previous round of conversation, and it is determined that the text type corresponding to the text to be processed is the negative type in the information extraction type, indicating that the historical key text needs to be corrected based on the slot information extracted from the text to be processed.

[0059] Step 104: When the text type is information extraction, extract the initial key text in the text to be processed.

[0060] Among them, when the text type is information extraction, the representation needs to update the state (key text), that is, the initial key text needs to be extracted from the text to be processed. The initial key text can be understood as the key text extracted from the text to be processed. Because the key text extracted from the text to be processed may not be the key text required in the end, it is called the initial key text. Subsequently, the historical key text can be corrected according to the initial key text to obtain the target key text required in the end.

[0061] In one embodiment of the present specification, following the above example, when the text type is information extraction, the initial key text in the text to be processed "My mobile phone number is 1881234****" is extracted, and the initial key text is "1881234****".

[0062] Specifically, extracting the initial key text from the text to be processed includes:

[0063] Performing text annotation on the text to be processed;

[0064] Initial key text is extracted from the text to be processed according to the annotation result.

[0065] Among them, text annotation can be understood as classification annotation, which classifies each bit in the text to be processed and extracts the initial key text in the text to be processed.

[0066] In practical applications, BIO classification annotation can be used to annotate the text to be processed, where B represents the beginning of the slot, I represents the inside of the slot, and O represents non-slot information. According to the BIO classification annotation of the text to be processed, the corresponding slot information, that is, the initial key text, can be extracted from the corrected text information.

[0067] In a specific embodiment of the present specification, following the above example, the text to be processed "My mobile phone number is 1881234****" is subjected to BIO classification annotation, and the initial key text "1881234****" is extracted from the text to be processed according to the annotation result.

[0068] Step 106: Generate a target key text based on the initial key text and the historical reference text.

[0069] Among them, the target key text can be understood as the final required key text obtained based on the to-be-processed text of the user's expression content in this round. Since the to-be-processed text may be the text corresponding to a conversation in multiple rounds of expression content, the initial key text corresponding to the to-be-processed text may not be complete slot information. Therefore, the final required complete target key text can be generated based on the initial key text and the historical reference text. For example, if the initial key text is "1239" and the historical key text in the historical reference text is "1881234****", then the target key text is "1881239****".

[0070] In actual applications, when users perform relevant operations through the intelligent customer service system, the machine side of the intelligent customer service system will receive the user's voice and convert it into text content, extract key slot information from the text content, and when the user expresses the content of a slot through multiple rounds of voice, the machine side will correct the previously extracted key text according to the current round of text to be processed and generate the target key text until complete and correct slot information is collected.

[0071] In one embodiment of the present specification, following the above example, the text to be processed is "No, it is 1239", and the historical reference text is "Please tell me your mobile phone number. My mobile phone number is 1881234****. Please confirm that your mobile phone number is 1881234****." The target key text generated according to the initial key text and the historical reference text is "1881239****".

[0072] Specifically, generating a target key text according to the initial key text and the historical reference text includes:

[0073] The historical key text in the historical reference text is modified according to the initial key text to obtain the target key text.

[0074] Among them, the historical key text can be understood as the slot information extracted by the machine side according to the previous round of conversation, and the historical key text is corrected, so that when the text to be processed is of the information extraction type, multiple rounds of information maintenance can be performed on the same slot information to ensure that the complete information of the slot information is collected.

[0075] In one embodiment of the present specification, following the above example, the text to be processed is "No, it is 1239", the historical reference text is "Please tell me your mobile phone number. My mobile phone number is 1881234****. Please confirm that your mobile phone number is 1881234****.", the historical key text is the mobile phone number slot information "1881234****" extracted from the previous round of conversation, and the target key text generated based on the initial key text and the historical reference text is "1881239****".

[0076] Specifically, the historical key text in the historical reference text is corrected according to the initial key text, including:

[0077] Determining revision category information according to the initial key text and the historical reference text;

[0078] The historical key text in the historical reference text is modified based on the modification category information and the initial key text to obtain a target key text.

[0079] Among them, the correction category information can be understood as the operation category information performed on the historical key text. The correction category information is generally divided into five correction categories, including full update, full clear, additional content, unchanged, and partial update. Among them, full update can be understood as updating the entire historical key text to the slot information extracted according to the current round; full clear can be understood as clearing the entire historical key text; additional content can be understood as adding the slot information extracted in the current round on the basis of the historical key text; unchanged can be understood as not updating the historical key text and keeping the current state unchanged; partial update can be understood as partially correcting the historical key text. It should be noted that the four correction categories of full update, full clear, additional content, and unchanged belong to segment operation types, and a segment refers to a part of the slot information; partial update belongs to a bit operation type, which requires bit-by-bit modification of the historical key text. The preset five correction category information can meet all possible modification situations.

[0080] In practical applications, after the correction category information is determined based on the initial key text and the historical reference text, the historical key text in the historical reference text can be corrected accordingly according to the correction category information, so as to obtain the correct key information. When the correction category information is a segment operation type, the corresponding operation is directly performed on the historical key text, and the new key text is output as the target key text; when the modification category information is a bit operation type, the bit-by-bit key text generation is performed, and a new target key text is generated.

[0081] In a specific embodiment of the present specification, when the correction category information is predicted to be fully updated based on the initial key text and the historical reference text, all historical key texts are updated to the initial key text extracted from the text to be processed. The historical key text is "1881234****", and the initial key text extracted from the text to be processed is "1881239****". After all update operations are performed, the historical key text is corrected to "1881239****", that is, the target key text is "1881239****".

[0082] In another specific embodiment of the present specification, when the correction category information is predicted to be completely cleared based on the initial key text and the historical reference text, the slot information in the historical key text is replaced with a null value, that is, the historical key text is cleared. If the historical key text is "1881234****", then after executing the all-clear operation, the historical key text is corrected to 11 null characters.

[0083] In another specific embodiment of the present specification, when the revised category information is predicted to be additional content based on the initial key text and the historical reference text, the initial key text extracted from the text to be processed is added after the historical key text. The historical key text is "1881234", and the initial key text extracted from the text to be processed is "****", then after the additional content operation is performed, the historical key text is revised to "1881234****", that is, the target key text is "1881234****".

[0084] In another specific embodiment of the present specification, when the revised category information is predicted to remain unchanged based on the initial key text and the historical reference text, the status of the current historical key text remains unchanged. If the historical key text is "1881234****", then after the unchanged operation is performed, the result of the historical key text revision is "1881234****", that is, the target key text is "1881234****".

[0085] In another specific embodiment of the present specification, when the correction category information is predicted to be a partial update based on the initial key text and the historical reference text, the text information to be corrected in the historical key text is replaced with the initial key text extracted from the text to be processed. The historical key text is "1881234****", and the initial key text extracted from the text to be processed is "1239". After the partial update operation is performed, the historical key text is corrected to "1881239****", that is, the target key text is "1881234****".

[0086] Specifically, determining the revision category information according to the initial key text and the historical reference text includes:

[0087] Calculating a correction category weight corresponding to each correction category information in a correction category information set according to the initial key text and the historical reference text, wherein the correction category information set includes at least two types of correction category information;

[0088] The target correction category information is determined in the correction category information set according to the correction category weight corresponding to each correction category information.

[0089] Among them, the correction category weight can be understood as the probability of the correction category information performing the operation in this round. For example, there are five types of correction category information. The correction category weight of all updates is 0.2, the correction category weight of all clears is 0.2, the correction category weight of additional content is 0.1, the correction category weight of unchanged is 0.4, and the correction category weight of partial update is 0.1. The correction category that needs to be executed for this operation can be determined according to the correction category weight corresponding to each correction category information. The correction category information set can be understood as a pre-set information set including all types of correction categories. In the embodiment of this specification, the correction category information set includes five types of correction category information. The correction category information that needs to be executed this time is determined in the correction category information according to the correction category weight corresponding to each correction category information.

[0090] In practical applications, the operation probability corresponding to each correction category information can be calculated based on the initial key text and historical reference text, and the target correction category information can be selected according to the operation probability corresponding to each correction category information. The target correction category information is the correction category that needs to be executed this time.

[0091] In a specific embodiment of the present specification, the above example is used to calculate the correction category weights corresponding to the five types of correction category information in the correction category information set based on the initial key text and the historical reference text, which are "all updated: 0.1, all cleared: 0.1, additional content: 0.2, unchanged: 0, partial update: 0.6", and then it is determined that the target correction category information is a partial update, then the representation of all bits of the entire text information to be processed is extracted, and the content of each bit is predicted.

[0092] Specifically, determining the target correction category information in the correction category information set according to the correction category weight corresponding to each correction category information includes:

[0093] Sorting each type of correction category information in the correction category information set in descending order according to the correction category weight corresponding to each correction category;

[0094] The target correction category information is determined according to the sorting result.

[0095] In practical applications, after determining the correction category weights corresponding to the five types of correction category information in the correction category information set, all the correction category information can be sorted from high to low according to the correction category weights corresponding to each correction category information, and the correction category information with the highest correction category weight can be selected as the target correction category information according to the sorting result.

[0096] In a specific embodiment of the present specification, there are five types of correction category information in the correction category information set. After calculating the correction category information corresponding to these five types of correction category information, these five types of correction category information are sorted from high to low according to the correction category weight. The sorting result is "partial update: 0.6, additional content: 0.2, full update: 0.1, all cleared: 0.1, unchanged: 0", and the correction category information ranked first is selected as the target correction category information.

[0097] Specifically, based on the correction category information and the initial key text, the historical key text in the historical reference text is corrected to obtain the target key text, including:

[0098] Determine a target text to be revised in the historical key texts according to the revision category information and the initial key text;

[0099] The target text information to be revised is revised according to the initial key text to obtain the target key text.

[0100] Among them, the target text to be revised can be understood as the text information that needs to be revised in this round in the historical key text. For example, when the revision category is partial update, it is necessary to determine the target text information to be revised in the historical key text "1881234****" based on the initial key text "1239". If the target text information to be revised is "1234", the initial key text is used to revise the target text information to obtain the target key text.

[0101] In actual applications, when the correction category is full update, the target text to be corrected is the historical key text; when the correction category is full clear, the target text to be corrected is the historical key text; when the correction category is additional content, the empty character information in the text information to be processed is determined according to the correction text information, for example, the initial key text is "1234" and the text information to be processed is "188H1H2H3H4H5H6H7H8", then the target text to be processed is "H1H2H3H4"; when the correction category information is unchanged, the target text to be corrected can be the historical key text; it should be noted that when the correction category information is partial update, the target text to be corrected is a text information in the historical key text with the same number of characters as the initial key text, and the representation of all bits of the entire historical key text is extracted, and each bit of the historical key text is predicted according to the initial key text and the target text to be corrected, thereby generating the target text information.

[0102] In a specific embodiment of the present specification, following the above example, based on the correction category information "partial update" and the initial key text "1239", the target text to be corrected is determined to be "1234" in the historical key text "1881234****", and the historical key text is predicted for each bit of content based on the initial key text and the target text to be corrected. The prediction result is "1881239****", and the target key text is "1881239****".

[0103] Specifically, determining the target text to be revised in the historical key texts according to the revision category information and the initial key text includes:

[0104] Determine at least one text to be revised in the historical key texts according to the revision category information and the initial key text;

[0105] Calculating the correction similarity between the initial key text and each text to be corrected;

[0106] The target text to be corrected is determined according to the correction similarity corresponding to each text to be corrected.

[0107] Among them, the correction similarity of the text to be corrected can be understood as the similarity between the text to be corrected and the initial key text. The higher the correction similarity, the greater the probability of correction in this round. According to the correction similarity corresponding to each text to be corrected, one with the highest probability of correction in this round of text processing can be selected and used as the target text to be corrected, and subsequent correction operations can be performed.

[0108] In actual applications, when the correction category information is fully updated, fully cleared, unchanged, or added, there is only one text to be corrected, so the step of calculating the correction similarity can be omitted and the target text to be corrected can be directly determined. When the correction category information is partially updated, the historical key text includes multiple texts to be corrected. It is necessary to calculate the correction similarity corresponding to each text to be corrected based on the initial key text and each text to be corrected, and determine which text to be corrected is the target text to be corrected based on the correction similarity.

[0109] In a specific embodiment of the present specification, when the correction category information is a partial update and the initial key text is "1239", the historical key text "1881234****" includes multiple texts to be corrected, namely "1881, 8812, 8123, 1234, 234*, 34**, ****", and the correction similarity between the initial key text and each text to be corrected is calculated respectively. The calculation result is that the correction similarity of the text information to be corrected "1234" is the highest, then the text information to be corrected "1234" is determined to be the target text information to be corrected.

[0110] Step 108: Determine a reply template corresponding to the text to be processed according to the target key text.

[0111] The reply template can be understood as a dialogue template for replying to the user. For example, when the text to be processed corresponding to the user's expression content is "Hello", the reply template is "Hello".

[0112] In actual applications, different texts to be processed have different corresponding reply templates.

[0113] In actual implementation, when the machine side collects new slot information, that is, after generating the target key text, it needs to make a clarification prediction for the target key text, that is, corresponding to the above clarification type, the clarification prediction is characterized by further confirmation of the target key text, and the next step of communication and confirmation with the user is required. After the confirmation is completed, it will enter the confirmation type or end type.

[0114] In one embodiment of the present specification, the text to be processed is "My number is 1881234****", and the target key text is "1881234****", then the corresponding reply template is "Please confirm that your number is **********".

[0115] In another embodiment of the present specification, the text to be processed is "My name is Zhang Yang" and the target key text is "Zhang Yang". The corresponding reply template at this time is "Is x y?", wherein x represents "Zhang or Yang" in the target key text, and y is the value corresponding to each character in the target key text "Zhang of Zhang Yang, Yang of Zhang Yang".

[0116] Specifically, determining a reply template corresponding to the text to be processed according to the target key text includes:

[0117] Acquire a response type corresponding to the target key text according to the target key text;

[0118] A target reply template is searched in a resource database according to the reply type.

[0119] Among them, the reply type can be understood as the reply type corresponding to the reply template. The reply template will be different depending on the text type corresponding to the text to be processed. The reply template is also divided into 8 reply types, as shown below:

[0120] Inquiry type: For example, when the text to be processed is "I want to recharge my phone bill", the reply template corresponding to the text to be processed is the inquiry type, and the machine side will generate a reply text "What is your phone number?" according to the corresponding type of reply template;

[0121] Continue type: For example, when the text to be processed is "My number is 188", the reply template corresponding to the text to be processed is the continue type, then the machine side will generate the reply text "What else" according to the corresponding type of reply template;

[0122] Clarification type: For example, when the text to be processed is "My name is Zhang San", the reply template corresponding to the text to be processed is the clarification type, then the machine side will generate a reply text "Excuse me, is this Zhang the same as Zhang the archer?" according to the reply template of the corresponding type;

[0123] Modification type: For example, when the text to be processed is "No, I said it wrong", and the reply template corresponding to the text to be processed is modification lacey, the machine side will generate a reply text "Excuse me, what is wrong?" according to the corresponding type of reply template;

[0124] Reset type: For example, when the text to be processed is "My number is 188, but it may be 183. Let me think about it later", the reply template corresponding to the text to be processed is the reset type. The machine side will generate a reply text "Let's talk about it again" according to the corresponding type of reply template.

[0125] Rejection type: For example, when the text to be processed is "Do you know who I am?", the reply template corresponding to the text to be processed is of the rejection type, and the machine side will generate a reply text "Sorry, I don't know" according to the corresponding type of reply template;

[0126] Confirmation type: For example, when the text to be processed is "Yes, the length of the bow is Zhang", the reply template corresponding to the text to be processed is the confirmation type, and the machine side will generate a reply text "Information Confirmation" according to the corresponding type of reply template;

[0127] End type: For example, when the text to be processed is "Confirmed", it means that the slot information collection is complete, and the reply template corresponding to the text to be processed is the end type. The machine side will generate a reply text "OK, thank you" according to the corresponding type of reply template.

[0128] In certain cases, when the reply type can be directly determined based on the text to be processed, the system does not need to determine the reply type based on the target key text. For example, when the user says "I want to recharge my phone bill", the system can directly reply "What is your phone number?" This makes the entire system well interpretable and intervention-friendly. It should be noted that the eight types provided in the embodiments of this specification can include dialogue replies in most application scenarios, but those skilled in the art should know that the reply template is not limited to the eight types provided in this specification, and the type corresponding to the specific reply template can be determined according to actual conditions.

[0129] The resource database can be understood as a database that stores resource knowledge in the system. The resource database stores information interpretations of Chinese characters and letters and corresponding reply templates for each reply type. In actual applications, the data structure for storing information interpretations of Chinese characters, letters, etc. is key-value, where each Chinese character or letter is a key and the value is a corresponding explanation list, for example, "key = Zhang, value = Zhang of publicity, Zhang of opening".

[0130] In one embodiment of the present specification, the text to be processed is "My name is Zhang Yang", the target key text is "Zhang Yang", the reply type corresponding to the target key text is determined to be a clarification type, and the target reply template corresponding to the text to be processed is searched in the resource database according to the clarification type, and the target reply template is "Is x y?".

[0131] In another embodiment of the present specification, the text to be processed is "Yes, my name is Zhang Yang", the target key text is "Zhang Yang", the reply type corresponding to the target key text is determined to be a confirmation type, and the target reply template corresponding to the text to be processed is searched in the resource database according to the confirmation type, and the target reply template is "The information has been confirmed".

[0132] Step 110: Generate a reply text corresponding to the text to be processed based on the reply template and the target key text.

[0133] The reply text can be understood as the dialogue text in which the machine responds to the user's statement. For example, when the text to be processed is "Hello", the corresponding reply text is "Hello". When the text to be processed is "My name is Zhang Yang", the corresponding reply text is "Is Zhang the same as Zhang in opening, and Yang the same as Yang in the sun?"

[0134] In actual applications, after determining the reply template and the target key text, the system can generate a reply text corresponding to the text to be processed and have a conversation with the user, so that subsequent communication can proceed normally.

[0135] In one embodiment of the present specification, the reply template is "Is x the same as y?" and the target key text is "Zhang Yang." The reply text is "Is Zhang the same as opening? Is Yang the same as sun?" The user will continue to answer "No, it's Yang, which means sailing." At this time, the system will enter the next round of information extraction.

[0136] Specifically, generating a reply text corresponding to the to-be-processed text based on the reply template and the target key text includes:

[0137] In the case where the reply type is a to-be-confirmed type, determining that the reply template corresponding to the target key text is a to-be-confirmed template;

[0138] Generate the response text corresponding to the text to be processed according to the template to be confirmed and the target key text.

[0139] Among them, the type to be confirmed can be understood as the clarification type, that is, the type that needs to confirm the target key text. For example, when the target key text is "Zhang Yang", it is necessary to confirm with the user whether these two characters are correctly recognized, so as to correctly fill in the slot to complete the correct extraction of the slot information. The template to be confirmed can be understood as the clarification template. Different target key texts may correspond to different clarification templates. For example, when the target key text is "1881234****", the template to be confirmed is "Please confirm whether it is ***********", and when the target key text is "Zhang San", the template to be confirmed is "Is x y?".

[0140] In practical applications, different target key texts correspond to different clarification templates. In some cases, depending on the content of the clarification, the same target key text may also correspond to different clarification templates. For example, for the target key text "Zhang San", when it is necessary to clarify and confirm "Zhang" and "San", the template to be confirmed is "Is x y?", and when it is necessary to confirm the whole "Zhang San", the template to be confirmed is "Please confirm that your name is **".

[0141] In an embodiment of this specification, when the response type is the type to be confirmed, it is determined that the response template corresponding to the target key text "Zhang San" is the template to be confirmed, and the template to be confirmed is "Is x y?". Generate the response text corresponding to the text to be processed according to the template to be confirmed and the target key text, and the response text is "Is Zhang the Zhang of Zhang Kai? Is San the San of the number three?".

[0142] Specifically, determining the response template corresponding to the type to be confirmed as the template to be confirmed includes:

[0143] Calculate the value to be confirmed of each initial keyword in the target key text;

[0144] Judge whether each initial keyword needs to be confirmed according to the value to be confirmed of each initial keyword;

[0145] When each initial keyword does not need to be confirmed, determine the template to be confirmed as the key text confirmation template;

[0146] When at least one initial keyword needs to be confirmed, determine the template to be confirmed as the keyword confirmation template.

[0147] The pending confirmation value can be understood as a value that indicates whether each initial keyword is correct. The pending confirmation value is 0 or 1. When the pending confirmation value of an initial keyword is 0, it indicates that the initial keyword has been confirmed without any problem; when the pending confirmation value of an initial keyword is 1, it indicates that the initial keyword has not yet been confirmed to have any problem, and further communication and confirmation with the user is required. Therefore, the type of the pending confirmation template corresponding to the target key text can be determined based on the pending confirmation value of each initial keyword in the target key text.

[0148] In actual applications, when there are initial keywords in the target key text that need to be confirmed, a keyword confirmation template is used, that is, "Is x y?"; when there are no initial keywords in the target key text that need to be confirmed, the target key text can be confirmed as a whole, and a key text confirmation template is used, that is, "Please confirm if it is ***."

[0149] In one embodiment of the present specification, the target key text is "Zhang San", and the pending confirmation value of each initial keyword is calculated. The pending confirmation value of "Zhang" is 0, and the pending confirmation value of "San" is 0. Then, the pending confirmation template corresponding to the target key text is confirmed as the key text confirmation template, and the key text confirmation template is "Please confirm if it is **?".

[0150] In another embodiment of the present specification, the target key text is "Zhang San", and the pending confirmation value of each initial keyword is calculated. The pending confirmation value of "Zhang" is 1, and the pending confirmation value of "San" is 0. Then, the pending confirmation template corresponding to the target key text is confirmed as the keyword confirmation template, and the key text confirmation template is "Is x y?".

[0151] Specifically, generating a reply text corresponding to the to-be-processed text according to the to-be-confirmed template and the target key text includes:

[0152] In the case where the template to be confirmed is a key text confirmation template, generating a reply text corresponding to the text to be processed according to the target key text and the key text confirmation template;

[0153] In the case that the template to be confirmed is a keyword confirmation template, a reply text corresponding to the text to be processed is generated according to the at least one initial keyword and the keyword confirmation template.

[0154] In actual applications, the same target key text can generate different response texts under different response templates.

[0155] In one embodiment of the present specification, following the above example, when the template to be confirmed is a key text confirmation template, a reply text "Please confirm that it is Zhang San?" is generated based on the target key text "Zhang San" and the key text confirmation template "Please confirm that it is **?".

[0156] In another embodiment of this specification, following the previous example, when the template to be confirmed is a keyword confirmation template, according to the target key text "Zhang San" and the key text confirmation template "Is x y?", the generated reply text is "Is Zhang the Zhang in 'Zhang Kai'?"

[0157] Specifically, generating the reply text corresponding to the text to be processed according to the at least one initial keyword and the keyword confirmation template includes:

[0158] Determine the target keyword among the at least one initial keyword;

[0159] Search for the target key value corresponding to the target keyword in the resource database according to the target keyword;

[0160] Generate an initial reply text according to the keyword confirmation template, the target keyword, and the target key value;

[0161] Generate the reply text corresponding to the text to be processed according to the initial reply text corresponding to each initial keyword.

[0162] Among them, the target keyword can be understood as the target keyword selected from the initial keywords in the target key text. For example, in the target key text "Zhang San", there are initial keywords "Zhang" and "San", and "Zhang" or "San" can be selected as the target keyword. The target key value can be understood as the value in the interpretation list of Chinese characters or letters saved in the resource database. For example, when the target keyword is "Zhang", the target key value found in the resource database is "the Zhang in 'Zhang Kai', the Zhang in 'Kua Zhang'".

[0163] The initial reply text can be understood as the initial reply text corresponding to one target keyword, and the reply text can be understood as the reply text generated by combining all the initial reply texts. For example, if the initial reply texts are "Is Zhang the Zhang in 'Zhang Kai'?" and "Is San the San in 'Yi Er San'?", the reply text is "Is Zhang the Zhang in 'Zhang Kai'? Is San the San in 'Yi Er San'?".

[0164] In practical applications, after finding the target key value corresponding to the target keyword in the resource database, the target key value can be selected in order or randomly.

[0165] In one embodiment of this specification, following the previous example, the target key text is "Zhang San", the confirmed initial keywords are "Zhang" and "San", the determined target keyword is "Zhang", the target key value corresponding to the target keyword found in the resource database is "the Zhang in 'Zhang Kai', the Zhang in 'Kua Zhang'", according to the keyword confirmation template "Is x y?", the target keyword "Zhang", and the target key value "the Zhang in 'Kua Zhang'", generate the initial reply text, and finally the generated reply text corresponding to the text to be processed is "Is Zhang the Zhang in 'Kua Zhang'?".

[0166] Specifically, generating an initial reply text according to the keyword confirmation template, the target keyword, and the target key value includes:

[0167] The target keyword and the target key value are filled into the keyword confirmation template to generate an initial reply text.

[0168] In actual applications, when the keyword confirmation template is "Is x y?", the target keyword and the corresponding target key value will be filled into the template to generate the initial response text.

[0169] In one embodiment of the present specification, following the above example, the target keyword "Zhang" is filled into the x part of the keyword confirmation template, and the target key value "exaggerated Zhang" is filled into the y part of the keyword confirmation template to generate the initial reply text "Zhang is an exaggerated Zhang?"

[0170] The present specification provides an information extraction method, including: obtaining a text to be processed and a historical reference text corresponding to the text to be processed, and determining the text type corresponding to the text to be processed; when the text type is information extraction, extracting the initial key text in the text to be processed; generating a target key text according to the initial key text and the historical reference text; determining a reply template corresponding to the text to be processed according to the target key text; and generating a reply text corresponding to the text to be processed based on the reply template and the target key text. By extracting the initial key text from the text to be processed, and generating the target key text to be extracted this time according to the initial key text and the historical reference text, key information can be extracted from multiple rounds of interactive communication. In addition, the reply template corresponding to the text to be processed can be determined based on the extracted target key text, and the reply text corresponding to the text to be processed can be generated based on the reply template and the target key text, and the reply text for feedback and user dialogue can be automatically generated, bringing an intelligent dialogue experience to the user.

[0171] In practical applications, the information extraction method provided in this specification can also be implemented through a pre-trained model. In the embodiment of this specification, the information extraction method includes four processing parts: dialogue understanding, state update, dialogue strategy and dialogue generation. The specific architecture is as follows Figure 2 As shown, Figure 2The schematic diagram of the architecture of a human-computer dialogue system provided by an embodiment of the present specification is shown, wherein the human-computer dialogue system includes four processing units, namely a dialogue understanding unit, a state updating unit, a strategy prediction unit, and a dialogue generation unit. After the user initiates a dialogue to the machine side, the machine side needs to understand the dialogue first, that is, it needs to parse the user's expression, extract key information, and update the state. After the state is updated, the machine side will update the update degree of the state to select the dialogue strategy. For example, if the state collection is completed, the next step can be carried out; for another example, if the state collection is not completed, the user will continue to be asked; different situations correspond to different dialogue strategies, and the dialogue that the machine side feeds back to the user is determined according to the selection of the dialogue strategy and sent to the user.

[0172] In actual implementation, in the dialogue understanding unit, we will mark some texts to be processed and the corresponding text types as training data, and use a pre-trained model such as BERT or Roberta to train the dialogue understanding model. After the system receives the text to be processed, it inputs the text to be processed into the dialogue understanding model, and uses the dialogue understanding model to predict the text type of the text to be processed. If the text type is "irrelevant", it means that the user's current round of dialogue is not in the scenario of complex information collection, and it directly returns to the initial state for other modules of the human-computer dialogue system to process.

[0173] In the state update unit, because we need to model the update process of complex slot information, we use a non-autoregressive model to model it. For details, see Figure 3 , Figure 3 This is a framework diagram of a state update model provided by an embodiment of the present specification, wherein, in actual applications, after obtaining the text to be processed and the historical reference text, all of them need to be input into the state update model, so data preprocessing can be performed on the processing text and the historical reference text information to generate a sequence of text to be processed. Specifically, the data preprocessing includes text segmentation, slot information processing, sequence filling, and special word filling. After data preprocessing, the generated sequence of text to be processed is input into the state update model, and the state update model outputs the target key text.

[0174] In the strategy prediction unit, the system response strategy is predicted based on the updated target key text, historical reference text, and text to be processed, that is, the corresponding response template is determined. Figure 4 , Figure 4It is a schematic diagram of the framework of a policy prediction model provided by an embodiment of this specification. Among them, the text sequence generated based on the target key text, historical reference text, and text to be processed is input into the policy prediction model to predict the clarification bit for each keyword in the target key text. When the prediction for this part is 0, it indicates that there is no problem confirmed. When the prediction is 1, it indicates that further communication and confirmation with the user are required. The policy prediction model will then output an inquiry policy and return the corresponding response text to the user. Based on the input text sequence, the policy prediction model will output the corresponding prediction result, and the prediction result is the response policy. When the model predicts that the collection is complete, it means that the information collection ends, and the entire collected target key text is returned.

[0175] In the dialogue generation unit, the corresponding response template can be determined according to the response policy determined in the policy prediction unit to generate the system response template. When the response type is the clarification type, it is necessary to determine the keywords to be clarified through the clarification bit, query the corresponding key values in the resource database, and fill them into the response template to generate the response text.

[0176] The following combines the attached Figure 5 , taking the application of the information extraction method provided in this specification in collecting license plate numbers as an example, to further illustrate the information extraction method. Among them, Figure 5 shows the processing process flowchart of an information extraction method provided by an embodiment of this specification. The specific steps include step 502 to step 512.

[0177] Step 502: Obtain the text to be processed and the historical reference text corresponding to the text to be processed, and determine the text type corresponding to the text to be processed.

[0178] In an embodiment of this specification, the text to be processed obtained is "Is it Su D", the historical reference text is "Please state your license plate number. Su D12345. Your license plate number is Su B12345", the historical key text is "Su B12345", and the text type corresponding to the text to be processed is the information extraction type.

[0179] Step 504: Extract the initial key text from the text to be processed.

[0180] In an embodiment of this specification, the initial key text in the text to be processed is extracted, and the initial key text is "Su D".

[0181] Step 506: Correct the historical key text in the historical reference text according to the initial key text to obtain the target key text.

[0182] In an embodiment of this specification, according to the initial key text "Su D", the historical key text "Su B12345" is corrected to obtain the target key text "Su D12345".

[0183] Step 508: Obtain the response type corresponding to the target key text according to the target key text.

[0184] In an embodiment of this specification, according to the target key text "Su D12345", the response type corresponding to the target key text is obtained as the clarification type.

[0185] Step 510: Search for the target response template in the resource database according to the response type.

[0186] In an embodiment of this specification, according to the clarification type, the target response template is searched for in the resource database, and the target response template is "Excuse me, is it *******?"

[0187] Step 512: Generate the response text corresponding to the text to be processed according to the target response template and the target key text.

[0188] In an embodiment of this specification, according to the content of the target key text, it is filled into the target response template to generate the response text "Excuse me, is it Su D12345?"

[0189] An information extraction method applied to collect license plate numbers provided in this specification includes: obtaining the text to be processed and the historical reference text corresponding to the text to be processed, determining the text type corresponding to the text to be processed, extracting the initial key text in the text to be processed, correcting the historical key text in the historical reference text according to the initial key text to obtain the target key text, obtaining the response type corresponding to the target key text according to the target key text, searching for the target response template in the resource database according to the response type, and generating the response text corresponding to the text to be processed according to the target response template and the target key text. By extracting the initial key text from the text to be processed and generating the target key text to be extracted this time according to the initial key text and the historical reference text, it meets the requirement of extracting key information from multiple rounds of interactive communication. And it can also determine the response template corresponding to the text to be processed based on the extracted target key text, and generate the response text corresponding to the text to be processed based on the response template and the target key text, automatically generating the response text for feedback and user conversation, bringing an intelligent conversation experience to the user.

[0190] Corresponding to the above method embodiment, this specification also provides an embodiment of an information extraction device, Figure 6 showing the structural schematic diagram of an information extraction device provided in an embodiment of this specification. As Figure 6 shown, the device includes:

[0191] The acquisition module 602 is configured to acquire a text to be processed and a historical reference text corresponding to the text to be processed, and determine a text type corresponding to the text to be processed;

[0192] An extraction module 604 is configured to extract initial key text from the text to be processed when the text type is information extraction;

[0193] A first generating module 606 is configured to generate a target key text according to the initial key text and the historical reference text;

[0194] A determination module 608 is configured to determine a reply template corresponding to the to-be-processed text according to the target key text;

[0195] The second generating module 610 is configured to generate a reply text corresponding to the to-be-processed text based on the reply template and the target key text.

[0196] Optionally, the first generating module 606 is further configured to:

[0197] The historical key text in the historical reference text is modified according to the initial key text to obtain the target key text.

[0198] Optionally, the first generating module 606 is further configured to:

[0199] Determining revision category information according to the initial key text and the historical reference text;

[0200] The historical key text in the historical reference text is modified based on the modification category information and the initial key text to obtain a target key text.

[0201] Optionally, the first generating module 606 is further configured to:

[0202] Calculating a correction category weight corresponding to each correction category information in a correction category information set according to the initial key text and the historical reference text, wherein the correction category information set includes at least two types of correction category information;

[0203] The target correction category information is determined in the correction category information set according to the correction category weight corresponding to each correction category information.

[0204] Optionally, the first generating module 606 is further configured to:

[0205] Sorting each type of correction category information in the correction category information set in descending order according to the correction category weight corresponding to each correction category;

[0206] The target correction category information is determined according to the sorting result.

[0207] Optionally, the first generating module 606 is further configured to:

[0208] Determine a target text to be revised in the historical key texts according to the revision category information and the initial key text;

[0209] The target text information to be revised is revised according to the initial key text to obtain the target key text.

[0210] Optionally, the first generating module 606 is further configured to:

[0211] Determine at least one text to be revised in the historical key texts according to the revision category information and the initial key text;

[0212] Calculating the correction similarity between the initial key text and each text to be corrected;

[0213] The target text to be corrected is determined according to the correction similarity corresponding to each text to be corrected.

[0214] Optionally, the determining module 608 is further configured to:

[0215] Acquire a response type corresponding to the target key text according to the target key text;

[0216] A target reply template is searched in a resource database according to the reply type.

[0217] Optionally, the second generating module 610 is further configured to:

[0218] In the case where the reply type is a to-be-confirmed type, determining that the reply template corresponding to the target key text is a to-be-confirmed template;

[0219] Generate a reply text corresponding to the text to be processed according to the template to be confirmed and the target key text.

[0220] Optionally, the second generating module 610 is further configured to:

[0221] Calculating a value to be confirmed for each initial keyword in the target key text;

[0222] Determine whether each initial keyword needs to be confirmed according to the to-be-confirmed value of each initial keyword;

[0223] In the case that each initial keyword does not need to be confirmed, determining the template to be confirmed as a key text confirmation template;

[0224] In the case where at least one initial keyword needs to be confirmed, the template to be confirmed is determined to be a keyword confirmation template.

[0225] Optionally, the second generating module 610 is further configured to:

[0226] In the case where the template to be confirmed is a key text confirmation template, generating a reply text corresponding to the text to be processed according to the target key text and the key text confirmation template;

[0227] In the case that the template to be confirmed is a keyword confirmation template, a reply text corresponding to the text to be processed is generated according to the at least one initial keyword and the keyword confirmation template.

[0228] Optionally, the second generating module 610 is further configured to:

[0229] determining a target keyword among the at least one initial keyword;

[0230] Searching the resource database for a target key value corresponding to the target keyword according to the target keyword;

[0231] Generate an initial reply text according to the keyword confirmation template, the target keyword, and the target key value;

[0232] Generate a reply text corresponding to the text to be processed according to the initial reply text corresponding to each initial keyword.

[0233] The information extraction device provided in this specification includes: an acquisition module, which is configured to acquire a text to be processed and a historical reference text corresponding to the text to be processed, and determine the text type corresponding to the text to be processed; an extraction module, which is configured to extract the initial key text in the text to be processed when the text type is information extraction; a first generation module, which is configured to generate a target key text according to the initial key text and the historical reference text; a determination module, which is configured to determine a reply template corresponding to the text to be processed according to the target key text; and a second generation module, which is configured to generate a reply text corresponding to the text to be processed based on the reply template and the target key text. By extracting the initial key text from the text to be processed, and generating the target key text to be extracted this time according to the initial key text and the historical reference text, key information can be extracted from multiple rounds of interactive communication. In addition, the reply template corresponding to the text to be processed can be determined based on the extracted target key text, and the reply text corresponding to the text to be processed can be generated based on the reply template and the target key text, and the reply text for feedback and user dialogue can be automatically generated, bringing intelligent dialogue experience to users.

[0234] The above is a schematic scheme of an information extraction device of this embodiment. It should be noted that the technical scheme of the information extraction device and the technical scheme of the above information extraction method belong to the same concept, and the details not described in detail in the technical scheme of the information extraction device can be referred to the description of the technical scheme of the above information extraction method.

[0235] Figure 7 The structure block diagram of a computing device 700 provided according to an embodiment of the present specification is shown. The components of the computing device 700 include but are not limited to a memory 710 and a processor 720. The processor 720 is connected to the memory 710 via a bus 730, and the database 750 is used to store data.

[0236] The computing device 700 also includes an access device 740 that enables the computing device 700 to communicate via one or more networks 760. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 740 may include one or more of any type of network interface (e.g., a network interface card (NIC)) whether wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a World Wide Interoperability for Microwave Access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, a near field communication (NFC) interface, and the like.

[0237] In one embodiment of the present specification, the above components of the computing device 700 and Figure 7 Other components not shown in the figure may also be connected to each other, for example, via a bus. It should be understood that Figure 7 The computing device structure block diagram shown is only for the purpose of illustration, and is not intended to limit the scope of this specification. Those skilled in the art can add or replace other components as needed.

[0238] The computing device 700 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smart phone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or PC. The computing device 700 may also be a mobile or stationary server.

[0239] When the processor 720 executes the computer instructions, the steps of the information extraction method are implemented.

[0240] The above is a schematic scheme of a computing device of this embodiment. It should be noted that the technical scheme of the computing device and the technical scheme of the above information extraction method belong to the same concept, and the details not described in detail in the technical scheme of the computing device can be referred to the description of the technical scheme of the above information extraction method.

[0241] An embodiment of the present specification further provides a computer-readable storage medium storing computer instructions, which implement the steps of the information extraction method as described above when executed by a processor.

[0242] The above is a schematic scheme of a computer-readable storage medium of this embodiment. It should be noted that the technical scheme of the storage medium and the technical scheme of the above information extraction method belong to the same concept, and the details not described in detail in the technical scheme of the storage medium can be referred to the description of the technical scheme of the above information extraction method.

[0243] An embodiment of the present specification further provides a computer program, wherein when the computer program is executed in a computer, the computer is caused to execute the steps of the above-mentioned information extraction method.

[0244] The above is a schematic scheme of a computer program of this embodiment. It should be noted that the technical scheme of the computer program and the technical scheme of the above information extraction method belong to the same concept, and the details of the technical scheme of the computer program that are not described in detail can be found in the description of the technical scheme of the above information extraction method.

[0245] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0246] The computer instructions include computer program codes, which may be in source code form, object code form, executable files or some intermediate forms, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0247] It should be noted that, for the convenience of description, the aforementioned method embodiments are all described as a series of action combinations, but those skilled in the art should be aware that the embodiments of this specification are not limited by the order of the actions described, because according to the embodiments of this specification, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the embodiments of this specification.

[0248] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0249] The preferred embodiments of this specification disclosed above are only used to help explain this specification. The optional embodiments do not describe all the details in detail, nor do they limit the invention to only the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of the embodiments of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the embodiments of this specification, so that technicians in the relevant technical field can well understand and use this specification. This specification is only limited by the claims and their full scope and equivalents.

Claims

1. An information extraction method, comprising: Obtaining a text to be processed and a historical reference text corresponding to the text to be processed, and determining the text type corresponding to the text to be processed, wherein the historical reference text includes a historical conversation content text and a historical key text proposed in the previous round, the historical conversation content text is a text converted from the conversation content before the text to be processed, and the historical key text is the slot information extracted by the machine side according to the previous round of conversation; In the case where the text type is information extraction, extracting initial key text from the text to be processed; Generating a target key text according to the initial key text and the historical reference text, wherein the target key text is obtained based on a correction category weight corresponding to correction category information, and the correction category information is determined based on the initial key text and the historical reference text; Determine a reply template corresponding to the text to be processed according to the target key text; Generate a reply text corresponding to the text to be processed based on the reply template and the target key text.

2. The method according to claim 1, generating a target key text according to the initial key text and the historical reference text, comprising: The historical key text in the historical reference text is modified according to the initial key text to obtain the target key text.

3. The method according to claim 2, wherein the historical key text in the historical reference text is corrected according to the initial key text, comprising: Determining revision category information according to the initial key text and the historical reference text; The historical key text in the historical reference text is modified based on the modification category information and the initial key text to obtain a target key text.

4. The method according to claim 3, determining the revision category information according to the initial key text and the historical reference text, comprising: Calculating a correction category weight corresponding to each correction category information in a correction category information set according to the initial key text and the historical reference text, wherein the correction category information set includes at least two types of correction category information; The target correction category information is determined in the correction category information set according to the correction category weight corresponding to each correction category information.

5. The method according to claim 4, determining the target correction category information in the correction category information set according to the correction category weight corresponding to each correction category information, comprising: Sorting each type of correction category information in the correction category information set in descending order according to the correction category weight corresponding to each correction category; The target correction category information is determined according to the sorting result.

6. The method according to claim 3, wherein the historical key text in the historical reference text is corrected based on the correction category information and the initial key text to obtain the target key text, comprising: Determine a target text to be revised in the historical key texts according to the revision category information and the initial key text; The target text information to be revised is revised according to the initial key text to obtain the target key text.

7. The method according to claim 6, wherein the target text to be revised is determined in the historical key text according to the revision category information and the initial key text, comprising: Determine at least one text to be revised in the historical key texts according to the revision category information and the initial key text; Calculating the correction similarity between the initial key text and each text to be corrected; The target text to be corrected is determined according to the correction similarity corresponding to each text to be corrected.

8. The method according to claim 1, determining the reply template corresponding to the to-be-processed text according to the target key text, comprises: Acquire a response type corresponding to the target key text according to the target key text; A target reply template is searched in a resource database according to the reply type.

9. The method according to claim 8, generating a reply text corresponding to the to-be-processed text based on the reply template and the target key text, comprises: In the case where the reply type is a to-be-confirmed type, determining that the reply template corresponding to the target key text is a to-be-confirmed template; Generate a reply text corresponding to the text to be processed according to the template to be confirmed and the target key text.

10. The method according to claim 9, determining that the reply template corresponding to the type to be confirmed is the template to be confirmed, comprises: Calculating a value to be confirmed for each initial keyword in the target key text; Determine whether each initial keyword needs to be confirmed according to the to-be-confirmed value of each initial keyword; In the case that each initial keyword does not need to be confirmed, determining the template to be confirmed as a key text confirmation template; In the case where at least one initial keyword needs to be confirmed, the template to be confirmed is determined to be a keyword confirmation template.

11. The method according to claim 10, generating a reply text corresponding to the to-be-processed text according to the to-be-confirmed template and the target key text, comprising: In the case where the template to be confirmed is a key text confirmation template, generating a reply text corresponding to the text to be processed according to the target key text and the key text confirmation template; In the case that the template to be confirmed is a keyword confirmation template, a reply text corresponding to the text to be processed is generated according to the at least one initial keyword and the keyword confirmation template.

12. The method according to claim 11, generating a reply text corresponding to the to-be-processed text according to the at least one initial keyword and the keyword confirmation template, comprises: determining a target keyword among the at least one initial keyword; Searching the resource database for a target key value corresponding to the target keyword according to the target keyword; Generate an initial reply text according to the keyword confirmation template, the target keyword, and the target key value; Generate a reply text corresponding to the text to be processed according to the initial reply text corresponding to each initial keyword.

13. A computing device, comprising a memory, a processor, and computer instructions stored in the memory and executable on the processor, wherein the processor implements the steps of the method according to any one of claims 1 to 12 when executing the computer instructions.

14. A computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions, when executed by a processor, implement the steps of the method according to any one of claims 1 to 12.

Citation Information

Patent Citations

  • Method and device for modifying number, storage medium, and electronic device

    CN107622769A

  • Man-machine question and answer method, device and equipment based on semantic parsing and storage medium

    CN109885810A

  • Voice interaction method and device and terminal equipment

    CN111428483A