CN113779981A - Recommendation method and device based on pointer network and knowledge graph - Google Patents
Recommendation method and device based on pointer network and knowledge graph Download PDFInfo
- Publication number
- CN113779981A CN113779981A CN202111069131.1A CN202111069131A CN113779981A CN 113779981 A CN113779981 A CN 113779981A CN 202111069131 A CN202111069131 A CN 202111069131A CN 113779981 A CN113779981 A CN 113779981A
- Authority
- CN
- China
- Prior art keywords
- data
- knowledge graph
- pointer
- recommendation method
- keywords
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/20—Natural language analysis
- G06F40/279—Recognition of textual entities
- G06F40/284—Lexical analysis, e.g. tokenisation or collocates
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/30—Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
- G06F16/36—Creation of semantic tools, e.g. ontology or thesauri
- G06F16/367—Ontology
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/20—Natural language analysis
- G06F40/205—Parsing
- G06F40/216—Parsing using statistical methods
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/30—Semantic analysis
Abstract
The invention discloses a recommendation method and a device based on a pointer network and a knowledge graph, relates to the technical field of knowledge graphs, and aims at solving the problems that the conventional recommendation result is easy to repeat and the generated result has no pertinence, the following scheme is proposed, and the recommendation method comprises the following steps: s1: collecting data, and then creating a knowledge graph from the collected data; s2: and then extracting concept words in the created knowledge graph according to the data of S1 to perform pointer classification storage: s3: then inputting the searched keywords, and then extracting data of the keywords in pointer classification storage; s4: and then performing integrated reasoning according to the data extracted in the S3. The invention has novel structure, can effectively extract and neutralize the two extracted information source data through the soft selection probability, and then synthesizes the two data to obtain the final result, thereby effectively reducing the problem of repetition of the recommendation result, and the recommendation result has pertinence.
Description
Technical Field
The invention relates to the technical field of knowledge graphs, in particular to a recommendation method and device based on a pointer network and a knowledge graph.
Background
The knowledge graph becomes a knowledge domain mapping graph in the book intelligence field, a series of different relation graphs are constructed through the development of a display technology in the computer technology, so that visual resources are mined, analyzed, constructed and drawn to display the mutual relation among the visual resources, and the knowledge graph is widely applied;
at present, the knowledge graph is directly applied to commodity selection, and after direct retrieval and extraction, inaccurate search results are easily recommended to the recommendation results, that is, the recommendation generated results have no pertinence, and repeated products or repeated word results often appear, so that a recommendation method and a recommendation device based on a pointer network and the knowledge graph are provided for solving the problems.
Disclosure of Invention
The recommendation method and device based on the pointer network and the knowledge graph solve the problems that recommendation results are easy to repeat and generated results are not targeted.
In order to achieve the purpose, the invention adopts the following technical scheme:
a recommendation method based on a pointer network and a knowledge graph comprises the steps of acquiring knowledge data and further comprising the following steps:
s1: collecting data, and then creating a knowledge graph from the collected data;
s2: then extracting concept words in the created knowledge graph according to the data of S1 for pointer classification storage;
s3: then inputting the searched keywords, and then extracting data of the keywords in pointer classification storage;
s4: then, performing integrated reasoning according to the data extracted in the S3;
s5: constructing a frame by the sorted data;
s6: recommending a result;
s7: and (5) updating knowledge.
Preferably, the data classification collected in step S2 specifically includes:
s21: classifying the data collected in the step S1 according to grades, and then classifying the grades in a pointer storage way to perform structure classification, thereby forming a plurality of data classification libraries;
s22: and extracting keywords from the created data classification library, and analyzing and constructing the data according to a mode of combining the source and the structure, thereby forming similar classes.
Preferably, the data extraction in step S3 specifically includes:
s31: inputting characters to be searched, searching in a structure storage, a semi-structure storage and a non-structure storage, matching score information and browsing records of a user with search information of the user, performing relation extraction, attribute extraction and entity extraction after the searching is finished, extracting keyword information of each database during each extraction, obtaining probability distribution aiming at a vocabulary table through an extraction result, obtaining probability distribution aiming at an input sequence through a pointer network, and obtaining a probability distribution combining the vocabulary in an input text and a prediction vocabulary by combining the probability distribution and the input sequence, so that a model can directly copy words from the input text to an output result;
s32: of course, directly performing the operation of S31 easily causes the problem of data duplication, so we add a soft selection probability step;
s33: the decision of whether the current prediction is to copy a word directly from the source text or to generate a word from the vocabulary is made by soft choice probabilities, which is simply summing between two words to generate a new word.
Preferably, the data integration in step S4 specifically includes:
s41: acquiring data extracted in the step S3 and data generated by soft selection probability for data integration, matching with a target index, and performing level classification according to the matching degree of the index;
s42: and after classification, data inference is carried out on the data through soft selection probability, the inferred data and the data classified by grades are mixed, and the data recommendation relevance is increased.
Preferably, the data construction in step S5 specifically includes: and performing frame marking on the data extracted in the S4, and then converting the data into related relation vectors, so that a semantically similar data set is obtained.
Preferably, the recommendation result is obtained according to the data set obtained in step S5.
Preferably, the knowledge update requires data collection of new data on a regular basis,
preferably, the data acquisition is performed with distributed processing, the data is divided into a plurality of keywords, the plurality of keywords are subjected to stage calculation analysis in an iterative manner, and then a dynamic knowledge graph is constructed, so that the dynamic knowledge graph is matched with the keywords in S2,
preferably, when the matching of the dynamic knowledge graph and the keywords in the S2 fails, the dynamic knowledge graph is directly stored in the knowledge graph, and when the occurrence probability is greater than three times, the keywords are extracted and classified by pointer classification storage.
The invention has the beneficial effects that:
the relation extraction, the attribute extraction and the entity extraction are carried out from the retrieval information through the soft selection probability, each time the keyword information of each database is extracted, the probability distribution aiming at the vocabulary table can be obtained through the extraction result, then the probability distribution aiming at the input sequence can be obtained through the pointer network, and the probability distribution combining the vocabulary in the input text and the prediction vocabulary table can be obtained through merging the keyword information and the probability distribution, so that the model can directly copy words from the input text to the output result, and then the model comprehensively determines whether the current prediction directly copies one word from the source text or generates one word from the vocabulary table through the soft selection probability.
Therefore, the soft selection probability can effectively extract and neutralize the two extracted information source data, and then the two data are integrated to obtain a final result, so that the problem of repetition of the recommendation result can be effectively reduced, and the recommendation result has pertinence.
Drawings
Fig. 1 is a schematic structural diagram of a recommendation method and apparatus based on a pointer network and a knowledge graph according to the present invention.
Fig. 2 is a schematic view of a flow structure of a recommendation method and apparatus based on a pointer network and a knowledge graph according to the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments.
Example 1
Referring to fig. 1-2, a recommendation method based on a pointer network and a knowledge graph includes steps of acquiring knowledge data, and further includes:
s1: collecting data, and then creating a knowledge graph from the collected data;
s2: then extracting concept words in the created knowledge graph according to the data of S1 for pointer classification storage;
s3: then inputting the searched keywords, and then extracting data of the keywords in pointer classification storage;
s4: then, performing integrated reasoning according to the data extracted in the S3;
s5: constructing a frame by the sorted data;
s6: recommending a result;
s7: and (5) updating knowledge.
The data classification collected in step S2 specifically includes:
s21: classifying the data collected in the step S1 according to grades, and then classifying the grades in a pointer storage way to perform structure classification, thereby forming a plurality of data classification libraries;
s22: extracting keywords from the created data classification library, analyzing and constructing data according to a combination of a source and a structure, thereby forming similar classes, wherein the data extraction in step S3 specifically includes:
s31: inputting characters to be searched, searching in a structure storage, a semi-structure storage and a non-structure storage, after the searching is finished, performing relation extraction, attribute extraction and entity extraction, extracting keyword information of each database during each extraction, obtaining probability distribution aiming at a vocabulary table through an extraction result, obtaining probability distribution aiming at an input sequence through a pointer network, combining the probability distribution and the probability distribution to obtain a probability distribution combining the vocabulary in an input text and a prediction vocabulary table, and thus a model can directly copy words from the input text to an output result;
s32: of course, directly performing the operation of S31 easily causes the problem of data duplication, so we add a soft selection probability step;
s33: the decision of whether the current prediction is to copy a word directly from the source text or to generate a word from the vocabulary is made by soft choice probabilities, which is simply summing between two words to generate a new word.
Further, the data integration in step S4 specifically includes: s41: acquiring data extracted in the step S3 and data generated by soft selection probability for data integration, matching with a target index, and performing level classification according to the matching degree of the index; s42: and after classification, data inference is carried out on the data through soft selection probability, the inferred data and the data classified by grades are mixed, and the data recommendation relevance is increased.
The data construction in the step S5 specifically includes: performing frame marking on the data extracted in the step S4, converting the data into related relation vectors to obtain a data set with similar semantics, obtaining a recommendation result according to the data set obtained in the step S5, periodically acquiring new data when knowledge is updated, performing distributed processing on the new data, splitting the data into a plurality of keywords, performing stage calculation analysis on the plurality of keywords in an iterative manner, and then constructing a dynamic knowledge graph to match the dynamic knowledge graph with the keywords in the step S2, directly storing the dynamic knowledge graph in the knowledge graph when matching fails, and extracting and dividing the keywords into large categories through pointer classified storage when the probability of occurrence is more than three times.
Example 2
A recommendation device based on a pointer network and a knowledge graph is applied to the recommendation method based on the pointer network and the knowledge graph, relationship extraction, attribute extraction and entity extraction are carried out on retrieval information through soft selection probability, keyword information of each database is extracted when each time the keyword information is extracted, probability distribution aiming at a vocabulary table can be obtained through extraction results, then probability distribution aiming at an input sequence can be obtained through the pointer network, and a probability distribution combining vocabularies in an input text and a prediction vocabulary can be obtained through merging the probability distribution, so that a model can directly copy words from the input text into an output result, and then comprehensively decide whether the current prediction directly copies a word from a source text or generates a word from the vocabulary table through the soft selection probability, therefore, the soft selection probability can effectively extract and neutralize the two extracted information source data, and then the two data are integrated to obtain a final result, so that the problem of repetition of the recommendation result can be effectively reduced, and the recommendation result has pertinence.
While there have been shown and described what are at present considered the fundamental principles and essential features of the invention and its advantages, it will be apparent to those skilled in the art that the invention is not limited to the details of the foregoing exemplary embodiments, but is capable of other specific forms without departing from the spirit or essential characteristics thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned.
Furthermore, it should be understood that although the present description refers to embodiments, not every embodiment may contain only a single embodiment, and such description is for clarity only, and those skilled in the art should integrate the description, and the embodiments may be combined as appropriate to form other embodiments understood by those skilled in the art.
Claims (10)
1. A recommendation method based on a pointer network and a knowledge graph comprises the steps of acquiring knowledge data, and is characterized by further comprising the following steps:
s1: collecting data, and then creating a knowledge graph from the collected data;
s2: then extracting concept words in the created knowledge graph according to the data of S1 for pointer classification storage;
s3: then inputting the searched keywords, and then extracting data of the keywords in pointer classification storage;
s4: then, performing integrated reasoning according to the data extracted in the S3;
s5: constructing a frame by the sorted data;
s6: recommending a result;
s7: and (5) updating knowledge.
2. The pointer network and knowledge graph based recommendation method according to claim 1, wherein the data classification collected in the step S2 specifically comprises:
s21: classifying the data collected in the step S1 according to grades, and then classifying the grades in a pointer storage way to perform structure classification, thereby forming a plurality of data classification libraries;
s22: and extracting keywords from the created data classification library, and analyzing and constructing the data according to a mode of combining the source and the structure, thereby forming similar classes.
3. The pointer network and knowledge graph based recommendation method according to claim 1, wherein the data extraction in step S3 specifically comprises:
s31: inputting characters to be searched, searching in structural storage, semi-structural storage and non-structural storage, after the searching is finished, performing relation extraction, attribute extraction and entity extraction, extracting keyword information of each database during each extraction, obtaining probability distribution aiming at a vocabulary table through an extraction result, obtaining probability distribution aiming at an input sequence through a pointer network, combining the probability distribution and the probability distribution to obtain a probability distribution combining vocabularies in an input text and a prediction vocabulary table, and copying a plurality of words from the input text to an output result by a model;
s32: directly performing the operation of S31 may cause a data duplication problem, adding a soft selection probability step;
s33: the decision of whether the current prediction is to copy a word directly from the source text or to generate a word out of the vocabulary is made by soft choice probabilities, i.e. summing between two words to generate a new word.
4. The pointer network and knowledge graph based recommendation method according to claim 1, wherein the data integration in step S4 specifically comprises:
s41: acquiring data extracted in the step S3 and data generated by soft selection probability for data integration, matching with a target index, and performing level classification according to the matching degree of the index;
s42: and after classification, data inference is carried out on the data through soft selection probability, the inferred data and the data classified by grades are mixed, and the data recommendation relevance is increased.
5. The pointer network and knowledge graph based recommendation method according to claim 1, wherein the data construction in the step S5 specifically comprises: and performing frame marking on the data extracted in the S4, and then converting the data into related relation vectors to obtain a semantically similar data set.
6. The pointer network and knowledge graph based recommendation method according to claim 1, wherein the recommendation result is obtained according to the data set obtained in step S5.
7. The pointer network and knowledge graph based recommendation method of claim 1, wherein the knowledge update in step S7 requires data collection for new data periodically.
8. The pointer network and knowledge graph based recommendation method of claim 7, wherein the data collection is processed in a distributed manner, the data is divided into a plurality of keywords, the plurality of keywords are analyzed by stage calculation in an iterative manner, and then a dynamic knowledge graph is constructed, so that the dynamic knowledge graph is matched with the keywords in S2.
9. The recommendation method based on the pointer network and the knowledge graph as claimed in claim 8, wherein the dynamic knowledge graph is directly stored in the knowledge graph when the matching with the keywords in S2 fails, and when the probability of occurrence is more than three times, the keywords are extracted and classified into large categories through pointer classification storage.
10. A recommendation device based on pointer network and knowledge graph, characterized in that, it is applied to a recommendation method based on pointer network and knowledge graph as claimed in any one of the above claims 1-9.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111069131.1A CN113779981A (en) | 2021-09-13 | 2021-09-13 | Recommendation method and device based on pointer network and knowledge graph |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111069131.1A CN113779981A (en) | 2021-09-13 | 2021-09-13 | Recommendation method and device based on pointer network and knowledge graph |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113779981A true CN113779981A (en) | 2021-12-10 |
Family
ID=78843074
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111069131.1A Pending CN113779981A (en) | 2021-09-13 | 2021-09-13 | Recommendation method and device based on pointer network and knowledge graph |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113779981A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116541449A (en) * | 2023-05-12 | 2023-08-04 | 河南铭视科技股份有限公司 | Integrated analysis method and system for multi-source heterogeneous data of tobacco |
-
2021
- 2021-09-13 CN CN202111069131.1A patent/CN113779981A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116541449A (en) * | 2023-05-12 | 2023-08-04 | 河南铭视科技股份有限公司 | Integrated analysis method and system for multi-source heterogeneous data of tobacco |
CN116541449B (en) * | 2023-05-12 | 2023-10-13 | 河南铭视科技股份有限公司 | Integrated analysis method and system for multi-source heterogeneous data of tobacco |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10769552B2 (en) | Justifying passage machine learning for question and answer systems | |
Deepak et al. | A novel firefly driven scheme for resume parsing and matching based on entity linking paradigm | |
WO2021093755A1 (en) | Matching method and apparatus for questions, and reply method and apparatus for questions | |
US10558754B2 (en) | Method and system for automating training of named entity recognition in natural language processing | |
US9721205B2 (en) | Clarification of submitted questions in a question and answer system | |
US9280535B2 (en) | Natural language querying with cascaded conditional random fields | |
US10102254B2 (en) | Confidence ranking of answers based on temporal semantics | |
US9621601B2 (en) | User collaboration for answer generation in question and answer system | |
CN107491655B (en) | Liver disease information intelligent consultation system based on machine learning | |
US20180341686A1 (en) | System and method for data search based on top-to-bottom similarity analysis | |
US9720962B2 (en) | Answering superlative questions with a question and answer system | |
CN109947952B (en) | Retrieval method, device, equipment and storage medium based on English knowledge graph | |
CN109977291B (en) | Retrieval method, device and equipment based on physical knowledge graph and storage medium | |
US9646247B2 (en) | Utilizing temporal indicators to weight semantic values | |
CN116911312B (en) | Task type dialogue system and implementation method thereof | |
CN109522396B (en) | Knowledge processing method and system for national defense science and technology field | |
CN110866102A (en) | Search processing method | |
Quemy et al. | ECHR-OD: On building an integrated open repository of legal documents for machine learning applications | |
CN116628173B (en) | Intelligent customer service information generation system and method based on keyword extraction | |
CN116049376B (en) | Method, device and system for retrieving and replying information and creating knowledge | |
CN113779981A (en) | Recommendation method and device based on pointer network and knowledge graph | |
Mezentseva et al. | Optimization of analysis and minimization of information losses in text mining | |
Utami et al. | Query Reformulation for Indonesian Question Answering System Using Word Embedding of Word2Vec | |
US20240086433A1 (en) | Interactive tool for determining a headnote report | |
CN115827829B (en) | Ontology-based search intention optimization method and system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |