Information recommendation method, device, computer equipment and storage medium
By extracting and filtering the semantic features of historical conversation data, a high-quality question and answer database is established, which solves the problem that the intelligent question and answer system cannot sense user emotions, improves service quality and efficiency, and ensures that the intelligent system provides better services.
Patent Information
- Application Number
- CN202011033050.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-09-27
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2040-09-27
AI Technical Summary
Intelligent question and answer systems cannot sense user emotions when answering user questions, resulting in mechanical responses and the inability to adjust the answer method and content in a timely manner based on user feedback, which reduces service efficiency and quality.
By extracting semantic features from historical conversation data, a high-quality question and answer database is established, using pre-trained semantic recognition models to filter out target historical conversation data, determining high-quality content based on emotion and evaluation parameters, and recommending it to the intelligent question and answer system to improve service quality.
It improves the service quality and efficiency of the intelligent question and answer system, ensuring that the intelligent system can filter out high-quality information based on historical data, provide better services, and flexibly respond to user needs.
Smart Images

Figure CN112163075B
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to an information recommendation method, apparatus, computer equipment and storage medium. Background Art
[0002] The online customer service system provides a platform for enterprises to communicate with users. It is one of the indispensable tools for enterprises to provide customer service. Users consult business through the online customer service system provided by enterprises. With the development of artificial intelligence technology, the intelligent question-and-answer system, as one of the future trends of the development of online customer service systems, has established a fast and effective solution for the communication between enterprises and massive users.
[0003] However, the intelligent question-and-answer system is unable to perceive user emotions in the process of answering user questions. Especially in the application scenario of business complaints, the intelligent question-and-answer system mechanically responds to user feedback and is unable to change the way and content of the answer in a timely manner based on user experience feedback on the question and answer, resulting in a poor user service experience and reducing the service efficiency and service quality of the intelligent question-and-answer system. Summary of the invention
[0004] In view of this, the embodiments of the present disclosure at least provide an information recommendation method, apparatus, computer device and storage medium to improve the service quality and service efficiency of the intelligent question and answer system.
[0005] In a first aspect, an embodiment of the present disclosure provides an information recommendation method, including:
[0006] Upon receiving the first type of text information, extracting a first semantic feature of the first type of text information;
[0007] Searching for a target semantic feature that matches the first semantic feature from a pre-established database, wherein the database contains a correspondence between the first category of text information, the second category of text information, and the semantic features corresponding to the first category of text information;
[0008] Get the second type of text information corresponding to the target semantic feature and return it.
[0009] In a possible implementation manner, the database is established according to the following method:
[0010] Acquire a plurality of historical conversation data, wherein the historical conversation data includes first-category text information and its corresponding second-category text information and level information corresponding to the historical conversation data;
[0011] Based on the level information, using a pre-trained semantic recognition model to determine whether each historical conversation data is target historical conversation data, wherein the semantic recognition model is trained based on historical conversation sample data with labels;
[0012] In the case where it is determined that any historical conversation data is target historical conversation data, extracting a second semantic feature of the first type of text information contained in the target historical conversation data;
[0013] A corresponding relationship between the first type of text information contained in the target historical conversation data and its corresponding second type of text information and the second semantic feature is established and added to the database.
[0014] In a possible implementation, the level information includes a sentiment parameter; and
[0015] The emotion parameter is generated according to the following method:
[0016] For any piece of first-category text information included in the historical conversation data, determine a sentiment score of the piece of first-category text information using a pre-trained sentiment classification model;
[0017] Determine the average of the sentiment scores of all the first-category text information included in the historical conversation data as the sentiment parameter of the historical conversation data.
[0018] In a possible implementation manner, the level information further includes evaluation parameters; and
[0019] Based on the level information, a pre-trained semantic recognition model is used to determine whether each historical conversation data is the target historical conversation data, specifically including:
[0020] Based on the evaluation parameters and sentiment parameters, determining the score of each historical conversation data using the semantic recognition model;
[0021] Arrange the plurality of pieces of historical conversation data in descending order according to the score corresponding to each piece of historical conversation data;
[0022] According to the arrangement order of each historical session data, a preset number of historical session data are selected as target historical session data.
[0023] In a possible implementation, based on the level information, a pre-trained semantic recognition model is used to determine whether each historical session data is target historical session data, specifically including:
[0024] Based on the evaluation parameters and sentiment parameters, determining the score of each historical conversation data using the semantic recognition model;
[0025] Arrange the plurality of pieces of historical conversation data in descending order according to the score corresponding to each piece of historical conversation data;
[0026] The historical session data having a score not less than a preset threshold is determined as the target historical session data, where the preset threshold is a score corresponding to the last historical session data that meets a preset ratio and is selected according to an arrangement order of the historical session data.
[0027] In a possible implementation manner, the historical conversation data includes voice data and picture data; and
[0028] Before determining whether the historical conversation data is target historical conversation data by using a pre-trained semantic recognition model based on the level information, the method further includes:
[0029] The image data is deleted, and the voice data is converted into text data; or, the voice data and the image data are converted into text data.
[0030] In a possible implementation, searching a pre-established database for a target semantic feature that matches the first semantic feature includes:
[0031] Determining the similarity between the first semantic feature and the semantic features of each first category of text information in the database;
[0032] The semantic feature with the greatest correlation is determined as the target semantic feature matching the first semantic feature.
[0033] In a second aspect, the present disclosure also provides an information recommendation device, including:
[0034] An extraction module, configured to extract a first semantic feature of the first category of text information when receiving the first category of text information;
[0035] A search module, used to search a target semantic feature matching the first semantic feature from a pre-established database, wherein the database contains a correspondence between the first category of text information, the second category of text information, and the semantic features corresponding to the first category of text information;
[0036] The acquisition module is used to obtain the second type of text information corresponding to the target semantic feature and return it.
[0037] In a possible implementation manner, the device further includes an establishing module and a judging module; and
[0038] The acquisition module is further used to acquire a number of historical conversation data, wherein the historical conversation data includes the first type of text information and its corresponding second type of text information and the level information corresponding to the historical conversation data;
[0039] The judgment module is used to judge whether each historical conversation data is target historical conversation data based on the level information by using a pre-trained semantic recognition model, wherein the semantic recognition model is trained based on historical conversation sample data with labels;
[0040] The extraction module is further configured to extract the second semantic feature of the first type of text information contained in the target historical conversation data when the judgment module judges that any historical conversation data is the target historical conversation data;
[0041] The establishing module is used to establish the corresponding relationship between the first type of text information contained in the target historical conversation data and its corresponding second type of text information and the second semantic feature and add it to the database.
[0042] In a possible implementation, the level information includes a sentiment parameter; and
[0043] The device also includes a generating module;
[0044] The generation module is used to determine the sentiment score of any first-category text information contained in the historical conversation data using a pre-trained sentiment classification model; and determine the average sentiment score of all first-category text information contained in the historical conversation data as the sentiment parameter of the historical conversation data.
[0045] In a possible implementation manner, the level information further includes evaluation parameters; and
[0046] The judgment module is specifically used to determine the score of each historical conversation data based on the evaluation parameters and sentiment parameters using the semantic recognition model; arrange the plurality of historical conversation data in descending order according to the score corresponding to each historical conversation data; and select a preset number of historical conversation data as target historical conversation data according to the arrangement order of each historical conversation data.
[0047] In a possible implementation, the judgment module is specifically configured to determine the score of each historical conversation data based on the evaluation parameter and the sentiment parameter using the semantic recognition model;
[0048] Arrange the plurality of pieces of historical conversation data in descending order according to the score corresponding to each piece of historical conversation data;
[0049] The historical session data having a score not less than a preset threshold is determined as the target historical session data, where the preset threshold is a score corresponding to the last historical session data that meets a preset ratio and is selected according to an arrangement order of the historical session data.
[0050] In a possible implementation manner, the historical conversation data includes voice data and picture data; and
[0051] The device also includes a deletion module and a conversion module;
[0052] The deleting module is used to delete the image data before the judging module judges whether the historical session data is the target historical session data based on the level information by using a pre-trained semantic recognition model;
[0053] The conversion module is used to convert the voice data into text data, or convert the voice data and the image data into text data, before the judgment module determines whether the historical conversation data is the target historical conversation data based on the level information using a pre-trained semantic recognition model.
[0054] In a possible implementation, the search module is specifically used to determine the similarity between the first semantic feature and the semantic features of each first category of text information in the database; and determine the semantic feature with the greatest correlation as the target semantic feature matching the first semantic feature.
[0055] In a third aspect, an embodiment of the present disclosure further provides a computer device, comprising: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the computer device is running, the processor and the memory communicate via the bus, and when the machine-readable instructions are executed by the processor, the steps of the above-mentioned first aspect, or any possible implementation of the first aspect are performed.
[0056] In a fourth aspect, an embodiment of the present disclosure further 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 the above-mentioned first aspect, or any possible implementation of the first aspect are executed.
[0057] For a description of the effects of the above-mentioned information recommendation device, computer device and storage medium, please refer to the description of the above-mentioned information recommendation method, which will not be repeated here.
[0058] The information recommendation method, apparatus, computer device and storage medium provided by the embodiments of the present disclosure search for first-category text information in a database that matches the acquired first-category text information based on semantic features, and then search for second-category text information corresponding to the first-category text information in the database and return it. Compared with the prior art in which the intelligent system cannot absorb excellent information based on historical data to improve work quality, the embodiments of the present disclosure can filter out high-quality information based on historical data and recommend it to the intelligent system, thereby ensuring that the intelligent system provides better services based on previous work and further improving service quality.
[0059] Furthermore, the information recommendation method provided by the embodiment of the present disclosure can also filter out target historical conversation data based on the level information of multiple historical conversation data and a predefined semantic recognition model, extract high-quality content from the historical conversation data, establish a database of high-quality content, realize information screening, and facilitate further calls to data.
[0060] In order to make the above-mentioned objectives, features and advantages of the present disclosure more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following is a brief introduction to the drawings required for use in the embodiments. The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present disclosure and are used together with the specification to illustrate the technical solutions of the present disclosure. It should be understood that the following drawings only illustrate certain embodiments of the present disclosure and should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can also be obtained based on these drawings without creative work.
[0062] Figure 1a An application scenario diagram of an information recommendation method provided by an embodiment of the present disclosure is shown;
[0063] Figure 1b A flowchart of an information recommendation method provided by an embodiment of the present disclosure is shown;
[0064] Figure 2 A flowchart of a method for establishing a database according to a predefined semantic recognition model provided by an embodiment of the present disclosure is shown;
[0065] Figure 3 A flow chart of the method for generating emotion parameters provided by an embodiment of the present disclosure is shown;
[0066] Figure 4 A schematic diagram of an information recommendation device provided by an embodiment of the present disclosure is shown;
[0067] Figure 5 A schematic diagram of a computer device provided by an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0068] In order to make the purpose, technical scheme and advantages of the embodiments of the present disclosure clearer, the technical scheme in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all of the embodiments. The components of the embodiments of the present disclosure generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present disclosure provided in the drawings is not intended to limit the scope of the present disclosure for protection, but merely represents the selected embodiments of the present disclosure. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present disclosure.
[0069] In addition, the terms "first", "second", etc. in the description and claims of the embodiments of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchangeable where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein.
[0070] The "multiple or several" mentioned in this article refers to two or more. "And / or" describes the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects are in an "or" relationship.
[0071] Research has found that the intelligent question-answering system responds mechanically and dully when answering users' questions, is unable to perceive users' emotions in a timely manner, reduces service quality and efficiency, and affects user experience.
[0072] Based on the above research, the present disclosure provides an information recommendation method, which extracts historical conversation data of an online manual customer service system, selects high-quality historical conversation data with good user feedback, and establishes a high-quality question and answer database. Based on the established database, better service information is provided to the intelligent question and answer system, so that the intelligent question and answer system can continuously improve service quality according to customer feedback, respond to user questions and needs more flexibly, and improve service efficiency.
[0073] The defects existing in the above solutions are the results obtained by the inventor after practice and careful research. Therefore, the discovery process of the above problems and the solutions proposed by the present disclosure for the above problems below should be the contributions made by the inventor to the present disclosure during the disclosure process.
[0074] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0075] like Figure 1a As shown, it is a schematic diagram of an application scenario of an information recommendation method provided by an embodiment of the present invention. User 10 accesses application server 12 through an application client installed in terminal device 11, wherein the application client can be a web browser, or an application client installed in a terminal device such as a mobile phone, a tablet computer, etc., or a small program or landing page embedded in other applications. The terminal device 11 and the application server 12 are connected to each other through a network, which can be a local area network, a cellular network, a wide area network, etc. The terminal device can be a user equipment (UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, etc. The application server 12 can be any device that can provide Internet services.
[0076] An information recommendation method provided in an embodiment of the present disclosure can be applied to an application server 12. The following description is made by taking the server executing the information recommendation method provided in an embodiment of the present disclosure as an example. In some possible implementations, the information recommendation method can be implemented by a processor calling computer-readable instructions stored in a memory.
[0077] With the increasing application of intelligent customer service systems, manual online customer service systems have gradually evolved from a simple communication tool between enterprises and customers to an interactive place for information hubs.
[0078] Embodiment 1
[0079] See also Figure 1b As shown, it is a flowchart of the information recommendation method provided in the first embodiment of the present disclosure. The information recommendation method can be applied in a variety of different scenarios, which are not limited in the present disclosure. For the sake of convenience, this embodiment takes the scenario where the information recommendation method is applied to answering user questions by an intelligent customer service as an example for explanation. The method includes the following steps, wherein:
[0080] S101: When receiving first-category text information, extract a first semantic feature of the first-category text information.
[0081] Taking the application of the embodiment of the present disclosure to an intelligent question-answering system as an example, in the intelligent question-answering system, the first category of text information may be text information corresponding to the question asked by the user, and the second category of text information may be text information for the intelligent question-answering system to answer the question asked by the user.
[0082] When users have business consultation needs, they can submit business consultation questions through the intelligent question-answering system. For the sake of description, the first type of text information received is recorded as query, and the first semantic feature extracted from the first type of text information is recorded as w_q. For the business consultation questions submitted by users, human customer service or robot customer service provides corresponding answers.
[0083] S102: searching a pre-established database for a target semantic feature that matches the first semantic feature.
[0084] The database here is established based on multiple high-quality historical conversation data among all historical conversation data. The historical conversation data is collected by the server 12, and each conversation data is recorded as a session, which contains picture data, voice data, text data, etc.
[0085] A database is established by selecting a plurality of high-quality historical session data sessions from all historical session data. Each historical session data contains a plurality of first-category text information and second-category text information. The first-category text information is recorded as q, and the second-category text information is recorded as a. The second-category text information and the first-category text information have a corresponding relationship. It should be noted that different first-category text information can be recorded as q1, q2, q3, etc., and the corresponding second-category text information is recorded as a1, a2, a3, etc.
[0086] The database contains multiple historical session data sessions, that is, it contains multiple first-category text information, second-category text information, and the corresponding relationship between the semantic features corresponding to the first-category text information (hereinafter referred to as the semantic features of the first-category text information). The semantic features of the first-category text information can be extracted from the first-category text information in all historical session data before establishing the database and then establishing the database; or after establishing the database, the semantic features can be extracted from the first-category text information in the database, which is not limited here. The semantic features of the first-category text information in the database are recorded as w_qlist, and the corresponding semantic feature labels are also recorded as w_q1list, w_q2list, w_q3list... according to q1, q2, q3...
[0087] A historical session data set is constructed for each historical session data session: when all user chat records are screened for high-quality content, semantic features are extracted for q before the database is established, then the data set of each user is slist = {s|s = (session, q, a, w_qlist)}; if semantic features are extracted for q in the database after the data is established, then the data set of each user in the database is slist = {s|s = (session, q, a, w_qlist).
[0088] Determine the similarity between the first semantic feature w_q of the query in step S101 and the semantic features w_qlist of all the first-category text information in the database, where the semantic similarity is denoted by w, and the corresponding ones are w_q1list, w_q2list, w_q3lis…, and the semantic similarities are also denoted by w1, w2, w3…; determine the semantic feature with the greatest similarity as the target semantic feature that matches the first semantic feature w_q.
[0089] The specific method of establishing a database can be referred to Figure 2 The method flow shown will be described in detail in the second embodiment and will not be repeated here.
[0090] Taking the application of the disclosed embodiment to an intelligent question-and-answer system as an example, the historical session data is the session information generated in the process of customer service (including manual customer service and intelligent robot customer service) answering user consultation questions. The session information generated for each business consultation and the user's evaluation parameters for this business consultation constitute the historical session data session corresponding to this business consultation. Each session information may contain information in any form or all forms of pictures, text, and voice. In order to ensure the convenience and efficiency of data processing, the voice chat data and pictures can be converted into text information. Sometimes, the pictures in each session information can also be deleted. Then, the text information in each session is identified and classified to confirm which ones are the first type of text information q and which ones are the second type of text information a. In this scenario, q is the question asked by the user, and a is the answer given by the customer service to the user's consultation question. There is a corresponding relationship between the question and the answer, that is, there is a certain corresponding relationship between q and a. A data set slist is constructed for each user's chat record session. When all user chat records are screened for high-quality content and semantic features are extracted from q before the database is established, the data set of each user is slist = {s|s = (session, q, a, w_qlist)}. If semantic features are extracted for q in the database after the data set is established, the data set of each user in the database is slist = {s|s = (session, q, a, w_qlist).
[0091] When the intelligent customer service receives a new question query from a user, it extracts the semantic features of the newly received question query, obtains the first semantic feature w_q, and determines the similarity w between w_q and w_qlist of all first-category text information in the database. Assuming that the similarity w between w_q2list corresponding to q2 and w_q is the largest, then w_q2list is the target semantic feature.
[0092] S103: Obtain the second type of text information corresponding to the target semantic feature and return it.
[0093] According to the semantic features of the first category of text information, the corresponding first category text information can be found, and according to the first category of text information, the corresponding second category text information can be found. That is, according to w_qlist, q in the database can be found, and according to q, a corresponding to q in the database can be found. Finally, it is indirectly realized to find the corresponding a according to w_qlist.
[0094] Taking the application of the disclosed embodiment to an intelligent question-answering system as an example, in step S102, it is determined that w_q2list is the target semantic feature. Then, based on the target semantic feature w_q2list, the corresponding user question q2 in the database can be found, and based on the user question q2, the high-quality answer a2 corresponding to q2 in the database can be found, and the high-quality answer a2 is returned. The intelligent customer service can answer the user's new question query according to the content shown in a2.
[0095] This embodiment searches for the first category of text information in the database that matches the acquired first category of text information according to the semantic features, and then searches for the second category of text information corresponding to the first category of text information in the database and returns it. Compared with the prior art in which the intelligent system cannot absorb excellent information based on historical data to improve work quality and reduce service efficiency, the disclosed embodiment can filter out high-quality information based on historical data and recommend it to the intelligent system, thereby ensuring that the intelligent system can provide better services based on previous work and further improve service quality.
[0096] Embodiment 2
[0097] In order to further illustrate how the database in the first embodiment is established, the second embodiment will be combined with Figure 2 The process shown is described. When implemented specifically, the database can be applied to multiple scenarios, which are not limited here. For the convenience of explanation, the scenario of applying to intelligent customer service to answer user questions is taken as an example, which specifically includes the following steps:
[0098] S201: Obtain several pieces of historical session data.
[0099] As the application of intelligent customer service systems becomes more and more widespread, it has gradually evolved from a simple communication tool between enterprises and customers to an interactive place for information hubs. Based on this, in the disclosed embodiment, a large amount of historical conversation data can be collected through the intelligent customer service system, wherein the conversation information generated by a question and answer between the user and the intelligent question and answer system and its corresponding level information are taken as a historical conversation data. The level information may include the user's evaluation parameters for a certain business consultation. The evaluation parameters are fed back to the application server 12 by the user 10 through the terminal device 11, denoted as v. The evaluation parameters can be expressed by a score or a star system, and different star ratings correspond to different scores. Therefore, each piece of historical conversation data contains the first category of text information and the second category of text information as well as the user's level information for the first category of text information.
[0100] In specific implementation, the historical conversation data collected by the intelligent question-answering system may include image data, voice data, and text data, etc. Based on this, in the embodiment of the present disclosure, before using the historical conversation data to establish a database, the collected historical conversation data is first preprocessed, and the preprocessing includes deleting the image data therein, converting the voice data into text data, etc.
[0101] In some embodiments, the image data may contain some valid data. For example, in a specific question-and-answer scenario, the image data may contain some content related to the text data. For example, the text and emoticons displayed on the image may contain some valid information. In this case, the valid data can also be converted into text data.
[0102] At regular intervals, the session information session generated by the intelligent question-answering system for each business consultation and its corresponding user rating information v are obtained to form historical session data, and the corresponding historical data set is constructed: slist = {s|s = (session, v)}. For each session information, the session features are extracted, and the sentiment model is established. The sentiment parameter m is determined based on the established sentiment model, and the corresponding historical data set is expanded to: slist = {s|s = (session, v, m)}, and then each historical session information session is split to split multiple first-class text information q and second-class text information a corresponding to the first-class text information, and the corresponding historical data set is expanded to: slist = {s|s = (session, q, a, v, m)}, and the semantic features of each first-class text information are extracted, so the set of each historical session data session is expanded to: slist = {s|s = (session, q, a, w_qlist, v, m)}.
[0103] Emotional parameters are generated based on emotion-related keywords in the text data of historical conversation data. For specific generation methods, please refer to Figure 3 The process shown will be described in detail in Example 3 and will not be repeated here.
[0104] Taking the application of the disclosed embodiment to an intelligent question-answering system as an example, the evaluation parameter v of each conversation information is the user's score for a certain business consultation, and the emotional parameter m is generated based on some emotion-related keywords generated by the user during this business consultation process, such as: happy, angry, sad and other words.
[0105] S202: Based on the level information, use a pre-trained semantic recognition model to determine whether each historical conversation data is the target historical conversation data.
[0106] The semantic recognition model is trained based on labeled historical conversation sample data. In specific implementation, the semantic recognition model is recorded as f=e1*v+e2*m+b, where e1, e2, and b are parameters of the semantic recognition model f. Several groups of known (v, m) samples are obtained in advance based on several high-quality historical conversation data that are manually calibrated. The parameter values of the parameters of the semantic recognition model f are determined based on the known groups of samples combined with the regression equation.
[0107] There are several ways to determine the target historical conversation data based on the semantic recognition model f and the evaluation parameters and sentiment parameters of each historical conversation data:
[0108] One implementation method may be: determining the score of each historical session data according to the semantic recognition model f and the evaluation parameters and sentiment parameters of each historical session data; arranging a number of historical session data in descending order according to the score corresponding to each historical session data; selecting a preset number of historical session data as target historical session data according to the arrangement order of each historical session data, where the preset number may be selected according to a certain ratio based on the total number of all historical session data, such as selecting according to a ratio of 10%. If there are 100 historical session data, the top 10 historical session data are selected as target historical session data; if there are 200 historical session data, the top 20 historical session data are selected as target historical session data. In the above implementation method, if there are two or more historical session data with the same score, only the preset number is selected. For example, if there are 100 historical session data and the ratio of 10% is selected, when the scores of the tenth and eleventh ranked historical session data are the same, only the top 10 historical session data are selected as target historical session data, and the eleventh ranked historical session data is not used as the target historical session data.
[0109] Another implementation method is: based on the evaluation parameters and the sentiment parameters, the semantic recognition model is used to determine the score of each historical conversation data; according to the score corresponding to each historical conversation data, a number of historical conversation data are arranged in descending order; the historical conversation data with a score not less than a preset threshold is determined as the target historical conversation data, and the preset threshold is the score corresponding to the last historical conversation data that meets the preset ratio selected according to the arrangement order of each historical conversation data, such as g = f(v,m), g is the score of the number of historical conversations based on the semantic recognition model f = e1*v+e2*m+b, there are 100 historical conversation data in total, and the preset ratio is 10%, then the historical conversation data ranked tenth should be selected The score of the historical session data is used as the preset threshold. Assuming that the score of the historical session data ranked tenth is g0, all the contents with g>=g0 are extracted as high-quality content, and a high-quality content library is constructed. That is, as long as the score is not less than the preset threshold, the historical session data is the target historical session data. Different from the previous implementation method, if there are two or more historical session data with the same score, as long as the score is not less than the preset threshold, the historical session data are all determined as historical session data. Continuing with the example of a total of 100 historical session data and a preset ratio of 10%, when the scores of the historical session data ranked ninth and eleventh are the same, the historical session data ranked eleventh is also the target historical session data.
[0110] S203: When it is determined that any historical conversation data is target historical conversation data, extract a second semantic feature of the first type of text information contained in the target historical conversation data.
[0111] In order to distinguish it from the first semantic feature in Example 1, we call the semantic feature of the first category of text information in the database the second semantic feature. It should be noted that the semantic feature of the first category of text information can be extracted before or after the target historical conversation data is determined. For details, please refer to the content described in step S102 of Example 1, which will not be repeated here.
[0112] S204: Establish a correspondence between the first type of text information included in the target historical conversation data and its corresponding second type of text information and the second semantic feature and add the correspondence to the database.
[0113] In step S201, the set for each historical session data session is expanded to: slist = {s|s = (session, q, a, w_qlist, v, m)}; after all target historical session data are selected, each target historical session data corresponds to its own set slist = {s|s = (session, q, a, w_qlist, v, m)}, all first-category text information and all second-category text information in the same target historical session data correspond to the same evaluation parameters and emotional parameters, and each first-category text information has corresponding second semantic features and second-category text information. The specific distinguishing marks and corresponding relationships can be referred to the content described in step S102, which will not be repeated here.
[0114] Furthermore, this embodiment filters out target historical conversation data based on the level information of multiple historical conversation data and a predefined semantic recognition model, can extract high-quality content from the historical conversation data, establish a database of high-quality content, realize information screening, and facilitate further calls to data.
[0115] Embodiment 3
[0116] For ease of understanding, this embodiment will be combined with Figure 3 The process shown in the figure illustrates a method for generating emotional parameters. This method can be applied to multiple scenarios, which are not limited here. For the sake of convenience, the scenario of applying to intelligent customer service to answer user questions is taken as an example, which specifically includes the following steps:
[0117] S301: For any piece of first-category text information included in the historical conversation data, determine a sentiment score of the piece of first-category text information using a pre-trained sentiment classification model.
[0118] The sentiment classification model can be processed by a general natural processing model, such as the BERT classification network, which is not limited here. In specific implementation, for a historical session data, N first-category text information in the historical session data is extracted, and the N first-category text information is input into the sentiment classification model, and then the sentiment scores of the N first-category text information are obtained. The above N is an integer. In order to facilitate the training of the model, the unified N first-category text information is processed each time until all the first-category text information in the historical session data is processed, and the sentiment score of each first-category text information is obtained. The first-category text information will contain some keywords related to emotions. For example, the scenario of intelligent customer service answering user questions is used. The first-category text information is the user's question. When asking questions, the user will carry some emotional words, such as happy, angry, and angry. For example, there are 10 questions in the chat record of the user, that is, there are 10 first-category text information. N is 2. The sentiment classification model only calculates the sentiment scores of 2 questions each time, and calculates five times in total to obtain the sentiment scores of all questions.
[0119] S302: Determine the average sentiment score of all first-category text information included in the historical conversation data as the sentiment parameter of the historical conversation data.
[0120] The average sentiment score of each first-category text message is determined based on the sentiment scores of all first-category text messages in the historical conversation data, and the average sentiment score is the sentiment parameter of the historical conversation data. Taking the scenario where the intelligent customer service answers the user's questions as an example, assuming that there are 5 questions, that is, 5 first-category text messages, and their sentiment scores are 7, 10, 3, 4, and 6 respectively, then the average sentiment score of these five questions is: (7+10+3+4+6) / 5=6, so the sentiment parameter of the user's chat record is 6.
[0121] Those skilled in the art will appreciate that, in the above method of specific implementation, the order in which the steps are written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of the steps should be determined by their functions and possible internal logic.
[0122] Based on the same inventive concept, an information recommendation device corresponding to the information recommendation method is also provided in the embodiment of the present disclosure. Since the principle of solving the problem by the device in the embodiment of the present disclosure is similar to the above-mentioned information recommendation method in the embodiment of the present disclosure, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.
[0123] Embodiment 4
[0124] Reference Figure 4, which is a schematic diagram of an information recommendation device provided by Embodiment 4 of the present disclosure, the device comprises: an extraction module 401, a search module 402 and an acquisition module 403; wherein,
[0125] The extraction module 401 is used to extract the first semantic feature of the first category of text information when receiving the first category of text information;
[0126] A search module 402 is used to search a target semantic feature that matches the first semantic feature from a pre-established database, wherein the database contains a correspondence between the first category of text information, the second category of text information, and the semantic features corresponding to the first category of text information;
[0127] The acquisition module 403 is used to acquire the second type of text information corresponding to the target semantic feature and return it.
[0128] In a possible implementation manner, the device further includes an establishing module and a judging module; and
[0129] The acquisition module is further used to acquire a number of historical conversation data, wherein the historical conversation data includes the first type of text information and its corresponding second type of text information and the level information corresponding to the historical conversation data;
[0130] The judgment module is used to judge whether each historical conversation data is target historical conversation data based on the level information by using a pre-trained semantic recognition model, wherein the semantic recognition model is trained based on historical conversation sample data with labels;
[0131] The extraction module is further configured to extract the second semantic feature of the first type of text information contained in the target historical conversation data when the judgment module judges that any historical conversation data is the target historical conversation data;
[0132] The establishing module is used to establish the corresponding relationship between the first type of text information contained in the target historical conversation data and its corresponding second type of text information and the second semantic feature and add it to the database.
[0133] In a possible implementation, the level information includes a sentiment parameter; and
[0134] The device also includes a generating module;
[0135] The generation module is used to determine the sentiment score of any first-category text information contained in the historical conversation data using a pre-trained sentiment classification model; and determine the average sentiment score of all first-category text information contained in the historical conversation data as the sentiment parameter of the historical conversation data.
[0136] In a possible implementation manner, the level information further includes evaluation parameters; and
[0137] The judgment module is specifically used to determine the score of each historical conversation data based on the evaluation parameters and sentiment parameters using the semantic recognition model; arrange the plurality of historical conversation data in descending order according to the score corresponding to each historical conversation data; and select a preset number of historical conversation data as target historical conversation data according to the arrangement order of each historical conversation data.
[0138] In a possible implementation, the judgment module is specifically configured to determine the score of each historical conversation data based on the evaluation parameter and the sentiment parameter using the semantic recognition model;
[0139] Arrange the plurality of pieces of historical conversation data in descending order according to the score corresponding to each piece of historical conversation data;
[0140] The historical session data having a score not less than a preset threshold is determined as the target historical session data, where the preset threshold is a score corresponding to the last historical session data that meets a preset ratio and is selected according to an arrangement order of the historical session data.
[0141] In a possible implementation manner, the historical conversation data includes voice data and picture data; and
[0142] The device also includes a deletion module and a conversion module;
[0143] The deleting module is used to delete the image data before the judging module judges whether the historical session data is the target historical session data based on the level information by using a pre-trained semantic recognition model;
[0144] The conversion module is used to convert the voice data into text data, or convert the voice data and the image data into text data, before the judgment module determines whether the historical conversation data is the target historical conversation data based on the level information using a pre-trained semantic recognition model.
[0145] In a possible implementation, the search module is specifically used to determine the similarity between the first semantic feature and the semantic features of each first category of text information in the database; and determine the semantic feature with the greatest correlation as the target semantic feature matching the first semantic feature.
[0146] For descriptions of the processing flow of each module in the device and the interaction flow between each module, reference may be made to the relevant descriptions in the above method embodiment, which will not be described in detail here.
[0147] Embodiment 5
[0148] The present disclosure also provides a computer device, such as Figure 5 FIG. 1 is a schematic diagram of a computer device structure provided in Embodiment 5 of the present disclosure, including:
[0149] A processor 51 and a memory 52; the memory 52 stores machine-readable instructions executable by the processor 51, and the processor 51 is used to execute the machine-readable instructions stored in the memory 52. When the machine-readable instructions are executed by the processor 51, the processor 51 performs the following steps: S101: upon receiving a first category of text information, extracting a first semantic feature of the first category of text information; S102: searching a pre-established database for a target semantic feature that matches the first semantic feature; S103: obtaining and returning the second category of text information corresponding to the target semantic feature.
[0150] The above-mentioned memory 52 includes an internal memory 521 and an external memory 522; the internal memory 521 here is also called an internal memory, which is used to temporarily store the calculation data in the processor 51, as well as the data exchanged with the external memory 522 such as a hard disk. The processor 51 exchanges data with the external memory 522 through the internal memory 521.
[0151] The present disclosure also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the information recommendation method described in the above method embodiment are executed. The storage medium may be a volatile or non-volatile computer-readable storage medium.
[0152] The computer program product of the information recommendation method provided in the embodiments of the present disclosure includes a computer-readable storage medium storing program code, and the instructions included in the program code can be used to execute the steps of the information recommendation method described in the above method embodiments. For details, please refer to the above method embodiments, which will not be repeated here.
[0153] The present disclosure also provides a computer program, which implements any one of the methods of the aforementioned embodiments when executed by a processor. The computer program product can be implemented in hardware, software, or a combination thereof. In an optional embodiment, the computer program product is embodied as a computer storage medium, and in another optional embodiment, the computer program product is embodied as a software product, such as a software development kit (SDK), etc.
[0154] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the system and device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here. In the several embodiments provided in the present disclosure, it should be understood that the disclosed system, device and method can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the device or unit can be electrical, mechanical or other forms.
[0155] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0156] In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0157] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present disclosure, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present disclosure. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0158] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present disclosure, which are used to illustrate the technical solutions of the present disclosure, rather than to limit them. The protection scope of the present disclosure is not limited thereto. Although the present disclosure is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed in the present disclosure, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.
Claims
1. An information recommendation method, characterized in that: include: Upon receiving the first type of text information, extracting a first semantic feature of the first type of text information; Searching for a target semantic feature that matches the first semantic feature from a pre-established database, wherein the database contains a correspondence between the first category of text information, the second category of text information, and the semantic features corresponding to the first category of text information; Get the second type of text information corresponding to the target semantic feature and return it; The database is established according to the following method: Acquire a plurality of historical conversation data, wherein the historical conversation data includes first-category text information and its corresponding second-category text information and level information corresponding to the historical conversation data; the level information includes an emotion parameter and an evaluation parameter; each of the historical conversation data includes a plurality of the first-category text information and the second-category text information, and the second-category text information has a corresponding relationship with the first-category text information; Based on the sentiment parameter and the evaluation parameter, the historical conversation data is screened to obtain target historical conversation data, and a second semantic feature of the first type of text information contained in the target historical conversation data is extracted; Establishing a correspondence between the first type of text information contained in the target historical conversation data and its corresponding second type of text information and the second semantic feature and adding them to the database; The emotion parameters are generated according to the following method: For any piece of first-category text information included in the historical conversation data, determine a sentiment score of the piece of first-category text information using a pre-trained sentiment classification model; Determine the average sentiment score of all first-category text information contained in the historical conversation data as the sentiment parameter of the historical conversation data; The filtering of the historical conversation data based on the emotion parameter and the evaluation parameter to obtain target historical conversation data includes: Based on the emotion parameters and the evaluation parameters, a pre-trained semantic recognition model is used to determine whether each of the historical conversation data is the target historical conversation data, and the semantic recognition model is trained based on the historical conversation sample data with labels.
2. The method according to claim 1, characterized in that Based on the sentiment parameters and the evaluation parameters, a pre-trained semantic recognition model is used to determine whether each historical conversation data is the target historical conversation data, specifically including: Based on the evaluation parameters and sentiment parameters, determining the score of each historical conversation data using the semantic recognition model; Arrange the plurality of pieces of historical conversation data in descending order according to the score corresponding to each piece of historical conversation data; According to the arrangement order of each historical session data, a preset number of historical session data are selected as target historical session data.
3. The method according to claim 2, characterized in that Based on the sentiment parameters and the evaluation parameters, a pre-trained semantic recognition model is used to determine whether each historical conversation data is the target historical conversation data, specifically including: Based on the evaluation parameters and sentiment parameters, determining the score of each historical conversation data using the semantic recognition model; Arrange the plurality of pieces of historical conversation data in descending order according to the score corresponding to each piece of historical conversation data; The historical session data having a score not less than a preset threshold is determined as the target historical session data, where the preset threshold is a score corresponding to the last historical session data that meets a preset ratio and is selected according to an arrangement order of the historical session data.
4. The method according to claim 1, characterized in that The historical conversation data includes voice data and picture data; and Before determining whether the historical conversation data is target historical conversation data by using a pre-trained semantic recognition model based on the level information, the method further includes: deleting the image data and converting the voice data into text data; or, The voice data and the picture data are converted into text data.
5. The method according to claim 1, characterized in that Searching a pre-established database for a target semantic feature that matches the first semantic feature includes: Determining the similarity between the first semantic feature and the semantic features of each first category of text information in the database; The semantic feature with the greatest correlation is determined as the target semantic feature matching the first semantic feature.
6. An information recommendation device, characterized in that: include: An extraction module, configured to extract a first semantic feature of the first category of text information when receiving the first category of text information; A search module, used to search a target semantic feature matching the first semantic feature from a pre-established database, wherein the database contains a correspondence between the first category of text information, the second category of text information, and the semantic features corresponding to the first category of text information; An acquisition module is used to acquire and return the second type of text information corresponding to the target semantic feature; The acquisition module is also used to acquire a number of historical conversation data, wherein the historical conversation data includes first-category text information and its corresponding second-category text information and level information corresponding to the historical conversation data; the level information includes sentiment parameters and evaluation parameters; each of the historical conversation data includes a plurality of first-category text information and second-category text information, and the second-category text information has a corresponding relationship with the first-category text information; A judgment module, used to judge whether each of the historical conversation data is target historical conversation data based on the sentiment parameter and the evaluation parameter by using a pre-trained semantic recognition model; the semantic recognition model is trained based on historical conversation sample data with labels; The extraction module is also used to extract the second semantic feature of the first type of text information contained in the target historical conversation data; An establishing module, used to establish a corresponding relationship between the first type of text information contained in the target historical conversation data and its corresponding second type of text information and the second semantic feature and add the corresponding relationship to the database; A generation module is used to determine the sentiment score of any first-category text information contained in the historical conversation data using a pre-trained sentiment classification model; and determine the average sentiment score of all first-category text information contained in the historical conversation data as the sentiment parameter of the historical conversation data.
7. A computer device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the computer device is running, the processor and the memory communicate via the bus, and when the machine-readable instructions are executed by the processor, the steps of the information recommendation method according to any one of claims 1 to 5 are performed.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed by a processor, executes the steps of the information recommendation method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Deep learning-based intelligent response system
CN106202301A
Expert-knowledge recommendation method and device, computer device and storage medium
CN109325132A
Identification method and identification device for user intention
CN109949830A
Intellectual property concept automatic answering method and system
CN110287294A
Service quality optimization management system based on community system
CN110427620A
