Label management method and system based on knowledge graph
Through the label management method based on the knowledge graph, the label update in the existing technology is not timely, the accuracy of identification is low, and the difficulty of classification management is difficult, and the accuracy of label recognition and the improvement of user experience have been realized.
Patent Information
- Application Number
- CN202411372895.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2025-01-21
AI Technical Summary
There are problems in the existing user tag management methods that are not timely updated, have low identification accuracy and are difficult to classify and manage.
The label management method based on the knowledge graph is adopted, and the target data with time stamp is obtained from multiple heterogeneous data sources. The data format is uniformly cleaned, the label entity and relationship are identified and extracted, and the label vector is generated. According to the timestamp, the label vector cluster generates the knowledge map, and integrates the knowledge map of different time periods to build a label evolution path of cross -time dimension. Get user -defined tags in real time, extract keywords and perform similarity calculations, and recommend the most similar system tags to users.
It improves the accuracy of label recognition, optimizes label management, enhances user experience, and has broad application prospects and significant technical effects.
Smart Images

Figure CN119337154A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a tag management method and system based on a knowledge graph. Background Art
[0002] "Dating" refers to a popular social method among young people. It is more about working together than just being friends. It focuses on precise companionship in a vertical segment, including but not limited to meal dating, travel dating, coffee dating, sports dating, and drama dating. The popularity of the above new stranger social methods has brought new technical challenges to the Internet social programs' ability to comprehensively collect and accurately divide users' characteristics and to push users in a targeted manner to facilitate "dating".
[0003] Existing user tag management methods classify users through tags given by users' self-selected Internet social programs and tags added by users themselves; however, as time changes, popular social topics and users' own interests will change, and users often do not update the corresponding tags in a timely manner. At the same time, young users will create relatively niche, abstract and personalized expressions when defining their own tags, which involve implicit semantic connotations that are difficult to express with universal standards. All of the above have led to low recognition accuracy of tags and difficulties in classification management. Summary of the invention
[0004] In view of the defects in the prior art, the present application proposes a tag management method and system based on knowledge graph, aiming to solve the problems of untimely tag update, low recognition accuracy and difficult classification management in the existing user tag management methods; the method includes: obtaining target data with timestamps from multiple heterogeneous data sources, unifying the data format and cleaning it, identifying and extracting tag entities and relationships, and generating tag vectors; clustering the tag vectors according to the timestamps to generate a knowledge graph, and integrating the knowledge graphs of different time periods to construct a tag evolution path across the time dimension; obtaining user-defined tags in real time, extracting keywords and performing similarity calculations, and recommending the most similar system tags to users; through the above method, the present invention improves tag recognition accuracy, optimizes tag management, enhances user experience, and has broad application prospects and significant technical effects.
[0005] To solve the above problems, on the one hand, the present application provides a tag management method based on a knowledge graph, comprising:
[0006] S1. Obtain target data from one or more preset data sources;
[0007] S2. Preprocess the target data;
[0008] S3. Obtain a label vector from the preprocessed target data;
[0009] S4. Construct a system label knowledge graph based on the label vector;
[0010] S5. If a user-defined tag is obtained, the user-defined tag is matched with the tag knowledge graph and the similarity is calculated; if the match fails, the system tag with the highest similarity to the user-defined tag in the system tag knowledge graph is recommended to the user based on the result of the similarity calculation.
[0011] In a possible embodiment, S1 specifically includes:
[0012] S101. Obtain target data with timestamps from a preset plurality of heterogeneous data sources within at least one time period, and store them in a distributed database and / or data lake through a real-time data stream system;
[0013] S2 specifically includes:
[0014] S201. Parse and unify the data format of the target data;
[0015] S202. Clean the target data in a unified format;
[0016] S3 includes:
[0017] S301. Identify and extract label entities and label relationships in the preprocessed target data, and generate label vectors through word embedding after expressing them in the form of triples or multi-tuples;
[0018] S4 includes:
[0019] S401. Cluster the label vectors generated by the target data acquired in the same time period according to the timestamp to generate a corresponding knowledge graph, and fuse the knowledge graphs corresponding to different time periods according to the timestamp to construct a system label graph with a label evolution path across time dimensions;
[0020] S5 includes:
[0021] S501. If a user-defined tag input by the user is obtained, keywords are extracted from the user-defined tag;
[0022] S502. Match the keywords with the system tag knowledge graph and calculate the similarity;
[0023] If the match fails, the system tag in the system tag knowledge graph that is most similar to the keyword is recommended to the user based on the result of the similarity calculation.
[0024] In a possible embodiment, S502 further includes: comparing the result of similarity calculation with a predetermined value, and if the result of similarity calculation is less than the set value, adding the keyword to the system knowledge graph.
[0025] In a possible embodiment, S501 further includes: if the user's operation triggers the set condition, obtaining the user ID, content tags and behavior data of the user in real time, and extracting keywords from the content tags;
[0026] S502 also includes: constructing a dynamic triplet by extracting relations from the behavior data with the keyword as the head entity and the user ID as the tail entity;
[0027] If the match is successful, the system tag matching the keyword in the system tag map replaces the keyword in the dynamic triple as the new head entity, constructs a new dynamic triple and associates the new dynamic triple into the system tag map;
[0028] If the similarity calculation result is less than the set value, the dynamic triplet association is added to the system label map;
[0029] If the similarity calculation result is greater than the set value, the keyword in the dynamic triplet is replaced with the system label that is most similar to the keyword in the system label map as the new head entity, a new dynamic triplet is constructed and the new dynamic triplet is associated and added to the system label map.
[0030] In a possible embodiment, S401 also includes: regularly deleting knowledge graphs that exceed a set retention period from the system tag graph according to a timestamp.
[0031] In a possible embodiment, S201 further includes: generating subject information according to description information attached to the target data, and generating summary information according to the content of the target data.
[0032] In a possible embodiment, S401 also includes: calculating the similarity between the topic information, summary information, and each cluster in the system tag knowledge graph, and adding the topic information and summary information whose similarity calculation results exceed the set value to the system tag knowledge graph, and associating them as index topics and description information of the corresponding similar clusters.
[0033] In a possible embodiment, the heterogeneous data sources in S101 include one or more of a corpus, social media, newspapers, research journals, an e-commerce platform, and a streaming media platform.
[0034] In a possible embodiment, the parsing in S201 includes at least one of format conversion and removal of redundant information on the target text;
[0035] The data format of unified target data is JSON format;
[0036] The data cleaning process in S202 includes at least one of removing noise data, removing duplicate data, correcting spelling errors, filling missing values, and processing synonyms and ambiguous words.
[0037] On the other hand, the present application provides a tag management system based on a knowledge graph, including:
[0038] A data acquisition module, used to obtain target data from one or more preset data sources;
[0039] A preprocessing module, used for preprocessing target data;
[0040] Feature extraction module, used to obtain label vectors from preprocessed target data;
[0041] A graph generation module is used to construct a system label knowledge graph based on label vectors;
[0042] Tag recommendation module: When obtaining user-defined tags, it matches the user-defined tags with the tag knowledge graph and calculates the similarity; if the match fails, the system tag with the highest similarity to the user-defined tag in the system tag knowledge graph is recommended to the user based on the result of the similarity calculation.
[0043] Compared with the prior art, this application has the following advantages and beneficial effects:
[0044] The method comprises the following steps: acquiring target data with timestamps from multiple heterogeneous data sources, unifying the data format and cleaning it, identifying and extracting label entities and relationships, and generating label vectors; clustering label vectors according to timestamps to generate a knowledge graph, and integrating knowledge graphs of different time periods to construct a label evolution path across time dimensions; acquiring user-defined labels in real time, extracting keywords and performing similarity calculations, and recommending the most similar system labels to users; through the above method, the present invention improves label recognition accuracy, optimizes label management, enhances user experience, and has broad application prospects and significant technical effects. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0046] Figure 1 A flowchart of the steps of the tag management method based on the knowledge graph provided in Example 1 of the present application;
[0047] Figure 2 A specific step flow chart of the tag management method based on knowledge graph provided in Application Example 1;
[0048] Figure 3 This is a schematic diagram of the structure of the knowledge graph-based tag management system provided in Example 3 of the present application. DETAILED DESCRIPTION
[0049] In the following, various embodiments of the present disclosure will be described more fully. The present disclosure may have various embodiments, and adjustments and changes may be made therein. However, it should be understood that there is no intention to limit the various embodiments of the present disclosure to the specific embodiments disclosed herein, but rather the present disclosure should be understood to cover all adjustments, equivalents and / or alternatives that fall within the spirit and scope of the various embodiments of the present disclosure.
[0050] Hereinafter, the terms "include" or "may include" used in various embodiments of the present disclosure indicate the presence of disclosed functions, operations, or elements, and do not limit the addition of one or more functions, operations, or elements. In addition, as used in various embodiments of the present disclosure, the terms "include", "have", and their cognates are intended only to indicate specific features, numbers, steps, operations, elements, components, or a combination of the foregoing, and should not be understood as first excluding the presence of one or more other features, numbers, steps, operations, elements, components, or a combination of the foregoing or the possibility of adding one or more features, numbers, steps, operations, elements, components, or a combination of the foregoing.
[0051] In various embodiments of the present disclosure, the expression "or" or "at least one of A or / and B" includes any combination or all combinations of the words listed at the same time. For example, the expression "A or B" or "at least one of A or / and B" may include A, may include B, or may include both A and B.
[0052] The expressions (such as "first", "second", etc.) used in the various embodiments of the present disclosure may modify the various constituent elements in the various embodiments, but may not limit the corresponding constituent elements. For example, the above expressions do not limit the order and / or importance of the elements. The above expressions are only used for the purpose of distinguishing one element from other elements. For example, the first user device and the second user device indicate different user devices, although both are user devices. For example, without departing from the scope of the various embodiments of the present disclosure, the first element may be referred to as the second element, and similarly, the second element may also be referred to as the first element.
[0053] It should be noted that if it is described that one component element is “connected” to another component element, the first component element may be directly connected to the second component element, and a third component element may be “connected” between the first component element and the second component element. Conversely, when one component element is “directly connected” to another component element, it can be understood that there is no third component element between the first component element and the second component element.
[0054] The term “user” used in various embodiments of the present disclosure may indicate a person using an electronic device or a device (eg, an artificial intelligence electronic device) using the electronic device.
[0055] The terms used in the various embodiments of the present disclosure are only used for the purpose of describing specific embodiments and are not intended to limit the various embodiments of the present disclosure. As used herein, the singular form is intended to also include the plural form, unless the context clearly indicates otherwise. Unless otherwise defined, all terms (including technical terms and scientific terms) used herein have the same meaning as the meanings commonly understood by ordinary technicians in the field to which the various embodiments of the present disclosure belong. The terms (such as the terms defined in the generally used dictionary) will be interpreted as having the same meaning as the contextual meaning in the relevant technical field and will not be interpreted as having an idealized meaning or an overly formal meaning, unless clearly defined in the various embodiments of the present disclosure.
[0056] Embodiment 1:
[0057] On the one hand, this application provides a tag management method based on knowledge graph, such as Figure 1 As shown, including:
[0058] S1. Obtain target data from one or more preset data sources;
[0059] S2. Preprocess the target data;
[0060] S3. Obtain a label vector from the preprocessed target data;
[0061] S4. Construct a system label knowledge graph based on the label vector;
[0062] S5. If a user-defined tag is obtained, the user-defined tag is matched with the tag knowledge graph and the similarity is calculated; if the match fails, the system tag with the highest similarity to the user-defined tag in the system tag knowledge graph is recommended to the user based on the result of the similarity calculation.
[0063] The specific method is Figure 2 As shown, including the following specific contents:
[0064] S1 specifically includes:
[0065] S101. Obtain target data with timestamps from a preset plurality of heterogeneous data sources within at least one time period, and store them in a distributed database and / or data lake through a real-time data stream system;
[0066] S2 specifically includes:
[0067] S201. Parse and unify the data format of the target data;
[0068] S202. Clean the target data in a unified format;
[0069] S3 includes:
[0070] S301. Identify and extract label entities and label relationships in the preprocessed target data, and generate label vectors through word embedding after expressing them in the form of triples or multi-tuples;
[0071] S4 includes:
[0072] S401. Cluster the label vectors generated by the target data acquired in the same time period according to the timestamp to generate a corresponding knowledge graph, and fuse the knowledge graphs corresponding to different time periods according to the timestamp to construct a system label graph with a label evolution path across time dimensions;
[0073] S5 includes:
[0074] S501. If a user-defined tag input by the user is obtained, keywords are extracted from the user-defined tag;
[0075] S502. Match the keywords with the system tag knowledge graph and calculate the similarity;
[0076] If the match fails, the system tag in the system tag knowledge graph that is most similar to the keyword is recommended to the user based on the result of the similarity calculation.
[0077] The present invention has at least the following beneficial effects:
[0078] a. Improved tag recognition accuracy: By regularly collecting data from a number of data sources and building a system tag knowledge graph, the system tag knowledge graph has a wide coverage in terms of cross-time dimensions and knowledge diversity, which helps improve recognition accuracy. In addition, the user-defined tags are collected in real time from the mobile client used by the user according to the changes in the user-input tags, and the keywords are extracted and matched with the system tag knowledge graph and similarity calculation is performed. The keywords from the user-defined tags are added to the system tag indication graph in a timely manner according to the similarity calculation results, further improving the recognition accuracy of other user-defined tags next time.
[0079] b. Optimize tag management: By integrating the tag evolution path of the system tag knowledge graph across time dimensions established by the knowledge graphs corresponding to different time periods, and extracting keywords from user-defined tags and performing matching or similarity calculations, the problem of niche, abstract and personalized tags being difficult to classify is solved; keywords with low similarity are added to the system tag knowledge graph, and by finding the distance between them and the closest tag on the evolution path of the associated tag, the evolution pattern of the user's language usage habits can be discovered;
[0080] c. Enhance user experience: By obtaining user-defined tags in real time and performing matching and similarity calculations, the closest and most accurate tags in the system tag knowledge graph are recommended based on the matching and similarity calculation results to improve the user's psychological experience.
[0081] Embodiment 2:
[0082] Embodiment 2 is further improved on the basis of embodiment 1, and S502 also includes: comparing the result of similarity calculation with a predetermined value, and if the result of similarity calculation is less than the set value, adding the keyword into the system knowledge graph.
[0083] Further improved, S501 also includes: if the user's operation triggers the set condition, obtaining the user ID, content tags and behavior data of the user in real time, and extracting keywords from the content tags;
[0084] S502 also includes: constructing a dynamic triplet by extracting relations from the behavior data with the keyword as the head entity and the user ID as the tail entity;
[0085] If the match is successful, the system tag matching the keyword in the system tag map replaces the keyword in the dynamic triple as the new head entity, constructs a new dynamic triple and associates the new dynamic triple into the system tag map;
[0086] If the similarity calculation result is less than the set value, the dynamic triplet association is added to the system label map;
[0087] If the similarity calculation result is greater than the set value, the keyword in the dynamic triplet is replaced with the system label that is most similar to the keyword in the system label map as the new head entity, a new dynamic triplet is constructed and the new dynamic triplet is associated and added to the system label map.
[0088] Further improvement, S401 also includes: regularly deleting the knowledge graph that exceeds the set retention period from the system tag graph according to the timestamp.
[0089] Further improved, S201 also includes: generating subject information according to the attached description information of the target data, and generating summary information according to the content of the target data.
[0090] Further improvement, S401 also includes: calculating the similarity between the subject information, summary information and each cluster in the system label knowledge graph, and adding the subject information and summary information whose similarity calculation results exceed the set value to the system label knowledge graph, and associating them as the index subject and description information of the corresponding similar cluster.
[0091] Further improved, the heterogeneous data sources in S101 include one or more of corpora, social media, newspapers, research journals, e-commerce platforms, and streaming media platforms.
[0092] Further improved, the parsing in S201 includes at least one of format conversion and removal of redundant information on the target text;
[0093] The data format of unified target data is JSON format;
[0094] The data cleaning process in S202 includes at least one of removing noise data, removing duplicate data, correcting spelling errors, filling missing values, and processing synonyms and ambiguous words.
[0095] Embodiment 3:
[0096] This embodiment provides a tag management system based on knowledge graph, such as Figure 2 As shown, including:
[0097] A data acquisition module, used to obtain target data from one or more preset data sources;
[0098] A preprocessing module, used for preprocessing target data;
[0099] Feature extraction module, used to obtain label vectors from preprocessed target data;
[0100] A graph generation module is used to construct a system label knowledge graph based on label vectors;
[0101] Tag recommendation module: When obtaining user-defined tags, it matches the user-defined tags with the tag knowledge graph and calculates the similarity; if the match fails, the system tag with the highest similarity to the user-defined tag in the system tag knowledge graph is recommended to the user based on the result of the similarity calculation.
[0102] Those skilled in the art will appreciate that the accompanying drawings are merely schematic diagrams of a preferred implementation scenario, and the modules or processes in the accompanying drawings are not necessarily required for implementing the present invention.
[0103] Those skilled in the art will appreciate that the modules in the device in the implementation scenario can be distributed in the device in the implementation scenario according to the implementation scenario description, or can be changed accordingly and located in one or more devices different from the implementation scenario. The modules in the above implementation scenario can be combined into one module, or can be further split into multiple sub-modules.
[0104] The above serial numbers of the present invention are only for description and do not represent the advantages or disadvantages of the implementation scenarios.
[0105] The above disclosure is only a few specific implementation scenarios of the present invention, but the present invention is not limited thereto, and any changes that can be conceived by those skilled in the art should fall within the protection scope of the present invention.
Claims
1. A tag management method based on knowledge graph, characterized in that: include: S1. Obtain target data from one or more preset data sources; S2. Preprocessing the target data; S3. Obtaining a label vector from the preprocessed target data; S4. Constructing a system label knowledge graph based on the label vector; S5. If a user-defined tag is obtained, the user-defined tag is matched with the tag knowledge graph and the similarity is calculated; if the match fails, the system tag with the highest similarity to the user-defined tag in the system tag knowledge graph is recommended to the user based on the result of the similarity calculation.
2. The tag management method based on knowledge graph according to claim 1 is characterized in that: S1 specifically includes: S101. Obtain target data with timestamps from a preset plurality of heterogeneous data sources within at least one time period, and store them in a distributed database and / or data lake through a real-time data stream system; S2 specifically includes: S201. Parse and unify the data format of the target data; S202. Cleaning the target data in a unified format; S3 includes: S301. Identify and extract label entities and label relationships in the preprocessed target data, and generate label vectors by word embedding after expressing them in the form of triples or multi-tuples; S4 includes: S401. Cluster the label vectors generated by the target data acquired in the same time period according to the timestamp to generate a corresponding knowledge graph, and fuse the knowledge graphs corresponding to different time periods according to the timestamp to construct a system label graph with a label evolution path across time dimensions; S5 includes: S501. If a user-defined tag input by the user is obtained, keywords are extracted from the user-defined tag; S502. Match the keyword with the system tag knowledge graph and calculate the similarity; If the match fails, the system tag in the system tag knowledge graph that is most similar to the keyword is recommended to the user based on the result of the similarity calculation.
3. The tag management method based on knowledge graph according to claim 2 is characterized in that: S502 also includes: comparing the result of the similarity calculation with a predetermined value, and if the result of the similarity calculation is less than the set value, adding the keyword to the system knowledge graph.
4. The tag management method based on knowledge graph according to claim 3 is characterized in that: S501 also includes: if the user's operation triggers the set condition, obtaining the user ID, content tags and behavior data of the user in real time, and extracting keywords from the content tags; S502 also includes: taking the keyword as the head entity and the user ID as the tail entity, extracting relations from the behavior data to construct a dynamic triple; If the match is successful, the system tag in the system tag map that matches the keyword replaces the keyword in the dynamic triplet as a new head entity, constructs a new dynamic triplet and associates the new dynamic triplet into the system tag map; If the similarity calculation result is less than a set value, the dynamic triplet is associated and added to the system tag map; If the similarity calculation result is greater than the set value, the keyword in the dynamic triplet is replaced by the system tag in the system tag map that is most similar to the keyword as the new head entity, a new dynamic triplet is constructed and the new dynamic triplet is associated and added to the system tag map.
5. The tag management method based on knowledge graph according to claim 4 is characterized in that: S401 also includes: regularly deleting the knowledge graph that exceeds a set retention period from the system tag graph according to the timestamp.
6. The tag management method based on knowledge graph according to any one of claims 2 to 5, characterized in that: S201 also includes: generating subject information according to the description information attached to the target data, and generating summary information according to the content of the target data.
7. The tag management method based on knowledge graph according to claim 6 is characterized in that: S401 also includes: calculating the similarity between the subject information and the summary information and each cluster in the system tag knowledge graph, and adding the subject information and the summary information whose similarity calculation results exceed the set value to the system tag knowledge graph, and associating them as index subjects and description information of the corresponding similar clusters.
8. The tag management method based on knowledge graph according to claim 2 is characterized in that: The heterogeneous data sources described in S101 include one or more of corpora, social media, newspapers, research journals, e-commerce platforms, and streaming media platforms.
9. The tag management method based on knowledge graph according to claim 2 is characterized in that: The parsing in S201 includes at least one of format conversion and removal of redundant information on the target text; Unify the data format of the target data into JSON format; The data cleaning process in S202 includes at least one of removing noise data, removing duplicate data, correcting spelling errors, filling missing values, and processing synonyms and ambiguous words.
10. A tag management system based on knowledge graph, characterized in that: include: A data acquisition module, used to obtain target data from one or more preset data sources; A preprocessing module, used for preprocessing the target data; A feature extraction module, used to obtain a label vector from the preprocessed target data; A graph generation module, used to construct a system label knowledge graph according to the label vector; Tag recommendation module: used to match and calculate the similarity between the user-defined tag and the tag knowledge graph when obtaining the user-defined tag; if the match fails, the system tag with the highest similarity to the user-defined tag in the system tag knowledge graph is recommended to the user based on the result of the similarity calculation.