A natural language-based material recommendation method, system, device and medium
By using a natural language-based material recommendation method and leveraging industry knowledge bases and sentence vector search engines, writing materials are automatically recommended, solving the problem of low efficiency for document writers when selecting writing materials and realizing intelligent writing assistance and real-time recommendations.
Patent Information
- Application Number
- CN202111567862.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-21
- Publication Date
- 2026-01-23
- Estimated Expiration
- 2041-12-21
AI Technical Summary
In existing technologies, document writers are inefficient and overburdened when sifting through massive amounts of documents for writing materials, and there is a lack of intelligent writing assistance systems for topic selection, structured templates, and keyword recommendations.
We employ a natural language-based material recommendation method. By collecting user input, utilizing a pre-set industry knowledge base and sentence vector search engine, and combining it with a ranking model, we automatically recommend writing materials, including keyword, candidate phrase, and topic paragraph recommendations.
It has achieved intelligent writing assistance, improved writing efficiency, reduced manual workload, and provided real-time material recommendation services.
Smart Images

Figure CN114265926B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of material recommendation technology, and in particular to a material recommendation method, system, device and medium based on natural language. Background Technology
[0002] When there is a large demand for writing news articles, notices, reports, and other documents, document writers need to spend a lot of manpower analyzing and filtering writing materials from a massive amount of existing documents. This process is prone to omissions, is time-consuming, and laborious, resulting in low writing efficiency and a heavy burden on frontline staff. In particular, a smart writing assistance system is needed to effectively address the problem of users lacking writing materials or topic templates by providing suggestions and recommendations on topics, structured templates, and keywords for the content they are currently writing. This system should include real-time acquisition of edited text information, query analysis, semantic search and L2R (Learning to Rank), candidate phrase recommendations, real-time example sentence recommendations, related topic paragraph recommendations, and recommended titles. The edited information acquisition module collects user input in real time and automatically sends the acquired input data to the query analysis module and L2R (Learning to Rank) to achieve functions such as candidate phrase recommendations, example sentence recommendations, and topic paragraph recommendations. Summary of the Invention
[0003] The purpose of this invention is to propose a method, system, device, and medium for recommending materials based on natural language, thereby solving the technical problems of low efficiency and heavy burden of manual writing in existing methods.
[0004] On the one hand, a natural language-based material recommendation method is provided, including:
[0005] Collect real-time input from the target user;
[0006] The system queries and analyzes the real-time content input by the target user based on a pre-set industry knowledge base to obtain corresponding keywords; and retrieves the corresponding keywords using a pre-set retrieval algorithm to obtain the first recommendation result.
[0007] The real-time input content is converted into semantic vectors and input into a pre-trained sentence vector search engine to obtain the second recommendation result;
[0008] The first recommendation result and the second recommendation result are used as input to a pre-trained ranking model. The model outputs the similarity scores corresponding to the first recommendation result and the second recommendation result, and ranks the first recommendation result and the second recommendation result according to the corresponding similarity scores. The ranking result is then output as the final recommendation result.
[0009] Preferably, the preset industry knowledge base is obtained according to the following process:
[0010] Collect industry-specific linguistic data and convert it into a preset format;
[0011] Identify text elements in the industry corpus data and generate a document tree;
[0012] Identify corresponding keywords based on a preset power industry knowledge graph, and then split the keywords based on preset knowledge triplet data;
[0013] Determine whether there are semantically identical words among the split keywords, and group semantically identical words into a new keyword set;
[0014] The preset industry knowledge base is obtained from the preset knowledge graph of the power industry based on the keyword set;
[0015] The preset industry knowledge base includes words for retrieval, questions corresponding to the words, and corresponding answers.
[0016] Preferably, the pre-trained sentence vector search engine is trained according to the following process:
[0017] The collected industry corpus data is converted into a pre-defined format.
[0018] The collected industry corpus data after format conversion is classified according to preset category standards to obtain a sample dataset of knowledge-similar questions in the power industry.
[0019] The dataset of similar questions about power industry knowledge is used to form a training dataset for power industry knowledge question and answer according to a preset ratio.
[0020] Preferably, the pre-trained sentence vector representation model is obtained through the following process:
[0021] The power industry knowledge question-and-answer training dataset is used as input to a preset sentence vector representation model to obtain sentence vectors of domain knowledge question-and-answer sentences; the obtained sentence vectors of domain knowledge question-and-answer sentences are stored in a preset vector search engine to obtain a sentence vector search engine; wherein, the sentence vector search engine includes question vectors and corresponding question answers.
[0022] On the other hand, a natural language-based material recommendation system is also provided to implement the aforementioned natural language-based material recommendation method, including:
[0023] The data acquisition module is used to collect real-time input from the target user.
[0024] The first recommendation module is used to query and analyze the real-time content input by the target user based on a preset industry knowledge base to obtain corresponding keywords; and to retrieve the corresponding keywords through a preset retrieval algorithm to obtain the first recommendation result.
[0025] The second recommendation module is used to convert the real-time input content into semantic vectors and input them into a pre-trained sentence vector search engine to obtain the second recommendation result.
[0026] The final recommendation module takes the first recommendation result and the second recommendation result as input to a pre-trained ranking model, outputs the similarity scores corresponding to the first recommendation result and the second recommendation result, and sorts the first recommendation result and the second recommendation result according to the corresponding similarity scores, and outputs the sorted result as the final recommendation result.
[0027] Preferably, the first recommendation module is further used to collect industry corpus data and convert it into a preset format;
[0028] Identify text elements in the industry corpus data and generate a document tree;
[0029] Identify corresponding keywords based on a preset power industry knowledge graph, and then split the keywords based on preset knowledge triplet data;
[0030] Determine whether there are semantically identical words among the split keywords, and group semantically identical words into a new keyword set;
[0031] The preset industry knowledge base is obtained from the preset knowledge graph of the power industry based on the keyword set;
[0032] The preset industry knowledge base includes words for retrieval, questions corresponding to the words, and corresponding answers.
[0033] Preferably, the second recommendation module is further used to convert the collected industry corpus data into a preset format;
[0034] The collected industry corpus data after format conversion is classified according to preset category standards to obtain a sample dataset of knowledge-similar questions in the power industry.
[0035] The dataset of similar questions about power industry knowledge is used to form a training dataset for power industry knowledge question and answer according to a preset ratio.
[0036] On the other hand, a computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program in accordance with the steps of the following method:
[0037] Collect real-time input from the target user;
[0038] The system queries and analyzes the real-time content input by the target user based on a pre-set industry knowledge base to obtain corresponding keywords; and retrieves the corresponding keywords using a pre-set retrieval algorithm to obtain the first recommendation result.
[0039] The real-time input content is converted into semantic vectors and input into a pre-trained sentence vector search engine to obtain the second recommendation result;
[0040] The first recommendation result and the second recommendation result are used as input to a pre-trained ranking model. The model outputs the similarity scores corresponding to the first recommendation result and the second recommendation result, and ranks the first recommendation result and the second recommendation result according to the corresponding similarity scores. The ranking result is then output as the final recommendation result.
[0041] On the other hand, a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the following method:
[0042] Collect real-time input from the target user;
[0043] The system queries and analyzes the real-time content input by the target user based on a pre-set industry knowledge base to obtain corresponding keywords; and retrieves the corresponding keywords using a pre-set retrieval algorithm to obtain the first recommendation result.
[0044] The real-time input content is converted into semantic vectors and input into a pre-trained sentence vector search engine to obtain the second recommendation result;
[0045] The first recommendation result and the second recommendation result are used as input to a pre-trained ranking model. The model outputs the similarity scores corresponding to the first recommendation result and the second recommendation result, and ranks the first recommendation result and the second recommendation result according to the corresponding similarity scores. The ranking result is then output as the final recommendation result.
[0046] In summary, implementing the embodiments of the present invention has the following beneficial effects:
[0047] The natural language-based material recommendation method, system, device, and medium provided by this invention collects, cleans, and analyzes professional corpus data in specific fields, performs format conversion, content segmentation, automatic metadata indexing, and multi-dimensional indexing on heterogeneous corpus data, constructs a semantic search engine for intelligent writing, automatically captures user editing operations, and utilizes query analysis, semantic search, intelligent recommendation, and other technologies to recommend writing materials to users during the writing process. Attached Figure Description
[0048] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, obtaining other drawings based on these drawings without creative effort still falls within the scope of the present invention.
[0049] Figure 1 This is a schematic diagram of the main process of a material recommendation method based on natural language in an embodiment of the present invention.
[0050] Figure 2 This is a schematic diagram of a sentence vector representation model in an embodiment of the present invention.
[0051] Figure 3 This is a schematic diagram of a material recommendation system based on natural language in an embodiment of the present invention. Detailed Implementation
[0052] To make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings.
[0053] like Figure 1 The diagram shown is an embodiment of a natural language-based material recommendation method provided by the present invention. In this embodiment, the method includes the following steps:
[0054] Collect real-time content input from target users; that is, dynamically collect the input content of users while they are writing and recommend it as they write.
[0055] Furthermore, based on a pre-defined industry knowledge base, the real-time content input by the target user is queried and analyzed to obtain corresponding keywords; then, a pre-defined retrieval algorithm is used to retrieve the corresponding keywords to obtain the first recommended result; that is, the search engine performs query analysis and processing on the user-input text: the input text is segmented, stop words are removed, and keywords and business entities are extracted; keywords are replaced using synonyms and similar word libraries, and search terms are expanded or rewritten. Finally, the BM25 algorithm is used to recall the text and return the most relevant results.
[0056] In a specific embodiment, the preset industry knowledge base is obtained through the following process: Industry corpus data is collected and converted into a preset format; that is, a web crawler is deployed to capture massive amounts of heterogeneous industry corpus data from the intranet, including industry news, company references, updates, activities, events, conferences and exhibitions, work reports, professional journals, papers, books, documents, and professional dictionaries. The collected documents undergo data preprocessing, including format conversion, automatic content segmentation, and automatic indexing of SPO-identified metadata, to construct the industry knowledge base. SPO identification refers to knowledge triplet data, including Subject (entity), Predicate (entity attribute / relationship between entities), and Object (entity attribute value / associated entity). Text elements in the industry corpus data are identified to generate a document tree; that is, documents of different formats, such as Word, PDF, and XLS files, are converted into a unified HTML format. The HTML format files are then parsed to identify hierarchical headings, body paragraphs, tables, captions, illustrations, and other elements, generating a document tree for subsequent entity recognition and SPO recognition. The system identifies corresponding keywords based on a pre-defined power industry knowledge graph and splits these keywords according to pre-defined knowledge triples. Specifically, it identifies entities based on the power industry knowledge graph schema, using algorithms such as text matching, NER models, schema-based and document hierarchy relationship recognition. Based on the attributes defined in the schema, it identifies the SPO (Specific Object Position) for each entity. Current SPO identification algorithms include table SPO extraction, key-value SPO extraction, plain text SPO extraction, and complex entity structuring. For undefined relations in the schema generated by SPO identification, it calculates the semantic similarity to defined relations in the schema to determine the mapping relationship. The system splits and normalizes the entity values in the SPO triples. It determines whether semantically identical words exist among the split keywords and groups these semantically identical words into a new keyword set; that is, it determines whether semantically identical entities exist in the input entity set and merges these semantically identical entity groups into a new entity. Finally, it determines whether the entity text value in the SPO triple is an entity; if it is, it adds the corresponding entity ID to the entity value. A pre-defined industry knowledge base is obtained by using a pre-defined keyword set within a pre-defined power industry knowledge graph; that is, entity information is stored in a graph database to facilitate the use of the knowledge graph by upper-layer intelligent question-and-answer applications. The pre-defined industry knowledge base includes keywords for retrieval, corresponding questions, and corresponding answers. Document metadata and content data are extracted and text analysis is performed to create a keyword full-text index for the document metadata (title, source, keywords, subject terms, author, professional category, publication time, etc.) and text content.
[0057] Furthermore, the real-time input content is transformed into semantic vectors and input into a pre-trained sentence vector search engine to obtain the second recommendation result; that is, the user's input question text is transformed into a semantic vector representation, and a retrieval based on semantic vectors is submitted to the sentence vector search engine. The K most similar question-answer pairs are quickly obtained through the ANN algorithm to achieve semantic vector recall.
[0058] In a specific embodiment, the pre-trained sentence vector search engine is trained according to the following process:
[0059] The collected industry corpus data is converted according to a preset format; the converted industry corpus data is then classified according to preset category standards to obtain a power industry knowledge-similar question sample dataset; this power industry knowledge-similar question sample dataset is then used to form a power industry professional knowledge question-and-answer training dataset according to a preset ratio; that is, based on relatively mature data collection tools and natural language processing tools such as search engine crawlers, full-text document retrieval, word segmentation technology, hot word analysis, and sentiment analysis, professional knowledge question-and-answer data is extracted from professional content sources such as professional knowledge bases, industry news, power Siri, corporate intranets, professional journals, and papers in power enterprises, and constructed into a power industry knowledge-similar question sample dataset. Using sample augmentation tools, synonyms, near-synonyms, antonyms, hypernyms, and hyponyms are used to replace words; a certain proportion of negative samples, i.e., dissimilar sentence pairs, are generated. The generated positive and negative samples are manually reviewed and revised to export the power industry professional knowledge question-and-answer training dataset.
[0060] The power industry knowledge question-and-answer training dataset is used as input to a pre-defined sentence vector representation model to obtain sentence vectors for domain knowledge question-and-answer questions. These sentence vectors are then stored in a pre-defined vector search engine to obtain a sentence vector search engine. The sentence vector search engine includes question vectors and corresponding question answers. That is, as shown... Figure 2As shown, the left figure illustrates the fine-tuning training stage structure, employing a classification objective function. The right figure shows the calculation of similarity between two sentences using sentence vectors after model training, employing a regression objective function. u and v represent the vector representations of the two input sentences, respectively. |uv| represents taking the absolute value of the two vectors. (u,v,|uv|) represents concatenating the three vectors in the -1 dimension, resulting in a vector with a dimension of 3*d, where d represents the hidden layer dimension. Small-scale fine-tuning is performed for the downstream text classification task to achieve a win-win situation of knowledge transfer, computing power sharing, and specialized high precision. A Siamese BERT model (Sentencetransformers) is built, modifying the pre-trained BERT: using Siamese and a three-level network structure to obtain semantically meaningful sentence vector representations. The Siamese BERT network architecture allows input sentences to derive vector representations of a fixed size. Similarity metrics such as cosine similarity or Manhattan / Euclidean distance can be used to find semantically similar sentences. The distilled and compressed pre-trained Chinese BERT model is loaded, selecting TinyALBERT. The `SentenceTransformers` model is trained, using the cosine similarity of two sentence vectors to measure the semantic similarity between two texts. The pre-trained model is then fine-tuned. The `SentenceTransformers` model is trained using samples from a domain-specific question-answering dataset (electrical engineering knowledge question-answering training dataset). The text encoding part uses the same BERT variant model; the pooling operation of the `SentenceTransformers` model is concatenated into TinyALBERT to obtain a fixed-size sentence semantic vector representation. A mean-pooling strategy is employed, averaging all tokens of the sentence along the token dimension, further extracting and compressing features from the BERT output vector. After pooling, the vector representations `u` and `v` of the two sentences are obtained; then `u`, `v`, and their element-level difference |uv| are concatenated to obtain (`u`, `v`, |uv|`); this is then fed into a fully connected network and classified using softmax. The cross-entropy loss function is used for classification, and the mean squared error loss function is used for regression. The training parameters are set as follows: learning rate: 0.00002; warmup: 0.1; batch size: 16; optimizer: Adam.
[0061] Save the fine-tuned TinyALBERT model (sentence vector representation model), encapsulate the model prediction interface using the Flask framework, provide a representation service that converts domain question text into semantic vectors, store the generated sentence vectors in the vector storage engine Milvus, index them in a high-dimensional vector space, and generate a semantic index of typical questions for domain knowledge question answering (a pre-trained sentence vector search engine).
[0062] Furthermore, the first recommendation result and the second recommendation result are used as input to a pre-trained ranking model, which outputs the similarity scores corresponding to the first recommendation result and the second recommendation result. The first recommendation result and the second recommendation result are ranked according to the corresponding similarity scores, and the ranking result is output as the final recommendation result.
[0063] In a specific embodiment, the relevance of the two recall results (the first recommendation result and the second recommendation result) is ranked, that is, text feature extraction is performed on the recall results to train a ranking classifier. A basic scorer and feature extractor are constructed to obtain basic matching scores and features, mainly including:
[0064] The length of the two questions
[0065] Skip-Gram Scorer, Psb and Qsb represent the set of skip-ngrams in the problem; the final score is the harmonic average of the two scores above:
[0066]
[0067]
[0068] TermMatch Scorer: Calculates the sum of the IDF values of the matched terms for each search term, as well as the sum of the IDF values of all terms in the question. IDF is used because different terms have varying levels of importance.
[0069] Text Alignment Scorer: This uses the Waterman-Smith distance to calculate the alignment score. Compared to edit distance or Needleman-Wunsch distance, this distance is more focused on local alignment, that is, the alignment of the optimal subsequence.
[0070] Embedding Scorer: Obtains question vectors by averaging word vectors, and calculates the similarity between two question vectors, including character-based and word-based similarity.
[0071] Entity Scorer: Entity overlap score.
[0072] Neural Scorer: The output that can be input into a neural network.
[0073] After obtaining the basic features, the GBDT decision tree model is used to train the model to obtain the highest-scoring result, forming the final L2R model (ranking model).
[0074] like Figure 3The diagram shown is an embodiment of a natural language-based material recommendation system provided by the present invention. This embodiment includes:
[0075] The data acquisition module is used to collect real-time input from the target user.
[0076] The first recommendation module is used to query and analyze the real-time content input by the target user based on a preset industry knowledge base to obtain corresponding keywords; and to retrieve the corresponding keywords through a preset retrieval algorithm to obtain the first recommendation result; specifically, the first recommendation module is also used to collect industry corpus data and convert it into a preset format;
[0077] Identify text elements in the industry corpus data and generate a document tree;
[0078] Identify corresponding keywords based on a preset power industry knowledge graph, and then split the keywords based on preset knowledge triplet data;
[0079] Determine whether there are semantically identical words among the split keywords, and group semantically identical words into a new keyword set;
[0080] The preset industry knowledge base is obtained from the preset knowledge graph of the power industry based on the keyword set;
[0081] The preset industry knowledge base includes words for retrieval, questions corresponding to the words, and corresponding answers.
[0082] The second recommendation module is used to convert the input real-time content into semantic vectors and input them into a pre-trained sentence vector search engine to obtain the second recommendation result; specifically, the second recommendation module is also used to convert the collected industry corpus data into a preset format.
[0083] The collected industry corpus data after format conversion is classified according to preset category standards to obtain a sample dataset of knowledge-similar questions in the power industry.
[0084] The dataset of similar questions about power industry knowledge is used to form a training dataset for power professional knowledge question and answer according to a preset ratio.
[0085] The power industry knowledge question-and-answer training dataset is used as input to a preset sentence vector representation model to obtain sentence vectors of domain knowledge question-and-answer sentences; the obtained sentence vectors of domain knowledge question-and-answer sentences are stored in a preset vector search engine to obtain a sentence vector search engine; wherein, the sentence vector search engine includes question vectors and corresponding question answers.
[0086] The final recommendation module takes the first recommendation result and the second recommendation result as input to a pre-trained ranking model, outputs the similarity scores corresponding to the first recommendation result and the second recommendation result, and sorts the first recommendation result and the second recommendation result according to the corresponding similarity scores, and outputs the sorted result as the final recommendation result.
[0087] The system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0088] It should be noted that the system described in the above embodiments corresponds to the method described in the above embodiments. Therefore, the parts of the system described in the above embodiments that are not described in detail can be obtained by referring to the content of the method described in the above embodiments, and will not be repeated here.
[0089] Furthermore, if the management system for accessing the intelligent devices described in the above embodiments is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium.
[0090] Accordingly, another aspect of the present invention provides a computer device including a processor, a memory, and a network interface connected via a system bus. The processor of the computer device provides computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements a natural language-based material recommendation method.
[0091] Those skilled in the art will understand that the structure of the computer device described above is only a partial structure related to the solution of this application and does not constitute a limitation on the computer device to which the solution of this application is applied. A specific computer device may include more or fewer components than those described above, or combine certain components, or have different component arrangements.
[0092] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, performs the following steps:
[0093] Collect real-time input from the target user;
[0094] The system queries and analyzes the real-time content input by the target user based on a pre-set industry knowledge base to obtain corresponding keywords; and retrieves the corresponding keywords using a pre-set retrieval algorithm to obtain the first recommendation result.
[0095] The real-time input content is converted into semantic vectors and input into a pre-trained sentence vector search engine to obtain the second recommendation result;
[0096] The first recommendation result and the second recommendation result are used as input to a pre-trained ranking model. The model outputs the similarity scores corresponding to the first recommendation result and the second recommendation result, and ranks the first recommendation result and the second recommendation result according to the corresponding similarity scores. The ranking result is then output as the final recommendation result.
[0097] Accordingly, another aspect of the present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the following steps;
[0098] Collect real-time input from the target user;
[0099] The system queries and analyzes the real-time content input by the target user based on a pre-set industry knowledge base to obtain corresponding keywords; and retrieves the corresponding keywords using a pre-set retrieval algorithm to obtain the first recommendation result.
[0100] The real-time input content is converted into semantic vectors and input into a pre-trained sentence vector search engine to obtain the second recommendation result;
[0101] The first recommendation result and the second recommendation result are used as input to a pre-trained ranking model. The model outputs the similarity scores corresponding to the first recommendation result and the second recommendation result, and ranks the first recommendation result and the second recommendation result according to the corresponding similarity scores. The ranking result is then output as the final recommendation result.
[0102] It is understood that further details regarding the steps involved in the aforementioned computer equipment and computer-readable storage media can be found in the foregoing limitations on natural language-based material recommendation methods, and will not be repeated here.
[0103] In summary, implementing the embodiments of the present invention has the following beneficial effects:
[0104] The natural language-based material recommendation method, system, device, and medium provided by this invention collects, cleans, and analyzes professional corpus data in specific fields, performs format conversion, content segmentation, automatic metadata indexing, and multi-dimensional indexing on heterogeneous corpus data, constructs a semantic search engine for intelligent writing, automatically captures user editing operations, and utilizes query analysis, semantic search, intelligent recommendation, and other technologies to recommend writing materials to users during the writing process.
[0105] The above description discloses only preferred embodiments of the present invention and should not be construed as limiting the scope of the present invention. Therefore, equivalent variations made in accordance with the claims of the present invention are still within the scope of the present invention.
Claims
1. A material recommendation method based on natural language processing, characterized in that, include: Collect real-time input from the target user; The real-time content input by the target user is queried and analyzed based on a preset industry knowledge base to obtain corresponding keywords; The corresponding keywords are then retrieved using a preset retrieval algorithm to obtain the first recommended result; The real-time input content is converted into semantic vectors and input into a pre-trained sentence vector search engine to obtain the second recommendation result; The first recommendation result and the second recommendation result are used as input to a pre-trained ranking model, which outputs the similarity scores corresponding to the first recommendation result and the second recommendation result. The first recommendation result and the second recommendation result are ranked according to the corresponding similarity scores, and the ranking result is output as the final recommendation result. The preset industry knowledge base is obtained through the following process: Collect industry-specific linguistic data and convert it into a preset format; Identify text elements in the industry corpus data and generate a document tree; Identify corresponding keywords based on a preset power industry knowledge graph, and then split the keywords based on preset knowledge triplet data; Determine whether there are semantically identical words among the split keywords, and group semantically identical words into a new keyword set; The keyword set is stored in a preset power industry knowledge graph to obtain a preset industry knowledge base; The preset industry knowledge base includes words for retrieval, questions corresponding to the words, and corresponding answers.
2. The method as described in claim 1, characterized in that, The pre-trained sentence vector search engine is trained according to the following process: The collected industry corpus data is converted into a pre-defined format. The collected industry corpus data after format conversion is classified according to preset category standards to obtain a sample dataset of knowledge-similar questions in the power industry. The dataset of similar questions about power industry knowledge is used to form a training dataset for power industry knowledge question and answer according to a preset ratio.
3. The method as described in claim 2, characterized in that, The pre-trained sentence vector representation model is obtained through the following process: The power industry knowledge question-and-answer training dataset is used as input to a preset sentence vector representation model to obtain sentence vectors of domain knowledge question-and-answer sentences; the obtained sentence vectors of domain knowledge question-and-answer sentences are stored in a preset vector search engine to obtain a sentence vector search engine; wherein, the sentence vector search engine includes question vectors and corresponding question answers.
4. A natural language-based material recommendation system, used to implement the method as described in any one of claims 1-3, characterized in that, include: The data acquisition module is used to collect real-time input from the target user. The first recommendation module is used to query and analyze the real-time content input by the target user based on a preset industry knowledge base to obtain corresponding keywords; The corresponding keywords are then retrieved using a preset retrieval algorithm to obtain the first recommended result; The second recommendation module is used to convert the real-time input content into semantic vectors and input them into a pre-trained sentence vector search engine to obtain the second recommendation result. The final recommendation module takes the first recommendation result and the second recommendation result as input to a pre-trained ranking model, outputs the similarity scores corresponding to the first recommendation result and the second recommendation result, and sorts the first recommendation result and the second recommendation result according to the corresponding similarity scores, and outputs the sorted result as the final recommendation result. The first recommendation module is also used to collect industry corpus data and convert it into a preset format; Identify text elements in the industry corpus data and generate a document tree; Identify corresponding keywords based on a preset power industry knowledge graph, and then split the keywords based on preset knowledge triplet data; Determine whether there are semantically identical words among the split keywords, and group semantically identical words into a new keyword set; The keyword set is stored in a preset power industry knowledge graph to obtain a preset industry knowledge base; The preset industry knowledge base includes words for retrieval, questions corresponding to the words, and corresponding answers.
5. The system as described in claim 4, characterized in that, The second recommendation module is also used to convert the collected industry corpus data into a preset format; The collected industry corpus data after format conversion is classified according to preset category standards to obtain a sample dataset of knowledge-similar questions in the power industry. The dataset of similar questions about power industry knowledge is used to form a training dataset for power industry knowledge question and answer according to a preset ratio.
6. The system as described in claim 5, characterized in that, The second recommendation module is further used to input the power professional knowledge question and answer training dataset as input to a preset sentence vector representation model to obtain the sentence vector of the domain knowledge question and answer; and to store the obtained sentence vector of the domain knowledge question and answer into a preset vector search engine to obtain the sentence vector search engine; wherein, the sentence vector search engine includes the question vector and the corresponding question answer.
7. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 3.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 3.
Citation Information
Patent Citations
Knowledge retrieval method, device and apparatus and computer readable storage medium
CN112445904A
Seat-assisted question-answering method and system fusing semantic classification and knowledge graph
CN113505586A