Content recommendation method and device

JP2025506946AActive Publication Date: 2025-03-13DOUYIN VISION CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
JP2024552074
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2022-03-02
Filing Date
2023-02-23
Publication Date
2025-03-13
Estimated Expiration
2043-02-23

Smart Images

  • Figure 2025506946000001_ABST
    Figure 2025506946000001_ABST
Patent Text Reader

Abstract

An embodiment of the present invention provides a content recommendation method and apparatus, which relates to the technical field of content recommendation, including: receiving content request information sent by a terminal device, the content request information being for requesting to obtain recommended content corresponding to a target user; determining whether a recommendation server is faulty; if the recommendation server is faulty, obtaining a first recommended content based on a recommendation cache corresponding to the target user, where a plurality of recommended contents corresponding to the target user are stored in the recommendation cache, and the plurality of recommended contents are written when the recommendation server is not faulty; and sending the first recommended content to the terminal device.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] [CROSS REFERENCE TO RELATED APPLICATIONS] This application is based on and claims priority from a Chinese application having application number 202210197812.4 and filing date March 2, 2022, the entire disclosure of which is incorporated herein by reference.

[0002] [Technical field] The present invention relates to the technical field of content recommendation, and in particular to a method and apparatus for recommending content. [Background technology]

[0003] Currently, many applications provide content to users through personalized recommendations, and such applications that provide content to users through recommendations are called information stream recommendation applications, such as shot video applications that provide video content to users through personalized recommendations. Summary of the Invention

[0004] According to a first aspect, an embodiment of the present invention provides a content recommendation method applied to an information stream server, comprising: receiving content request information transmitted by a terminal device, the content request information being for requesting to obtain recommended content corresponding to a target user; determining whether a recommendation server is down; When the recommendation server is out of order, obtaining a first recommended content based on a recommendation cache corresponding to the target user, the recommendation cache storing a plurality of recommended contents corresponding to the target user, and the plurality of recommended contents being written when the recommendation server is not out of order; and transmitting the first recommended content to the terminal device.

[0005] In an alternative embodiment of the present invention, the method comprises: If the recommendation server is normal, sending recommendation request information to the recommendation server, the recommendation request information being for requesting to obtain recommended content corresponding to the target user; receiving the second recommended content transmitted by the recommendation server; and transmitting the second recommended content to the terminal device.

[0006] In one alternative embodiment of the present invention, the step of determining whether the recommendation server has failed as described above may include: obtaining status indication information of the recommendation server; determining whether the recommendation server has failed based on the status indication.

[0007] In one alternative embodiment of the present invention, the step of determining whether the recommendation server has failed as described above may include: and determining that the recommendation server is out of order if no response information is received from the recommendation server within a response time period of a preset length of time.

[0008] In an alternative embodiment of the present invention, the recommended content in the recommendation cache is sorted in descending order of relevance to the target user; The above-mentioned, obtaining a first recommended content based on a recommendation cache corresponding to the target user includes: determining a top number of recommended content in the recommendation cache; generating the first recommended content based on a top first number of recommended content in the recommendation cache.

[0009] According to a second aspect, an embodiment of the present invention provides a content recommendation method applied to a recommendation server, comprising: receiving recommendation request information sent by an information stream server, the recommendation request information being for requesting to obtain recommended content corresponding to a target user; Obtaining a recommended content sequence corresponding to the target user through a preset recommendation algorithm, the recommended content sequence including a plurality of recommended contents, and the plurality of recommended contents are sorted in descending order of relevance to the target user; A content recommendation method is provided, the method including: sending a top second number of recommended contents of the recommended content sequence to the information stream server; and writing the recommended content sequence into a recommendation cache corresponding to the target user.

[0010] In an alternative embodiment of the present invention, the method comprises: The method further includes sending status indication information to the information stream server, the status indication information being for indicating whether the recommendation server is out of order.

[0011] In an alternative embodiment of the present invention, the method comprises: The method further includes, before writing the recommended content sequence to a recommendation cache corresponding to the target user, performing a duplicate elimination process on the recommended content in the recommended content sequence based on the recommended content stored in the recommendation cache corresponding to the target user and the recommended content transmitted to the information stream server.

[0012] In an alternative embodiment of the present invention, the method comprises: The method further includes clearing the recommended content in the recommendation cache corresponding to the target user when a time length during which the information stream server does not transmit the recommended content corresponding to the target user to the terminal device corresponding to the target user exceeds a first time length.

[0013] In an alternative embodiment of the present invention, the method comprises: The method further includes determining a capacity of cache space for storing a recommendation cache corresponding to each user based on at least one of an average number of active users of the recommendation server within the first time period, an average fault recovery time of the recommendation server, an average consumption time per one of the recommended contents, an average amount of data per one of the recommended contents, and a fault tolerance factor.

[0014] As an optional embodiment of the present invention, the capacity of cache space of the recommendation cache corresponding to each user is positively correlated with at least one of the average number of active users of the recommendation server within the first time length, the average fault repair time of the recommendation server, the average data amount per one of the recommended contents, or a fault tolerance factor, and is negatively correlated with the average consumption time per one of the recommended contents.

[0015] As an alternative embodiment of the present invention, determining a capacity of a cache space for storing a recommendation cache corresponding to each user based on at least one of the average number of active users of the recommendation server within the first time period, the average repair time of the recommendation server, the average consumption time per one of the recommended contents, the average data amount per one of the recommended contents, and a fault tolerance factor, as described above, includes: the average number of active users of the recommendation server within the first time period, the average fault recovery time of the recommendation server, the average consumption time per one of the recommended contents, the average data amount per one of the recommended contents, a fault tolerance factor, and the following formula, i.e.

number

[0016] According to a third aspect, an embodiment of the invention comprises: a receiving unit for receiving content request information transmitted by a terminal device, the content request information being for requesting to obtain recommended content corresponding to a target user; a processor for determining whether a recommendation server has failed; an acquisition unit for acquiring a first recommended content based on a recommendation cache corresponding to the target user when the processing unit determines that the recommendation server is out of order, the recommendation cache storing a plurality of recommended contents corresponding to the target user, the plurality of recommended contents being written when the recommendation server is not out of order; a transmitting unit for transmitting the first recommended content to the terminal device.

[0017] As an alternative embodiment of the present invention, The sending unit is further used for sending recommendation request information to the recommendation server when the recommendation server is normal, the recommendation request information being for requesting to obtain recommended content corresponding to the target user; the receiving unit is further used to receive a second recommended content transmitted by the recommendation server; The transmitting unit is further used for transmitting the second recommended content to the terminal device.

[0018] As an alternative embodiment of the present invention, the processing unit is specifically used for obtaining status indication information of the recommended server and determining whether or not the recommended server is at fault based on the status indication information.

[0019] As an alternative embodiment of the present invention, the processing unit is specifically used for determining that the recommendation server is faulty if response information returned by the recommendation server is not received within a response time length of a preset length of time.

[0020] In an alternative embodiment of the present invention, the recommended content in the recommendation cache is sorted in descending order of relevance to the target user; Specifically, the acquisition unit is used for determining a first number of recommended contents in the recommendation cache, and generating the first recommended content based on the first number of recommended contents in the recommendation cache.

[0021] According to a fourth aspect, an embodiment of the invention comprises: A receiving unit for receiving recommendation request information transmitted by an information stream server, the recommendation request information being for requesting a target user to obtain a recommended content corresponding to the target user; A processing unit for acquiring a recommended content sequence corresponding to the target user by a preset recommendation algorithm, the recommended content sequence including a plurality of recommended contents, and the plurality of recommended contents are sorted in descending order of relevance to the target user; a transmitting unit for transmitting a second top number of recommended contents of the recommended content sequence to the information stream server; and a cache manager for writing the recommended content sequence into a recommendation cache corresponding to the target user.

[0022] As an alternative embodiment of the present invention, The sending unit is further used for sending status indication information to the information stream server, the status indication information being for indicating whether the recommendation server is out of order or not.

[0023] As an optional embodiment of the present invention, the cache management unit is further used to perform a duplicate elimination process on the recommended content in the recommended content sequence based on the recommended content stored in the recommendation cache corresponding to the target user and the recommended content sent to the information stream server before writing the recommended content sequence to the recommendation cache corresponding to the target user.

[0024] As an optional embodiment of the present invention, the cache management unit is further used for clearing the recommended content in the recommendation cache corresponding to the target user when a time length during which the information stream server does not send the recommended content corresponding to the target user to the terminal device corresponding to the target user exceeds a first time length.

[0025] As an alternative embodiment of the present invention, the cache management unit is further used to determine the capacity of cache space for storing the recommendation cache corresponding to each user based on at least one of the average number of active users of the recommendation server within the first time length, the average fault repair time of the recommendation server, the average consumption time per one of the recommended contents, the average data amount per one of the recommended contents, and a fault tolerance factor.

[0026] As an optional embodiment of the present invention, the capacity of cache space of the recommendation cache corresponding to each user is positively correlated with at least one of the average number of active users of the recommendation server within the first time length, the average fault repair time of the recommendation server, the average data amount per one of the recommended contents, or a fault tolerance factor, and is negatively correlated with the average consumption time per one of the recommended contents.

[0027] As an alternative embodiment of the present invention, the cache management unit specifically calculates the average number of active users of the recommended server within the first time length, the average repair time of the recommended server, the average consumption time per one of the recommended contents, the average data amount per one of the recommended contents, a fault tolerance factor, and the following formula, i.e.,

number

[0028] According to a fifth aspect, an embodiment of the present invention provides an electronic device including a memory and a processor, the memory being for storing a computer program, and the processor being configured to execute the computer program to cause the electronic device to realize a content recommendation method according to any one of the above embodiments.

[0029] According to a sixth aspect, an embodiment of the present invention provides a computer-readable recording medium having stored thereon a computer program which, when executed by a computing device, causes the computing device to implement the content recommendation method described in any one of the above embodiments.

[0030] According to a seventh aspect, an embodiment of the present invention provides a computer program product, which, when executed on a computer, causes the computer to implement the content recommendation method according to any one of the above embodiments.

[0031] According to an eighth aspect, an embodiment of the present invention provides a computer program comprising instructions which, when executed by a processor, cause the processor to perform the content recommendation method according to any one of the previous embodiments. [Brief description of the drawings]

[0032] The drawings herein, which are incorporated in and constitute a part of the specification, illustrate embodiments consistent with the present invention and, together with the specification, serve to explain the principles of the invention.

[0033] In order to more clearly describe the technical solutions in the embodiments of the present invention or the prior art, the following briefly describes the drawings that need to be referred to in the description of the embodiments or the prior art. Obviously, a person skilled in the art can obtain other drawings based on these drawings without any creative effort. [Figure 1] FIG. 2 is a scenario architecture diagram of a content recommendation method according to an embodiment of the present invention; [Diagram 2] 2 is an interaction flowchart of a content recommendation method according to an embodiment of the present invention; [Diagram 3] FIG. 2 is a schematic diagram of the configuration of an information stream server according to an embodiment of the present invention; [Figure 4] 2 is a schematic diagram of a configuration of a recommendation server according to an embodiment of the present invention; [Diagram 5]1 is a schematic diagram of a hardware configuration of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0034] In order to make the above objects, features and advantages of the present invention more clearly understandable, the following further describes the aspects of the present invention. It should be noted that, unless contradictory, the embodiments of the present invention and the features in the embodiments can be combined with each other.

[0035] In the following description, in order to fully understand the present invention, many specific details are described, but the present invention may be embodied in other forms different from those described herein. Apparently, the embodiments in the specification are only some of the embodiments of the present invention, but not all of the embodiments.

[0036] In the embodiments of the present invention, terms such as "exemplary" or "for example" are used to denote as an example, illustration, or explanation. In the embodiments of the present invention, any embodiment or design solution described as "exemplary" or "for example" should not be construed as being preferred or advantageous over other embodiments or design solutions. Rather, the use of terms such as "exemplary" or "for example" is intended to present related concepts in a concrete manner. Also, in the description of the embodiments of the present invention, "plurality" means two or more, unless otherwise specified.

[0037] The contents that the information stream recommendation application provides to the user are all generated by the recommendation system, so the stability of the information stream recommendation application depends heavily on the stability of the recommendation system. If the recommendation system is out of order, the information stream recommendation application can only provide contents to the user randomly, and the user is not interested in the pushed content, which seriously affects the user's experience. Therefore, how to improve the stability of the information stream recommendation application is an issue that needs to be resolved immediately.

[0038] In view of this, the embodiments of the present invention provide a content recommendation method and apparatus for improving the stability of information stream recommendation applications.

[0039] The following first describes a scenario architecture of a content recommendation method according to an embodiment of the present invention.

[0040] As shown in FIG. 1, in some embodiments, the scenario architecture of the content recommendation method according to the embodiments of the present invention includes a terminal device 11, an information stream server 12 and a recommendation server 13.

[0041] An information stream recommendation application is installed in the terminal device 11, and in response to an operation on the information stream recommendation application by a user, the information stream server 12 may transmit content request information for requesting recommended content corresponding to a login user of the information stream recommendation application. When the information stream server 12 receives the content request information transmitted by the terminal device 11, the information stream server 12 first determines whether the recommendation server 13 is out of order, and if the recommendation server 13 is normal (no failure occurs), transmits recommendation request information to the recommendation server 13, receives the recommended content transmitted by the recommendation server 13, and transmits the recommended content generated by the recommendation server to the terminal device. If the recommendation server 13 is out of order, the recommendation server 13 generates recommended content based on the recommended content written in the recommendation cache when the recommendation server 13 is not out of order, and transmits the recommended content to the terminal device. In response to the recommendation request information, the recommendation server 13 determines recommended content corresponding to the user by a recommendation algorithm, generates recommended content to be transmitted to the information stream server 12 based on the determined recommended content sequence, and writes the determined recommended content sequence in the recommendation cache.

[0042] The terminal device 11 in the embodiment of the present invention may be a mobile terminal device or a non-mobile terminal device. The mobile terminal device may be a mobile phone, a tablet computer, a notebook computer, a palmtop computer, a car-mounted terminal, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA), etc. The non-mobile terminal device may be a personal computer (PC), a television (TV), an ATM, or a self-service machine, etc. Or the terminal device 11 may be other types of devices, and the embodiment of the present invention is not limited thereto.

[0043] An embodiment of the present invention provides a content recommendation method, and as shown in FIG. 2, the content recommendation method includes the following steps S11 to S19.

[0044] S11: In response to a user operation, the terminal device transmits content request information to the information stream server.

[0045] In response, the information stream server receives the content request information sent by the terminal device.

[0046] The content request information is for requesting to obtain recommended content corresponding to the target user.

[0047] In the embodiment of the present invention, the target user may be a login user of an information stream recommendation application installed in a terminal device. The terminal device may request to obtain the recommended content corresponding to the target user by carrying the target user's identification in the content request information. The target user's identification may specifically be the target user's identity document (ID), the target user's login account, etc.

[0048] S12: The information stream server determines whether the recommendation server has failed.

[0049] In some embodiments, an implementation in which the information stream server determines whether a recommendation server has failed includes: An information stream server sends a request to a recommendation server to obtain recommendation request information of recommended content corresponding to the target user; If the response information returned by the recommended server is received within the response time length, the recommended server is determined to be normal (no failure has occurred), and the response time length is, for example, a preset value; and determining that the recommendation server is down if no response information is received from the recommendation server within the response time period.

[0050] In some embodiments, the response time length may be set based on the maximum response time length of the recommended server. For example, if the maximum response time length of the recommended server is 2 seconds, the response time length may be set to 2 seconds.

[0051] In some other embodiments, the information stream server determines whether the recommendation server is down by: The information stream server obtains status indication information of the recommendation server, and determines whether the recommendation server is out of order based on the status indication information.

[0052] In some embodiments, the implementation manner in which the information stream server obtains the status indication information of the recommendation server includes the following.

[0053] Alternatively, an implementation form in which the recommendation server transmits status indication information to the information stream server may be configured such that the recommendation server transmits status indication information to the information stream server periodically at a preset time period, or may be configured to transmit status indication information to the information stream server when a status change occurs in the recommendation server (from failure to normal, or from normal to failure), or may transmit status confirmation information to the recommendation server and receive the status indication information transmitted by the recommendation server.

[0054] That is, the content recommendation method according to the embodiment of the present invention includes: The method further includes a recommendation server sending status indication information to the information stream server, the status indication information being for indicating whether the recommendation server is out of order.

[0055] In the above step S12, if the information stream server determines that the recommendation server is down, the content recommendation method according to the embodiment of the present invention further performs the following steps S13 and S14.

[0056] S13: The information stream server obtains a first recommended content based on a recommendation cache corresponding to the target user.

[0057] The recommendation cache stores a plurality of recommended contents corresponding to the target user, and the plurality of recommended contents are written when the recommendation server is not experiencing a failure.

[0058] In some embodiments, an implementation of obtaining a first recommended content based on a recommendation cache corresponding to the target user includes: determining a first number of recommended contents in the recommendation cache, the first number being, for example, a preset value; generating the first recommended content based on a top first number of recommended content in the recommendation cache.

[0059] In some embodiments, the recommendation cache corresponding to the target user is stored as the indicator information of the recommended content corresponding to the target user, and the implementation of the information stream server obtaining the first recommended content according to the recommendation cache corresponding to the target user includes: Obtaining at least one indication information of a recommended content according to a recommendation cache corresponding to the target user; and obtaining the first recommended content based on label information of the at least one recommended content.

[0060] In some embodiments, the information stream server generating the first recommended content based on a first number of top recommended content in the recommendation cache comprises: The information stream server generates the first recommended content by removing recommended content sent to the terminal device from among a top first number of recommended contents in the recommendation cache.

[0061] For example, when the first number is 4, the top four recommended contents in the recommendation cache include recommended content A, recommended content B, recommended content C and recommended content D, and recommended content C has already been sent to the terminal device, so the first recommended content generated includes recommended content A, recommended content B and recommended content D.

[0062] S14: The information stream server transmits the first recommended content to the terminal device.

[0063] In response, the terminal device receives the first recommended content sent by the information stream server.

[0064] In this way, when the recommendation server is out of order, the information stream server can send recommended content corresponding to the target user to the terminal device, thereby avoiding randomly providing content to the user when the recommendation server is out of order, and improving the stability of the information stream recommendation application.

[0065] In the above step S12, if the information stream server determines that the recommendation server is normal, the content recommendation method according to the embodiment of the present invention further executes the following steps S15 to S19.

[0066] S15: The information stream server sends recommendation request information to the recommendation server.

[0067] In response, the recommendation server receives the recommendation request information sent by the information stream server.

[0068] The recommendation request information is for requesting to obtain recommended content corresponding to the target user.

[0069] Similarly, the information stream server may carry the target user's identification information in the recommendation request information to request to obtain the recommended content corresponding to the target user.

[0070] S16: The recommendation server obtains a recommended content sequence corresponding to the target user through a preset recommendation algorithm.

[0071] The recommended content sequence includes a plurality of recommended contents, and the plurality of recommended contents are sorted in descending order of relevance to the target user.

[0072] In some embodiments, the implementation form in which the recommendation server obtains the recommended content sequence corresponding to the target user through a preset recommendation algorithm includes: Obtaining a relevance between each content and the target user through a preset recommendation algorithm; sorting each of the contents in descending order based on relevance and obtaining a sorted result of each of the contents; The method may further include determining the top m pieces of content in the sorted result as a recommended content sequence corresponding to the target user.

[0073] The m value may be set as a parameter of the recommendation algorithm as necessary. Exemplarily, the m value may be 1000, 2000, etc.

[0074] S17: The recommendation server transmits the top second number of recommended contents (second recommended contents) in the recommended content sequence to the information stream server, where the second number is, for example, a preset value.

[0075] In response, the information stream server receives the second recommended content (the top second number recommended content in the sequence of recommended contents) sent by the recommendation server.

[0076] The embodiment of the present invention does not limit the second number, and the second number may be set to any positive integer according to practical needs. For example, the second number may be 4 or 6.

[0077] S18: The recommendation server writes the recommended content sequence into a recommendation cache corresponding to the target user.

[0078] In some embodiments, a content recommendation method according to an embodiment of the present invention comprises: The method further includes, before the recommendation server writes the recommended content sequence into a recommendation cache corresponding to the target user, performing a duplicate elimination process on the recommended content in the recommended content sequence based on the recommended content stored in the recommendation cache corresponding to the target user and the recommended content sent to the information stream server.

[0079] Before writing the recommended content sequence into the recommendation cache corresponding to the target user, the embodiment of the present invention performs a de-duplication process on the recommended content in the recommended content sequence according to the recommended content stored in the recommendation cache corresponding to the target user and the recommended content sent to the information stream server. Therefore, the embodiment of the present invention can avoid storing duplicated recommended content in the recommendation cache, and further avoid the waste of cache space caused by duplicated recommended content.

[0080] S19: The information stream server sends the second recommended content to the terminal device.

[0081] In response, the terminal device receives the second recommended content sent by the information stream server.

[0082] In the content recommendation method according to the embodiment of the present invention, when a terminal device receives content request information for requesting to obtain recommended content corresponding to a target user, the method first determines whether a recommendation server is out of order, and if the recommendation server is out of order, obtains a first recommended content based on a plurality of recommended contents written in a recommendation cache when the recommendation server is not out of order, and transmits the first recommended content to the terminal device. The content recommendation method according to the embodiment of the present invention writes a plurality of recommended contents corresponding to a target user in a recommendation cache corresponding to the target user when the recommendation server is not out of order, and obtains recommended content to be transmitted to the terminal device based on the recommendation cache corresponding to the target user when the recommendation server is out of order, so that the content recommendation method according to the embodiment of the present invention can still transmit recommended content corresponding to the user to the terminal device while the recommendation server is out of order, and avoids affecting the user's experience. Therefore, the embodiment of the present invention can improve the stability of information stream recommendation applications.

[0083] As an alternative embodiment of the present invention, a content recommendation method according to an embodiment of the present invention includes: The method further includes clearing the recommended content in the recommendation cache corresponding to the target user when a length of time during which the information stream server has not transmitted the recommended content corresponding to the target user to the terminal device corresponding to the target user exceeds a first length of time.

[0084] In addition, after the terminal device sends the content request information to the information stream server, the information stream server returns the recommended content to the terminal device regardless of whether the recommendation server is out of order or not. Therefore, the time length during which the information stream server does not send the recommended content corresponding to the target user to the terminal device corresponding to the target user is the time length during which the terminal device does not send the content request information to the information stream server. Therefore, it may be determined whether to clear the recommended content in the recommendation cache corresponding to the target user based on the time length during which the terminal device does not send the content request information to the information stream server.

[0085] The above embodiment clears the recommended content in the recommendation cache corresponding to the target user when the time length during which the information stream server does not send the recommended content corresponding to the target user to the terminal device corresponding to the target user exceeds a first time length. Therefore, the above embodiment clears the recommendation cache corresponding to the target user when the target user does not use the information stream recommendation application for a long time, and further improves the utilization rate of the cache space.

[0086] As an alternative embodiment of the present invention, a content recommendation method according to the present invention includes: The method further includes the recommendation server determining a capacity of cache space for storing a recommendation cache corresponding to each user based on at least one of an average number of active users of the recommendation server within the first time period, an average fault repair time of the recommendation server, an average consumption time per one of the recommended contents, an average amount of data per one of the recommended contents, and a fault tolerance factor.

[0087] In some embodiments, the capacity of cache space of the recommendation cache corresponding to each user is positively correlated with the average number of active users of the recommendation server within the first time period, the average fault recovery time of the recommendation server, the average data amount per one of the recommended contents and a fault tolerance factor, and is negatively correlated with the average consumption time per one of the recommended contents.

[0088] Exemplarily, the first time period is 24 hours, and the average number of active users of the recommendation server within the first time period is the number of daily active users (DUA) of the recommendation server.

[0089] Illustratively, the first time period is one week, and the average number of active users of the recommendation server within the first time period is the number of active users per week (WUA) of the recommendation server.

[0090] In some embodiments, the recommended servers' mean time to repair may be predicted based on historical data.

[0091] Exemplarily, the fault tolerance factor may be 1.1 or 1.2.

[0092] Furthermore, determining a capacity of a cache space for storing a recommendation cache corresponding to each user based on at least one of the average number of active users of the recommendation server within the first time period, the average fault recovery time of the recommendation server, the average consumption time per one of the recommended contents, the average data amount per one of the recommended contents, and a fault tolerance factor, as described above, the average number of active users of the recommendation server within the first time period, the average fault recovery time of the recommendation server, the average consumption time per one of the recommended contents, the average data amount per one of the recommended contents, a fault tolerance factor, and the following formula, i.e.

number

[0093] Based on the same inventive concept, as an implementation of the above method, an embodiment of the present invention further provides an information stream server and a recommendation server, which corresponds to the above method embodiment. For ease of reading, the present embodiment does not go into detail about the details of the above method embodiment, but it is obvious that the information stream server and recommendation server in the present embodiment can correspondingly realize all the contents of the above method embodiment.

[0094] An embodiment of the present invention provides an information stream server. Figure 3 is a schematic diagram of the information stream server. As shown in Figure 3, the information stream server 300 includes: a receiving unit 31 for receiving content request information transmitted by a terminal device, the content request information being for requesting to obtain recommended content corresponding to a target user; a processing unit 32 for determining whether a recommendation server has failed; an acquisition unit 33 for acquiring a first recommended content based on a recommendation cache corresponding to the target user when the processing unit determines that the recommendation server is out of order, the recommendation cache storing a plurality of recommended contents corresponding to the target user, and the plurality of recommended contents being written when the recommendation server is not out of order; and a transmission unit 34 for transmitting the first recommended content to the terminal device.

[0095] As an alternative embodiment of the present invention, The sending unit 34 is further used for sending recommendation request information to the recommendation server when the recommendation server is normal, the recommendation request information being for requesting to obtain recommended content corresponding to the target user; The receiving unit 31 is further used for receiving a second recommended content transmitted by the recommendation server; The sending unit 34 is further used for sending the second recommended content to the terminal device.

[0096] As an alternative embodiment of the present invention, the processing unit 32 is specifically used for obtaining status indication information of the recommended server and determining whether the recommended server is faulty or not based on the status indication information.

[0097] As an optional embodiment of the present invention, the processing unit 32 is specifically used for determining that the recommendation server is faulty if no response information returned by the recommendation server is received within a response time period of a preset length of time.

[0098] In an alternative embodiment of the present invention, the recommended content in the recommendation cache is sorted in descending order of relevance to the target user; Specifically, the acquisition unit 33 is used for determining the top first number of recommended contents in the recommendation cache, and generating the first recommended content based on the top first number of recommended contents in the recommendation cache.

[0099] An embodiment of the present invention provides a recommendation server. Figure 4 is a schematic diagram of the configuration of the information stream server. As shown in Figure 4, the recommendation server 400 includes: a receiving unit 41 for receiving recommendation request information sent by an information stream server, the recommendation request information being for requesting a target user to obtain a recommended content corresponding to the target user; a processing unit 42 for acquiring a recommended content sequence corresponding to the target user by a preset recommendation algorithm, the recommended content sequence including a plurality of recommended contents, and the plurality of recommended contents are sorted in descending order of relevance to the target user; a sending unit 43 for sending the top first number of recommended contents of the recommended content sequence to the information stream server; and a cache manager 44 for writing the recommended content sequence into a recommendation cache corresponding to the target user.

[0100] As an alternative embodiment of the present invention, The sending unit 43 is further used for sending status indication information to the information stream server, the status indication information being for indicating whether the recommended server is out of order or not.

[0101] As an optional embodiment of the present invention, the cache management unit 44 is further used to perform a duplicate elimination process on the recommended content in the recommended content sequence based on the recommended content stored in the recommendation cache corresponding to the target user and the recommended content sent to the information stream server before writing the recommended content sequence to the recommendation cache corresponding to the target user.

[0102] As an optional embodiment of the present invention, the cache management unit 44 is further used for clearing the recommended content in the recommendation cache corresponding to the target user when the time length during which the information stream server does not transmit the recommended content corresponding to the target user to the terminal device corresponding to the target user exceeds a first time length.

[0103] As an optional embodiment of the present invention, the cache management unit 44 is further used to determine the capacity of cache space for storing the recommendation cache corresponding to each user based on at least one of the average number of active users of the recommendation server within the first time length, the average fault repair time length of the recommendation server, the average consumption time length per one of the recommended contents, the average data amount per one of the recommended contents, and a fault tolerance factor.

[0104] As an optional embodiment of the present invention, the capacity of cache space of the recommendation cache corresponding to each user is positively correlated with at least one of the average number of active users of the recommendation server within the first time length, the average fault repair time of the recommendation server, the average data amount per one of the recommended contents, or a fault tolerance factor, and is negatively correlated with the average consumption time per one of the recommended contents.

[0105] As an alternative embodiment of the present invention, the cache management unit 44 specifically calculates the average number of active users of the recommended server within the first time period, the average repair time of the recommended server, the average consumption time per one of the recommended contents, the average data amount per one of the recommended contents, a fault tolerance factor, and the following formula, i.e.,

number

[0106] The information stream server and recommendation server according to this embodiment can implement the content recommendation method according to the above method embodiment, and the realization principles and technical effects are similar, so they will not be further described here.

[0107] Based on the same inventive concept, an embodiment of the present invention further provides an electronic device. Figure 5 is a schematic diagram of the configuration of an electronic device according to an embodiment of the present invention. As shown in Figure 5, the electronic device according to this embodiment includes a memory 501 and a processor 502, the memory 501 is for storing a computer program, and the processor 502 is for executing the computer program to perform the content recommendation method according to the above embodiment.

[0108] Based on the same inventive concept, an embodiment of the present invention further provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, causes said computing device to implement the content recommendation method according to the above embodiment.

[0109] Based on the same inventive concept, an embodiment of the present invention further provides a computer program product which, when executed in a computer, causes the computing device to implement the content recommendation method according to the above embodiment.

[0110] Based on the same inventive idea, an embodiment of the present invention further provides a computer program comprising instructions which, when executed by a processor, cause said processor to perform the content recommendation method according to the above embodiment.

[0111] As will be appreciated by those skilled in the art, embodiments of the present invention may be provided as a method, a system, or a computer program product. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. In addition, the present invention may take the form of a computer program product embodied in one or more computer usable storage mediums containing computer usable program code.

[0112] The processor may be a Central Processing Unit (CPU) or other general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, etc. The general purpose processor may be a microprocessor, or the processor may be any conventional processor, etc.

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

[0114] Computer-readable media includes permanent and non-permanent, removable and non-removable storage media. Storage media can achieve storage of information by any method or technology, and information may be computer-readable instructions, data structures, modules of programs, 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 disc read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage device, magnetic cassette, magnetic disk storage device or other magnetic storage device, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media, such as modulated data signals and carrier waves.

[0115] Finally, it should be noted that the above embodiments are only used to explain the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art may still modify the technical solutions described in the above embodiments, or replace some or all of the technical features therein with equivalents, and these modifications or replacements do not cause the essence of the corresponding technical solutions to depart from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A content recommendation method applied to an information stream server, comprising: receiving content request information transmitted by a terminal device, the content request information being for requesting to obtain recommended content corresponding to a target user; determining whether a recommendation server is down; When the recommendation server is out of order, a first recommended content is obtained based on a recommendation cache corresponding to the target user, the recommendation cache stores a plurality of recommended contents corresponding to the target user, and the plurality of recommended contents are written when the recommendation server is not out of order; and transmitting the first recommended content to the terminal device.

2. If the recommendation server is normal, sending recommendation request information to the recommendation server, the recommendation request information being for requesting to obtain recommended content corresponding to the target user; receiving a second recommended content transmitted by the recommendation server; The method of claim 1 , further comprising: transmitting the second recommended content to the terminal device.

3. Determining whether the recommendation server is down includes: obtaining status indication information of the recommendation server; 3. The method of claim 1, further comprising: determining whether the recommendation server has failed based on the status indication.

4. Determining whether the recommendation server is down includes: The method according to any one of claims 1 to 3, comprising determining that the recommendation server is at fault if no response information is received from the recommendation server within a response time period of a preset length of time.

5. The recommended contents in the recommendation cache are sorted in descending order of relevance to the target user, and obtaining a first recommended content based on the recommendation cache corresponding to the target user includes: determining a top number of recommended content in the recommendation cache; The method of any one of claims 1 to 4, comprising: generating the first recommended content based on a top first number of recommended content in the recommendation cache.

6. A content recommendation method applied to a recommendation server, comprising: receiving recommendation request information sent by an information stream server, the recommendation request information being for requesting to obtain recommended content corresponding to a target user; Obtaining a recommended content sequence corresponding to the target user through a preset recommendation algorithm, the recommended content sequence including a plurality of recommended contents, and the plurality of recommended contents are sorted in descending order of relevance to the target user; sending a top second number of recommended contents of the recommended content sequence to the information stream server; and writing the recommended content sequence into a recommendation cache corresponding to the target user.

7. 7. The method of claim 6, further comprising: sending status indication information to the information stream server, the status indication information being for indicating whether the recommendation server has failed.

8. The method according to claim 6 or 7, further comprising: before writing the recommended content sequence to the recommendation cache corresponding to the target user, performing a duplicate elimination process on the recommended content in the recommended content sequence based on the recommended content stored in the recommendation cache corresponding to the target user and the recommended content sent to the information stream server.

9. 9. The method of claim 8, further comprising: clearing the recommended content in the recommendation cache corresponding to the target user when a time period during which the information stream server has not sent the recommended content corresponding to the target user to the terminal device corresponding to the target user exceeds a first time period.

10. The method of claim 8 or 9, further comprising determining a capacity of cache space for storing a recommendation cache corresponding to each user based on at least one of an average number of active users of the recommendation server within a first time period, an average time to repair a failure of the recommendation server, an average consumption time per one of the recommended contents, an average amount of data per one of the recommended contents, and a fault tolerance factor.

11. The method of claim 10, wherein the capacity of cache space of the recommendation cache corresponding to each user is positively correlated with at least one of the average number of active users of the recommendation server within the first time period, the average time to repair a failure of the recommendation server, the average amount of data per one of the recommended contents, or a fault tolerance factor, and is negatively correlated with the average consumption time per one of the recommended contents.

12. Determining a capacity of a cache space for storing a recommendation cache corresponding to each user based on at least one of an average number of active users of the recommendation server within the first time period, an average repair time of the recommendation server, an average consumption time per one of the recommended contents, an average amount of data per one of the recommended contents, and a fault tolerance factor, the average number of active users of the recommendation server within the first time period, the average repair time of the recommendation server, the average consumption time per one of the recommended contents, the average amount of data per one of the recommended contents, a fault tolerance factor, and the following formula: [0010] and determining a capacity of cache space for storing a recommendation cache corresponding to each user based on the first time length, where CacheSize is the capacity of cache space for storing a recommendation cache corresponding to each user, TTR is a mean time to repair failure of the recommendation server, T is an average consumption time length per one of the recommended contents, S is an average amount of data per one of the recommended contents, AU is a number of average active users of the recommendation server within the first time length, and F is a fault tolerance factor.

13. a receiving unit for receiving content request information transmitted by a terminal device, the content request information being for requesting to obtain recommended content corresponding to a target user; a processor for determining whether a recommendation server has failed; an acquisition unit for acquiring a first recommended content based on a recommendation cache corresponding to the target user when the processing unit determines that the recommendation server is out of order, the recommendation cache storing a plurality of recommended contents corresponding to the target user, the plurality of recommended contents being written when the recommendation server is not out of order; a transmitting unit for transmitting the first recommended content to the terminal device.

14. A receiving unit for receiving recommendation request information transmitted by an information stream server, the recommendation request information being for requesting a target user to obtain a recommended content corresponding to the target user; A processing unit for acquiring a recommended content sequence corresponding to the target user by a preset recommendation algorithm, the recommended content sequence including a plurality of recommended contents, and the plurality of recommended contents are sorted in descending order of relevance to the target user; a transmitting unit for transmitting a top second number of recommended contents of the recommended content sequence to the information stream server; a cache manager for writing the recommended content sequence into a recommendation cache corresponding to the target user.

15. Memory, A processor coupled to the memory and configured to implement the content recommendation method according to any one of claims 1 to 12 based on instructions stored in the memory.

16. A computer-readable storage medium having stored thereon a computer program which, when executed by a computing device, causes the computing device to implement the content recommendation method according to any one of claims 1 to 12.

17. A computer program product which, when executed on a computer, causes the computer to implement the content recommendation method according to any one of claims 1 to 12.

18. A computer program comprising instructions which, when executed by a processor, cause the processor to perform the content recommendation method according to any one of claims 1 to 12.

Citation Information

Patent Citations

  • Video recommendation method and device and server

    CN109729432A

  • Content recommendation method and device, server and computer readable storage medium

    CN113268666A

  • Information processing apparatus, information processing system, information processing method, program, and storage medium

    JP2014149645A