A method for constructing and expanding social relationship networks based on topic knowledge graphs
Through the construction and expansion method of social relationship network based on topic knowledge graph, the problem that users find it difficult to find user groups similar to their own demands in the Internet environment, and efficient user recommendations and social network relationship expansion are achieved.
Patent Information
- Application Number
- CN202110928773.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-13
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2041-08-13
AI Technical Summary
In the Internet environment, it is difficult for users to effectively analyze and master a large amount of information, resulting in the inability to find a user group similar to their own demands within a reasonable and efficient range.
The social relationship network construction and expansion method based on topic knowledge graph is adopted, and the social account information data collection, online social network relationship definition, knowledge graph construction analysis, and collaborative filtering algorithm based on group of common concerns is used to measure user similarity and recommend account groups with high similarity to the target account.
It effectively avoids the interference of invalid user information on user recommendations, improves the effectiveness of user recommendations, expands the user's social network relationship, and strengthens the influence of social accounts in social groups.
Smart Images

Figure CN114329227B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of social network and knowledge graph technology, and specifically to a method for constructing and expanding a social relationship network based on a topic knowledge graph. Background Art
[0002] In today's Internet era, with the rapid development of Internet technology and the improvement of network infrastructure, the number of Internet users has grown rapidly, and Internet users have gradually become the center of the Internet. With the rise of mobile Internet, the scene of users surfing the Internet has changed greatly. Mobile devices make it easier and more convenient for users to surf the Internet. Without being restricted by time and space, users can surf the Internet almost at any time, making it easier for users to obtain information and data, and allowing users to build a virtual network society through various social network media platforms. Different from offline real social interaction, users can rely on the Internet to make social relationships break through the boundaries of time and space. Users' personal information and social activity trajectories have evolved into public network information on the Internet. This information can be viewed by Internet social media users anytime and anywhere. This type of information is the content carrier and medium of Internet users' social interaction. However, with the explosive growth of information on the Internet, users cannot effectively analyze and master this data in the Internet environment, so that users cannot find user groups with similar demands to their own needs within a reasonable and efficient range. Therefore, how to enable users to better obtain user group recommendations that are meaningful to them and meet their self-study preferences has become a research hotspot in recent years, and thus different user recommendation technologies for different users have emerged. Summary of the invention
[0003] 1. Technical issues to be resolved
[0004] The technical problem to be solved by the present invention is: how to design a method for building and expanding a social relationship network to avoid interference of invalid user information on user recommendations.
[0005] (II) Technical solution
[0006] In order to solve the above technical problems, the present invention provides a method for constructing and expanding a social relationship network based on a topic knowledge graph, comprising the following steps:
[0007] S1. Social account information data collection;
[0008] S2, defining online social network relationships based on step S1;
[0009] S3, based on step S1 and step S2, perform knowledge graph construction and analysis;
[0010] S4. Based on steps S2 and S3, the user similarity is measured using a collaborative filtering algorithm based on common focus groups, and based on the discrimination result, an account group whose similarity result with the target account is higher than a preset value is recommended to the user.
[0011] Preferably, in step S1, a social account data crawling task is constructed to crawl social accounts and published article data to provide data services for subsequent definition of social account relationships and knowledge graph construction and analysis.
[0012] Preferably, in step S2, based on the social accounts crawled in step S1 and the published article data, online social network relationships of the accounts are defined, social person relationships are extracted to obtain sentiment analysis results, and potential target account information is mined.
[0013] Preferably, in step S3, basic elements of the knowledge graph in the topic domain are determined, and knowledge elements are extracted from the crawled data results in step S1; based on the sentiment analysis results of the crawled data in step S2, relationships are extracted from the social account data and published article data; based on the online social network relationship definition in step S2, relationship weights are set for the relationship extraction results of the account data and published article data, and based on the weight relationship, a "entity-relationship-entity" triple relationship data model is constructed; and then a topic and character relationship knowledge graph is established through a visualization tool.
[0014] Preferably, in step S4, based on the analysis results of step S3, the user group with positive sentiment tendency in the comment group is screened out, and the user list data of the positive account group obtained in step S2 is used to determine the similarity between the target account and the positive account group using a collaborative filtering algorithm based on a common attention group. Based on the user account conditions and the similarity between the common attention lists of users of the social platform, the user is recommended related group accounts whose similarity results with the target account are higher than a preset value.
[0015] Preferably, in step S1, when crawling social account data, the specified user information is crawled according to the specified user_id list and cookie field information, including user id, nickname, number of followers, number of fans, number of followers and follower id information;
[0016] When crawling published article data, the specified mid comments and sub-comments of these comments are captured according to the specified mid and cookie field information, including comment id, comment time, comment content, comment user nickname, comment user homepage link, comment likes, and reply number, and sorted by popularity.
[0017] Preferably, in step S2, a graph G(U, E, w) is used to define an online social network relationship, where U is a set of user or topic event vertices, and a vertex represents a user or topic; E is a set of paths. a and U b If there is a relationship between the two users, there is a directed path E(U a ,U b ),w(U a ,U b ) is the weight of this directed path, where the weight is defined as the analysis result of sentiment analysis on user comments;
[0018] By crawling and analyzing article comment data, we can find out the information about a hot topic article or an article published by a big V account, and use the sentiment dictionary to analyze the results to distinguish user groups with positive, negative, and neutral attitudes in comments.
[0019] Preferably, step S3 specifically includes:
[0020] S31. Knowledge element extraction
[0021] Determine several elements of the topic domain knowledge graph, and extract knowledge elements from the social account information and published article information obtained in step S1;
[0022] S32. Knowledge Extraction
[0023] According to the account information and published article information obtained in step S1, the target account article information is obtained, the article information is filtered and screened, the comment user group in the article information is obtained, and the article comment data is subjected to sentiment analysis to divide the positive, negative, and neutral groups;
[0024] Based on the sentiment analysis results of the crawled data in step S2, extract the relationship between the social account data and the published article data;
[0025] S33. Data model construction
[0026] According to the online social network relationship definition in step S2, relationship weights are set for the relationship extraction results of account data and published article data, and a triple relationship data model of "entity-relationship-entity" is constructed based on the weight relationship;
[0027] S34. Build a knowledge graph of topics and character relationships through visualization tools
[0028] Through the crawler task in step S1, the information data of comment accounts and topic articles are obtained. According to the result of step S2, the crawled data is divided into different user groups using the sentiment dictionary, including positive user groups, negative user groups, and passive user groups. The knowledge graph of topic and person relationships is drawn through the neo4j tool.
[0029] Preferably, in step S4, based on the analysis result of step S3, the user group with positive sentiment tendency in the comment group is screened out, and the user list data of the positive account group obtained in step S2 is used to determine the similarity similar(a,b) between the target account and the positive account group using a collaborative filtering algorithm based on the common attention group. The formula is as follows:
[0030]
[0031] Ν(a) is the set of users followed by account a, and Ν(b) is the set of users followed by user b; num() represents the number of elements in the set;
[0032] Based on the identification results, account groups whose similarity with the target account is higher than the preset value are recommended to the user.
[0033] The present invention also provides an application of the method in the technical field of social network.
[0034] (III) Beneficial effects
[0035] Based on crawling topics and user data, the present invention studies the construction and expansion method of social relationship network based on topic knowledge graph, combines the user's social relationship process, filters the multiple social relationships of comment accounts under the user's concerned topics to recommend user resources, and avoids the interference of invalid user information on user recommendations. From another perspective, more detailed information on the strength of user social relationships can also help optimize various services of social media and enhance the availability of services. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 It is the overall flow chart of the method of the present invention;
[0037] Figure 2 The topic domain metadata graph designed in the present invention;
[0038] Figure 3 This is the topic-person relationship knowledge graph obtained in the present invention. DETAILED DESCRIPTION
[0039] In order to make the purpose, content, and advantages of the present invention more clear, the specific implementation methods of the present invention are further described in detail below in conjunction with the accompanying drawings and examples.
[0040] like Figure 1 As shown, the present invention provides a method for constructing and expanding a social relationship network based on a topic knowledge graph, which includes the following steps:
[0041] S1. Topic account information data collection:
[0042] Social account data crawling: According to the specified user_id list and cookie field information, crawl the specified user information, including user id, nickname, number of followers, number of fans, number of followings, and follower id information.
[0043] Published article data crawling: According to the specified mid and cookie field information, crawl the specified mid comments and the sub-comments of these comments, including comment id, comment time, comment content, comment user nickname, comment user homepage link, comment likes, number of replies and other fields, and sort them by popularity.
[0044] This step realizes the crawling of social accounts and published article data, providing data support for the subsequent construction of the knowledge graph.
[0045] S2. Defining online social network relationships
[0046] With the development of Internet technology, more and more social network service platforms have emerged. The emergence of these social platforms has expanded the social scope of social users, reduced the social costs of users, accelerated the flow and interaction of information, and deeply affected the lifestyle of users. Online social networks have become a bridge connecting the real world and the virtual world. The interaction between users and information resources and between users have left various traces on the Internet.
[0047] A graph G(U,E,w) can be used to define an online social network relationship, where U is a set of user or topic event vertices, and a vertex represents a user or topic; E is a set of paths. a and U b If there is a relationship between the two users, there is a directed path E(U a ,U b ),w(U a ,U b ) is the weight of this directed path; here, the weight is defined as the analysis result of sentiment analysis on user comments.
[0048] By crawling and analyzing article comment data, we can find out that for a hot topic article or an article published by a big V account, we can use the sentiment dictionary to analyze the results and distinguish between user groups with positive, negative, and neutral attitudes in comments. The analysis results are shown in the following table:
[0049] Table 1 Comment data sentiment analysis table
[0050]
[0051]
[0052] Based on the above sentiment analysis results, the sentiment relationship between the social user group and the current account in the article comment information is extracted, and the potential positive and negative account information under the current account is mined.
[0053] S3. Knowledge graph construction analysis:
[0054] Knowledge graph construction has become a more effective way to analyze the organizational relationships of knowledge and various intelligent applications. Knowledge graphs simplify various complex problems by establishing various associations and help people analyze data through various visualization methods.
[0055] Since the constructed knowledge graph serves subsequent user recommendations, and the user recommendations use data sets in the topic field, a knowledge graph in the topic field is constructed. The following are the steps for constructing the knowledge graph:
[0056] 1. Knowledge element extraction
[0057] Through the analysis and research of topic domain related knowledge, several elements of topic domain knowledge graph are determined. Topic domain knowledge includes the basic elements of the topic and the basic information of the account participating in the comment. Figure 2 As shown, knowledge elements are extracted from the social platform data originally crawled in step S1 (ie, the social account information and published article information obtained in step S1).
[0058] 2. Knowledge Extraction
[0059] According to the account information and published article information obtained in step S1, the target account article information is obtained, the article information is filtered and screened, the comment user group in the article information is obtained, and the article comment data is subjected to sentiment analysis to divide the positive, negative, and neutral groups.
[0060] Based on the sentiment analysis results of the crawled data in step S2, relationship extraction is performed on the social account data and the published article data.
[0061] 3. Data model construction
[0062] According to the online social network relationship definition in step S2, relationship weights are set for the relationship extraction results of account data and published article data, and a "entity-relationship-entity" triple relationship data model is constructed based on the weight relationship.
[0063] 4. Build a knowledge graph of topics and character relationships through visualization tools
[0064] Through the crawler task in step S1, the basic information data of comment accounts and topic articles are obtained. According to the result of step S2, the crawled data is divided into different user groups (positive, negative, and passive) using the sentiment dictionary, and the knowledge graph of topic and person relationships is drawn through the neo4j tool, such as Figure 3 shown.
[0065] S4. Use collaborative filtering algorithm based on common attention groups to measure user similarity, and recommend account groups with similarity results higher than the preset value to users based on the judgment results.
[0066] According to the analysis results of step S3, the user group with positive sentiment tendency in the comment group is screened out, and the user list data of the positive account group (positive attitude user group) obtained in step S2 is used to determine the similarity similar(a,b) between the target account and the positive account group using the collaborative filtering algorithm based on the common attention group. The formula is as follows:
[0067]
[0068] Ν(a) is the set of users followed by account a, and Ν(b) is the set of users followed by user b; num() represents the number of elements in the set;
[0069] According to the identification results, the account group with a similarity result higher than the preset value to the target account is recommended to the user. The above steps can effectively improve the strength of the account social relationship, improve the user recommendation efficiency, expand the user's social network relationship, and strengthen the influence of the social account in the social group.
[0070] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A method for constructing and expanding a social relationship network based on a topic knowledge graph, characterized in that: The following steps are involved: S1. Social account information data collection; S2, defining online social network relationships based on step S1; S3, based on step S1 and step S2, perform knowledge graph construction and analysis; S4. Based on steps S2 and S3, the user similarity is measured using a collaborative filtering algorithm based on a common attention group, and based on the judgment result, an account group whose similarity result with the target account is higher than a preset value is recommended to the user; in step S4, based on the analysis result of step S3, the user group with positive sentiment tendency in the comment group is screened out, and the user list data of the positive account group followed by the step S2 is used to judge the similarity between the target account and the positive account group using a collaborative filtering algorithm based on a common attention group, and based on the user account conditions, based on the similarity between the common attention account lists of users of the social platform, the user is recommended to the user a related group account whose similarity result with the target account is higher than a preset value.
2. The method according to claim 1, characterized in that In step S1, a social account data crawling task is constructed to crawl social accounts and published article data to provide data services for the subsequent definition of social account relationships and knowledge graph construction and analysis.
3. The method according to claim 2, characterized in that In step S2, based on the social accounts crawled in step S1 and the published article data, the online social network relationships of the accounts are defined, the relationships between social figures are extracted to obtain sentiment analysis results, and potential target account information is mined.
4. The method according to claim 3, characterized in that In step S3, the basic elements of the topic domain knowledge graph are determined, and the knowledge elements are extracted from the crawled data results in step S1; based on the sentiment analysis results of the crawled data in step S2, the relationship between the social account data and the published article data is extracted; According to the online social network relationship definition in step S2, the relationship weights are set for the relationship extraction results of account data and published article data. Based on the weight relationship, a "entity-relationship-entity" triple relationship data model is constructed; then a knowledge graph of topic and character relationships is established through visualization tools.
5. The method according to claim 2, characterized in that In step S1, when crawling social account data, the specified user information is crawled according to the specified user_id list and cookie field information, including user id, nickname, number of followers, number of fans, number of followers and follower id information; When crawling published article data, the specified mid comments and sub-comments of these comments are captured according to the specified mid and cookie field information, including comment id, comment time, comment content, comment user nickname, comment user homepage link, comment likes, and reply number, and sorted by popularity.
6. The method according to claim 3, characterized in that In step S2, a graph G(U, e, w) is used to define an online social network relationship, where U is a set of user or topic event vertices, and a vertex represents a user or topic; E is a set of paths. a and U b If there is a relationship between the two users, there is a directed path E(U a ,U b ),w(U a ,U b ) is the weight of this directed path, where the weight is defined as the analysis result of sentiment analysis on user comments; By crawling and analyzing article comment data, we can find out the information about a hot topic article or an article published by a big V account, and use the sentiment dictionary to analyze the results to distinguish user groups with positive, negative, and neutral attitudes in comments.
7. The method according to claim 6, characterized in that Step S3 is specifically as follows: S31. Knowledge element extraction Determine several elements of the topic domain knowledge graph, and extract knowledge elements from the social account information and published article information obtained in step S1; S32. Knowledge Extraction According to the account information and published article information obtained in step S1, the target account article information is obtained, the article information is filtered and screened, the comment user group in the article information is obtained, and the article comment data is subjected to sentiment analysis to divide the positive, negative, and neutral groups; Based on the sentiment analysis results of the crawled data in step S2, extract the relationship between the social account data and the published article data; S33. Data model construction According to the online social network relationship definition in step S2, the relationship weights are set for the relationship extraction results of the account data and the published article data, and a triple relationship data model of "entity-relationship-entity" is constructed based on the weight relationship; S34. Build a knowledge graph of topics and character relationships through visualization tools Through the crawler task in step S1, the information data of comment accounts and topic articles are obtained. According to the result of step S2, the crawled data is divided into different user groups using the sentiment dictionary, including positive user groups, negative user groups, and passive user groups. The knowledge graph of topic and person relationships is drawn through the neo4j tool.
8. The method according to claim 7, characterized in that In step S4, based on the analysis results of step S3, the user group with positive sentiment tendency in the comment group is screened out, and the list of users followed by the positive account group obtained in step S2 is used to determine the similarity similar(a,b) between the target account and the positive account group using the collaborative filtering algorithm based on the common attention group. The formula is as follows: Ν(a) is the set of users followed by account a, and Ν(b) is the set of users followed by user b; num() represents the number of elements in the set; Based on the identification results, account groups whose similarity with the target account is higher than the preset value are recommended to the user.
9. Application of the method according to any one of claims 1 to 8 in the field of social network technology.
Citation Information
Patent Citations
Multi-modal user emotion analysis method based on knowledge graph
CN112163169A
System and method for retrieving and presenting concept centric information in social media networks
US20140337328A1