Method and device for constructing personal knowledge graph in internet community

By constructing personal knowledge graphs within internet communities, the problem of user profiles failing to accurately depict user interests and knowledge is solved, enabling precise recommendations of community content.

CN115905465BActive Publication Date: 2026-02-10北京小川科技有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211365766.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-31
Publication Date
2026-02-10
Estimated Expiration
2042-10-31

AI Technical Summary

Technical Problem

Existing user profiling technologies cannot accurately depict user interests and knowledge, nor can they answer questions about the interests, knowledge, experiences, and memories in a user's mind, leading to difficulties in distributing long-tail content.

Method used

By constructing a personal knowledge graph in an internet community, and by acquiring a complete vocabulary of attention words, performing word segmentation, and identifying user and topic knowledge triples, a personal knowledge graph of the community can be generated, thereby achieving a comprehensive and fine-grained digital representation of users.

Benefits of technology

It enables precise recommendations of community content topics, improves the accuracy of user interest and knowledge characterization, and can answer users' interests, knowledge, and experience memories.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115905465B_ABST
    Figure CN115905465B_ABST
Patent Text Reader

Abstract

The application relates to a method and device for constructing a personal knowledge graph in an Internet community, and the method comprises the following steps: obtaining a full set of attention words and dividing the full set of attention words into field word tables according to fields; obtaining post review texts published by each user in the Internet community according to a user ID, and performing word segmentation processing to obtain corresponding word segmentation results; determining a user knowledge triple of each user according to the word segmentation results of each user, the full set of attention words and the field word tables, wherein the user knowledge triple comprises a user ID, a field and a personal knowledge representative word; determining a topic knowledge triple corresponding to each topic in the Internet community, wherein the topic knowledge triple comprises a topic representative word, a number and a topic; and generating a community personal knowledge graph corresponding to each user according to the user knowledge triple of each user and the topic knowledge triple. Through the technical scheme, people are fully and finely digitized, and accurate recommendation of community content topics is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of Internet data processing technology, and in particular to a method and apparatus for constructing a personal knowledge graph in an Internet community. Background Technology

[0002] User understanding is a crucial component of recommendation engines. Recommendation engines distribute content based on this understanding of users. Currently, user understanding is generally based on user profiling mined from big data. However, user profiling often provides a superficial understanding of users, describing their interests and knowledge at the level of concepts, categories, or domains, such as mobile games, fitness, and outdoor sports. Therefore, user profiling lacks the fine-grained characterization of user interests and knowledge, making it impossible to distribute long-tail content based solely on user profiling.

[0003] User profiling has the following main shortcomings:

[0004] 1) Understanding users from the perspective of building user profiles relies heavily on the dimensions defined in the user profile definition, such as interest dimensions (novels, games, sports, finance, etc.) and basic attribute dimensions (gender, age, occupation, education, etc.).

[0005] 2) The digital representation of people is not comprehensive enough;

[0006] 3) It cannot answer questions about a user's interests, knowledge, experiences, and memories. For example, what books has a user read? What movies has a user watched? What places has a user visited? Has a user studied architecture? Does a user understand psychology? Can a user solve advanced math problems? These questions about the user cannot be answered simply by building a user profile. Summary of the Invention

[0007] To overcome the problems existing in related technologies, this invention provides a method and apparatus for constructing a personal knowledge graph in an internet community, thereby constructing a personal knowledge graph of users related to community topics, comprehensively and finely de-digitally representing people, and realizing accurate recommendations for community content topics.

[0008] According to a first aspect of the present invention, a method for constructing a personal knowledge graph in an internet community is provided, the method comprising:

[0009] Obtain the complete vocabulary of attention words, and divide the complete vocabulary of attention words into domain vocabulary according to the domain;

[0010] Retrieve the text of posts and comments published by each user in the internet community based on the user ID, and perform word segmentation on each post and comment text to obtain the corresponding word segmentation results;

[0011] Based on the word segmentation results of each user, the attention word full set lexicon, and the domain lexicon, a user knowledge triplet is determined for each user, wherein the user knowledge triplet includes: user ID, domain, and personal knowledge representative terms;

[0012] For each topic in the internet community, a corresponding topic knowledge triple is determined, wherein the topic knowledge triple includes: topic representative term, number, and topic;

[0013] Based on each user's user knowledge triples and topic knowledge triples, a community personal knowledge graph corresponding to that user is generated.

[0014] In one embodiment, preferably, obtaining the complete vocabulary of attention words includes:

[0015] Select target post and comment data that meet preset conditions from the historical post and comment data in the aforementioned internet community;

[0016] Use a pre-trained attention word extraction model to extract attention words for each target post comment data;

[0017] The attention words extracted from all target post comment data are merged to obtain a complete vocabulary of attention words.

[0018] In one embodiment, preferably, each post comment text is segmented into words, including:

[0019] Each post / comment text was segmented using a Chinese word segmentation lexicon and the aforementioned attention word set lexicon.

[0020] In one embodiment, preferably, determining each user's user knowledge triples based on the word segmentation results of each user, the attention word full set lexicon, and the domain lexicon includes:

[0021] Based on the word segmentation results of each user's post comment text, determine whether the word in each post comment text is in the complete set of attention words. If the word is in the complete set of attention words, then extract the word from the post comment text as the user's personal knowledge representative term.

[0022] The domain corresponding to the personal knowledge representative term is determined according to the domain thesaurus to form the user's user knowledge triple. When the personal knowledge representative term corresponds to multiple domains, there are also multiple user knowledge triples.

[0023] In one embodiment, preferably, for each topic in the internet community, a corresponding topic knowledge triple is determined, including:

[0024] Obtain the text of post comments under each topic in the aforementioned internet community;

[0025] A pre-trained attention word extraction model is used to extract attention words from each post comment data text to obtain the target attention words;

[0026] Count the total number of times each target attention keyword appears in the post comment data text for each topic;

[0027] All target attention words are sorted in descending order of total frequency, and the top-ranked target attention words are selected as candidate topic representative words.

[0028] The topic representative words and their numbers are determined based on the relevance of the candidate topic representative words to the corresponding topics and the frequency of their occurrence in each topic.

[0029] In one embodiment, preferably, the topic representative words and their numbers are determined based on the relevance of the candidate topic representative words to the corresponding topics and the frequency of occurrence of the candidate topic representative words in each topic, including:

[0030] Calculate the relevance between the representative words of each candidate topic and its corresponding topic;

[0031] Candidate topic terms with a relevance greater than the preset relevance were identified as topic terms.

[0032] The topic-specific terms are arranged in descending order of their frequency of occurrence in each topic;

[0033] The representative words for each topic are numbered according to their ranking.

[0034] In one embodiment, preferably, a community personal knowledge graph corresponding to each user is generated based on each user's user knowledge triples and topic knowledge triples, including:

[0035] When the personal knowledge representative term in the user knowledge triple and the topic representative term in the topic knowledge triple are the same word, the personal knowledge representative term and the topic representative term are merged to generate the community personal knowledge graph corresponding to the user.

[0036] According to a second aspect of the present invention, an apparatus for constructing a personal knowledge graph in an internet community is provided, the apparatus comprising:

[0037] The acquisition module is used to acquire the complete vocabulary of attention words and divide the complete vocabulary of attention words into domain vocabulary according to the domain.

[0038] The word segmentation module is used to retrieve the text of posts and comments published by each user in the Internet community based on the user ID, and to perform word segmentation on each post and comment text to obtain the corresponding word segmentation results;

[0039] The first determining module is used to determine the user knowledge triplet for each user based on the word segmentation results of each user, the attention word full set lexicon and the domain lexicon, wherein the user knowledge triplet includes: user ID, domain and personal knowledge representative terms;

[0040] The second determining module is used to determine the corresponding topic knowledge triple for each topic in the Internet community, wherein the topic knowledge triple includes: topic representative words, number and topic;

[0041] The generation module is used to generate a community personal knowledge graph for each user based on the user knowledge triplet and topic knowledge triplet.

[0042] In one embodiment, preferably, the acquisition module is used for:

[0043] Select target post and comment data that meet preset conditions from the historical post and comment data in the aforementioned internet community;

[0044] Use a pre-trained attention word extraction model to extract attention words for each target post comment data;

[0045] The attention words extracted from all target post comment data are merged to obtain a complete vocabulary of attention words.

[0046] In one embodiment, preferably, the word segmentation module is used for:

[0047] Each post / comment text was segmented using a Chinese word segmentation lexicon and the aforementioned attention word set lexicon.

[0048] In one embodiment, preferably, determining each user's user knowledge triples based on the word segmentation results of each user, the attention word full set lexicon, and the domain lexicon includes:

[0049] Based on the word segmentation results of each user's post comment text, determine whether the word in each post comment text is in the complete set of attention words. If the word is in the complete set of attention words, then extract the word from the post comment text as the user's personal knowledge representative term.

[0050] The domain corresponding to the personal knowledge representative term is determined according to the domain thesaurus to form the user's user knowledge triple. When the personal knowledge representative term corresponds to multiple domains, there are also multiple user knowledge triples.

[0051] In one embodiment, preferably, the second determining module is used for:

[0052] Obtain the text of post comments under each topic in the aforementioned internet community;

[0053] A pre-trained attention word extraction model is used to extract attention words from each post comment data text to obtain the target attention words;

[0054] Count the total number of times each target attention keyword appears in the post comment data text for each topic;

[0055] All target attention words are sorted in descending order of total frequency, and the top-ranked target attention words are selected as candidate topic representative words.

[0056] The topic representative words and their numbers are determined based on the relevance of the candidate topic representative words to the corresponding topics and the frequency of their occurrence in each topic.

[0057] In one embodiment, preferably, the topic representative words and their numbers are determined based on the relevance of the candidate topic representative words to the corresponding topics and the frequency of occurrence of the candidate topic representative words in each topic, including:

[0058] Calculate the relevance between the representative words of each candidate topic and its corresponding topic;

[0059] Candidate topic terms with a relevance greater than the preset relevance were identified as topic terms.

[0060] The topic-specific terms are arranged in descending order of their frequency of occurrence in each topic;

[0061] The representative words for each topic are numbered according to their ranking.

[0062] In one embodiment, preferably, the generation module is used for:

[0063] When the personal knowledge representative term in the user knowledge triple and the topic representative term in the topic knowledge triple are the same word, the personal knowledge representative term and the topic representative term are merged to generate the community personal knowledge graph corresponding to the user.

[0064] According to a third aspect of the present invention, an apparatus for constructing a personal knowledge graph in an internet community is provided, the apparatus comprising:

[0065] processor;

[0066] Memory used to store processor-executable instructions;

[0067] The processor is configured as follows:

[0068] Obtain the complete vocabulary of attention words, and divide the complete vocabulary of attention words into domain vocabulary according to the domain;

[0069] Retrieve the text of posts and comments published by each user in the internet community based on the user ID, and perform word segmentation on each post and comment text to obtain the corresponding word segmentation results;

[0070] Based on the word segmentation results of each user, the attention word full set lexicon, and the domain lexicon, a user knowledge triplet is determined for each user, wherein the user knowledge triplet includes: user ID, domain, and personal knowledge representative terms;

[0071] For each topic in the internet community, a corresponding topic knowledge triple is determined, wherein the topic knowledge triple includes: topic representative term, number, and topic;

[0072] Based on each user's user knowledge triples and topic knowledge triples, a community personal knowledge graph corresponding to that user is generated.

[0073] According to a fourth aspect of the present invention, a computer-readable storage medium is provided having computer instructions stored thereon, which, when executed by a processor, implement the steps of the method as described in any one of the embodiments of the second aspect.

[0074] The technical solutions provided by the embodiments of the present invention may include the following beneficial effects:

[0075] In this embodiment of the invention, a personal knowledge graph of users related to community topics is constructed, and a comprehensive and fine-grained de-digital representation of people is achieved to realize accurate recommendations of community content topics.

[0076] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit the invention. Attached Figure Description

[0077] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0078] Figure 1 This is a flowchart illustrating a method for constructing a personal knowledge graph in an internet community, according to an exemplary embodiment.

[0079] Figure 2 This is a flowchart of step S101 in a method for constructing a personal knowledge graph in an Internet community, according to an exemplary embodiment.

[0080] Figure 3 This is a flowchart of step S103 in a method for constructing a personal knowledge graph in an Internet community, according to an exemplary embodiment.

[0081] Figure 4This is a flowchart of step S104 in a method for constructing a personal knowledge graph in an Internet community, according to an exemplary embodiment.

[0082] Figure 5 This is a schematic diagram illustrating a user's community-based personal knowledge graph according to an exemplary embodiment.

[0083] Figure 6 This is a block diagram illustrating an apparatus for constructing a personal knowledge graph in an internet community, according to an exemplary embodiment. Detailed Implementation

[0084] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatuses and methods consistent with some aspects of the invention as detailed in the appended claims.

[0085] Figure 1 This is a flowchart illustrating a method for constructing a personal knowledge graph in an internet community, according to an exemplary embodiment.

[0086] like Figure 1 As shown, according to a first aspect of the present invention, a method for constructing a personal knowledge graph in an internet community is provided, the method comprising:

[0087] Step S101: Obtain the complete vocabulary of attention words and divide the complete vocabulary of attention words into domain vocabulary according to the domain;

[0088] Attention words: These are the words in a sentence that best represent its core meaning and central idea. These words are those that should attract the viewer's attention, and are therefore called attention words. Attention words are usually the most crucial, important, and representative segments of a sentence, often specific entity names, domain keywords, etc. For example, the entity name of a painting is "Along the River During the Qingming Festival," the entity name of a location is "Nanjing Imperial Examination History Museum," medical keywords are "osteoporosis" and "root canal treatment," and literary keywords are "Harry Potter: Magic Awakened."

[0089] The entire vocabulary of attention words is edited and divided into multiple domain vocabulary lists to ensure that each attention word can be classified into at least one domain. For example, the attention word "blue and white porcelain" is classified into the "song" domain, and "Huangguoshu Waterfall" is classified into the "scenic view" domain.

[0090] Step S102: Obtain the text of posts and comments published by each user in the Internet community based on the user ID, and perform word segmentation on each post and comment text to obtain the corresponding word segmentation results;

[0091] In one embodiment, preferably, each post comment text is segmented into words, including:

[0092] Each post / comment text was segmented using a Chinese word segmentation lexicon and the aforementioned attention word set lexicon.

[0093] During word segmentation, the entire attention word list is added for segmentation. This ensures that any text containing attention words from the entire attention word list can be segmented into a single word.

[0094] Step S103: Determine the user knowledge triplet for each user based on the word segmentation results of each user, the attention word full set lexicon, and the domain lexicon. The user knowledge triplet includes: user ID, domain, and personal knowledge representative terms.

[0095] Generate a knowledge triple <user ID, domain, personal knowledge term>, indicating that the user has the knowledge and memory of this "personal knowledge term" under this "domain"; under the same user ID, if the same "personal knowledge term" belongs to multiple "domains", generate multiple triples.

[0096] Step S104: For each topic in the Internet community, determine the corresponding topic knowledge triple, wherein the topic knowledge triple includes: topic representative word, number and topic;

[0097] Step S105: Generate the community personal knowledge graph corresponding to each user based on the user knowledge triplet and topic knowledge triplet.

[0098] In this embodiment, a personal knowledge graph of users related to community topics is constructed, including topic representative words, numbers and topics, user IDs and domains. In this way, people can be digitally represented in a comprehensive and fine-grained manner, thereby further realizing accurate recommendations for community content topics.

[0099] Figure 2 This is a flowchart of step S101 in a method for constructing a personal knowledge graph in an Internet community, according to an exemplary embodiment.

[0100] like Figure 2 As shown, in one embodiment, preferably, step S101 includes:

[0101] Step S201: Select target post and comment data that meet preset conditions from the historical post and comment data in the Internet community;

[0102] We organized the text corpus of all posts and comments from the community's history, removed garbled characters and noisy text, and retained post and comment texts with a certain number of words and clear sentence expression.

[0103] Step S202: Use a pre-trained attention word extraction model to extract attention words for each target post comment data;

[0104] Attention word extraction models can be BERT-based, which essentially use BERT-based NLP keyword extraction techniques.

[0105] Step S203: Merge the attention words extracted from all target post comment data to obtain a complete attention word list.

[0106] Figure 3 This is a flowchart of step S103 in a method for constructing a personal knowledge graph in an Internet community, according to an exemplary embodiment.

[0107] like Figure 3 As shown, in one embodiment, preferably, step S103 includes:

[0108] Step S301: Based on the word segmentation results of each user's post comment text, determine whether the word in each post comment text is in the attention word complete word list. If the word is in the attention word complete word list, extract the word from the post comment text as the user's personal knowledge representative term.

[0109] If a sentence does not contain any attention words, the sentence is discarded.

[0110] Step S302: Determine the domain corresponding to the personal knowledge representative term according to the domain thesaurus to form the user's user knowledge triple. When the personal knowledge representative term corresponds to multiple domains, there are also multiple user knowledge triples.

[0111] Figure 4 This is a flowchart of step S104 in a method for constructing a personal knowledge graph in an Internet community, according to an exemplary embodiment.

[0112] like Figure 4 As shown, in one embodiment, preferably, step S104 includes:

[0113] Step S401: Obtain the text of post comments under each topic in the internet community;

[0114] For each topic in the community, compile all the posts and comments under that topic, and select those with a certain word count and clear expression.

[0115] Step S402: Use a pre-trained attention word extraction model to extract attention words from each post comment data text to obtain the target attention words;

[0116] Step S403: Count the total number of times each target attention word appears in the post comment data text for each topic;

[0117] Within the topic, count the number of posts and comments that each attention word appears in the topic text, and calculate the sum of the number of posts and comments to obtain the total number of occurrences.

[0118] Step S404: Sort all target attention words in descending order of total frequency, and determine the top-ranked target attention words as candidate topic representative words;

[0119] Within a topic, attention words are sorted from highest to lowest based on the sum of the number of comments and posts appearing in the topic, and the top-ranked attention words are selected as candidates for topic representative words.

[0120] Step S405: Determine the topic representative words and their numbers based on the relevance of the candidate topic representative words to the corresponding topics and the frequency of their occurrence in each topic.

[0121] In one embodiment, preferably, the topic representative words and their numbers are determined based on the relevance of the candidate topic representative words to the corresponding topics and the frequency of occurrence of the candidate topic representative words in each topic, including:

[0122] Calculate the relevance between the representative words of each candidate topic and its corresponding topic;

[0123] Candidate topic terms with a relevance greater than the preset relevance were identified as topic terms.

[0124] The topic-specific terms are arranged in descending order of their frequency of occurrence in each topic;

[0125] The representative words for each topic are numbered according to their ranking.

[0126] If the same topic term appears in multiple "topic terms", then the terms are numbered in descending order based on the sum of the number of posts and comments containing the topic term in each topic. The topic with the most posts and comments containing the topic term is numbered 1, and the others are numbered in descending order of quantity; a knowledge triple <topic term, number, topic> is generated.

[0127] Specifically, such as Figure 5As shown, when the personal knowledge representative term in the user knowledge triplet and the topic representative term in the topic knowledge triplet are the same word, for example, the personal knowledge representative term "blue and white porcelain" and the topic representative term "blue and white porcelain" are the same, the personal knowledge representative term and the topic representative term are merged to generate the community personal knowledge graph corresponding to the user.

[0128] Figure 6 This is a block diagram illustrating an apparatus for constructing a personal knowledge graph in an internet community, according to an exemplary embodiment.

[0129] like Figure 6 As shown, according to a second aspect of the present invention, an apparatus for constructing a personal knowledge graph in an internet community is provided, the apparatus comprising:

[0130] The acquisition module 61 is used to acquire the complete vocabulary of attention words and divide the complete vocabulary of attention words into domain vocabulary according to the domain.

[0131] The word segmentation module 62 is used to obtain the text of posts and comments published by each user in the Internet community based on the user ID, and to perform word segmentation on each post and comment text to obtain the corresponding word segmentation results;

[0132] The first determining module 63 is used to determine the user knowledge triplet for each user based on the word segmentation results of each user, the attention word full set lexicon and the domain lexicon, wherein the user knowledge triplet includes: user ID, domain and personal knowledge representative terms;

[0133] The second determining module 64 is used to determine a corresponding topic knowledge triple for each topic in the Internet community, wherein the topic knowledge triple includes: topic representative words, number and topic;

[0134] The generation module 65 is used to generate a community personal knowledge graph corresponding to each user based on the user knowledge triplet and topic knowledge triplet.

[0135] In one embodiment, preferably, the acquisition module 61 is used for:

[0136] Select target post and comment data that meet preset conditions from the historical post and comment data in the aforementioned internet community;

[0137] Use a pre-trained attention word extraction model to extract attention words for each target post comment data;

[0138] The attention words extracted from all target post comment data are merged to obtain a complete vocabulary of attention words.

[0139] In one embodiment, preferably, the word segmentation module 62 is used for:

[0140] Each post / comment text was segmented using a Chinese word segmentation lexicon and the aforementioned attention word set lexicon.

[0141] In one embodiment, preferably, determining each user's user knowledge triples based on the word segmentation results of each user, the attention word full set lexicon, and the domain lexicon includes:

[0142] Based on the word segmentation results of each user's post comment text, determine whether the word in each post comment text is in the complete set of attention words. If the word is in the complete set of attention words, then extract the word from the post comment text as the user's personal knowledge representative term.

[0143] The domain corresponding to the personal knowledge representative term is determined according to the domain thesaurus to form the user's user knowledge triple. When the personal knowledge representative term corresponds to multiple domains, there are also multiple user knowledge triples.

[0144] In one embodiment, preferably, the second determining module 64 is used for:

[0145] Obtain the text of post comments under each topic in the aforementioned internet community;

[0146] A pre-trained attention word extraction model is used to extract attention words from each post comment data text to obtain the target attention words;

[0147] Count the total number of times each target attention keyword appears in the post comment data text for each topic;

[0148] All target attention words are sorted in descending order of total frequency, and the top-ranked target attention words are selected as candidate topic representative words.

[0149] The topic representative words and their numbers are determined based on the relevance of the candidate topic representative words to the corresponding topics and the frequency of their occurrence in each topic.

[0150] In one embodiment, preferably, the topic representative words and their numbers are determined based on the relevance of the candidate topic representative words to the corresponding topics and the frequency of occurrence of the candidate topic representative words in each topic, including:

[0151] Calculate the relevance between the representative words of each candidate topic and its corresponding topic;

[0152] Candidate topic terms with a relevance greater than the preset relevance were identified as topic terms.

[0153] The topic-specific terms are arranged in descending order of their frequency of occurrence in each topic;

[0154] The representative words for each topic are numbered according to their ranking.

[0155] In one embodiment, preferably, the generation module is used for:

[0156] When the personal knowledge representative term in the user knowledge triple and the topic representative term in the topic knowledge triple are the same word, the personal knowledge representative term and the topic representative term are merged to generate the community personal knowledge graph corresponding to the user.

[0157] According to a third aspect of the present invention, an apparatus for constructing a personal knowledge graph in an internet community is provided, the apparatus comprising:

[0158] processor;

[0159] Memory used to store processor-executable instructions;

[0160] The processor is configured as follows:

[0161] Obtain the complete vocabulary of attention words, and divide the complete vocabulary of attention words into domain vocabulary according to the domain;

[0162] Retrieve the text of posts and comments published by each user in the internet community based on the user ID, and perform word segmentation on each post and comment text to obtain the corresponding word segmentation results;

[0163] Based on the word segmentation results of each user, the attention word full set lexicon, and the domain lexicon, a user knowledge triplet is determined for each user, wherein the user knowledge triplet includes: user ID, domain, and personal knowledge representative terms;

[0164] For each topic in the internet community, a corresponding topic knowledge triple is determined, wherein the topic knowledge triple includes: topic representative term, number, and topic;

[0165] Based on each user's user knowledge triples and topic knowledge triples, a community personal knowledge graph corresponding to that user is generated.

[0166] According to a fourth aspect of the present invention, a computer-readable storage medium is provided having computer instructions stored thereon, which, when executed by a processor, implement the steps of the method as described in any one of the embodiments of the second aspect.

[0167] Furthermore, it can be understood that in this invention, "multiple" refers to two or more, and other quantifiers are similar. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, and B alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship. The singular forms "a," "the," and "the" are also intended to include the plural forms unless the context clearly indicates otherwise.

[0168] It is further understood that the terms "first," "second," etc., are used to describe various types of information, but this information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another, and do not indicate a specific order or degree of importance. In fact, the expressions "first," "second," etc., are completely interchangeable. For example, without departing from the scope of this invention, first information can also be referred to as second information, and similarly, second information can also be referred to as first information.

[0169] It is further understood that although the operations are described in a specific order in the accompanying drawings in the embodiments of the present invention, this should not be construed as requiring these operations to be performed in the specific order or serial order shown, or requiring all the operations shown to obtain the desired result. In certain environments, multitasking and parallel processing may be advantageous.

[0170] Other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of the invention are indicated by the following claims.

[0171] It should be understood that the present invention is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.

Claims

1. A method for constructing a personal knowledge graph in an internet community, characterized in that, The method includes: Obtain the complete vocabulary of attention words, and divide the complete vocabulary of attention words into domain vocabulary according to the domain. The attention words refer to the words in a sentence that best represent the core semantics or central idea of ​​the sentence. Retrieve the text of posts and comments published by each user in the internet community based on the user ID, and perform word segmentation on each post and comment text to obtain the corresponding word segmentation results; Based on the word segmentation results of each user, the attention word full set lexicon, and the domain lexicon, a user knowledge triplet is determined for each user, wherein the user knowledge triplet includes: user ID, domain, and personal knowledge representative terms; For each topic in the internet community, a corresponding topic knowledge triple is determined, wherein the topic knowledge triple includes: topic representative term, number, and topic; Based on each user's user knowledge triples and topic knowledge triples, a community personal knowledge graph corresponding to that user is generated. The process of obtaining the complete vocabulary of attention words includes: Select target post and comment data that meet preset conditions from the historical post and comment data in the aforementioned internet community; Use a pre-trained attention word extraction model to extract attention words for each target post comment data; The attention words extracted from all target post comment data are merged to obtain a complete vocabulary of attention words; The process of generating a community-specific personal knowledge graph for each user based on their user knowledge triples and topic knowledge triples includes: When the personal knowledge representative term in the user knowledge triple and the topic representative term in the topic knowledge triple are the same word, the personal knowledge representative term and the topic representative term are merged to generate the community personal knowledge graph corresponding to the user.

2. The method according to claim 1, characterized in that, Each post comment text is segmented into words, including: Each post / comment text was segmented using a Chinese word segmentation lexicon and the aforementioned attention word set lexicon.

3. The method according to claim 1, characterized in that, Based on the word segmentation results of each user, the attention word full set lexicon, and the domain lexicon, the user knowledge triples for each user are determined, including: Based on the word segmentation results of each user's post comment text, determine whether the word in each post comment text is in the complete set of attention words. If the word is in the complete set of attention words, then extract the word from the post comment text as the user's personal knowledge representative term. The domain corresponding to the personal knowledge representative term is determined according to the domain thesaurus to form the user's user knowledge triple. When the personal knowledge representative term corresponds to multiple domains, there are also multiple user knowledge triples.

4. The method according to claim 1, characterized in that, For each topic in the aforementioned internet community, determine the corresponding topic knowledge triples, including: Obtain the text of post comments under each topic in the aforementioned internet community; A pre-trained attention word extraction model is used to extract attention words from each post comment data text to obtain the target attention words; Count the total number of times each target attention keyword appears in the post comment data text for each topic; All target attention words are sorted in descending order of total frequency, and the top-ranked target attention words are selected as candidate topic representative words. The topic representative words and their numbers are determined based on the relevance of the candidate topic representative words to the corresponding topics and the frequency of their occurrence in each topic.

5. The method according to claim 4, characterized in that, Based on the relevance of the candidate topic representative terms to the corresponding topics and the frequency of occurrence of the candidate topic representative terms in each topic, topic representative terms and their numbers are determined, including: Calculate the relevance between the representative words of each candidate topic and its corresponding topic; Candidate topic terms with a relevance greater than the preset relevance were identified as topic terms. The topic-specific terms are arranged in descending order of their frequency of occurrence in each topic; The representative words for each topic are numbered according to their ranking.

6. A device for constructing a personal knowledge graph in an internet community, characterized in that, The device includes: The acquisition module is used to acquire the complete vocabulary of attention words and divide the complete vocabulary of attention words into domain vocabulary according to the domain. The attention words refer to the words in a sentence that best represent the core semantics or central idea of ​​the sentence. The word segmentation module is used to retrieve the text of posts and comments published by each user in the Internet community based on the user ID, and to perform word segmentation on each post and comment text to obtain the corresponding word segmentation results; The first determining module is used to determine the user knowledge triplet for each user based on the word segmentation results of each user, the attention word full set lexicon and the domain lexicon, wherein the user knowledge triplet includes: user ID, domain and personal knowledge representative terms; The second determining module is used to determine the corresponding topic knowledge triple for each topic in the Internet community, wherein the topic knowledge triple includes: topic representative words, number and topic; The generation module is used to generate a community personal knowledge graph for each user based on the user knowledge triplet and topic knowledge triplet. The process of obtaining the complete vocabulary of attention words includes: Select target post and comment data that meet preset conditions from the historical post and comment data in the aforementioned internet community; Use a pre-trained attention word extraction model to extract attention words for each target post comment data; The attention words extracted from all target post comment data are merged to obtain a complete vocabulary of attention words; The process of generating a community-specific personal knowledge graph for each user based on their user knowledge triples and topic knowledge triples includes: When the personal knowledge representative term in the user knowledge triple and the topic representative term in the topic knowledge triple are the same word, the personal knowledge representative term and the topic representative term are merged to generate the community personal knowledge graph corresponding to the user.

7. A device for constructing a personal knowledge graph in an internet community, characterized in that, The device includes: processor; Memory used to store processor-executable instructions; The processor is configured as follows: Obtain the complete vocabulary of attention words, and divide the complete vocabulary of attention words into domain vocabulary according to the domain. The attention words refer to the words in a sentence that best represent the core semantics or central idea of ​​the sentence. Retrieve the text of posts and comments published by each user in the internet community based on the user ID, and perform word segmentation on each post and comment text to obtain the corresponding word segmentation results; Based on the word segmentation results of each user, the attention word full set lexicon, and the domain lexicon, a user knowledge triplet is determined for each user, wherein the user knowledge triplet includes: user ID, domain, and personal knowledge representative terms; For each topic in the internet community, a corresponding topic knowledge triple is determined, wherein the topic knowledge triple includes: topic representative term, number, and topic; Based on each user's user knowledge triples and topic knowledge triples, a community personal knowledge graph corresponding to that user is generated. The process of obtaining the complete vocabulary of attention words includes: Select target post and comment data that meet preset conditions from the historical post and comment data in the aforementioned internet community; Use a pre-trained attention word extraction model to extract attention words for each target post comment data; The attention words extracted from all target post comment data are merged to obtain a complete vocabulary of attention words; The process of generating a community-specific personal knowledge graph for each user based on their user knowledge triples and topic knowledge triples includes: When the personal knowledge representative term in the user knowledge triple and the topic representative term in the topic knowledge triple are the same word, the personal knowledge representative term and the topic representative term are merged to generate the community personal knowledge graph corresponding to the user.

8. A computer-readable storage medium storing computer instructions thereon, characterized in that, When executed by the processor, this instruction implements the steps of the method described in any one of claims 1-5.

Citation Information

Patent Citations

  • Recommendation method and system based on commodity knowledge graph feature learning

    CN111369318A

  • Software defect knowledge-oriented knowledge search method

    WO2021008180A1