Content recommendation request processing method and device, electronic equipment and storage medium

By storing the client's request identification and recommended content in the cache, and using the target request identification to determine the request type, directly obtaining the recommended content of the retry request from the cache, the client fails to obtain recommended content when the network environment is poor, and more accurate and efficient push of recommended content is achieved.

CN120104858APending Publication Date: 2025-06-06FACE CUTE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311652023.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-04
Publication Date
2025-06-06

AI Technical Summary

Technical Problem

In areas with poor network environments, the client has a high failure rate of requesting recommended content during peak service periods, which leads to the client being unable to obtain recommended content in time or the recommended content obtained is inaccurate, and a large amount of effective push content is wasted.

Method used

Determine whether the content recommendation request is a retry request through the target request identification. If it is a retry request, obtain the corresponding target recommendation content from the cache to avoid re-pulling the recommended content, and ensure that the client can obtain effective and accurate recommended content in a timely manner.

Benefits of technology

It effectively solves the problem of inaccurate recommended content re-acquisition by the client after the content acquisition fails, improves the success rate of recommended content acquisition, and reduces the overhead of accessing recommendation services or repeatedly calculating recommended content.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120104858A_ABST
    Figure CN120104858A_ABST
Patent Text Reader

Abstract

The invention relates to the field of network communication, in particular to a content recommendation request processing method and device, electronic equipment and a storage medium. According to the method provided by the embodiment of the invention, whether the content recommendation request is the retry request is determined through the target request identifier, if the content recommendation request is the retry request, it is indicated that the client fails to obtain the recommended content before, and at the moment, the server can directly obtain the request identifier and the corresponding target recommended content from the cache; according to the process, the recommended content does not need to be pulled again through the recommendation service, it is guaranteed that the target client can obtain the effective and accurate recommended content in time, and the problem that the recommended content obtained again by the client after content obtaining fails is inaccurate is solved. And meanwhile, the recommended content is stored in the cache, so that the server can quickly retrieve the cache, and the overhead of frequently accessing the recommended service or repeatedly calculating the recommended content is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of network communications, and in particular to a method, device, electronic device and storage medium for processing a content recommendation request. Background Art

[0002] At present, in areas with poor network environment, during peak service periods (high service load and high latency), the failure rate of client requests for recommended content is high (failure rate = (number of failures / total number of requests) × 100%). When a client request for recommended content fails, it will send a new content recommendation request, and the system will recommend a new batch of content to the client based on the request.

[0003] In the above process, the content that the client fails to obtain recommendation will not appear in the new batch of recommended content. Therefore, a high failure rate may cause the client to fail to obtain recommended content in time or obtain inaccurate recommended content, and also waste a lot of effective push content. Summary of the invention

[0004] In view of this, the embodiments of the present disclosure provide a method, device, electronic device and storage medium for processing content recommendation requests to solve the problem that a high failure rate may cause the client to be unable to obtain recommended content in a timely manner or the recommended content obtained is inaccurate, while also wasting a large amount of effective push content.

[0005] In a first aspect, an embodiment of the present disclosure provides a method for processing a content recommendation request, the method comprising:

[0006] Receiving a content recommendation request from a target client, wherein the content recommendation request includes a target request identifier;

[0007] Verify the target request identifier to obtain the request type corresponding to the content recommendation request;

[0008] If the request type is a retry type, obtaining corresponding target recommended content from a cache using the target request identifier, wherein the cache is used to store request identifiers corresponding to different clients and recommended content corresponding to the request identifiers;

[0009] The target recommended content is sent to the target client.

[0010] In a second aspect, an embodiment of the present disclosure provides a device for processing a content recommendation request, the device comprising:

[0011] A receiving module, configured to receive a content recommendation request from a target client, wherein the content recommendation request includes a target request identifier;

[0012] A verification module, used to verify the target request identifier and obtain a request type corresponding to the content recommendation request;

[0013] an acquisition module, configured to acquire corresponding target recommended content from a cache using the target request identifier if the request type is a retry type, wherein the cache is configured to store request identifiers corresponding to different clients and recommended content corresponding to the request identifiers;

[0014] A sending module is used to send the target recommended content to the target client.

[0015] In a third aspect, an embodiment of the present disclosure provides an electronic device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.

[0016] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the method of the first aspect or any corresponding implementation manner thereof.

[0017] The method provided by the disclosed embodiment determines whether the content recommendation request is a retry request through the target request identifier. If it is a retry request, it means that the client failed to obtain the recommended content before. At this time, the server can directly obtain the request identifier and the corresponding target recommended content from the cache. This process does not need to re-pull the recommended content through the recommendation service, ensuring that the target client can obtain effective and accurate recommended content in a timely manner, solving the problem of inaccurate recommended content re-obtained by the client after the content acquisition fails. At the same time, by storing the recommended content in the cache, the server can quickly retrieve the cache, avoiding the overhead of frequently accessing the recommendation service or repeatedly calculating the recommended content. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the specific embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the specific embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0019] Figure 1 is a schematic diagram of a client retrying to obtain recommended content according to some embodiments of the present disclosure;

[0020] Figure 2 is a flowchart of a method for processing a content recommendation request according to some embodiments of the present disclosure;

[0021] Figure 3 is a flowchart of a method for processing a content recommendation request according to some embodiments of the present disclosure;

[0022] Figure 4 is a scenario diagram of a method for processing a content recommendation request according to some embodiments of the present disclosure;

[0023] Figure 5 is a timing diagram of a method for processing a content recommendation request according to some embodiments of the present disclosure;

[0024] Figure 6 is a structural block diagram of a device for processing content recommendation requests according to an embodiment of the present disclosure;

[0025] Figure 7 It is a schematic diagram of the hardware structure of the electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0026] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, rather than all the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present disclosure.

[0027] Currently, after the client fails to obtain the recommended content for the first time (the recommended content obtained for the first time is recorded as Feed1), it resends the content recommendation request, and the re-obtained recommended content is recorded as Feed2. Figure 1 As shown, the interest level of the starting content of Feed2 is lower than that of the starting content of Feed1, because the starting content of Feed1 can be understood as the topN recommended content with the highest interest. Feed2 can only select recommended content from (total-topx) videos at the same time, but the recommended content selected at this time may not match the recommended content that the client expects to obtain.

[0028] As time goes by, the push content of Feed2 can be dynamically updated, and the recommended content with higher interest can be obtained based on the client behavior (like, play, share, etc.). However, as time goes by and the content itself becomes time-sensitive, the interest level of the recommended content of Feed1 decreases.

[0029] Figure 1 The T1 point is related to the following factors:

[0030] ① The speed at which new browsing behaviors take effect on model-recommended content.

[0031] Different browsing behaviors take effect at different speeds. The fastest is 30 seconds, the average is minutes, and the longest is 10 minutes. Newer and more user actions can more accurately determine the user's current interests.

[0032] ②The speed at which the content’s timeliness decays.

[0033] The timeliness of the content may decay at different rates. For example, compared with videos of strangers, live broadcasts, advertisements, and videos of acquaintances may be more timely.

[0034] ③The supply of content that users are interested in.

[0035] If the supply is small or the current user has few interests (for example, he only likes insect encyclopedia), then Feed 1 has a larger content pool to choose from than Feed 2. T1 will also move later, and the value of idempotence will be greater.

[0036] In summary, if the client fails to obtain the recommended content for the first time and then re-obtains the recommended content, the client will not be able to obtain effective recommended content in a timely manner, and the recommended content subsequently re-obtained will be inaccurate.

[0037] Based on this, in order to solve the above-mentioned technical problems, the embodiments of the present disclosure provide a method, device, electronic device and storage medium for processing content recommendation requests. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0038] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0039] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.

[0040] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0041] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0042] In this embodiment, a method for processing a content recommendation request is provided. Figure 2 is a flowchart of a method for processing a content recommendation request according to an embodiment of the present disclosure, such as Figure 2 As shown, the process includes the following steps:

[0043] Step S11: receiving a content recommendation request from a target client, wherein the content recommendation request includes a target request identifier.

[0044] In the disclosed embodiment, the server receives a content recommendation request sent by a target client, and the target client may be any one of multiple clients related to the recommendation service of the server. The recommendation service generates and recommends relevant content to the client by analyzing the user's behavior, interests, preferences and other data, combining algorithm models and data processing technology, such as commodities, news, music, videos, social media posts, etc. The recommendation service can be used on multiple clients, such as e-commerce platforms, news applications, social media platforms, music streaming applications, etc.

[0045] In the disclosed embodiment, the content recommendation request is used to obtain the recommended content corresponding to the target client, and the recommended content can be video content, advertising content, game content, etc. The content recommendation request usually contains some identification information, including a target request identifier (token), which is an identifier used to uniquely identify a content recommendation request. It can be a string, a number, or other type of value used to distinguish different requests. Normally, when the target client sends a request, it carries a unique identifier (target request identifier) ​​in the request, and the server can subsequently identify the idempotence of the request based on the identifier.

[0046] After receiving the content recommendation request, the server will parse the target request identifier to understand the specific operation or business logic corresponding to the request. For example, the server can determine the type of content required by the target client based on the target request identifier. If the target request identifier indicates that the target client needs to obtain advertising content, the server can execute the logic of obtaining advertising content; if the target request identifier indicates that the user needs to obtain video content, the server can execute the logic of obtaining video content.

[0047] Step S12, verifying the target request identifier to obtain the request type corresponding to the content recommendation request.

[0048] In an embodiment of the present disclosure, when a target client sends a content recommendation request, a specific retry field may be added to the target request identifier, such as setting the retry identifier field to "retry" or other custom identifiers. This identifier is used to indicate that the request is a retry request. When the server receives the content recommendation request, it first parses the target request identifier and checks whether there is a retry field. Whether the content recommendation request is a retry type can be determined by judging a specific field or value in the request. If there is a retry field in the target request identifier, it means that the request type corresponding to the content recommendation request is a retry type. On the contrary, if there is no retry field in the target request identifier, it means that the request type corresponding to the content recommendation request is a non-retry type.

[0049] Step S13: if the request type is a retry type, the target request identifier is used to obtain the corresponding target recommended content from the cache, wherein the cache is used to store the request identifiers corresponding to different clients and the recommended content corresponding to the request identifiers.

[0050] In the disclosed embodiment, if the request type is a retry type, the server obtains the target recommended content corresponding to the target request identifier from the cache, wherein the cache may be Abase high-throughput, high-availability NoSQL. The cache stores the request identifiers corresponding to different clients and the recommended content corresponding to the request identifiers.

[0051] It should be noted that by storing the client's request identifier and the request identifier and the corresponding recommended content in the cache, it can be ensured that when the client resends the content recommendation request after the request fails, it can still obtain the recommended content with a high degree of interest, without having to re-pull the recommended content through the recommendation service, ensuring that the target client can obtain effective and accurate recommended content in a timely manner, solving the problem of inaccurate recommended content re-obtained by the client after the content acquisition fails. At the same time, by caching the recommendation results in high-throughput, high-availability NoSQL storage, the server can quickly retrieve the cache, avoiding the overhead of frequently accessing the recommendation service or repeatedly calculating the recommendation results, thereby improving the response speed. Improve the overall throughput.

[0052] Step S14: sending the target recommended content to the target client.

[0053] In the disclosed embodiment, the server packages the target recommended content to obtain a file package, and then sends the file package to the target client.

[0054] As an example, client A is a short video APP, and the client can watch and share various types of video content. In this example, the server can obtain the target recommended content corresponding to the target request identifier from the cache, where the target recommended content can be literary videos, game videos, and so on. Specifically, when client A needs to browse the video, the client first generates a query request and assigns a unique target request identifier Token to the content recommendation request. Client A sends a content recommendation request carrying the target request identifier. The server receives the request from user A and first verifies the target request identifier. The server queries the cache to check whether there is recommended video content corresponding to the Token. If the recommended result corresponding to the Token exists in the cache, and the recommended result is video content, the server will obtain the video content from the cache, package it, and send it to client A.

[0055] As an example, client B is an e-commerce APP, and the client can browse various types of products, advertisements and other information. In this example, the server can obtain the target recommended content corresponding to the target request identifier from the cache, where the target recommended content can be product content or advertising content. Specifically, when the server receives a content recommendation request from client B, it will obtain the corresponding target recommended content from the cache according to the target request identifier in the content recommendation request. After the server obtains the target recommended content from the cache, it will package the advertising content and generate a data file or message body containing the advertising content, such as a JSON file. The file will contain relevant information about the advertisement, such as advertising images, advertising titles, advertising descriptions, advertising links, etc.

[0056] The method provided by the disclosed embodiment determines whether the content recommendation request is a retry request through the target request identifier. If it is a retry request, it means that the client failed to obtain the recommended content before. At this time, the server can directly obtain the request identifier and the corresponding target recommended content from the cache. This process does not need to re-pull the recommended content through the recommendation service, ensuring that the target client can obtain effective and accurate recommended content in a timely manner, solving the problem of inaccurate recommended content re-obtained by the client after the content acquisition fails. At the same time, by storing the recommended content in the cache, the server can quickly retrieve the cache, avoiding the overhead of frequently accessing the recommendation service or repeatedly calculating the recommended content.

[0057] Figure 3is a flowchart of a method for processing a content recommendation request according to an embodiment of the present disclosure, such as Figure 3 As shown, the process includes the following steps:

[0058] Step S21, receiving a content recommendation request from a target client, wherein the content recommendation request includes a target request identifier. Figure 2 Step S11 of the illustrated embodiment will not be described in detail here.

[0059] Step S22, verify the target request identifier and obtain the request type corresponding to the content recommendation request.

[0060] In the disclosed embodiment, the target request identifier is verified to obtain the request type corresponding to the content recommendation request, including: obtaining the historical content recommendation requests sent by the target client in the current recommendation cycle, and constructing a historical content recommendation request set using the historical content recommendation requests; detecting whether there is a historical content recommendation request including the target request identifier in the historical content recommendation request set. If there is a historical content recommendation request including the request identifier, determine that the request type is a retry type; or, if there is no historical content recommendation request including the request identifier, determine that the request type is a non-retry type. It should be noted that the current recommendation cycle can be set according to the request frequency of the client, for example: 30 minutes, 1 hour, etc.

[0061] Specifically, obtain the target client's historical content acquisition request set. Each content acquisition request contains a request identifier token. Traverse the historical content acquisition request set and check whether each request contains the same request identifier as the target request identifier. Then enter the request type judgment process:

[0062] ① There is a historical content recommendation request that includes the target request identifier: If a request identifier that includes the target request identifier is found in the historical content recommendation request set, then it can be determined that the request type is a retry type. This means that the target client encountered an error or failed to successfully obtain the recommended content when trying to obtain the recommended content before, and is now trying to obtain it again.

[0063] ② There is no historical content recommendation request including the target request identifier: If there is no request identifier identical to the target request identifier in the historical content recommendation request set, then it can be determined that the request type is a non-retry type. This means that the client is sending a request for the first time or the previous request has successfully obtained the recommended content.

[0064] Based on this, the server can determine the request type, whether it is a retry type or a non-retry type, based on the history of the target request identifier. In this way, the client's request can be processed in a targeted manner, and whether to obtain the recommended content from the cache or regenerate the recommended content can be selected according to the actual situation.

[0065] Step S23: if the request type is a retry type, the target request identifier is used to obtain the corresponding target recommended content from the cache, wherein the cache is used to store the request identifiers corresponding to different clients and the recommended content corresponding to the request identifiers.

[0066] In the embodiment of the present disclosure, if the request type is a retry type, it means that the client has failed to obtain the recommended content before. At this time, the server uses the target request identifier to obtain the corresponding target recommended content.

[0067] Specifically, using the target request identifier to obtain the corresponding target recommendation content from the cache includes the following steps A1-A3:

[0068] Step A1: query the cache to obtain multiple candidate recommended contents corresponding to the target request identifier.

[0069] In the embodiment of the present disclosure, querying the cache to obtain candidate recommended content corresponding to the target request identifier includes the following steps A101-A103:

[0070] Step A101, obtaining the account identification and device identification corresponding to the target client, wherein the device identification is the identification of the smart device where the target client is located.

[0071] In the disclosed embodiment, when logging in or registering at the client, the user will provide account information, such as user name, mobile phone number, email address, etc. The server saves the account information in the database when the user logs in or registers, and generates a unique account identifier for each user.

[0072] The smart device where the target client is located usually has a unique device identifier, such as the device serial number, IMEI number, MAC address, etc. When the client establishes a connection with the server, the client can send the device identification information to the server. After receiving the client's connection request, the server can determine the account identifier corresponding to the target client by verifying the account information provided by the client.

[0073] The method provided in the embodiment of the present disclosure can obtain the device identification of the smart device where the target client is located through the device identification information sent by the client. Account identification and device identification, these identification information, can be used on the server side to identify and distinguish different clients, thereby providing personalized services and recommended content for the target client.

[0074] Step A102, generating query conditions based on the account identifier, the device identifier and the target request identifier.

[0075] In the embodiment of the present disclosure, the account identifier and the device identifier are used in combination with the target request identifier to generate a unique query condition, which can be a combined value or a specific string.

[0076] Step A103, query candidate recommended content from the cache using the query condition.

[0077] In the disclosed embodiment, the generated query condition is compared with the recommended content stored in the cache. According to the data structure and query method of the cache, the query condition can be passed to the cache using a corresponding query statement or interface to retrieve matching candidate recommended content. The cache matches and filters according to the query condition and returns the candidate recommended content that meets the query condition.

[0078] Step A2: Obtain the cache validity period corresponding to each candidate recommendation content.

[0079] In the disclosed embodiment, obtaining the cache validity period corresponding to each candidate recommended content includes: obtaining the update frequency and importance of the candidate recommended content; and configuring the cache validity period corresponding to the candidate recommended content based on the update frequency and importance.

[0080] Specifically, first, determine the update frequency of the recommended content based on business needs and the characteristics of the recommended content. The update frequency can be different time units such as seconds, minutes, hours, days, etc. For example, some recommended content may need to be updated every day, while other content may be updated every hour. Secondly, determine the importance level of the candidate recommended content based on the importance of the recommended content and client needs. You can define multiple levels such as high, medium, and low according to business needs, or use numbers to represent different levels of importance. For example, for important recommended content, a shorter validity period can be used, while for less important content, a longer validity period can be used. Finally, based on the determined update frequency and importance level, combined with business needs and system performance considerations, configure the cache validity period corresponding to the candidate recommended content on the server side.

[0081] For example, for frequently updated and highly important recommended content, a shorter cache validity period can be set. This ensures that the recommended content can be updated in a timely manner and the client can obtain the latest recommendations as soon as possible. For less frequently updated or less important recommended content, a relatively long cache validity period can be set. This reduces frequent access to server resources and improves system performance and response speed.

[0082] Step A3, obtaining the current timestamp, and taking the recommended content whose current timestamp falls within the cache validity period as the target recommended content.

[0083] In the disclosed embodiment, the server obtains the current timestamp, which can be obtained using the time function or time library provided by the system. According to the previously configured update frequency and importance, the cache validity period corresponding to the candidate recommended content is obtained. The cache validity period can be expressed as a time period, such as 30 minutes, 1 hour, etc., or as a specific date and time. Traverse the candidate recommended content in the cache and determine whether the cache time range of each recommended content includes the current timestamp. Find the recommended content in the cache whose cache time range includes the current timestamp and use it as the target recommended content.

[0084] Step S24: Send the target recommended content to the target client. Figure 2 Step S14 of the illustrated embodiment will not be described in detail here.

[0085] The method provided by the disclosed embodiment determines whether the content recommendation request is a retry request through the target request identifier. If it is a retry request, it means that the client failed to obtain the recommended content before. At this time, the server can directly obtain the request identifier and the corresponding target recommended content from the cache. This process does not need to re-pull the recommended content through the recommendation service, ensuring that the target client can obtain effective and accurate recommended content in a timely manner, solving the problem of inaccurate recommended content re-obtained by the client after the content acquisition fails. At the same time, by storing the recommended content in the cache, the server can quickly retrieve the cache, avoiding the overhead of frequently accessing the recommendation service or repeatedly calculating the recommended content.

[0086] In the embodiment of the present disclosure, the method further includes the following steps B1-B4:

[0087] Step B1: when the candidate recommended content corresponding to the target request identifier does not exist in the cache, or the cache validity period corresponding to the candidate recommended content expires, the client information of the target client is obtained.

[0088] In the disclosed embodiment, when the candidate recommended content corresponding to the target request identifier does not exist in the cache, or the cache validity period of the candidate recommended content has expired, it means that when the target client previously sent a content recommendation request, the corresponding candidate recommended content has not been generated, resulting in no relevant content in the cache. Or, the candidate recommended content in the cache has expired. In this case, the client information of the target client is obtained, and the client information may include an account identifier and a device identifier, etc.

[0089] Step B2: Generate a query request based on the client information of the target client.

[0090] In the embodiment of the present disclosure, a query request is constructed based on the account identifier and device identifier of the target client. The request parameters may include the following: Account identifier: a unique identifier of the user, used to identify the user identity of the target client; Device identifier: a unique identifier of the client device, used to identify the device identity of the target client; Content type: indicates the current service type of the client, which may be video, advertisement, game, etc.

[0091] Step B3: sending a query request to the recommendation service system, wherein the recommendation service system is used to feed back target recommended content according to the client information in the query request.

[0092] In the disclosed embodiment, the constructed query request is sent to the recommendation service system. The query request can be sent to the interface address specified by the recommendation service system using the HTTP request method. Among them, the recommendation service system obtains the corresponding key information according to the account identifier. The key information includes the content of interest, behavioral preferences, historical records, etc. corresponding to the account. According to the device identifier, the recommendation service system obtains the device feature information related to the device. The device features may include device type, operating system version, screen resolution, etc., which are used to understand the technical capabilities and display environment of the client. Based on the key information and device features, the recommendation service system will apply the recommendation algorithm for personalized recommendations. The recommendation algorithm will comprehensively consider the account's content of interest and preferences and the client's display environment to generate target recommended content.

[0093] Step B4, receiving target recommended content from the recommendation service system, writing the target recommended content into a cache, and sending the target recommended content to a target client.

[0094] In the disclosed embodiment, according to the recommendation results generated by the recommendation algorithm, the recommendation service system will match and filter the recommended content that meets the client characteristics and user preferences, and finally return the push content. At the same time, after receiving the returned target recommended content, the target push content is stored in the cache to avoid retrying after the client fails to receive the target push content, and quickly obtain the corresponding target push content.

[0095] As an example, Figure 4 As shown in the figure, ① the client sends a content recommendation request to the Feed interface. ② The Feed interface uses the target request identifier in the content recommendation request to query the cache. If there is no target recommendation content corresponding to the target request identifier in the cache. ③ The Feed interface generates a query request based on the client information and sends the query request to the recommendation service system. ④ The recommendation service system pulls the relevant target recommendation content based on the query request and returns it to the Feed interface. ⑤ The Feed interface also synchronizes the target recommendation content to the cache.

[0096] In an embodiment of the present disclosure, the method also includes: if the request type is a non-retry type, triggering a cache clearing mechanism; based on the cache clearing mechanism, querying the historical request identifier corresponding to the target client from the cache, and clearing the historical recommended content corresponding to the historical request identifier in the cache, wherein the historical request identifier is the previous request identifier of the target request identifier.

[0097] Specifically, when the content recommendation request from the client reaches the server, it is first necessary to determine whether the request type is a non-retry type. A non-retry type request can be understood as: the target request identifier used by the client has not appeared in the current cycle, and the latest recommended content needs to be obtained directly from the recommendation service system.

[0098] If the request type is a non-retry type, the cache clearing mechanism is triggered. The cache clearing mechanism can be a timing strategy or a conditional strategy based on request triggering. Different cache clearing strategies can be set according to system requirements and performance considerations, such as timed clearing, LRU (least recently used), etc. When the cache clearing mechanism is triggered, the previous request identifier of the target request identifier is used as the request identifier to be cleared. At this time, the recommended content stored in the cache is retrieved and matched according to the request identifier to be cleared to find the recommended content that needs to be cleared. After clearing the recommended content corresponding to the cache, the recommendation service system can update the cache so that the latest recommended content can be regenerated and stored at the next request. This can improve the response speed and system performance of subsequent requests.

[0099] Figure 5 is an interactive diagram of a method for processing a content recommendation request according to an embodiment of the present disclosure, such as Figure 5 As shown, the process includes the following steps:

[0100] Step ①, the client sends a content recommendation request carrying a target request identifier to the server for the first time.

[0101] Step ②, after receiving the content recommendation request, the server queries the cache to see whether there is target recommended content corresponding to the target request identifier. If not, a query request is generated based on the client information of the client and sent to the recommendation service system.

[0102] Step ③: The recommendation service system pulls the corresponding target recommendation content based on the client information and returns it to the server.

[0103] Step ④: The server writes the target recommended content into the cache and transmits it to the client.

[0104] Step ⑤: the client fails to obtain the target recommended content and performs a retry operation, that is, sends a content recommendation request carrying the target request identifier to the server again.

[0105] Step ⑥, the server obtains the target recommended content corresponding to the target request identifier from the cache, and verifies whether the target recommended content is invalid. If the target recommended content is not invalid, the server sends the target recommended content to the client.

[0106] The method server provided in the embodiment of the present application first queries the target recommended content corresponding to the target request identifier from the cache. If the content exists in the cache, it can be directly obtained from the cache, avoiding additional requests and calculation processes, and improving the response speed and system performance. If the client fails to obtain the target recommended content, a retry operation can be performed to obtain valid recommended content that is of interest to the client, thereby improving the success rate of obtaining recommended content. The problem of inaccurate recommended content re-obtained by the client after content acquisition failure is solved.

[0107] In this embodiment, a content recommendation request processing device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and will not be repeated here. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0108] This embodiment provides a device for processing content recommendation requests. Figure 6 As shown, including:

[0109] A receiving module 61, configured to receive a content recommendation request from a target client, wherein the content recommendation request includes a target request identifier;

[0110] A verification module 62, used to verify the target request identifier and obtain the request type corresponding to the content recommendation request;

[0111] The acquisition module 63 is used to acquire the corresponding target recommended content from the cache using the target request identifier if the request type is a retry type, wherein the cache is used to store the request identifiers corresponding to different clients and the recommended content corresponding to the request identifiers;

[0112] The sending module 64 is used to send the target recommended content to the target client.

[0113] In the embodiment of the present disclosure, the verification module 62 is used to obtain a set of historical content recommendation requests corresponding to the target client; detect whether there is a historical content recommendation request including a target request identifier in the set of historical content recommendation requests; if there is a historical content recommendation request including a request identifier, determine that the request type is a retry type; or, if there is no historical content recommendation request including a request identifier, determine that the request type is a non-retry type.

[0114] In the disclosed embodiment, the acquisition module 63 is used to query the cache to obtain multiple candidate recommended contents corresponding to the target request identifier; obtain the cache validity period corresponding to each candidate recommended content; obtain the current timestamp, and use the recommended content whose current timestamp falls within the cache validity period as the target recommended content.

[0115] In the disclosed embodiment, the acquisition module 63 is used to obtain the account identifier and device identifier corresponding to the target client, wherein the device identifier is the identifier of the smart device where the target client is located; generate query conditions based on the account identifier, device identifier and target request identifier; and use the query conditions to query candidate recommended content from the cache.

[0116] In the disclosed embodiment, the acquisition module 63 is used to acquire the update frequency and importance of the candidate recommended content; and configure the cache validity period of the candidate recommended content based on the update frequency and importance.

[0117] In an embodiment of the present disclosure, the device also includes: a processing module, which is used to obtain client information of the target client when there is no candidate recommended content corresponding to the target request identifier in the cache, or the cache validity period corresponding to the candidate recommended content expires; generate a query request based on the client information of the target client; send the query request to the recommendation service system, wherein the recommendation service system is used to feedback the target recommended content according to the client information in the query request; receive the target recommended content from the recommendation service system, write the target recommended content into the cache, and send the target recommended content to the target client.

[0118] In the embodiment of the present disclosure, the device also includes: an update module, which is used to trigger a cache clearing mechanism if the request type is a non-retry type; based on the cache clearing mechanism, query the historical request identifier corresponding to the target client from the cache, and clear the historical recommended content corresponding to the historical request identifier in the cache, wherein the historical request identifier is the previous request identifier of the target request identifier.

[0119] See also Figure 7 , Figure 7 is a schematic diagram of the structure of an electronic device provided by an optional embodiment of the present disclosure, such as Figure 7As shown, the electronic device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. The various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process instructions executed in the electronic device, including instructions stored in or on the memory to display graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple electronic devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system).

[0120] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.

[0121] The memory 20 stores instructions executable by at least one processor 10, so that at least one processor 10 executes the method shown in the above embodiment.

[0122] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created by the use of an electronic device based on the presentation of a small program landing page, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the electronic device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0123] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.

[0124] The electronic device further comprises a communication interface 30 for the electronic device to communicate with other devices or a communication network.

[0125] The embodiments of the present disclosure also provide a computer-readable storage medium. The above-mentioned method according to the embodiments of the present disclosure can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium and downloaded through a network, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state drive, etc.; further, the storage medium can also include a combination of the above-mentioned types of memory. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0126] Although the embodiments of the present disclosure have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present disclosure, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A method for processing a content recommendation request, It is characterized in that The method comprises: Receiving a content recommendation request from a target client, wherein the content recommendation request includes a target request identifier; Verify the target request identifier to obtain the request type corresponding to the content recommendation request; If the request type is a retry type, obtaining corresponding target recommended content from a cache using the target request identifier, wherein the cache is used to store request identifiers corresponding to different clients and recommended content corresponding to the request identifiers; The target recommended content is sent to the target client.

2. The method according to claim 1, It is characterized in that The verifying the target request identifier to obtain the request type corresponding to the content recommendation request includes: Obtaining a set of historical content recommendation requests corresponding to the target client; Detecting whether there is a historical content recommendation request including the target request identifier in the historical content recommendation request set; If there is a historical content recommendation request including the request identifier, the request type is determined to be a retry type; or if there is no historical content recommendation request including the request identifier, the request type is determined to be a non-retry type.

3. The method according to claim 1, It is characterized in that The obtaining corresponding target recommended content from the cache by using the target request identifier includes: Querying the cache to obtain a plurality of candidate recommended contents corresponding to the target request identifier; Obtaining the cache validity period corresponding to each of the candidate recommended contents; A current timestamp is obtained, and the recommended content whose current timestamp falls within the cache validity period is used as the target recommended content.

4. The method according to claim 3, It is characterized in that The querying the cache to obtain candidate recommended content corresponding to the target request identifier includes: Obtaining an account identifier and a device identifier corresponding to the target client, wherein the device identifier is an identifier of the smart device where the target client is located; Generate a query condition based on the account identifier, the device identifier, and the target request identifier; The candidate recommended content is queried from the cache using the query condition.

5. The method according to claim 3, It is characterized in that The obtaining of the cache validity period corresponding to each of the candidate recommended contents includes: Obtaining the update frequency and importance of the candidate recommended content; The cache validity period corresponding to the candidate recommended content is configured based on the update frequency and the importance.

6. The method according to claim 3, It is characterized in that The method further comprises: When the candidate recommended content corresponding to the target request identifier does not exist in the cache, or the cache validity period corresponding to the candidate recommended content expires, acquiring the client information of the target client; generating a query request based on the client information of the target client; Sending the query request to a recommendation service system, wherein the recommendation service system is used to feedback target recommended content according to the client information in the query request; Receive target recommended content from the recommendation service system, write the target recommended content into the cache, and send the target recommended content to the target client.

7. The method according to claim 1, It is characterized in that The method further comprises: If the request type is a non-retry type, a cache clearing mechanism is triggered; Based on the cache clearing mechanism, the historical request identifier corresponding to the target client is queried from the cache, and the historical recommended content corresponding to the historical request identifier in the cache is cleared, wherein the historical request identifier is the previous request identifier of the target request identifier.

8. A device for processing content recommendation requests, It is characterized in that The device comprises: A receiving module, configured to receive a content recommendation request from a target client, wherein the content recommendation request includes a target request identifier; A verification module, used to verify the target request identifier and obtain a request type corresponding to the content recommendation request; an acquisition module, configured to acquire corresponding target recommended content from a cache using the target request identifier if the request type is a retry type, wherein the cache is configured to store request identifiers corresponding to different clients and recommended content corresponding to the request identifiers; A sending module is used to send the target recommended content to the target client.

9. An electronic device, It is characterized in that include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the method according to any one of claims 1 to 7 by executing the computer instructions.

10. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the method according to any one of claims 1 to 7.