A real estate industry dialogue intent recognition method and device
By decomposing long dialogue texts and fine-tuning a general text pre-trained model, and combining it with a small sample dataset to generate an intent recognition model, the problem of manual intervention and manpower input in dialogue intent recognition in the real estate industry is solved, and efficient dialogue intent recognition and summary generation are achieved.
Patent Information
- Application Number
- CN202211489516.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-25
- Publication Date
- 2026-01-20
- Estimated Expiration
- 2042-11-25
AI Technical Summary
Existing mainstream intent recognition methods rely on manual intervention or human resources, making them difficult to apply to complex dialogue intent recognition scenarios in the real estate industry.
By decomposing long dialogue texts to generate a set of short dialogue texts, fine-tuning a general text pre-trained model, and combining it with a small sample dataset to generate an intent recognition model, dialogue intent recognition is achieved through deep learning and word extraction.
It reduces the human input required for manual intervention and labeled datasets, improves the accuracy and efficiency of dialogue intent recognition in the real estate industry, and enables the automatic generation of dialogue intent summaries.
Smart Images

Figure CN116050422B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of natural language processing technology, and in particular to a method and apparatus for recognizing dialogue intent in the real estate industry. Background Technology
[0002] Intent recognition refers to analyzing users' core needs. Currently, in the real estate industry, intent recognition is mainly based on tag recognition. Extracting user intent from dialogue text data has become a breakthrough in improving enterprises' customer insight capabilities. At present, text intent recognition technology is mostly used in search recommendations, daily communication, or customer Q&A scenarios. In the real estate industry, the introductory text from sales consultants accounts for a large proportion of dialogue text. Accurately obtaining user intent is a significant challenge. Accurate intent recognition can effectively improve the efficiency of sales consultants' user screening and the relevance of their communication, thereby increasing user interest and improving sales conversion rates.
[0003] There are four main types of common intent recognition methods: (1) rule template-based intent recognition method; (2) traditional machine learning-based method; (3) user operation log-based method; and (4) deep learning-based method.
[0004] Intent recognition methods based on rule templates are mainly suitable for intent recognition in short dialogue texts in simple scenarios. They require manual construction of rule templates and semantic category information, determining semantic categories through keyword matching, and then performing semantic parsing and inference based on the corresponding semantic rule templates to identify the user's intent. Methods based on traditional machine learning utilize statistical principles to learn the classification rules of annotated corpora and then perform category detection, making them suitable for massive and diverse text data. Methods based on user operation logs analyze user intent by analyzing user operation logs, but are only suitable for data scenarios with user interaction. Intent recognition methods based on deep learning utilize the feature extraction and modeling capabilities of neural networks to mine local correlations in dialogue text to achieve the purpose of intent recognition.
[0005] Each of the four methods has its advantages and disadvantages. The rule-based template-based intent recognition method has the strongest interpretability, high stability and accuracy, and is suitable for a single domain when the domain dictionary is good enough. However, this algorithm requires experts to formulate category rules based on predefined category labels, which is relatively complicated, requires a lot of manual intervention, and is not convenient to transfer to other domains. The traditional machine learning-based method can perform text intent classification relatively maturely, but with the diversification of text, it has gradually revealed that manually selected features have weak expressive power and cannot solve the problem of sparse matrices. It also has disadvantages such as relying on a large amount of labeled training data and high manual costs. The user operation log-based method is only applicable to data scenarios with user interaction and is difficult to use for unstructured text intent recognition. The deep learning-based method can effectively mine text features and avoid the redundancy or weak expressive power caused by manually selected features, but it also has problems such as weak cross-domain generalization ability and reliance on a large amount of manually labeled datasets.
[0006] In summary, rule-based template-based intent recognition methods require significant human intervention; traditional machine learning-based methods rely on manual feature selection; deep learning-based methods depend on large amounts of manually labeled datasets; and mainstream intent recognition methods are suitable for dialogues in normal scenarios but not for complex scenarios in the real estate industry. Summary of the Invention
[0007] Based on this, and in response to the aforementioned technical problems, a method and apparatus for recognizing dialogue intent in the real estate industry are provided to solve the technical problem that existing mainstream intent recognition methods rely on manual intervention or human input and are not suitable for recognizing dialogue intent in complex scenarios in the real estate industry.
[0008] To achieve the above objectives, this application provides the following technical solution:
[0009] Firstly, a method for identifying dialogue intent in the real estate industry includes:
[0010] S1. Decompose the long dialogue text generated by the speaker in the business scenario, and reconstruct the long dialogue text into multiple short dialogue texts based on the customer's speech to obtain a set of short dialogue texts.
[0011] S2 uses a general text corpus as training data to build and train a general text pre-trained model;
[0012] S3, perform intent category labeling on the short dialogue text set to generate a small sample dataset;
[0013] S4, the general text pre-training model is fine-tuned and trained using the small sample dataset to obtain the intent recognition model;
[0014] S5, input the short dialogue text of the intent to be identified into the intent recognition model, preprocess the model output, and output the intent recognition result.
[0015] Optionally, step S1 includes:
[0016] S11, Input long dialogue text generated by the business scenario;
[0017] S12, according to the different speakers, the long dialogue text is decomposed into a dialogue text list L1;
[0018] S13, locate the user's spoken text T1 in the dialogue text list L1, and determine whether the next sentence T2 after the located user's spoken text T1 is spoken by the real estate consultant.
[0019] S14. If it is determined that the next sentence T2 of the located user speech text T1 is a speech by a real estate consultant, determine whether the previous sentence of the located user speech text T1 is a speech by a real estate consultant, and execute S15-S16; if it is determined that the next sentence T2 of the located user speech text T1 is not a speech by a real estate consultant, directly execute S16.
[0020] S15, if it is determined that the previous sentence of the located user speech text T1 is a speech by a real estate consultant, the previous sentence of user speech text T1, user speech text T1, and the next sentence T2 of user speech text T1 are concatenated to form text T3; if it is determined that the previous sentence of the located user speech text T1 is not a speech by a real estate consultant, user speech text T1 and the next sentence T2 of user speech text T1 are concatenated to form text T3.
[0021] S16, S13-S15 are repeated continuously until the dialogue text list L1 is traversed;
[0022] S17, output the short dialogue text set L2 constructed from all texts T3.
[0023] Optionally, step S2 includes:
[0024] S21, Load the general text corpus;
[0025] S22, Obtain text from a general text corpus;
[0026] S23, Perform a MASK operation on random characters in the obtained text;
[0027] S24, use the base model to predict the text that has been masked;
[0028] S25. After the general domain corpus has been traversed, calculate the difference between the prediction result and the actual result.
[0029] S26. If the difference value does not reach the preset threshold, reload the general text corpus to continue training the model, and repeat steps S22-S26.
[0030] S27. If the difference value reaches the preset threshold, the training ends and a general text pre-trained model is obtained.
[0031] Alternatively, the underlying model may be the Albert model.
[0032] Optionally, step S3 includes:
[0033] S31, Obtain the short dialogue text set;
[0034] S32, Based on the user intent category provided by the business party, extract some samples from the short dialogue text set and import them into the tagging platform;
[0035] S33, the extracted samples are labeled manually;
[0036] S34, Assemble the dialogue text with the corresponding intent category;
[0037] S35 generates a small sample dataset with complete annotations.
[0038] Optionally, step S4 includes:
[0039] S41, Load the general text pre-trained model and the small sample dataset, serialize the intent categories of the dataset and construct training data;
[0040] S42, Define the optimizer and learning rate, and train the general text pre-training model using the training data;
[0041] S43: When the model evaluation index reaches the preset threshold, training ends and the intention recognition model is obtained; when the model evaluation index does not reach the preset threshold, repeat step S42 until the model evaluation index reaches the preset threshold.
[0042] Optionally, step S5 includes:
[0043] S51, serialize the short dialogue text of the intent to be identified, and input the serialized short dialogue text of the intent to be identified into the intent recognition model;
[0044] S52, perform argmax on the model output vector;
[0045] S53 deserializes the intent category and outputs the user intent recognition result.
[0046] Optionally, the method further includes:
[0047] Calculate the sum of word frequency, left and right information entropy H, and mutual information cohesion PMI in short dialogue text containing user intent; the formulas for calculating left and right information entropy H and mutual information cohesion PMI are as follows:
[0048] H(X)=-∑ x∈X p(x)log2p(x) (1)
[0049]
[0050] In formula (1), p(x) represents the probability of a word appearing, and X is a random variable; formula (2) represents the degree of uncorrelation between word x and word y when they are independent of each other.
[0051] The calculated sum is used as a metric to sort the phrases in the short dialogue text in descending order.
[0052] The first five phrases are selected as the preceding phrase texts to achieve text extraction.
[0053] Further, optionally, the method further includes generating an intent summary, specifically:
[0054] Obtain the summary template text set by the business party according to the intent category, segment the summary template text into sentences, and construct a template sentence list Q1;
[0055] The sentence text D1 in the template sentence list Q1 is continuously read, the sentence text D1 is input into the general text pre-training model, and the corresponding vector V1 of the sentence text D1 is output.
[0056] After traversing the template sentence list Q1, obtain the set C1 consisting of the corresponding vectors V1 of all sentence texts D1, and obtain the preceding phrase text;
[0057] Read each example phrase from the template sentence list Q1 to form a short sentence list Q2;
[0058] Continuously read the new sentence text D2 from the short sentence list Q2, input the new sentence text D2 into the general text pre-training model, and output the corresponding vector V2 of the new sentence text D2;
[0059] After traversing the short sentence list Q2, obtain the set C2 consisting of the corresponding vectors V2 of all new sentence texts D2, and calculate the similarity between each vector in set C2 and each vector in set C1.
[0060] If a phrase with a similarity reaching a preset threshold exists, the new sentence text D2 in the sentence list Q2 is used to replace the corresponding summary template sentence in the template sentence list Q1, and the unupdated sentences in the template sentence list Q1 are removed.
[0061] The template sentence list Q1 is concatenated to generate an intent summary text.
[0062] Secondly, a device for recognizing dialogue intent in the real estate industry includes:
[0063] The short dialogue text set generation module is used to decompose the long dialogue text generated in the business scenario according to the speaker, and reconstruct the long dialogue text into multiple short dialogue texts based on the customer's speech, so as to obtain a short dialogue text set.
[0064] The general text pre-training model training module is used to build and train a general text pre-training model using a general text corpus as training data.
[0065] The small sample dataset generation module is used to label the short dialogue text set with intent categories and generate a small sample dataset.
[0066] The intent recognition model generation module is used to fine-tune the general text pre-training model using the small sample dataset to obtain the intent recognition model.
[0067] The intent recognition module is used to input the short dialogue text of the intent to be recognized into the intent recognition model, preprocess the model output, and output the intent recognition result.
[0068] The present invention has at least the following beneficial effects:
[0069] This invention provides a method for recognizing dialogue intent in the real estate industry. It decomposes long dialogue texts generated in a business scenario based on the speaker's voice, obtaining a set of short dialogue texts using customer speech as a benchmark. A general text pre-training model is constructed and trained. Intent categories are labeled on the short dialogue text set to generate a small sample dataset. The general text pre-training model is then fine-tuned to obtain an intent recognition model. The short dialogue text to be recognized is input into the intent recognition model, and the intent recognition result is output. This method leverages natural language processing technology to reduce the impact of human intervention on the intent recognition effect in real estate dialogue texts. Fine-tuning the general text pre-training model effectively reduces the human effort required for labeling the dataset. By combining deep learning-based intent recognition with word extraction, it achieves dialogue intent recognition in real estate sales scenarios without requiring manual text feature selection.
[0070] The method provided by this invention can also automatically generate dialogue intent summaries by comparing text sentence vector similarity, based on a summary template framework. Attached Figure Description
[0071] Figure 1 A flowchart illustrating a method for recognizing dialogue intent in the real estate industry, provided as an embodiment of the present invention;
[0072] Figure 2 This is a schematic diagram illustrating the specific process of long dialogue decomposition in one embodiment of the present invention;
[0073] Figure 3 This is a schematic diagram of the specific process of an MLM task in one embodiment of the present invention;
[0074] Figure 4 This is a schematic diagram of the input and output of a pre-trained model in one embodiment of the present invention;
[0075] Figure 5 This is a schematic diagram illustrating the specific process of constructing a small sample dataset in one embodiment of the present invention;
[0076] Figure 6 This is a schematic diagram illustrating the fine-tuning training and model output process in one embodiment of the present invention.
[0077] Figure 7 This is a schematic diagram of the model effect in one embodiment of the present invention;
[0078] Figure 8 This is a schematic diagram illustrating the specific process of generating intent summaries in one embodiment of the present invention;
[0079] Figure 9 A module architecture block diagram of a real estate industry dialogue intent recognition device provided in one embodiment of the present invention;
[0080] Figure 10 This is an internal structural diagram of a computer device provided according to an embodiment of the present invention. Detailed Implementation
[0081] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0082] In one embodiment, a method for recognizing dialogue intent in the real estate industry is provided, which aims to extract high-value user intent from dialogue text information generated by business operations and supplement it with natural language processing algorithms to achieve user intent summarization.
[0083] The original business data consists of recorded conversations between real estate consultants and visitors, as well as transcripts of phone inquiries from sales offices. This invention's pre-data acquisition relies on China Jinmao's smart sales office platform and Jinmao Cloud Technology's text tagging model, and is stored on Jinmao Cloud Technology's big data processing platform. The text data is read in two-dimensional table format.
[0084] like Figure 1 As shown, the method includes the following steps:
[0085] S1. Based on the speaker's response to the business scenario, the long dialogue text is decomposed and reconstructed into multiple short dialogue texts, resulting in a set of short dialogue texts.
[0086] Furthermore, such as Figure 2 As shown, step S1 includes:
[0087] S11, Input long dialogue text generated by the business scenario;
[0088] S12, based on the different speakers, decompose the long dialogue text into a dialogue text list L1;
[0089] S13, locate the user's spoken text T1 in the dialogue text list L1, and determine whether the next sentence T2 after the located user's spoken text T1 is spoken by the real estate consultant.
[0090] S14. If it is determined that the next sentence T2 of the located user speech text T1 is a speech by a real estate consultant, determine whether the previous sentence of the located user speech text T1 is a speech by a real estate consultant, and execute S15-S16; if it is determined that the next sentence T2 of the located user speech text T1 is not a speech by a real estate consultant, directly execute S16.
[0091] S15, if it is determined that the previous sentence of the located user speech text T1 is a speech by a real estate consultant, the previous sentence of user speech text T1, user speech text T1, and the next sentence T2 of user speech text T1 are concatenated to form text T3; if it is determined that the previous sentence of the located user speech text T1 is not a speech by a real estate consultant, user speech text T1 and the next sentence T2 of user speech text T1 are concatenated to form text T3.
[0092] S16, repeat S13-S15 continuously until the dialogue text list L1 has been traversed;
[0093] S17, output the short dialogue text set L2 constructed from all texts T3.
[0094] In other words, the dialogue text generated in the business scenario contains statements from both the customer and the real estate consultant. The long dialogue is broken down based on the speakers, and using the customer's statements as a baseline, the long dialogue text is reconstructed into multiple shorter dialogue texts according to context rules. The specific decomposition process and reconstruction baseline are as follows: Figure 2 As shown.
[0095] S2 uses a general text corpus as training data to build and train a general text pre-trained model.
[0096] Furthermore, such as Figure 3 As shown, step S2 includes:
[0097] S21, Load the general text corpus;
[0098] S22, Obtain text from a general text corpus;
[0099] S23, Perform a MASK operation on random characters in the obtained text;
[0100] S24, use the base model to predict the text that has been masked;
[0101] S25. After the general domain corpus has been traversed, calculate the difference between the prediction result and the actual result.
[0102] S26. If the difference value does not reach the preset threshold, reload the general text corpus to continue training the model and repeat steps S22-S26.
[0103] S27. If the difference value reaches the preset threshold, the training ends and a general text pre-trained model is obtained.
[0104] In other words, to reduce the human effort required for annotating datasets and avoid manual selection of text features, this invention selects a publicly available, fully annotated text corpus as the training corpus to construct and train a general text pre-training model. The Albert model is used as the base model, and the training is performed with the MLM task as the objective. The MLM task process is as follows: Figure 3 As shown.
[0105] This method can be used to train a Chinese model that understands general text semantics (a semantic encoding model is available). Examples of the model's input and output are shown below. Figure 4 As shown.
[0106] S3, performs intent category labeling on a collection of short dialogue texts to generate a small sample dataset.
[0107] Furthermore, such as Figure 5 As shown, step S3 includes:
[0108] S31, retrieve the short dialogue text set;
[0109] S32, based on the user intent category provided by the business party, extracts a portion of the samples from the short dialogue text set and imports them into the tagging platform;
[0110] S33, the extracted samples are labeled manually;
[0111] S34, Assemble the dialogue text with the corresponding intent category;
[0112] S35 generates a small sample dataset with complete annotations.
[0113] In other words, the pre-trained model at this stage can only produce text encoding. A small amount of manpower is needed to label the intent categories of the text set L2 extracted in step S1 for fine-tuning the pre-trained model, enabling it to perform intent recognition tasks on dialogue text. The dataset construction process is as follows: Figure 5 As shown.
[0114] S4. The general text pre-trained model is fine-tuned using the constructed small sample dataset to obtain the intent recognition model.
[0115] Furthermore, such as Figure 6 As shown, step S4 includes:
[0116] S41, Load the general text pre-trained model and small sample dataset, serialize the intent categories of the dataset and construct training data;
[0117] S42, Define the optimizer and learning rate, and train the general text pre-trained model using training data;
[0118] S43: When the model evaluation index reaches the preset threshold, training ends and the intention recognition model is obtained; when the model evaluation index does not reach the preset threshold, repeat step S42 until the model evaluation index reaches the preset threshold.
[0119] S5. Input the short dialogue text of the intent to be identified into the intent recognition model, and preprocess the model output to obtain the output intent recognition result.
[0120] Furthermore, such as Figure 6 As shown, step S5 includes:
[0121] S51, serialize the short dialogue text of the intent to be identified, and input the serialized short dialogue text of the intent to be identified into the intent recognition model;
[0122] S52, perform argmax on the model output vector;
[0123] S53 deserializes the intent category and outputs the user intent recognition result.
[0124] The network model fine-tuned in step S4 is used for text intent recognition, and the model performance is as follows: Figure 7 As shown.
[0125] Furthermore, the method also includes a text phrase extraction step, specifically including:
[0126] Calculate the sum of word frequency, left and right information entropy H, and mutual information cohesion PMI in short dialogue text containing user intent; the formulas for calculating left and right information entropy H and mutual information cohesion PMI are as follows:
[0127] H(X)=-∑ x∈X p(x)log2p(x) (1)
[0128]
[0129] In formula (1), p(x) represents the probability of a word appearing, and X is a random variable. The higher the left and right information entropy, the richer the left and right collocations of a word. When a certain threshold is reached, the collocation can be identified as a new word. Formula (2) represents the degree of uncorrelation between word x and word y when they are independent of each other. The greater the correlation between the two, the higher the internal cohesion of the word.
[0130] The calculated sum is used as a metric to sort the phrases in the short dialogue text in descending order.
[0131] The first five phrases are selected as the preceding phrase texts to achieve text extraction.
[0132] This invention employs an algorithm based on mutual information and left and right information entropy to extract phrases from short dialogue texts containing user intent as the pre-text for intent summarization. The phrases are sorted in descending order by calculating the sum of word frequency, left and right information entropy H, and mutual information cohesion degree PMI in the text, and the top 5 are selected as the pre-text for subsequent steps.
[0133] Building upon this, the method also includes generating intent summaries, such as... Figure 8 As shown, specifically:
[0134] Obtain the summary template text set by the business party according to the intent category, segment the summary template text into sentences, and construct a template sentence list Q1;
[0135] Continuously read the sentence text D1 from the template sentence list Q1, input the sentence text D1 into the general text pre-training model, and output the corresponding vector V1 of the sentence text D1;
[0136] After traversing the template sentence list Q1, obtain the set C1 consisting of the corresponding vectors V1 of all sentence texts D1, and obtain the preceding phrase text;
[0137] Read each example phrase from the template sentence list Q1 and form a short sentence list Q2;
[0138] Continuously read new sentence text D2 from the short sentence list Q2, input the new sentence text D2 into the general text pre-training model, and output the corresponding vector V2 of the new sentence text D2;
[0139] After traversing the short sentence list Q2, obtain the set C2 consisting of the corresponding vectors V2 of all new sentence texts D2, and calculate the similarity between each vector in set C2 and each vector in set C1.
[0140] If a phrase with a similarity that reaches the preset threshold exists, the new sentence text D2 in the sentence list Q2 is used to replace the corresponding summary template sentence in the template sentence list Q1, and the unupdated sentences in the template sentence list Q1 are removed.
[0141] The template sentence list Q1 is concatenated to generate the intent summary text.
[0142] In other words, intent summarization is primarily based on the needs of the business stakeholders. The intent to be identified by the business is constructed into a sentence template. The phrases generated in the previous step are then compared to this sentence template using cosine similarity calculation. When the similarity reaches a threshold, the phrase is filled into the template. Finally, the redundant template text is preprocessed to complete the generation of the intent summary. The general process is as follows: Figure 8 As shown.
[0143] The aforementioned method for recognizing dialogue intent in the real estate industry decomposes long dialogue texts generated in a business scenario based on the speaker's voice, obtains a set of short dialogue texts based on customer speech, constructs and trains a general text pre-training model, labels the short dialogue text sets with intent categories to generate a small sample dataset, fine-tunes the general text pre-training model to obtain an intent recognition model, inputs the short dialogue texts to be recognized into the intent recognition model, and outputs the intent recognition result. This method leverages natural language processing technology to reduce the impact of human intervention on the intent recognition effect in real estate industry dialogue texts; fine-tunes the general language pre-training model to effectively reduce the human investment in labeling datasets; and uses a combination of deep learning-based intent recognition and word extraction to achieve dialogue intent recognition in real estate sales scenarios without requiring manual screening of text features.
[0144] The method provided in this embodiment improves the effectiveness of dialogue text intent recognition technology by combining a general corpus pre-trained model with phrase extraction when the domain-annotated text corpus is limited. Based on the summary template, the method realizes the automatic generation of dialogue intent summaries by comparing the similarity of text sentence vectors.
[0145] In summary, this method can reduce human intervention in the intent recognition process, avoid manual screening of text features, reduce the human investment in labeled datasets, and realize dialogue intent recognition in real estate sales scenarios.
[0146] It should be understood that, although Figure 1-8 The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order in which these steps are executed, and they can be performed in other orders. Figure 1-8 At least some of the steps in the process may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but may be executed at different times. The execution order of these steps or stages is not necessarily sequential, but may be executed in turn or alternately with other steps or at least some of the steps or stages in other steps.
[0147] In one embodiment, such as Figure 9 As shown, a device for recognizing dialogue intent in the real estate industry is provided, including the following program modules:
[0148] The short dialogue text set generation module 901 is used to decompose the long dialogue text generated in the business scenario according to the speaker, and reconstruct the long dialogue text into multiple short dialogue texts based on the customer's speech to obtain a short dialogue text set.
[0149] The general text pre-training model training module 902 is used to construct and train a general text pre-training model using a general text corpus as training corpus.
[0150] The small sample dataset generation module 903 is used to label short dialogue text sets with intent categories and generate small sample datasets.
[0151] The intent recognition model generation module 904 is used to fine-tune the training of a general text pre-training model using a small sample dataset to obtain the intent recognition model.
[0152] The intent recognition module 905 is used to input the short dialogue text of the intent to be recognized into the intent recognition model, preprocess the model output, and output the intent recognition result.
[0153] For specific limitations regarding a real estate industry dialogue intent recognition device, please refer to the limitations of a real estate industry dialogue intent recognition method described above, which will not be repeated here. Each module in the aforementioned real estate industry dialogue intent recognition device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0154] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 10 As shown, the computer device includes a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, carrier networks, NFC (Near Field Communication), or other technologies. When executed by the processor, the computer program implements a method for recognizing dialogue intent in the real estate industry. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad mounted on the computer device casing, or an external keyboard, touchpad, or mouse.
[0155] Those skilled in the art will understand that Figure 10 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0156] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program relating to all or part of the processes in the methods of the above embodiments.
[0157] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon relating to all or part of the processes in the methods of the above embodiments.
[0158] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, or optical storage, etc. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.
[0159] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0160] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1.A method for identifying a conversation intent in a real estate industry, the method comprising: The method comprises the following steps: S1, decomposing long dialogue text generated by a speaker in a business scenario to reconstruct the long dialogue text into a plurality of short dialogue texts based on customer speech to obtain a short dialogue text set; S2, using a general text corpus as a training corpus to construct and train a general text pre-training model; S3, performing intent category labeling on the short dialogue text set to generate a small sample data set; S4, fine-tuning the general text pre-training model using the small sample data set to obtain an intent recognition model; S5, inputting a short dialogue text to be recognized into the intent recognition model and preprocessing the model output to output an intent recognition result; Step S1 comprises: S11, inputting long dialogue text generated by a business scenario; S12, decomposing the long dialogue text into a dialogue text list (L1) according to different speakers; S13, locating user speech text (T1) in the dialogue text list (L1) and determining whether the next sentence (T2) of the located user speech text (T1) is a real estate consultant speech; S14, if it is determined that the next sentence (T2) of the located user speech text (T1) is a real estate consultant speech, it is determined whether the previous sentence of the located user speech text (T1) is a real estate consultant speech, and S15-S16 are executed; if it is determined that the next sentence (T2) of the located user speech text (T1) is not a real estate consultant speech, S16 is directly executed; S15, if it is determined that the previous sentence of the located user speech text (T1) is a real estate consultant speech, the previous sentence of the user speech text (T1), the user speech text (T1) and the next sentence (T2) of the user speech text (T1) are spliced to form a text (T3); if it is determined that the previous sentence of the located user speech text (T1) is not a real estate consultant speech, the user speech text (T1) and the next sentence (T2) of the user speech text (T1) are spliced to form a text (T3); S16, repeatedly performing S13-S15 until the dialogue text list (L1) is traversed; S17, outputting a short dialogue text set (L2) constructed by all texts (T3). 2.The real estate industry dialogue intent recognition method according to claim 1, characterized in that, Step S2 comprises: S21, loading a general text corpus; S22, obtaining a text from the general text corpus; S23, performing a MASK operation on random characters in the obtained text; S24, predicting the text subjected to the MASK operation by using a base model; S25, calculating the difference between the prediction result and the actual result after the general domain corpus is traversed; S26, if the difference value does not reach a preset corresponding threshold value, reloading the general text corpus to continue training the model, and repeating steps S22-S26; S27, if the difference value reaches the preset corresponding threshold value, the training is ended, and a general text pre-training model is obtained. 3.The real estate industry dialogue intent recognition method according to claim 2, characterized in that, The base model is an albert model. 4.The real estate industry dialogue intent recognition method according to claim 1, characterized in that, Step S3 comprises: S31, obtaining the short dialogue text set; S32, extracting part of the sample from the short dialogue text set according to the user intent category given by the business party and importing it to the labeling platform; S33, marking the extracted sample by manual work; S34, assembling the dialogue text and the corresponding intent category; S35, generating the small sample dataset with completed marking. 5.The real estate industry dialogue intent recognition method according to claim 1, characterized in that, Step S4 includes: S41, loading the general text pre-training model and the small sample dataset, serializing the intent category of the dataset, and constructing training data; S42, defining an optimizer and a learning rate, and training the general text pre-training model by using the training data; S43, when the model evaluation index reaches a preset corresponding threshold, ending the training to obtain an intent recognition model; when the model evaluation index does not reach the preset corresponding threshold, repeating step S42 until the model evaluation index reaches the preset corresponding threshold. 6.The real estate industry dialogue intent recognition method according to claim 1, characterized in that, Step S5 includes: S51, serializing the short dialogue text to be recognized, and inputting the serialized short dialogue text to be recognized into the intent recognition model; S52, performing argmax on the model output vector; S53, de-serializing the intent category, and outputting a user intent recognition result. 7.The real estate industry dialogue intent recognition method according to claim 1, characterized in that, The method further includes: calculating the sum of the word frequency, left-right information entropy H, and mutual information condensation PMI in the short dialogue text with the user intent; the calculation formulas of the left-right information entropy H and the mutual information condensation PMI are: H(X) = -∑ x∈X p(x) log2 p(x) (1) wherein p(x) in formula (1) represents the probability of the occurrence of a word, and X is a random variable; formula (2) represents the degree of irrelevance between two words when the words are independent of each other; ranking the phrases in the short dialogue text in descending order by using the calculated sum as a measurement; selecting the first five as the prephrase text, and realizing text extraction. 8.The real estate industry dialogue intent recognition method according to claim 7, characterized in that, The method further includes generating an intent summary, specifically: obtaining a summary template text set by a business party according to an intent category, segmenting the summary template text, and constructing a template sentence list (Q1); continuously reading the sentence text (D1) in the template sentence list (Q1), inputting the sentence text (D1) into the general text pre-training model, and outputting the corresponding vector (V1) of the sentence text (D1); after completing the traversal of the template sentence list (Q1), obtaining a set (C1) composed of the corresponding vectors (V1) of all sentence texts (D1), and obtaining the prephrase text; reading each example phrase in the template sentence list (Q1) to form a short sentence list (Q2); continuously reading the new sentence text (D2) in the short sentence list (Q2), inputting the new sentence text (D2) into the general text pre-training model, and outputting the corresponding vector (V2) of the new sentence text (D2); after completing the traversal of the short sentence list (Q2), obtaining a set (C2) composed of the corresponding vectors (V2) of all new sentence texts (D2), and calculating the similarity between each vector in the set (C2) and each vector in the set (C1); If there is a phrase with a similarity reaching a preset corresponding threshold, the new sentence text (D2) in the short sentence list (Q2) is used to replace the corresponding summary template sentence in the template sentence list (Q1), and the un-updated sentence in the template sentence list (Q1) is removed; The template sentence list (Q1) is spliced to generate an intent summary text. 9.A real estate industry dialogue intent recognition apparatus, characterized by comprising: Comprise: A short dialogue text set generation module is configured to decompose a long dialogue text generated by a speaking subject in a business scenario, and reconstruct the long dialogue text into a plurality of short dialogue texts based on customer speech to obtain a short dialogue text set; specifically comprising: A long text input unit is configured to input a long dialogue text generated by a business scenario; A long text decomposition unit is configured to decompose the long dialogue text into a dialogue text list (L1) according to different speaking subjects; A first judgment unit is configured to locate a user speech text (T1) in the dialogue text list (L1), and judge whether the next sentence (T2) of the located user speech text (T1) is a real estate consultant speech; A second judgment and processing unit is configured to execute: if it is determined that the next sentence (T2) of the located user speech text (T1) is a real estate consultant speech, it is determined whether the previous sentence of the located user speech text (T1) is a real estate consultant speech, and the third judgment and processing unit and the traversal control unit are sequentially executed; if it is determined that the next sentence (T2) of the located user speech text (T1) is not a real estate consultant speech, the traversal control unit is directly executed; The third judgment and processing unit is configured to execute: if it is determined that the previous sentence of the located user speech text (T1) is a real estate consultant speech, the previous sentence of the user speech text (T1), the user speech text (T1), and the next sentence (T2) of the user speech text (T1) are spliced to form a text (T3); if it is determined that the previous sentence of the located user speech text (T1) is not a real estate consultant speech, the user speech text (T1) and the next sentence (T2) of the user speech text (T1) are spliced to form a text (T3); The traversal control unit is configured to repeatedly execute the first judgment unit, the second judgment and processing unit, and the third judgment and processing unit until the dialogue text list (L1) is traversed; A short text set output unit is configured to output a short dialogue text set (L2) constructed by all texts (T3); A general text pre-training model training module is configured to use a general text corpus as a training corpus to construct and train a general text pre-training model; A small sample dataset generation module is configured to perform intent category labeling on the short dialogue text set to generate a small sample dataset; An intent recognition model generation module is configured to fine-tune the general text pre-training model using the small sample dataset to obtain an intent recognition model; An intent recognition module is configured to input a short dialogue text to be recognized into the intent recognition model, and pre-process the model output to output an intent recognition result.
Citation Information
Patent Citations
Method and device for distinguishing consumption intention
CN103412882A
Intention recognition method based on neural network and electronic device
CN112364662A