A content recommendation method, apparatus, system, electronic device, and storage medium
By extracting entities from interactive information on the server side, combining target entities and historical interactive entities, identifying the type of interactive information, and generating guidance and recommendation information, the problem of low accuracy in film and television content recommendations caused by fuzzy user searches is solved, and more accurate content recommendations are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-12
- Publication Date
- 2026-03-06
AI Technical Summary
In existing technologies, when users search for film and television content through search engines, the input of vague information leads to low recommendation accuracy and makes it difficult to retrieve content that users are interested in.
By acquiring entities from the current interactive information, combining target entities and historical interactive entities, the type of interactive information is identified, guiding information and recommendation information are generated, and the accuracy of interactive information type identification is improved by using knowledge graphs and type recognition models.
It improves the accuracy of content recommendations, enabling more precise recommendations of content that users are interested in, and reduces the impact of vague user input.
Smart Images

Figure CN116662647B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer application technology, specifically to the fields of data processing and artificial intelligence, and particularly to a content recommendation method, apparatus, system, electronic device, and storage medium. Background Technology
[0002] With the development of computer technology, internet application technology has developed rapidly, enabling people to engage in various interactive activities through internet applications. For example, when users are enjoying leisure and entertainment, they often encounter situations where they don't know what movies or TV shows to watch, and thus they interact with electronic devices via the internet to obtain the content they want to watch.
[0003] In related technologies, users primarily search for desired film and television content through search engines. Specifically, users input search information into the search engine of their electronic devices. The search engine receives the user's input, extracts keywords from the search information, further performs searches based on the keywords, calculates the relevance between the keywords and the search results, and sorts the search results according to the relevance. The search results are then displayed to the user in descending order of relevance, thereby recommending film and television content for the user to watch.
[0004] However, the search methods mentioned above, which rely on search engines, require users to specify what they want to search for. When users input vague information, such as "what movies or TV shows are worth watching recently," it is difficult to retrieve the content that the user wants to watch, resulting in low accuracy of the recommended movies and TV shows. Summary of the Invention
[0005] The purpose of this invention is to provide a content recommendation method, apparatus, system, electronic device, and storage medium to improve the accuracy of content recommendation. The specific technical solution is as follows:
[0006] In a first aspect of this invention, a content recommendation method is provided, applied to a server, the method comprising:
[0007] Obtain the current interaction information and extract the entities from the current interaction information to obtain the target entity, wherein the entity is used to represent the object in the interaction information;
[0008] If the current interaction information is the initial interaction information, the type of the current interaction information is identified based on the current interaction information and the target entity to obtain a first target information type;
[0009] Based on the first target information type and the target entity, guide information corresponding to the current interaction information is generated, and the guide information is sent to the client so that the client can display the guide information;
[0010] If the current interaction information is not the initial interaction information, the current interaction entity is determined based on the target entity and the historical interaction entities, wherein the historical interaction entities are entities extracted from at least one round of historical interaction information;
[0011] Based on the current interaction information and the current interaction entity, the type of the current interaction information is identified to obtain the second target information type;
[0012] Based on the second target information type and the current interaction entity, recommended information corresponding to the current interaction information is generated, and the recommended information is sent to the client so that the client can display the recommended information.
[0013] In one possible implementation, extracting entities from the current interaction information to obtain the target entity includes:
[0014] If the current interaction information is voice interaction information, the current interaction information is converted into text information;
[0015] The text information is segmented into words to obtain the segmentation results;
[0016] The word segmentation results are matched with preset rules;
[0017] If the word segmentation result matches the preset rule, extract the word segmentation result that matches the entity in the preset rule to obtain the candidate entity;
[0018] The system queries whether the candidate entity matches the target entity dictionary, and if the candidate entity matches the target entity dictionary, the candidate entity that matches the target entity dictionary is taken as the target entity; the target entity dictionary is constructed by extracting entities contained in the target knowledge graph, and the target knowledge graph is constructed based on the entities contained in each content to be recommended;
[0019] If the word segmentation result does not match the preset rule, query whether the word segmentation result contains words that match the target entity dictionary. If the word segmentation result contains words that match the target entity dictionary, the word segmentation that matches the target entity dictionary is taken as the target entity.
[0020] In one possible implementation, extracting entities from the current interaction information to obtain the target entity includes:
[0021] The current interaction information is segmented into words to obtain the segmentation results;
[0022] The query checks whether the segmented words in the segmentation results match the target entity dictionary; the target entity dictionary is constructed by extracting entities contained in the target knowledge graph, which is constructed based on the entities contained in each content to be recommended;
[0023] If a word segment in the word segmentation result matches the target entity dictionary, the word segment that matches the target entity dictionary shall be taken as the target entity.
[0024] In one possible implementation, the method further includes:
[0025] If none of the words in the word segmentation result match the target entity dictionary, calculate the similarity value between the symbol information corresponding to the words in the word segmentation result and the symbol information of each entity in the target entity dictionary;
[0026] If the similarity value is greater than a preset threshold, the entity corresponding to the similarity value greater than the preset threshold is sent to the client so that the client can display the entity corresponding to the similarity value greater than the preset threshold.
[0027] Receive entity selection information sent by the client and determine the target entity.
[0028] In one possible implementation, the method further includes:
[0029] In the case where there are multiple objects corresponding to the target entity, according to the preset correspondence between objects and popularity values, the multiple objects corresponding to the target entity are sent to the client in descending order of popularity values, so that the client can display the multiple objects corresponding to the target entity.
[0030] Receive object selection information sent by the client and determine the final target entity.
[0031] In one possible implementation, determining the current interaction entity based on the target entity and historical interaction entities includes:
[0032] Based on the target knowledge graph, the association value between the target entity and the historical interaction entity is calculated. The target knowledge graph is constructed based on the entities contained in each content to be recommended.
[0033] If the association value does not meet the preset conditions, the target entity is determined as the current interactive entity;
[0034] If the relationship value meets the preset conditions, the target entity and the historical interaction entity are merged to obtain the current interaction entity.
[0035] In one possible implementation, the method further includes:
[0036] Update the historical interaction entity to the current interaction entity.
[0037] In one possible implementation, the step of merging the target entity and the historical interaction entity to obtain the current interaction entity when the association value meets a preset condition includes:
[0038] If the association value meets the preset conditions, it is determined whether the time interval between the timestamp corresponding to the current interaction information and the timestamp corresponding to the most recent interaction information in the at least one round of historical interaction information is less than the preset time interval.
[0039] If so, the target entity and the historical interaction entity are merged to obtain the current interaction entity.
[0040] In one possible implementation, the step of identifying the type of the current interaction information based on the current interaction information and the current interaction entity to obtain a second target information type includes:
[0041] Based on the current interaction information and the current interaction entity, the type of the current interaction information is identified using a type recognition model to obtain the second target information type;
[0042] The type recognition model is trained based on sample interaction information and sample interaction entities, and the corresponding annotation information of the sample interaction information and sample interaction entities. The annotation information is generated based on the target knowledge graph. The type recognition model includes a BERT pre-trained sub-model based on a Transformer bidirectional encoder representation. The BERT pre-trained sub-model is used to extract the feature vectors of the current interaction information and the current interaction entity. The target knowledge graph is constructed based on the entities contained in each content to be recommended.
[0043] In one possible implementation, generating recommendation information corresponding to the current interaction information based on the second target information type and the current interaction entity, and sending the recommendation information to the client so that the client can display the recommendation information, includes:
[0044] The second target information type and the current interactive entity are fused together to obtain the fusion result;
[0045] Based on the fusion processing results, the current interaction type is determined;
[0046] When the current interaction type is a question-and-answer type, based on the second target information type and the current interaction entity, the target knowledge graph is queried to obtain the response information of the current interaction information. Based on the response information and the preset message template, the recommendation information corresponding to the current interaction information is generated and sent to the client so that the client can display the recommendation information. The target knowledge graph is constructed based on the entities contained in each content to be recommended.
[0047] When the current interaction type is interest exploration, user profile information is obtained, and personalized recommendation information corresponding to the current interaction information is generated based on the user profile information. The recommendation information is then sent to the client so that the client can display the recommendation information.
[0048] In one possible implementation, the preset message template includes a first message template and a second message template, wherein the first message template is used to generate guidance information for interactive information, and the second message template is used to generate recommendation information for interactive information;
[0049] The step of querying the target knowledge graph based on the second target information type and the current interaction entity to obtain the response information of the current interaction information, generating recommendation information corresponding to the current interaction information based on the response information and a preset message template, and sending the recommendation information to the client so that the client can display the recommendation information includes:
[0050] Based on the second target information type and the current interaction entity, query the target knowledge graph to obtain the response information of the current interaction information;
[0051] Determine whether the number of response messages exceeds a first preset number;
[0052] If the number of response messages exceeds the first preset number, then based on the second target information type and at least one dimension parameter corresponding to the current interactive entity, and the first message template, guide information corresponding to the current interactive information is generated, and the guide information is sent to the client so that the client displays the guide information, and then returns to the step of obtaining the current interactive information.
[0053] If the number of response messages does not exceed a first preset number, then based on the response information and the second message template, recommended information corresponding to the current interaction information is generated, and the recommended information is sent to the client so that the client can display the recommended information.
[0054] In one possible implementation, the step of obtaining user profile information, generating personalized recommendation information corresponding to the current interaction information based on the user profile information, and sending the recommendation information to the client so that the client can display the recommendation information includes:
[0055] When user profile information of the user exists, personalized recommendation information corresponding to the current interaction information is generated based on the user profile information and the third message template, and the recommendation information is sent to the client so that the client can display the recommendation information; the third message template is used to generate recommendation information for interaction information;
[0056] When the user profile information of the user does not exist, based on the second target information type or at least one dimension parameter corresponding to the current interactive entity, and the fourth message template, guide information corresponding to the current interactive information is generated, and the guide information is sent to the client so that the client can display the guide information and return to the step of obtaining the current interactive information. The fourth message template is used to generate guide information for interactive information.
[0057] In a second aspect of the invention, a content recommendation device is also provided, applied to a server, the device comprising:
[0058] The first session management module is used to obtain the current interaction information and extract the entities in the current interaction information to obtain the target entity, wherein the entity is used to represent the object in the interaction information;
[0059] The first type identification module is used to identify the type of the current interaction information based on the current interaction information and the target entity when the current interaction information is the initial interaction information, so as to obtain a first target information type;
[0060] The information generation module is used to generate guidance information corresponding to the current interaction information based on the first target information type and the target entity, and send the guidance information to the client so that the client can display the guidance information;
[0061] The second session management module is used to determine the current interaction entity based on the target entity and historical interaction entities when the current interaction information is not the initial interaction information, wherein the historical interaction entity is an entity extracted from at least one round of historical interaction information;
[0062] The second type identification module is used to identify the type of the current interaction information based on the current interaction information and the current interaction entity, so as to obtain the second target information type;
[0063] The content recommendation module is used to generate recommendation information corresponding to the current interaction information based on the second target information type and the current interaction entity, and send the recommendation information to the client so that the client can display the recommendation information.
[0064] In a third aspect of the present invention, a content recommendation system is also provided, the system comprising: a client and a server;
[0065] The client is used to obtain current interaction information and send the current interaction information to the server;
[0066] The server is configured to receive the current interaction information, extract entities from the current interaction information to obtain target entities; if the current interaction information is initial interaction information, based on the current interaction information and the target entity, identify the type of the current interaction information to obtain a first target information type, and based on the first target information type and the target entity, generate guidance information corresponding to the current interaction information and send the guidance information to the client; if the current interaction information is not initial interaction information, based on the target entity and historical interaction entities, determine the current interaction entity, based on the current interaction information and the current interaction entity, identify the type of the current interaction information to obtain a second target information type, and based on the second target information type and the current interaction entity, generate recommendation information corresponding to the current interaction information and send the recommendation information to the client; wherein, an entity is used to represent an object in the interaction information, and the historical interaction entity is an entity extracted from at least one round of historical interaction information;
[0067] The client is also used to receive and display the guidance information, and to receive and display the recommendation information.
[0068] In another aspect of the present invention, an electronic device is also provided, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus.
[0069] Memory, used to store computer programs;
[0070] When a processor executes a program stored in memory, it implements any of the content recommendation methods described above.
[0071] In another aspect of the present invention, a computer-readable storage medium is also provided, wherein a computer program is stored therein, and when the computer program is executed by a processor, it implements the steps of any of the content recommendation methods described above.
[0072] In another aspect of the present invention, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to perform the steps of any of the content recommendation methods described above.
[0073] This invention provides a content recommendation method, apparatus, system, electronic device, and storage medium. The server extracts entities from the acquired current interaction information to obtain target entities. When the current interaction information is the initial interaction, the type of the current interaction information is identified by combining the current interaction information and the target entity. Based on the identified first target information type and the extracted target entity, guidance information is generated and sent to the client for display, guiding the user to initiate more interactions that accurately locate content of interest. When the current interaction information is not the initial interaction, the current interaction entity is determined by combining the target entity and historical interaction entities extracted from at least one round of historical interaction information. This allows the current interaction entity obtained from multiple rounds of interaction to more accurately reflect the content of interest to the user. Furthermore, by identifying the type of interaction information based on the current interaction information and the current interaction entity, the accuracy of interaction information type identification is further improved. This allows for more accurate recommendation of desired content to the user based on the second target information type identified by the interaction information type identification result and the current interaction entity, thus improving the accuracy of content recommendation. Attached Figure Description
[0074] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below.
[0075] Figure 1 This is a flowchart illustrating a content recommendation method according to an embodiment of the present invention;
[0076] Figure 2 This is a schematic diagram illustrating an embodiment of entity extraction in this invention.
[0077] Figure 3 This is a schematic diagram illustrating another implementation method of entity extraction in this invention.
[0078] Figure 4 This is a schematic diagram illustrating an embodiment of entity determination in this invention.
[0079] Figure 5 This is a schematic diagram illustrating another embodiment of entity determination in this invention.
[0080] Figure 6 This is a schematic diagram of a model architecture for identifying interaction information types in an embodiment of the present invention;
[0081] Figure 7This is a schematic diagram illustrating one implementation method for obtaining recommendation information in an embodiment of the present invention;
[0082] Figure 8 This is a schematic diagram illustrating a content recommendation method in an embodiment of the present invention;
[0083] Figure 9a This is a schematic diagram of a film and television content recommendation interaction in an embodiment of the present invention;
[0084] Figure 9b This is another interactive diagram of film and television content recommendation in an embodiment of the present invention;
[0085] Figure 10 This is a schematic diagram of the structure of a content recommendation device according to an embodiment of the present invention;
[0086] Figure 11 This is a schematic diagram of the structure of a content recommendation system according to an embodiment of the present invention;
[0087] Figure 12 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0088] The technical solutions of the present invention will now be described with reference to the accompanying drawings in the embodiments of the present invention.
[0089] In related technologies, users often encounter situations where they don't know what movies or TV shows to watch during leisure and entertainment. They then interact with electronic devices via the internet to find the content they want. However, precisely because users don't know what they want to watch, they are unsure how to search and may enter vague information such as "what movies or TV shows are worth watching recently." This makes it difficult for search engines to retrieve the content the user wants.
[0090] In other technologies, electronic devices acquire and analyze users' historical behavior data to identify content that the user might be interested in, and then recommend such content to the user to achieve personalized recommendations. However, this process requires acquiring sufficient historical user behavior data to accurately analyze user interests and preferences. Furthermore, user interests and preferences can change randomly, causing a lag in the acquisition of user interests and preferences based on historical behavior data analysis, thus resulting in low accuracy of personalized recommendations.
[0091] To improve the accuracy of content recommendations, embodiments of the present invention provide a content recommendation method, apparatus, system, electronic device, and storage medium. The content recommendation method provided by this embodiment of the present invention is applied to a server and includes:
[0092] Obtain the current interaction information and extract the entities from the current interaction information to obtain the target entity, wherein the entity is used to represent the object in the interaction information;
[0093] If the current interaction information is the initial interaction information, the type of the current interaction information is identified based on the current interaction information and the target entity to obtain a first target information type;
[0094] Based on the first target information type and the target entity, guide information corresponding to the current interaction information is generated, and the guide information is sent to the client so that the client can display the guide information;
[0095] If the current interaction information is not the initial interaction information, the current interaction entity is determined based on the target entity and the historical interaction entities, wherein the historical interaction entities are entities extracted from at least one round of historical interaction information;
[0096] Based on the current interaction information and the current interaction entity, the type of the current interaction information is identified to obtain the second target information type;
[0097] Based on the second target information type and the current interaction entity, recommended information corresponding to the current interaction information is generated, and the recommended information is sent to the client so that the client can display the recommended information.
[0098] This invention provides a content recommendation method whereby the server extracts entities from the acquired current interaction information to obtain target entities. When the current interaction information is the initial interaction, the server identifies the type of the current interaction information by combining the current interaction information and the target entity. Based on the identified first target information type and the extracted target entity, the server generates guidance information and sends it to the client for display, guiding the user to initiate more interactions that accurately locate content of interest. Furthermore, when the current interaction information is not the initial interaction, the server determines the current interaction entity by combining the target entity and historical interaction entities extracted from at least one round of historical interaction information. This allows the current interaction entity obtained from multiple rounds of interaction to more accurately reflect the content of interest to the user. Furthermore, by identifying the type of interaction information based on the current interaction information and the current interaction entity, the accuracy of interaction information type identification is further improved. This allows for more accurate recommendation of desired content to the user based on the second target information type identified by the interaction information type and the current interaction entity, thus improving the accuracy of content recommendation.
[0099] The following is a detailed description of a content recommendation method provided by an embodiment of the present invention:
[0100] This invention provides a content recommendation method applicable to scenarios such as question-and-answer and interest-mining. In one example, the method is applied to the server side of a content recommendation system. This system also includes a client side. The client interacts with the user in the form of a chatbot to obtain interaction information and sends it to the server. The server processes the interaction information to determine the corresponding recommendation information and then displays the recommendation information to the user through the client, thus achieving intelligent content recommendation.
[0101] like Figure 1 As shown in the figure, the content recommendation method provided in this embodiment of the invention, applied to the server, can be implemented through the following steps:
[0102] S101, obtain the current interaction information, and extract the entities in the current interaction information to obtain the target entity.
[0103] This invention is applied to the server side of a content recommendation system. The server obtains the current interaction information of the user input forwarded by the client. This current interaction information is the interaction statement that the user currently inputs into the client of the content recommendation system.
[0104] This invention uses content recommendation in the film and television industry, specifically in question-and-answer and interest-based scenarios, as examples for illustration. The application of question-and-answer and interest-based scenarios in any other industry is similar. For instance, the current interactive information could be: Who is the director of movie XX? What other works has this director created?
[0105] In one example, a regular expression matching template can be pre-set. Using regular expression matching, entities contained in the current interaction information can be extracted to obtain the target entity. This regular expression matching template could include, for example, "[Entity 1] + What works are there?" and "[Entity 2] + What actors are in movies / TV series?", etc. Alternatively, entities contained in the current interaction information can be extracted to obtain the target entity by querying a knowledge graph constructed based on the entities contained in each piece of content to be recommended. Here, an entity represents an object in the interaction information. For example, in question-and-answer or interest-mining scenarios in the film and television industry, an entity could include at least one of the following: actor, director, film / TV content name, screenwriter information, etc.
[0106] In one possible implementation, the target entity can be represented by a tuple. For example, a tuple E can be represented as E = (Director Name, Actor Name, Film / TV Content Name, Content Type, Content Channel Type, Most Recent Dialogue Entity). Correspondingly, the structure of the target entity can be represented as: {Director Name: XX1; Actor Name: XX2; Film / TV Content Name: XX3; Content Type: XX4; Content Channel Type: XX5; Most Recent Dialogue Entity: {Director Name: XX1; Actor Name: XX3; Film / TV Content Name: XX3; Content Type: XX4; Content Channel Type: XX5}}. Representing the target entity in tuple form facilitates the management and recording of interactive information entities.
[0107] S102, when the current interaction information is the initial interaction information, the type of the current interaction information is identified based on the current interaction information and the target entity to obtain the first target information type.
[0108] Given the current interaction information, determine whether there is any historical interaction information. If there is no historical interaction information, the current interaction information is considered the initial interaction information; otherwise, the current interaction information is not considered the initial interaction information. If the current interaction information is the initial interaction information, directly identify the type of the current interaction information based on the current interaction information and the target entity extracted from it.
[0109] In one example, sample interaction information and sample interaction entities can be used as training samples, and the corresponding annotation information of the sample interaction information and sample interaction entities can be used as training labels. A type recognition model is pre-trained using the training samples and training labels. When recognizing the interaction information type, the current interaction information and the target entity are input into the trained type recognition model to identify the interaction information type, resulting in a first target information type. This first target information type represents the type of the initial interaction information. For example, the first target information type could include: work, director, screenwriter, character -> work, work -> release date, director -> work, new drama recommendation, etc.
[0110] S103, based on the first target information type and the target entity, generate the guidance information corresponding to the current interaction information, and send the guidance information to the client so that the client can display the guidance information.
[0111] To collect more user demand information and improve the accuracy of judging the content that users are interested in, in this embodiment of the invention, after identifying the type of the user's initial interaction information, guidance information is generated based on the first target information type identified from the initial interaction information type and the target entity extracted from the initial interaction information. This guidance information is the guided feedback information corresponding to the initial interaction information. The generated guidance information is sent to the client so that the client can display the guidance information to guide the user to input more demand information, which facilitates the collection of user demand information and accurately judges the content that users are interested in.
[0112] In one example, based on the first target information type and the target entity, a pre-set guidance information generation template is queried, and then guidance information corresponding to the current interaction information (i.e., the initial interaction information) is generated based on this template. For instance, if the first target information type is "person -> work," the target entities are a person (e.g., an actor) and a work (e.g., a movie, TV series), and the guidance information generation template is: "What era is the work from? For example, the last N years or earlier," then the generated guidance information corresponding to the current interaction information can be expressed as: "What era is the work from? For example, the last N years or earlier."
[0113] S104. If the current interaction information is not the initial interaction information, determine the current interaction entity based on the target entity and historical interaction entities.
[0114] If the current interaction information is not the initial interaction information, it means that the current interaction information is information that the user has interacted with again regarding the guidance information after the initial interaction information, or information that has been interacted with before and is now being interacted with again. In this case, by combining the target entity extracted from the current interaction information and the historical interaction entities, the current interaction entity is determined, and it is judged whether the interaction entity in the current interaction information has migrated compared to the historical interaction entities, in order to improve the accuracy of judging the content of interest to the user. The historical interaction entity is the entity extracted from at least one round of historical interaction information. Among them, whether the entity has migrated means whether the subject (or entity) corresponding to the interaction information has changed. For example, if the subject of the historical interaction entity is a TV series, while the subject of the current interaction entity has changed to a movie, it indicates that the entity has migrated, etc.
[0115] In one example, the server extracts entities from each round of interaction information and caches the extracted historical interaction entities. Then, if the current interaction information is not the initial interaction information, it calculates the relevance between the target entity extracted from the current interaction information and the historical interaction entities. When the relevance meets a preset condition, such as a relevance level (or association level) greater than 0.7, 0.8, or 0.9, it indicates that the current interaction entity has not migrated, and the historical interaction entities and the target entity address the same content. In this case, the target entity and the historical interaction entities are merged to obtain the current interaction entity. Otherwise, if the relevance does not meet the preset condition, it indicates that the current interaction entity has migrated, and the historical interaction entities and the target entity address different content. In this case, the historical interaction entity is discarded, and the target entity is determined as the current interaction entity. For example, calculating the relevance between the target entity and the historical interaction entities could involve calculating the text similarity between the target entity and the historical interaction entities.
[0116] In this embodiment of the invention, the content that the user is interested in can be accurately located through multi-round interaction.
[0117] S105, based on the current interaction information and the current interaction entity, identify the type of the current interaction information to obtain the second target information type.
[0118] In one example, sample interaction information and sample interaction entities can be used as training samples, and the corresponding annotation information of the sample interaction information and sample interaction entities can be used as training labels. The type recognition model is pre-trained using the training samples and training labels. When recognizing the type of interaction information, the current interaction information and the current interaction entity are input into the trained type recognition model to identify the interaction information type, resulting in a second target information type. This second target information type represents the type of the current interaction information. For example, the second target information type could include: work -> director, work -> screenwriter, character -> work, work -> release date, director -> work, new drama recommendation, etc.
[0119] S106. Based on the second target information type and the current interactive entity, generate recommendation information corresponding to the current interactive information, and send the recommendation information to the client so that the client can display the recommendation information.
[0120] In one example, based on the second target information type and the current interactive entity, a knowledge graph constructed from the entities contained in each content to be recommended is queried. Recommended information corresponding to the current interactive information is generated according to a preset message template and sent to the client for display. For example, the recommended information may include: actor name, film / TV content name, character name, director name, etc.
[0121] For example, the second target information type is "Person -> Works", the current interactive entity is: celebrity "XXX", and the preset message template is: "Person" participated in film and television content such as "Work 1", "Work 2", ... etc., where, in "Work 1", they played role 1, in "Work 2", they played role 2, etc. Then, by querying the knowledge graph constructed based on the entities contained in each content to be recommended, the recommended information corresponding to the current interactive information can be represented as: XXX participated in film and television content such as "Work A", "Work B", and "Work C", where, in "Work A", they played role a, in "Work B", they played role c.
[0122] This invention provides a content recommendation method whereby the server extracts entities from the acquired current interaction information to obtain target entities. When the current interaction information is the initial interaction, the server identifies the type of the current interaction information by combining the current interaction information and the target entity. Based on the identified first target information type and the extracted target entity, the server generates guidance information and sends it to the client for display, guiding the user to initiate more interactions that accurately locate content of interest. Furthermore, when the current interaction information is not the initial interaction, the server determines the current interaction entity by combining the target entity and historical interaction entities extracted from at least one round of historical interaction information. This allows the current interaction entity obtained from multiple rounds of interaction to more accurately reflect the content of interest to the user. Furthermore, by identifying the type of interaction information based on the current interaction information and the current interaction entity, the accuracy of interaction information type identification is further improved. This allows for more accurate recommendation of desired content to the user based on the second target information type identified by the interaction information type and the current interaction entity, thus improving the accuracy of content recommendation.
[0123] In one possible implementation, such as Figure 2 As shown, the process of extracting entities from the current interactive information to obtain the target entity in step S101 above may include:
[0124] S201, if the current interaction information is voice interaction information, convert the current interaction information into text information.
[0125] S202, perform word segmentation on the text information to obtain the word segmentation results.
[0126] If the current interaction information is voice-based, it is converted into text, and then segmented into words to obtain the segmentation result. If the current interaction information is not voice-based, it is directly segmented into words to obtain the segmentation result.
[0127] Exemplarily, the text information corresponding to the current interaction information can be, for example: Who is the director of the movie XX? Correspondingly, the current interaction information is segmented, and the segmentation result is: movie / XX / of / director / is / who / ? The segments included in the segmentation result are: "movie", "XX", "of", "director", "is", "who", and "?".
[0128] S203, match the segmentation result with the preset rules.
[0129] Among them, the preset rules are pre-set regular matching templates, which can be individual regular expressions. Exemplarily, the preset rules can include: What are the works of [\u4e00-\u9fa5_a-zA-Z0-9]+? The entity is: the field in [], which may be a director or an actor; Who is the actor of the movie [\u4e00-\u9fa5_a-zA-Z0-9]+? The entities are: the movie and the field in []; Who is the actor of the TV series [\u4e00-\u9fa5_a-zA-Z0-9]+? The entities are: the TV series and the field in []; Who is the actor of [\u4e00-\u9fa5_a-zA-Z0-9]+? The entity is: the field in [] and the actor; Who is the director of [\u4e00-\u9fa5_a-zA-Z0-9]+? The entity is: the field in [] and the director, etc. \u4e00-\u9fa5 represents any Chinese character, a-z represents any character from character a to character z, A-Z represents any character from character A to character Z, 0-9 represents any number from number 0 to 9, and + means that there are multiple regular matching contents, such as multiple words, characters or numbers.
[0130] Match the segmentation result with the preset rules one by one. When the segmentation result matches the preset rules, execute step S204. When the segmentation result does not match the preset rules, execute step S206.
[0131] S204, when the segmentation result matches the preset rules, extract the segments in the segmentation result that match the entity in the preset rules to obtain candidate entities.
[0132] Exemplarily, the segmentation result "movie / XX / of / director / is / who / ?" matches the preset rule "Who is the director of the movie [\u4e00-\u9fa5_a-z A-Z0-9]+?". The entity in the preset rule "Who is the director of the movie [\u4e00-\u9fa5_a-z A-Z0-9]+?" is the movie and the field in [], so the segments "movie" and "XX" that match the entity in the preset rule are extracted from the segmentation result to obtain the candidate entities "movie" and "XX".
[0133] S205, query whether the candidate entity matches the target entity dictionary, and if the candidate entity matches the target entity dictionary, use the candidate entity that matches the target entity dictionary as the target entity.
[0134] After extracting entities from the current interaction information according to preset rules, the extracted entities undergo further data cleaning. Specifically, the entities extracted according to the preset rules are filtered by querying whether candidate entities match the target entity dictionary. The target entity dictionary is constructed by extracting entities contained in the target knowledge graph, which is built based on the entities contained in each piece of content to be recommended.
[0135] In one example, if the content to be recommended is film and television content, then the knowledge graph constructed based on the entities contained in each film and television content will at least contain information such as actors, directors, film and television content names, and screenwriters. The actors, directors, film and television content names, and screenwriters contained in the target knowledge graph will be extracted, and the correspondence between actors, directors, film and television content names, and screenwriters will be established to generate a target entity dictionary. Correspondingly, the target entity dictionary contains the correspondence between actors, directors, film and television content names, and screenwriters.
[0136] The target entity dictionary is queried, and candidate entities that do not match the target entity dictionary are filtered out. Candidate entities that match the target entity dictionary are used as target entities to make the determined target entities more accurate.
[0137] S206, if the word segmentation result does not match the preset rules, query whether the word segmentation result contains words that match the target entity dictionary, and if the word segmentation result contains words that match the target entity dictionary, use the word segmentation that matches the target entity dictionary as the target entity.
[0138] If the word segmentation result does not match the preset rules, that is, no entity is extracted from the current interactive information by using the preset rules, then the target entity dictionary is queried directly. Each word in the word segmentation result is matched with the entity in the target entity dictionary, and the word that matches the target entity dictionary is taken as the target entity to extract the entity in the current interactive information.
[0139] In this embodiment of the invention, candidate entities are first extracted from the current interaction information by matching according to preset rules. Then, the extracted candidate entities are filtered by querying the target entity dictionary to extract entities from the current interaction information more accurately. When entities cannot be extracted from the current interaction information by using preset rules, entities from the current interaction information are extracted by querying the target entity dictionary. Since the target entity dictionary is constructed by extracting entities contained in the target knowledge graph, the entities extracted based on the target entity dictionary are more accurate, so that the type of interaction information can be more accurately identified in the future.
[0140] In one possible implementation, such as Figure 3 As shown, the process of extracting entities from the current interactive information to obtain the target entity in step S101 above may include:
[0141] S301, perform word segmentation on the current interactive information to obtain the word segmentation result.
[0142] S302, query whether the word segmentation results contain words that match the target entity dictionary.
[0143] The target entity dictionary is constructed by extracting entities from the target knowledge graph, which is built based on the entities contained in each piece of content to be recommended.
[0144] S303, if the segmented words in the segmentation result match the target entity dictionary, the segmented words that match the target entity dictionary shall be taken as the target entity.
[0145] The specific implementation process of steps S301-S303 can be referred to the implementation process of steps S202 and S206 above, and will not be repeated here in this embodiment of the invention.
[0146] In this embodiment of the invention, entities in the current interaction information are extracted directly by querying the target entity dictionary. Since the target entity dictionary is constructed by extracting entities contained in the target knowledge graph, the entities extracted based on the target entity dictionary are more accurate, so that the type of interaction information can be more accurately identified in the future.
[0147] In one possible implementation, the process of extracting entities from the current interactive information to obtain the target entity in step S101 above may include: performing word segmentation on the current interactive information to obtain the word segmentation result, matching the word segmentation result with a preset rule, and extracting the word segmentation that matches the entity in the preset rule from the word segmentation result when the word segmentation result matches the preset rule to obtain the target entity.
[0148] The specific implementation process can be referred to in steps S202-S204 above, and will not be repeated here in this embodiment of the invention. By using preset rule matching, entities in the current interaction information can be extracted simply and quickly.
[0149] In one possible implementation, such as Figure 4 As shown, the above method may further include:
[0150] S401, if none of the words in the word segmentation result match the target entity dictionary, calculate the similarity value between the symbol information corresponding to the words in the word segmentation result and the symbol information of each entity in the target entity dictionary.
[0151] If, after performing a pre-defined rule match and then querying the target entity dictionary, or even directly querying the target entity dictionary, no entity can be extracted from the current interactive information, it's possible that the current interactive information contains non-Chinese characters, an input error, or homophones in the word segmentation. In this case, the similarity value between the symbol information corresponding to each word in the word segmentation result and the symbol information of each entity in the target entity dictionary is calculated. Based on this similarity value, the interactive information is displayed to the user to help them identify the target entity. The symbol information consists of non-Chinese characters corresponding to the word segmentation or entity, such as pinyin, English characters, or other characters.
[0152] In one example, if the symbol information is the pinyin information corresponding to a word or entity, then the Jaccard similarity value between the pinyin information corresponding to the word and the pinyin information of each entity in the target entity dictionary can be calculated. The larger the Jaccard similarity value, the higher the similarity between the pinyin information corresponding to the word and the pinyin information of the entity.
[0153] S402, if the similarity value is greater than a preset threshold, send the entity corresponding to the similarity value greater than the preset threshold to the client so that the client can display the entity corresponding to the similarity value greater than the preset threshold.
[0154] S403: Receive entity selection information sent by the client and determine the target entity.
[0155] If the similarity value between the symbol information corresponding to the word segmentation and the symbol information of the entity is greater than a preset threshold, the entity with a similarity value greater than the preset threshold is sent to the client. This allows the client to display entities with similarity values greater than the preset threshold, thus showing the user entities with similarity values greater than the preset threshold so that the user can select the correct entity. Afterwards, the server receives the user's entity selection information from the client and identifies the selected entity as the target entity. The preset threshold can be set according to requirements, such as 0.6, 0.7, or 0.9, etc.
[0156] In this embodiment of the invention, if no entity can be extracted from the current interactive information after performing preset rule matching and then querying the target entity dictionary, or after directly querying the target entity dictionary, the entity with a similarity value greater than a preset threshold is displayed to the user through the client based on the similarity value between the symbol information corresponding to the word segmentation and the symbol information of each entity in the target entity dictionary. This allows the user to select the correct entity. In other words, by interacting with the user, the current preferences of the user can be extracted more accurately, and strong compatibility is provided for errors in the input of interactive information.
[0157] In one possible implementation, the above method may further include:
[0158] When there are multiple objects corresponding to a target entity, the system sends the multiple objects corresponding to the target entity to the client in descending order of popularity value according to the preset correspondence between objects and popularity values, so that the client can display the multiple objects corresponding to the target entity; and receives the object selection information sent by the client to determine the final target entity.
[0159] A target entity can correspond to multiple objects, such as actors, directors, or works with the same name. The same actor, director, or work can correspond to multiple objects. There are predefined correspondences between objects and popularity values; for example, object 1 corresponds to popularity value 1, object 2 corresponds to popularity value 2, and so on.
[0160] For example, when there are multiple objects corresponding to a target entity, a pre-defined correspondence table between objects and popularity values is queried, and the multiple objects corresponding to the target entity are sent to the client in descending order of popularity value, so that the client can display the multiple objects corresponding to the target entity to the user, making it easier for the user to select the correct target entity. After that, the server receives the object selection information sent by the client and determines the target entity selected by the user as the final target entity.
[0161] In this embodiment of the invention, when there are multiple objects corresponding to the same target entity, the multiple objects corresponding to the target entity are displayed to the user through client-user interaction, allowing the user to select the correct target entity, so as to better extract the user's current preferences accurately, and providing strong compatibility for the case where the target entity corresponds to multiple objects.
[0162] In one possible implementation, such as Figure 5 As shown, the implementation method for determining the current interaction entity based on the target entity and historical interaction entities in step S104 above may include:
[0163] S501, based on the target knowledge graph, calculates the association value between the target entity and historical interaction entities.
[0164] In one example, the association value can be obtained by calculating the text similarity value between the target entity and historical interaction entities based on the target knowledge graph. Alternatively, different weights can be pre-assigned to different entities in the target knowledge graph, and the association value between different entities in the target knowledge graph can be calculated based on these weights. Or, the association value can be obtained by calculating the distance between edges between the target entity and historical interaction entities in the target knowledge graph. The target knowledge graph is constructed based on the entities contained in each piece of content to be recommended.
[0165] For example, the target knowledge graph can be queried to determine whether there is a relationship between the target entity and the historical interaction entity. If there is no relationship, the relationship value between the target entity and the historical interaction entity is set to zero. If there is a relationship, such as the target entity and the historical interaction entity belonging to different works of the same actor or different works of the same director, the relationship value between the target entity and the historical interaction entity can be calculated (weighted summation, average, or summation, etc.) based on the weight values of the target entity and the historical interaction entity in the target knowledge graph.
[0166] S502, if the association value does not meet the preset conditions, the target entity is determined as the current interactive entity.
[0167] S503, if the relationship value meets the preset conditions, merge the target entity and the historical interaction entity to obtain the current interaction entity.
[0168] For example, the preset condition can be a pre-set relationship value threshold, such as 0.7, 0.8 or 0.9, etc., and the embodiments of the present invention do not specifically limit it.
[0169] If the association value does not meet the preset conditions, it means that the historical interaction entity and the target entity are targeting different content, and there is entity migration. In this case, the target entity is determined as the current interaction entity. If the association value meets the preset conditions, it means that the historical interaction entity and the target entity are targeting the same content, and there is no entity migration. In this case, the target entity and the historical interaction entity are merged to obtain the current interaction entity.
[0170] Specifically, merging the target entity and historical interaction entities to obtain the current interaction entity can be achieved by removing redundancy from the union of the target entity and historical interaction entities and determining the current interaction entity as the entity obtained.
[0171] In this embodiment of the invention, the association value between the target entity and the historical interaction entity is calculated to determine whether there is entity migration in the current interaction, so as to accurately find the content that the user is interested in (the current interaction entity) through multiple rounds of interaction.
[0172] In one possible implementation, the above method may further include updating historical interaction entities to current interaction entities.
[0173] Updating historical interaction entities to the current interaction entities facilitates the updating and storage of interaction entities obtained from the most recent historical interaction information, as well as the subsequent determination of current interaction information, thereby improving the accuracy of judging user interests.
[0174] In one possible implementation, step S503 above, where the association value meets a preset condition, involves merging the target entity and historical interaction entities to obtain the current interaction entity, and may include:
[0175] If the association value meets the preset conditions, determine whether the time interval between the timestamp corresponding to the current interaction information and the timestamp corresponding to the most recent interaction information in at least one round of historical interaction information is less than the preset time interval; if so, merge the target entity and the historical interaction entity to obtain the current interaction entity.
[0176] If the association value meets the preset conditions and the time interval between the timestamps of the most recent historical interaction and the current interaction is relatively short, it indicates that the historical interaction entity and the target entity are targeting the same content, and there is no entity migration. In this case, the target entity and the historical interaction entity are merged to obtain the current interaction entity. Otherwise, it is also considered that there is entity migration, and the target entity is identified as the current interaction entity. The preset time interval can be set according to actual needs, such as 5 minutes, 10 minutes, or 30 minutes, etc.
[0177] In this embodiment of the invention, the time interval between the timestamps of the most recent historical interaction information and the current interaction information is used to help determine whether there is entity migration in the current interaction, so as to accurately find the content (current interaction entity) that the user is interested in through multiple rounds of interaction.
[0178] In one possible implementation, step S105 above identifies the type of the current interaction information based on the current interaction information and the current interaction entity to obtain a second target information type, including:
[0179] Based on the current interaction information and the current interaction entity, the type recognition model is used to identify the type of the current interaction information to obtain the second target information type.
[0180] The type recognition model is trained based on sample interaction information and sample interaction entities, as well as the corresponding annotation information of sample interaction information and sample interaction entities. The annotation information is generated based on the target knowledge graph. The type recognition model includes a BERT pre-trained sub-model based on a Transformer-based bidirectional encoder. The BERT pre-trained sub-model is used to extract the feature vectors of the current interaction information and the current interaction entity. The target knowledge graph is constructed based on the entities contained in each content to be recommended.
[0181] In this embodiment of the invention, the BERT (Bidirectional Encoder Representation from Transformers) pre-trained sub-model is trained for downstream tasks using sample interaction information, sample interaction entities, and the corresponding annotation information to obtain a type recognition model. In one example, the type recognition model includes a BERT pre-trained sub-model, a dropout layer, and a fully connected layer. The BERT pre-trained sub-model extracts the feature vectors of the current interaction information and the current interaction entity. These feature vectors are then input to the dropout layer for feature discarding operations to obtain a target feature vector. This target feature vector is then input to the fully connected layer for classification operations, outputting a second target information type. For example, the dropout rate of the dropout layer can be set to 0.2, 0.3, or 0.4, etc. The fully connected layer inputs a 768-dimensional target feature vector and outputs a m-dimensional second target information type, where m is an integer greater than 1.
[0182] The annotation information is generated based on the target knowledge graph. For example, the annotation information for the sample interaction information "Who is the director of this XXXX1 drama?" and the sample interaction entity "XXXX1" is: work -> director; the annotation information for the sample interaction information "What other works has XXXX2 directed?" and the sample interaction entity "XXXX2" is: person -> work; the annotation information for the sample interaction information "In what year was XXXX3 released?" and the sample interaction entity "XXXX2" is: work -> release date; the annotation information for the sample interaction information "What new dramas are worth watching recently?" and the sample interaction entity null value is: new drama recommendation, etc.
[0183] For example, such as Figure 6 As shown, the current interaction information and the current interaction entity are: "Are there any new dramas worth watching recently?". The BERT pre-trained sub-model extracts the feature vectors (encodings of each word) of the current interaction information and the current interaction entity. Figure 6 The feature vectors are input into the discard layer for feature discarding operations (encoding 1 to N). Figure 6 The layers represented by the circles in the middle are used to obtain the target feature vector. Figure 6 The target feature vector is then input into a fully connected layer for classification, and the second target information type is output. Figure 6 (Second target information type 1 to second target information type m).
[0184] In this embodiment of the invention, annotation information for training samples is generated based on the target knowledge graph, enabling an understanding of the content to be recommended based on the target knowledge graph. Then, using sample interaction information, sample interaction entities, and their corresponding annotation information, the BERT pre-trained sub-model is trained for a downstream task (type recognition). This achieves an understanding of the current interaction semantics and sentiment analysis, resulting in a type recognition model. This type recognition model can then accurately identify the type of the current interaction information and entities. Furthermore, by using the trained type recognition model to distinguish the type of interaction information, the cost of manually identifying the type of interaction information is reduced.
[0185] In one possible implementation, the trained type recognition model can be updated in real time based on the generated recommendation information. For example, based on the generated recommendation information (or user feedback on the recommendation information), the current interaction information, the current interaction entity, and the corresponding annotation information can be added to the training samples of the type recognition model, updating the training model and enabling it to continuously learn and more accurately identify the type of interaction information.
[0186] In one possible implementation, such as Figure 7 As shown, the above step S106, which generates recommendation information corresponding to the current interaction information based on the second target information type and the current interaction entity, and sends the recommendation information to the client so that the client can display the recommendation information, may include:
[0187] S701, perform fusion processing on the second target information type and the current interactive entity to obtain the fusion processing result.
[0188] In one example, fusion processing refers to either merging or connecting processes. For instance, the second target information type is: Director -> Work, and the current interactive entity is: Director "xx". Fusing the second target information type and the current interactive entity yields the fusion result: xx -> Work.
[0189] S702, based on the fusion processing results, determine the current interaction type.
[0190] In one example, the current interaction type includes both question-and-answer and interest exploration types, each containing multiple subcategories. For instance, the question-and-answer type could include: director -> work, work -> director, and work -> release date, etc., while the interest exploration type could include: new show recommendations, children's movie viewing, etc. After obtaining the fusion processing result, it is matched with both the question-and-answer type and the interest exploration type to further determine the current interaction type to which the fusion processing result belongs.
[0191] S703, when the current interaction type is question-and-answer type, based on the second target information type and the current interaction entity, query the target knowledge graph to obtain the response information of the current interaction information, and based on the response information and the preset message template, generate the recommendation information corresponding to the current interaction information, and send the recommendation information to the client so that the client can display the recommendation information.
[0192] For example, the second target information type is: Director -> Works, the current interactive entity is: Director "xx", the fusion processing result is: xx -> Works, and the current interaction type is question-and-answer. In this case, the target knowledge graph can be queried directly based on the director entity xx to obtain the relevant works of director xx, i.e., the response information for the current interaction. The preset message template is: "Works directed by 'Director' include: 'Work 3', 'Work 4', ... etc." Combining the response information and the preset message template, the recommended information corresponding to the current interaction is generated: "Works directed by xx include: 'Work 4', 'Work 5', etc. The film 'Work 5' won the xxxx award in x year." This recommended information is then sent to the client for display.
[0193] S704: When the current interaction type is interest exploration, obtain the user profile information, generate personalized recommendation information corresponding to the current interaction information based on the user profile information, and send the recommendation information to the client so that the client can display the recommendation information.
[0194] For example, the second target information type is: Children-Watching Movies, the current interaction entity is empty, and the fusion processing result is: Children-Watching Movies, the current interaction type is interest exploration type. At this time, the user profile information of the user is obtained. For example, if the user has watched children's educational cartoons and children's educational picture books from the user's historical viewing records, it means that the user profile can be children. Based on the user profile information, personalized recommendation information corresponding to the current interaction information is generated: children's educational cartoons and picture books that have not been watched yet, and the recommendation information is sent to the client for display.
[0195] In this embodiment of the invention, when the current interaction type is question-and-answer, the target knowledge graph is queried to accurately recommend content that the user wants to watch; when the current interaction type is interest exploration, personalized content recommendations are made to the user based on user profile information.
[0196] In one possible implementation, the preset message template includes a first message template and a second message template. The first message template is used to generate guidance information for interactive information, and the second message template is used to generate recommendation information for interactive information.
[0197] Accordingly, in step S703 above, based on the second target information type and the current interactive entity, the target knowledge graph is queried to obtain the response information of the current interactive information. Based on the response information and a preset message template, recommendation information corresponding to the current interactive information is generated, and the recommendation information is sent to the client so that the client can display the recommendation information. This step may include:
[0198] Step 1: Based on the second target information type and the current interaction entity, query the target knowledge graph to obtain the response information of the current interaction information.
[0199] For example, the second target information type is: Director -> Works, the current interactive entity is: Director "xx", the fusion processing result is: xx -> Works, the current interaction type is question and answer type. At this time, based on the director entity xx, the target knowledge graph is queried directly to obtain all the works of director xx and the response information of the current interaction information is obtained.
[0200] Step 2: Determine whether the number of response messages exceeds the first preset number.
[0201] The first preset number can be set according to needs, such as 3, 5, or 10, etc. If the number of responses to the current interaction exceeds the first preset number, it means that there are many recommended results corresponding to the current interaction, and it is relatively difficult to accurately grasp the content that the user is interested in. To further accurately determine the content that the user is interested in, proceed to step three. If the number of responses to the current interaction does not exceed the first preset number, it means that the content that the user is interested in may be relatively accurately grasped, or the content that the user is interested in is too small to be more precise, and proceed to step four.
[0202] Step 3: If the number of response messages exceeds the first preset number, then based on the second target information type and at least one dimension parameter corresponding to the current interactive entity, and the first message template, generate guidance information corresponding to the current interactive information, send the guidance information to the client so that the client can display the guidance information, and return to the step of obtaining the current interactive information.
[0203] The server pre-associates different dimension parameters with different information types and entities and stores them in a dimension parameter table. When the number of response messages for the current interaction exceeds the first preset number, it queries the dimension parameter table based on the second target information type and the current interaction entity, and determines at least one corresponding dimension parameter. Based on the dimension parameter and the first message template, it generates guidance information corresponding to the current interaction, sends the guidance information to the client for display, and returns to execute the step of obtaining the current interaction information. This allows for the collection of more user needs through multiple rounds of interaction, thereby improving the accuracy of judging user interests.
[0204] For example, the second target information type is: Director -> Works, and the current interactive entity is: Director "xx". If the number of all works by Director xx exceeds the first preset number, the dimension parameter table is queried to determine at least one dimension parameter corresponding to the second target information type and the current interactive entity, including: era, work type, etc. The first message template includes: What era of the work? What is the preferred work type? Then, the guiding information corresponding to the current interactive information is generated: What era of the work? And what is the preferred work type?
[0205] Step 4: If the number of response messages does not exceed the first preset number, then based on the response information and the second message template, generate the recommendation information corresponding to the current interaction information, and send the recommendation information to the client so that the client can display the recommendation information.
[0206] For example, the second target information type is: Director -> Works, the current interactive entity is: Director "xx", and if the number of response messages for the current interactive information does not exceed the first preset number, the second message template is: The works directed by "Director" include: "Work 3", "Work 4", etc., and the recommended information corresponding to the current interactive information is generated: The works directed by xx include: "Work 4", "Work 5", etc., and the film "Work 5" won the xxxx award in x year. This recommended information is then sent to the client for display.
[0207] If the number of response messages in the current interaction exceeds the first preset number, in order to further accurately determine the content that the user is interested in, based on the second target information type and at least one dimension parameter corresponding to the current interaction entity, as well as the first message template, guidance information corresponding to the current interaction is generated. This guides the collection of more user demand information, thereby improving the accuracy of judging user interests and achieving accurate content recommendation.
[0208] In one possible implementation, step S704 above, which involves obtaining the user's profile information, generating personalized recommendation information corresponding to the current interaction information based on the user profile information, and sending the recommendation information to the client so that the client can display the recommendation information, may include:
[0209] When user profile information exists, personalized recommendation information corresponding to the current interaction information is generated based on the user profile information and the third message template, and the recommendation information is sent to the client so that the client can display the recommendation information; the third message template is used to generate recommendation information for interaction information;
[0210] When there is no user profile information, based on the second target information type or at least one dimension parameter corresponding to the current interactive entity, and the fourth message template, guide information corresponding to the current interactive information is generated and sent to the client so that the client can display the guide information and return to execute the step of obtaining the current interactive information. The fourth message template is used to generate guide information for interactive information.
[0211] The server queries whether user profile information for the current user is stored. If user profile information exists, it generates personalized recommendation information corresponding to the current interaction based on the user profile information and the third-party message template, and sends the recommendation information to the client for display. For example, if the user profile information is "children" and "movies," and the third-party message template contains multiple children's movies and TV shows, then personalized information on the latest online children's movies and TV shows (recommendation information corresponding to the current interaction information) is generated and displayed to the user through the client.
[0212] The server pre-associates different dimension parameters with different information types and entities and stores them in a dimension parameter table. When there is no user profile information, it queries the dimension parameter table based on the second target information type or the current interactive entity and determines at least one corresponding dimension parameter. Based on the dimension parameter and the fourth message template, it generates guidance information corresponding to the current interactive information, sends the guidance information to the client for display, and returns to execute the step of obtaining the current interactive information. This allows for the collection of more user needs through multiple rounds of interaction, thereby improving the accuracy of judging user interests.
[0213] For example, the second target information type is: Children - Movie Viewing. The current interaction entity is empty. When there is no user profile information, the dimension parameter table is queried to determine at least one dimension parameter corresponding to the second target information type, including: age, movie duration, etc. The fourth message template includes: What is the child's current age? What is the desired movie duration? This then generates the corresponding guidance information for the current interaction: What is the child's current age? And what is the desired movie duration?
[0214] When user profile information exists, personalized recommendation information corresponding to the current interaction information is generated and displayed through the client. When user profile information does not exist, in order to further accurately determine the content that the user is interested in, guidance information corresponding to the current interaction information is generated based on at least one dimension parameter corresponding to the second target information type or the current interaction entity, as well as the fourth message template. This guides the collection of more user demand information, which helps to improve the accuracy of judging user interests and achieve accurate content recommendation.
[0215] For example, such as Figure 8 As shown, the server consists of three main modules: session management, type recognition, and dialogue synthesis system. Each module can be deployed independently and they can collaborate with each other through interfaces. The server provides a unified interaction interface to the outside world.
[0216] The server receives user input information sent by the client through a unified interaction interface provided to the outside world. Figure 8 (User input). The session management module obtains the current interaction information input by the user through the client via a service interface, and performs word segmentation processing on the current interaction information to obtain the word segmentation result (i.e., ... Figure 8 The user-input content is segmented, and the segmentation results are matched with preset rules. If the segmentation results match the preset rules, the segmented words that match the entities in the preset rules are extracted from the segmentation results to obtain candidate entities (i.e., Figure 8 (Matching rules), and whether the segmented words contained in the query results match the target entity dictionary ( Figure 8(using a dictionary of Chinese entity words), if a segmented word in the segmentation result matches the target entity dictionary, the segmented word that matches the target entity dictionary is taken as the target entity (i.e., ...). Figure 8 The system uses an entity dictionary lookup to deduplicate candidate and target entities, then combines the deduplicated entities into tuples to obtain the final target entity. Further, based on the target entity and historical interaction entities cached in the historical session cache, it calculates the association value between the target entity and the historical interaction entities. Figure 8 (In the process of determining whether a session entity has migrated, if the association value does not meet the preset conditions, the target entity is identified as the current interaction entity.) Figure 8 (Create a session entity in the middle), and if the association value meets the preset conditions, merge the target entity and the historical interaction entity to obtain the current interaction entity. Figure 8 Merge session entities in the middle, and combine the current interaction entity ( Figure 8 The session entity is updated to the historical session cache. Figure 8 (Update session cache).
[0217] The type recognition module obtains the current interaction information and the current interaction entity through the type recognition interface, and inputs the current interaction information and the current interaction entity into the type recognition model. Figure 8 In a multi-class classification model, the type of current interactive information is identified to obtain the second target information type. Figure 8 (Type identification), further, the second target information type and the current interactive entity are fused to obtain the fusion processing result ( Figure 8 (Merge interaction types and entity information).
[0218] The dialogue synthesis system obtains the fusion processing results through the dialogue system interface, and determines the current interaction type based on the fusion processing results. Figure 8 (Is the intent in the text a question-and-answer section?) If the current interaction type is question-and-answer, query the target knowledge graph ( ). Figure 8 (Knowledge graph retrieval) to obtain the response information of the current interaction, and based on the response information and the preset message template ( Figure 8 (Chinese reply template), generate recommendation information corresponding to the current interaction information ( Figure 8 (Content synthesis in the dialogue), when the current interaction type is interest exploration, obtains the user's profile information, and based on the user profile information, generates personalized recommendation information corresponding to the current interaction information. Figure 8 Personalized recommendations (in Chinese).
[0219] Finally, the server sends the generated recommendation information to the client for display to the user through a unified interaction interface. Figure 8 (China-Dialogue Response)
[0220] For example, such as Figure 9a and Figure 9b As shown, Figure 9a In the process, the client forwards the user's current interaction information, "Can you recommend a movie about AA?", to the server. The server receives the current interaction information, extracts the entities from it, obtains the target entities: AA and "movie", and determines that the current interaction information is the initial interaction information. Based on the current interaction information and the target entities, the server identifies the type of the current interaction information, obtaining the first target information type: Person-Work. The server then generates the corresponding guidance information: "Okay, what era of movie would you like? For example: the last 3 years, the 2010s, the 2000s, or earlier." and sends the guidance information to the client for display. The client forwards the user's current interaction information, "The last 10 years," to the server. The server receives the current interaction information, extracts the entity from it, and obtains the target entity: 10 years. It determines that the current interaction is not the initial interaction. Based on the target entity (10 years) and historical interaction entities (AA and movies), it determines the current interaction entity (AA and movies, 10 years). Based on the current interaction information and the current interaction entity, it identifies the type of the current interaction, obtaining the second target information type: "People-Works." Because there are many responses related to AA movies from the last 10 years, it further generates guidance information corresponding to the current interaction: "Okay, do you have a preferred genre? For example: war, action, drama.", and so on, until the recommended information corresponding to the current interaction is generated: "Hello, based on your needs, we recommend the AA movie 'Movie AA'," and sends the recommendation information to the client to display to the user. Figure 9b Using a similar approach, the solution provided in the embodiments of the present invention is adopted to generate recommendation information corresponding to the current interaction information, and the recommendation information is sent to the client to be displayed to the user.
[0221] exist Figure 9a and Figure 9b In this process, the client interacts with the user and sends the information from that interaction to the server. The server then generates corresponding guidance or recommendation information based on the user's input. The client then displays the guidance or recommendation information to the user. Specifically, through multiple rounds of interaction with the user, the system can obtain the user's current preferences in real time and accurately recommend film and television content that the user is interested in, thereby improving the user experience and user stickiness of the film and television content platform.
[0222] Corresponding to the above method embodiments, the present invention also provides corresponding device embodiments.
[0223] like Figure 10As shown in the figure, this embodiment of the invention provides a content recommendation device applied to a server, the device comprising:
[0224] The first session management module 101 is used to obtain the current interaction information and extract the entities in the current interaction information to obtain the target entity, wherein the entity is used to represent the object in the interaction information;
[0225] The first type identification module 102 is used to identify the type of the current interaction information based on the current interaction information and the target entity when the current interaction information is the initial interaction information, so as to obtain the first target information type;
[0226] The information generation module 103 is used to generate guidance information corresponding to the current interactive information based on the first target information type and the target entity, and send the guidance information to the client so that the client can display the guidance information;
[0227] The second session management module 104 is used to determine the current interaction entity based on the target entity and historical interaction entities when the current interaction information is not the initial interaction information. The historical interaction entity is an entity extracted from at least one round of historical interaction information.
[0228] The second type identification module 105 is used to identify the type of the current interaction information based on the current interaction information and the current interaction entity, and obtain the second target information type;
[0229] The content recommendation module 106 is used to generate recommended information corresponding to the current interactive information based on the second target information type and the current interactive entity, and send the recommended information to the client so that the client can display the recommended information.
[0230] This invention provides a content recommendation device whereby the server extracts entities from the acquired current interaction information to obtain target entities. When the current interaction information is the initial interaction, the server identifies the type of the current interaction information by combining the current interaction information and the target entity. Based on the identified first target information type and the extracted target entity, the server generates guidance information and sends it to the client for display, guiding the user to initiate more interactions that accurately locate content of interest. Furthermore, when the current interaction information is not the initial interaction, the server determines the current interaction entity by combining the target entity and historical interaction entities extracted from at least one round of historical interaction information. This allows the current interaction entity obtained from multiple rounds of interaction to more accurately reflect the content of interest to the user. By identifying the type of interaction information based on the current interaction information and the current interaction entity, the accuracy of interaction information type identification is further improved. This allows for more accurate recommendation of desired content to the user based on the second target information type identified by the interaction information type identification result and the current interaction entity, thus improving the accuracy of content recommendation.
[0231] In one possible implementation, the first session management module 101 extracts entities from the current interaction information to obtain the target entity, including:
[0232] If the current interaction information is voice interaction information, convert the current interaction information into text information;
[0233] The text information is segmented into words to obtain the segmentation results;
[0234] Match the word segmentation results with preset rules;
[0235] If the word segmentation result matches the preset rule, extract the word segmentation result that matches the entity in the preset rule to obtain the candidate entity;
[0236] The system queries whether a candidate entity matches the target entity dictionary, and if a candidate entity matches the target entity dictionary, it takes the candidate entity that matches the target entity dictionary as the target entity. The target entity dictionary is constructed by extracting entities contained in the target knowledge graph, which is constructed based on the entities contained in each content to be recommended.
[0237] If the word segmentation result does not match the preset rules, query whether the word segmentation result contains words that match the target entity dictionary. If the word segmentation result contains words that match the target entity dictionary, use the word segmentation that matches the target entity dictionary as the target entity.
[0238] In one possible implementation, the first session management module 101 extracts entities from the current interaction information to obtain the target entity, including:
[0239] Perform word segmentation on the current interactive information to obtain the word segmentation results;
[0240] The query checks whether the segmented words in the word segmentation results match the target entity dictionary. The target entity dictionary is constructed by extracting entities from the target knowledge graph, which is built based on the entities contained in each piece of content to be recommended.
[0241] If a word segment in the segmentation result matches the target entity dictionary, the word segment that matches the target entity dictionary will be used as the target entity.
[0242] In one possible implementation, the first session management module 101 is further configured to:
[0243] If none of the words in the word segmentation result match the target entity dictionary, calculate the similarity value between the symbol information corresponding to the words in the word segmentation result and the symbol information of each entity in the target entity dictionary.
[0244] If the similarity value is greater than a preset threshold, the entity corresponding to the similarity value greater than the preset threshold will be sent to the client so that the client can display the entity corresponding to the similarity value greater than the preset threshold.
[0245] Receive entity selection information sent by the client and determine the target entity.
[0246] In one possible implementation, the first session management module 101 is further configured to:
[0247] In the case where there are multiple objects corresponding to a target entity, according to the preset correspondence between objects and popularity values, the multiple objects corresponding to the target entity are sent to the client in descending order of popularity values so that the client can display the multiple objects corresponding to the target entity.
[0248] Receive object selection information sent by the client and determine the final target entity.
[0249] In one possible implementation, the second session management module 104 determines the current interaction entity based on the target entity and historical interaction entities, including:
[0250] Based on the target knowledge graph, the association value between the target entity and the historical interaction entity is calculated. The target knowledge graph is constructed based on the entities contained in each content to be recommended.
[0251] If the relationship value does not meet the preset conditions, the target entity will be determined as the current interactive entity;
[0252] If the relationship value meets the preset conditions, the target entity and the historical interaction entity are merged to obtain the current interaction entity.
[0253] In one possible implementation, the second session management module 104 is further configured to:
[0254] Update the historical interaction entity to the current interaction entity.
[0255] In one possible implementation, the above-mentioned merging of the target entity and historical interaction entities to obtain the current interaction entity when the association value meets a preset condition includes:
[0256] If the association value meets the preset conditions, determine whether the time interval between the timestamp corresponding to the current interaction information and the timestamp corresponding to the most recent interaction information in at least one round of historical interaction information is less than the preset time interval; if so, merge the target entity and the historical interaction entity to obtain the current interaction entity.
[0257] In one possible implementation, the second type identification module 105 is specifically used to identify the type of the current interaction information based on the current interaction information and the current interaction entity using a type identification model to obtain the second target information type.
[0258] The type recognition model is trained based on sample interaction information and sample interaction entities, as well as the corresponding annotation information of sample interaction information and sample interaction entities. The annotation information is generated based on the target knowledge graph. The type recognition model includes a BERT pre-trained sub-model based on a Transformer-based bidirectional encoder. The BERT pre-trained sub-model is used to extract the feature vectors of the current interaction information and the current interaction entity. The target knowledge graph is constructed based on the entities contained in each content to be recommended.
[0259] In one possible implementation, the above-mentioned content recommendation module 106 is specifically used for:
[0260] The second target information type and the current interactive entity are fused together to obtain the fusion result.
[0261] Based on the fusion processing results, determine the current interaction type;
[0262] When the current interaction type is question and answer, based on the second target information type and the current interaction entity, the target knowledge graph is queried to obtain the response information of the current interaction information. Based on the response information and the preset message template, the recommendation information corresponding to the current interaction information is generated and sent to the client so that the client can display the recommendation information. The target knowledge graph is constructed based on the entities contained in each content to be recommended.
[0263] When the current interaction type is interest exploration, the system obtains the user profile information, generates personalized recommendation information corresponding to the current interaction information based on the user profile information, and sends the recommendation information to the client so that the client can display the recommendation information.
[0264] In one possible implementation, the preset message template includes a first message template and a second message template. The first message template is used to generate guidance information for interactive information, and the second message template is used to generate recommendation information for interactive information.
[0265] Based on the second target information type and the current interactive entity, the above-mentioned method queries the target knowledge graph to obtain the response information for the current interactive information. Based on the response information and a preset message template, it generates recommendation information corresponding to the current interactive information and sends the recommendation information to the client so that the client can display the recommendation information, including:
[0266] Based on the second target information type and the current interaction entity, query the target knowledge graph to obtain the response information of the current interaction information;
[0267] Determine whether the number of response messages exceeds a first preset number;
[0268] If the number of response messages exceeds the first preset number, then based on the second target information type and at least one dimension parameter corresponding to the current interactive entity, as well as the first message template, guide information corresponding to the current interactive information is generated, the guide information is sent to the client so that the client can display the guide information, and the process returns to the step of obtaining the current interactive information.
[0269] If the number of response messages does not exceed the first preset number, then based on the response information and the second message template, the recommended information corresponding to the current interaction information is generated and sent to the client so that the client can display the recommended information.
[0270] In one possible implementation, the process of obtaining user profile information, generating personalized recommendation information corresponding to the current interaction based on the user profile information, and sending the recommendation information to the client so that the client can display the recommendation information includes:
[0271] When user profile information exists, personalized recommendation information corresponding to the current interaction information is generated based on the user profile information and the third message template, and the recommendation information is sent to the client so that the client can display the recommendation information; the third message template is used to generate recommendation information for interaction information;
[0272] When there is no user profile information, based on the second target information type or at least one dimension parameter corresponding to the current interactive entity, and the fourth message template, guide information corresponding to the current interactive information is generated and sent to the client so that the client can display the guide information and return to execute the step of obtaining the current interactive information. The fourth message template is used to generate guide information for interactive information.
[0273] Corresponding to the above method embodiments, the present invention also provides corresponding system embodiments.
[0274] like Figure 11 As shown, this embodiment of the invention provides a content recommendation system, including: a client 111 and a server 112;
[0275] Client 111 is used to obtain the current interaction information and send it to the server.
[0276] Server 112 is used to receive current interaction information, extract entities from the current interaction information to obtain target entities; if the current interaction information is the initial interaction information, it identifies the type of the current interaction information based on the current interaction information and the target entity to obtain a first target information type, and generates guidance information corresponding to the current interaction information based on the first target information type and the target entity, and sends the guidance information to client 111; if the current interaction information is not the initial interaction information, it determines the current interaction entity based on the target entity and historical interaction entities, identifies the type of the current interaction information based on the current interaction information and the current interaction entity to obtain a second target information type, and generates recommendation information corresponding to the current interaction information based on the second target information type and the current interaction entity, and sends the recommendation information to client 111; wherein, the entity is used to represent the object in the interaction information, and the historical interaction entity is the entity extracted from at least one round of historical interaction information;
[0277] Client 111 is also used to receive and display guidance information, as well as to receive and display the recommendation information.
[0278] This invention provides a content recommendation system whereby the server extracts entities from the acquired current interaction information to obtain target entities. When the current interaction information is the initial interaction, the system identifies the type of the current interaction information by combining the current interaction information and the target entity. Based on the identified first target information type and the extracted target entity, it generates guidance information and sends it to the client for display, guiding the user to initiate more interactions that accurately locate content of interest. Furthermore, when the current interaction information is not the initial interaction, the system determines the current interaction entity by combining the target entity and historical interaction entities extracted from at least one round of historical interaction information. This allows the current interaction entity obtained from multiple rounds of interaction to more accurately reflect the content of interest to the user. Furthermore, by identifying the type of interaction information based on the current interaction information and the current interaction entity, the system further improves the accuracy of interaction information type identification. This allows for more accurate recommendation of desired content to the user based on the second target information type identified by the interaction information type identification result and the current interaction entity, thus improving the accuracy of content recommendation.
[0279] This invention also provides an electronic device, such as... Figure 12 As shown, it includes a processor 121, a communication interface 122, a memory 123, and a communication bus 124, wherein the processor 121, the communication interface 122, and the memory 123 communicate with each other through the communication bus 124.
[0280] Memory 123 is used to store computer programs;
[0281] When the processor 121 executes the program stored in the memory 123, it implements the steps of any of the above method embodiments to achieve the same technical effect.
[0282] The communication bus mentioned above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not mean that there is only one bus or one type of bus.
[0283] The communication interface is used for communication between the aforementioned terminal and other devices.
[0284] The memory may include random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.
[0285] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0286] In another embodiment of the present invention, a computer-readable storage medium is also provided, wherein a computer program is stored therein, and when the computer program is executed by a processor, it implements the steps of any of the methods described in the above embodiments to achieve the same technical effect.
[0287] In another embodiment of the present invention, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to perform the steps of any of the methods described in the above embodiments to achieve the same technical effect.
[0288] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk (SSD)).
[0289] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0290] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the device / system / electronic device embodiments are basically similar to the method embodiments, so the descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0291] The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention are included within the scope of protection of the present invention.
Claims
1. A content recommendation method characterized by, Applied to a server, the method comprises: obtaining current interaction information, and extracting entities in the current interaction information to obtain target entities, wherein the entities are used to represent objects in the interaction information; in the case that the current interaction information is initial interaction information, identifying the type of the current interaction information based on the current interaction information and the target entities, to obtain a first target information type; based on the first target information type and the target entities, generating guide information corresponding to the current interaction information, and sending the guide information to the client to enable the client to display the guide information; in the case that the current interaction information is not initial interaction information, determining a current interaction entity based on the target entities and historical interaction entities, wherein the historical interaction entities are entities extracted from at least one round of historical interaction information; identifying the type of the current interaction information based on the current interaction information and the current interaction entity, to obtain a second target information type; based on the second target information type and the current interaction entity, generating recommendation information corresponding to the current interaction information, and sending the recommendation information to the client to enable the client to display the recommendation information; wherein the determination of the current interaction entity based on the target entities and the historical interaction entities comprises: calculating the correlation relationship value between the target entities and the historical interaction entities based on a target knowledge graph, wherein the target knowledge graph is constructed based on entities contained in each to-be-recommended content; in the case that the correlation relationship value does not satisfy a preset condition, determining the target entities as the current interaction entity; the correlation relationship value not satisfying the preset condition indicates that the current interaction entity has migrated; in the case that the correlation relationship value satisfies the preset condition, determining whether the time interval between the timestamp corresponding to the current interaction information and the timestamp corresponding to the most recent interaction information in the at least one round of historical interaction information is less than a preset time interval; if yes, merging the target entities and the historical interaction entities to obtain the current interaction entity.
2. The method of claim 1, wherein, the extraction of the target entities from the entities in the current interaction information comprises: in the case that the current interaction information is voice interaction information, converting the current interaction information into text information; performing word segmentation processing on the text information to obtain a word segmentation result; matching the word segmentation result with a preset rule; in the case that the word segmentation result matches the preset rule, extracting the word segmentation that matches the entities in the preset rule from the word segmentation result to obtain candidate entities; querying whether the candidate entities hit a target entity dictionary, and in the case that the candidate entities hit the target entity dictionary, taking the candidate entities that hit the target entity dictionary as target entities; the target entity dictionary is constructed by extracting entities contained in a target knowledge graph, and the target knowledge graph is constructed based on entities contained in each to-be-recommended content; In a case where the word segmentation result does not match the preset rule, it is inquired whether the word segmentation included in the word segmentation result hits the target entity dictionary, and in a case where the word segmentation included in the word segmentation result hits the target entity dictionary, the word segmentation hitting the target entity dictionary is taken as a target entity.
3. The method of claim 1, wherein, The extracting the entity in the current interaction information comprises: performing word segmentation processing on the current interaction information to obtain a word segmentation result; inquiring whether the word segmentation included in the word segmentation result hits a target entity dictionary; the target entity dictionary is constructed by extracting entities included in a target knowledge graph, and the target knowledge graph is constructed based on entities included in each to-be-recommended content; in a case where the word segmentation included in the word segmentation result hits the target entity dictionary, the word segmentation hitting the target entity dictionary is taken as a target entity.
4. The method according to claim 2 or 3, characterized in that, The method further comprises: in a case where none of the word segmentations included in the word segmentation result hits the target entity dictionary, a similarity value between symbol information corresponding to the word segmentation included in the word segmentation result and symbol information of each entity in the target entity dictionary is calculated; in a case where the similarity value is greater than a preset threshold, the entity corresponding to the similarity value greater than the preset threshold is sent to a client, so that the client displays the entity corresponding to the similarity value greater than the preset threshold; entity selection information sent by the client is received to determine a target entity.
5. The method according to claim 2 or 3, characterized in that, The method further comprises: in a case where there are multiple objects corresponding to the target entity, the multiple objects corresponding to the target entity are sent to a client in a descending order of heat values according to a preset correspondence between objects and heat values, so that the client displays the multiple objects corresponding to the target entity; object selection information sent by the client is received to determine a final target entity.
6. The method of claim 1, wherein, The method further comprises: the historical interaction entity is updated to the current interaction entity.
7. The method of claim 1, wherein, The identifying the type of the current interaction information based on the current interaction information and the current interaction entity to obtain a second target information type comprises: identifying the type of the current interaction information based on the current interaction information and the current interaction entity by using a type identification model to obtain a second target information type; wherein the type identification model is obtained by training according to sample interaction information and sample interaction entities and annotation information corresponding to the sample interaction information and the sample interaction entities, the annotation information is generated according to a target knowledge graph, and the type identification model comprises a bidirectional encoder representation from transformers (BERT) pre-training sub-model, the BERT pre-training sub-model is used to extract feature vectors of the current interaction information and the current interaction entity, and the target knowledge graph is constructed based on entities included in each to-be-recommended content.
8. The method of claim 1, wherein, The generating recommendation information corresponding to the current interaction information based on the second target information type and the current interaction entity and sending the recommendation information to a client to enable the client to display the recommendation information comprises: fusing the second target information type and the current interaction entity to obtain a fusion processing result; determining a current interaction type based on the fusion processing result; in a case where the current interaction type is a question and answer type, querying a target knowledge graph based on the second target information type and the current interaction entity to obtain response information of the current interaction information, and generating recommendation information corresponding to the current interaction information based on the response information and a preset message template, and sending the recommendation information to a client to enable the client to display the recommendation information, the target knowledge graph being constructed based on entities included in each to-be-recommended content; in a case where the current interaction type is an interest exploration type, obtaining user portrait information of a user, generating recommendation information corresponding to the current interaction information based on the user portrait information, and sending the recommendation information to a client to enable the client to display the recommendation information.
9. The method of claim 8, wherein, the preset message template includes a first message template and a second message template, the first message template being used to generate guide information of interaction information, and the second message template being used to generate recommendation information of interaction information; the querying of the target knowledge graph based on the second target information type and the current interaction entity to obtain response information of the current interaction information, and the generating of recommendation information corresponding to the current interaction information based on the response information and the preset message template, and the sending of the recommendation information to the client to enable the client to display the recommendation information, include: querying the target knowledge graph based on the second target information type and the current interaction entity to obtain response information of the current interaction information; determining whether a quantity of the response messages exceeds a first preset quantity; if the quantity of the response messages exceeds the first preset quantity, generating guide information corresponding to the current interaction information based on at least one dimension parameter corresponding to the second target information type and the current interaction entity and the first message template, sending the guide information to the client to enable the client to display the guide information, and returning to execute the step of obtaining current interaction information; if the quantity of the response messages does not exceed the first preset quantity, generating recommendation information corresponding to the current interaction information based on the response information and the second message template, and sending the recommendation information to the client to enable the client to display the recommendation information.
10. The method of claim 8, wherein, the obtaining of user portrait information of a user, the generating of recommendation information corresponding to the current interaction information based on the user portrait information, and the sending of the recommendation information to the client to enable the client to display the recommendation information, include: in a case where the user portrait information of the user exists, generating recommendation information corresponding to the current interaction information based on the user portrait information and a third message template, and sending the recommendation information to the client to enable the client to display the recommendation information, the third message template being used to generate recommendation information of interaction information; In the absence of the user portrait information of the user, the guiding information corresponding to the current interaction information is generated based on at least one dimension parameter corresponding to the second target information type or the current interaction entity and a fourth message template, and the guiding information is sent to the client to enable the client to display the guiding information, and the step of obtaining the current interaction information is returned.
11. A content recommendation apparatus characterized by comprising: The device applied to the server comprises: A first session management module is configured to obtain current interaction information and extract entities in the current interaction information to obtain target entities, wherein the entities are used to represent objects in the interaction information. A first type identification module is configured to identify the type of the current interaction information based on the current interaction information and the target entities to obtain a first target information type in the case that the current interaction information is initial interaction information. An information generation module is configured to generate guiding information corresponding to the current interaction information based on the first target information type and the target entities, and send the guiding information to the client to enable the client to display the guiding information. A second session management module is configured to determine a current interaction entity based on the target entities and historical interaction entities in the case that the current interaction information is not initial interaction information, wherein the historical interaction entities are entities extracted from at least one round of historical interaction information. A second type identification module is configured to identify the type of the current interaction information based on the current interaction information and the current interaction entity to obtain a second target information type. A content recommendation module is configured to generate recommendation information corresponding to the current interaction information based on the second target information type and the current interaction entity, and send the recommendation information to the client to enable the client to display the recommendation information. The second session management module determines the current interaction entity based on the target entities and the historical interaction entities, which comprises: calculating an association relationship value between the target entities and the historical interaction entities based on a target knowledge graph, wherein the target knowledge graph is constructed based on entities contained in each content to be recommended; in the case that the association relationship value does not satisfy a preset condition, the target entities are determined as the current interaction entity; the association relationship value not satisfying the preset condition indicates that the current interaction entity has migrated; in the case that the association relationship value satisfies the preset condition, it is judged whether a time interval between a timestamp corresponding to the current interaction information and a timestamp corresponding to the most recent interaction information in the at least one round of historical interaction information is less than a preset time interval; if yes, the target entities and the historical interaction entities are merged to obtain the current interaction entity.
12. A content recommendation system characterized by, The system comprises a client and a server. The client is configured to obtain current interaction information and send the current interaction information to the server. The server is configured to receive the current interaction information, extract an entity in the current interaction information to obtain a target entity, identify a type of the current interaction information based on the current interaction information and the target entity to obtain a first target information type in a case where the current interaction information is initial interaction information, generate guide information corresponding to the current interaction information based on the first target information type and the target entity, and send the guide information to the client; in a case where the current interaction information is not initial interaction information, determine a current interaction entity based on the target entity and a historical interaction entity, identify the type of the current interaction information based on the current interaction information and the current interaction entity to obtain a second target information type, generate recommendation information corresponding to the current interaction information based on the second target information type and the current interaction entity, and send the recommendation information to the client; the entity is used to represent an object in the interaction information, and the historical interaction entity is an entity extracted from at least one round of historical interaction information. The client is further configured to receive and display the guide information, and receive and display the recommendation information. The server determines the current interaction entity based on the target entity and the historical interaction entity, which includes calculating a correlation relationship value between the target entity and the historical interaction entity based on a target knowledge graph, the target knowledge graph being constructed based on entities contained in each piece of recommended content, determining the target entity as the current interaction entity in a case where the correlation relationship value does not satisfy a preset condition, and the correlation relationship value not satisfying the preset condition indicating that the current interaction entity has migrated, and determining the current interaction entity by merging the target entity and the historical interaction entity in a case where the correlation relationship value satisfies the preset condition and a time interval between a timestamp corresponding to the current interaction information and a timestamp corresponding to the most recent interaction information in the at least one round of historical interaction information is less than a preset time interval.
13. An electronic device, comprising: The computer readable storage medium stores a computer program, and the computer program is executed by the processor to implement the method steps of any one of claims 1-10. The computer readable storage medium stores a computer program, and the computer program is executed by the processor to implement the method steps of any one of claims 1-10. 14. A computer-readable storage medium, characterized in that,
Citation Information
Patent Citations
Natural language question and answer method, system and device and electronic equipment
CN114896380A
Entity recognition method, medium, device and computing equipment
CN115221869A
Method and apparatus for dialogue based on recommended verbal skill
CN115640386A