A business keyword library creation method, intelligent chat guidance method and device
By creating a business keyword library and analyzing the user's voice interaction information in real time, the intelligent chat system can effectively detect the user's potential business intentions, solve the problem of the inability to adjust the chat reply content in the existing technology, and improve the fun and guidance of the chat. .
Patent Information
- Application Number
- CN202010767970.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-08-03
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2040-08-03
AI Technical Summary
Existing smart voice assistants cannot adjust reply content in a timely manner based on the user's real-time voice interaction information during smart chat, resulting in low interest in chat, inability to effectively detect the user's potential business intentions, and inability to provide targeted business guidance.
By creating a business keyword database, clustering and text analysis are performed based on the user's interactive voice text information, keywords are extracted, and a business keyword database is established based on these keywords. The user's voice text information is analyzed in real time to determine the target business type and key words. words to display relevant business information in the chat background interface for targeted chat guidance.
It is possible to timely discover potential business intentions based on the user's real-time voice information, adjust the chat reply direction, improve the fun of the chat and meet the potential needs of the user, and enhance the guidance of the chat.
Smart Images

Figure CN111881283B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of intelligent chat technology, and in particular to a method for creating a business keyword library, an intelligent chat guidance method and device. Background Art
[0002] With the development of intelligent voice interaction technology, intelligent voice chat function can be realized on terminal devices such as display devices and smart terminals. When realizing the intelligent voice chat function, it is necessary to configure an intelligent voice assistant on the terminal device.
[0003] When a user interacts with a terminal device through voice, existing intelligent voice assistants usually use existing data to make fixed replies based on the voice interaction information generated by the user to achieve a chat function. The existing data refers to the commonly used reply information stored in the intelligent voice assistant when interacting with the user.
[0004] It can be seen that the existing intelligent voice assistants can only make simple replies and cannot adjust the reply content in time according to the voice interaction information generated by the user in real time. That is, they do not have the function of guiding chat, which leads to low interest in chat and users are prone to fatigue. Summary of the invention
[0005] The present application provides a method for creating a business keyword library, an intelligent chat guidance method and device, so as to solve the problem that the user's potential business intention cannot be timely discovered and business guidance cannot be performed during intelligent chat.
[0006] In a first aspect, the present application provides a method for creating a business keyword library, comprising:
[0007] Obtain the interactive voice text information generated by each user;
[0008] Clustering each interactive voice text information according to the service type to obtain a text information cluster corresponding to each service type, wherein the text information cluster includes multiple interactive voice text information corresponding to the same service type;
[0009] Performing text analysis on the interactive speech text information in each of the text information clusters to obtain at least one keyword corresponding to each of the interactive speech text information;
[0010] A business keyword library including at least one keyword corresponding to each of the business types is created, and the business keyword library is used to provide chat guide information based on the voice text information generated by the user when the user is chatting.
[0011] In some embodiments of the present application, clustering each interactive voice text information according to the service type to obtain a text information cluster corresponding to each service type includes:
[0012] Extracting the service type label carried in each interactive voice text message;
[0013] The interactive voice text information corresponding to the same business type label is divided into one category to obtain a text information cluster corresponding to each business type.
[0014] In some embodiments of the present application, the performing text analysis on the interactive speech text information in each of the text information clusters to obtain at least one keyword corresponding to each interactive speech text information includes:
[0015] Performing word segmentation processing on the interactive speech text information in each of the text information clusters to obtain a plurality of words corresponding to each of the interactive speech text information;
[0016] Sequence annotation is performed on each of the words, and the sequence-annotated words are used as keywords corresponding to each interactive voice text information.
[0017] In some embodiments of the present application, the creating of a business keyword library including at least one keyword corresponding to each of the business types includes:
[0018] Calculating a weight value of at least one keyword corresponding to each of the business types;
[0019] A business keyword library is established based on at least one keyword whose weight value corresponding to each business type meets a preset threshold.
[0020] In some embodiments of the present application, the calculating the weight value of at least one keyword corresponding to each of the business types includes:
[0021] Calculate the word frequency of the keyword in the corresponding interactive voice text information, and the inverse text frequency of the keyword in all interactive voice text information;
[0022] The weight value of the keyword is determined based on the product of the word frequency and the inverse text frequency.
[0023] In some embodiments of the present application, the establishing of a business keyword library based on at least one keyword whose weight value corresponding to each business type satisfies a preset threshold includes:
[0024] Comparing the weight value of each keyword with the preset threshold;
[0025] Determine the keyword corresponding to the weight value being greater than or equal to the preset threshold as the target keyword;
[0026] Obtaining a label for each of the keywords;
[0027] If the tag is a designated tag, the keyword with the designated tag is used as the preferred keyword;
[0028] A business keyword library is established based on the target keywords and preferred keywords corresponding to each business type.
[0029] In a second aspect, the present application also provides an intelligent chat guiding method, the method comprising:
[0030] Acquire a service keyword library and voice text information generated when a user chats, wherein the service keyword library includes at least one keyword corresponding to each service type;
[0031] Performing text classification analysis on the voice text information to determine the target service type corresponding to the voice text information;
[0032] Perform sequence annotation on the speech text information to extract corresponding business keywords;
[0033] Based on the target business type and the business keyword, query the business keyword library for corresponding target business information, where the target business information refers to information related to the business keyword corresponding to the target business type;
[0034] The target business information is displayed as chat guide information in the chat background interface when the user is chatting.
[0035] In some embodiments of the present application, the performing text classification analysis on the voice text information to determine the target service type corresponding to the voice text information includes:
[0036] Performing word segmentation processing on the voice text information to obtain a plurality of words corresponding to the interactive voice text information;
[0037] Calculate the classification probability of each of the words in each business type;
[0038] The business type corresponding to the highest classification probability of the word is determined as the target business type corresponding to the voice text information.
[0039] In some embodiments of the present application, the step of performing sequence tagging on the speech text information and extracting corresponding business keywords includes:
[0040] Performing word segmentation processing on the voice text information to obtain a plurality of words corresponding to the interactive voice text information;
[0041] Adding a label to each of the words, wherein the label is used to represent the text category mark of the word;
[0042] Obtaining a weight value corresponding to each of the tags;
[0043] The word corresponding to the tag with the highest weight value is determined as the business keyword.
[0044] In some embodiments of the present application, the step of displaying the target service information as chat guide information in a chat background interface when the user is chatting includes:
[0045] Obtaining a relevance score corresponding to each target business information;
[0046] Sort the target business information in descending order according to the relevance scores to generate a recommendation list;
[0047] The recommendation list is displayed as chat guide information in the chat background interface when the user is chatting.
[0048] In a third aspect, the present application also provides a device for creating a business keyword library, including:
[0049] A historical information acquisition module is used to obtain the interactive voice text information generated by each user;
[0050] A text clustering module, used for clustering each interactive voice text information according to the service type to obtain a text information cluster corresponding to each service type, wherein the text information cluster includes multiple interactive voice text information corresponding to the same service type;
[0051] A text analysis module, used for performing text analysis on the interactive speech text information in each of the text information clusters to obtain at least one keyword corresponding to each of the interactive speech text information;
[0052] The business keyword library creation module is used to create a business keyword library including at least one keyword corresponding to each of the business types, and the business keyword library is used to provide chat guidance information based on the voice text information generated by the user when the user is chatting.
[0053] In a fourth aspect, the present application also provides an intelligent chat guiding device, comprising:
[0054] A real-time information acquisition module, used to acquire a service keyword library and voice and text information generated during user chats, wherein the service keyword library includes at least one keyword corresponding to each service type;
[0055] A text classification analysis module, used to perform text classification analysis on the voice text information to determine the target service type corresponding to the voice text information;
[0056] A business keyword extraction module, used to perform sequence annotation on the voice text information and extract corresponding business keywords;
[0057] A target business information query module, configured to query the business keyword library for corresponding target business information based on the target business type and the business keyword, wherein the target business information refers to information related to the business keyword corresponding to the target business type;
[0058] The chat guide information display module is used to display the target business information as chat guide information in the chat background interface when the user is chatting.
[0059] In a fifth aspect, the present application also provides a storage medium, which computer storage medium can store a program, and when the program is executed, it can implement some or all of the steps in the embodiments of the business keyword library creation method and the intelligent chat guidance method provided in the present application.
[0060] It can be seen from the above technical scheme that the embodiment of the present invention provides a method for creating a business keyword library, an intelligent chat guidance method and a device. When creating the business keyword library, based on the interactive voice text information generated by each user, clustering is performed according to the business type to obtain a text information cluster corresponding to each business type. Text analysis is performed on the interactive voice text information under each text information cluster to obtain multiple keywords, and a business keyword library including at least one keyword corresponding to each business type is created. When guiding the chat, the voice text information generated by the user during the chat is subjected to text classification analysis to determine the corresponding target business type, and the voice text information is sequenced and annotated to extract the corresponding business keywords; based on the target business type and the business keywords, the corresponding target business information is queried in the business keyword library, and the target business information is displayed as chat guidance information in the chat background interface when the user is chatting. The method and device provided by the present invention can timely discover the user's potential business intention according to the user's real-time voice text information and the business keyword library, and display the discovered target business information as chat guidance information in the chat background interface, so as to guide the user's chat in a targeted manner and adjust the reply direction in time, thereby meeting the user's potential needs. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] In order to more clearly illustrate the technical solution of the present application, the drawings required for use in the embodiments are briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0062] Figure 1 exemplarily shows a flowchart of a method for creating a business keyword library according to some embodiments;
[0063] Figure 2exemplarily shows a data flow diagram of a method for creating a business keyword library according to some embodiments;
[0064] Figure 3 A flowchart of a text clustering method according to some embodiments is exemplarily shown in FIG.
[0065] Figure 4 A flowchart of a method for text analysis according to some embodiments is exemplarily shown in FIG.
[0066] Figure 5 A flowchart of a method for creating a business keyword library according to some embodiments is exemplarily shown in FIG.
[0067] Figure 6 A flowchart of an intelligent chat guiding method according to some embodiments is exemplarily shown in FIG.
[0068] Figure 7 exemplarily shows a data flow diagram of an intelligent chat guiding method according to some embodiments;
[0069] Figure 8 A flowchart of a method for determining a target business type according to some embodiments is exemplarily shown in FIG.
[0070] Fig. 9 exemplarily shows a flowchart of a method for extracting business keywords according to some embodiments;
[0071] Fig.10 A flowchart of a method for displaying chat guide information according to some embodiments is exemplarily shown in FIG.
[0072] Fig.11 exemplarily shows a structural block diagram of a device for creating a business keyword library according to some embodiments;
[0073] Fig.12 A structural block diagram of an intelligent chat guiding device according to some embodiments is exemplarily shown in FIG. DETAILED DESCRIPTION
[0074] When a user conducts an intelligent chat through voice interaction with a smart terminal, such as a mobile phone, iPad, etc., or when a user conducts an intelligent chat through voice interaction with a display device, such as a smart TV and smart products with a display, the terminal device (smart terminal and display device) realizes chat replies with the help of its own configured intelligent voice assistant.
[0075] However, the chat function of various versions of intelligent voice assistants currently provides fixed replies based on existing data, usually simple replies, which cannot adjust the reply direction in time and provide guided chats, which makes the chats boring and users easily feel tired. In addition, when users use the chat function, the chat background interface remains unchanged, which cannot timely detect the user's potential business intentions for business guidance and display the relevant potential intentions, thus failing to meet the user's potential needs.
[0076] Therefore, in order to be able to adjust the reply direction in time according to the user's real-time voice information when the user is having an intelligent chat with the terminal device, an embodiment of the present invention provides an intelligent chat guidance method, which can timely detect the user's potential business intentions according to the user's real-time voice information to provide business guidance, and display the business guidance information in the background interface of the chat to meet the user's potential needs.
[0077] In order to accurately obtain chat guidance information that matches the user's real-time voice information, the method provided by the embodiment of the present invention needs to first create a business keyword library, which includes keyword names and corresponding business information of various business types. After the user's potential business intention (keyword) is identified based on the user's real-time voice information, the corresponding business information can be retrieved from the business keyword library and displayed as chat guidance information in the chat background interface.
[0078] Figure 1 exemplarily shows a flowchart of a method for creating a business keyword library according to some embodiments; Figure 2 exemplarily shows a data flow diagram of a method for creating a business keyword library according to some embodiments. Figure 1 and Figure 2 , a method for creating a business keyword library provided by an embodiment of the present invention, the execution subject is a controller configured in a terminal device, and the method comprises the following steps:
[0079] S11. Obtain interactive voice text information generated by each user.
[0080] When creating a business keyword library, the data source is the historical interactive voice data of multiple users who interact with the terminal device, such as interactive voice text information. When each user interacts with the terminal device in the historical stage, they usually use more common expressions. Every time a user generates a common expression, it will be stored in the form of interactive voice text information in the log of the intelligent chat assistant.
[0081] The controller obtains the interactive voice text information generated by each user from the data stored in the log. There may be multiple users interacting with the terminal device, and each user may also generate multiple interactive voice text information.
[0082] S12. Cluster each interactive voice text information according to the service type to obtain a text information cluster corresponding to each service type, wherein the text information cluster includes multiple interactive voice text information corresponding to the same service type.
[0083] To facilitate the identification of users' potential business intentions, when creating a business keyword library, each interactive voice and text information generated by the user can be clustered according to different business types. Business types include music, film and television, variety shows, etc.
[0084] After text clustering, each text information cluster corresponds to a service type, that is, there is a one-to-one relationship between the text information cluster and the service type, and each text information cluster includes a plurality of interactive voice text information belonging to the same service type.
[0085] In some embodiments, when performing text clustering, a hierarchical clustering algorithm can be used to first treat each object (interactive speech text information) as a cluster, and then merge these atomic clusters into larger and larger clusters (text information clusters) until all objects are in one cluster or a certain termination condition is met.
[0086] Figure 3 A flowchart of a text clustering method according to some embodiments is exemplarily shown in FIG. Figure 3 , clustering each interactive voice text information according to the service type to obtain the text information cluster corresponding to each service type, including the following steps:
[0087] S121. Extract the service type label carried in each interactive voice text message.
[0088] S122: Classify the interactive voice text information corresponding to the same service type label into one category to obtain a text information cluster corresponding to each service type.
[0089] Each interactive voice text message usually carries a business type label. The controller treats each business type label as an object, calculates the minimum distance between each pair, merges the two objects with the smallest distance into one class, and recalculates the distance between the new class and all objects until all objects are merged into one class, that is, text information clustering.
[0090] Interactive voice text information with the same business type label has a close distance, so the interactive voice text information corresponding to the same business type label can be classified into one category to obtain a text information cluster corresponding to each business type.
[0091] S13: Perform text analysis on the interactive voice text information in each text information cluster to obtain at least one keyword corresponding to each interactive voice text information.
[0092] After each interactive voice text information is clustered according to the business type, the interactive voice text information in the same text information cluster is subjected to text analysis to obtain multiple keywords corresponding to the same text information cluster. In some embodiments, the text analysis includes word segmentation processing and sequence tagging processing.
[0093] Figure 4 , a flowchart of a method for text analysis according to some embodiments is shown in FIG. Figure 4 In some embodiments, performing text analysis on the interactive speech text information in each text information cluster to obtain at least one keyword corresponding to each interactive speech text information includes the following steps:
[0094] S131 . Perform word segmentation processing on the interactive voice text information in each text information cluster to obtain a plurality of words corresponding to each interactive voice text information.
[0095] S132: perform sequence annotation on each word, and use the sequence-annotated words as keywords corresponding to each interactive voice text information.
[0096] In order to accurately determine the keywords in each interactive voice text information, the interactive voice text information needs to be segmented first to obtain multiple words corresponding to each interactive voice text information. In some embodiments, the word segmentation process can use the open source word segmentation tool JIEBA.
[0097] Then, sequence annotation is performed on each word to identify the text category of each word in the interactive speech text information. In some embodiments, sequence annotation can adopt named entity recognition (NER), and the sequence annotation technology adopted is mainly to mark each element in a given sequence, or to label each element.
[0098] Each word with a sequence annotation is used as a keyword corresponding to the interactive voice text information, and each interactive voice text information corresponds to multiple keywords.
[0099] In some embodiments, in addition to determining the keywords of each interactive voice text information based on the above sequence labeling method, the user can also define the keywords, and the keywords determined based on the sequence labeling and the user-defined keywords are used together as the keywords of each interactive voice text information.
[0100] S14. Create a business keyword library including at least one keyword corresponding to each business type, where the business keyword library is used to provide chat guidance information based on the voice text information generated by the user when the user is chatting.
[0101] The same service type includes multiple interactive voice text information, and each interactive voice text information corresponds to multiple keywords. Therefore, the same service type corresponds to multiple keywords. Based on the multiple keywords corresponding to each service type, a service keyword library is created.
[0102] The business keyword library includes keyword names and business information corresponding to each business type, forming a keyword table. When the user generates voice text information in real time, the corresponding business information can be filtered out in the business keyword library according to the keywords and business types corresponding to the real-time voice text information, and displayed as chat guide information in the chat background interface.
[0103] Since the corresponding keywords in the interactive voice text information may contain words irrelevant to the business, in order to ensure that the created business keyword library can include more keywords related to the business, the keywords can be filtered when creating the business keyword library.
[0104] Figure 5 exemplarily shows a flow chart of a method for creating a business keyword library according to some embodiments. Figure 5 In some embodiments, in order to filter keywords, creating a business keyword library including at least one keyword corresponding to each of the business types includes the following steps:
[0105] S141. Calculate a weight value of at least one keyword corresponding to each business type.
[0106] S142: Establish a business keyword library based on at least one keyword whose weight value corresponding to each business type meets a preset threshold.
[0107] In order to accurately filter the keywords corresponding to each interactive voice text information in each business type, the weight value of each keyword can be calculated first. Keywords whose weight values do not meet the preset threshold are filtered out, and a business keyword library is established only based on keywords whose weight values meet the preset threshold.
[0108] In some embodiments, calculating the weight value of at least one keyword corresponding to each of the business types includes:
[0109] Step 1411: Calculate the word frequency of the keyword in the corresponding interactive voice text information, and the inverse text frequency of the keyword in all interactive voice text information.
[0110] Step 1412: Determine the weight value of the keyword based on the product of the word frequency and the inverse text frequency.
[0111] When calculating the weight value of a keyword, the TF-IDF calculation method can be used. TF-IDF (term frequency-inverse document frequency) is used to estimate the importance of a word (keyword) in a document collection or corpus (text information clustering).
[0112] The main idea of the TF (Term Frequency) calculation method is to express the frequency of a given word t in a given document d, that is, the frequency of a keyword in the corresponding interactive speech text information. The higher the TF, the more important the word t is to the document d, and the lower the TF, the less important the word t is to the document d. j The word t i For example, i The word frequency can be expressed as:
[0113]
[0114] Where n i,j It is the word t i In the document d j The denominator is the number of occurrences in file d j The sum of the number of occurrences of all words in .
[0115] Using the above formula, the word frequency of a certain keyword in the corresponding interactive voice text information can be calculated.
[0116] The main idea of IDF (Inverse Document Frequency) calculation method is: if there are fewer documents containing word t, the larger the IDF is, which means that word t has good ability to distinguish categories at the level of the entire document set. For the entire document set, the criterion for evaluating the importance of words is IDF. The IDF of a specific word can be obtained by dividing the total number of documents by the number of documents containing the word, and then taking the logarithm of the quotient:
[0117]
[0118] Where |D| is the total number of documents in the corpus, and the denominator is the number of documents containing the word t i The total number of documents.
[0119] According to the above formula, based on the total number of interactive voice text information in the same text information cluster and the total number of all interactive voice text information containing a certain keyword in the same text information cluster, the inverse text frequency generated by the keyword in all interactive voice text information in the same text information cluster is calculated.
[0120] TF-IDF is actually: TF*IDF. The main idea is: if a word or phrase appears frequently in one article (i.e., TF is high) and rarely appears in other articles (i.e., IDF is high), then it is considered that this word or phrase has good category discrimination ability and is suitable for classification.
[0121] Therefore, the weight value of a keyword can be determined by calculating the product of the word frequency and the inverse text frequency of a keyword. The higher the weight value of a keyword, the higher the frequency of the keyword in a certain interactive voice text information (i.e., high TF), and it rarely appears in other interactive voice text information in the same text information cluster (i.e., high IDF).
[0122] After determining the weight value of each keyword, the keywords can be filtered. In some embodiments, when creating a business keyword library based on the filtered keywords, the controller establishes the business keyword library based on at least one keyword whose weight value corresponding to each business type meets a preset threshold, including the following steps:
[0123] Step 1421: Compare the weight value of each keyword with a preset threshold.
[0124] Step 1422: Determine the keyword corresponding to the weight value greater than or equal to the preset threshold as the target keyword.
[0125] Step 1423: Get the label of each keyword.
[0126] Step 1424: If the tag is a designated tag, the keyword with the designated tag is used as the preferred keyword.
[0127] Step 1425: Establish a business keyword library based on the target keywords and preferred keywords corresponding to each business type.
[0128] The keywords in the business keyword library include keywords corresponding to weight values that meet a preset threshold, and also include keywords with specified tags.
[0129] The weight value of each keyword is compared with a preset threshold value, which may be set to 0.5. If the weight value of a keyword is greater than or equal to 0.5, the keyword is determined as a target keyword.
[0130] If the weight value of a keyword is less than 0.5, but the keyword has a specified tag, the weight value of the keyword can be increased to meet the preset threshold. Such keywords are determined as preferred keywords.
[0131] The designated tag refers to the tag added when each keyword is sequenced as mentioned above. The standard for increasing the weight value to above the preset threshold is that the designated tag is added to the keyword. The designated tags include celebrity names, song names, work names, and other tags with specific annotations.
[0132] The tag of each keyword is obtained. If the tag added to the keyword is a specified tag, the keyword with the specified tag added is used as the preferred keyword regardless of whether the weight value of the keyword meets the preset threshold.
[0133] The target keywords and preferred keywords corresponding to each business type are formed into a keyword table to establish a business keyword library.
[0134] In some embodiments, when creating a business keyword library, in addition to establishing a keyword table based on historical interactive voice text information generated by user interaction, a business keyword library can also be created based on the existing keyword table provided by the intelligent voice assistant, based on the established keyword table and the existing keyword table.
[0135] It can be seen that the method for creating a business keyword library provided by the embodiment of the present invention is based on the interactive voice text information generated by each user, clustered according to the business type, and obtained a text information cluster corresponding to each business type. The interactive voice text information under each text information cluster is subjected to text analysis to obtain multiple keywords, and a business keyword library including at least one keyword corresponding to each business type is created. The business keyword library is used to provide chat guidance information based on the voice text information generated by the user when the user is chatting. It can be seen that the business keyword library created by the embodiment of the present invention can provide an information screening basis for timely discovering the user's potential business intentions according to the user's real-time voice information, so as to conduct business guidance, and the screened business information is displayed as chat guidance information in the background interface where the chat is located, so as to meet the user's potential needs.
[0136] When conducting intelligent chat guidance, the corresponding business information is retrieved from the business keyword library based on the voice text information generated when the user interacts with the intelligent chat assistant in real time as chat guidance information.
[0137] Figure 6 A flowchart of an intelligent chat guiding method according to some embodiments is exemplarily shown in FIG. Figure 7 exemplarily shows a data flow diagram of the intelligent chat guiding method according to some embodiments. Figure 6 and Figure 7 An embodiment of the present invention provides an intelligent chat guiding method, the execution subject is a controller configured in a terminal device, and the method includes the following steps:
[0138] S21. Acquire a service keyword library and voice text information generated when a user chats, wherein the service keyword library includes at least one keyword corresponding to each service type.
[0139] The voice text information generated by the user during the chat can be voice information or text information. If it is voice information, the controller needs to convert the voice information into text information first, so as to perform recognition based on the text information later.
[0140] The business keyword library is composed of Figure 1 The method for creating a business keyword library shown in the figure creates keywords and business information corresponding to each business type. The relevant creation method can refer to the content of the aforementioned embodiment and will not be repeated here.
[0141] S22: Perform text classification analysis on the voice text information to determine the target service type corresponding to the voice text information.
[0142] In order to facilitate the query of corresponding business information based on the voice text information generated by the user in real time, so as to guide the chat in a timely manner, in some embodiments, the voice text information needs to be first subjected to text classification analysis to identify the target business type corresponding to the voice text information.
[0143] Figure 8 , a flowchart of a method for determining a target business type according to some embodiments is exemplarily shown in FIG. Figure 8 The controller performs text classification analysis on the voice text information to determine the target service type corresponding to the voice text information, including:
[0144] S221. Perform word segmentation processing on the voice text information to obtain multiple words corresponding to the interactive voice text information.
[0145] S222. Calculate the classification probability of each word in each business type.
[0146] S223: Determine the service type corresponding to the word with the highest classification probability as the target service type corresponding to the voice text information.
[0147] When determining the target business type corresponding to the voice text information generated by the user's real-time chat, the voice text information needs to be segmented to obtain multiple words. In some embodiments, the word segmentation process can use the open source word segmentation tool JIEBA.
[0148] In text classification prediction, the TextCNN text classification algorithm is used to calculate the classification probability of each word in each business type. The calculation process includes: the input layer, which converts each word in the text into a word vector of the same dimension for input; the convolution layer, which performs convolution operations through different convolution kernel sizes kernel_size = (1, 2, 3, 4, 5) to extract text features; the pooling layer, which uses 1-Max-pooling maximum pooling, that is, extracts the maximum value of each feature vector to represent the feature, and finally concatenates all feature vectors and passes them to the fully connected layer. In the fully connected layer, the first layer can add relu as the activation function, and the second layer uses the softmax activation function to obtain the probability of belonging to each class, that is, the classification probability of each word in each business type.
[0149] According to the classification probability of each word in each business type, the classification result of each word can be determined. If the maximum classification probability is 0.89, corresponding to film and television, it can be determined that the target business type corresponding to the voice text information is "film and television".
[0150] S23: perform sequence annotation on the voice text information and extract corresponding business keywords.
[0151] While performing text classification analysis on the voice text information to determine the target business type of the voice text information, the controller simultaneously performs sequence annotation on the voice text information to obtain corresponding business keywords.
[0152] Fig. 9 , a flowchart of a method for extracting business keywords according to some embodiments is exemplarily shown in FIG. Fig. 9 , the controller performs sequence annotation on the voice text information and extracts the corresponding business keywords, including:
[0153] S231. Perform word segmentation processing on the voice text information to obtain multiple words corresponding to the interactive voice text information.
[0154] S232. Add a label to each word, where the label is used to represent the text category mark of the word.
[0155] S233. Obtain the weight value corresponding to each tag.
[0156] S234: Determine the word corresponding to the tag with the highest weight value as the business keyword.
[0157] When determining the business keywords corresponding to the voice text information generated by the user's real-time chat, the voice text information needs to be segmented to obtain multiple words. In some embodiments, the word segmentation process can use the open source word segmentation tool JIEBA.
[0158] Then, sequence annotation is performed on each word to identify the text category of each word in the interactive speech text information. In some embodiments, sequence annotation can adopt named entity recognition (NER), and the sequence annotation technology adopted is mainly to mark each element in a given sequence, or to label each element.
[0159] Add corresponding labels to each word. For example, the element "know" can be labeled as "verb". It can be seen that when labeling, the categories of labels are different. Some words are labeled with part of speech, while some words are labeled with text category labels.
[0160] The text category label is used as the designated label. Different labels have different weight values. The weight values can be determined according to the above IF-IDF calculation method, which will not be described here. The designated labels include but are not limited to celebrity names, song names, work names, etc.
[0161] In some embodiments, the weight value of the designated tag is set higher than the weight value of the common part-of-speech tag. The words with the designated tag are closer to the user's business intention, so the words corresponding to the tag with the highest weight value are determined as business keywords.
[0162] The words with designated tags are business keywords. In the voice text information generated by the user's real-time chat, there may be multiple words with designated tags added, so there may be multiple business keywords.
[0163] S24. Based on the target business type and the business keyword, the corresponding target business information is searched in the business keyword library, where the target business information refers to information related to the business keyword corresponding to the target business type.
[0164] The target business type corresponding to the voice text information generated based on the user's real-time voice chat determined in step S22, and the business keywords corresponding to the voice text information generated based on the user's real-time voice chat determined in step S23, can be searched in the business keyword library to determine whether the business information corresponding to the business keywords and the target business type can be retrieved.
[0165] Since the business keyword library stores corresponding business types, keywords and business information, the corresponding target keywords and business information can be first screened out according to the target business type, and then the business keywords are matched with the target keywords to screen out the keywords and business information corresponding to the business keywords, and the business information corresponding to the business keywords is determined as the target business information.
[0166] S25. Display the target business information as chat guide information in the chat background interface when the user is chatting.
[0167] The target business information is the information corresponding to the user's potential business intention discovered based on the voice and text information generated by the user's real-time chat. The target business information is used as chat guidance information to guide the user's chat in a targeted manner and adjust the reply direction in a timely manner to meet the user's potential needs.
[0168] At the same time, the target business information is displayed as chat guidance information in the chat background interface when the user is chatting, so as to change the unchanging chat background interface in real time, so that the chat background interface no longer displays a unified interface, so that the user can view the chat guidance information more intuitively.
[0169] If multiple business keywords are identified based on the voice and text information generated by the user's real-time chat, multiple business information may be retrieved when searching based on the business keyword library. At this time, multiple business information can be displayed at the same time.
[0170] Fig.10 exemplarily shows a flow chart of a method for displaying chat guidance information according to some embodiments. Fig.10 In some embodiments, when displaying multiple business information, the controller displays the target business information as chat guide information in the chat background interface when the user is chatting, including:
[0171] S251. Obtain a relevance score corresponding to each target business information.
[0172] S252: Sort the multiple target business information from high to low according to the relevance scores to generate a recommendation list.
[0173] S253: Display the recommendation list as chat guidance information in the chat background interface when the user is chatting.
[0174] Each target business information will have different relevance scores with the business keywords and target business types. The closer the retrieved target business information is to the business keywords and target business types, the higher the relevance score. According to the relevance scores, multiple target business information are sorted to obtain a recommendation list.
[0175] The recommendation list includes information content of each target business information, and the recommendation list is displayed as chat guide information in the chat background interface when the user is chatting.
[0176] The chat guidance information can be dynamically adjusted based on the changes in the voice and text information generated by the user's real-time chat, so that the reply direction can be adjusted in time and the user's potential business intention can be discovered in time. The display content of the chat background interface also changes with the changes in the chat guidance information, so as to change the chat background interface in time according to the user's potential business intention and meet the user's potential psychological needs.
[0177] It can be seen that the intelligent chat guidance method provided by the embodiment of the present invention performs text classification analysis on the voice text information generated by the user during the chat to determine the corresponding target business type, and performs sequence annotation on the voice text information to extract the corresponding business keywords; based on the target business type and business keywords, the corresponding target business information is queried in the business keyword library, and the target business information is displayed as chat guidance information in the chat background interface when the user is chatting. It can be seen that when the method provided by the present invention guides the chat, the user's potential business intention is discovered based on the voice text information generated by the user's real-time chat, and the discovered target business information is displayed as chat guidance information in the chat background interface, so as to guide the user's chat in a targeted manner and adjust the reply direction in time, thereby meeting the user's potential needs.
[0178] Fig.11 exemplarily shows a structural block diagram of a device for creating a business keyword library according to some embodiments. Fig.11 , a device for creating a business keyword library provided by an embodiment of the present invention includes: a historical information acquisition module 110, which is used to acquire interactive voice text information generated by each user; a text clustering module 120, which is used to cluster each interactive voice text information according to the business type, and obtain a text information cluster corresponding to each business type, wherein the text information cluster includes multiple interactive voice text information corresponding to the same business type; a text analysis module 130, which is used to perform text analysis on the interactive voice text information in each text information cluster, and obtain at least one keyword corresponding to each interactive voice text information; a business keyword library creation module 140, which is used to create a business keyword library including at least one keyword corresponding to each business type, wherein the business keyword library is used to provide chat guidance information based on the voice text information generated by the user when the user is chatting.
[0179] Fig.12 exemplarily shows a structural block diagram of an intelligent chat guiding device according to some embodiments. Fig.12An intelligent chat guiding device provided by an embodiment of the present invention is characterized in that it includes: a real-time information acquisition module 210, which is used to obtain a business keyword library and voice text information generated when a user chats, wherein the business keyword library includes at least one keyword corresponding to each business type; a text classification analysis module 220, which is used to perform text classification analysis on the voice text information to determine the target business type corresponding to the voice text information; a business keyword extraction module 230, which is used to perform sequence annotation on the voice text information to extract the corresponding business keywords; a target business information query module 240, which is used to query the corresponding target business information in the business keyword library based on the target business type and the business keyword, wherein the target business information refers to information related to the business keyword corresponding to the target business type; a chat guidance information display module 250, which is used to display the target business information as chat guidance information in the chat background interface when the user chats.
[0180] It can be seen from the above technical scheme that the embodiment of the present invention provides a method for creating a business keyword library, an intelligent chat guidance method and a device. When creating the business keyword library, based on the interactive voice text information generated by each user, clustering is performed according to the business type to obtain a text information cluster corresponding to each business type. Text analysis is performed on the interactive voice text information under each text information cluster to obtain multiple keywords, and a business keyword library including at least one keyword corresponding to each business type is created. When guiding the chat, the voice text information generated by the user during the chat is subjected to text classification analysis to determine the corresponding target business type, and the voice text information is sequenced and annotated to extract the corresponding business keywords; based on the target business type and the business keywords, the corresponding target business information is queried in the business keyword library, and the target business information is displayed as chat guidance information in the chat background interface when the user is chatting. The method and device provided by the present invention can timely discover the user's potential business intention according to the user's real-time voice text information and the business keyword library, and display the discovered target business information as chat guidance information in the chat background interface, so as to guide the user's chat in a targeted manner and adjust the reply direction in time, thereby meeting the user's potential needs.
[0181] In a specific implementation, the present invention further provides a computer storage medium, wherein the computer storage medium may store a program, and when the program is executed, the program may include some or all of the steps in each embodiment of the business keyword library creation method and the intelligent chat guiding method provided by the present invention. The storage medium may be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM).
[0182] Those skilled in the art can clearly understand that the technology in the embodiments of the present invention can be implemented by means of software plus a necessary general hardware platform. Based on this understanding, the technical solution in the embodiments of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a disk, an optical disk, etc., and includes a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention or some parts of the embodiments.
[0183] The same and similar parts between the various embodiments in this specification can be referred to each other. In particular, for the business keyword library creation device and the intelligent chat guiding device embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the description in the method embodiments.
[0184] The above-described embodiments of the present invention do not limit the protection scope of the present invention.
Claims
1. A method for creating a business keyword library, characterized in that: include: Obtain the interactive voice text information generated by each user; Clustering each interactive voice text information according to the service type to obtain a text information cluster corresponding to each service type, wherein the text information cluster includes multiple interactive voice text information corresponding to the same service type; Performing text analysis on the interactive speech text information in each of the text information clusters to obtain at least one keyword corresponding to each of the interactive speech text information; Calculating a weight value of at least one keyword corresponding to each of the business types; Comparing the weight value of each keyword with a preset threshold; Determine the keyword corresponding to the weight value being greater than or equal to the preset threshold as the target keyword; Obtaining a label for each of the keywords; If the tag is a designated tag, the keyword with the designated tag is used as the preferred keyword; the designated tag is a tag with a specific element type annotation added when the keyword is sequence-annotated; Based on the target keywords and preferred keywords corresponding to each of the business types, a business keyword library is established, and the business keyword library is used to provide chat guidance information based on the voice text information generated by the user when the user is chatting.
2. The method according to claim 1, characterized in that The step of clustering each interactive voice text information according to the service type to obtain a text information cluster corresponding to each service type includes: Extracting the service type label carried in each interactive voice text message; The interactive voice text information corresponding to the same business type label is divided into one category to obtain a text information cluster corresponding to each business type.
3. The method according to claim 1, characterized in that The performing text analysis on the interactive speech text information in each of the text information clusters to obtain at least one keyword corresponding to each interactive speech text information includes: Performing word segmentation processing on the interactive speech text information in each of the text information clusters to obtain a plurality of words corresponding to each of the interactive speech text information; Sequence annotation is performed on each of the words, and the sequence-annotated words are used as keywords corresponding to each interactive voice text information.
4. The method according to claim 1, characterized in that: The calculating the weight value of at least one keyword corresponding to each of the business types includes: Calculate the word frequency of the keyword in the corresponding interactive voice text information, and the inverse text frequency of the keyword in all interactive voice text information; The weight value of the keyword is determined based on the product of the word frequency and the inverse text frequency.
5. An intelligent chat guiding method, characterized in that: The method comprises: Calculate the weight value of at least one keyword corresponding to each business type; Compare the weight value of each keyword with a preset threshold; determine the keyword corresponding to the weight value greater than or equal to the preset threshold as the target keyword; Obtaining a label for each of the keywords; If the tag is a designated tag, the keyword with the designated tag is used as the preferred keyword; the designated tag is a tag with a specific element type annotation added when the keyword is sequence-annotated; Establishing a business keyword library based on the target keywords and preferred keywords corresponding to each business type; Get the voice text information generated by the user during the chat; Performing text classification analysis on the voice text information to determine the target service type corresponding to the voice text information; Perform sequence annotation on the speech text information to extract corresponding business keywords; Based on the target business type and the business keyword, query the business keyword library for corresponding target business information, where the target business information refers to information related to the business keyword corresponding to the target business type; The target business information is displayed as chat guide information in the chat background interface when the user is chatting.
6. The method according to claim 5, characterized in that The performing text classification analysis on the voice text information to determine the target service type corresponding to the voice text information includes: Performing word segmentation processing on the voice text information to obtain a plurality of words corresponding to the voice text information; Calculate the classification probability of each of the words in each business type; The business type corresponding to the highest classification probability of the word is determined as the target business type corresponding to the voice text information.
7. The method according to claim 5, characterized in that Sequence labeling is performed on the speech text information to extract corresponding business keywords, including: Performing word segmentation processing on the voice text information to obtain a plurality of words corresponding to the voice text information; Adding a label to each of the words, wherein the label is used to represent the text category mark of the word; Obtaining a weight value corresponding to each of the tags; The word corresponding to the tag with the highest weight value is determined as the business keyword.
8. The method according to claim 5, characterized in that Displaying the target business information as chat guide information in a chat background interface when the user is chatting, includes: Obtaining a relevance score corresponding to each target business information; Sort the target business information in descending order according to the relevance scores to generate a recommendation list; The recommendation list is displayed as chat guide information in the chat background interface when the user is chatting.
9. A device for creating a business keyword library, characterized in that: include: A historical information acquisition module is used to obtain the interactive voice text information generated by each user; A text clustering module, used for clustering each interactive voice text information according to the service type to obtain a text information cluster corresponding to each service type, wherein the text information cluster includes multiple interactive voice text information corresponding to the same service type; A text analysis module, used for performing text analysis on the interactive speech text information in each of the text information clusters to obtain at least one keyword corresponding to each of the interactive speech text information; A business keyword library creation module, used to calculate the weight value of at least one keyword corresponding to each of the business types; Comparing the weight value of each keyword with a preset threshold; Determine the keyword corresponding to the weight value being greater than or equal to the preset threshold as the target keyword; Obtaining a label for each of the keywords; If the tag is a designated tag, the keyword with the designated tag is used as the preferred keyword; the designated tag is a tag with a specific element type annotation added when the keyword is sequence-annotated; Based on the target keywords and preferred keywords corresponding to each of the business types, a business keyword library is established, and the business keyword library is used to provide chat guidance information based on the voice text information generated by the user when the user is chatting.
10. An intelligent chat guiding device, characterized in that: include: A real-time information acquisition module, used to calculate the weight value of at least one keyword corresponding to each business type; Comparing the weight value of each keyword with a preset threshold; Determine the keyword corresponding to the weight value being greater than or equal to the preset threshold as the target keyword; Obtaining a label for each of the keywords; If the tag is a designated tag, the keyword tagged with the designated tag is used as the preferred keyword; the designated tag is a tag with a specific element type annotation added when the keyword is sequence-annotated; a business keyword library is established based on the target keyword and the preferred keyword corresponding to each business type; and the voice text information generated by the user during the chat is obtained; A text classification analysis module, used to perform text classification analysis on the voice text information to determine the target service type corresponding to the voice text information; A business keyword extraction module, used to perform sequence annotation on the voice text information and extract corresponding business keywords; A target business information query module, configured to query the business keyword library for corresponding target business information based on the target business type and the business keyword, wherein the target business information refers to information related to the business keyword corresponding to the target business type; The chat guide information display module is used to display the target business information as chat guide information in the chat background interface when the user is chatting.
