Artificial intelligence-based speech recommendation method, device, equipment and medium
By using artificial intelligence technology in the chat tool, combining the latest chat information of the first user and the historical information of the second user, generating and integrating speech skills, the problem of too mechanized reply content in the existing system is solved, and the effectiveness of the chat tool is improved. Communication assistance effect.
Patent Information
- Application Number
- CN202111182544.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-11
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2041-10-11
AI Technical Summary
The response content recommended by the existing system in the chat tool is too mechanical, resulting in poor recommendation effect, especially when employees communicate with external customers, it is difficult to provide humanized responses.
Using an artificial intelligence-based method, by obtaining the latest chat information of the first user and the historical chat information of the second user, the pre-trained neural network model is used to generate standard utterances and recommended utterances, and fuse them into the target utterances , sent to the second user terminal to assist communication.
It improves the recommendation effect of reply content, makes the content recommended to the second user more humane, and enhances the communication assistance ability with the first user.
Smart Images

Figure CN113821625B
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology. Specifically, the present application relates to an artificial intelligence-based speech recommendation method, device, equipment and medium. Background Art
[0002] When a user is chatting with other users through a chat tool, the existing system can automatically recommend reply content to the user based on the chat information of other users. However, this reply content only mechanically answers the customer's chat message, so the recommended reply content is relatively simple, resulting in poor recommendation effect.
[0003] For example, when employees are communicating with external customers through chat tools, the system will recommend corresponding responses to customers' questions in real time on the chat interface to assist employees in communicating with customers. However, such responses only mechanically answer customers' questions and are less effective. Summary of the invention
[0004] The main purpose of this application is to provide an artificial intelligence-based speech recommendation method, device, equipment and medium to improve the recommendation effect of reply content.
[0005] In order to achieve the above-mentioned invention object, the present application provides a method for recommending speech based on artificial intelligence, which comprises the following steps:
[0006] When a first user chats with a second user, obtaining the latest chat information sent by the first user;
[0007] Input the chat information into a pre-trained first speech recommendation model to obtain a standard speech to reply the chat information; wherein the first speech recommendation model is a neural network model for generating a standard speech according to the chat information;
[0008] Obtaining historical chat information between the second user and the first user, and inputting the historical chat information into a pre-trained second speech recommendation model to obtain recommended speech; wherein the second speech recommendation model is a neural network model, which is used to generate recommended speech that the first user is interested in based on the historical chat information;
[0009] The recommended speech is integrated with the standard speech to obtain a target speech;
[0010] The target speech is sent to the terminal where the second user is located, so as to be displayed on the chat interface of the terminal, so as to assist the communication between the second user and the first user.
[0011] Preferably, the step of fusing the recommended speech with the standard speech to obtain the target speech includes:
[0012] Determine the start identifier of the recommended speech and the end identifier of the standard speech;
[0013] According to the start identifier and the end identifier, the recommended speech is spliced to the end of the standard speech to generate the target speech.
[0014] Preferably, when the amount of historical chat information between the second user and the first user is lower than a preset value, inputting the historical chat information into a pre-trained second speech recommendation model to obtain a recommended speech includes:
[0015] Acquire user information of the first user, search for users whose similarity with the first user is greater than a preset similarity based on the user information, and generate a user set;
[0016] Chat information of all users in the user set is queried as reference chat information, and the historical chat information and the reference chat information are input into a pre-trained second speech recommendation model to obtain recommended speech.
[0017] Preferably, the step of inputting the historical chat information into a pre-trained second speech recommendation model to obtain a recommended speech includes:
[0018] Get information about current affairs;
[0019] The historical chat information and the current hot topic information are input into a pre-trained second speech recommendation model to obtain recommended speech related to the current hot topic information.
[0020] Preferably, sending the target speech to the terminal where the second user is located includes:
[0021] Calling a natural language processing model to perform semantic analysis on the target speech to obtain a semantic analysis result; wherein the semantic analysis includes any one of lexical analysis, grammatical analysis, and named entity recognition;
[0022] Determining whether the target speech meets the semantic requirements according to the semantic analysis result;
[0023] If so, the target speech is sent to the terminal where the second user is located.
[0024] Preferably, sending the target speech to the terminal where the second user is located so as to display it on the chat interface of the terminal includes:
[0025] evaluating the first user's product preference and purchasing power index for the recommended product according to the historical chat information;
[0026] The first user is scored according to the product preference and purchasing power index; wherein the score is used to evaluate the purchase probability of the first user purchasing the recommended product; the target speech and the score are sent to the terminal where the second user is located to be displayed on the chat interface of the terminal.
[0027] Furthermore, after sending the target speech to the terminal where the second user is located so as to display it on the chat interface of the terminal, the method further includes:
[0028] Obtaining reply information of the second user in replying to the latest chat information;
[0029] Determining whether there are any words that do not conform to the specification in the reply information;
[0030] If so, a warning notification is generated and sent to the terminal where the second user is located.
[0031] The present application also provides a speech recommendation device based on artificial intelligence, comprising:
[0032] An acquisition module, used for acquiring the latest chat information sent by the first user when the first user chats with the second user;
[0033] A first input module is used to input the chat information into a pre-trained first speech recommendation model to obtain a standard speech for replying the chat information; wherein the first speech recommendation model is a neural network model, which is used to generate a standard speech according to the chat information;
[0034] A second input module is used to obtain historical chat information between the second user and the first user, and input the historical chat information into a pre-trained second speech recommendation model to obtain recommended speech; wherein the second speech recommendation model is a neural network model, which is used to generate recommended speech that the first user is interested in based on the historical chat information;
[0035] A fusion module, used for fusing the recommended speech with the standard speech to obtain a target speech;
[0036] A sending module is used to send the target speech to the terminal where the second user is located so as to display it on the chat interface of the terminal to assist the communication between the second user and the first user.
[0037] The present application also provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any one of the above methods when executing the computer program.
[0038] The present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above methods are implemented.
[0039] The present application provides a method, device, equipment and medium for recommending speech based on artificial intelligence. When the first user and the second user chat, the latest chat message sent by the first user is obtained, the chat message is input into the pre-trained first speech recommendation model, and the standard speech for replying to the chat message is obtained. Then, the historical chat message between the second user and the first user is obtained, and the historical chat message is input into the pre-trained second speech recommendation model to obtain the recommended speech of interest to the first user. The recommended speech is integrated with the standard speech to obtain the target speech, and the target speech is sent to the terminal where the second user is located to be displayed on the chat interface of the terminal to assist the communication between the second user and the first user. When receiving the chat message of the first user, the present application recommends the target speech obtained by integrating the recommended speech of interest to the first user and the standard speech corresponding to the chat message to the second user, so that the reply content recommended to the second user is more humane and the recommendation effect of the reply content is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 This is a flowchart of a method for recommending speech based on artificial intelligence according to an embodiment of the present application;
[0041] Figure 2 This is a schematic block diagram of the structure of a speech recommendation device based on artificial intelligence according to an embodiment of the present application;
[0042] Figure 3 A schematic block diagram of the structure of a computer device according to an embodiment of the present application.
[0043] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0044] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0045] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0046] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0047] refer to Figure 1 The present application proposes a method for recommending words based on artificial intelligence, with a server as the execution body, which is connected to the terminal where the first user is located and the terminal where the second user is located respectively. The server can be an independent server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), as well as big data and artificial intelligence platforms.
[0048] In this application, the speech recommendation method based on artificial intelligence is used to improve the recommendation effect of the reply content, referring to Figure 1 In one embodiment, the artificial intelligence-based speech recommendation method includes the following steps:
[0049] S11. When the first user is chatting with the second user, obtaining the latest chat information sent by the first user;
[0050] S12, inputting the chat information into a pre-trained first speech recommendation model to obtain a standard speech for replying the chat information; wherein the first speech recommendation model is a neural network model, which is used to generate a standard speech according to the chat information;
[0051] S13, obtaining historical chat information between the second user and the first user, and inputting the historical chat information into a pre-trained second speech recommendation model to obtain recommended speech; wherein the second speech recommendation model is a neural network model, which is used to generate recommended speech that the first user is interested in based on the historical chat information;
[0052] S14, integrating the recommended speech with the standard speech to obtain a target speech;
[0053] S15. Send the target speech to the terminal where the second user is located, so as to be displayed on the chat interface of the terminal, so as to assist the communication between the second user and the first user.
[0054] As described in step S11 above, when the first user sends a chat message to the second user, the server first obtains the chat message and forwards the chat message to the second user. The chat message generally includes questions, such as questions about products; it can also be difficult to answer objection questions, such as "not interested in the product", "the product is too expensive, and there is no extra money to buy" and other questions raised by customers.
[0055] As described in the above step S12, since the first user may ask questions or raise difficult-to-answer objection questions during the chat process, it is difficult for the second user to answer the above questions in a timely and accurate manner. Therefore, the chat information of the first user is obtained and input into the first standard speech prediction model. The first standard speech prediction model is a trained neural network model, which can automatically generate standard speech based on the chat information of the first user. The standard speech is generally a relatively mechanical reply. For example, when the first user asks about the price of a product, the corresponding standard speech is generally 10 yuan, 100 yuan, etc.
[0056] In one embodiment, when training the first standard speech prediction model, a large amount of sample data can be first obtained, and the sample data can be divided into a training set and a test set, wherein the sample data includes the user's chat information and the standard speech corresponding to the user's chat information, and the chat information can be content information after the modal particles in the user's chat information are deleted and the keywords in the chat information are screened. Then the sample data of the training set is input into a preset neural network model for training, and a result training model for automatically generating standard speech according to the user's chat information is obtained. For the result training model obtained by training, the chat information corresponding to the known speech in the sample data of the test set is input into the result training model to predict the standard speech, and the known speech is compared with the standard speech to verify whether it meets the requirements. When the verification is passed, the result training model that has completed the training is used as the first speech recommendation model, otherwise, the parameters of the result training model are adjusted, and the adjusted result training model is trained again using the sample data of the training set until the verification is passed.
[0057] As described in step S13 above, this embodiment can also obtain historical chat information between the second user and the first user, input the historical chat information into the pre-trained second speech recommendation model, and the second speech recommendation model performs a user profile of the first user based on the historical chat information, determines the content that the first user is interested in, and generates a recommended speech containing the content of interest. For example, when the historical chat information includes a large amount of information about stocks, after performing a user profile of the first user based on the historical chat information, it can be inferred that the first user is more interested in stocks, and a recommended speech containing stocks is generated. For example, when the first user asks about the price of product A, the corresponding standard speech is "100 yuan", and the recommended speech can be "By the way, are there any other stocks that you are paying attention to recently?".
[0058] As described in the above step S14, this embodiment merges the obtained recommended speech with the standard speech to generate the target speech, such as splicing the recommended speech after the standard speech, so as to send the chat topic of interest to the first user after replying to the chat message of the first user, such as the final target speech can be "The price of product A is 100 yuan. By the way, which stock are you paying attention to recently?"; or select several keywords from the recommended speech, add the keywords to the standard speech, and obtain the target speech.
[0059] As described in the above step S15, when the second user is detected to click on the chat input box of the chat interface, the chat input box may pop up, and the target speech may be displayed around the chat input box of the second user's terminal for selection by the second user, so as to assist the communication between the second user and the first user. When the second user clicks on the target speech, the target speech is loaded into the chat input box, and when the sending instruction generated by the second user clicking on the send button of the chat input box is received, the target speech is sent to the first user.
[0060] The present application provides an artificial intelligence-based speech recommendation method, which obtains the latest chat information sent by the first user when the first user chats with the second user, inputs the chat information into a pre-trained first speech recommendation model, obtains standard speech for replying to the chat information, then obtains historical chat information between the second user and the first user, inputs the historical chat information into a pre-trained second speech recommendation model, obtains recommended speech of interest to the first user, fuses the recommended speech with the standard speech to obtain the target speech, and sends the target speech to the terminal where the second user is located to display it on the chat interface of the terminal, so as to assist the communication between the second user and the first user. When receiving the chat information of the first user, the present application recommends the target speech obtained by fusing the recommended speech of interest to the first user and the standard speech corresponding to the chat information to the second user, so as to make the reply content recommended to the second user more humane and improve the recommendation effect of the reply content.
[0061] In one embodiment, in step S14, the step of fusing the recommended speech with the standard speech to obtain the target speech may specifically include:
[0062] S141, determining the start identifier of the recommended speech and the end identifier of the standard speech;
[0063] S142. According to the start identifier and the end identifier, the recommended speech is concatenated to the end of the standard speech to generate a target speech.
[0064] This embodiment can locate the start identifier of the recommended speech and the end identifier of the standard speech, splice the recommended speech to the end of the standard speech to form the target speech, and display the standard speech in front, which can highlight the standard speech. Among them, the start identifier is the mark symbol at the start position of the text, and the end identifier is the mark symbol at the end position of the text.
[0065] In one embodiment, when the amount of historical chat information between the second user and the first user is lower than a preset value, in step S12, inputting the historical chat information into a pre-trained second speech recommendation model to obtain a recommended speech may specifically include:
[0066] S121, obtaining user information of the first user, searching for users whose similarity with the first user is greater than a preset similarity based on the user information, and generating a user set;
[0067] S122. Query the chat information of all users in the user set as reference chat information, input the historical chat information and the reference chat information into a pre-trained second speech recommendation model to obtain recommended speech.
[0068] In this embodiment, a similar user set, i.e., a user set, can be calculated based on the user information of the first user, and then the historical browsing history of the first user can be queried to obtain the material that is of most interest in the recent period, and then the user set of the material can be obtained. Since the business plan here includes other types of plans in addition to the material, and all plans are related to the specific business stage of the user, when taking the user set, we will first perform a rough screening based on the business stage label, and then calculate the similarity of the plan through the cosine distance of the specific plan label, so as to finely screen the user set of plans that meet the business requirements. Specifically, a label representing the user characteristics of the first user is extracted from the user information of the first user, and the label is converted into a word vector using a pre-trained Word2Vec word vector model to obtain a first word vector; and labels of other users are obtained, and the labels of other users are respectively converted into word vectors using the Word2Vec word vector model to obtain multiple second word vectors, and the cosine distances between the first word vector and the multiple second word vectors are respectively calculated, and the second word vectors and their corresponding users whose cosine distances to the first word vector are within a preset distance are screened out, that is, users whose similarity to the first user is greater than a preset similarity, and a user set is generated, and the user set includes users whose similarity to the first user is greater than a preset similarity.
[0069] Among them, the Word2Vec word vector model is a model that learns semantic knowledge from a large amount of text in an unsupervised way. It trains a large amount of text and represents the words in the text in the form of vectors. We call this vector a word vector. By calculating the distance between the word vectors of two words, we can know the connection between the two words.
[0070] For example, the chat assistant configured on the server will automatically identify the customer's label, including basic information, source channels, business stage, etc. At the same time, the chat assistant will identify the customer's browsing records of the content forwarded by the agent, and depict the customer's behavior trajectory in the time dimension, helping the agent to clearly understand the interaction record with the customer. Based on the customer information, the chat assistant will also recommend personalized information content or insurance products suitable for this customer, helping the agent to manage customers more accurately.
[0071] In one embodiment, in step S12, inputting the historical chat information into a pre-trained second speech recommendation model to obtain a recommended speech may specifically include:
[0072] Get information about current affairs;
[0073] The historical chat information and the current hot topic information are input into a pre-trained second speech recommendation model to obtain recommended speech related to the current hot topic information.
[0074] In this embodiment, the second speech recommendation model can be used to automatically generate ice-breaking texts or current hot topics texts as recommended speech to the second user, so that the generated target speech contains the current hot topics information that the first user is interested in. Among them, ice-breaking texts are warm-up texts recommended when the first user and the second user chat for the first time or have not chatted for a long time.
[0075] In one embodiment, sending the target speech to the terminal where the second user is located may specifically include:
[0076] Calling a natural language processing model to perform semantic analysis on the target speech to obtain a semantic analysis result; wherein the semantic analysis includes any one of lexical analysis, grammatical analysis, and named entity recognition;
[0077] Determining whether the target speech meets the semantic requirements according to the semantic analysis result;
[0078] If so, the target speech is sent to the terminal where the second user is located.
[0079] In order to monitor the compliance of the target speech, intelligent quality inspection will be carried out to ensure that the second user's speech will not mislead customers. Specifically, the natural language processing model can be called to perform semantic analysis on the target speech, so as to determine whether the target speech meets the semantic requirements based on the semantic analysis; when the requirements are met, the target speech will be displayed on the chat interface of the second user.
[0080] Among them, the semantic analysis includes any one or a combination of lexical analysis, grammatical analysis, and named entity recognition, the purpose of which is to perform text structured processing on the target speech. To achieve the semantic analysis, the natural language processing model may include a trained natural language processing neural network, which can determine the specific content of each dimension carried by the target speech through the target speech. For example, the lexical analysis mentioned above can analyze each word in the target speech, the grammatical analysis can analyze the meaning of the sentence composed of multiple words in the target speech, and the named entity recognition can analyze the named entity corresponding to the word (that is, to analyze which type of named entity the word belongs to, such as name, time, number, etc.). Through the above semantic analysis, the natural language meaning of the target speech can be determined, and the semantic analysis result can be obtained. Then, according to the semantic analysis result, it can be determined whether the target speech meets the semantic requirements. If so, the target speech is sent to the terminal where the second user is located, so that the target speech recommended to the second user meets the semantic requirements.
[0081] In one embodiment, in step S15, sending the target speech to the terminal where the second user is located so as to display it on the chat interface of the terminal may specifically include:
[0082] S151, evaluating the first user's product preference and purchasing power index for the recommended product according to the historical chat information;
[0083] S152: Score the first user according to the product preference and purchasing power index; wherein the score is used to evaluate the purchase probability of the first user purchasing the product to be recommended;
[0084] S153: Send the target speech and score to the terminal where the second user is located, so as to display them on the chat interface of the terminal.
[0085] In this embodiment, the server will score the first user based on the conversation archive data (i.e., historical chat information) of the first user and the second user, mine and judge the customer's business value, and send the target speech and score to the terminal where the second user is located. The business value includes the user's potential to purchase the recommended product.
[0086] Specifically, all the recommended products mentioned by the first user can be extracted from the historical chat information, and all the recommended products are products that the user is interested in. Then, the number of times each recommended product appears in the historical chat information is counted, and the number of times each recommended product appears in the historical chat information is accumulated to obtain the total number of times. The first user's product preference for each recommended product is calculated based on the number of times each recommended product appears in the historical chat information and the total number of times. At the same time, the first user's purchase record is screened from the historical chat information, and the purchasing power index of the first user for the recommended product is determined based on the purchase record. The higher the cumulative purchase amount in the purchase record, the higher the purchasing power index. Finally, the score of the first user is calculated based on the product preference and the purchasing power index, such as multiplying the product preference and the purchasing power index to obtain the score of the first user. The score is used to evaluate the purchase probability of the first user purchasing the recommended product. The higher the score, the greater the purchase probability.
[0087] In addition, they can also be sorted according to the scores to help the second user clearly understand the business value of the first user, give priority to high-value users, and improve business conversion rate.
[0088] In one embodiment, after sending the target speech to the terminal where the second user is located so as to display it on the chat interface of the terminal, the method may further include:
[0089] Obtaining reply information of the second user in replying to the latest chat information;
[0090] Determining whether there are any words that do not conform to the specification in the reply information;
[0091] If so, a warning notification is generated and sent to the terminal where the second user is located.
[0092] When the second user chats with the first user, in order to avoid problems with the conversation style or words in the second user's reply, it is necessary to analyze the second user's reply in real time, wherein the method of real-time analysis specifically includes receiving the reply information input by the second user to reply to the first user, and judging whether there are words that do not conform to the specification in the reply information. The reply information is the information generated by the second user after referring to the target speech, and may include the content information of the target speech.
[0093] Specifically, the reply information of the second user is extracted to obtain multiple character strings, and the multiple character strings are matched with non-standard target words in a pre-stored speech library, wherein the non-standard target words include some sensitive words and abusive words. When at least one character string among the multiple character strings successfully matches the non-standard target words in the pre-stored speech library, a warning notification will be generated to remind the second user to pay attention to the chat method, so that the second user can pay attention to his or her chat method in time and make corrections in time.
[0094] Reference Figure 2 In an embodiment of the present application, there is also provided an artificial intelligence-based speech recommendation device, comprising:
[0095] The acquisition module 11 is used to acquire the latest chat information sent by the first user when the first user chats with the second user;
[0096] The first input module 12 is used to input the chat information into a pre-trained first speech recommendation model to obtain a standard speech for replying the chat information; wherein the first speech recommendation model is a neural network model, which is used to generate a standard speech according to the chat information;
[0097] A second input module 13 is used to obtain historical chat information between the second user and the first user, and input the historical chat information into a pre-trained second speech recommendation model to obtain recommended speech; wherein the second speech recommendation model is a neural network model, which is used to generate recommended speech that the first user is interested in based on the historical chat information;
[0098] A fusion module 14 is used to fuse the recommended speech with the standard speech to obtain a target speech;
[0099] The sending module 15 is used to send the target speech to the terminal where the second user is located, so as to display it on the chat interface of the terminal, so as to assist the communication between the second user and the first user.
[0100] In this embodiment, when the first user sends a chat message to the second user, the server first obtains the chat message and forwards the chat message to the second user. The chat message generally includes questions, such as questions about products; it can also be difficult to answer objection questions, such as "not interested in the product", "the product is too expensive, and there is no extra money to buy" and other questions raised by customers.
[0101] Since the first user may ask questions or raise difficult-to-answer objection questions during the chat, it is difficult for the second user to answer the above questions in a timely and accurate manner. Therefore, the chat information of the first user is input into a first standard speech prediction model. The first standard speech prediction model is a trained neural network model, which can automatically generate standard speech based on the chat information of the first user. The standard speech is generally a relatively mechanical reply. For example, when the first user asks about the price of a product, the corresponding standard speech is generally 10 yuan, 100 yuan, etc.
[0102] In one embodiment, when training the first standard speech prediction model, a large amount of sample data can be first obtained, and the sample data can be divided into a training set and a test set, wherein the sample data includes the user's chat information and the standard speech corresponding to the user's chat information, and the chat information can be content information after the modal particles in the user's chat information are deleted and the keywords in the chat information are screened. Then the sample data of the training set is input into a preset neural network model for training, and a result training model for automatically generating standard speech according to the user's chat information is obtained. For the result training model obtained by training, the chat information corresponding to the known speech in the sample data of the test set is input into the result training model to predict the standard speech, and the known speech is compared with the standard speech to verify whether it meets the requirements. When the verification is passed, the result training model that has completed the training is used as the first speech recommendation model, otherwise, the parameters of the result training model are adjusted, and the adjusted result training model is trained again using the sample data of the training set until the verification is passed.
[0103] This embodiment can also obtain the historical chat information between the second user and the first user, input the historical chat information into the pre-trained second speech recommendation model, and the second speech recommendation model will perform a user profile of the first user based on the historical chat information, determine the content that the first user is interested in, and generate a recommended speech containing the content of interest. For example, when the historical chat information includes a lot of information about stocks, after performing a user profile of the first user based on the historical chat information, it can be inferred that the first user is more interested in stocks, and a recommended speech containing stocks is generated. For example, when the first user asks about the price of product A, the corresponding standard speech is "100 yuan", then the recommended speech can be "By the way, are there any other stocks that you are paying attention to recently?"
[0104] In this embodiment, the obtained recommended speech is merged with the standard speech to generate the target speech, such as splicing the recommended speech after the standard speech, so as to send the chat topic of interest to the first user after replying to the chat message of the first user, such as the final target speech can be "The price of product A is 100 yuan. By the way, which stock are you paying attention to recently?"; or a number of keywords are selected from the recommended speech, and the keywords are added to the standard speech to obtain the target speech.
[0105] When the second user clicks on the chat input box of the chat interface, the chat input box may pop up, and the target speech may be displayed around the chat input box of the second user's terminal for selection by the second user, so as to assist the communication between the second user and the first user. When the second user clicks on the target speech, the target speech is loaded into the chat input box, and when the sending instruction generated by the second user clicking on the send button of the chat input box is received, the target speech is sent to the first user.
[0106] As described above, it can be understood that the various components of the artificial intelligence-based speech recommendation device proposed in this application can realize the functions of any of the artificial intelligence-based speech recommendation methods described above, and the specific structure will not be repeated.
[0107] Reference Figure 3 In the embodiment of the present application, a computer device is also provided, whose internal structure can be as follows Figure 3As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor designed by the computer is used to provide computing and control capabilities. The memory of the computer device includes a storage medium and an internal memory. The storage medium stores an operating system, a computer program and a database. The memory provides an environment for the operation of the operating system and the computer program in the storage medium. The database of the computer device is used to store data such as chat information and standard speech. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a speech recommendation method based on artificial intelligence is implemented.
[0108] The processor executes the artificial intelligence-based speech recommendation method, including:
[0109] When a first user chats with a second user, obtaining the latest chat information sent by the first user;
[0110] Input the chat information into a pre-trained first speech recommendation model to obtain a standard speech to reply the chat information; wherein the first speech recommendation model is a neural network model for generating a standard speech according to the chat information;
[0111] Obtaining historical chat information between the second user and the first user, and inputting the historical chat information into a pre-trained second speech recommendation model to obtain recommended speech; wherein the second speech recommendation model is a neural network model, which is used to generate recommended speech that the first user is interested in based on the historical chat information;
[0112] The recommended speech is integrated with the standard speech to obtain a target speech;
[0113] The target speech is sent to the terminal where the second user is located, so as to be displayed on the chat interface of the terminal, so as to assist the communication between the second user and the first user.
[0114] An embodiment of the present application further provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, a method for recommending speech based on artificial intelligence is implemented, including the steps of:
[0115] When a first user chats with a second user, obtaining the latest chat information sent by the first user;
[0116] Input the chat information into a pre-trained first speech recommendation model to obtain a standard speech to reply the chat information; wherein the first speech recommendation model is a neural network model for generating a standard speech according to the chat information;
[0117] Obtaining historical chat information between the second user and the first user, and inputting the historical chat information into a pre-trained second speech recommendation model to obtain recommended speech; wherein the second speech recommendation model is a neural network model, which is used to generate recommended speech that the first user is interested in based on the historical chat information;
[0118] The recommended speech is integrated with the standard speech to obtain a target speech;
[0119] The target speech is sent to the terminal where the second user is located, so as to be displayed on the chat interface of the terminal, so as to assist the communication between the second user and the first user.
[0120] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media provided in the present application and used in the embodiments can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double-speed data rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0121] In summary, the greatest beneficial effects of this application are:
[0122] The present application provides a method, device, equipment and medium for recommending speech based on artificial intelligence. When the first user and the second user chat, the latest chat message sent by the first user is obtained, the chat message is input into the pre-trained first speech recommendation model, and the standard speech for replying to the chat message is obtained. Then, the historical chat message between the second user and the first user is obtained, and the historical chat message is input into the pre-trained second speech recommendation model to obtain the recommended speech of interest to the first user. The recommended speech is integrated with the standard speech to obtain the target speech, and the target speech is sent to the terminal where the second user is located to be displayed on the chat interface of the terminal to assist the communication between the second user and the first user. When receiving the chat message of the first user, the present application recommends the target speech obtained by integrating the recommended speech of interest to the first user and the standard speech corresponding to the chat message to the second user, so that the reply content recommended to the second user is more humane and the recommendation effect of the reply content is improved.
[0123] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, device, article or method including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, device, article or method. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the existence of other identical elements in the process, device, article or method including the element.
[0124] The above description is only a preferred embodiment of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A speech recommendation method based on artificial intelligence, characterized in that: include: When a first user chats with a second user, obtaining the latest chat information sent by the first user; Input the chat information into a pre-trained first speech recommendation model to obtain a standard speech to reply the chat information; wherein the first speech recommendation model is a neural network model for generating a standard speech according to the chat information; Obtaining historical chat information between a second user and the first user, inputting the historical chat information into a pre-trained second speech recommendation model, wherein the second speech recommendation model performs a user profile of the first user based on the historical chat information, determines the content that the first user is interested in, and obtains recommended speech; wherein the second speech recommendation model is a neural network model, which is used to generate recommended speech that the first user is interested in based on the historical chat information; The recommended speech is integrated with the standard speech to obtain a target speech; Sending the target speech to the terminal where the second user is located, so as to display it on the chat interface of the terminal, so as to assist the second user in communicating with the first user; The step of sending the target speech to the terminal where the second user is located, so as to display the target speech on the chat interface of the terminal, includes: evaluating the first user's product preference and purchasing power index for the recommended product according to the historical chat information; Scoring the first user according to the product preference and purchasing power index; wherein the score is used to evaluate the purchase probability of the first user purchasing the product to be recommended; Sending the target speech and the score to the terminal where the second user is located, so as to display them on the chat interface of the terminal; The step of evaluating the first user's product preference and purchasing power index for the recommended product according to the historical chat information comprises: Extracting all the products to be recommended mentioned by the first user from the historical chat information, and all the products to be recommended are products that the user is interested in; Counting the number of times each of the to-be-recommended products appears in the historical chat information, and accumulating the number of times each of the to-be-recommended products appears in the historical chat information to obtain a total number of times; Calculating the first user's product preference for each product to be recommended based on the number of times and the total number of times each product to be recommended appears in the historical chat information; The purchase record of the first user is screened out from the historical chat information, and the purchasing power index of the first user for the recommended product is determined according to the purchase record.
2. The method according to claim 1, characterized in that The step of fusing the recommended speech with the standard speech to obtain the target speech includes: Determine the start identifier of the recommended speech and the end identifier of the standard speech; According to the start identifier and the end identifier, the recommended speech is spliced to the end of the standard speech to generate the target speech.
3. The method according to claim 1, characterized in that When the amount of historical chat information between the second user and the first user is lower than a preset value, inputting the historical chat information into a pre-trained second speech recommendation model to obtain a recommended speech, including: Acquire user information of the first user, search for users whose similarity with the first user is greater than a preset similarity based on the user information, and generate a user set; Chat information of all users in the user set is queried as reference chat information, and the historical chat information and the reference chat information are input into a pre-trained second speech recommendation model to obtain recommended speech.
4. The method according to claim 1, characterized in that The step of inputting the historical chat information into a pre-trained second speech recommendation model to obtain a recommended speech includes: Get information about current affairs; The historical chat information and the current hot topic information are input into a pre-trained second speech recommendation model to obtain recommended speech related to the current hot topic information.
5. The method according to claim 1, characterized in that The sending the target speech to the terminal where the second user is located includes: Calling a natural language processing model to perform semantic analysis on the target speech to obtain a semantic analysis result; wherein the semantic analysis includes any one of lexical analysis, grammatical analysis, and named entity recognition; Determining whether the target speech meets the semantic requirements according to the semantic analysis result; If so, the target speech is sent to the terminal where the second user is located.
6. The method according to claim 1, characterized in that After sending the target speech to the terminal where the second user is located so as to display it on the chat interface of the terminal, the method further includes: Obtaining reply information of the second user in replying to the latest chat information; Determining whether there are any words that do not conform to the specification in the reply information; If so, a warning notification is generated and sent to the terminal where the second user is located.
7. A speech recommendation device based on artificial intelligence, characterized in that: include: An acquisition module, used for acquiring the latest chat information sent by the first user when the first user chats with the second user; A first input module is used to input the chat information into a pre-trained first speech recommendation model to obtain a standard speech for replying the chat information; wherein the first speech recommendation model is a neural network model, which is used to generate a standard speech according to the chat information; A second input module is used to obtain historical chat information between a second user and the first user, and input the historical chat information into a pre-trained second speech recommendation model, wherein the second speech recommendation model performs a user profile of the first user based on the historical chat information, determines the content that the first user is interested in, and obtains recommended speech; wherein the second speech recommendation model is a neural network model, and is used to generate recommended speech that the first user is interested in based on the historical chat information; A fusion module, used for fusing the recommended speech with the standard speech to obtain a target speech; A sending module, used for sending the target speech to the terminal where the second user is located, so as to display it on the chat interface of the terminal, so as to assist the communication between the second user and the first user; The step of sending the target speech to the terminal where the second user is located, so as to display the target speech on the chat interface of the terminal, includes: evaluating the first user's product preference and purchasing power index for the recommended product according to the historical chat information; Scoring the first user according to the product preference and purchasing power index; wherein the score is used to evaluate the purchase probability of the first user purchasing the product to be recommended; Sending the target speech and the score to the terminal where the second user is located, so as to display them on the chat interface of the terminal; The step of evaluating the first user's product preference and purchasing power index for the recommended product according to the historical chat information comprises: Extracting all the products to be recommended mentioned by the first user from the historical chat information, and all the products to be recommended are products that the user is interested in; Counting the number of times each of the to-be-recommended products appears in the historical chat information, and accumulating the number of times each of the to-be-recommended products appears in the historical chat information to obtain a total number of times; Calculating the first user's product preference for each product to be recommended based on the number of times and the total number of times each product to be recommended appears in the historical chat information; The purchase record of the first user is screened out from the historical chat information, and the purchasing power index of the first user for the recommended product is determined according to the purchase record.
8. A computer device, characterized in that: include: processor; Memory; Wherein, the memory stores a computer program, and the computer program is configured to be executed by the processor, and when the processor executes the computer program, the artificial intelligence-based speech recommendation method described in any one of claims 1-6 is implemented.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the artificial intelligence-based speech recommendation method described in any one of claims 1 to 6.
