A method for recommending public opinion information based on knowledge graph
By obtaining public opinion information through crawlers and natural language processing, we build a knowledge graph, analyze user behavior, and combine exploration and utilization strategies and data mining technology to recommend unpopular information that matches user interests, solving the problem of lack of novelty in recommended information in existing technologies. , achieving diversified and accurate personalized recommendations.
Patent Information
- Application Number
- CN202410510982.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-26
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2044-04-26
AI Technical Summary
Existing public opinion information recommendation systems based on knowledge graphs have the problem that the recommended information lacks novelty and cannot effectively recommend unpopular information.
Obtain movie public opinion information through Python crawlers, use natural language processing and machine learning technology for pre-processing and entity recognition, build a knowledge graph, analyze user behavior data to form a personalized interest model, combine exploration and utilization strategies and data mining technology, and recommend and interact with users Interest-matched unpopular information, and a user feedback mechanism is introduced to adjust the recommendation strategy in real time.
It realizes the diversification of recommended information and the recommendation of unpopular information, deeply explores the potential interests of users, provides accurate and personalized recommendation services, and solves the problem of lack of novelty of recommended information.
Smart Images

Figure CN118193850B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a public opinion information recommendation method based on knowledge graph. Background Art
[0002] It has emerged with the rapid development of big data and artificial intelligence technology. In today's increasingly complex and changeable network environment, public opinion information shows an explosive growth trend. How to effectively process, analyze and utilize this public opinion information has become an important challenge faced by enterprises and government agencies. As a technology for representing and storing large amounts of information, knowledge graphs have powerful semantic expression and logical reasoning capabilities. It associates and integrates the various elements in public opinion information through the concepts of entities, relationships and attributes, forming an information network with intrinsic connections. This information network not only helps us understand the overall situation of public opinion information more comprehensively, but also deeply explores the inherent laws and connections between public opinion information.
[0003] The existing public opinion information recommendation system based on knowledge graph collects the search terms of users in the public opinion system within a certain period of time, and segments and ranks the target search terms belonging to the same word category. It uses collaborative filtering methods to perform text analysis, user behavior analysis, similar community discovery and user feature extraction to recommend highly evaluated public opinion topics to users.
[0004] For example, a public opinion analysis method disclosed in a patent application with publication number: CN111914087A includes: collecting public opinion data, the public opinion data includes project publicity materials and public opinions under the project publicity materials, media reports on project publicity materials, and public discussions on project publicity materials; preprocessing the public opinion data to obtain structured public opinion information; generating public opinion objects based on the public opinion information, the public opinion objects include object identification, object category, spatiotemporal information, semantic information, emotional information, and relationship information; performing similarity matching between the public opinion objects and public opinion cases in the public opinion case library to obtain the most similar public opinion cases; and obtaining a public opinion control plan based on the analysis of the most similar public opinion cases. The present invention can reasonably mine network public opinion data, quickly process massive multi-source public opinion data, obtain valuable public opinion information, and provide data support for subsequent public opinion case similarity matching and public opinion control plan analysis.
[0005] For example, the invention patent announcement with announcement number: CN110609950B announces a method and system for recommending search terms in a public opinion system, including: based on a public opinion word segmentation word class mapping table, obtaining the word classes that each user in the target public opinion system is interested in, and real-time collection of user search terms of all public opinion users of the public opinion system within a second predetermined time period before the current moment, popularity ranking of target search word segmentations belonging to the same word class, and being able to recommend target search word segmentations with higher popularity rankings in the word classes of interest to the target user based on the word classes of interest corresponding to the target user.
[0006] However, in the process of implementing the technical solution of the invention in the embodiments of the present application, the present application found that the above technology has at least the following technical problems:
[0007] In the existing technology, by integrating multi-source heterogeneous information, the knowledge graph can form a rich entity relationship network and provide users with information of interest, but there is a problem that the recommended information lacks novelty. Summary of the invention
[0008] The embodiment of the present application solves the problem of lack of novelty of recommended information in the prior art by providing a public opinion information recommendation method based on a knowledge graph, and realizes the diversification of recommended information and the recommendation of unpopular information.
[0009] The embodiment of the present application provides a method for recommending public opinion information based on a knowledge graph, comprising the following steps: automatically crawling movie public opinion information through a Python crawler; preprocessing the automatically crawled movie public opinion information using natural language processing technology; performing entity recognition and relationship extraction on the preprocessed public opinion information to extract key entities and the relationships between key entities; constructing a knowledge graph based on the extracted key entities and the relationships between key entities; analyzing user behavior data using machine learning technology to mine users' interest areas and topics of concern to form users' personalized interest tags, and constructing a user interest model based on strangers and a user interest model based on friends based on the users' personalized interest tags. Interest model, and then integrate the stranger-based user interest model and the friend-based user interest model to form a complete user interest model; based on the user interest model, search for movie public opinion information related to the user's interests in the knowledge graph, and find out the public opinion information matching the user's interests by calculating the entity similarity and relationship matching; according to the matching results between the user interest model and the movie public opinion information, formulate a recommendation strategy, and recommend public opinion information matching the user's interests to the user according to the user's personalized needs. At the same time, use exploration and utilization strategies, data mining and text analysis technology to recommend topics to users; design a user feedback method to allow users to provide feedback on the recommendation results, and adjust the recommendation strategy in real time according to user feedback.
[0010] Furthermore, the step of preprocessing the collected movie public opinion information using natural language processing technology includes: performing data cleaning by automatically scanning the movie public opinion text content, identifying and removing information that is not directly related to the movie public opinion, converting the cleaned text into a standardized format, removing punctuation marks, special characters and spaces, using the ji eba word segmentation tool to perform accurate vocabulary segmentation based on the characteristics of the movie public opinion text, expanding the custom dictionary for professional vocabulary and terminology in the film field, and based on word segmentation, using NLTK to perform part-of-speech tagging on the movie public opinion text for special vocabulary in the film field, building a special stop word list in combination with the characteristics of movie public opinion, removing noise in the text, using the NER tool to identify named entities in the text, parsing the structure of sentences through syntactic analysis tools, identifying the grammatical components of sentences for syntactic analysis, and then performing feature extraction on the preprocessed text to extract movie feature vectors and user feature vectors.
[0011] Furthermore, the steps of entity recognition and relationship extraction of the preprocessed public opinion information include: entity recognition part: defining the entity category of the preprocessed public opinion information, the entity category includes personal name, place name, organization name, product name, event name, taking the preprocessed public opinion information as input data, applying the entity recognition model to perform entity recognition, analyzing the text content through the entity recognition model, identifying the entities matching the defined entity category, and then post-processing the entities identified by the entity recognition model, the post-processing steps include removing duplicate entities and merging similar entities; relationship extraction part: determining the relationship type to be extracted in the project, selecting a suitable relationship extraction model for relationship extraction, generating entity pairs from the identified entities, and extracting features related to these entity pairs; taking the generated entity pairs and their features as input data, applying the relationship extraction model to perform relationship judgment, analyzing the context information between the entity pairs, judging whether there is a defined relationship type between the entity pairs, if so, obtaining the corresponding relationship, and verifying the relationship to ensure the accuracy and rationality of the relationship, if not, performing further analysis until the corresponding relationship is obtained, and then verifying the relationship, and finally integrating the obtained relationship results with the entity to obtain a data structure.
[0012] Furthermore, the construction of the knowledge graph includes: organizing the extracted entities and relationships to construct a knowledge graph in the field of film, using a graph database to store the knowledge graph, and continuously updating the knowledge graph to reflect the latest information based on new movie release data, cast change data, and award presentation data; utilizing the entities and relationships in the knowledge graph to perform semantic reasoning and rule mining to derive the type and audience of the film, and predicting the box office based on the type and audience of the film.
[0013] Furthermore, the exploration and utilization strategy steps are: calculating the similarity between the user and the unpopular movies, using cosine similarity as a similarity measurement indicator, which is defined as follows:
[0014]
[0015] In the formula, I represents the similarity, n is the total number of features, and u i is the value of the i-th feature in the user feature vector u, M i It is the value of the i-th feature in the movie feature vector M, i represents the feature number, i=1, 2,…, n, u is the number of the user feature vector in the movie, and M is the number of the movie feature vector.
[0016] Furthermore, the steps of constructing a stranger-based user interest model are: deriving the topics and fields that the user is interested in based on the entities and relationships extracted by the user; marking the topics and fields that the user is interested in with different personalized interest tags; finding other strangers who have the same personalized interest tags as the user, checking other personalized interest tags that other strangers have, and recommending relevant public opinion information at a higher ratio for the more personalized interest tags the user has in common with other strangers, and recommending relevant public opinion information at a certain ratio for personalized interest tags that the user does not have but other strangers have as fields and topics that the user may be interested in.
[0017] Furthermore, the steps for constructing a friend-based user interest model are as follows: collect the user's friend list and each friend's personalized interest tags, obtain the user's personalized interest tags that are the same as the friend's personalized interest tags and calculate the co-occurrence frequency between the user's personalized interest tags and the friend's personalized interest tags, and analyze the correlation and relationship closeness between the friend's personalized interest tags through the co-occurrence frequency and Pearson correlation coefficient; assign different weights to each friend's personalized interest tag according to the closeness of the relationship between the friend and the user. The closer the relationship, the greater the weight, and the greater the influence of the interest tag on the user's interest model.
[0018] Furthermore, the public opinion information matching the user's interests is recommended to the user: screening of unpopular movies: screening out a collection of unpopular movies based on the movie ratings and number of viewers in the knowledge graph; user portrait construction: constructing a user portrait based on the user's viewing history, ratings, and comment information, and extracting key feature vectors; similarity calculation and recommendation: calculating the similarity between the user and unpopular movies, and generating a recommendation list based on the fusion of exploration and utilization strategies, and the movies in the recommendation list are sorted by similarity; real-time update: updating the recommendation weight and recommendation list of unpopular movies in real time based on user feedback.
[0019] Furthermore, the calculation formula for recommending public opinion information matching the user's interests to the user is as follows:
[0020]
[0021] In the formula, I represents similarity, C represents comprehensive recommendation, and H represents m It is the popularity of the movie, m is the unpopularity of the movie, α is the weight of the popularity of the movie, which is used to adjust the influence of popularity in the recommendation, β is the weight of the unpopularity of the movie, which is used to adjust the influence of unpopularity in the recommendation, γ is the weight of the novelty of the movie, which is used to adjust the influence of the novelty of the movie in the recommendation, and T represents the length of time since the movie was released.
[0022] Furthermore, the user feedback method includes: feedback collection: collecting user feedback information and satisfaction scores on recommendation results through a user feedback interface; feedback processing: counting and analyzing user feedback data, calculating the feedback score of each unpopular movie, and dynamically adjusting the recommendation weight of the unpopular movie based on the feedback score.
[0023] One or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages:
[0024] 1. Through deep learning algorithms and personalized recommendation technology, we can deeply explore the user's historical behavior and preferences, thereby discovering the user's potential interests, and then realize the diversification of recommended information and the recommendation of unpopular information, effectively solving the problem of lack of novelty in recommended information in existing technologies.
[0025] 2. By utilizing exploration and utilization strategies, data mining and text analysis techniques, we can deeply mine and analyze user behavior data to timely discover changes in user needs, thereby achieving scientific and reasonable prediction of user interests.
[0026] 3. By introducing a user feedback mechanism, we can receive user feedback in real time, dynamically adjust the recommendation weight of unpopular movies, and optimize the recommendation results, thereby providing users with more accurate and personalized recommendation services. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 Flowchart of a method for recommending public opinion information based on a knowledge graph provided in an embodiment of the present application. DETAILED DESCRIPTION
[0028] The embodiment of the present application solves the problem of lack of novelty of recommended information in the prior art by providing a public opinion information recommendation method based on a knowledge graph, and realizes the diversification of recommended information and the recommendation of unpopular information through deep learning algorithms, natural language processing and personalized recommendation technology.
[0029] The technical solution in the embodiment of the present application is to solve the problem that the above-mentioned recommendation information lacks novelty, and the overall idea is as follows:
[0030] By using Python crawler technology to obtain public opinion information in the form of text, pictures, and videos from data sources, natural language processing technology is used to perform entity recognition and relationship extraction on the collected public opinion information, and key entities and relationships between entities are extracted. Based on the extracted entities and relationships, a domain knowledge graph is constructed to achieve semantic representation of public opinion information. By analyzing the user's browsing history, search history, and behavior data of likes and comments, a user interest model is constructed, including the user's interest field and topics of concern. The user interest model is matched with the public opinion information in the knowledge graph to find out the public opinion information related to the user's interests. According to the timeliness, importance, and user interest factors of public opinion information, a recommendation strategy is formulated to recommend the most appropriate public opinion information to users. At the same time, an exploration and utilization strategy is introduced to allow the recommendation of some public opinion information that does not match the user's historical interests but has potential appeal under the premise of ensuring a certain degree of accuracy. Data mining and text analysis technology are used to discover those long-tail public opinion information and unpopular topics that are not popular but have unique value. A user feedback system is designed to allow users to rate, like, comment, or mark the recommended results as uninterested. According to user feedback, the recommendation strategy is adjusted in real time, giving more exposure to the diverse content that users like, and filtering or adjusting the content that they are not interested in. Pay attention to the changes and updates of public opinion information in real time, and incorporate new and valuable information into the recommendation system in a timely manner. According to the user's real-time behavior and feedback data, the parameters and weights of the recommendation algorithm are dynamically adjusted to maintain the timeliness and personalization of the recommendation results. Finally, the recommendation results are presented to users in the form of lists and charts for easy browsing and selection.
[0031] Through Python crawlers, we can automatically capture movie public opinion information, use natural language processing technology to pre-process the automatically captured movie public opinion information, extract key entities and the relationship between key entities, build a knowledge graph, analyze user behavior data to form user personalized interest tags, build a user interest model, find out the public opinion information that matches user interests, formulate recommendation strategies, design user feedback methods to adjust the recommendation strategies in real time, and achieve the diversification of recommended information and the recommendation of unpopular information.
[0032] In order to better understand the above technical solution, the above technical solution will be described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0033] like Figure 1As shown, it is a flow chart of the public opinion information recommendation method based on knowledge graph provided by an embodiment of the present application. The method is applied in the public opinion information recommendation method based on knowledge graph, and the method includes the following steps: automatically crawling movie public opinion information through Python crawler; preprocessing the automatically crawled movie public opinion information by natural language processing technology; extracting key entities and the relationship between key entities: performing entity recognition and relationship extraction on the preprocessed public opinion information, extracting key entities and the relationship between key entities; constructing a knowledge graph: constructing a knowledge graph based on the relationship between the extracted key entities and key entities; analyzing user behavior data to form user's personalized interest tags: using machine learning technology to mine user's interest areas and topics of concern by analyzing user behavior data to form user's personalized interest tags, and constructing a user interest model: according to the user's personal Personalized interest tags are used to build user interest models based on strangers and user interest models based on friends, and then the user interest models based on strangers and the user interest models based on friends are integrated to form a complete user interest model; find out the public opinion information that matches the user's interests: based on the user interest model, search for movie public opinion information related to the user's interests in the knowledge graph, and find out the public opinion information that matches the user's interests by calculating the entity similarity and relationship matching; according to the matching results between the user interest model and the movie public opinion information, formulate a recommendation strategy, recommend public opinion information that matches the user's interests to the user according to the user's personalized needs, and use exploration and utilization strategies, data mining and text analysis techniques to recommend topics to users; design a user feedback method to adjust the recommendation strategy in real time: design a user feedback method to allow users to provide feedback on the recommendation results, and adjust the recommendation strategy in real time according to user feedback.
[0034] In this embodiment, the benefit of the project is that it can automatically and intelligently process movie public opinion information, improve the accuracy of recommendations, and meet the personalized needs of users. The efficiency and real-time performance of information collection are improved through Python crawler technology. Matching information is searched in the knowledge graph based on the user interest model to ensure that the recommended content meets user preferences. The user feedback mechanism can adjust the recommendation strategy in real time and continuously optimize the user experience.
[0035] Furthermore, the preprocessing steps for the collected movie public opinion information using natural language processing technology include: performing data cleaning by automatically scanning the movie public opinion text content, identifying and removing information not directly related to movie public opinion, uniformly converting the cleaned text into a standardized format, removing punctuation marks, special characters, and whitespace, using the jieba tokenization tool to perform precise word segmentation for the characteristics of the movie public opinion text, expanding the custom dictionary for professional vocabulary and terms in the movie field, on the basis of word segmentation, using NLTK to perform part-of-speech tagging on the movie public opinion text for special vocabulary in the movie field, constructing a dedicated stop word list in combination with the characteristics of movie public opinion to remove noise in the text, using the NER tool to identify named entities in the text, parsing the sentence structure through a syntactic analysis tool to identify the syntactic components of the sentence for syntactic analysis, and then performing feature extraction on the preprocessed text to extract movie feature vectors and user feature vectors.
[0036] In this embodiment, special vocabulary includes movie names and character names, named entities include movie names, actor names, director names, genres, plot summaries, and ratings. Data cleaning includes removing irrelevant characters such as punctuation marks and special symbols. Removing stop words includes common meaningless words such as "de" and "le". Removing duplicate content includes duplicate sentences or paragraphs. The role of word segmentation is to split the text into individual words or phrases for subsequent processing and analysis. Part-of-speech tagging: Tag the part of speech of each word, such as noun, verb, adjective. Named entity recognition: Identify entities in the text, such as person names, place names, and organization names. Removing noise: Filter out content and advertising information not related to the theme. Text vectorization: Use the bag-of-words model, TF-IDF, and Word2Vec methods to convert the text into numerical vectors for machine learning or deep learning processing. Video transcoding and format unification: Ensure that video files can be correctly read and processed by your system or library. Key frame extraction: Extract key frames from the video, which can represent the main content of the video; Image recognition: Perform image recognition on the key frames to extract information such as scenes, people, and objects; OCR (Optical Character Recognition): Extract subtitle and text information contained in the video; Audio processing: Separate the audio in the video and perform speech-to-text (speech recognition) to extract text information in the audio; Metadata extraction: Extract metadata from the video file, such as title, description, and tags.
[0037] Furthermore, the steps of entity recognition and relationship extraction for the preprocessed public opinion information include: entity recognition part: defining the entity category of the preprocessed public opinion information, the entity category includes personal name, place name, organization name, product name, event name, taking the preprocessed public opinion information as input data, applying the entity recognition model to perform entity recognition, analyzing the text content through the entity recognition model, identifying the entities matching the defined entity category, and then post-processing the entities identified by the entity recognition model, the post-processing steps include removing duplicate entities and merging similar entities; relationship extraction part: determining the relationship type to be extracted in the project, selecting a suitable relationship extraction model for relationship extraction, generating entity pairs from the identified entities, and extracting features related to these entity pairs; taking the generated entity pairs and their features as input data, applying the relationship extraction model to perform relationship judgment, analyzing the context information between the entity pairs, judging whether there is a defined relationship type between the entity pairs, if so, obtaining the corresponding relationship, and verifying the relationship to ensure the accuracy and rationality of the relationship, if not, performing further analysis until the corresponding relationship is obtained, and then verifying the relationship, and finally integrating the obtained relationship results with the entity to obtain a data structure.
[0038] In this embodiment, the entity categories that need to be identified in the project include names of people, places, organizations, products, and events, and the relationship types that need to be extracted in the project include "ownership relationship", "cooperative relationship", and "competitive relationship".
[0039] Furthermore, a knowledge graph is constructed: the extracted entities and relationships are sorted out to construct a knowledge graph in the field of film. A graph database is used to store the knowledge graph. Based on data on new movie releases, cast changes, and awards, the knowledge graph is continuously updated to reflect the latest information. The entities and relationships in the knowledge graph are used to perform semantic reasoning and rule mining to derive the type and audience of the film, and the box office is predicted based on the type and audience of the film.
[0040] In this embodiment, the nodes in the graph represent entities, and the edges represent the relationships between entities. The graph allows users to add, modify, or delete nodes and edges.
[0041] Further, the exploration and utilization strategy steps are: calculate the similarity between the user and the unpopular movies, and use cosine similarity as the similarity measurement indicator, which is defined as follows:
[0042]
[0043] In the formula, I represents the similarity, n is the total number of features, and u i is the value of the i-th feature in the user feature vector u, M iIt is the value of the i-th feature in the movie feature vector M, where i represents the feature number, i=1, 2,…, n.
[0044] In this embodiment, the closer the similarity value is to 1, the higher the match between the user and the movie. The similarity can also be obtained by vector calculation of the feature vector of each factor of the user and the feature vector of the corresponding factor of the movie, and then taking the average of all similarities. u is the number of the user feature vector in the movie, and M is the number of the movie feature vector.
[0045] Furthermore, a user interest model based on strangers is constructed: the topics and fields that the user is interested in are obtained based on the entities and relationships extracted by the user; the topics and fields that the user is interested in are marked with different personalized interest tags; other strangers who have the same personalized interest tags as the user are found, and other personalized interest tags that other strangers have are checked. The more personalized interest tags the user has in common with other strangers, the higher the proportion of relevant public opinion information is recommended; personalized interest tags that the user does not have but other strangers have are used as fields and topics that the user may be interested in, and relevant public opinion information is recommended at a certain proportion.
[0046] In this embodiment, the specific operation of identifying strangers with the same personalized interest tags includes: extracting the personalized interest tag set of the current user, traversing the user data in the knowledge graph, finding users with the same personalized interest tag set, and listing these users as strangers with the same personalized interest tags in the candidate user list. Analyze other personalized interest tags of strangers: traverse each stranger in the candidate user list, extract and collect other personalized interest tags of each stranger, analyze these personalized interest tags, find out frequently appearing personalized interest tags and use the personalized interest tags as the areas and topics of interest to the current user. Compare and map the personalized interest tags of the current user with other personalized interest tags of strangers. According to the frequency of occurrence of personalized interest tags, assign weights to each personalized interest tag, and the higher the frequency, the higher the weight assigned. Combine the weights of all personalized interest tags to generate a multi-dimensional user interest vector, and use machine learning or statistical methods to further optimize and calibrate this vector to ensure that it can accurately reflect the user's interest distribution.
[0047] Furthermore, the steps for constructing a friend-based user interest model are as follows: collect the user's friend list and each friend's personalized interest tags, obtain the user's personalized interest tags that are the same as the friend's personalized interest tags and calculate the co-occurrence frequency between the user's personalized interest tags and the friend's personalized interest tags, and analyze the correlation and relationship closeness between the friend's personalized interest tags through the co-occurrence frequency and Pearson correlation coefficient; assign different weights to each friend's personalized interest tag according to the closeness of the relationship between the friend and the user. The closer the relationship, the greater the weight, and the greater the influence of the interest tag on the user's interest model.
[0048] In this embodiment, by collecting friend lists and interest tags, calculating co-occurrence frequencies and correlation coefficients, it is possible to accurately grasp the interest associations between users and friends, and assign different weights to friend interest tags. This not only takes into account the actual situation of the user's social network, but also enhances the personalization of recommendations. It not only improves the accuracy of recommendations, but also enhances the user experience, making the recommendation results more in line with the user's social habits and interest preferences.
[0049] Furthermore, public opinion information matching the user's interests is recommended to the user: screening of unpopular movies: filtering out a collection of unpopular movies based on the movie ratings and number of viewers in the knowledge graph; user portrait construction: constructing a user portrait based on the user's viewing history, ratings, and comment information, and extracting key feature vectors; similarity calculation and recommendation: calculating the similarity between the user and unpopular movies, and generating a recommendation list based on the fusion of exploration and utilization strategies. The movies in the recommendation list are sorted by similarity; real-time update: updating the recommendation weight and recommendation list of unpopular movies in real time based on user feedback.
[0050] In this embodiment, the step of recommending public opinion information matching the user's interests to the user can accurately recommend unpopular movies, meet the user's personalized needs, and enhance the viewing experience, while maintaining the diversity and real-time nature of the recommendations.
[0051] Furthermore, the calculation formula for recommending public opinion information that matches the user's interests to the user is as follows:
[0052]
[0053] In the formula, α+β+γ=1, I represents similarity, C represents comprehensive recommendation, and can also be calculated by screening unpopular movies and building a portrait based on the user's viewing history and ratings. m It is the popularity of the movie, mis the unpopularity of movie m, α is the weight of movie popularity, which is used to adjust the influence of popularity in recommendation, β is the weight of movie unpopularity, which is used to adjust the influence of unpopularity in recommendation, γ is the weight of movie novelty, which is used to adjust the influence of movie novelty in recommendation, and T represents the length of time since the movie was released.
[0054] In this embodiment, α is obtained by calculating the proportion of popular movies among all the movies liked by the user, β is obtained by calculating the proportion of unpopular movies among all the movies liked by the user, γ is obtained by calculating the proportion of movies released within 365 days from the time of like among all the movies liked by the user, and the duration is obtained by subtracting the time of like from the time of release. The real-time number of moviegoers and the area of the cinema are obtained and these data are normalized to obtain the popularity of the movie H. m The calculation formula is:
[0055]
[0056] In the formula, P represents the number of moviegoers in real time. P is obtained by recognizing faces in real time using the machine vision yo l ov5 algorithm. It can also be obtained by capturing the real-time scene map of the cinema using the deep learning algorithm. S represents the area of the cinema. S can be calculated using the edge algorithm or by measuring the side length. The popularity of the movie H is m It can also be obtained by calculating the topic discussion degree on the movie social media platform.
[0057] Movie Unpopularity O m The calculation formula is:
[0058]
[0059] In the formula, ω1+ω2=1, the film's unpopularity is O m It can also be obtained by calculating the ratio of the remaining number of tickets sold in the theater to the total number of seats in the theater. ω1 represents the weight of the impact of the number of viewings on the popularity, which is obtained by calculating the proportion of the number of times the movie is played to the total number of times the movies in this field are played, where the total number of times the movies in this field are played is obtained by obtaining the names of all movies with the label of the field through machine learning technology, adding them to the field list and then performing a traversal operation. It can also be obtained through the movie platform. ω2 represents the impact of the search volume on the popularity, which is obtained by calculating the proportion of the search volume of the movie to the total number of times the movies in this field are played, which can also be obtained through the movie platform. The total number of times the movies in this field are played is identified and calculated by the machine learning algorithm. W represents the number of times the movie is viewed. The fewer the number of views, the higher the popularity. N represents the search volume of the movie. The fewer the search volume, the higher the popularity.
[0060] Furthermore, the user feedback method includes: feedback collection, collecting user feedback information and satisfaction scores on recommendation results through the user feedback interface; feedback processing, counting and analyzing user feedback data, calculating the feedback score of each unpopular movie, and dynamically adjusting the recommendation weight of the unpopular movie according to the feedback score.
[0061] In this embodiment, weight adjustment formula: In order to incorporate user feedback into the recommendation algorithm, the following weight adjustment formula is defined:
[0062]
[0063] Among them, β′ represents the updated recommendation weight of unpopular movies, F m represents the user feedback score of movie m, is the adjustment coefficient used to control the impact of feedback on the weight. It is obtained by the ratio of the user's feedback of interest and disinterest. The adjusted weight β′ will be used to update the recommendation algorithm to replace β in the calculation of the comprehensive recommendation degree.
[0064] The technical solutions in the above-mentioned embodiments of the present application have at least the following technical effects or advantages: relative to a public opinion analysis method disclosed in a patent application with publication number CN111914087A, the embodiments of the present application deeply analyze the movie public opinion data, thereby accurately extracting user features and constructing a user interest model, thereby realizing the diversification of recommended information and the recommendation of unpopular information; relative to a public opinion system search term recommendation method and system disclosed in an invention patent announcement with publication number CN110609950B, the embodiments of the present application accurately extracting user features and constructing a user interest model by constructing a knowledge graph, thereby solving the problem of lack of novelty of recommended information in the prior art.
[0065] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0066] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0067] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0068] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0069] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.
[0070] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A method for recommending public opinion information based on knowledge graph, characterized in that: The following steps are involved: Automatically capture movie public opinion information through Python crawlers; Use natural language processing technology to pre-process the automatically captured movie public opinion information; Perform entity recognition and relationship extraction on the pre-processed public opinion information to extract key entities and the relationships between key entities; Build a knowledge graph based on the extracted key entities and the relationships between them; By analyzing the user's behavior data and using machine learning technology to mine the user's interest areas and topics of concern to form the user's personalized interest tags, a stranger-based user interest model and a friend-based user interest model are constructed based on the user's personalized interest tags, and then the stranger-based user interest model and the friend-based user interest model are integrated to form a complete user interest model; Based on the user interest model, search for movie public opinion information related to the user's interests in the knowledge graph, and find the public opinion information matching the user's interests by calculating the entity similarity and relationship matching; According to the matching results between the user interest model and the movie public opinion information, a recommendation strategy is formulated to recommend public opinion information that matches the user's interests to the user according to the user's personalized needs. At the same time, exploration and utilization strategies, data mining and text analysis technologies are used to recommend topics to users. Design user feedback methods to allow users to provide feedback on recommendation results and adjust recommendation strategies in real time based on user feedback; The exploration and exploitation strategy steps are: Calculate the similarity between users and unpopular movies, using cosine similarity as the similarity metric, which is defined as follows: In the formula, I represents the similarity, n is the total number of features, and u i is the value of the i-th feature in the user feature vector u, M i is the value of the i-th feature in the movie feature vector M, i represents the feature number, i=1, 2, ..., n, u is the number of the user feature vector in the movie, and M is the number of the movie feature vector; The steps of constructing a stranger-based user interest model are: Based on the entities and relationships extracted by the user, the topics and fields that the user is interested in are obtained; Label the topics and fields that users are interested in with different personalized interest tags; Find other strangers who have the same personalized interest tags as the user, check other personalized interest tags that other strangers have, recommend relevant public opinion information at a higher ratio if the number of personalized interest tags shared by the user and other strangers is higher, and recommend relevant public opinion information at a certain ratio if the personalized interest tags that the user does not have but other strangers have are areas and topics that the user may be interested in; The steps for constructing the friend-based user interest model are: Collect the user's friend list and each friend's personalized interest tags, obtain the personalized interest tags that are the same as the user's personalized interest tags and calculate the co-occurrence frequency between the user's personalized interest tags and the friend's personalized interest tags, and analyze the correlation and closeness of the friends' personalized interest tags through the co-occurrence frequency and Pearson correlation coefficient; According to the closeness of the relationship between the friend and the user, different weights are assigned to each friend's personalized interest tag. The closer the relationship, the greater the weight, and the greater the impact of the interest tag on the user's interest model; The step of recommending public opinion information matching the user's interests to the user is as follows: Unpopular movie screening: Filter out unpopular movie collections based on movie ratings and viewing numbers in the knowledge graph; User portrait construction: Build user portraits based on the user's viewing history, ratings, and comment information, and extract key feature vectors; Similarity calculation and recommendation: Calculate the similarity between users and unpopular movies, and generate a recommendation list based on the exploration and utilization strategy. The movies in the recommendation list are sorted by similarity. Real-time update: Update the recommendation weight and recommendation list of unpopular movies in real time based on user feedback; The calculation formula for recommending public opinion information that matches the user's interests to the user is as follows: In the formula, I represents similarity, C represents comprehensive recommendation, and H represents m It's the popularity of the movie, m is the unpopularity of the movie, α is the weight of the popularity of the movie, which is used to adjust the influence of popularity in the recommendation, β is the weight of the unpopularity of the movie, which is used to adjust the influence of unpopularity in the recommendation, γ is the weight of the novelty of the movie, which is used to adjust the influence of the novelty of the movie in the recommendation, and T represents the length of time since the movie was released.
2. The method for recommending public opinion information based on knowledge graph according to claim 1, characterized in that: The step of preprocessing the automatically captured movie public opinion information using natural language processing technology includes: Through automatic scanning of movie public opinion text content, data cleaning is carried out, information that is not directly related to movie public opinion is identified and removed, and the cleaned text is uniformly converted into a standardized format to remove punctuation, special characters and spaces. The jieba word segmentation tool is used to perform accurate vocabulary segmentation based on the characteristics of movie public opinion text, and the custom dictionary is expanded for professional vocabulary and terminology in the film field. On the basis of word segmentation, NLTK is used to perform part-of-speech tagging on movie public opinion text for special vocabulary in the film field. In combination with the characteristics of movie public opinion, a special stop word list is constructed to remove noise in the text, and the NER tool is used to identify named entities in the text. The sentence structure is parsed by the syntactic analysis tool, and the grammatical components of the sentence are identified for syntactic analysis. Feature extraction is then performed on the preprocessed text to extract movie feature vectors and user feature vectors.
3. The method for recommending public opinion information based on knowledge graph according to claim 1, characterized in that: The steps of performing entity recognition and relationship extraction on the pre-processed public opinion information include: Entity recognition part: define the entity categories of the pre-processed public opinion information, which include names of people, places, organizations, products, and events. Use the pre-processed public opinion information as input data, apply the entity recognition model to perform entity recognition, analyze the text content through the entity recognition model, identify entities that match the defined entity categories, and then post-process the entities identified by the entity recognition model. The post-processing steps include removing duplicate entities and merging similar entities. Relationship extraction part: Determine the relationship type that needs to be extracted in the project, select a suitable relationship extraction model for relationship extraction, generate entity pairs from the identified entities, and extract features related to these entity pairs. Use the generated entity pairs and their features as input data, apply the relationship extraction model to make relationship judgments, analyze the contextual information between entity pairs, and determine whether there is a defined relationship type between entity pairs. If so, derive the corresponding relationship and verify the relationship to ensure the accuracy and rationality of the relationship. If not, perform further analysis until the corresponding relationship is obtained, and then verify the relationship. Finally, integrate the obtained relationship results with the entity to obtain the data structure.
4. The method for recommending public opinion information based on knowledge graph according to claim 1, characterized in that: The construction of the knowledge graph is specifically as follows: The extracted entities and relationships are sorted out to build a knowledge graph in the film field. The knowledge graph is stored in a graph database. Based on the data of new movie releases, cast changes, and awards, the knowledge graph is continuously updated to reflect the latest information. Using the entities and relationships in the knowledge graph, semantic reasoning and rule mining are performed to derive the type and audience of the movie, and the box office is predicted based on the type and audience of the movie.
5. The method for recommending public opinion information based on knowledge graph according to claim 1, characterized in that: The user feedback method comprises: Feedback collection: Collect user feedback and satisfaction scores on recommendation results through the user feedback interface; Feedback processing: collect and analyze user feedback data, calculate the feedback score of each unpopular movie, and dynamically adjust the recommendation weight of unpopular movies based on the feedback score.
