Similar news identification method, device, system and storage medium

By separating the news title and text to calculate the similarity and weighted fusion, the problem of high complexity in identifying similar news in the existing technology is solved, a method of efficiently identifying similar news is realized, and redundancy and analysis difficulty are reduced.

CN113449078BActive Publication Date: 2024-10-22PERFECT WORLD HLDG GRP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110711198.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-06-25
Publication Date
2024-10-22
Estimated Expiration
2041-06-25

AI Technical Summary

Technical Problem

Existing similar news identification methods are highly complex and difficult to improve identification efficiency, resulting in news data redundancy and unfavorable analysis.

Method used

By separating the title and text of the news text, the title similarity and the text similarity are calculated respectively, and fused to reduce the impact of the difference in text length on the similarity, and the weighted summation of weight coefficients is used to calculate the similarity of the news.

Benefits of technology

It improves the efficiency and accuracy of similar news identification, reduces time and calculation costs, and simplifies the identification process of similar news.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113449078B_ABST
    Figure CN113449078B_ABST
Patent Text Reader

Abstract

The embodiments of the present application provide a similar news identification method, device, system and storage medium. In the similar news identification method, when calculating the similarity of news, the title and the text in the news are processed separately, and the similarity of the title is calculated based on the text corresponding to the title, and the similarity of the text is calculated based on the text corresponding to the text and the text length. This can reduce the impact of the text length difference on the similarity to a certain extent, which is conducive to calculating a more accurate similarity. At the same time, the similarity of the title and the similarity of the text are merged to obtain the similarity of the news, and the similarity calculation result of the news text can be quickly obtained, which reduces the time cost and calculation cost required to identify similar news and improves the recognition efficiency of similar news.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of Internet technology, and in particular to a similar news identification method, device, system and storage medium. Background Art

[0002] In the information age, all kinds of information are growing explosively, and news data is no exception. When reporting the same news, different news reporting parties (such as portal websites and magazines) will cite each other or use similar or identical descriptions. As a result, different news reports have high similarities, which makes news data redundant, interferes with users' reading, and is not conducive to the analysis of news data.

[0003] Existing similar news recognition methods mostly rely on supervised models or unsupervised models, but the model-based methods are relatively complex and not conducive to improving recognition efficiency. Therefore, a new solution is needed. Summary of the invention

[0004] Multiple aspects of the present application provide a similar news identification method, device, system and storage medium for efficiently identifying similar news.

[0005] An embodiment of the present application provides a similar news identification method, including: obtaining a first news text and a second news text to be identified; the first news text includes a first title and a first text, and the second news text includes a second title and a second text; calculating the title similarity between the first title and the second title according to the texts corresponding to the first title and the second title respectively; calculating the text similarity between the first text and the second text according to the texts corresponding to the first text and the second text respectively and the text lengths corresponding to the first text and the second text respectively; and fusing the title similarity and the text similarity to obtain the similarity between the first news text and the second news text.

[0006] Further optionally, the title similarity between the first title and the second title is calculated based on the texts corresponding to each of the first title and the second title, including: performing a keyword extraction operation on the first title and the second title to obtain a first title term set and a second title term set; calculating the number of terms that are simultaneously in the first title term set and the second title term set as the number of identical title terms; determining the title similarity based on the ratio of the number of identical title terms to the total number of terms contained in the first title term set and the second title term set.

[0007] Further optionally, a keyword extraction operation is performed on the first title and the second title, including: extracting entries corresponding to entities, entries with a noun part of speech, and / or entries with a verb part of speech from the first title and the second title.

[0008] Further optionally, the text similarity between the first text and the second text is calculated based on the texts corresponding to the first text and the second text and the text lengths corresponding to the first text and the second text, including: performing word segmentation processing on the first text and the second text to obtain a first text term set and a second text term set; determining the intersection of the first text term set and the second text term set to obtain the same text terms; determining the first text term set and the second text term set, except for the same text terms. other terms as different text terms; respectively calculating the occurrence frequencies of the same text terms in the first text term set and the second text term set to obtain a first occurrence frequency and a second occurrence frequency; respectively calculating the occurrence frequencies of the different text terms in the first text term set and the second text term set to obtain a third occurrence frequency and a fourth occurrence frequency; calculating the text similarity according to the first occurrence frequency, the second occurrence frequency, the third occurrence frequency, the fourth occurrence frequency and the respective text lengths of the first text and the second text.

[0009] Further optionally, the text similarity is calculated based on the first occurrence frequency, the second occurrence frequency, the third occurrence frequency, the fourth occurrence frequency, and the text length of each of the first text and the second text, including: calculating the smaller frequency of the first occurrence frequency and the second occurrence frequency; summing the first occurrence frequency, the second occurrence frequency, the third occurrence frequency, and the fourth occurrence frequency to obtain the total frequency; calculating a similarity penalty item based on the text length of each of the first text and the second text; and determining the text similarity based on the smaller frequency, the total frequency, and the similarity penalty item.

[0010] Further optionally, determining the text similarity based on the smaller frequency, the total frequency and the similarity penalty term includes: adding the similarity penalty term to the total frequency to update the total frequency; determining the text similarity based on the ratio of the smaller frequency to the updated total frequency.

[0011] Further optionally, a similarity penalty item is calculated based on the respective text lengths of the first text and the second text, including: calculating the absolute value of the text length difference between the first text and the second text; if the absolute value of the text length difference is greater than or equal to a set first threshold, then taking the product of the absolute value of the text length difference and a set coefficient α as the similarity penalty item.

[0012] Further optionally, if the absolute value of the text length difference is greater than a set second threshold, a first sentence and a second sentence are determined from the first text and the second text respectively, and the first sentence and the second sentence contain the largest number of identical text terms; the sentence similarity of the first sentence and the second sentence is calculated based on the respective semantics of the first sentence and the second sentence; a weighted sum is performed on the sentence similarity and the text similarity to update the text similarity; and the weighted coefficient of the sentence similarity is negatively correlated with the absolute value of the text length difference.

[0013] Further optionally, it also includes: obtaining at least one of the source, field and user comment data of each of the first news text and the second news text; if the absolute value of the text length difference is greater than a set third threshold, and the number of the same text entries is less than a set fourth threshold, then calculating the information similarity between the first news text and the second news text according to at least one of the source, field and user comment data; performing weighted summation of the information similarity and the text similarity to update the text similarity; the weighting coefficient of the information similarity is negatively correlated with the absolute value of the text length difference.

[0014] Further optionally, the title similarity and the text similarity are merged to obtain the similarity between the first news text and the second news text, including: taking a weighted sum of the title similarity and the text similarity according to a preset weight coefficient to obtain the similarity between the first news text and the second news text.

[0015] An embodiment of the present application also provides an electronic device, comprising: a memory and a processor; the memory is used to store one or more computer instructions; the processor is used to execute the one or more computer instructions to: execute the steps in the method provided in the embodiment of the present application.

[0016] The embodiment of the present application also provides a computer-readable storage medium storing a computer program, which can implement the steps in the method provided in the embodiment of the present application when the computer program is executed by a processor.

[0017] In the similar news identification method provided in the embodiment of the present application, when calculating the similarity of news, the title and the text in the news are processed separately, and the similarity of the title is calculated based on the text corresponding to the title, and the similarity of the text is calculated based on the text corresponding to the text and the text length, which can reduce the impact of the text length difference on the similarity to a certain extent, and is conducive to calculating a more accurate similarity. At the same time, the similarity of the title and the similarity of the text are merged to obtain the similarity of the news, and the similarity calculation result of the news text can be quickly obtained, which reduces the time cost and calculation cost required for identifying similar news and improves the recognition efficiency of similar news. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0019] Figure 1 A flowchart of a similar news identification method provided for an exemplary embodiment of the present application;

[0020] Figure 2 A flowchart of a similar news identification method provided for another exemplary embodiment of the present application;

[0021] Figure 3 A schematic diagram of the structure of an electronic device provided as an exemplary embodiment of the present application. DETAILED DESCRIPTION

[0022] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.

[0023] When reporting the same news, different news reporting parties (such as portal websites and magazines) may cite each other or use similar or identical descriptions. This results in high similarity between different news reports, which results in a large amount of redundancy in news data, causing interference to users' reading and hindering the analysis of news data.

[0024] At present, supervised or unsupervised processing methods are mostly used to identify similar news. In the supervised processing method, a classifier is usually used to determine whether any two news releases are similar. This method requires a large amount of annotated text to train the classifier. Among them, the training process of the classifier is sensitive to the scale of the annotation and the type of annotated data, which leads to poor generalization ability of the classifier and long calculation time for some long texts. In the unsupervised processing method, the semantic similarity between news releases is usually calculated. However, the method of calculating semantic similarity requires extracting the semantic information of the text, which is complex and time-consuming, and is not conducive to improving recognition efficiency.

[0025] In view of the above technical problems, a solution is provided in some embodiments of the present application. The technical solutions provided by the embodiments of the present application are described in detail below in conjunction with the accompanying drawings.

[0026] Figure 1 is a flow chart of a news similarity identification method provided by an exemplary embodiment of the present application. When the method is executed on the electronic device side, it may include the following steps: Figure 1 Steps shown:

[0027] Step 101: Obtain a first news text and a second news text to be identified; the first news text includes a first title and a first text, and the second news text includes a second title and a second text.

[0028] Step 102: Calculate the title similarity between the first title and the second title based on the texts corresponding to the first title and the second title respectively.

[0029] Step 103: Calculate the text similarity between the first text and the second text according to the texts corresponding to the first text and the second text and the text lengths corresponding to the first text and the second text.

[0030] Step 104: merge the title similarity and the text similarity to obtain the similarity between the first news text and the second news text.

[0031] News text refers to text that reports or comments on an event. News text is usually published in magazines, newspapers, and websites. When there are massive amounts of news text, similarity recognition can be performed on the massive amounts of news text, and similar news texts can be classified or deduplicated. When similarity recognition is performed on massive amounts of news text, the similarity between any two news texts can be calculated.

[0032] In some embodiments, the news text can be obtained by performing voice recognition on the news video. For example, for a news video, the name or introduction of the news video can be extracted as the news title. Next, the voice contained in the news video can be extracted, and the extracted voice can be voice recognized to obtain the content text corresponding to the news as the text.

[0033] In each embodiment of the present application, for the convenience of description and distinction, any two news texts to be subjected to similarity identification are described as a first news text and a second news text.

[0034] News text has certain data characteristics. Usually, news text includes at least two parts, namely, the title part and the text part. The title of the news is a general summary or evaluation of the text. Therefore, whether it is a newsletter or a long news, when reporting the same content, the similarity of the titles of the two is usually high. In this embodiment, in order to reduce the impact of text length differences on similarity, the similarity between news is divided into two parts, namely, the similarity between titles and the similarity between texts.

[0035] In this embodiment, for the convenience of description and distinction, the title and text of the first news text are described as the first title and the first text, and the title of the second news text is described as the second title and the second text.

[0036] Based on the texts corresponding to the first title and the second title, the similarity between the first title and the second title can be calculated. Based on the texts corresponding to the first text and the second text and the text lengths corresponding to the first text and the second text, the similarity between the first text and the second text can be calculated. When calculating similarity based on text, the literal similarity of the text can be calculated. This part will be described in detail in subsequent embodiments and will not be repeated here. For the convenience of description and distinction, the similarity between titles is described as title similarity, and the similarity between texts is described as text similarity.

[0037] After obtaining the similarity between the first text and the main text, the title similarity and the main text similarity are fused to obtain the similarity between the first news text and the second news text. When the title similarity and the main text similarity are fused, the title similarity and the text similarity can be fused by arithmetic calculation. For example, the average value of the title similarity and the main text similarity can be calculated as the similarity between the two news texts; for example, the product of the title similarity and the main text similarity can be calculated as the similarity between the two news texts; for another example, the title similarity and the main text similarity can be summed as the similarity between the two news texts.

[0038] In some exemplary embodiments, considering the contribution of the title and the text to the news content, preset weight coefficients may be set for the title and the text respectively, and the title similarity and the text similarity are weighted and summed according to the preset weight coefficients to obtain the similarity between the first news text and the second news text. Assuming that the weight coefficient of the title is w1, the weight coefficient of the text is w2, the title similarity is S1, and the text similarity is S2, then the similarity between the first news text and the second news text is S=w1*S1+w2*S2, where the values ​​of w1 and w2 can be empirical values, which are not limited in this embodiment.

[0039] In this embodiment, when calculating the similarity of news, the title and the text in the news are processed separately, and the similarity of the title is calculated based on the text corresponding to the title, and the similarity of the text is calculated based on the text corresponding to the text and the text length, which can reduce the impact of the text length difference on the similarity to a certain extent, and is conducive to calculating a more accurate similarity. At the same time, the similarity of the title and the similarity of the text are merged to obtain the similarity of the news, and the similarity calculation result of the news text can be quickly obtained, which reduces the time cost and calculation cost required for identifying similar news and improves the recognition efficiency of similar news.

[0040] In the above embodiment, the implementation method of processing the title and the text of the news separately is recorded. The following will further explain the optional implementation methods of calculating the similarity of the title and the similarity of the text respectively.

[0041] Alternatively, if Figure 2 As shown, after taking the first news and the second news as input data, it is firstly detected whether the input text is a title. If it is a title, the title processing branch is entered, that is, the first embodiment is executed; if the input text is not a title, the text processing branch is entered, that is, the second embodiment is executed.

[0042] Embodiment 1: Calculate the title similarity between the first title and the second title according to the texts corresponding to the first title and the second title respectively.

[0043] Optionally, a keyword extraction operation may be performed on the first title and the second title to obtain a set of keywords contained in the first title and a set of keywords contained in the second title. The set of keywords contained in the first title can be described as a first title term set; the set of keywords contained in the second title can be described as a second title term set.

[0044] The keyword extraction operation may include: extracting entries corresponding to the entity, entries with nouns and / or entries with verbs. That is, extracting entries corresponding to the entity, entries with nouns and / or entries with verbs in the first title to obtain the first title entry set; extracting entries corresponding to the entity, entries with nouns and / or entries with verbs in the second title to obtain the second title entry set.

[0045] Among them, entity refers to the real things in nature that appear in the text corpus. Entity is a specific thing, which can be a single thing or a collection of multiple things, such as names, places, organizational structures, etc.

[0046] Next, the number of identical title terms in the first title term set and the second title term set can be calculated; wherein, identical title terms refer to terms that are both in the first title term set and in the second title term set. When an identical title term in a title appears multiple times, only the number of the identical title term is marked as 1, regardless of the frequency of its repeated appearance.

[0047] Next, the title similarity can be determined based on the ratio of the number of identical title terms to the total number of terms included in the first title term set and the second title term set. The above calculation process can be described in the following formula:

[0048]

[0049] Wherein, A represents the first set of title terms, |A| represents the modulus of set A, that is, the number of elements in set A; B represents the second set of title terms, |B| represents the modulus of set B, that is, the number of elements in set B. i represents the ith term in set A. Based on the above formula, when the ith term in set A also belongs to set B, f(i, B) = 1, that is, the ith term is the same title word in set A and set B. When the ith term in set A does not belong to set B, f(i, B) = 0, that is, the ith term is a different title word in set A and set B. Wherein, the coefficient 2 in the numerator is used to ensure that the maximum value of the similarity calculation result S2 is 1. Based on formula 1, the title similarity of two news items, that is, the title similarity, can be calculated.

[0050] Embodiment 2: Calculate the text similarity between the first text and the second text according to the texts corresponding to the first text and the second text.

[0051] Optionally, word segmentation can be performed on the first text and the second text to obtain the respective sets of terms corresponding to the first text and the second text. Among them, the set of terms corresponding to the first text can be described as the first text term set, and the terms corresponding to the second text can be described as the second text term set.

[0052] Among them, word segmentation refers to splitting sentences and paragraphs to obtain the terms, single characters, etc. contained in the sentences. In some embodiments, to save data space and improve subsequent processing efficiency, a stop word removal operation can be performed on the results obtained from word segmentation, as Figure 2 shown. Among them, stop words refer to functional words that do not have practical meanings, such as "of", "in", "is", etc.

[0053] After obtaining the first text term set and the second text term set, the same text terms and different text terms in the first text term set and the second text term set can be obtained. Among them, the intersection of the first text term set and the second text term set can be determined to obtain the same text terms; after obtaining the same text terms, the other terms in the first text term set and the second text term set except the same text terms can be used as different text terms.

[0054] For the same text terms, the occurrence frequency of the same text terms in the first text term set can be calculated to obtain the first occurrence frequency, and the occurrence frequency of the same text terms in the second text term set can be calculated to obtain the second occurrence frequency. When the same text terms include multiple terms, the occurrence frequencies of these multiple terms in the first text term set can be accumulated to obtain the first occurrence frequency, and the occurrence frequencies of these multiple terms in the second text term set can be accumulated to obtain the second occurrence frequency.

[0055] For the different text terms, the occurrence frequency of the different text terms in the first text term set can be calculated to obtain the third occurrence frequency, and the occurrence frequency of the different text terms in the second text term set can be calculated to obtain the fourth occurrence frequency. When the different text terms include multiple terms, the occurrence frequencies of these multiple terms in the first text term set can be accumulated to obtain the third occurrence frequency, and the occurrence frequencies of these multiple terms in the second text term set can be accumulated to obtain the fourth occurrence frequency.

[0056] Next, the text similarity can be calculated based on the first occurrence frequency, the second occurrence frequency, the third occurrence frequency, the fourth occurrence frequency, and the respective text lengths of the first text and the second text.

[0057] In some exemplary embodiments, the smaller frequency of the first occurrence frequency and the second occurrence frequency may be calculated; the first occurrence frequency, the second occurrence frequency, the third occurrence frequency and the fourth occurrence frequency may be summed to obtain the total frequency; then, the text similarity may be determined based on the ratio of the smaller frequency to the total frequency.

[0058] Generally, if two news reports are about the same thing, then there is a high probability that the contents of the two news texts have a high degree of similarity. If the lengths of two similar news articles are different, the calculated similarity will be small, which is not in line with the actual situation.

[0059] In order to reduce the impact of text length on similarity, in some exemplary embodiments, a penalty term associated with text length may be further added during the process of calculating text similarity.

[0060] Optionally, the text lengths of the first text and the second text may be determined, and a similarity penalty term may be calculated based on the text lengths of the first text and the second text, wherein the similarity penalty term may be added to the total frequency, that is, the similarity penalty term is added to the total frequency to update the total frequency.

[0061] The above calculation process can be referred to the following formula:

[0062]

[0063] In Formula 2, N represents the set of identical text terms, i represents the i-th identical text term; M represents the set of different text terms, j represents the j-th different text term; a represents the first set of text terms, and b represents the second set of text terms. min() represents the function of taking the minimum value, and count() represents the function of counting the frequency of terms. F represents the similarity penalty term. Among them, the coefficient 2 on the numerator is used to ensure that the maximum value of the similarity calculation result S2 is 1, and min() is used to reduce the influence of certain terms that frequently appear in long texts on the similarity.

[0064] In some optional embodiments, when calculating the similarity penalty term, the absolute value of the text length difference between the first text and the second text may be calculated; if the absolute value of the text length difference is greater than or equal to a set first threshold, the product of the absolute value of the text length difference and a set coefficient α may be used as the similarity penalty term. If the text length difference is less than the set first threshold, a smaller fixed value may be set as the similarity penalty term, and the fixed value may be 0. The calculation process of the above similarity penalty term may refer to the following formula:

[0065]

[0066] In Formula 3, La represents the text length of the first text, Lb represents the text length of the second text, and γ is the first threshold value of the setting. La can be represented by the number of elements contained in the first text entry set, and Lb can be represented by the number of elements contained in the second text entry. α represents the coefficient of the penalty term, and the value coefficients of α and γ are empirical values; the value of α is positively correlated with the absolute value of the text length difference. The larger the difference in text length, the larger the value of α, thereby increasing the influence of text length on the similarity calculation result.

[0067] Among them, when the text length difference between the longest news text and the shortest news text in the massive news text in the database is hundreds of words, the value of γ can be taken as hundreds; when the text length difference between the longest news text and the shortest news text is thousands of words, the value of γ can be taken as thousands. For example, if the shortest news in the database has only 200 words and the longest news has 2,000 words, then γ can be taken as thousands.

[0068] Among them, α can be determined according to the actual text length difference. If the text length difference is large, α can be set to a larger value. If the text length difference is small, α can be set to a smaller value to minimize the impact of the text length difference on the similarity calculation. For example, the value of α can be 0.01, 0.05, 0.1, etc., which will not be repeated here.

[0069] Based on the above implementations, when calculating the similarity of news, the title and the text in the news are processed separately, which can reduce the impact of text length differences on the similarity to a certain extent, which is conducive to calculating a more accurate similarity. In addition, when performing similarity calculations, a penalty term related to text length is further added. When the length difference between the two news articles to be identified is large, the impact of text length on the similarity calculation can be further reduced, thereby improving the calculation accuracy of literal similarity.

[0070] Further optionally, if the absolute value of the text length difference is greater than a set second threshold value, the first sentence and the second sentence can be determined from the first text and the second text respectively, wherein the first sentence and the second sentence contain the largest number of identical text terms. Next, the sentence similarity of the first sentence and the second sentence can be calculated based on the respective semantics of the first sentence and the second sentence. Next, the sentence similarity and the text similarity calculated in the above embodiment can be weighted and summed to update the text similarity. Among them, the weighting coefficient of the sentence similarity is negatively correlated with the absolute value of the text length difference, that is, the larger the absolute value of the text length difference, the smaller the weighting coefficient of the sentence similarity. The above calculation process can be described by the following formula:

[0071] S2=w3*S2+w4*S3 Formula 4

[0072] In Formula 4, w3 and w4 represent the weights of text similarity and sentence similarity, respectively, and S3 represents sentence similarity.

[0073] Further optionally, at least one of the source, field and user comment data of each of the first news text and the second news text may be obtained. If the absolute value of the text length difference is greater than the set third threshold, and the number of identical text terms obtained by the aforementioned embodiment based on the intersection of the first text term set and the second text term set is less than the set fourth threshold, then the information similarity of the first news text and the second news text may be calculated based on at least one of the source, field and user comment data. Next, the information similarity and text similarity may be weighted and summed to update the text similarity; wherein the weight coefficient of the information similarity is negatively correlated with the absolute value of the text length difference. The above calculation process can be described by the following formula:

[0074] S2=w5*S2+w6*S4 Formula 5

[0075] In Formula 5, w5 and w6 represent the weights of the text similarity and the information similarity, respectively, and S4 represents the information similarity.

[0076] Among them, when calculating information similarity based on sources, fields and multiple information in user comment data, the value of information similarity can be the sum of similarities calculated from multiple information, or it can be the average value of similarities calculated from multiple information, or it can be the weighted average value of similarities calculated from multiple information, and this embodiment does not impose any limitation.

[0077] Among them, the first threshold, the second threshold, the third threshold and the fourth threshold can be set according to needs, and can be set to the same value or different values, which is not limited in this embodiment.

[0078] Further optionally, when calculating the similarity between the first news text and the second news text, the similarity added value may also be calculated from the user dimension, and the calculated similarity added value may be merged with the title similarity and text similarity calculated in the above-mentioned embodiment, as will be exemplified below.

[0079] In some optional embodiments, for the first news text and the second news text to be identified, the user who has collected the first news text and the user who has read the first news text may be determined, and the user who has collected the second news text and the user who has read the second news text may be determined. Next, the number of the same collection users corresponding to the first news text and the second news text may be determined.

[0080] The number of identical browsing users corresponding to the first news text and the second news text can be determined. Based on the number of identical favorite users and / or the number of identical browsing users, the similarity added value of the first news text and the second news text can be calculated. For example, news a is favorited by users 1, 2, and 3, and news b is favorited by users 2, 3, and 4, then the identical favorite users of news a and news b are user 2 and user 3. Among them, the more identical favorite users or identical browsing users of the two news articles, the greater the similarity added value. Next, the similarity added value can be merged with the title similarity and text similarity calculated in the aforementioned embodiment to obtain the similarity of the first news text and the second news text.

[0081] In some other optional embodiments, for the first news text and the second news text to be identified that have been read by the same user, the reading behavior corresponding to the user's reading of the first news text can be obtained, and the reading behavior corresponding to the user's reading of the second news text can be obtained. Among them, the reading behavior includes: at least one of the dwell time during reading, the operation record after reading (such as the click record of the relevant or highly similar article link), the click record of the embedded video link in the news, and the viewing time. Based on the reading behavior corresponding to the user's reading of the first news text and the reading behavior corresponding to the user's reading of the second news text, the similarity added value of the first news text and the second news text for the user can be calculated. Next, the similarity added value can be merged with the title similarity and the text similarity calculated in the above embodiment to obtain the similarity of the first news text and the second news text, that is, the similarity of the first news text and the second news text to the user.

[0082] The above reading behavior data can reflect the user's interest in news. When the user's interest in two news articles is similar, it can be considered that the two news articles are likely to be similar.

[0083] In this way, the similarity of different news to the user can be obtained. Optionally, after obtaining the similarity of different news to the user, a personalized recommendation service can be provided to the user based on the similarity, such as recommending to the user a fourth news text that has the greatest similarity to a third news text previously recommended to the user.

[0084] Optionally, the reading behavior data may include: user feedback data on the first news text and user feedback data on the second news text, and the feedback data may be text evaluation data or voice evaluation data, etc. That is, when the user feedback data on two news articles are relatively similar, it can be considered that the two news articles have a high probability of being similar.

[0085] Optionally, the above reading behavior data may include: the device used by the same user when viewing the first news text and the device used by the user when viewing the second news text. The device may include: mobile phone, smart watch, Pad (tablet computer), TV, smart home device. That is, when the user uses the same device to browse the two news articles, it can be considered that the two news articles have a high probability of being similar, wherein, based on the reading behavior corresponding to the user reading the first news text and the reading behavior corresponding to the user reading the second news text, the calculated similarity added value of the first news text and the second news text for the user is positively correlated with the total usage time / reading time of the user on the device within a preset time period.

[0086] Optionally, the reading behavior data may include: the APP (application) used by the same user when viewing the first news text, and the APP used when viewing the second news text. For example, if a user reads news a and news b in a certain APP, it can be considered that the similarity probability between news a and news b is relatively high, wherein, based on the reading behavior corresponding to the user reading the first news text and the reading behavior corresponding to the user reading the second news text, the calculated similarity added value of the first news text and the second news text for the user is positively correlated with the total usage time of the user for the APP within a preset time period.

[0087] It is worth noting that the above and following embodiments of the present application can also be applied to the similarity recognition process of news-type short videos. In some embodiments, the news text can be obtained by performing voice recognition on the news video, wherein the first news text and the second news text to be recognized are obtained, including: extracting the name or introduction and other information corresponding to the first news video as the news title of the first news (i.e., the first title), and extracting the name or introduction and other information corresponding to the second news video as the news title of the second news (i.e., the second title); and extracting the voices contained in the first news video and the second news video respectively, and performing voice recognition on the extracted voices to obtain the content text corresponding to the first news video and the content text corresponding to the second news video, i.e., the first text and the second text mentioned above.

[0088] For example, for two short videos to be compared, the text descriptions of the two short videos can be obtained as titles, and the voices in the two short videos can be recognized to obtain the content texts corresponding to the two short videos as the text. Next, the title similarity between any two short videos can be calculated based on the titles corresponding to the two short videos, and the text similarity of the two short videos can be calculated based on the texts corresponding to the two short videos and the text lengths of the two short videos. The calculated title similarity and text similarity are merged to obtain the similarity of the two short videos.

[0089] It should be noted that the execution subject of each step of the method provided in the above embodiment can be the same device, or the method can be executed by different devices. For example, the execution subject of steps 201 to 204 can be device A; for another example, the execution subject of steps 201 and 202 can be device A, and the execution subject of step 203 can be device B; and so on.

[0090] In addition, in some of the processes described in the above embodiments and the accompanying drawings, multiple operations that appear in a specific order are included, but it should be clearly understood that these operations may not be executed in the order in which they appear in this article or executed in parallel, and the sequence numbers of the operations, such as 201, 202, etc., are only used to distinguish between different operations, and the sequence numbers themselves do not represent any execution order. In addition, these processes may include more or fewer operations, and these operations may be executed in sequence or in parallel. It should be noted that the descriptions of "first", "second", etc. in this article are used to distinguish different messages, devices, modules, etc., do not represent the order of precedence, and do not limit the "first" and "second" to be different types.

[0091] Figure 3 is a schematic diagram of the structure of an electronic device provided by an exemplary embodiment of the present application, and the electronic device is suitable for executing the similar news identification method provided by the above-mentioned embodiment. Figure 3 As shown, the electronic device includes: a memory 301 , a processor 302 and a communication component 303 .

[0092] The memory 301 is used to store computer programs and can be configured to store various other data to support operations on the electronic device. Examples of such data include instructions for any application or method operating on the electronic device, contact data, phone book data, messages, pictures, videos, etc.

[0093] Among them, the memory 301 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk.

[0094] The processor 302 is coupled to the memory 301 and is used to execute the computer program in the memory 301, so as to: obtain a first news text and a second news text to be identified through the communication component 303; the first news text includes a first title and a first text, and the second news text includes a second title and a second text; calculate the title similarity between the first title and the second title according to the texts corresponding to the first title and the second title respectively; calculate the text similarity between the first text and the second text according to the texts corresponding to the first text and the second text respectively and the text lengths corresponding to the first text and the second text respectively; merge the title similarity and the text similarity to obtain the similarity between the first news text and the second news text.

[0095] Further optionally, when the processor 302 calculates the title similarity between the first title and the second title based on the texts corresponding to each of the first title and the second title, it is specifically used to: perform a keyword extraction operation on the first title and the second title to obtain a first title term set and a second title term set; calculate the number of terms that are simultaneously in the first title term set and the second title term set as the number of identical title terms; and determine the title similarity based on the ratio of the number of identical title terms to the total number of terms contained in the first title term set and the second title term set.

[0096] Further optionally, when the processor 302 performs a keyword extraction operation on the first title and the second title, it is specifically used to: extract entries corresponding to entities, entries with a noun part of speech, and / or entries with a verb part of speech from the first title and the second title.

[0097] Further optionally, when the processor 302 calculates the text similarity between the first text and the second text according to the texts corresponding to the first text and the second text and the text lengths corresponding to the first text and the second text, it is specifically used to: perform word segmentation processing on the first text and the second text to obtain a first text term set and a second text term set; determine the intersection of the first text term set and the second text term set to obtain the same text terms; determine the first text term set and the second text term set, except for the same text terms. The other terms other than the term are taken as different text terms; the occurrence frequencies of the same text terms in the first text term set and the second text term set are calculated respectively to obtain a first occurrence frequency and a second occurrence frequency; the occurrence frequencies of the different text terms in the first text term set and the second text term set are calculated respectively to obtain a third occurrence frequency and a fourth occurrence frequency; the text similarity is calculated according to the first occurrence frequency, the second occurrence frequency, the third occurrence frequency, the fourth occurrence frequency and the respective text lengths of the first text and the second text.

[0098] Further optionally, when the processor 302 calculates the text similarity based on the first occurrence frequency, the second occurrence frequency, the third occurrence frequency, the fourth occurrence frequency, and the text lengths of the first text and the second text, the processor 302 is specifically used to: calculate the smaller frequency of the first occurrence frequency and the second occurrence frequency; sum the first occurrence frequency, the second occurrence frequency, the third occurrence frequency, and the fourth occurrence frequency to obtain the total frequency; calculate the similarity penalty term based on the text lengths of the first text and the second text; and determine the text similarity based on the smaller frequency, the total frequency, and the similarity penalty term.

[0099] Further optionally, when the processor 302 determines the text similarity based on the smaller frequency, the total frequency and the similarity penalty item, it is specifically used to: add the similarity penalty item to the total frequency to update the total frequency; and determine the text similarity based on the ratio of the smaller frequency to the updated total frequency.

[0100] Further optionally, when the processor 302 calculates the similarity penalty item based on the respective text lengths of the first text and the second text, it is specifically used to: calculate the absolute value of the text length difference between the first text and the second text; if the absolute value of the text length difference is greater than or equal to a set first threshold, then use the product of the absolute value of the text length difference and the set coefficient α as the similarity penalty item.

[0101] Further optionally, the processor 302 is also used for: if the absolute value of the text length difference is greater than a set second threshold value, determining the first sentence and the second sentence from the first text and the second text respectively, the first sentence and the second sentence containing the largest number of identical text terms; calculating the sentence similarity between the first sentence and the second sentence according to the respective semantics of the first sentence and the second sentence; performing weighted summation of the sentence similarities and the text similarities to update the text similarity; the weighted coefficient of the sentence similarity is negatively correlated with the absolute value of the text length difference.

[0102] Further optionally, the processor 302 is also used to: obtain at least one of the source, field and user comment data of each of the first news text and the second news text; if the absolute value of the text length difference is greater than a set third threshold, and the number of the same text entries is less than a set fourth threshold, then calculate the information similarity between the first news text and the second news text according to at least one of the source, field and user comment data; perform weighted summation of the information similarity and the text similarity to update the text similarity; the weighted coefficient of the information similarity is negatively correlated with the absolute value of the text length difference.

[0103] Further optionally, when the processor 302 fuses the title similarity and the text similarity to obtain the similarity between the first news text and the second news text, it is specifically used to: perform weighted summation of the title similarity and the text similarity according to a preset weight coefficient to obtain the similarity between the first news text and the second news text.

[0104] Further, if Figure 3 As shown, the electronic device also includes: a display component 304, a power component 305, an audio component 306 and other components. Figure 3 Only some components are shown schematically, which does not mean that the electronic device only includes Figure 3 Components shown.

[0105] Among them, the communication component 503 is configured to facilitate wired or wireless communication between the device where the communication component is located and other devices. The device where the communication component is located can access a wireless network based on a communication standard, such as WiFi, 2G, 3G, 4G or 5G, or a combination thereof. In an exemplary embodiment, the communication component receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component can be implemented based on near field communication (NFC) technology, radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0106] The display component 304 includes a screen, which may include a liquid crystal display component (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation.

[0107] The power supply component 305 provides power to various components of the device where the power supply component is located. The power supply component may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device where the power supply component is located.

[0108] Among them, the audio component 306 can be configured to output and / or input audio signals. For example, the audio component includes a microphone (MIC), and when the device where the audio component is located is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in a memory or sent via a communication component. In some embodiments, the audio component also includes a speaker for outputting an audio signal.

[0109] In this embodiment, when calculating the similarity of news, the title and the text in the news are processed separately, and the similarity of the title is calculated based on the text corresponding to the title, and the similarity of the text is calculated based on the text corresponding to the text and the text length, which can reduce the impact of the text length difference on the similarity to a certain extent, and is conducive to calculating a more accurate similarity. At the same time, the similarity of the title and the similarity of the text are merged to obtain the similarity of the news, and the similarity calculation result of the news text can be quickly obtained, which reduces the time cost and calculation cost required for identifying similar news and improves the recognition efficiency of similar news.

[0110] Accordingly, an embodiment of the present application further provides a computer-readable storage medium storing a computer program, which, when executed, can implement each step that can be performed by an electronic device in the above method embodiment.

[0111] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0112] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0113] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0114] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0115] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0116] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0117] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0118] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0119] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims

1. A similar news identification method, characterized in that: include: Acquire a first news text and a second news text to be identified; The first news text includes a first title and a first text, and the second news text includes a second title and a second text; Calculating the title similarity between the first title and the second title according to the texts corresponding to the first title and the second title respectively; Calculating a similarity penalty item according to the text lengths corresponding to the first text and the second text; Calculating the text similarity between the first text and the second text according to the texts corresponding to the first text and the second text and the similarity penalty item; Merging the title similarity and the text similarity to obtain the similarity between the first news text and the second news text; The method also includes: calculating the absolute value of the text length difference between the first text and the second text; if the absolute value of the text length difference is greater than a set second threshold, determining a first sentence and a second sentence from the first text and the second text respectively, wherein the first sentence and the second sentence contain the largest number of identical text terms; calculating the sentence similarity between the first sentence and the second sentence according to the respective semantics of the first sentence and the second sentence; performing weighted summation on the sentence similarity and the text similarity to update the text similarity; the weighted coefficient of the sentence similarity is negatively correlated with the absolute value of the text length difference.

2. The method according to claim 1, characterized in that Calculating the title similarity between the first title and the second title according to the texts corresponding to the first title and the second title respectively includes: Performing a keyword extraction operation on the first title and the second title to obtain a first title term set and a second title term set; Calculate the number of entries that are both in the first title entry set and the second title entry set as the number of identical title entries; The title similarity is determined based on the ratio of the number of the same title terms to the total number of terms included in the first title term set and the second title term set.

3. The method according to claim 2, characterized in that Performing a keyword extraction operation on the first title and the second title includes: From the first title and the second title, extract the entries corresponding to the entity, the entries whose part of speech is noun and / or the entries whose part of speech is verb.

4. The method according to claim 1, characterized in that: Calculating the text similarity between the first text and the second text according to the texts corresponding to the first text and the second text and the text lengths corresponding to the first text and the second text, including: Performing word segmentation processing on the first text and the second text to obtain a first text word set and a second text word set; Determine the intersection of the first text term set and the second text term set to obtain the same text terms; Determining other terms in the first text term set and the second text term set, except for the same text terms, as different text terms; Calculating the occurrence frequencies of the same text terms in the first text term set and the second text term set respectively to obtain a first occurrence frequency and a second occurrence frequency; Calculating the occurrence frequencies of the different text terms in the first text term set and the second text term set respectively to obtain a third occurrence frequency and a fourth occurrence frequency; The text similarity is calculated according to the first occurrence frequency, the second occurrence frequency, the third occurrence frequency, the fourth occurrence frequency, and the text length of each of the first text and the second text.

5. The method according to claim 4, characterized in that Calculating the text similarity according to the first occurrence frequency, the second occurrence frequency, the third occurrence frequency, the fourth occurrence frequency, and the text length of each of the first text and the second text includes: Calculating the smaller frequency between the first occurrence frequency and the second occurrence frequency; summing the first occurrence frequency, the second occurrence frequency, the third occurrence frequency, and the fourth occurrence frequency to obtain a total frequency; Calculating a similarity penalty item according to the text lengths of the first text and the second text; The text similarity is determined according to the smaller frequency, the total frequency and the similarity penalty item.

6. The method according to claim 5, characterized in that Determining the text similarity according to the smaller frequency, the total frequency, and the similarity penalty term includes: Adding the similarity penalty item to the total frequency to update the total frequency; The text similarity is determined according to the ratio of the smaller frequency to the updated total frequency.

7. The method according to claim 5, characterized in that Calculating a similarity penalty item according to the text lengths of the first text and the second text, including: If the absolute value of the text length difference is greater than or equal to a set first threshold, the product of the absolute value of the text length difference and a set coefficient α is used as the similarity penalty item.

8. The method according to claim 7, characterized in that Also includes: Obtaining at least one of the source, field, and user comment data of the first news text and the second news text; If the absolute value of the text length difference is greater than a set third threshold value, and the number of the same text entries is less than a set fourth threshold value, then calculating the information similarity between the first news text and the second news text according to at least one of the source, field, and user comment data; The information similarity and the text similarity are weighted and summed to update the text similarity; the weight coefficient of the information similarity is negatively correlated with the absolute value of the text length difference.

9. The method according to any one of claims 1 to 7, characterized in that: The title similarity and the text similarity are merged to obtain the similarity between the first news text and the second news text, including: According to a preset weight coefficient, the title similarity and the text similarity are weighted and summed to obtain the similarity between the first news text and the second news text.

10. An electronic device, characterized in that: include: Memory and processor; The memory is used to store one or more computer instructions; The processor is configured to execute the one or more computer instructions to perform the steps in the method according to any one of claims 1 to 9.

11. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps in the method described in any one of claims 1 to 9 can be implemented.