[go: up one dir, main page]

CN107748801A - News recommendation method, device, terminal device and computer-readable storage medium - Google Patents

News recommendation method, device, terminal device and computer-readable storage medium Download PDF

Info

Publication number
CN107748801A
CN107748801A CN201711138838.7A CN201711138838A CN107748801A CN 107748801 A CN107748801 A CN 107748801A CN 201711138838 A CN201711138838 A CN 201711138838A CN 107748801 A CN107748801 A CN 107748801A
Authority
CN
China
Prior art keywords
news
recommended
alternative
determined
space
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201711138838.7A
Other languages
Chinese (zh)
Other versions
CN107748801B (en
Inventor
王昕煜
李辰
姜迪
何径舟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201711138838.7A priority Critical patent/CN107748801B/en
Publication of CN107748801A publication Critical patent/CN107748801A/en
Application granted granted Critical
Publication of CN107748801B publication Critical patent/CN107748801B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9535Search customisation based on user profiles and personalisation

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a news recommendation method, a news recommendation device, terminal equipment and a computer readable storage medium, wherein the method comprises the following steps: acquiring news to be recommended; determining a target space to which the news to be recommended belongs by using a preset space division method; and determining first alternative news related to the news to be recommended according to the target space to which the recommended news belongs. Therefore, the first alternative news belonging to the same space with the news to be recommended is recommended to the user, the semantic correlation between the first alternative news and the news to be recommended is guaranteed, the recommendation result is more accurate, and the user experience is better.

Description

新闻推荐方法、装置、终端设备及计算机可读存储介质News recommendation method, device, terminal device and computer-readable storage medium

技术领域technical field

本发明涉及计算机技术领域,尤其涉及一种新闻推荐方法、装置、终端设备及计算机可读存储介质。The present invention relates to the field of computer technology, in particular to a news recommendation method, device, terminal equipment and computer-readable storage medium.

背景技术Background technique

随着信息技术和互联网的飞速发展,网络新闻越来越受到人们的欢迎,成为人们日常生活中获取信息的一种主要的途径。近些年随着移动互联的发展,除了人们熟知的各大网站和网络自媒体平台(例如,微博等)之外,众多新闻内容提供商也通过可应用于移动通信产品上的应用软件(APP)向用户提供大量的新闻资讯。With the rapid development of information technology and the Internet, network news has become more and more popular and has become a major way for people to obtain information in their daily lives. In recent years, with the development of the mobile Internet, in addition to the well-known major websites and network self-media platforms (such as Weibo, etc.), many news content providers also use the application software that can be applied to mobile communication products ( APP) provides users with a large amount of news information.

现有的新闻推荐方法,在获取到用户的搜索语句后,或在当前新闻的基础上,主要通过倒排索引的方式进行新闻索引,从而将召回的新闻推荐给用户。然而,倒排索引方式仅仅是基于词频统计方式进行召回,忽略了推荐新闻中其余部分所包含的内容与搜索语句或当前新闻的相关性。例如,对搜索语句“建军节”进行召回时,仅会将“建军”“节”在各新闻中的出现频次计入统计,而其它与“建军节”相关的词语如“八一”、“阅兵”、“南昌起义”等词语的频次不会计入统计,从而为用户推荐的新闻与搜索语句或当前新闻的语义相关性差,准确性低,推荐效果和用户体验不好。In the existing news recommendation method, after obtaining the user's search sentence, or based on the current news, the news index is mainly carried out through the inverted index, so as to recommend the recalled news to the user. However, the inverted index method is only based on word frequency statistics, ignoring the relevance of the content contained in the rest of the recommended news to the search sentence or the current news. For example, when recalling the search phrase "Army Day", only the frequency of occurrence of "Jianjun" and "Jie" in various news will be included in the statistics, while other words related to "Army Day" such as "August 1 ", "Military Parade", "Nanchang Uprising" and other words are not included in the statistics, so that the news recommended for users has poor semantic correlation with the search sentence or current news, and the accuracy is low, and the recommendation effect and user experience are not good.

发明内容Contents of the invention

本发明旨在至少在一定程度上解决相关技术中的技术问题之一。The present invention aims to solve one of the technical problems in the related art at least to a certain extent.

为此,本发明提出一种新闻推荐方法,通过将与待推荐新闻属于同一空间的第一备选新闻推荐给用户,保证了第一备选新闻与待推荐新闻语义相关,从而使得推荐结果更准确,用户体验更好。Therefore, the present invention proposes a news recommendation method. By recommending the first candidate news belonging to the same space as the news to be recommended to the user, it is ensured that the first candidate news is semantically related to the news to be recommended, thereby making the recommendation result more accurate. Accurate, better user experience.

本发明还提出一种新闻推荐装置。The invention also proposes a news recommendation device.

本发明还提出一种终端设备。The invention also proposes a terminal device.

本发明还提出一种计算机可读存储介质。The invention also proposes a computer-readable storage medium.

本发明第一方面实施例提出了一种新闻推荐方法,包括:获取待推荐新闻;利用预设的空间划分方法,确定所述待推荐新闻所属的目标空间;根据所述待推荐新闻所属的目标空间,确定与所述待推荐新闻关联的第一备选新闻。The embodiment of the first aspect of the present invention proposes a news recommendation method, including: obtaining news to be recommended; using a preset space division method to determine the target space to which the news to be recommended belongs; Space, determine the first candidate news associated with the news to be recommended.

本发明实施例的新闻推荐方法,在获取待推荐新闻后,通过利用预设的空间划分方法,确定待推荐新闻所属的目标空间,从而根据待推荐新闻所属的目标空间,确定与待推荐新闻关联的第一备选新闻。由此,通过将与待推荐新闻属于同一空间的第一备选新闻推荐给用户,保证了第一备选新闻与待推荐新闻语义相关,从而使得推荐结果更准确,用户体验更好。In the news recommendation method of the embodiment of the present invention, after the news to be recommended is acquired, the target space to which the news to be recommended belongs is determined by using a preset space division method, so as to determine the information associated with the news to be recommended according to the target space to which the news to be recommended belongs. The first alternative news for . Therefore, by recommending the first candidate news belonging to the same space as the news to be recommended to the user, it is ensured that the first candidate news is semantically related to the news to be recommended, so that the recommendation result is more accurate and the user experience is better.

本发明第二方面实施例提出了一种新闻推荐装置,包括:获取模块,用于获取待推荐新闻;第一确定模块,用于利用预设的空间划分方法,确定所述待推荐新闻所属的目标空间;第二确定模块,用于根据所述待推荐新闻所属的目标空间,确定与所述待推荐新闻关联的第一备选新闻。The embodiment of the second aspect of the present invention proposes a news recommendation device, including: an acquisition module, used to acquire news to be recommended; a first determination module, used to use a preset space division method to determine the news to be recommended belongs to Target space; a second determining module, configured to determine the first candidate news associated with the news to be recommended according to the target space to which the news to be recommended belongs.

本发明实施例的新闻推荐装置,在获取待推荐新闻后,通过利用预设的空间划分方法,确定待推荐新闻所属的目标空间,从而根据待推荐新闻所属的目标空间,确定与待推荐新闻关联的第一备选新闻。由此,通过将与待推荐新闻属于同一空间的第一备选新闻推荐给用户,保证了第一备选新闻与待推荐新闻语义相关,从而使得推荐结果更准确,用户体验更好。The news recommendation device of the embodiment of the present invention, after obtaining the news to be recommended, determines the target space to which the news to be recommended belongs by using the preset space division method, so as to determine the information related to the news to be recommended according to the target space to which the news to be recommended belongs. The first alternative news for . Therefore, by recommending the first candidate news belonging to the same space as the news to be recommended to the user, it is ensured that the first candidate news is semantically related to the news to be recommended, so that the recommendation result is more accurate and the user experience is better.

本发明第三方面实施例提出了一种终端设备,包括:The embodiment of the third aspect of the present invention proposes a terminal device, including:

存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,其特征在于,所述处理器执行所述程序时实现如第一方面所述的新闻推荐方法。A memory, a processor, and a computer program stored on the memory and operable on the processor, wherein the processor implements the news recommendation method as described in the first aspect when executing the program.

本发明第四方面实施例提出了一种计算机可读存储介质,其上存储有计算机程序,当所述程序被处理器执行时实现如第一方面所述的新闻推荐方法。The embodiment of the fourth aspect of the present invention provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the news recommendation method as described in the first aspect is implemented.

附图说明Description of drawings

本发明上述的和/或附加的方面和优点从下面结合附图对实施例的描述中将变得明显和容易理解,其中:The above and/or additional aspects and advantages of the present invention will become apparent and easy to understand from the following description of the embodiments in conjunction with the accompanying drawings, wherein:

图1是本发明一个实施例的新闻推荐方法的流程图;Fig. 1 is the flowchart of the news recommendation method of an embodiment of the present invention;

图2是本发明另一个实施例的新闻推荐方法的流程图;Fig. 2 is a flowchart of a news recommendation method according to another embodiment of the present invention;

图3是本发明一个实施例的新闻推荐装置的结构示意图;FIG. 3 is a schematic structural diagram of a news recommendation device according to an embodiment of the present invention;

图4是本发明另一个实施例的新闻推荐装置的结构示意图;Fig. 4 is a schematic structural diagram of a news recommendation device according to another embodiment of the present invention;

图5是本发明一个实施例的终端设备的结构示意图。Fig. 5 is a schematic structural diagram of a terminal device according to an embodiment of the present invention.

具体实施方式Detailed ways

下面详细描述本发明的实施例,所述实施例的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施例是示例性的,旨在用于解释本发明,而不能理解为对本发明的限制。Embodiments of the present invention are described in detail below, examples of which are shown in the drawings, wherein the same or similar reference numerals designate the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by referring to the figures are exemplary and are intended to explain the present invention and should not be construed as limiting the present invention.

具体的,本发明各实施例针对现有的新闻推荐方法,在获取到用户的搜索语句后,或在当前新闻的基础上,主要通过倒排索引的方式进行新闻索引,从而将召回的新闻推荐给用户,然而,倒排索引方式仅仅是基于词频统计方式进行召回,忽略了推荐新闻中其余部分所包含的内容与搜索语句或当前新闻的相关性,从而为用户推荐的新闻与搜索语句或当前新闻的语义相关性差,准确性低,推荐效果和用户体验不好的问题,提出一种新闻推荐方法。Specifically, each embodiment of the present invention aims at the existing news recommendation method. After obtaining the user's search sentence, or on the basis of the current news, the news index is mainly carried out through the inverted index, so that the recalled news is recommended For users, however, the inverted index method is only based on word frequency statistics to recall, ignoring the relevance of the content contained in the rest of the recommended news and the search sentence or current news, so that the news recommended by the user is related to the search sentence or the current news To solve the problems of poor semantic correlation, low accuracy, poor recommendation effect and user experience of news, a news recommendation method is proposed.

本发明实施例提供的新闻推荐方法,在获取待推荐新闻后,通过利用预设的空间划分方法,确定待推荐新闻所属的目标空间,从而根据待推荐新闻所属的目标空间,确定与待推荐新闻关联的第一备选新闻。由此,通过将与待推荐新闻属于同一空间的第一备选新闻推荐给用户,保证了第一备选新闻与待推荐新闻语义相关,从而使得推荐结果更准确,用户体验更好。In the news recommendation method provided by the embodiment of the present invention, after obtaining the news to be recommended, the target space to which the news to be recommended belongs is determined by using a preset space division method, so as to determine the news to be recommended according to the target space to which the news to be recommended belongs. The associated first alternative news. Therefore, by recommending the first candidate news belonging to the same space as the news to be recommended to the user, it is ensured that the first candidate news is semantically related to the news to be recommended, so that the recommendation result is more accurate and the user experience is better.

图1是本发明一个实施例的新闻推荐方法的流程图。Fig. 1 is a flowchart of a news recommendation method according to an embodiment of the present invention.

如图1所示,该新闻推荐方法包括:As shown in Figure 1, the news recommendation method includes:

步骤101,获取待推荐新闻。Step 101, obtaining news to be recommended.

其中,本发明实施例提供的新闻推荐方法的执行主体,为本发明实施例提供的新闻推荐装置,该装置可以被配置在任何终端设备中,以进行新闻推荐。Wherein, the execution body of the news recommendation method provided by the embodiment of the present invention is the news recommendation device provided by the embodiment of the present invention, and the device can be configured in any terminal device for news recommendation.

其中,待推荐新闻,可以是新闻库中的任一新闻,也可以是用户输入的搜索语句,还可以是当前新闻。Wherein, the news to be recommended may be any news in the news library, may also be a search sentence input by the user, or may be current news.

步骤102,利用预设的空间划分方法,确定待推荐新闻所属的目标空间。Step 102, using a preset space division method, to determine the target space to which the news to be recommended belongs.

其中,空间划分方法,可以是近似最近邻算法(Approximate Nearest Neighbor,简称ANN)或其它方法,本申请对此不作限定。Wherein, the space division method may be an approximate nearest neighbor algorithm (Approximate Nearest Neighbor, ANN for short) or other methods, which are not limited in this application.

具体的,获取到待推荐新闻后,可以根据待推荐新闻对应的词袋向量,确定待推荐新闻所属的目标空间。Specifically, after obtaining the news to be recommended, the target space to which the news to be recommended belongs can be determined according to the bag-of-words vector corresponding to the news to be recommended.

即,在步骤102之前,还可以包括:That is, before step 102, it may also include:

确定待推荐新闻对应的词袋向量。Determine the bag-of-words vector corresponding to the news to be recommended.

其中,词袋向量,可以是待推荐新闻的标题或摘要对应的词袋向量,也可以是待推荐新闻的具体内容对应的词袋向量。另外,词袋向量中的元素可以是待推荐新闻的标题、摘要或具体内容中,各词语出现的频次,也可以是各词语的词频-逆向文件频率(TermFrequency-Inverse Document Frequency,简称TF-IDF)值等等,此处不作限制。Wherein, the bag-of-words vector may be a bag-of-words vector corresponding to the title or abstract of the news to be recommended, or may be a bag-of-words vector corresponding to the specific content of the news to be recommended. In addition, the elements in the bag of words vector can be the frequency of occurrence of each word in the title, abstract or specific content of the news to be recommended, or the term frequency-inverse document frequency (Term Frequency-Inverse Document Frequency, TF-IDF for short) of each word ) values, etc., are not limited here.

具体的,可以根据新闻库中的各新闻预先设置词典,并为词典中的每个词语设置一个位置或索引,从而在获取到待推荐新闻后,可以利用各词语的索引号,确定待推荐新闻对应的词袋向量。Specifically, a dictionary can be preset according to each news in the news database, and a position or index can be set for each word in the dictionary, so that after obtaining the news to be recommended, the index number of each word can be used to determine the news to be recommended The corresponding bag-of-words vector.

比如,假设词袋向量中的元素,为推荐新闻的标题中各词语出现的频次,词典为Dictionary={1.“Bob”,2.“likes”,3.“to”,4.“play”,5.“basketball”,6.“also”,7.“football”,8.“games”,9.“Jim”,10.“too”},其中“1”至“10”分别为各词语对应的索引。当待推荐新闻为“Bob likes to play basketball,Jim likes too”时,由于“likes”在待推荐新闻中出现两次,“Bob”、“to”、“play”、“basketball”、“Jim”、“too”均在待推荐新闻中出现一次,“also”、“football”、“games”均未在待推荐新闻中出现,则根据词典的索引号,可以确定待推荐新闻对应的词袋向量为[1,2,1,1,1,0,0,0,1,1]。For example, assuming that the elements in the bag of words vector are the frequency of occurrence of each word in the title of the recommended news, the dictionary is Dictionary={1. "Bob", 2. "likes", 3. "to", 4. "play" ,5. "basketball", 6. "also", 7. "football", 8. "games", 9. "Jim", 10. "too"}, where "1" to "10" are the words the corresponding index. When the news to be recommended is "Bob likes to play basketball, Jim likes too", since "likes" appears twice in the news to be recommended, "Bob", "to", "play", "basketball", "Jim" , "too" all appear once in the news to be recommended, and "also", "football" and "games" do not appear in the news to be recommended, then according to the index number of the dictionary, the word bag vector corresponding to the news to be recommended can be determined is [1,2,1,1,1,0,0,0,1,1].

相应的,步骤102具体可以包括:Correspondingly, step 102 may specifically include:

根据待推荐新闻对应的词袋向量,利用近似最近邻算法,确定待推荐新闻所属的目标空间。According to the bag-of-words vector corresponding to the news to be recommended, the approximate nearest neighbor algorithm is used to determine the target space to which the news to be recommended belongs.

其中,近似最近邻算法,可以是局部敏感哈希、随机投影森林、k-维(k-dimensionaltree,简称k-d)树等算法。Wherein, the approximate nearest neighbor algorithm may be algorithms such as locality-sensitive hashing, random projection forest, and k-dimensional (k-dimensional tree, k-d) tree for short.

具体的,利用近似最近邻算法,确定待推荐新闻所属的目标空间时,可以预先设置空间的划分条件,从而在确定了待推荐新闻对应的词袋向量后,可以根据预设的条件,确定待推荐新闻所属的目标空间。Specifically, when using the approximate nearest neighbor algorithm to determine the target space to which the news to be recommended belongs, the division conditions of the space can be set in advance, so that after the bag-of-words vector corresponding to the news to be recommended is determined, the to-be-recommended news can be determined according to the preset conditions. The target space that the recommended news belongs to.

举例来说,假设根据词袋向量中每个元素的权值是否大于5进行空间划分,新闻库中的新闻A、B、C、D、E、F分别对应的词袋向量为[1,8,6,7,0,1]、[4,3,1,0,0,1]、[2,1,1,1,0,0]、[6,3,1,4,2,0]、[7,6,2,0,0,1]、[8,1,1,0,0,1]。由于新闻A、B、C分别对应的词袋向量中第一个元素的权值小于5,新闻D、E、F分别对应的词袋向量中第一个元素的权值大于5,因此可以将新闻A、B、C划分到空间a中,将新闻D、E、F划分到空间b中。For example, assuming that the space is divided according to whether the weight of each element in the word bag vector is greater than 5, the word bag vectors corresponding to the news A, B, C, D, E, and F in the news library are [1,8 ,6,7,0,1], [4,3,1,0,0,1], [2,1,1,1,0,0], [6,3,1,4,2,0 ], [7,6,2,0,0,1], [8,1,1,0,0,1]. Since the weight of the first element in the bag-of-words vector corresponding to news A, B, and C is less than 5, and the weight of the first element in the bag-of-words vector corresponding to news D, E, and F is greater than 5, it can be News A, B, and C are divided into space a, and news D, E, and F are divided into space b.

进一步的,还可以对空间a和b中的新闻进一步划分空间。由于新闻A对应的词袋向量中第二个元素的权值大于5,新闻B、C分别对应的词袋向量中第二个元素的权值小于5,则可以将空间a中的新闻A划分到空间a1中,将空间a中的新闻B、C划分到空间a2中。由于新闻D、F分别对应的词袋向量中第二个元素的权值小于5,新闻E对应的词袋向量中第二个元素的权值大于5,则可以将空间b中的新闻D、F划分到空间b1中,将空间b中的新闻E划分到空间b2中。Further, the news in spaces a and b may be further divided into spaces. Since the weight of the second element in the bag-of-words vector corresponding to news A is greater than 5, and the weight of the second element in the bag-of-words vector corresponding to news B and C is less than 5, news A in space a can be divided into In space a1, news B and C in space a are divided into space a2. Since the weight of the second element in the bag-of-words vector corresponding to news D and F is less than 5, and the weight of the second element in the bag-of-words vector corresponding to news E is greater than 5, news D, F is divided into space b1, and news E in space b is divided into space b2.

利用近似最近邻算法,可以在新闻库中包含大量的新闻时,仍然可以快速的确定待推荐新闻所属的目标空间。Using the approximate nearest neighbor algorithm, when the news library contains a large number of news, it can still quickly determine the target space to which the news to be recommended belongs.

步骤103,根据待推荐新闻所属的目标空间,确定与待推荐新闻关联的第一备选新闻。Step 103, according to the target space to which the news to be recommended belongs, determine the first candidate news associated with the news to be recommended.

其中,第一备选新闻为新闻库中,与待推荐新闻语义相关的新闻。Wherein, the first candidate news is the news semantically related to the news to be recommended in the news database.

需要说明的是,第一备选新闻,可能是一条新闻,也可能是多条新闻。It should be noted that the first candidate news may be one piece of news, or may be multiple pieces of news.

可以理解的是,通过上述空间划分方法,可以将语义相关的新闻划分到同一空间中。而同一空间中的新闻的相关程度可能不同,在本发明实施例中,还可以确定同一空间中的任一新闻与其它新闻间的相关程度,从而根据相关程度,确定与任一新闻关联的第一备选新闻。It can be understood that, through the above space division method, semantically related news can be divided into the same space. However, the degree of correlation of news in the same space may be different. In the embodiment of the present invention, the degree of correlation between any news in the same space and other news can also be determined, so as to determine the first news associated with any news according to the degree of correlation. One alternative news.

具体的,步骤103可以包括:Specifically, step 103 may include:

确定目标空间中各新闻与待推荐新闻间的各相似度;Determine the similarity between each news in the target space and the news to be recommended;

根据各相似度,确定第一备选新闻。According to each degree of similarity, the first candidate news is determined.

其中,相似度,用来表征目标空间中各新闻与待推荐新闻间的相关程度,相似度越大,表示各新闻与待推荐新闻间的相关程度越大,反之越小。Among them, the similarity is used to represent the degree of correlation between each news in the target space and the news to be recommended. The greater the similarity, the greater the degree of correlation between each news and the news to be recommended, and vice versa.

具体的,可以通过计算目标空间中各新闻与待推荐新闻分别对应的词袋向量之间的余弦相似度、皮尔森相关系数等,确定各新闻与待推荐新闻间的各相似度,并根据相似度大小,对目标空间中的各新闻进行排序,从而将相似度最大的新闻确定为与待推荐新闻关联的第一备选新闻。Specifically, by calculating the cosine similarity and Pearson correlation coefficient between each news in the target space and the bag-of-words vectors corresponding to the news to be recommended, the similarity between each news and the news to be recommended can be determined, and based on the similarity The degree of each news in the target space is sorted, so that the news with the largest similarity is determined as the first candidate news associated with the news to be recommended.

可以理解的是,利用上述方法,可以将新闻库中语义相关的各新闻划分到同一空间中,并根据同一空间中任一新闻与其它新闻之间的相似度,确定与任一新闻关联的第一备选新闻。当新闻库中的任一新闻为当前新闻时,若获取到用户的推荐请求,即可确定当前新闻所属的空间,进而从与其属于同一空间的新闻中,选取与其关联的第一备选新闻,推荐给用户,从而实现语义相关的新闻跳转。当获取到用户输入的搜索语句时,也可以通过上述方法,确定搜索语句所属的空间,并从与其属于同一空间的新闻中,选取与搜索语句相关的第一备选新闻,推荐给用户。It can be understood that, using the above method, the semantically related news in the news base can be divided into the same space, and according to the similarity between any news and other news in the same space, the first news associated with any news can be determined. One alternative news. When any news in the news library is the current news, if the user’s recommendation request is obtained, the space to which the current news belongs can be determined, and then the first alternative news associated with it can be selected from the news belonging to the same space. Recommended to users, so as to realize semantically relevant news jumps. When the search sentence input by the user is obtained, the space to which the search sentence belongs can also be determined through the above method, and the first candidate news related to the search sentence is selected from the news belonging to the same space, and recommended to the user.

具体的,本发明实施例中,由于根据各新闻中的各个词语进行空间划分,同一空间内的新闻语义相关,因此从与待推荐新闻属于同一空间的各新闻中,选取的与待推荐新闻关联的第一备选新闻,与待推荐新闻的语义相关性和准确性更高,推荐效果更好。Specifically, in the embodiment of the present invention, since the space is divided according to each word in each news, the news semantics in the same space are related, so from the news belonging to the same space as the news to be recommended, the selected news associated with the news to be recommended The first candidate news, the semantic relevance and accuracy of the news to be recommended are higher, and the recommendation effect is better.

本发明实施例的新闻推荐方法,在获取待推荐新闻后,通过利用预设的空间划分方法,确定待推荐新闻所属的目标空间,从而根据待推荐新闻所属的目标空间,确定与待推荐新闻关联的第一备选新闻。由此,通过将与待推荐新闻属于同一空间的第一备选新闻推荐给用户,保证了第一备选新闻与待推荐新闻语义相关,从而使得推荐结果更准确,用户体验更好。In the news recommendation method of the embodiment of the present invention, after the news to be recommended is acquired, the target space to which the news to be recommended belongs is determined by using a preset space division method, so as to determine the information associated with the news to be recommended according to the target space to which the news to be recommended belongs. The first alternative news for . Therefore, by recommending the first candidate news belonging to the same space as the news to be recommended to the user, it is ensured that the first candidate news is semantically related to the news to be recommended, so that the recommendation result is more accurate and the user experience is better.

通过上述分析可知,可以通过预设的空间划分方法,将新闻库中语义相关的各新闻划分到同一空间中,从而在为用户推荐新闻时,可以从与当前新闻或搜索语句属于同一空间的新闻中,选取与其语义相关的备选新闻推荐给用户。在实际运用中,用户可能还希望获取与当前新闻或搜索语句属于同一话题但内容不同的推荐新闻,下面结合图2,针对上述情况进行具体说明。From the above analysis, we can know that the semantically related news in the news base can be divided into the same space through the preset space division method, so that when recommending news for users, we can select from the news that belongs to the same space as the current news or search sentence. In , select alternative news related to its semantics and recommend it to the user. In practical application, the user may also wish to obtain recommended news that belongs to the same topic as the current news or search statement but has different content. The above situation will be described in detail below in conjunction with FIG. 2 .

图2是本发明另一个实施例的新闻推荐方法的流程图。Fig. 2 is a flowchart of a news recommendation method according to another embodiment of the present invention.

如图2所示,本发明实施例提供的新闻推荐方法,在获取推荐新闻后,还可以包括:As shown in Figure 2, the news recommendation method provided by the embodiment of the present invention may further include, after obtaining the recommended news:

步骤201,根据待推荐新闻的词频-逆向文件频率,确定待推荐新闻所属的类。Step 201, according to the word frequency-reverse document frequency of the news to be recommended, determine the category to which the news to be recommended belongs.

具体的,获取到待推荐新闻后,可以根据待推荐新闻的词频-逆向文件频率,确定待推荐新闻中类别区分能力较好的词语,从而根据确定的词语所属的类,确定待推荐新闻所属的类。Specifically, after obtaining the news to be recommended, the words with better category discrimination ability in the news to be recommended can be determined according to the word frequency of the news to be recommended - the reverse file frequency, so as to determine the category of the news to be recommended according to the category to which the determined words belong. kind.

步骤202,对与待推荐新闻属于相同类的新闻进行空间划分,确定与待推荐新闻属于不同空间的新闻集合。Step 202, spatially divide the news belonging to the same category as the news to be recommended, and determine the news set belonging to a different space from the news to be recommended.

步骤203,根据新闻集合中各新闻与待推荐新闻的相似度,确定与待推荐关联的第二备选新闻。Step 203, according to the similarity between each news in the news collection and the news to be recommended, determine the second candidate news associated with the news to be recommended.

其中,第二备选新闻为新闻库中,与待推荐新闻事件相关的新闻。Wherein, the second candidate news is the news related to the news event to be recommended in the news database.

需要说明的是,第二备选新闻,可能是一条新闻,也可能是多条新闻。It should be noted that the second candidate news may be one piece of news, or may be multiple pieces of news.

具体的,通过将与待推荐新闻属于相同类的新闻进行空间划分,确定与待推荐新闻属于不同空间的新闻集合,并确定新闻集合中各新闻与待推荐新闻的相似度,可以确定与待推荐新闻属于同一类、但属于不同空间的第二备选新闻。Specifically, by spatially dividing the news that belongs to the same category as the news to be recommended, determining the news set that belongs to a different space from the news to be recommended, and determining the similarity between each news in the news set and the news to be recommended, it is possible to determine the A second alternative for news that belongs to the same category but in a different space.

具体实现时,步骤203可以通过以下方式实现:During specific implementation, step 203 can be implemented in the following ways:

确定新闻集合中与待推荐新闻相似度最大、且属于不同空间的新闻为各第二备选新闻。Determine the news in the news collection that has the greatest similarity with the news to be recommended and belongs to different spaces as the second candidate news.

具体的,可以确定新闻集合中各新闻与待推荐新闻间的各相似度,并根据相似度大小,对新闻集合中的各新闻进行排序,从而将相似度最大、且与待推荐新闻属于不同空间的新闻确定为第二备选新闻。Specifically, it is possible to determine the similarity between each news in the news collection and the news to be recommended, and sort the news in the news collection according to the size of the similarity, so that the news with the largest similarity and belonging to a different space from the news to be recommended The news of is determined as the second alternative news.

具体的空间划分过程和相似度确定过程,可以参照上述实施例的相关描述,此处不作赘述。For the specific space division process and similarity determination process, reference may be made to the relevant descriptions in the foregoing embodiments, which will not be repeated here.

可以理解的是,通过上述方法,可以将新闻库中的各新闻进行层次化聚类,从而将属于同一话题的新闻划分到同一类中,而通过对属于同一类的新闻进行空间划分,可以将属于同一话题,但属于不同事件的新闻,划分到不同的空间中,进而根据每个新闻和与其属于相同类、但属于不同空间的各新闻的相似度,确定与每个新闻关联的第二备选新闻。It can be understood that, through the above method, the news in the news database can be hierarchically clustered, so that the news belonging to the same topic can be divided into the same category, and by spatially dividing the news belonging to the same category, it can be divided into The news belonging to the same topic but belonging to different events is divided into different spaces, and then according to the similarity between each news and the news belonging to the same category but belonging to different spaces, the second backup associated with each news is determined. Choose news.

当新闻库中的任一新闻为当前新闻时,若获取到跳转或推荐请求,即可根据当前新闻的词频-逆向文件频率,确定当前新闻所属的类,进而从与当前新闻属于相同类、但属于不同空间的新闻集合中,根据当前新闻与新闻集合中的各新闻的相似度,选取与当前新闻关联的第二备选新闻,推荐给用户。当获取到用户输入的搜索语句时,也可以通过上述方法,根据搜索语句的词频-逆向文件频率,确定搜索语句所属的类,进而从与搜索语句属于相同类、但属于不同空间的新闻集合中,根据搜索语句与新闻集合中的各新闻的相似度,选取与搜索语句关联的第二备选新闻,推荐给用户。When any news in the news database is the current news, if a jump or recommendation request is obtained, the category of the current news can be determined according to the word frequency of the current news - the reverse file frequency, and then from the same category as the current news, However, in the news collections belonging to different spaces, according to the similarity between the current news and each news in the news collection, a second candidate news related to the current news is selected and recommended to the user. When the search sentence entered by the user is obtained, the above method can also be used to determine the category of the search sentence according to the word frequency of the search sentence - the reverse file frequency, and then from the news collection that belongs to the same category as the search sentence but belongs to a different space. , according to the similarity between the search statement and each news in the news collection, select the second candidate news associated with the search statement, and recommend it to the user.

由于第二备选新闻与待推荐新闻属于同一类,但属于不同的空间,而同一类中的新闻属于同一话题,不同空间中的新闻属于不同事件,从而从当前新闻或搜索语句跳转到第二备选新闻时,可以实现话题内不同事件的新闻的跳转。Since the second candidate news and the news to be recommended belong to the same category, but belong to different spaces, and the news in the same category belong to the same topic, and the news in different spaces belong to different events, thus jumping from the current news or search sentence to the first 2. When selecting news, jumping to news of different events within the topic can be realized.

本发明实施例的新闻推荐方法,在获取到待推荐新闻后,首先对与待推荐新闻属于相同类的新闻进行空间划分,确定与待推荐新闻属于不同空间的新闻集合,然后根据新闻集合中各新闻与待推荐新闻的相似度,确定与待推荐关联的第二备选新闻,由此,通过将与待推荐新闻属于相同类、且属于不同空间的第二备选新闻推荐给用户,保证了第二备选新闻与待推荐新闻属于同一话题,且避免了两者之间在字面和内容上的相似度过高,使得推荐结果更丰富,用户体验更好。In the news recommendation method of the embodiment of the present invention, after the news to be recommended is obtained, the news that belongs to the same category as the news to be recommended is first space-divided, and the news set that belongs to a different space from the news to be recommended is determined, and then according to each news set in the news set, The similarity between the news and the news to be recommended determines the second candidate news associated with the news to be recommended, thus, by recommending the second candidate news that belongs to the same category as the news to be recommended and belongs to a different space to the user, it ensures The second candidate news and the news to be recommended belong to the same topic, and the excessive similarity in words and content between the two is avoided, so that the recommendation results are richer and the user experience is better.

图3是本发明一个实施例的新闻推荐装置的结构示意图。Fig. 3 is a schematic structural diagram of a news recommendation device according to an embodiment of the present invention.

如图3所示,该新闻推荐装置包括:As shown in Figure 3, the news recommendation device includes:

获取模块31,用于获取待推荐新闻;An acquisition module 31, configured to acquire news to be recommended;

第一确定模块32,用于利用预设的空间划分方法,确定待推荐新闻所属的目标空间;The first determination module 32 is configured to determine the target space to which the news to be recommended belongs by using a preset space division method;

第二确定模块33,用于根据待推荐新闻所属的目标空间,确定与待推荐新闻关联的第一备选新闻。The second determination module 33 is configured to determine the first candidate news associated with the news to be recommended according to the target space to which the news to be recommended belongs.

具体的,本发明实施例提供的新闻推荐装置,可以执行本发明实施例提供的新闻推荐方法,该装置可以被配置在任何终端设备中,以生成热点资讯评论文章。Specifically, the news recommendation device provided in the embodiment of the present invention can execute the news recommendation method provided in the embodiment of the present invention, and the device can be configured in any terminal device to generate hot news commentary articles.

其中,第一备选新闻为与待推荐新闻语义相关的新闻。Wherein, the first candidate news is news semantically related to the news to be recommended.

在本申请实施例一种可能的实现形式中,上述第二确定模块33,具体用于:In a possible implementation form of the embodiment of the present application, the above-mentioned second determining module 33 is specifically used for:

确定目标空间中各新闻与待推荐新闻间的各相似度;Determine the similarity between each news in the target space and the news to be recommended;

根据各相似度,确定第一备选新闻。According to each degree of similarity, the first candidate news is determined.

需要说明的是,前述对新闻推荐方法实施例的解释说明也适用于该实施例的新闻推荐装置,此处不再赘述。It should be noted that the foregoing explanations for the news recommendation method embodiment are also applicable to the news recommendation device of this embodiment, and will not be repeated here.

本发明实施例的新闻推荐装置,在获取待推荐新闻后,通过利用预设的空间划分方法,确定待推荐新闻所属的目标空间,从而根据待推荐新闻所属的目标空间,确定与待推荐新闻关联的第一备选新闻。由此,通过将与待推荐新闻属于同一空间的第一备选新闻推荐给用户,保证了第一备选新闻与待推荐新闻语义相关,从而使得推荐结果更准确,用户体验更好。The news recommendation device of the embodiment of the present invention, after obtaining the news to be recommended, determines the target space to which the news to be recommended belongs by using the preset space division method, so as to determine the information related to the news to be recommended according to the target space to which the news to be recommended belongs. The first alternative news for . Therefore, by recommending the first candidate news belonging to the same space as the news to be recommended to the user, it is ensured that the first candidate news is semantically related to the news to be recommended, so that the recommendation result is more accurate and the user experience is better.

图4是本发明另一个实施例的新闻推荐装置的结构示意图。Fig. 4 is a schematic structural diagram of a news recommendation device according to another embodiment of the present invention.

如图4所示,在图3的基础上,该新闻推荐装置,还包括:As shown in Figure 4, on the basis of Figure 3, the news recommendation device also includes:

第三确定模块41,用于确定待推荐新闻对应的词袋向量。The third determination module 41 is configured to determine the bag-of-words vector corresponding to the news to be recommended.

第四确定模块42,用于根据待推荐新闻的词频-逆向文件频率,确定待推荐新闻所属的类。The fourth determination module 42 is configured to determine the category of the news to be recommended according to the word frequency-reverse document frequency of the news to be recommended.

第五确定模块43,用于对与待推荐新闻属于相同类的新闻进行空间划分,确定与待推荐新闻属于不同空间的新闻集合。The fifth determining module 43 is configured to space-divide the news belonging to the same category as the news to be recommended, and determine a news set belonging to a different space from the news to be recommended.

第六确定模块44,用于根据新闻集合中各新闻与待推荐新闻的相似度,确定与待推荐关联的第二备选新闻。The sixth determination module 44 is configured to determine the second candidate news associated with the news to be recommended according to the similarity between each news in the news collection and the news to be recommended.

其中,第二备选新闻为与待推荐新闻事件相关的新闻。Wherein, the second candidate news is news related to the news event to be recommended.

在本申请实施例一种可能的实现形式中,上述第一确定模块32,具体用于:In a possible implementation form of the embodiment of the present application, the above-mentioned first determination module 32 is specifically used for:

根据待推荐新闻对应的词袋向量,利用近似最近邻算法,确定待推荐新闻所属的目标空间。According to the bag-of-words vector corresponding to the news to be recommended, the approximate nearest neighbor algorithm is used to determine the target space to which the news to be recommended belongs.

在本申请实施例另一种可能的实现形式中,上述第六确定模块44,具体用于:In another possible implementation form of the embodiment of the present application, the above-mentioned sixth determination module 44 is specifically used for:

确定新闻集合中与待推荐新闻相似度最大、且属于不同空间的新闻为各第二备选新闻。Determine the news in the news collection that has the greatest similarity with the news to be recommended and belongs to different spaces as the second candidate news.

需要说明的是,前述对新闻推荐方法实施例的解释说明也适用于该实施例的新闻推荐装置,此处不再赘述。It should be noted that the foregoing explanations for the news recommendation method embodiment are also applicable to the news recommendation device of this embodiment, and will not be repeated here.

本发明实施例的新闻推荐装置,在获取待推荐新闻后,通过利用预设的空间划分方法,确定待推荐新闻所属的目标空间,从而根据待推荐新闻所属的目标空间,确定与待推荐新闻关联的第一备选新闻。由此,通过将与待推荐新闻属于同一空间的第一备选新闻推荐给用户,保证了第一备选新闻与待推荐新闻语义相关,从而使得推荐结果更准确,用户体验更好。The news recommendation device of the embodiment of the present invention, after obtaining the news to be recommended, determines the target space to which the news to be recommended belongs by using the preset space division method, so as to determine the information related to the news to be recommended according to the target space to which the news to be recommended belongs. The first alternative news for . Therefore, by recommending the first candidate news belonging to the same space as the news to be recommended to the user, it is ensured that the first candidate news is semantically related to the news to be recommended, so that the recommendation result is more accurate and the user experience is better.

图5为本发明实施例提供的一种终端设备的结构示意图。FIG. 5 is a schematic structural diagram of a terminal device provided by an embodiment of the present invention.

如图5所示,该终端设备包括:As shown in Figure 5, the terminal equipment includes:

存储器51、处理器52及存储在存储器51上并可在处理器52上运行的计算机程序。A memory 51 , a processor 52 , and a computer program stored in the memory 51 and executable on the processor 52 .

处理器52执行所述程序时实现上述实施例中提供的新闻推荐方法。The processor 52 implements the news recommendation method provided in the above-mentioned embodiments when executing the program.

其中,终端设备可以是电脑、手机、可穿戴设备等。Wherein, the terminal device may be a computer, a mobile phone, a wearable device, and the like.

进一步地,终端设备还包括:Further, the terminal equipment also includes:

通信接口53,用于存储器51和处理器52之间的通信。The communication interface 53 is used for communication between the memory 51 and the processor 52 .

存储器51,用于存放可在处理器52上运行的计算机程序。The memory 51 is used to store computer programs that can run on the processor 52 .

存储器51可能包含高速RAM存储器,也可能还包括非易失性存储器(non-volatilememory),例如至少一个磁盘存储器。The memory 51 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one magnetic disk memory.

处理器52,用于执行所述程序时实现上述实施例所述的新闻推荐方法。The processor 52 is configured to implement the news recommendation method described in the above embodiment when executing the program.

如果存储器51、处理器52和通信接口53独立实现,则通信接口53、存储器51和处理器52可以通过总线相互连接并完成相互间的通信。所述总线可以是工业标准体系结构(Industry Standard Architecture,简称ISA)总线、外部设备互连(PeripheralComponent Interconnect,简称PCI)总线或扩展工业标准体系结构(Extended IndustryStandard Architecture,简称EISA)总线等。所述总线可以分为地址总线、数据总线、控制总线等。为便于表示,图5中仅以一条粗线表示,但并不表示仅有一根总线或一种类型的总线。If the memory 51 , the processor 52 and the communication interface 53 are implemented independently, the communication interface 53 , the memory 51 and the processor 52 may be connected to each other through a bus to complete mutual communication. The bus may be an Industry Standard Architecture (Industry Standard Architecture, ISA for short) bus, a Peripheral Component Interconnect (PCI for short) bus, or an Extended Industry Standard Architecture (EISA for short) bus. The bus can be divided into address bus, data bus, control bus and so on. For ease of representation, only one thick line is shown in FIG. 5 , but it does not mean that there is only one bus or one type of bus.

可选地,在具体实现时,如果存储器51、处理器52及通信接口53,集成在一块芯片上实现,则存储器51、处理器52及通信接口53可以通过内部接口完成相互间的通信。Optionally, in specific implementation, if the memory 51, the processor 52 and the communication interface 53 are integrated on one chip, the memory 51, the processor 52 and the communication interface 53 can communicate with each other through the internal interface.

处理器52可以是一个中央处理器(Central Processing Unit,简称CPU),或者是特定集成电路(Application Specific Integrated Circuit,简称ASIC),或者是被配置成实施本发明实施例的一个或多个集成电路。Processor 52 may be a central processing unit (Central Processing Unit, referred to as CPU), or a specific integrated circuit (Application Specific Integrated Circuit, referred to as ASIC), or is configured to implement one or more integrated circuits of the embodiments of the present invention .

本发明第四方面实施例提出了一种计算机可读存储介质,其上存储有计算机程序,当该程序被处理器执行时实现如前述实施例中的新闻推荐方法。The embodiment of the fourth aspect of the present invention provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the news recommendation method in the foregoing embodiments is implemented.

本发明第五方面实施例提出了一种计算机程序产品,当所述计算机程序产品中的指令由处理器执行时,执行如前述实施例中的新闻推荐方法。The embodiment of the fifth aspect of the present invention provides a computer program product. When the instructions in the computer program product are executed by a processor, the news recommendation method in the foregoing embodiments is executed.

在本说明书的描述中,参考术语“一个实施例”、“一些实施例”、“示例”、“具体示例”、或“一些示例”等的描述意指结合该实施例或示例描述的具体特征、结构、材料或者特点包含于本发明的至少一个实施例或示例中。在本说明书中,对上述术语的示意性表述不必须针对的是相同的实施例或示例。而且,描述的具体特征、结构、材料或者特点可以在任一个或多个实施例或示例中以合适的方式结合。此外,在不相互矛盾的情况下,本领域的技术人员可以将本说明书中描述的不同实施例或示例以及不同实施例或示例的特征进行结合和组合。In the description of this specification, descriptions referring to the terms "one embodiment", "some embodiments", "example", "specific examples", or "some examples" mean that specific features described in connection with the embodiment or example , structure, material or characteristic is included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms are not necessarily directed to the same embodiment or example. Furthermore, the described specific features, structures, materials or characteristics may be combined in any suitable manner in any one or more embodiments or examples. In addition, those skilled in the art can combine and combine different embodiments or examples and features of different embodiments or examples described in this specification without conflicting with each other.

此外,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括至少一个该特征。在本发明的描述中,“多个”的含义是至少两个,例如两个,三个等,除非另有明确具体的限定。In addition, the terms "first" and "second" are used for descriptive purposes only, and cannot be interpreted as indicating or implying relative importance or implicitly specifying the quantity of indicated technical features. Thus, the features defined as "first" and "second" may explicitly or implicitly include at least one of these features. In the description of the present invention, "plurality" means at least two, such as two, three, etc., unless otherwise specifically defined.

流程图中或在此以其他方式描述的任何过程或方法描述可以被理解为,表示包括一个或更多个用于实现定制逻辑功能或过程的步骤的可执行指令的代码的模块、片段或部分,并且本发明的优选实施方式的范围包括另外的实现,其中可以不按所示出或讨论的顺序,包括根据所涉及的功能按基本同时的方式或按相反的顺序,来执行功能,这应被本发明的实施例所属技术领域的技术人员所理解。Any process or method descriptions in flowcharts or otherwise described herein may be understood to represent a module, segment or portion of code comprising one or more executable instructions for implementing custom logical functions or steps of a process , and the scope of preferred embodiments of the invention includes alternative implementations in which functions may be performed out of the order shown or discussed, including substantially concurrently or in reverse order depending on the functions involved, which shall It is understood by those skilled in the art to which the embodiments of the present invention pertain.

在流程图中表示或在此以其他方式描述的逻辑和/或步骤,例如,可以被认为是用于实现逻辑功能的可执行指令的定序列表,可以具体实现在任何计算机可读介质中,以供指令执行系统、装置或设备(如基于计算机的系统、包括处理器的系统或其他可以从指令执行系统、装置或设备取指令并执行指令的系统)使用,或结合这些指令执行系统、装置或设备而使用。就本说明书而言,"计算机可读介质"可以是任何可以包含、存储、通信、传播或传输程序以供指令执行系统、装置或设备或结合这些指令执行系统、装置或设备而使用的装置。计算机可读介质的更具体的示例(非穷尽性列表)包括以下:具有一个或多个布线的电连接部(电子装置),便携式计算机盘盒(磁装置),随机存取存储器(RAM),只读存储器(ROM),可擦除可编辑只读存储器(EPROM或闪速存储器),光纤装置,以及便携式光盘只读存储器(CDROM)。另外,计算机可读介质甚至可以是可在其上打印所述程序的纸或其他合适的介质,因为可以例如通过对纸或其他介质进行光学扫描,接着进行编辑、解译或必要时以其他合适方式进行处理来以电子方式获得所述程序,然后将其存储在计算机存储器中。The logic and/or steps represented in the flowcharts or otherwise described herein, for example, can be considered as a sequenced listing of executable instructions for implementing logical functions, can be embodied in any computer-readable medium, For use with instruction execution systems, devices, or devices (such as computer-based systems, systems including processors, or other systems that can fetch instructions from instruction execution systems, devices, or devices and execute instructions), or in conjunction with these instruction execution systems, devices or equipment used. For the purposes of this specification, a "computer-readable medium" may be any device that can contain, store, communicate, propagate or transmit a program for use in or in conjunction with an instruction execution system, device or device. More specific examples (non-exhaustive list) of computer-readable media include the following: electrical connection with one or more wires (electronic device), portable computer disk case (magnetic device), random access memory (RAM), Read Only Memory (ROM), Erasable and Editable Read Only Memory (EPROM or Flash Memory), Fiber Optic Devices, and Portable Compact Disc Read Only Memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program can be printed, since the program can be read, for example, by optically scanning the paper or other medium, followed by editing, interpretation or other suitable processing if necessary. The program is processed electronically and stored in computer memory.

应当理解,本发明的各部分可以用硬件、软件、固件或它们的组合来实现。在上述实施方式中,多个步骤或方法可以用存储在存储器中且由合适的指令执行系统执行的软件或固件来实现。例如,如果用硬件来实现,和在另一实施方式中一样,可用本领域公知的下列技术中的任一项或他们的组合来实现:具有用于对数据信号实现逻辑功能的逻辑门电路的离散逻辑电路,具有合适的组合逻辑门电路的专用集成电路,可编程门阵列(PGA),现场可编程门阵列(FPGA)等。It should be understood that various parts of the present invention can be realized by hardware, software, firmware or their combination. In the embodiments described above, various steps or methods may be implemented by software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented by any one or combination of the following techniques known in the art: Discrete logic circuits, ASICs with suitable combinational logic gates, programmable gate arrays (PGAs), field programmable gate arrays (FPGAs), etc.

本技术领域的普通技术人员可以理解实现上述实施例方法携带的全部或部分步骤是可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,该程序在执行时,包括方法实施例的步骤之一或其组合。Those of ordinary skill in the art can understand that all or part of the steps carried by the methods of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium. During execution, one or a combination of the steps of the method embodiments is included.

此外,在本发明各个实施例中的各功能单元可以集成在一个处理模块中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。所述集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing module, each unit may exist separately physically, or two or more units may be integrated into one module. The above-mentioned integrated modules can be implemented in the form of hardware or in the form of software function modules. If the integrated modules are realized in the form of software function modules and sold or used as independent products, they can also be stored in a computer-readable storage medium.

上述提到的存储介质可以是只读存储器,磁盘或光盘等。尽管上面已经示出和描述了本发明的实施例,可以理解的是,上述实施例是示例性的,不能理解为对本发明的限制,本领域的普通技术人员在本发明的范围内可以对上述实施例进行变化、修改、替换和变型。The storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk, and the like. Although the embodiments of the present invention have been shown and described above, it can be understood that the above embodiments are exemplary and should not be construed as limiting the present invention, those skilled in the art can make the above-mentioned The embodiments are subject to changes, modifications, substitutions and variations.

Claims (14)

1. a kind of news recommends method, it is characterised in that including:
Obtain news to be recommended;
Using default space-division method, the object space belonging to the news to be recommended is determined;
According to the object space belonging to the news to be recommended, it is determined that the first alternative news associated with the news to be recommended.
2. the method as described in claim 1, it is characterised in that the object space determined belonging to the news to be recommended it Before, in addition to:
Determine bag of words vector corresponding to the news to be recommended;
The object space determined belonging to the news to be recommended, including:
According to bag of words vector corresponding to the news to be recommended, using approximate KNN algorithm, the news institute to be recommended is determined The object space of category.
3. the method as described in claim 1, it is characterised in that it is described determine to associate with the news to be recommended it is first alternative News, including:
Determine each similarity between each news and the news to be recommended in the object space;
According to each similarity, the described first alternative news is determined.
4. the method as described in claim 1-3 is any, it is characterised in that after the acquisition news to be recommended, in addition to:
According to the word frequency of the news to be recommended-reverse document-frequency, the class belonging to the news to be recommended is determined;
Pair belonging to mutually similar news with the news to be recommended carries out space division, it is determined that belonging to not with the news to be recommended The news agregator of isospace;
According to the similarity of each news in the news agregator and the news to be recommended, it is determined that the with the association to be recommended Two alternative news.
5. method as claimed in claim 4, it is characterised in that the determination is alternative new with the second of the association to be recommended Hear, including:
Determine maximum with the news similarity to be recommended in the news agregator and belong to the news of different spaces for each second Alternative news.
6. method as claimed in claim 4, it is characterised in that the first alternative news is semantic with the news to be recommended Related news, the second alternative news is the news related to the media event to be recommended.
A kind of 7. news recommendation apparatus, it is characterised in that including:
Acquisition module, for obtaining news to be recommended;
First determining module, for utilizing default space-division method, determine the object space belonging to the news to be recommended;
Second determining module, for the object space according to belonging to the news to be recommended, it is determined that being closed with the news to be recommended First alternative news of connection.
8. device as claimed in claim 7, it is characterised in that also include:
3rd determining module, for determining bag of words vector corresponding to the news to be recommended;
First determining module, is specifically used for:
According to bag of words vector corresponding to the news to be recommended, using approximate KNN algorithm, the news institute to be recommended is determined The object space of category.
9. device as claimed in claim 7, it is characterised in that second determining module, be specifically used for:
Determine each similarity between each news and the news to be recommended in the object space;
According to each similarity, the described first alternative news is determined.
10. the device as described in claim 7-9 is any, it is characterised in that also include:
4th determining module, for the word frequency according to the news to be recommended-reverse document-frequency, determine the news to be recommended Affiliated class;
5th determining module, belong to mutually similar news progress space division with the news to be recommended for, it is determined that and institute State the news agregator that news to be recommended belongs to different spaces;
6th determining module, for the similarity according to each news in the news agregator and the news to be recommended, it is determined that with Second alternative news of the association to be recommended.
11. device as claimed in claim 10, it is characterised in that the 6th determining module, be specifically used for:
Determine maximum with the news similarity to be recommended in the news agregator and belong to the news of different spaces for each second Alternative news.
12. device as claimed in claim 10, it is characterised in that the first alternative news be and the news language to be recommended Adopted related news, the second alternative news is the news related to the media event to be recommended.
13. a kind of terminal device, including:
Memory, processor and the computer program that can be run on the memory and on the processor is stored in, it is special Sign is, the news recommendation method as described in any in claim 1-6 is realized during the computing device described program.
14. a kind of computer-readable recording medium, is stored thereon with computer program, it is characterised in that described program is processed Realize that the news as described in any in claim 1-6 recommends method when device performs.
CN201711138838.7A 2017-11-16 2017-11-16 News recommendation method, apparatus, terminal device and computer-readable storage medium Active CN107748801B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711138838.7A CN107748801B (en) 2017-11-16 2017-11-16 News recommendation method, apparatus, terminal device and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711138838.7A CN107748801B (en) 2017-11-16 2017-11-16 News recommendation method, apparatus, terminal device and computer-readable storage medium

Publications (2)

Publication Number Publication Date
CN107748801A true CN107748801A (en) 2018-03-02
CN107748801B CN107748801B (en) 2022-04-29

Family

ID=61251220

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711138838.7A Active CN107748801B (en) 2017-11-16 2017-11-16 News recommendation method, apparatus, terminal device and computer-readable storage medium

Country Status (1)

Country Link
CN (1) CN107748801B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109684553A (en) * 2018-12-26 2019-04-26 北京百度网讯科技有限公司 For obtaining the method and device of information
CN110245243A (en) * 2019-06-20 2019-09-17 北京百度网讯科技有限公司 The method and apparatus of news retrieval, electronic equipment, computer-readable medium
CN112613296A (en) * 2020-12-07 2021-04-06 深圳价值在线信息科技股份有限公司 News importance degree acquisition method and device, terminal equipment and storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102708198A (en) * 2012-05-16 2012-10-03 杭州通策会综合服务有限公司 Individualized network advertisement pushing method
CN103793476A (en) * 2014-01-08 2014-05-14 西安电子科技大学 Network community based collaborative filtering recommendation method
CN104102639A (en) * 2013-04-02 2014-10-15 腾讯科技(深圳)有限公司 Text classification based promotion triggering method and device
CN104572855A (en) * 2014-12-17 2015-04-29 深圳先进技术研究院 News recommendation method and device
CN104933074A (en) * 2014-03-20 2015-09-23 华为技术有限公司 News ordering method and device and terminal equipment
CN105022840A (en) * 2015-08-18 2015-11-04 新华网股份有限公司 News information processing method, news recommendation method and related devices
CN106294618A (en) * 2016-08-01 2017-01-04 北京百度网讯科技有限公司 Searching method and device
CN106407239A (en) * 2015-08-03 2017-02-15 阿里巴巴集团控股有限公司 Methods and apparatuses used for recommending information and assisting in recommending information
US20170132230A1 (en) * 2015-11-09 2017-05-11 WP Company LLC d/b/a The Washington Post Systems and methods for recommending temporally relevant news content using implicit feedback data

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102708198A (en) * 2012-05-16 2012-10-03 杭州通策会综合服务有限公司 Individualized network advertisement pushing method
CN104102639A (en) * 2013-04-02 2014-10-15 腾讯科技(深圳)有限公司 Text classification based promotion triggering method and device
CN103793476A (en) * 2014-01-08 2014-05-14 西安电子科技大学 Network community based collaborative filtering recommendation method
CN104933074A (en) * 2014-03-20 2015-09-23 华为技术有限公司 News ordering method and device and terminal equipment
CN104572855A (en) * 2014-12-17 2015-04-29 深圳先进技术研究院 News recommendation method and device
CN106407239A (en) * 2015-08-03 2017-02-15 阿里巴巴集团控股有限公司 Methods and apparatuses used for recommending information and assisting in recommending information
CN105022840A (en) * 2015-08-18 2015-11-04 新华网股份有限公司 News information processing method, news recommendation method and related devices
US20170132230A1 (en) * 2015-11-09 2017-05-11 WP Company LLC d/b/a The Washington Post Systems and methods for recommending temporally relevant news content using implicit feedback data
CN106294618A (en) * 2016-08-01 2017-01-04 北京百度网讯科技有限公司 Searching method and device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109684553A (en) * 2018-12-26 2019-04-26 北京百度网讯科技有限公司 For obtaining the method and device of information
CN110245243A (en) * 2019-06-20 2019-09-17 北京百度网讯科技有限公司 The method and apparatus of news retrieval, electronic equipment, computer-readable medium
CN112613296A (en) * 2020-12-07 2021-04-06 深圳价值在线信息科技股份有限公司 News importance degree acquisition method and device, terminal equipment and storage medium

Also Published As

Publication number Publication date
CN107748801B (en) 2022-04-29

Similar Documents

Publication Publication Date Title
CN109657213B (en) Text similarity detection method and device and electronic equipment
CN108009228B (en) Method, device and storage medium for setting content label
CN113961823B (en) News recommendation method, system, storage medium and equipment
JP5984917B2 (en) Method and apparatus for providing suggested words
US8880548B2 (en) Dynamic search interaction
KR101656245B1 (en) Method and system for extracting sentences
CN108268617B (en) User intent determination method and device
CN110162796B (en) Method and device for creating news topics
US10061767B1 (en) Analyzing user reviews to determine entity attributes
WO2017181612A1 (en) Personalized video recommendation method and device
CN106649647B (en) Method and device for sorting search results based on artificial intelligence
US10152478B2 (en) Apparatus, system and method for string disambiguation and entity ranking
KR101624420B1 (en) Method and System for searching using Related Keywords of Searching object
JP6932360B2 (en) Object search method, device and server
JP6457123B2 (en) Search processing method and device
CN103744887B (en) It is a kind of for the method for people search, device and computer equipment
CN107958039A (en) A kind of term error correction method, device and server
CN104035958A (en) Search method and search engine
CN107748801A (en) News recommendation method, device, terminal device and computer-readable storage medium
CN108319377A (en) Method and system, terminal and the computer readable storage medium of displaying word input
WO2017092493A1 (en) Ambiance music searching method and device
WO2017201907A1 (en) Search term classification method and device
KR101842274B1 (en) Method and system for extracting sentences
KR20190002627A (en) File storage method and electronic device
JP2017004260A (en) Information processing apparatus, information processing method, and information processing program

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant