A search purpose prediction method and system based on knowledge management
By using the methods of search purpose prediction, such as word vectorization, part-of-speech annotation and Bi-LSTM, the similarity and correlation coordinate system between words is constructed, and the problems of poor information correlation, inaccurate keyword extraction, and insufficient search accuracy in the existing technology are solved, and more accurate search results and higher user satisfaction are achieved.
Patent Information
- Application Number
- CN202411847602.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-16
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2044-12-16
AI Technical Summary
The existing search purpose prediction methods have problems such as poor information correlation, inaccurate keyword extraction, and insufficient search accuracy.
By obtaining the user's search content, extracting keywords, and using techniques such as word vectorization, part-of-speech annotation and Bi-LSTM model, a coordinate system of similarity and correlation between words is constructed, a prediction range is generated, and the content within the prediction range is comprehensively processed to generate predictions for the search purpose.
It improves the accuracy of keyword recognition, enhances the ability to understand sentence structure and semantics, achieves more accurate coordinate positioning and relevance and comprehensiveness of search results, and improves user satisfaction.
Smart Images

Figure CN119336795B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of retrieval purpose prediction, and in particular to a retrieval purpose prediction method and system based on knowledge management. Background Art
[0002] In today's information age, knowledge management has become one of the key means for enterprises and organizations to gain competitive advantages. Knowledge management aims to collect, organize, share and utilize knowledge resources through systematic methods to enhance the innovation ability and decision-making level of organizations. In the big data environment, how to effectively manage and utilize a large amount of knowledge and information has become a major challenge in the field of knowledge management.
[0003] Information retrieval technology has made great progress in the past few decades. Traditional information retrieval methods mainly rely on keyword matching and Boolean logic, but with the explosive growth of the Internet and data volume, traditional methods have gradually become insufficient. Modern information retrieval technology has begun to combine advanced technologies such as natural language processing (NLP), machine learning (ML) and deep learning (DL) to improve the accuracy and efficiency of retrieval.
[0004] In knowledge management systems, users usually need to quickly and accurately obtain information related to their needs. This demand has given rise to retrieval methods based on knowledge management, which use intelligent means to understand the user's search purpose and provide more accurate and relevant search results. However, existing retrieval methods still have shortcomings in processing complex queries, understanding user intent, and integrating multiple information sources. Summary of the invention
[0005] In view of the above-mentioned problems, the present invention is proposed.
[0006] Therefore, the technical problem solved by the present invention is that the existing search purpose prediction methods have the problems of poor information relevance, inaccurate keyword extraction, insufficient search precision, etc.
[0007] In order to solve the above technical problems, the present invention provides the following technical solutions: a retrieval purpose prediction method based on knowledge management, comprising:
[0008] Obtain the user's search content and extract keywords from the search content;
[0009] Coordinate construction of the content in the database;
[0010] According to the characteristics of the keywords, coordinate the search content;
[0011] At the coordinate location, generate a predicted range of the retrieval content;
[0012] The database contents within the prediction range are synthesized to generate a prediction for the search purpose.
[0013] As a preferred solution of the retrieval purpose prediction method based on knowledge management described in the present invention, wherein: the retrieval content includes the text or sentence input by the user;
[0014] The keywords include: Split into n independent words;
[0015] ,
[0016] in, represents the input sentence, Represents the word set after word segmentation. Indicates words;
[0017] Each word Convert to the corresponding word vector ;
[0018] ,
[0019] in, Expressive words Word vector, Word2Vec Indicates that the word is transformed through the Word2Vec model Convert to vector;
[0020] By counting the part of speech of each word in the dictionary in different environments, the Possessing part of speech set ; Expressive words In the dictionary, there may be j-th part of speech;
[0021] Get the dictionary probability of each word's part of speech from the dictionary library;
[0022] ,
[0023] in, POS Expressive words Part of Speech The dictionary probability of count Expressive words As a part of speech in the dictionary The number of occurrences of Expressive words is the number of occurrences of any part of speech, Expressive words The part-of-speech tag;
[0024] In every word In the corresponding part-of-speech set, randomly extract the part-of-speech in the set based on the dictionary probability , get the part-of-speech tag sequence , and the part-of-speech tag sequence randomly extracted each time are different until no new part-of-speech tag sequence is generated or the maximum number of extractions is reached; Indicates the part of speech of the i-th word.
[0025] As a preferred solution of the retrieval purpose prediction method based on knowledge management described in the present invention, wherein: the keywords also include: is the kth sequence extracted, The i-th part of speech of the k-th part of speech tag sequence;
[0026] Use a pre-trained part-of-speech embedding matrix to embed the part-of-speech tags Mapped to the corresponding part-of-speech embedding vector ;
[0027] ,
[0028] Among them, POS2Vec represents the mapping function from part-of-speech tags to embedded vectors;
[0029] Combine each part-of-speech sequence with the word vector The sequences are combined and the fitness of each part-of-speech sequence is calculated through the Bi-LSTM layer and the fully connected layer;
[0030] Forward LSTM:
[0031] ,
[0032] Backward LSTM:
[0033] ,
[0034] Combining the forward and backward hidden states:
[0035] ,
[0036] Calculate the fitness of each part-of-speech sequence:
[0037] ,
[0038] Select the sequence with the highest fitness from the multiple generated part-of-speech sequences as the final part-of-speech tagging result;
[0039] ,
[0040] in, represents the part-of-speech sequence with the highest fitness; Indicates that among all possible part-of-speech sequences Select the The largest sequence; Indicates The fitness score of a part-of-speech sequence; Indicates The first Words The forward LSTM hidden state vector of ; LSTM stands for Long Short-Term Memory Network; Indicates part of speech The embedding vector of Represents the concatenation operation of word vector and part-of-speech embedding vector; Indicates The first The forward LSTM hidden state vector of each word; Indicates The first Words The backward LSTM hidden state vector of Indicates The first The backward LSTM hidden state vector of each word; represents the i-th word in the k-th part-of-speech sequence, combining the hidden state vector of the forward and backward LSTM; represents the bias vector of the fully connected layer; [...] represents the concatenation operation of the vector; Represents the weight matrix of the fully connected layer;
[0041] Preset the weight of each part of speech, and select the part of speech tag sequence through the mapping function , the part-of-speech weight of each word;
[0042] ,
[0043] in, Expressive words The weight value of the mapping, Representation Tags The mapping of
[0044] Pass the context information of the sentence to an attention layer to calculate the importance score of each word;
[0045] ,
[0046] in, Expressive words The attention weight of is the weight matrix of the attention layer; Expressive words Hidden state vector in the Bi-LSTM layer; represents the bias vector of the attention layer; softmax represents the normalization function so that the sum of the attention weights of all words is 1;
[0047] Each word and Multiply and output the screening score ;
[0048] ,
[0049] Preset Threshold Filter keywords.
[0050] ,
[0051] in, A vector set representing the output keywords.
[0052] As a preferred solution of the retrieval purpose prediction method based on knowledge management described in the present invention, wherein: the coordinate construction includes vectorizing the words in the database, calculating the similarity between the word vectors as the horizontal coordinate; calculating the correlation between different words according to the historical training data as the vertical coordinate, constructing the coordinate axis, and determining the position of the word vector in the database in the coordinate axis;
[0053] Let the most frequent word in the database be Defined as the origin, the word is represented by cosine similarity and other words Similarities between ;
[0054] ,
[0055] in, represents the dot product of word vectors, and Represents the norm of the word vector;
[0056] The correlation between different words is calculated based on historical training data, and the correlation between words is represented by the co-occurrence matrix; let the co-occurrence matrix be , Expressive words and words The frequency of co-occurrence in historical data;
[0057] ,
[0058] Normalize the co-occurrence matrix:
[0059] ,
[0060] in, Expressive words and words relevance;
[0061] Constructing words in database Coordinates:
[0062] ,
[0063] Here, u represents the index of the word in the database, and m represents the number of words in the database.
[0064] As a preferred solution of the retrieval purpose prediction method based on knowledge management described in the present invention, the coordinate positioning includes respectively calculating the coordinates of each keyword and the coordinate origin. The similarity and correlation of the keywords are constructed to construct the coordinate information of each keyword in the coordinate axis;
[0065] Output the coordinates of each keyword and get the coordinate set of the keyword ;
[0066] in, Represents the coordinates of the mth keyword.
[0067] As a preferred solution of the search purpose prediction method based on knowledge management described in the present invention, wherein: the prediction range of the search content includes, in the coordinate system, a circular area with a radius of r generated with the coordinates of each keyword as the center;
[0068] ,
[0069] Among them, Distance Indicates keywords and words The Euclidean distance in the coordinate axis, Indicates keywords The coordinates of Expressive words The coordinates of
[0070] For each word If the condition is met, it is determined to be within the prediction range; all words that meet the condition are Perform set operations to obtain the final word set within the prediction range
[0071] ,
[0072] Among them, r represents the standard quantity of the prediction range threshold, M represents the keyword set, Indicates the cth keyword.
[0073] As a preferred solution of the retrieval purpose prediction method based on knowledge management described in the present invention, the database content within the prediction range is synthesized, including matching each word in the database with the corresponding retrieval content, matching the word set The elements in the array are prioritized and the search information corresponding to each element is output in turn according to the priority.
[0074] The priority includes counting the number of times the word vector in the database is selected by the prediction range; assuming that the initial count base of the word vector in the database is 0, In the prediction range, the word vector in the database is counted and added by 1, and all keywords are traversed to obtain the word set The counting result of each element in ; the counting results are arranged in order from large to small, and a priority ranking in descending order is generated one by one according to the arrangement of the counting results, and the elements with the same counting results are at the same priority.
[0075] A retrieval purpose prediction system based on knowledge management using the method of the present invention, wherein:
[0076] A collection unit obtains the user's search content and extracts keywords from the search content;
[0077] A construction unit constructs coordinates of the content in the database; coordinates the searched content according to the characteristics of the keyword;
[0078] The prediction unit performs approximate changes on the keywords, and generates a prediction range of the search content at the coordinate location according to the change result; and integrates the database content within the prediction range to generate a prediction of the search purpose.
[0079] A computer device comprises: a memory and a processor; the memory stores a computer program, wherein: the processor implements the steps of any one of the methods of the present invention when executing the computer program.
[0080] A computer-readable storage medium stores a computer program, wherein: when the computer program is executed by a processor, the steps of any one of the methods of the present invention are implemented.
[0081] Beneficial effects of the present invention: The retrieval purpose prediction method based on knowledge management provided by the present invention effectively improves the accuracy of keyword recognition through keyword extraction and word vectorization, making the retrieval content more accurate. Secondly, the Bi-LSTM model is used for part-of-speech tagging and integrated context information to improve the ability to understand sentence structure and semantics. By constructing a coordinate system of similarity and correlation between words, the relationship between words can be better represented and accurate coordinate positioning can be achieved. On this basis, a predicted range of retrieval content is generated to ensure the relevance and comprehensiveness of the retrieval results. In addition, by weighting, sorting and comprehensively processing the content within the prediction range, the user satisfaction with the retrieval results can be improved. Overall, the present invention not only improves the accuracy and efficiency of retrieval, but also can intelligently predict the user's retrieval purpose, greatly improving the information retrieval experience in the knowledge management system. BRIEF DESCRIPTION OF THE DRAWINGS
[0082] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.
[0083] Figure 1 An overall flow chart of a retrieval purpose prediction method based on knowledge management provided in the first embodiment of the present invention. DETAILED DESCRIPTION
[0084] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the drawings of the specification. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary persons in the art without creative work should fall within the scope of protection of the present invention.
[0085] Example 1, reference Figure 1 , as an embodiment of the present invention, provides a retrieval purpose prediction method based on knowledge management, comprising:
[0086] S1: Obtain the user's search content and extract keywords from the search content.
[0087] Furthermore, the search content includes text or sentences input by the user.
[0088] The keywords include: Split into n independent words.
[0089] ,
[0090] in, represents the input sentence, Represents the word set after word segmentation. Indicates word.
[0091] Each word Convert to the corresponding word vector .
[0092] ,
[0093] in, Expressive words Word vector, Word2Vec Indicates that the word is transformed through the Word2Vec model Convert to a vector.
[0094] By counting the part of speech of each word in the dictionary in different environments, the Possessing part of speech set ; Expressive words In the dictionary, there may be the jth part of speech.
[0095] Get the part-of-speech frequency of each word from the dictionary.
[0096] ,
[0097] in, POS Expressive words Part of Speech The dictionary probability of count Expressive words As a part of speech in the dictionary The number of occurrences of Expressive words is the number of occurrences of any part of speech, Expressive words The part-of-speech tag.
[0098] In every word In the corresponding part-of-speech set, randomly extract the part-of-speech in the set based on the dictionary probability , get the part-of-speech tag sequence , and the part-of-speech tag sequence randomly extracted each time are different until no new part-of-speech tag sequence is generated or the maximum number of extractions is reached; Indicates the part of speech of the i-th word.
[0099] set up is the kth sequence extracted, is the i-th part of speech of the k-th part of speech tag sequence.
[0100] Use a pre-trained part-of-speech embedding matrix to embed the part-of-speech tags Mapped to the corresponding part-of-speech embedding vector .
[0101] ,
[0102] Among them, POS2Vec represents the mapping function from part-of-speech tags to embedding vectors.
[0103] Each part-of-speech sequence is combined with the original word vector sequence, and the fitness of each part-of-speech sequence is calculated through the Bi-LSTM layer and the fully connected layer.
[0104] Forward LSTM:
[0105] ,
[0106] Backward LSTM:
[0107] ,
[0108] Combining the forward and backward hidden states:
[0109] ,
[0110] Calculate the fitness of each part-of-speech sequence:
[0111] ,
[0112] The sequence with the highest fitness is selected from the multiple generated part-of-speech sequences as the final part-of-speech tagging result.
[0113] ,
[0114] in, represents the part-of-speech sequence with the highest fitness; Indicates that among all possible part-of-speech sequences Select the The largest sequence; Indicates The fitness score of a part-of-speech sequence; Indicates The first Words The forward LSTM hidden state vector of ; LSTM stands for Long Short-Term Memory Network; Indicates part of speech The embedding vector of Represents the concatenation operation of word vector and part-of-speech embedding vector; Indicates The first The forward LSTM hidden state vector of each word; Indicates The first Words The backward LSTM hidden state vector of Indicates The first The backward LSTM hidden state vector of each word; represents the i-th word in the k-th part-of-speech sequence, combining the hidden state vector of the forward and backward LSTM; represents the bias vector of the fully connected layer; [...] represents the concatenation operation of the vector; Represents the weight matrix of the fully connected layer.
[0115] The weight of each part of speech is preset, and the part of speech weight of each word in the part of speech tag sequence is selected through the mapping function.
[0116] ,
[0117] in, Expressive words The weight value of the mapping, Representation Tags 's mapping.
[0118] The contextual information of the sentence is passed to an attention layer to calculate the importance score of each word.
[0119] ,
[0120] in, Expressive words The attention weight of is the weight matrix of the attention layer; Expressive words Hidden state vector in the Bi-LSTM layer; represents the bias vector of the attention layer; softmax represents the normalization function so that the sum of the attention weights of all words is 1.
[0121] Each word and Multiply and output the screening score .
[0122] ,
[0123] Preset Threshold , perform keyword filtering.
[0124] ,
[0125] in, A vector set representing the output keywords.
[0126] It is worth mentioning that by integrating contextual information with the Bi-LSTM model, the system can perform part-of-speech tagging more accurately, improve the accuracy of part-of-speech tagging, and select the part-of-speech sequence with the highest fitness as the final result. By calculating the part-of-speech weights and attention weights, the system can evaluate the importance of each word in the sentence, thereby screening out the most useful keywords for the purpose of retrieval. By screening the scores, the system can determine which words are the most important keywords, thereby giving priority to these keywords during the retrieval process and improving the relevance and accuracy of the retrieval results.
[0127] S2: Construct coordinates for the content in the database.
[0128] Coordinate construction includes vectorizing the words in the database and calculating the similarity between word vectors as the horizontal axis; calculating the correlation between different words based on historical training data as the vertical axis, constructing the coordinate axis, and determining the position of the word vectors in the database in the coordinate axis.
[0129] Let the most frequent word in the database be Defined as the origin, the word is represented by cosine similarity and other words Similarities between .
[0130] ,
[0131] in, represents the dot product of word vectors, and Represents the norm of the word vector.
[0132] The correlation between different words is calculated based on historical training data, and the correlation between words is represented by the co-occurrence matrix; let the co-occurrence matrix be , Expressive words and words The frequency of co-occurrence in historical data.
[0133] ,
[0134] Normalize the co-occurrence matrix:
[0135] ,
[0136] in, Expressive words and words The relevance of.
[0137] Constructing words in database Coordinates:
[0138] ,
[0139] Here, u represents the index of the word in the database, and m represents the number of words in the database.
[0140] What needs to be said is that by vectorizing the content in the database and constructing coordinates, the semantic relationship and relevance between words can be intuitively represented in a two-dimensional coordinate system. In the coordinate system, the word with the highest frequency is used as the origin, and the similarity between words is calculated by cosine similarity, which can more accurately reflect the relative position of words in the semantic space. This representation method helps to more accurately determine the content related to the user query through coordinate positioning and prediction range generation in the subsequent retrieval process, thereby improving the accuracy and relevance of the retrieval results.
[0141] S3: According to the characteristics of the keywords, coordinate positioning of the search content is performed.
[0142] The coordinate positioning includes calculating each of the keywords and the coordinate origin respectively. The similarity and correlation of the keywords are constructed to construct the coordinate information of each keyword in the coordinate axis;
[0143] Output the coordinates of each keyword and get the coordinate set of the keyword ;
[0144] in, Represents the coordinates of the mth keyword.
[0145] What needs to be said is that by calculating the similarity and relevance of each keyword to the origin of the coordinates, the position of each keyword can be accurately located in the coordinate axis. This precise positioning helps to accurately represent the semantic position of the keyword, which is convenient for subsequent retrieval and analysis.
[0146] S4: At the coordinate location, generate a predicted range of the retrieval content.
[0147] The predicted range of the search content includes a circular area with a radius of r generated in the coordinate system with the coordinates of each keyword as the center.
[0148] ,
[0149] Among them, Distance Indicates keywords and words The Euclidean distance in the coordinate axis, Indicates keywords The coordinates of Expressive words The coordinates of .
[0150] For each word If the condition is met, it is determined to be within the prediction range; all words that meet the condition are Perform set operations to obtain the final word set within the prediction range
[0151] ,
[0152] Among them, r represents the standard quantity of the prediction range threshold, M represents the keyword set, Indicates the cth keyword.
[0153] It should be noted that the coordinates of the keywords represent their positions in the semantic space, and the circular area that generates the prediction range can capture the semantic and contextual relationship between these keywords and the surrounding words. In this way, the system can better understand the user's query intent and provide more relevant and accurate search results. By calculating the Euclidean distance between the keywords and the words in the coordinate axis, it is possible to quickly determine which words are within the prediction range. This geometric method is simple and efficient, and can greatly reduce the number of words that need to be processed, thereby improving the overall retrieval efficiency of the system. Setting a standard prediction range radius r allows the system to dynamically adjust the size of the range according to the characteristics of different queries. This flexibility enables the system to adapt to different types of queries, whether it is a broad topic or a specific question, and can provide suitable search results.
[0154] Moreover, through set operations, all words that meet the conditions are integrated together to ensure the comprehensiveness of the search results. Even if some keywords do not have direct related words in certain situations, this comprehensive method can still capture all possible related information and improve the coverage of the search results.
[0155] S5: Integrate the database contents within the prediction range to generate a prediction for the search purpose.
[0156] Further, the database contents within the prediction range are synthesized, including matching each word in the database with the corresponding search content, The elements in are prioritized and the search information corresponding to each element is output in turn according to the priority.
[0157] The priority includes counting the number of times the word vector in the database is selected by the prediction range; assuming that the initial count base of the word vector in the database is 0, In the prediction range, the word vector in the database is counted and added by 1, and all keywords are traversed to obtain the word set The counting result of each element in ; the counting results are arranged in order from large to small, and a priority ranking in descending order is generated one by one according to the arrangement of the counting results, and the elements with the same counting results are at the same priority.
[0158] It should be noted that the most relevant words can be identified by comprehensively analyzing the database content within the prediction range, especially by measuring the number of times the word vector is selected by the prediction range. The more times these words appear in the prediction range of multiple keywords, the higher their relevance to the user's search content. Therefore, this design can effectively improve the relevance of the search results and ensure that users obtain the most valuable information. By measuring the number of times each word vector is selected and sorting these times, the importance and priority of each word can be determined. The higher the priority of the word, the greater its importance in the search content. Therefore, this design can optimize the priority sorting of the search results, so that users can see the most relevant information first, and improve the user's search experience and satisfaction. By automatically measuring and sorting the number of word vector occurrences, the system can intelligently analyze and process large amounts of data to generate the best search results. This design not only improves the intelligence of the system, but also reduces manual intervention and improves the system's automatic processing capabilities.
[0159] On the other hand, this embodiment also provides a retrieval purpose prediction system based on knowledge management, which includes:
[0160] The collection unit obtains the user's search content and extracts keywords from the search content.
[0161] The construction unit constructs the coordinates of the content in the database; and locates the coordinates of the searched content according to the characteristics of the keywords.
[0162] The prediction unit performs approximate changes on the keywords, and generates a prediction range of the search content at the coordinate location according to the change result; and integrates the database content within the prediction range to generate a prediction of the search purpose.
[0163] If the above functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program code.
[0164] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.
[0165] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.
[0166] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0167] Example 2, below is an embodiment of the present invention, which provides a retrieval purpose prediction method based on knowledge management. In order to verify the beneficial effects of the present invention, scientific demonstration is carried out through economic benefit calculation and simulation experiments.
[0168] The search content entered by the user is "Data Mining Algorithms and Models for Analysisand Prediction in Management".
[0169] The system segmented the sentence and extracted seven keywords: Data, Mining, Algorithm, Model, Analysis, Prediction, and Management.
[0170] Use the pre-trained Word2Vec model to convert each keyword into a word vector.
[0171] The part-of-speech statistics of each keyword in different environments are obtained through the dictionary library to generate a part-of-speech set for each word.
[0172] Count the part-of-speech frequency of each word in the dictionary.
[0173] According to the part-of-speech frequency, a part-of-speech tag sequence is randomly generated, and the part-of-speech tags are mapped to part-of-speech embedding vectors using a pre-trained part-of-speech embedding matrix.
[0174] The fitness of each part-of-speech sequence is calculated through the Bi-LSTM layer, and the sequence with the highest fitness is selected as the final part-of-speech tagging result.
[0175] All words in the database are vectorized, and the similarity between word vectors is calculated as the horizontal axis.
[0176] Calculate the correlation between words, represent the correlation between words through the co-occurrence matrix and perform normalization as the vertical coordinate.
[0177] Determine the coordinate position of each word in the database.
[0178] Calculate the similarity and relevance between each keyword and the coordinate origin (the word with the highest frequency), and construct the coordinate information of each keyword in the coordinate axis.
[0179] Output the coordinates of each keyword to obtain a coordinate set of the keywords.
[0180] With the coordinates of each keyword as the center, the words in the prediction range are selected by calculating the screening scores of keywords and words and multiplying them with a standard value (such as 0.5). If the result is within the range, the word is selected into the prediction range.
[0181] Perform set operations on all words that meet the conditions to obtain the final set of words within the prediction range.
[0182] Conduct a comprehensive analysis of the database content within the forecast range.
[0183] The number of times the word vector is selected by the prediction range is measured, and the initial count is 0.
[0184] Count the number of occurrences of each word in all keyword prediction ranges, arrange the count results in descending order, and generate a set of words with decreasing priority. The data records are shown in Table 1.
[0185] Table 1 Data record table
[0186]
[0187] The above experimental data table shows the innovation and advantages of the present invention. First, the data in the table show that the number of words and the number of times the word vector is selected for each keyword in the prediction range are different, indicating that the system can effectively identify and locate related words. The word vector of the keyword "Data" is selected the most times, 15 times, indicating that it appears most frequently in the prediction range and has the strongest relevance. In contrast, the word vector of the keyword "Management" is selected the least times, 5 times, reflecting that its relevance in the prediction range is weaker.
[0188] Compared with traditional methods, the present invention achieves more accurate keyword positioning through coordinate construction and positioning. Traditional information retrieval methods usually rely on keyword matching and Boolean logic, which makes it difficult to fully capture the semantic relationship and contextual information between keywords. The present invention can better understand and represent the relationship between words through technologies such as word vectorization, part-of-speech tagging, Bi-LSTM model and co-occurrence matrix, thereby improving the accuracy and relevance of retrieval.
[0189] Specifically, the Bi-LSTM model of the present invention integrates the contextual information of the sentence, improves the accuracy of part-of-speech tagging, and enables the system to better understand the user's query intent. By calculating the similarity and relevance between the keyword and the most frequent word, the system can accurately locate the position of each keyword in the coordinate axis, ensuring the accuracy and comprehensiveness of the prediction range.
[0190] In addition, the prediction range generation and comprehensive processing steps of the present invention prioritize words by measuring the number of times word vectors are selected, making the search results more relevant and practical. Compared with traditional methods, the present invention can dynamically adapt to different types of queries and provide more intelligent and personalized search services.
[0191] In summary, the present invention has shown significant innovation and advantages in improving the relevance of search results, optimizing priority sorting, providing comprehensive search results and enhancing system intelligence. The data analysis in the embodiments can fully demonstrate the effectiveness and superiority of the present invention in practical applications.
[0192] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.
Claims
1. A retrieval purpose prediction method based on knowledge management, characterized in that: include: Obtain the user's search content and extract keywords from the search content; Coordinate construction of the content in the database; According to the characteristics of the keywords, coordinate the search content; At the coordinate location, generate a predicted range of the retrieval content; synthesizing the contents of the database within the prediction range to generate a prediction for the search purpose; The coordinate construction includes vectorizing the words in the database, calculating the similarity between the word vectors as the horizontal coordinate; calculating the correlation between different words according to the historical training data as the vertical coordinate, constructing the coordinate axis, and determining the position of the word vector in the database in the coordinate axis; Let the word w with the highest frequency in the database be q Defined as the origin, word w is represented by cosine similarity q and other words w p The similarity between sin(w q ,w p ); in, represents the dot product of word vectors, and Represents the norm of the word vector; The correlation between different words is calculated based on historical training data, and the correlation between words is represented by the co-occurrence matrix; let the co-occurrence matrix be C, C(w q ,w p ) represents word w q and word w p The frequency of co-occurrence in historical data; C(w q ,w p )=count(w q ,w p ) Normalize the co-occurrence matrix: Among them, R(w q ,w p ) represents word w q and word w p relevance; Construct the word w in the database p Coordinates: Coordinate(w p )=(sin(w q ,w p ),R(w q ,w p )) Where u represents the index of the word in the database, and m represents the number of words in the database; The coordinate positioning includes calculating the coordinates of each keyword and the coordinate origin w q The similarity and correlation of the keywords are constructed to construct the coordinate information of each keyword in the coordinate axis; Output the coordinates of each keyword and obtain the coordinate set of keywords D = {D1, D2, ..., D m }; Among them, D m Represents the coordinates of the mth keyword; The predicted range of the search content includes, in the coordinate system, a circular area with a radius of r generated with the coordinates of each keyword as the center; Among them, Distance(w c , w p ) indicates the keyword w c and word w p The Euclidean distance in the coordinate axis, (x c ,y c ) indicates the keyword w c The coordinates of (x p ,y p ) represents word w p The coordinates of For each word w p , if the condition is met, it is determined to be within the prediction range; all words w that meet the condition are p Perform set operations to obtain the final word set P within the prediction range: Among them, r represents the standard quantity of the prediction range threshold, M represents the keyword set, and w c Indicates the cth keyword.
2. The method for predicting search purposes based on knowledge management according to claim 1, characterized in that: The search content includes the text or sentence input by the user; The keywords include,segmenting the input sentence S into n independent words; S={w1,w2,...,w n } Among them, S represents the input sentence, {w1, w2, ..., w n } represents the word set after word segmentation, w n Indicates the nth word; Each word w i Convert to the corresponding word vector in, Representation word w i Word vector, Word2Vec(w i ) indicates that the word w is transformed into i Convert to vector; By counting the part of speech of each word in the dictionary in different environments, each word w is generated. i The set of parts of speech {t i1 , t i2 ,…,t ij }; t ij Representation word w i In the dictionary, there may be j-th part of speech; Get the dictionary probability of each word's part of speech from the dictionary library; Among them, P dict (POS(w i ) = t i ) represents word w i Part of speech t i The dictionary probability, count(w i , t i ) represents word w i In the dictionary as part of speech i The number of occurrences of Representation word w i is the number of occurrences of any part of speech, POS(w i ) represents word w i The part-of-speech tag; In each word w i In the corresponding part-of-speech set, based on the dictionary probability, randomly extract the part-of-speech t in the set i ∈{t i1 , t i2 ,…,t ij }, and obtain the part-of-speech tag sequence T = {t1, t2, ..., t n }, and the part-of-speech tag sequence T obtained by random extraction each time is different, until no new part-of-speech tag sequence is generated or the maximum number of extractions is reached; where t i Indicates the part of speech of the i-th word.
3. The method for predicting search purposes based on knowledge management according to claim 2, characterized in that: The keywords also include: k is the kth sequence extracted, t ki The i-th part of speech of the k-th part of speech tag sequence; Use a pre-trained part-of-speech embedding matrix to embed the part-of-speech tag t ki Mapped to the corresponding part-of-speech embedding vector Among them, POS2Vec represents the mapping function from part-of-speech tags to embedded vectors; Combine each part-of-speech sequence with the word vector The sequences are combined and the fitness of each part-of-speech sequence is calculated through the Bi-LSTM layer and the fully connected layer; Forward LSTM: Backward LSTM: Combining the forward and backward hidden states: Calculate the fitness of each part-of-speech sequence: Select the sequence with the highest fitness from the multiple generated part-of-speech sequences as the final part-of-speech tagging result; Among them, T * represents the part-of-speech sequence with the highest fitness; Indicates that among all possible part-of-speech sequences T k Select such that s k The largest sequence;s k represents the fitness score of the k-th part-of-speech sequence; represents the i-th word w in the k-th part-of-speech sequence i The forward LSTM hidden state vector of ; LSTM stands for Long Short-Term Memory Network; Indicates part of speech ki The embedding vector of Represents the concatenation operation of word vector and part-of-speech embedding vector; Represents the forward LSTM hidden state vector of the i-1th word in the kth part-of-speech sequence; represents the i-th word w in the k-th part-of-speech sequence i The backward LSTM hidden state vector of represents the backward LSTM hidden state vector of the i+1th word in the kth part-of-speech sequence; h ki represents the i-th word in the k-th part-of-speech sequence, combining the hidden state vector of the forward and backward LSTM; b s represents the bias vector of the fully connected layer; [...] represents the concatenation operation of the vector; W s Represents the weight matrix of the fully connected layer; Preset the weight of each part of speech, and select the part of speech tag sequence T through the mapping function * , the part-of-speech weight of each word; α i =f(POS(w i )) Among them, α i Representation word w i The weight value of the mapping, f(POS(w i )) represents the label POS(w i )’s mapping; Pass the context information of the sentence to an attention layer to calculate the importance score of each word; b i =softmax(W a h i +b a ) Among them, β i Representation word w i The attention weight W a is the weight matrix of the attention layer; h i Representation word w i Hidden state vector in the Bi-LSTM layer; b a represents the bias vector of the attention layer; softmax represents the normalization function so that the sum of the attention weights of all words is 1; The α of each word i and β i Multiply and output the screening score Score(w i ); Score(in i )=β i ×α i Preset threshold θ to filter keywords; Keywords={w i |Score(w i )>θ} Among them, Keywords represents the vector set of output keywords.
4. The method for predicting search purposes based on knowledge management according to claim 3, characterized in that: The integration of the database content within the prediction range includes matching each word in the database with the corresponding search content, prioritizing the elements in the word set P, and outputting the search information corresponding to each element in turn according to the priority; The priority includes counting the number of times the word vector in the database is selected by the prediction range; assuming that the initial count base of the word vector in the database is 0, p In the prediction range, the word vector in the database is counted plus 1, and all keywords are traversed to obtain the counting result of each element in the word set P; The counting results are arranged from large to small, and a priority ranking is generated one by one according to the ranking of the counting results, and the elements with the same counting results are at the same priority.
5. A retrieval purpose prediction system based on knowledge management using the method according to any one of claims 1 to 4, characterized in that: A collection unit obtains the user's search content and extracts keywords from the search content; A construction unit constructs coordinates of the content in the database; coordinates the searched content according to the characteristics of the keyword; The prediction unit performs approximate changes on the keywords, and generates a prediction range of the search content at the coordinate location according to the change result; and integrates the database content within the prediction range to generate a prediction of the search purpose.
6. A computer device comprising: Memory and processor; The memory stores a computer program, characterized in that when the processor executes the computer program, the steps of the retrieval purpose prediction method based on knowledge management are implemented.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the retrieval purpose prediction method based on knowledge management are implemented.
Citation Information
Patent Citations
Text search method and device
CN114996439A
Method for realizing operation and maintenance knowledge search based on embedded vector
CN118428481A