A related information recommendation system based on natural language processing

By building a related information recommendation system based on natural language processing, using search and click data to analyze user intention distribution, and establish an intention transfer model, the problem of dynamic changes in user needs is solved, and the accuracy and diversity of recommendations are optimized.

CN119577243BActive Publication Date: 2025-09-02JIANGSU QINZHENG INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411623049.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-14
Publication Date
2025-09-02
Estimated Expiration
2044-11-14

AI Technical Summary

Technical Problem

The existing information recommendation system is difficult to effectively handle the dynamic changes of user needs, and the diversity of recommendation results is insufficient, so it is impossible to further optimize the recommendation effect.

Method used

By obtaining the search text with timestamps and click page text, a vocabulary is constructed and search word vectors and click word vectors are generated. The user intention distribution is analyzed using the intent recognition model, an intent transfer model is established, and a historical user intention distribution vector and a transfer matrix is ​​combined with the predicted user intention distribution vector, a candidate recommendation set is generated and the diversity score is calculated, and the best recommendation list is finally generated.

Benefits of technology

Accurate understanding of user intentions and capture dynamic changes is achieved, and the accuracy and diversity of recommendations are improved. The generated recommendation list is both related to user intentions and is diverse.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119577243B_ABST
    Figure CN119577243B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of natural language processing technology, specifically to an association information recommendation system based on natural language processing, including a data acquisition module, an intent recognition module, a dynamic analysis module, an intent prediction module and a recommendation generation module. A vocabulary is established by acquiring search text and click page text, and a search word vector and a click word vector are constructed based on the vocabulary and intent analysis is performed to obtain the user intent distribution vector at each time point; an intent transfer model is constructed to analyze the transfer matrix of the user intent distribution vector between two consecutive time points; the historical user intent distribution vector set and the transfer matrix are combined to calculate the predicted user intent distribution vector; a candidate recommendation set is determined based on the predicted user intent distribution vector, and a recommendation score including a diversity score is calculated to generate the best recommendation list from the candidate recommendation set. The present invention simultaneously takes into account the matching degree of user intent and the diversity of recommendation results, thereby optimizing the recommendation effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of natural language processing, and in particular to a related information recommendation system based on natural language processing. Background Art

[0002] The rapid development of internet technology and the dramatic growth of information have generated massive amounts of search and browsing data online. Accurately understanding user interests and needs from this data is crucial for improving the accuracy of information recommendation systems. In this area, natural language processing technology can deeply understand user interests and needs through semantic analysis of massive amounts of text data, providing intelligent and personalized recommendations and significantly improving recommendation accuracy.

[0003] Currently, mainstream natural language processing technologies used for information recommendation include collaborative filtering recommendation methods and content-based recommendation methods. Collaborative filtering recommendation methods predict content that users are interested in by analyzing user groups with similar behavior patterns, while content-based recommendation methods recommend content with similar characteristics by analyzing the characteristics of content that users have browsed historically. These existing technologies are difficult to effectively handle the dynamic changes in user needs, and the recommendation results lack diversity, making it impossible to further optimize the recommendation effect.

[0004] To this end, a related information recommendation system based on natural language processing is proposed. Summary of the Invention

[0005] The purpose of the present invention is to provide an associative information recommendation system based on natural language processing, which establishes a vocabulary by obtaining search text and click page text, constructs search word vectors and click word vectors based on the vocabulary and performs intent analysis to obtain the user intent distribution vector at each time point; by constructing an intent transfer model, analyzes the transfer matrix of the user intent distribution vector between two consecutive time points; combines the historical user intent distribution vector set and the transfer matrix to calculate the predicted user intent distribution vector; determines a candidate recommendation set based on the predicted user intent distribution vector, calculates the recommendation score including the diversity score, and generates the best recommendation list from the candidate recommendation set.

[0006] To achieve the above object, the present invention provides the following technical solutions:

[0007] A related information recommendation system based on natural language processing, comprising:

[0008] A data acquisition module acquires N search texts with timestamps and M click page texts from the search results, establishes a vocabulary based on the search texts and the click page texts, constructs a search word vector and a click word vector at each time point based on the vocabulary, the search texts, and the click page texts, and obtains a search word vector sequence and a click word vector sequence;

[0009] An intent recognition module constructs an intent recognition model, wherein the intent recognition model is used to analyze the search word vector sequence and the click word vector sequence to obtain a search intent distribution vector and a click intent distribution vector at each time point, and calculate the user intent distribution vector at each time point based on the search intent distribution vector and the click intent distribution vector to obtain a user intent distribution vector sequence;

[0010] A dynamic analysis module constructs an intention transfer model, wherein the intention transfer model is used to analyze the user intention distribution vector sequence and obtain a transfer matrix of the user intention distribution vector between two consecutive time points;

[0011] An intention prediction module constructs a set of historical user intention distribution vectors and calculates a predicted user intention distribution vector based on the set of historical user intention distribution vectors and the transfer matrix;

[0012] A recommendation generation module determines a candidate recommendation set based on the predicted user intent distribution vector, calculates a diversity score based on the candidate recommendation set, calculates a recommendation score based on the diversity score, and generates an optimal recommendation list from the candidate recommendation set based on the recommendation score.

[0013] Preferably, establishing the vocabulary table according to the search text and the click page text includes: performing word segmentation, removing stop words and word standardization on the search text and the click page text, and after processing, aggregating all non-repeated words to form a word set H; constructing the vocabulary table V = {v|v∈H,f(v)≥δ1,f d (v)≥δ2}, where f(v) represents the original word frequency of word v, which is the frequency of occurrence of word v in all the search texts and the click page texts; f d (v) represents the original document frequency of word v, and the original document frequency is the number of texts containing word v in all the search texts and the click page texts; δ1 represents the original word frequency threshold; δ2 represents the original document frequency threshold.

[0014] Preferably, the specific steps of constructing the search word vector and the click word vector at each time point according to the vocabulary include:

[0015] Divide T time windows according to the timestamp of the search text; in the tth time window, include n t The search text and m t The corresponding click page text;

[0016] Constructing the search term vector at the t-th time point includes:

[0017] In the tth time window, calculate the i-th word v in the vocabulary i In n t The search term frequency f is obtained by calculating the frequency of occurrence of the search term in the search text. q (v i );Calculate the i-th word v in the vocabulary i The search document frequency f dq (v i ); The search document frequency is N, and the search text contains the word v i The number of texts; Calculate the i-th element q in the search word vector according to the search word frequency and the search document frequency i =f q (v i )·log(N / f dq (v i )); Traverse each word in the vocabulary and obtain the search word vector q at the tth time point t ={q1,q2,…,q D}, where D represents the number of words in the vocabulary;

[0018] Constructing the click word vector at the t-th time point includes:

[0019] In the tth time window, calculate the i-th word v in the vocabulary i In m t The frequency of occurrence of the click word in the text of the click page is obtained to obtain the click word frequency f c (v i ); Calculate the i-th word v in the vocabulary i Frequency of clicks on documents f dc (v i ); the click document frequency is M the click page text contains the word v i The number of texts; Calculate the i-th element c in the click word vector according to the click word frequency and the click document frequency i =f c (v i )·log(N / f dc (v i )); Traverse each word in the vocabulary and obtain the click word vector c at the tth time pointt ={c1,c2,…,c D}.

[0020] Preferably, all the search word vectors are arranged in chronological order to obtain the search word vector sequence of length T; all the click word vectors are arranged in chronological order to obtain the click word vector sequence of length T; the tth element in the search word vector sequence is the search word vector at the tth time point; the tth element in the click word vector sequence is the click word vector at the tth time point.

[0021] Preferably, the intention recognition model is constructed based on the implicit Dirichlet distribution model; the tth element in the search word vector sequence is analyzed according to the intention recognition model to obtain the search intention distribution vector at the tth time point Analyze the tth element in the click word vector sequence according to the intention recognition model to obtain the click intention distribution vector at the tth time point Calculate the user intention distribution vector at the tth time point based on the search intention distribution vector and the click intention distribution vector Wherein, λ represents a weight parameter; all elements of the search word vector sequence and the click word vector sequence are traversed to obtain the user intention distribution vector sequence.

[0022] Preferably, the training process of the intention transfer model includes:

[0023] S11. Initialize the transfer matrix M=[m ij ],m ij represents the element in the i-th row and j-th column of the transfer matrix, i, j = 1, 2, ..., K, where K represents the number of intentions;

[0024] S12. For the j-th intention, calculate the forward probability of each time point in sequence starting from the first time point to obtain the forward probability at the T-th time point;

[0025] S13. For the i-th intention, reversely calculate the backward probability of each time point from the T-th time point to obtain the backward probability of the first time point;

[0026] S14. Calculating the forward transfer expectation based on the forward probability at the T-th time point;

[0027] S15. Calculating the backward transfer expectation based on the backward probability at the first time point;

[0028] S16. Calculate the element m in the transfer matrix according to the forward transfer expectation and the backward transfer expectation ij , update the transfer matrix;

[0029] S17. Repeat steps S12 to S16 until the difference between the two transfer matrices obtained in two adjacent iterations is less than a preset threshold, thereby obtaining the transfer matrix.

[0030] Preferably, constructing a set of historical user intention distribution vectors, and calculating a predicted user intention distribution vector based on the set of historical user intention distribution vectors and the transfer matrix specifically includes:

[0031] Collecting the user intention distribution vectors at all historical time points to construct the historical user intention distribution vector set;

[0032] Calculate the distribution similarity of the user intention distribution vector at the Tth time point and each historical time point;

[0033] Sort all historical time points according to the distribution similarity from largest to smallest, select the first n historical time points as similar time points, and obtain the next time point of each similar time point to obtain n similar transfer time points;

[0034] Obtaining the user intention distribution vector at the similar transfer time point according to the historical user intention distribution vector set to obtain a historical transfer intention distribution set;

[0035] The predicted user intention distribution vector is calculated based on the historical transfer intention distribution set and the transfer matrix, and the calculation formula is as follows:

[0036]

[0037] in, represents the predicted user intention distribution vector; Represents the user intention distribution vector at the T-th time point; represents the i-th user intention distribution vector in the historical transfer intention distribution set; w1 and w2 represent weights, w1+w2=1; n represents the number of elements in the historical transfer intention distribution set.

[0038] Preferably, determining the candidate recommendation set based on the predicted user intention distribution vector includes: obtaining all pages to be recommended, performing word segmentation, removing stop words and word standardization on the text of the pages to be recommended; constructing a word vector to be recommended for each page to be recommended based on the vocabulary and the processed text; analyzing the word vector to be recommended through the intention recognition model to obtain the intention distribution vector to be recommended; calculating the cosine similarity between each intention distribution vector to be recommended and the predicted user intention distribution vector to obtain a first distribution similarity; sorting the corresponding pages to be recommended in descending order according to the first distribution similarity, and selecting the first m pages to be recommended as the candidate recommendation set.

[0039] Preferably, the diversity score is calculated based on the candidate recommendation set, and the specific steps of calculating the recommendation score in combination with the diversity score include:

[0040] Calculating the intention distribution distance between the to-be-recommended intention distribution vectors corresponding to any two to-be-recommended pages in the candidate recommendation set;

[0041] Calculating a diversity score for each of the to-be-recommended pages in the candidate recommendation set according to the intention distribution distance;

[0042] Calculating the cosine similarity between the to-be-recommended intention distribution vector corresponding to the to-be-recommended page and the predicted user intention distribution vector in the candidate recommendation set to obtain a second distribution similarity for each to-be-recommended page;

[0043] The recommendation score of each of the to-be-recommended pages is calculated by combining the second distribution similarity and the diversity score.

[0044] Preferably, the specific steps of selecting the best recommended page from the candidate recommendation set according to the recommendation score to generate the best recommendation list include:

[0045] S21. Initialize the set of selected recommended pages Setting the target length of the best recommendation list to L;

[0046] S22. Select the page with the highest recommendation score from the candidate recommendation set as the best page to be recommended, add the best page to the selected page to be recommended set, delete it from the candidate recommendation set, and update the candidate recommendation set;

[0047] S23. Calculate the cosine similarity between the recommendation intent distribution vector corresponding to each item to be recommended and the best page to be recommended in the candidate recommendation set to obtain a third distribution similarity, sort the corresponding items to be recommended in descending order of the third distribution similarity, select the first r pages to be recommended and remove them from the candidate recommendation set, and update the candidate recommendation set.

[0048] S24. Update the recommendation score of each of the pages to be recommended in the candidate recommendation set;

[0049] S25. Repeat steps S22 to S24 until the number of pages to be recommended in the selected set of pages to be recommended is equal to L;

[0050] S26. Obtain first distribution similarities of the pages to be recommended in the selected set of pages to be recommended, sort the pages to be recommended in the selected set of pages to be recommended in descending order of the first distribution similarities, and obtain an optimal recommendation list.

[0051] Compared with the prior art, the present invention has the following beneficial effects:

[0052] 1. The present invention first calculates the user intention distribution vector by combining the search topic distribution vector and the click topic distribution vector, comprehensively capturing the user intention and improving the accuracy of understanding the user intention; then, by constructing an intention transfer model and iteratively calculating the forward probability and backward probability, the transfer matrix of the user intention distribution vector between consecutive time points is obtained, thereby achieving accurate modeling of the user intention change; the present invention can accurately grasp the dynamic change characteristics of user intention and optimize the recommendation effect.

[0053] 2. The present invention accurately predicts future user intentions by combining a set of historical user intention distribution vectors. First, the similarity between the user intention distribution vectors of the current time point and the historical time point is calculated, and the n most similar historical time points are selected as similar time points. Then, the next time point of these n similar time points is obtained to form a set of similar transfer time points, and the user intention distribution vectors corresponding to these time points are obtained to form a historical transfer topic distribution set. When predicting, the result of the current user intention distribution vector transformed by the transfer matrix and the vectors in the historical transfer topic distribution set are comprehensively considered, which not only takes into account the continuity characteristics of user interests, but also utilizes similar contextual information in historical data, making the prediction results more accurate and reliable, thereby optimizing the recommendation effect.

[0054] 3. The present invention ensures the relevance of recommendation results to user intent while focusing on the diversity of recommendation results. First, based on the predicted user intent distribution vector, the distribution similarity between the page to be recommended and the user intent is calculated, and the m most relevant pages are selected to form a candidate recommendation set. Then, by calculating the intent distribution distance between any two pages in the candidate set, the diversity score of each page to be recommended is evaluated, and the recommendation score is calculated by combining the distribution similarity and the diversity score, achieving a flexible trade-off between relevance and diversity. Finally, an iterative screening method is used to gradually construct a recommendation list. Each time, the page to be recommended with the highest recommendation score is selected and candidates that are too similar to it are deleted, ensuring that the final recommendation list is both relevant to the user intent and diverse, and can optimize the recommendation effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] Figure 1 A schematic diagram of the structure of a related information recommendation system based on natural language processing provided by an embodiment of the present invention;

[0056] Figure 2A schematic diagram of the training process of the intent transfer model provided in an embodiment of the present invention;

[0057] Figure 3 A schematic diagram of the process of generating the best recommendation list provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0058] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0059] Example 1

[0060] A social platform is mainly used to share travel experiences and query travel guides. When users plan their travels, they will search and view travel guides on the platform according to their needs. In order to improve the accuracy and diversity of the user homepage recommendations and meet user needs, the social platform uses a related information recommendation system based on natural language processing. Figure 1 ,include:

[0061] A data acquisition module acquires N search texts with timestamps and M click page texts from the search results, establishes a vocabulary based on the search texts and the click page texts, constructs a search word vector and a click word vector at each time point based on the vocabulary, the search texts, and the click page texts, and obtains a search word vector sequence and a click word vector sequence;

[0062] An intent recognition module constructs an intent recognition model, wherein the intent recognition model is used to analyze the search word vector sequence and the click word vector sequence to obtain a search intent distribution vector and a click intent distribution vector at each time point, and calculate the user intent distribution vector at each time point based on the search intent distribution vector and the click intent distribution vector to obtain a user intent distribution vector sequence;

[0063] A dynamic analysis module constructs an intention transfer model, wherein the intention transfer model is used to analyze the user intention distribution vector sequence and obtain a transfer matrix of the user intention distribution vector between two consecutive time points;

[0064] An intention prediction module constructs a set of historical user intention distribution vectors and calculates a predicted user intention distribution vector based on the set of historical user intention distribution vectors and the transfer matrix;

[0065] A recommendation generation module determines a candidate recommendation set based on the predicted user intent distribution vector, calculates a diversity score based on the candidate recommendation set, calculates a recommendation score based on the diversity score, and generates an optimal recommendation list from the candidate recommendation set based on the recommendation score.

[0066] The data acquisition module processes the search text and click page text to construct a standardized word vector sequence, providing a standardized data basis for subsequent analysis; the intent recognition module analyzes the search word vector sequence and the click word vector sequence, and fuses them to obtain the user intention distribution vector, thereby achieving a comprehensive understanding of user needs; the dynamic analysis module captures the evolution of user intentions by establishing an intention transfer model, providing a theoretical basis for intention prediction; the intention prediction module uses historical data and transfer matrices to accurately predict the user's future intention distribution; the recommendation generation module considers diversity while ensuring relevance and generates the optimal recommendation list; through the collaborative work of the five modules, personalized and diversified recommendation services are provided to users.

[0067] In the embodiment of the present application, the clicked page text is the title text of the page clicked by the user in the search results; Table 1 shows part of the user's search text and clicked page text data.

[0068] Table 1 Search text and click page text

[0069]

[0070] Furthermore, establishing the vocabulary table based on the search text and the click page text includes: performing word segmentation, removing stop words and word standardization on the search text and the click page text, and after processing, aggregating all non-repeated words to form a word set H; constructing the vocabulary table V = {v|v∈H,f(v)≥δ1,f d (v)≥δ2}, where f(v) represents the original word frequency of word v, which is the frequency of occurrence of word v in all the search texts and the click page texts; f d (v) represents the original document frequency of word v, which is the frequency of all the search texts and the click page texts containing word v. i δ1 represents the original word frequency threshold; δ2 represents the original document frequency threshold.

[0071] Through word segmentation, stop word removal, and word standardization, as well as the introduction of original word frequency thresholds and original document frequency thresholds for screening, a high-quality vocabulary can be constructed, removing low-frequency invalid words and overly common words, thereby improving the accuracy and efficiency of subsequent text vectorization.

[0072] Furthermore, the specific steps of constructing the search word vector and the click word vector at each time point according to the vocabulary include:

[0073] Divide T time windows according to the timestamp of the search text; in the tth time window, include n t The search text and m t The corresponding click page text,

[0074] Constructing the search term vector at the t-th time point includes:

[0075] In the tth time window, calculate the i-th word v in the vocabulary i In n t The search term frequency f is obtained by calculating the frequency of occurrence of the search term in the search text. q (v i ); Calculate the i-th word v in the vocabulary i The search document frequency f dq (v i ); The search document frequency is N, and the search text contains the word v i The number of texts; Calculate the i-th element q in the search word vector according to the search word frequency and the search document frequency i =f q (v i )·log(N / f dq (v i )); Traverse each word in the vocabulary and obtain the search word vector q at the tth time point t ={q1,q2,…,q D}, where D represents the number of words in the vocabulary;

[0076] Constructing the click word vector at the t-th time point includes:

[0077] In the tth time window, calculate the i-th word v in the vocabulary i In m t The frequency of occurrence of the click word in the text of the click page is obtained to obtain the click word frequency f c (v i ); Calculate the i-th word v in the vocabulary i Frequency of clicks on documents f dc (v i ); the click document frequency is M the click page text contains the word v i The number of texts; Calculate the i-th element c in the click word vector according to the click word frequency and the click document frequency i =f c (vi )·log(N / f dc (v i )); Traverse each word in the vocabulary and obtain the click word vector c at the tth time point t ={c1,c2,…,c D}.

[0078] First, the time window is divided, and then the search word vector and click word vector at each time point are constructed by combining the word frequency and document frequency. This not only retains the important information of the words in the text, but also captures the temporal characteristics of the data, providing a high-quality data foundation for subsequent intent distribution analysis.

[0079] Furthermore, all the search word vectors are arranged in chronological order to obtain the search word vector sequence of length T; all the click word vectors are arranged in chronological order to obtain the click word vector sequence of length T; the tth element in the search word vector sequence is the search word vector at the tth time point; the tth element in the click word vector sequence is the click word vector at the tth time point.

[0080] By arranging the search word vectors and click word vectors in chronological order, a standardized vector sequence is formed, providing a structured data foundation for subsequent time series analysis and intent transfer modeling.

[0081] Furthermore, the intention recognition model is constructed based on the implicit Dirichlet distribution model; the tth element in the search word vector sequence is analyzed according to the intention recognition model to obtain the search intention distribution vector at the tth time point Analyze the tth element in the click word vector sequence according to the intention recognition model to obtain the click intention distribution vector at the tth time point Calculate the user intention distribution vector at the tth time point based on the search intention distribution vector and the click intention distribution vector Wherein, λ represents a weight parameter; all elements of the search word vector sequence and the click word vector sequence are traversed to obtain the user intention distribution vector sequence.

[0082] By adopting the latent Dirichlet distribution model and balancing the influence of search and click behaviors through weight parameters, we can accurately characterize the distribution of user intentions and understand users' actual concerns more accurately.

[0083] Table 2 Probability values ​​under user intention distribution vector

[0084] Time point Attractions Culinary Experience Transportation and accommodation Cultural Experience Price Budget T-3 0.35 0.15 0.30 0.10 0.10 T-2 0.20 0.40 0.20 0.10 0.10 T-1 0.45 0.10 0.25 0.10 0.10 T 0.25 0.15 0.20 0.30 0.10

[0085] In the embodiment of the present application, each time window includes 1 search text, the 4 timestamps in Table 1 correspond to the 4 time points in Table 2, and the Tth time window includes 1 search text and 2 click page texts; based on the user's search text and click page text, 5 intentions are set, namely, scenic spot sightseeing, food experience, transportation and accommodation, cultural experience, and price budget; Table 2 shows the probability value of each intention under the user intention distribution vector at the 4 time points.

[0086] Further, see Figure 2 , the training process of the intention transfer model includes:

[0087] S11. Initialize the transfer matrix M=[m ij ],m ij Represents the element in the i-th row and j-th column of the transfer matrix, 0≤m ij ≤1, K represents the number of intentions;

[0088] S12. For the jth intention, calculate the forward probability of each time point in sequence from the first time point Get the forward probability α at the Tth time point T (j); where α t (i) represents the forward probability of the i-th intention at the t-th time point; K represents the number of intentions; Represents the user intention distribution vector at the t+1th time point The probability value of intention j; the forward probability at the first time point in, Represents the user intention distribution vector at the first time point The probability value of intention j;

[0089] S13. For the i-th intention, reversely calculate the backward probability of each time point from the T-th time point Get the backward probability β1(i) at the first time point; where β t+1 (j) represents the backward probability of the j-th intention at the t+1-th time point;

[0090] S14. Calculate the forward transfer expectation based on the forward probability at the Tth time point

[0091] S15. Calculate the backward transfer expectation based on the backward probability at the first time point

[0092] S16. Calculate the element m in the transfer matrix according to the forward transfer expectation and the backward transfer expectation ij =E1·E2, update the transfer matrix;

[0093] S17. Repeat steps S12 to S16 until the difference between the two transfer matrices obtained in two adjacent iterations is less than a preset threshold, thereby obtaining the transfer matrix.

[0094] Through the iterative calculation of forward probability and backward probability, an accurate topic transfer matrix is ​​obtained, which can effectively capture the law of user intention distribution evolution over time and improve the accuracy of user intention prediction.

[0095] Furthermore, constructing a set of historical user intention distribution vectors, and calculating a predicted user intention distribution vector based on the set of historical user intention distribution vectors and the transfer matrix specifically includes:

[0096] Collecting the user intention distribution vectors at all historical time points to construct the historical user intention distribution vector set;

[0097] Calculate the distribution similarity of the user intention distribution vector at the Tth time point and each historical time point;

[0098] Sort all historical time points according to the distribution similarity from largest to smallest, select the first n historical time points as similar time points, and obtain the next time point of each similar time point to obtain n similar transfer time points;

[0099] Obtaining the user intention distribution vector at the similar transfer time point according to the historical user intention distribution vector set to obtain a historical transfer intention distribution set;

[0100] The predicted user intention distribution vector is calculated based on the historical transfer intention distribution set and the transfer matrix, and the calculation formula is as follows:

[0101]

[0102] in, represents the predicted user intention distribution vector; represents the user intention distribution vector at the Tth time point; M represents the transfer matrix; represents the i-th user intention distribution vector in the historical transfer intention distribution set; w1 and w2 represent weights, w1+w2=1; n represents the number of elements in the historical transfer intention distribution set.

[0103] Through the analysis of historical similar time points and the application of transfer matrix, historical similar situations and current intention distribution are comprehensively considered, making the prediction results more reliable.

[0104] Furthermore, determining the candidate recommendation set based on the predicted user intention distribution vector includes: obtaining all pages to be recommended, performing word segmentation, stop word removal and word standardization on the text of the pages to be recommended; constructing a word vector to be recommended for each page to be recommended based on the vocabulary and the processed text; analyzing the word vector to be recommended through the intention recognition model to obtain the intention distribution vector to be recommended; calculating the cosine similarity between each intention distribution vector to be recommended and the predicted user intention distribution vector to obtain a first distribution similarity; sorting the corresponding pages to be recommended in descending order according to the first distribution similarity, and selecting the first m pages to be recommended as the candidate recommendation set.

[0105] By calculating and sorting the similarity of intent distribution, we ensure that the selected candidate recommendation items are highly relevant to the predicted user intent, thereby improving the accuracy of the recommendation.

[0106] Furthermore, the diversity score is calculated based on the candidate recommendation set, and the specific steps of calculating the recommendation score in combination with the diversity score include:

[0107] Calculate the intention distribution distance between the intention distribution vectors of any two pages to be recommended in the candidate recommendation set. The calculation formula is as follows:

[0108]

[0109] Among them, dist(u1,u2) represents the distribution vector of the recommended intention corresponding to the recommended pages u1 and u2 and The intention distribution distance between them; and Respectively and The probability value of the kth intention in ;

[0110] The diversity score of each to-be-recommended page in the candidate recommendation set is calculated based on the intention distribution distance, and the calculation formula is as follows:

[0111] div(p)=min p′∈S {dist(p,p′)};

[0112] Where div(p) represents the diversity score of the page to be recommended p in the candidate recommendation set; dist(p, p′) represents the intention distribution distance between the page to be recommended p and the page to be recommended p′; S represents the set of selected pages to be recommended; if S is empty, div(p) = 1;

[0113] Calculating the cosine similarity between the to-be-recommended intention distribution vector corresponding to the to-be-recommended page and the predicted user intention distribution vector in the candidate recommendation set to obtain a second distribution similarity for each to-be-recommended page;

[0114] The recommendation score score(p)=λ·sim(p)+(1-λ)·div(p) of each page to be recommended is calculated by combining the second distribution similarity and the diversity score, where λ represents an adjustable balance parameter and sim(p) represents the second distribution similarity of the page to be recommended p.

[0115] By calculating the differences in intent distribution between pages to be recommended, the degree of content difference can be accurately assessed; the diversity score and distribution similarity are weighted and fused, and the influence of the selected page set is considered in the calculation process, ensuring that the recommendation results are relevant to the predicted user intent while ensuring that the newly selected pages can maximize the diversity of the recommendation results.

[0116] Further, see Figure 3 The specific steps of selecting the best recommended page from the candidate recommendation set according to the recommendation score to generate the best recommendation list include:

[0117] S21. Initialize the set of selected recommended pages Setting the target length of the best recommendation list to L;

[0118] S22. Select the page with the highest recommendation score from the candidate recommendation set as the best page to be recommended, add the best page to the selected page to be recommended set, delete it from the candidate recommendation set, and update the candidate recommendation set;

[0119] S23. Calculate the cosine similarity between the recommendation intent distribution vector corresponding to each item to be recommended and the best page to be recommended in the candidate recommendation set to obtain a third distribution similarity, sort the corresponding items to be recommended in descending order of the third distribution similarity, select the first r pages to be recommended and remove them from the candidate recommendation set, and update the candidate recommendation set.

[0120] S24. Update the recommendation score of each of the pages to be recommended in the candidate recommendation set;

[0121] S25. Repeat steps S22 to S24 until the number of pages to be recommended in the selected set of pages to be recommended is equal to L;

[0122] S26. Obtain first distribution similarities of the pages to be recommended in the selected set of pages to be recommended, sort the pages to be recommended in the selected set of pages to be recommended in descending order of the first distribution similarities, and obtain an optimal recommendation list.

[0123] An iterative screening strategy is adopted to select the recommended page with the highest recommendation score each time, ensuring the local optimal selection; the recommendation list is generated by dynamically updating the candidate recommendation set, which not only ensures the relevance of the recommended items to the user's interests, but also maintains the diversity within the recommendation results, and can provide better recommendation results.

[0124] Example 2

[0125] An e-commerce platform has applied a related information recommendation system based on natural language processing provided by the present invention, including:

[0126] A data acquisition module acquires N search texts with timestamps and M click page texts from the search results, establishes a vocabulary based on the search texts and the click page texts, constructs a search word vector and a click word vector at each time point based on the vocabulary, the search texts, and the click page texts, and obtains a search word vector sequence and a click word vector sequence;

[0127] An intent recognition module constructs an intent recognition model, wherein the intent recognition model is used to analyze the search word vector sequence and the click word vector sequence to obtain a search intent distribution vector and a click intent distribution vector at each time point, and calculate the user intent distribution vector at each time point based on the search intent distribution vector and the click intent distribution vector to obtain a user intent distribution vector sequence;

[0128] A dynamic analysis module constructs an intention transfer model, wherein the intention transfer model is used to analyze the user intention distribution vector sequence and obtain a transfer matrix of the user intention distribution vector between two consecutive time points;

[0129] An intention prediction module constructs a set of historical user intention distribution vectors and calculates a predicted user intention distribution vector based on the set of historical user intention distribution vectors and the transfer matrix;

[0130] A recommendation generation module determines a candidate recommendation set based on the predicted user intent distribution vector, calculates a diversity score based on the candidate recommendation set, calculates a recommendation score based on the diversity score, and generates an optimal recommendation list from the candidate recommendation set based on the recommendation score.

[0131] Table 3 shows some of the users’ search texts and clicked page text data.

[0132] Table 3 Search text and click page text

[0133]

[0134] Furthermore, establishing the vocabulary table based on the search text and the click page text includes: performing word segmentation, removing stop words and word standardization on the search text and the click page text, and after processing, aggregating all non-repeated words to form a word set H; constructing the vocabulary table V = {v|v∈H,f(v)≥δ1,f d (v)≥δ2}, where f(v) represents the original word frequency of word v, which is the frequency of occurrence of word v in all the search texts and the click page texts; f d (v) represents the original document frequency of word v, and the original document frequency is the number of texts containing word v in all the search texts and the click page texts; δ1 represents the original word frequency threshold; δ2 represents the original document frequency threshold.

[0135] Furthermore, the specific steps of constructing the search word vector and the click word vector at each time point according to the vocabulary include:

[0136] Divide T time windows according to the timestamp of the search text; in the tth time window, include n t The search text and m t The corresponding click page text;

[0137] Constructing the search term vector at the t-th time point includes:

[0138] In the tth time window, calculate the i-th word v in the vocabulary i In n t The search term frequency f is obtained by calculating the frequency of occurrence of the search term in the search text. q (v i ); Calculate the i-th word v in the vocabulary i The search document frequency f dq (v i ); The search document frequency is N, and the search text contains the word v i The number of texts; Calculate the i-th element q in the search word vector according to the search word frequency and the search document frequency i =f q (v i )·log(N / f dq (v i )); Traverse each word in the vocabulary and obtain the search word vector q at the tth time point t ={q1,q2,…,q D}, where D represents the number of words in the vocabulary;

[0139] Constructing the click word vector at the t-th time point includes:

[0140] In the tth time window, calculate the i-th word v in the vocabulary i In m t The frequency of occurrence of the click word in the text of the click page is obtained to obtain the click word frequency f c (v i ); Calculate the i-th word v in the vocabulary i Frequency of clicks on documents f dc (v i ); the click document frequency is M the click page text contains the word v i The number of texts; Calculate the i-th element c in the click word vector according to the click word frequency and the click document frequency i =f c (v i )·log(N / f dc (v i )); Traverse each word in the vocabulary and obtain the click word vector c at the tth time point t ={c1,c2,…,c D}.

[0141] Furthermore, all the search word vectors are arranged in chronological order to obtain the search word vector sequence of length T; all the click word vectors are arranged in chronological order to obtain the click word vector sequence of length T; the tth element in the search word vector sequence is the search word vector at the tth time point; the tth element in the click word vector sequence is the click word vector at the tth time point.

[0142] Furthermore, the intention recognition model is constructed based on the implicit Dirichlet distribution model; the tth element in the search word vector sequence is analyzed according to the intention recognition model to obtain the search intention distribution vector at the tth time point Analyze the tth element in the click word vector sequence according to the intention recognition model to obtain the click intention distribution vector at the tth time point Calculate the user intention distribution vector at the tth time point based on the search intention distribution vector and the click intention distribution vector Wherein, λ represents a weight parameter; all elements of the search word vector sequence and the click word vector sequence are traversed to obtain the user intention distribution vector sequence.

[0143] Furthermore, the training process of the intent transfer model includes:

[0144] S11. Initialize the transfer matrix M=[m ij ],m ij represents the element in the i-th row and j-th column of the transfer matrix, i, j = 1, 2, ..., K, where K represents the number of intentions;

[0145] S12. For the j-th intention, calculate the forward probability of each time point in sequence starting from the first time point to obtain the forward probability at the T-th time point;

[0146] S13. For the i-th intention, reversely calculate the backward probability of each time point from the T-th time point to obtain the backward probability of the first time point;

[0147] S14. Calculating the forward transfer expectation based on the forward probability at the T-th time point;

[0148] S15. Calculating the backward transfer expectation based on the backward probability at the first time point;

[0149] S16. Calculate the element m in the transfer matrix according to the forward transfer expectation and the backward transfer expectation ij , update the transfer matrix;

[0150] S17. Repeat steps S12 to S16 until the difference between the two transfer matrices obtained in two adjacent iterations is less than a preset threshold, thereby obtaining the transfer matrix.

[0151] Furthermore, constructing a set of historical user intention distribution vectors, and calculating a predicted user intention distribution vector based on the set of historical user intention distribution vectors and the transfer matrix specifically includes:

[0152] Collecting the user intention distribution vectors at all historical time points to construct the historical user intention distribution vector set;

[0153] Calculate the distribution similarity of the user intention distribution vector at the Tth time point and each historical time point;

[0154] Sort all historical time points according to the distribution similarity from largest to smallest, select the first n historical time points as similar time points, and obtain the next time point of each similar time point to obtain n similar transfer time points;

[0155] Obtaining the user intention distribution vector at the similar transfer time point according to the historical user intention distribution vector set to obtain a historical transfer intention distribution set;

[0156] The predicted user intention distribution vector is calculated based on the historical transfer intention distribution set and the transfer matrix, and the calculation formula is as follows:

[0157]

[0158] in, represents the predicted user intention distribution vector; Represents the user intention distribution vector at the T-th time point; represents the i-th user intention distribution vector in the historical transfer intention distribution set; w1 and w2 represent weights, w1+w2=1; n represents the number of elements in the historical transfer intention distribution set.

[0159] Furthermore, determining the candidate recommendation set based on the predicted user intention distribution vector includes: obtaining all pages to be recommended, performing word segmentation, stop word removal and word standardization on the text of the pages to be recommended; constructing a word vector to be recommended for each page to be recommended based on the vocabulary and the processed text; analyzing the word vector to be recommended through the intention recognition model to obtain the intention distribution vector to be recommended; calculating the cosine similarity between each intention distribution vector to be recommended and the predicted user intention distribution vector to obtain a first distribution similarity; sorting the corresponding pages to be recommended in descending order according to the first distribution similarity, and selecting the first m pages to be recommended as the candidate recommendation set.

[0160] Furthermore, the diversity score is calculated based on the candidate recommendation set, and the specific steps of calculating the recommendation score in combination with the diversity score include:

[0161] Calculating the intention distribution distance between the to-be-recommended intention distribution vectors corresponding to any two to-be-recommended pages in the candidate recommendation set;

[0162] Calculating a diversity score for each of the to-be-recommended pages in the candidate recommendation set according to the intention distribution distance;

[0163] Calculating the cosine similarity between the to-be-recommended intention distribution vector corresponding to the to-be-recommended page and the predicted user intention distribution vector in the candidate recommendation set to obtain a second distribution similarity for each to-be-recommended page;

[0164] The recommendation score of each of the to-be-recommended pages is calculated by combining the second distribution similarity and the diversity score.

[0165] Furthermore, the specific steps of selecting the best recommended page from the candidate recommendation set according to the recommendation score to generate the best recommendation list include:

[0166] S21. Initialize the set of selected recommended pages Setting the target length of the best recommendation list to L;

[0167] S22. Select the page with the highest recommendation score from the candidate recommendation set as the best page to be recommended, add the best page to the selected page to be recommended set, delete it from the candidate recommendation set, and update the candidate recommendation set;

[0168] S23. Calculate the cosine similarity between the recommendation intent distribution vector corresponding to each item to be recommended and the best page to be recommended in the candidate recommendation set to obtain a third distribution similarity, sort the corresponding items to be recommended in descending order of the third distribution similarity, select the first r pages to be recommended and remove them from the candidate recommendation set, and update the candidate recommendation set.

[0169] S24. Update the recommendation score of each of the pages to be recommended in the candidate recommendation set;

[0170] S25. Repeat steps S22 to S24 until the number of pages to be recommended in the selected set of pages to be recommended is equal to L;

[0171] S26. Obtain first distribution similarities of the pages to be recommended in the selected set of pages to be recommended, sort the pages to be recommended in the selected set of pages to be recommended in descending order of the first distribution similarities, and obtain an optimal recommendation list.

[0172] While embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions, and variations may be made to these embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the appended claims and their equivalents.

Claims

1. A related information recommendation system based on natural language processing, characterized in that: include: Data acquisition module, obtains data with timestamp Search text and search results click page text, establish a vocabulary based on the search text and the click page text, construct a search word vector and a click word vector at each time point based on the vocabulary, the search text and the click page text, and obtain a search word vector sequence and a click word vector sequence; An intent recognition module constructs an intent recognition model, wherein the intent recognition model is used to analyze the search word vector sequence and the click word vector sequence to obtain a search intent distribution vector and a click intent distribution vector at each time point, and calculate the user intent distribution vector at each time point based on the search intent distribution vector and the click intent distribution vector to obtain a user intent distribution vector sequence; A dynamic analysis module constructs an intention transfer model, wherein the intention transfer model is used to analyze the user intention distribution vector sequence and obtain a transfer matrix of the user intention distribution vector between two consecutive time points; The training process of the intent transfer model includes: S11. Initialize the transfer matrix , Indicates the first Rank Elements of the column, , , , Indicates the number of intentions; S12. For Intentions, calculate the forward probability of each time point in sequence from the first time point , get the first The forward probability at a time point ;in, Indicates the The intention is The forward probability at a time point; Indicates the number of intentions; Indicates the The user intention distribution vector at time point Intention The probability value of the first time point; the forward probability ,in, Represents the user intention distribution vector at the first time point Intention The probability value of S13. For the Intention, from The backward probability of each time point is calculated reversely to obtain the backward probability of the first time point. ;in, Indicates the The intention is The backward probability at a time point; S14. According to The forward probability at each time point is used to calculate the forward transfer expectation ; S15. Calculate the backward transfer expectation based on the backward probability at the first time point ; S16. Calculate the elements in the transfer matrix according to the forward transfer expectation and the backward transfer expectation , update the transfer matrix; S17. Repeat steps S12 to S16 until the difference between the two transfer matrices obtained in two adjacent iterations is less than a preset threshold, thereby obtaining the transfer matrix; An intention prediction module constructs a set of historical user intention distribution vectors and calculates a predicted user intention distribution vector based on the set of historical user intention distribution vectors and the transfer matrix; A recommendation generation module determines a candidate recommendation set based on the predicted user intent distribution vector, calculates a diversity score based on the candidate recommendation set, calculates a recommendation score based on the diversity score, and generates an optimal recommendation list from the candidate recommendation set based on the recommendation score.

2. The natural language processing-based recommendation system for related information according to claim 1, characterized in that: Establishing the vocabulary based on the search text and the click page text includes: performing word segmentation, removing stop words and word standardization on the search text and the click page text, and after processing, aggregating all non-repeated words to form a word set ; Build the vocabulary ,in, Expressive words The original word frequency of the word The frequency of occurrence in all the search texts and the click page texts; Expressive words The original document frequency is the frequency of the words in all the search texts and the click page texts. The number of texts; represents the original word frequency threshold; Indicates the original document frequency threshold.

3. The natural language processing-based related information recommendation system according to claim 1, characterized in that: The specific steps of constructing the search word vector and the click word vector at each time point according to the vocabulary include: Divide by the timestamp of the search text time window; in the time windows, including The search text and The corresponding click page text; Build the The search word vector at each time point includes: In the time window, calculate the first words exist The frequency of occurrence of the search word in the search text is obtained Calculate the first words Frequency of search documents ; The search document frequency is The search text contains the word The number of texts; Calculate the first in the search word vector according to the search word frequency and the search document frequency Elements ; Traverse each word in the vocabulary and get the first The search word vector at a time point ,in, Indicates the number of words in the vocabulary; Build the The click word vector at a time point includes: In the time window, calculate the first words exist The click word frequency is obtained by calculating the frequency of occurrence of the click word in the text of the click page Calculate the first words Frequency of document clicks ; The frequency of clicking on the document is The text of the clicked page contains the word The number of texts; Calculate the first in the click word vector according to the click word frequency and the click document frequency Elements ; Traverse each word in the vocabulary and get the first The click word vector at a time point .

4. The natural language processing-based related information recommendation system according to claim 1, characterized in that: Arrange all the search word vectors in chronological order to obtain a length of The search word vector sequence; arrange all the click word vectors in chronological order to obtain a length of The click word vector sequence of the search word vector sequence The element is The search word vector at a time point; the first in the click word vector sequence The element is The click word vector at a time point.

5. The natural language processing-based related information recommendation system according to claim 1, characterized in that: The intention recognition model is constructed based on the implicit Dirichlet distribution model; the first elements, and get the The search intention distribution vector at a time point Analyze the first word in the click word vector sequence according to the intention recognition model elements, and get the The click intention distribution vector at each time point Calculate the first The user intention distribution vector at time point in, Represents a weight parameter; traverse all elements of the search word vector sequence and the click word vector sequence to obtain the user intention distribution vector sequence.

6. The natural language processing-based related information recommendation system according to claim 1, characterized in that: Constructing a set of historical user intention distribution vectors, and calculating a predicted user intention distribution vector based on the set of historical user intention distribution vectors and the transfer matrix specifically includes: Collecting the user intention distribution vectors at all historical time points to construct the historical user intention distribution vector set; Calculate the The distribution similarity of the user intention distribution vector at each time point and each historical time point; Sort all historical time points in descending order according to the distribution similarity, and select the previous historical time points as similar time points, and obtaining the next time point of each similar time point. Similar transfer time points; Obtaining the user intention distribution vector at the similar transfer time point according to the historical user intention distribution vector set to obtain a historical transfer intention distribution set; The predicted user intention distribution vector is calculated based on the historical transfer intention distribution set and the transfer matrix, and the calculation formula is as follows: ; in, represents the predicted user intention distribution vector; Indicates the The user intention distribution vector at a time point; represents the first The user intention distribution vector; and represents the weight, ; Indicates the number of elements in the historical transfer intention distribution set.

7. The natural language processing-based related information recommendation system according to claim 1, characterized in that: Determining a candidate recommendation set based on the predicted user intention distribution vector includes: obtaining all pages to be recommended, performing word segmentation, removing stop words and normalizing the text of the pages to be recommended; constructing a word vector to be recommended for each page to be recommended based on the vocabulary and the processed text; analyzing the word vector to be recommended by the intention recognition model to obtain an intention distribution vector to be recommended; calculating the cosine similarity between each intention distribution vector to be recommended and the predicted user intention distribution vector to obtain a first distribution similarity; sorting the corresponding pages to be recommended in descending order according to the first distribution similarity, and selecting the top pages. The pages to be recommended are used as the candidate recommendation set.

8. The natural language processing-based related information recommendation system according to claim 1, characterized in that: Calculating the diversity score according to the candidate recommendation set and calculating the recommendation score in combination with the diversity score include: Calculating the intention distribution distance between the to-be-recommended intention distribution vectors corresponding to any two to-be-recommended pages in the candidate recommendation set; Calculating a diversity score for each of the to-be-recommended pages in the candidate recommendation set according to the intention distribution distance; Calculating the cosine similarity between the to-be-recommended intention distribution vector corresponding to the to-be-recommended page and the predicted user intention distribution vector in the candidate recommendation set to obtain a second distribution similarity for each to-be-recommended page; The recommendation score of each of the to-be-recommended pages is calculated by combining the second distribution similarity and the diversity score.

9. The natural language processing-based related information recommendation system according to claim 1, characterized in that: The specific steps of selecting the best recommended page from the candidate recommendation set according to the recommendation score to generate the best recommendation list include: S21. Initialize the set of selected recommended pages , set the target length of the best recommendation list to ; S22. Select the page with the highest recommendation score from the candidate recommendation set as the best page to be recommended, add the best page to be recommended to the selected page to be recommended set, delete it from the candidate recommendation set, and update the candidate recommendation set; S23. Calculate the cosine similarity between each item to be recommended and the recommended intention distribution vector corresponding to the best recommended page in the candidate recommendation set, obtain the third distribution similarity, sort the corresponding items to be recommended in descending order according to the third distribution similarity, and select the top The to-be-recommended pages are deleted from the candidate recommendation set, and the candidate recommendation set is updated; S24. Update the recommendation score of each of the pages to be recommended in the candidate recommendation set; S25. Repeat steps S22 to S24 until the number of pages to be recommended in the selected set of pages to be recommended equals ; S26. Obtain first distribution similarities of the pages to be recommended in the selected set of pages to be recommended, sort the pages to be recommended in the selected set of pages to be recommended in descending order of the first distribution similarities, and obtain an optimal recommendation list.

Citation Information

Patent Citations

  • Service recommendation method and system based on transfer learning

    CN113342963A

  • Time-based directional attention recommendation system and method

    CN115129965A