Keyword recommendation method based on news headline
Through the keyword recommendation method based on news titles, combined with user historical browsing records and recent hot titles, the word correlation degree and the part-of-speech level are calculated, which solves the problem of insufficient recommendation depth, breadth and real-time performance in the existing technology, and achieves more accurate and real-time keyword recommendations.
Patent Information
- Application Number
- CN202411764760.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-04
- Publication Date
- 2025-03-28
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing keyword recommendation technology cannot effectively establish connections with real-time hot events, resulting in insufficient depth, breadth and real-time performance of recommendations, affecting user experience.
The keyword recommendation method based on news titles is adopted, and by collecting users' historical browsing records and recent online news titles and Weibo hot search titles, data preprocessing is performed, word correlation is calculated, part-of-speech level and calculation weight are set, and keyword recommendation collection is finally generated.
It improves the real-time and accuracy of keyword recommendations, meets users' search habits and browsing content needs, and enhances users' favorability and trust.
Smart Images

Figure CN119721031A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of data analysis and processing, and in particular relates to a keyword recommendation method based on news titles. Background Art
[0002] The rapid rise of the Internet has brought great convenience to people's lives, but it has also made the problem of information overload increasingly serious, which has increased the difficulty for Internet users to obtain useful information. In order to match user search content and interests, reduce unnecessary browsing time, and optimize user experience, selecting appropriate keywords has become a necessary means to attract users. Most of the current keyword recommendation technologies recommend or generate related words based on user search records, and cannot establish connections with real-time hot events, resulting in insufficient depth, breadth, and real-time nature of recommendations, which affects users' keyword recommendation experience. Summary of the invention
[0003] News titles, Weibo hot searches, etc. are all refinements and summaries of current hot events. In order to solve the above problems, the present invention proposes a keyword recommendation method based on news titles. The present invention collects historical records of users browsing news titles and recent (within seven days) online news titles and Weibo hot search titles (hereinafter collectively referred to as titles) as raw data. Before obtaining the word set, the data is preprocessed to remove the auxiliary words, adverbs, etc. in the title that affect the efficiency of keyword recommendation. At the same time, the number of repeated words is counted, the word set is deduplicated, and the word part of speech after word segmentation is marked with a level label, and the word part of speech calculation weight is set. Then, by calculating the correlation between the words, the ordered recommendation list corresponding to each subject is determined, and finally the recommendation evaluation score of each word itself is calculated. The higher the evaluation score, the greater the recommendation possibility, and the keyword recommendation set is sorted out. The recommendation results not only cover the user's search habits and browsing content, but also include directly related hot information, meet customer needs, and improve user favorability and trust.
[0004] In order to solve the above technical problems, the present invention adopts the following technical solution: a keyword recommendation method based on news titles, comprising the following steps:
[0005] Step S1: Obtain all the historical news titles browsed by the user, collect recent (within seven days) online news titles and Weibo hot search titles (hereinafter collectively referred to as titles), and obtain the original data set;
[0006] Step S2: adding the original data set collected in step S1 to the Wikipedia text corpus, training the Word2Vec neural network model, and obtaining a word vector toolkit;
[0007] Step S3: Preprocess the original title data collected in step S1 to obtain a word set:
[0008] (1) Load the intervention dictionary, segment the title, and obtain the initial word set. For some special entries, add them to the intervention dictionary to form personalized intervention, such as some common expressions in life: "100,000 times", etc., which are not segmented during the processing;
[0009] (2) Set the word list after segmentation. Count the number of word repetitions to form a list of typical statistical patterns of {word: number of occurrences};
[0010] (3) Mark the segmentation words according to their part of speech and set the word level. The higher the level, the higher the possibility that the word will become a keyword.
[0011] (4) Set up a word recommendation list. There are two ways to get the recommended words in the word recommendation list. The first is to get the words from the segmentation method. The words after segmentation of the same title are related words to each other. For each main word, calculate the correlation between it and its related words. The words in the word segmentation recommendation list are sorted from large to small according to the correlation, forming a list of typical statistical patterns of words: {word: [word segmentation recommendation list}}. The second is to get a model recommendation word list for each word in the model described in step S2, that is, {word: [model recommendation word list]} typical statistical patterns of words;
[0012] Step S4: Setting and generating a keyword evaluation list. In step S3, each word in the word library list in step (2) is a keyword to be recommended, and the recommendation evaluation score of the keyword to be recommended is calculated. The higher the evaluation score, the greater the recommendation possibility. The words in the word recommendation list are reordered from large to small according to the calculated keyword recommendation evaluation scores to obtain a keyword evaluation list: forming: a typical statistical pattern of {keyword: keyword recommendation evaluation score};
[0013] Step S5: Generate a keyword recommendation set. For each keyword in the keyword evaluation list described in step S4, there is a corresponding word recommendation list. If the recommended word in the word segmentation recommendation list is the same as the recommended word in the model recommendation list, this recommended word is set as a double positive recommendation word. At this time, the relevance of the recommended word to the corresponding keyword will increase. The number of recommended words corresponding to each keyword is set to no more than 4, forming a keyword recommendation set, that is, a set statistical model of (keyword + recommendation word list).
[0014] Preferably, the original data set in step S1, denoted as C, is derived from a historical browsing title data set C1 and a recent title data set C2, wherein the recent title data is obtained by crawling news titles in web pages using Python crawler technology.
[0015] Preferably, the Word2Vec model in step S2 is a shallow neural network model that learns semantic knowledge and generates word vectors from a large amount of text corpus in an unsupervised manner. The corpus for model training comes from the Wikipedia Chinese corpus, and the original data set is added to the training to increase the real-time performance of the model and the breadth and depth of the recommendation.
[0016] Preferably, the intervention dictionary loaded in step (1) in step S3 adopts the Chinese stop word list provided by Harbin Institute of Technology, which can cover more than 95% of the Chinese corpus, remove words without practical meaning, and improve the efficiency of text data processing.
[0017] Preferably, the first column of main words in the vocabulary list of step (2) in step S3 is a set of words after deduplication, and the corresponding number of word repetitions represents the number of times a certain word appears in the word text after the entire title is segmented. It should be noted that the words in the vocabulary list are arranged in no order, and each main word is a keyword to be recommended.
[0018] As a preferred embodiment, in step S3, the level is set according to the part of speech, and the word segmentation tool adopts Baidu LAC (Linguistic Analytics Chain) Chinese word segmentation software, which is set to work in mode = 'lac', and the part of speech is marked while the word segmentation is performed. It should be clarified that most keywords are words with a length greater than 1. In order to reduce unnecessary judgments, only words with a length greater than 1 are marked with the part of speech. The specific operation is to mark the word part of speech while performing the word segmentation operation, wherein the words with the part of speech of names of people, places, institutions, and works are set as first-level words; the words with the part of speech of common nouns, English words, and other proper nouns are set as second-level words; the words with the part of speech of noun verbs, time, and adjectives are set as third-level words; other parts of speech, such as adverbs, pronouns, prepositions, etc., are set as fourth-level words. Since the fourth-level parts of speech are all auxiliary words in sentences, the probability of becoming keywords is small. In order to improve the recommendation efficiency, the fourth-level words are not recommended as keywords, and the calculation weights of the levels of other words after division are 0.5, 0.3, and 0.2 respectively.
[0019] As a preferred method, the correlation degree calculation method between the related words in step (4) of step S3 is as follows: Assume that there is a set of news titles, the total number of titles is recorded as N, and the total number of titles containing word A is recorded as N A , the total number of titles containing word B is recorded as N B , the total number of titles containing the word (A+B) is recorded as N AB , then the degree of connection between words A and B is called the correlation, recorded as G(A,B), and the specific calculation formula is as follows:
[0020]
[0021] It should be noted that the unit commonly used in information theory is bit, so the logarithm is taken as 2. Obviously, if A and B are independent of each other, then their correlation is 0, and the correlation between words is always non-negative. The higher the G value, the closer the two words are combined, and the greater the correlation between them.
[0022] Preferably, the word recommendation list in step (4) of step S3 consists of two parts: a segmentation recommendation word list and a model recommendation word list. The words in the first segmentation recommendation word list are arranged in order according to the degree of association between the subject word and each word in the list. For example, two titles are taken from the original vocabulary, respectively recorded as Title 1 and Title 2. After segmentation, Title 1 = {ABCD}, Title 2 = {AEF}. When A is taken as the subject, for Title 1, the degree of association between subject A and B, C, and D is calculated, and the degree of association of AC is greater than that of AB and AD, and the degree of association of AB is greater than that of AD; similarly, for Title 2, the degree of association between subject A and E and F is calculated, and the degree of association of AF is greater than that of AE, and also greater than that of AC; by comparing the degree of association, the segmentation recommendation word list of subject A is: {F, E, C, B, D}. The second model recommendation word list is obtained by the trained Word2Vec model. The recommended words in the list are sorted in order according to the word association obtained by the model. For example, for the main word A, the model recommendation word list is {B, M, N}, which means that the association between words AB is greater than that between AM and AN, and the association between word AM is greater than that between AN.
[0023] Preferably, the keyword set in step S4 is the result of orderly arranging the first column of the main words in the word library list in step (2) in step S3. The sorting method is to calculate the recommendation evaluation score of each main word, and arrange them in descending order to obtain a keyword evaluation list. The specific score calculation formula is as follows:
[0024]
[0025] Among them: K represents the keyword; D K represents the part-of-speech level weight of K; R K represents the number of repetitions of K. It should be noted that lg is the logarithm with base 10, i.e. log 10 The abbreviation of , taking the logarithm with base 10, can effectively expand the information of low-frequency words in the specific score while reducing the imbalanced impact of high-frequency words. In order to make the calculation meaningful and eliminate the impact of non-positive logarithms, the number of repetitions is increased by one. Obviously, lg(R K +1)>0;NC 1K represents the number of titles in C1 that contain K; M represents the total number of titles in dataset C1; N represents the total number of titles in dataset C2.
[0026] Preferably, the recommendation word list corresponding to each keyword in the keyword recommendation set described in step S5 has no less than 4 recommendation words, of which the 4 recommendation words are not considered in their recommendation order. For each keyword, its recommendation words come from the segmentation recommendation word list and the model recommendation word list. As can be seen from the above, after the data processing of step (4) in step S3, the two types of word recommendation lists are the results of orderly arrangement. Next, it is determined whether the recommendation words in the two lists are both greater than 1. If so, the first two recommendation words in each list are selected to be added to the keyword recommendation set; otherwise, all the recommendation words in the list with fewer corresponding recommendation words are put into the keyword recommendation set, and the number of recommendation words in the list with fewer corresponding recommendation words is recorded as a, and the number of recommendation words in the other list is not more than (4-a) and is added to the keyword recommendation set. In particular, the association value of the double positive recommendation word with the keyword will be doubled, and at the same time, it is determined whether the double positive recommendation word is in the recommendation column of the model recommendation word list (located in the first two recommendation word positions in the list). If so, the double positive recommendation word in the segmentation recommendation word list will be deleted, and the above judgment step will be repeated.
[0027] Beneficial effects: Compared with the prior art, the present invention has the following advantages:
[0028] (1) This invention explores a new direction for keyword recommendation. Traditional keyword recommendation methods use user browsing and search history to obtain keywords, relying on user historical behavior. On this basis, this invention adds data such as recent news headlines to increase the real-time nature of keyword recommendation results, providing a reference for more accurate network recommendation mechanisms in the future;
[0029] (2) The data collected by the present invention does not involve specific article content and is not targeted at a specific field or direction. It only needs to collect very general title information, thereby improving the feasibility, breadth and practicality of the method proposed by the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] The explanatory drawings constituting a part of the present invention are used to provide a further understanding of the present invention. It should be understood that the exemplary embodiments and descriptions described herein are used to explain the present invention and are not used to limit the present invention. After reading the present invention, various equivalent forms of modifications to the present invention by those skilled in the art fall within the scope defined by the claims attached to this application.
[0031] Figure 1 A preprocessing method for word segmentation data in an embodiment of the present invention;
[0032] Figure 2 is an overall flow chart of a recommended method in an embodiment of the present invention;
[0033] Figure 3This is a method for obtaining a keyword recommendation set in an embodiment of the present invention. DETAILED DESCRIPTION
[0034] The present invention will be further described below in conjunction with the accompanying drawings. Figure 1-3 As shown, a keyword recommendation method based on news titles of the present invention specifically includes the following steps.
[0035] S1. Obtain all the title information that the user has browsed in the past as the historical data set, which represents the user's personal browsing interests and focus direction; use web crawlers to collect recent (within seven days) online news titles, Weibo hot search titles (hereinafter collectively referred to as titles), etc. as the current data set, which represents the direction of current social hot events; the original data set obtained comes from the user's historical data set and current data set, and the keywords to be recommended depend on the original data set, so the keywords to be recommended are a highly personalized and real-time word set that combines the user's browsing interests and current hot events;
[0036] S2. Add the collected original data set to the Wikipedia text corpus to train the Word2Vec neural network model. The Word2Vec model is widely used in language processing. It can predict surrounding words related to a given word and is a toolkit for obtaining word vectors. It should be noted that by adding the original data set collected by the present invention to the original training corpus of the model, the trained Word2Vec is more applicable and the recommendation results are more authoritative and persuasive.
[0037] S3. Preprocess the collected original title data to obtain a word set. The preprocessing process is as follows: Figure 1 As shown, the following is the text description given:
[0038] 1) Load the intervention dictionary, segment the title, and obtain the initial word set. For some special entries, add them to the intervention dictionary to form personalized custom interventions, such as some common expressions in life: "100,000 people", etc., which are not segmented during the processing process. The intervention dictionary in the figure uses the Chinese stop word list provided by Harbin Institute of Technology, which can cover more than 95% of the Chinese corpus, remove words without practical meaning, and improve the efficiency of text data processing;
[0039] 2) Set the word list after segmentation. Count the number of word repetitions to form a list of typical word statistics patterns of {word: number of occurrences}. It should be noted that this step is completed during the word segmentation process, and the frequency of repetition of different words will affect the final recommendation of the word;
[0040] 3) According to the part of speech of each word, mark the segmented words and set the word level. The higher the level, the higher the possibility of the word becoming a keyword. It should be noted that this step is completed during the word segmentation process. The possibility of words with different parts of speech becoming keywords is also different. When calculating the final recommendation degree of the word, the influence of its part of speech should be digitized and the level weight should be set;
[0041] The specific level division process of the present invention is: the word segmentation tool adopts Baidu LAC (LinguisticAnalyticsChain) Chinese word segmentation software, which is set to work in mode = 'lac', and the word segmentation is marked while marking the part of speech. It should be clear that most keywords are words with a length greater than 1. In order to reduce unnecessary judgments, only words with a length greater than 1 are marked with part of speech, and the part of speech is grouped according to the level, where the words with the part of speech of personal names, place names, organization names, and work names are set as first-level words; the words with the part of speech of common nouns, English words, and other proper nouns are set as second-level words; the words with the part of speech of noun verbs, time, and adjectives are set as third-level words; other parts of speech, such as adverbs, pronouns, prepositions, etc., are set as fourth-level words. Since the fourth-level parts of speech are weakly defined words such as auxiliary words and redundant words in sentences, the probability of becoming keywords is small. In order to improve the recommendation efficiency, the fourth-level words are not recommended as keywords, and the quantitative calculation weights of the levels of other divided words are 0.5, 0.3, and 0.2 respectively.
[0042] The present invention refers to the degree of connection between words as correlation, which indicates the degree of semantic combination of two words. The higher the correlation, the stronger the closeness between the two words. The calculation formula for quantitative analysis is given below:
[0043]
[0044] Here, G(A,B) represents the correlation between words A and B; N represents the set of news titles, that is, the total number of titles; N A represents the total number of titles containing word A; N B represents the total number of titles containing word B; N AB The total number of titles containing the word (A+B) is recorded as.
[0045] Obviously, if A and B are independent of each other, then their correlation is 0, and the correlation between words is always non-negative. The higher the G value, the closer the two words are combined and the greater the correlation between them.
[0046] 4) Set up a word recommendation list. There are two ways to get the recommended words in the word recommendation list. The first is the words obtained by the segmentation method, such as Figure 1The preprocessing process shown in the figure obtains the recommended word list. The specific operation is as follows: the words after segmentation of the same title are related words to each other. For each main word, the correlation between it and its related words is calculated. The words in the recommended word list are sorted from large to small according to the correlation, forming a list of typical statistical patterns of words: {word: [recommended word list for word segmentation}}. The second is for the Word2Vec model. For each word, the surrounding words related to the given word are predicted to form a model recommended word list, that is, {word: [recommended word list for model]};
[0047] S4, set to generate a keyword evaluation list. Each word in the word library list obtained in the above steps is a keyword to be recommended, and the recommendation evaluation score of the keyword to be recommended is calculated. The higher the evaluation score, the greater the recommendation possibility. The words in the word recommendation list are reordered from large to small according to the calculated keyword recommendation evaluation score to obtain a keyword evaluation list: forming: a typical statistical pattern of {keyword: keyword recommendation evaluation score};
[0048] The calculation of keyword recommendation evaluation score is as follows:
[0049]
[0050] Among them: K represents the keyword; D K represents the part-of-speech level weight of K; R K represents the number of repetitions of K. It should be noted that lg is the logarithm with base 10, i.e. log 10 The abbreviation of , taking the logarithm with base 10, can effectively expand the information of low-frequency words in the specific score while reducing the imbalanced impact of high-frequency words. In order to make the calculation meaningful and eliminate the impact of non-positive logarithms, the number of repetitions is increased by one. Obviously, lg(R K +1)>0;NC 1K represents the number of titles in C1 that contain K; M represents the total number of titles in dataset C1; N represents the total number of titles in dataset C2.
[0051] S5. Generate a keyword recommendation set. For each keyword in the above keyword evaluation list, there is a corresponding word recommendation list. If the recommended word in the word segmentation recommendation list is the same as the recommended word in the model recommendation list, this recommended word is set as a double positive recommendation word. At this time, the relevance of the recommended word to the corresponding keyword will increase. The number of recommended words corresponding to each keyword is set to no more than 4, forming a keyword recommendation set, that is, a set statistical model of (keyword + recommended word list).
[0052] The recommended word list corresponding to each keyword in the keyword recommendation set contains no less than 4 recommended words, and the recommended words are not considered in their recommended order. The specific operation process is as follows Figure 3 As shown, first, for each keyword, its recommended words come from the segmentation recommended word list and the model recommended word list, which are arranged in order according to the degree of relevance; then, it is determined whether the recommended words in both lists are greater than 1. If so, the first two recommended words in each list are selected to be added to the keyword recommendation set; otherwise, all the recommended words in the list with fewer corresponding recommended words are put into the keyword recommendation set, and the number of recommended words in the list with fewer corresponding recommended words is recorded as a, and the number of recommended words in the other list is not more than (4-a) and is added to the keyword recommendation set. In particular, the relevance value of the double positive recommended words and the keyword will be doubled, and at the same time, it is determined whether the double positive recommended words are in the recommended row in the model recommended word list (located in the first two recommended word positions in the list). If so, the double positive recommended words in the segmentation recommended word list will be deleted, and the number of recommended words after the length of the recommended words in the two lists is re-determined.
Claims
1. A keyword recommendation method based on news titles, comprising the following steps: Step S1: Obtain all the historical news titles browsed by the user, collect recent (within seven days) online news titles and Weibo hot search titles (hereinafter collectively referred to as titles), and obtain the original data set; Step S2: adding the original data set collected in step S1 to the Wikipedia text forecast, training the Word2Vec neural network model, and obtaining a word vector toolkit; Step S3: Preprocess the original title data collected in step S1 to obtain a word set: (1) Load the intervention dictionary, segment the title, and obtain the initial word set. For some special entries, add them to the intervention dictionary to form personalized intervention, such as some common expressions in life: "100,000 people", etc., which are not segmented during the processing; (2) Set the word list after segmentation. Count the number of word repetitions to form a list of typical statistical patterns of {word: number of occurrences}; (3) Mark the segmentation words according to their part of speech and set the word level. The higher the level, the higher the possibility that the word will become a keyword. (4) Set up a word recommendation list. There are two ways to get the recommended words in the word recommendation list. The first is to get the words from the segmentation method. The words after segmentation of the same title are related words to each other. For each main word, calculate the correlation between it and its related words. The words in the word segmentation recommendation list are sorted from large to small according to the correlation, forming a list of typical statistical patterns of words: {word: [word segmentation recommendation list}}. The second is to get a model recommendation word list for each word in the model described in step S2, that is, {word: [model recommendation word list]} typical statistical patterns of words; Step S4: Setting and generating a keyword evaluation list. In step S3, each word in the word library list in step (2) is a keyword to be recommended, and the recommendation evaluation score of the keyword to be recommended is calculated. The higher the evaluation score, the greater the recommendation possibility. The words in the word recommendation list are reordered from large to small according to the calculated keyword recommendation evaluation scores to obtain a keyword evaluation list: forming: a typical statistical pattern of {keyword: keyword recommendation evaluation score}; Step S5: Generate a keyword recommendation set. For each keyword in the keyword evaluation list described in step S4, there is a corresponding word recommendation list. If the recommended word in the word segmentation recommendation list is the same as the recommended word in the model recommendation list, this recommended word is set as a double positive recommendation word. At this time, the relevance of the recommended word to the corresponding keyword will increase. The number of recommended words corresponding to each keyword is set to no more than 4, forming a keyword recommendation set, that is, a set statistical model of (keyword + recommendation word list).
2. The keyword recommendation method based on news titles according to claim 1, characterized in that: The original data set in step S1, denoted as C, comes from two parts: a historical browsing title data set C1 and a recent title data set C2. The recent title data uses Python crawler technology to crawl news titles in web pages.
3. The keyword recommendation method based on news titles according to claim 1, characterized in that: The Word2Vec model described in step S2 is a shallow neural network model that learns semantic knowledge and generates word vectors from a large amount of text corpus in an unsupervised manner. The corpus for model training comes from the Wikipedia Chinese corpus. At the same time, the original data set is added to the training to increase the real-time performance of the model and the breadth and depth of recommendations.
4. The keyword recommendation method based on news titles according to claim 1, characterized in that: In step S3, the intervention dictionary loaded in step (1) adopts the Chinese stop word list provided by Harbin Institute of Technology, which can cover more than 95% of the Chinese corpus, remove words without practical meaning, and improve the efficiency of text data processing.
5. The keyword recommendation method based on news titles according to claim 1, characterized in that: The first column of main words in the vocabulary list described in step (2) in step S3 is a set of words after deduplication, and the corresponding number of word repetitions represents the number of times a certain word appears in the word text after the entire title is segmented. It should be noted that the words in the vocabulary list are arranged in no order, and each main word is a keyword to be recommended.
6. The keyword recommendation method based on news titles according to claim 1, characterized in that: In step S3, step (3) sets the level according to the part of speech. The word segmentation tool adopts Baidu LAC (Linguistic Analytics Chain) Chinese word segmentation software. The specific operation is to mark the part of speech of the word while performing the word segmentation operation, wherein the words whose part of speech is personal name, place name, organization name, and work name are set as first-level words; the words whose part of speech is common noun, English word, and other proper noun are set as second-level words; the words whose part of speech is noun verb, time, and adjective are set as third-level words; other parts of speech, such as adverbs, pronouns, prepositions, etc., are set as fourth-level words. Since the fourth-level parts of speech are all auxiliary words in the sentence, the probability of becoming keywords is small. In order to improve the recommendation efficiency, the fourth-level words are not recommended as keywords. The calculation weights of the levels of other words after classification are 0.5, 0.3, and 0.2 respectively.
7. The keyword recommendation method based on news titles according to claim 1, characterized in that: The calculation method of the correlation between the related words in step (4) of step S3 is as follows: Assume that there is a set of news headlines, the total number of headlines is N, and the total number of headlines containing word A is N A , the total number of titles containing word B is recorded as N B , the total number of titles containing the word (A+B) is recorded as N AB , then the degree of connection between words A and B is called the correlation, recorded as G(A,B), and the specific calculation formula is as follows: It should be noted that the unit commonly used in information theory is bit, so the logarithm is taken as 2. Obviously, if A and B are independent of each other, then their correlation is 0, and the correlation between words is always non-negative. The higher the G value, the closer the two words are combined, and the greater the correlation between them.
8. The keyword recommendation method based on news titles according to claim 1, characterized in that: The word recommendation list described in step (4) of step S3 consists of two parts: a segmentation recommendation list and a model recommendation list. The words in the first segmentation recommendation list are arranged in order according to the degree of association between the subject word and each word in the list. For example, two titles are taken from the original vocabulary, respectively recorded as Title 1 and Title 2. After segmentation, Title 1 = {ABCD}, Title 2 = {AEF}. When A is taken as the subject, for Title 1, the degree of association between subject A and B, C, and D is calculated, and the degree of association of AC is greater than that of AB and AD, and the degree of association of AB is greater than that of AD; similarly, for Title 2, the degree of association between subject A and E and F is calculated, and the degree of association of AF is greater than that of AE, and also greater than that of AC; by comparing the degree of association, the segmentation recommendation list of subject A is: {F, E, C, B, D}. The second model recommendation word list is obtained by the trained Word2Vec model. The recommended words in the list are sorted in order according to the word association obtained by the model. For example, for the main word A, the model recommendation word list is {B, M, N}, which means that the association between words AB is greater than that between AM and AN, and the association between word AM is greater than that between AN.
9. The keyword recommendation method based on news titles according to claim 1, characterized in that: The keyword set in step S4 is the result of orderly arranging the first column of the main words in the word library list in step (2) in step S3. The sorting method is to calculate the recommendation evaluation score of each main word, and arrange them in order from high to low to obtain a keyword evaluation list. The specific score calculation formula is as follows: Among them: K represents the keyword; D K represents the part-of-speech level weight of K; R K represents the number of repetitions of K. It should be noted that lg is the logarithm with base 10, i.e. log 10 The abbreviation of , taking the logarithm with base 10, can effectively expand the information of low-frequency words in the specific score while reducing the imbalanced impact of high-frequency words. In order to make the calculation meaningful and eliminate the impact of non-positive logarithms, the number of repetitions is increased by one. Obviously, lg(R K +1)>0;NC 1K represents the number of titles in C1 that contain K; M represents the total number of titles in dataset C1; N represents the total number of titles in dataset C2.
10. The keyword recommendation method based on news titles according to claim 1, characterized in that: In step S5, the recommendation word list corresponding to each keyword in the keyword recommendation set has no less than 4 recommendation words, of which the 4 recommendation words are not considered in their recommendation order. For each keyword, its recommendation word comes from the segmentation recommendation word list and the model recommendation word list. As can be seen from the above, after the data processing of step (4) in step S3, the two types of word recommendation lists are the results of orderly arrangement. Next, determine whether the recommendation words in the two lists are both greater than 1. If so, then select the first two recommendation words from each list and add them to the keyword recommendation set; Otherwise, all the recommended words in the list with fewer corresponding recommended words are put into the keyword recommendation set. The number of recommended words in the list with fewer corresponding recommended words is recorded as a, and the number of recommended words in another list is not more than (4-a) and put into the keyword recommendation set. In particular, the relevance value of the double positive recommended words and keywords will be doubled, and at the same time, it is determined whether the double positive recommended words are in the recommended row in the model recommendation word list (located in the first two recommended word positions in the list). If so, the double positive recommended words in the segmentation recommendation word list will be deleted, and the above determination steps will be repeated.
Citation Information
Cited By
NPL-based semantic recognition model and training method thereof
CN121029965A
A semantic recognition model based on NLP and a training method thereof
CN121029965B