Recommendation method, device and equipment, computer readable storage medium and program product
By filtering and updating the media resources of the target object in real time, the timeliness and accuracy of offline personalized recommendation systems is solved, the efficiency and accuracy of personalized recommendations are improved, and the recommendations of emergencies and high-quality content are adapted.
Patent Information
- Application Number
- CN202410012458.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-03
- Publication Date
- 2025-07-04
AI Technical Summary
The update timeliness of existing offline personalized recommendation systems limits the timeliness and accuracy of recommendations, resulting in lower efficiency and accuracy.
By obtaining the object identification and historical media resource collection of the target object, performing filtering processing, determining the target media resource from the media resource candidate collection, sending resource information based on batch requests, updating recommended content in real time, reducing calculation complexity, and improving the efficiency and accuracy of personalized recommendations.
It achieves the timeliness and coverage of personalized recommendations, reduces the computational complexity, improves the accuracy and efficiency of recommendations, and adapts to real-time updates of emergencies and high-quality content.
Smart Images

Figure CN120256706A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology. Specifically, the present application relates to a recommendation method, apparatus, device, computer-readable storage medium, and program product. Background Art
[0002] In the prior art, a recommendation system can recommend media resources that a user is interested in to the user. The media resources are, for example, articles, videos, etc. The recommendation system is, for example, an offline personalized recommendation system. The main implementation method of the offline personalized recommendation system is to implement it based on an offline task. The completion of the offline task is based on an offline table. However, the update timeliness of the offline table limits the timeliness of personalized recommendation. The update of some offline tables takes a long time, resulting in low efficiency and accuracy of offline personalized recommendation. Summary of the Invention
[0003] In view of the disadvantages of the existing methods, the present application provides a recommendation method, apparatus, device, computer-readable storage medium, and computer program product to solve the problem of how to improve the efficiency and accuracy of personalized recommendation.
[0004] In a first aspect, the present application provides a recommendation method, including:
[0005] Obtaining a resource request for recommending media resources to a target object, where the resource request includes an object identifier of the target object;
[0006] Based on the object identifier of the target object, a preset media resource candidate set, and a preset historical media resource set, performing a screening process to determine resource information of at least one batch of target media resources from the media resource candidate set, where the historical media resource set includes media resources that have been displayed on the client of the target object;
[0007] Determining at least one batch of requests triggered by the target object's operation on the client, where each batch of requests in the at least one batch of requests includes the object identifier of the target object and the batch number of any batch of target media resources in the at least one batch of target media resources;
[0008] Based on the object identifier of the target object and the batch number of any batch of target media resources in each batch of requests, sending the resource information of any batch of target media resources to the client, so that the client recommends any batch of target media resources to the target object.
[0009] In one embodiment, based on the object identifier of the target object, a preset media resource candidate set, and a preset historical media resource set, performing a screening process to determine resource information of at least one batch of target media resources from the media resource candidate set includes:
[0010] Based on the object identifier of the target object, the preset media resource candidate set, and the preset historical media resource set, perform recall filtering processing to determine a first media resource set from the media resource candidate set. The first media resource set does not include the media resources that have been displayed by the client of the target object;
[0011] Based on the object identifier of the target object and the first media resource set, perform fine ranking processing to determine the score of each candidate media resource in the first media resource set, and determine the first feature vector corresponding to each candidate media resource. The first feature vector includes the object features of the target object and the media resource features of each candidate media resource;
[0012] Based on the scores of the candidate media resources in the first media resource set, perform mixed ranking processing to determine multiple candidate media resources with the top scores;
[0013] Based on multiple candidate media resources, perform batch division processing to determine at least one batch of target media resources, and obtain the resource information of the target media resources in at least one batch.
[0014] In one embodiment, based on the object identifier of the target object, the preset media resource candidate set, and the preset historical media resource set, perform recall filtering processing to determine a first media resource set from the media resource candidate set, including:
[0015] Based on the object identifier of the target object, determine a second media resource set corresponding to the object identifier from the preset historical media resource set. Each media resource in the second media resource set is a media resource that has been displayed by the client of the target object;
[0016] Based on the preset media resource candidate set and the second media resource set, determine a first media resource set from the media resource candidate set. The first media resource set does not include each media resource in the second media resource set.
[0017] In one embodiment, determining at least one batch of requests triggered by the target object's operation on the client includes:
[0018] For the batch request set triggered by the target object's operation on the client, within a preset time period, if the batch number corresponding to any batch request in the batch request set is the batch number corresponding to the batch request allowed to be received within the preset time period, then determine any batch request as one of the at least one batch of requests triggered by the target object's operation on the client.
[0019] In one embodiment, the resource information of the target media resources in any batch includes the media resource identifier of the target media resources in any batch. After sending the resource information of the target media resources in any batch to the client, it further includes:
[0020] Save the media resource identifier of the target media resource of any batch and the object identifier of the target object into the historical media resource set, so that the historical media resource set includes the association relationship between the media resource identifier of the target media resource of any batch and the object identifier of the target object, and the association relationship is used to represent that the client of the target object has displayed the target media resource of any batch.
[0021] In one embodiment, after sending the resource information of the target media resource of any batch to the client, it further includes:
[0022] Obtain the operation identifier of the target object for any target media resource among the target media resources of any batch;
[0023] Based on the operation identifier and the first feature vector corresponding to any target media resource, perform identification merging processing to determine the second feature vector corresponding to any target media resource. The second feature vector corresponding to any target media resource includes the object feature of the target object, the media resource feature of any target media resource, and the operation feature corresponding to the operation identifier;
[0024] Based on the second feature vector corresponding to any target media resource, determine the training sample.
[0025] In one embodiment, determining the training sample based on the second feature vector corresponding to any target media resource includes:
[0026] If the operation feature corresponding to the operation identifier in the second feature vector corresponding to any target media resource includes that the target object has performed the corresponding operation on any target media resource, determine that the second feature vector corresponding to any target media resource is a positive sample;
[0027] If the operation feature corresponding to the operation identifier in the second feature vector corresponding to any target media resource includes that the target object has not performed the corresponding operation on any target media resource, determine that the second feature vector corresponding to any target media resource is a negative sample.
[0028] In one embodiment, based on the object identifier of the target object, the preset media resource candidate set, and the preset historical media resource set, perform screening processing to determine the resource information of the target media resource of at least one batch from the media resource candidate set, including:
[0029] Based on the object identifier of the target object, the preset media resource candidate set, and the preset historical media resource set, perform screening processing through a recommendation engine to determine the resource information of the target media resource of at least one batch from the media resource candidate set;
[0030] After determining the training samples based on the second feature vector corresponding to any target media resource, the following steps are further included:
[0031] Store the training samples in a preset sample set, and train the recommendation engine based on the sample set to obtain a trained recommendation engine.
[0032] In one embodiment, obtaining a resource request for recommending media resources to a target object includes:
[0033] Determine the activity of any object based on the historical status data of any object in a preset object set;
[0034] If the activity of any object is greater than a preset activity threshold, determine any object as the target object, and trigger a resource request for recommending media resources to the target object through a preset scheduler.
[0035] In a second aspect, the present application provides a recommendation device, including:
[0036] A first processing module, configured to obtain a resource request for recommending media resources to a target object, where the resource request includes an object identifier of the target object;
[0037] A second processing module, configured to perform screening processing based on the object identifier of the target object, a preset media resource candidate set, and a preset historical media resource set, and determine resource information of at least one batch of target media resources from the media resource candidate set, where the historical media resource set includes media resources that have been displayed on the client of the target object;
[0038] A third processing module, configured to determine at least one batch of requests triggered by the target object's operation on the client, where each batch of requests in the at least one batch of requests includes an object identifier of the target object and a batch number of any batch of target media resources in the at least one batch of target media resources;
[0039] A fourth processing module, configured to send the resource information of any batch of target media resources to the client based on the object identifier of the target object and the batch number of any batch of target media resources in each batch of requests, so that the client recommends any batch of target media resources to the target object.
[0040] In a third aspect, the present application provides an electronic device, including: a processor, a memory, and a bus;
[0041] The bus is used to connect the processor and the memory;
[0042] The memory is used to store operation instructions;
[0043] The processor is configured to execute the recommendation method of the first aspect of the present application by calling the operation instructions.
[0044] In a fourth aspect, the present application provides a computer-readable storage medium storing a computer program, which is used to execute the recommendation method of the first aspect of the present application.
[0045] In a fifth aspect, the present application provides a computer program product including a computer program, which when executed by a processor implements the steps of the recommendation method in the first aspect of the present application.
[0046] The technical solution provided by the embodiments of the present application has at least the following beneficial effects:
[0047] Obtain a resource request for recommending media resources to a target object, where the resource request includes the object identifier of the target object; based on the object identifier of the target object, a preset media resource candidate set, and a preset historical media resource set, perform screening processing to determine the resource information of at least one batch of target media resources from the media resource candidate set, and the historical media resource set includes the media resources that have been displayed on the client of the target object; determine at least one batch of requests triggered by the target object's operation on the client, and each batch of requests in the at least one batch of requests includes the object identifier of the target object and the batch number of any batch of target media resources in the at least one batch of target media resources; based on the object identifier of the target object and the batch number of any batch of target media resources in each batch of requests, send the resource information of any batch of target media resources to the client, so that the client recommends any batch of target media resources to the target object. In this way, for the resource request, during the real-time calculation (screening processing), there is no need to perceive the specific batch number, only need to calculate the resource information of at least one batch of target media resources, and continuously perform the calculation, which improves the timeliness of the calculation result (the resource information of at least one batch of target media resources) and improves the coverage of the target object; only generate a batch number when the target object operates on the client, that is, the batch request triggered by the operation includes the batch number, thereby reducing the overall calculation complexity; since the overall calculation complexity is reduced and the coverage of the target object is improved, the efficiency and accuracy of personalized recommendation for the target object are improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for the description of the embodiments of the present application.
[0049] Figure 1 It is a schematic diagram of the architecture of the recommendation system provided by the embodiments of the present application;
[0050] Figure 2 It is a schematic flowchart of a recommendation method provided by the embodiments of the present application;
[0051] Figure 3 Schematic diagram of the recommendation provided by the embodiment of the present application;
[0052] Figure 4 Schematic diagram of the recommendation provided by the embodiment of the present application;
[0053] Figure 5 Schematic diagram of the recommendation provided by the embodiment of the present application;
[0054] Figure 6 Schematic diagram of the recommendation provided by the embodiment of the present application;
[0055] Figure 7 Flow schematic diagram of a recommendation method provided by the embodiment of the present application;
[0056] Figure 8 Structural schematic diagram of a recommendation device provided by the embodiment of the present application;
[0057] Figure 9 Structural schematic diagram of an electronic device provided by the embodiment of the present application. Detailed implementation manners
[0058] The embodiments of the present application will be described below with reference to the accompanying drawings in the present application. It should be understood that the embodiments described below in conjunction with the drawings are exemplary descriptions for explaining the technical solutions of the embodiments of the present application, and do not constitute limitations on the technical solutions of the embodiments of the present application.
[0059] Those skilled in the art of the present technology can understand that unless specifically stated, the singular forms "a", "an", "the" and "said" used herein may also include the plural forms. It should be further understood that the terms "including" and "comprising" used in the embodiments of the present application mean that the corresponding features can be implemented as the presented features, information, data, steps, operations, elements and / or components, but do not exclude the implementation of other features, information, data, steps, operations, elements, components and / or their combinations supported by the art of the present technology. It should be understood that when we say an element is "connected" or "coupled" to another element, the one element can be directly connected or coupled to the other element, or it can mean that the one element and the other element establish a connection relationship through an intermediate element. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein indicates at least one of the items defined by the term, for example, "A and / or B" indicates being implemented as "A", or being implemented as "B", or being implemented as "A and B".
[0060] It is understandable that in the specific embodiments of the present application, when it comes to recommendation-related data, when the above embodiments of the present application are applied to specific products or technologies, user permission or consent needs to be obtained, and the collection, use, and processing of relevant data need to comply with relevant laws, regulations, and standards of relevant countries and regions.
[0061] To make the objectives, technical solutions, and advantages of the present application clearer, the following will further describe the embodiments of the present application in detail with reference to the accompanying drawings.
[0062] The embodiment of the present application provides a recommendation method provided by an identification system, and this recommendation method involves fields such as artificial intelligence and maps.
[0063] Artificial Intelligence (AI) is to use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, a theory, method, technology, and application system that perceives the environment, acquires knowledge, and uses knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science. It attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a way similar to human intelligence. Artificial intelligence is also to study the design principles and implementation methods of various intelligent machines, so that the machines have the functions of perception, reasoning, and decision-making.
[0064] Artificial intelligence technology is an interdisciplinary subject, involving a wide range of fields, including both hardware-level technologies and software-level technologies. The basic technologies of artificial intelligence generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, and mechatronics. The software technologies of artificial intelligence mainly include several major directions such as computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning, autonomous driving, and intelligent transportation.
[0065] Intelligent Traffic System (ITS), also known as Intelligent Transportation System, is to effectively integrate advanced scientific and technological (information technology, computer technology, data communication technology, sensor technology, electronic control technology, automatic control theory, operations research, artificial intelligence, etc.) into transportation, service control, and vehicle manufacturing, strengthening the connection between vehicles, roads, and users, thereby forming a comprehensive transportation system that ensures safety, improves efficiency, improves the environment, and saves energy.
[0066] To better understand and illustrate the solutions of the embodiments of the present application, the following briefly explains some technical terms involved in the embodiments of the present application.
[0067] Redis: Redis is a memory-based key-value storage engine.
[0068] SOS: SOS is a hybrid storage engine that combines memory and disk.
[0069] Kafka: Kafka is a message queue that is based on both memory and disk.
[0070] Abtest: Abtest controls a single variable through online random traffic splitting to evaluate the effectiveness of the iteration of the recommendation system.
[0071] The solution provided in the embodiments of this application relates to artificial intelligence technology. The technical solution of this application will be described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of this application will be described below in conjunction with the accompanying drawings.
[0072] To better understand the solution provided in the embodiments of this application, the solution will be described below in conjunction with a specific application scenario.
[0073] In one embodiment, Figure 1 shows a schematic diagram of the architecture of a recommendation system applicable to the embodiments of this application. It can be understood that the recommendation method provided in the embodiments of this application can be applied to, but is not limited to, application scenarios such as Figure 1 shown.
[0074] In this example, as Figure 1As shown, the architecture of the recommendation system in this example may include, but is not limited to, server 10, terminal 20, back-end server 30, and database 40. Server 10, terminal 20, back-end server 30, and database 40 may interact with each other through network 50. Server 10 obtains a resource request for recommending media resources to a target object, and the resource request includes the object identifier of the target object; Server 10 performs a screening process based on the object identifier of the target object, the preset media resource candidate set in database 40, and the preset historical media resource set in database 40, and determines the resource information of at least one batch of target media resources from the media resource candidate set. The historical media resource set includes the media resources that have been displayed by the client on terminal 20 of the target object; Server 10 determines at least one batch of requests triggered by the target object's operation on the client on terminal 20. Each batch of requests in the at least one batch of requests includes the object identifier of the target object and the batch number of any batch of target media resources in the at least one batch of target media resources; Server 10 sends the resource information of any batch of target media resources to the client on terminal 20 based on the object identifier of the target object and the batch number of any batch of target media resources in each batch of requests; The client on terminal 20 recommends any batch of target media resources to the target object. The client on terminal 20 may interact with server 10 through back-end server 30.
[0075] It can be understood that the above is only an example, and this embodiment is not limited here.
[0076] Among them, the terminal includes, but is not limited to, smart phones (such as Android phones, iOS phones, etc.), mobile phone emulators, tablet computers, laptop computers, digital broadcast receivers, MIDs (Mobile Internet Devices), PDAs (Personal Digital Assistants), intelligent voice interaction devices, smart home appliances, vehicle-mounted terminals, etc.
[0077] The server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server or server cluster that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), as well as big data and artificial intelligence platforms.
[0078] Cloud computing is a computing model that distributes computing tasks across a resource pool composed of a large number of computing devices, enabling various application systems to obtain computing power, storage space, and information services as needed. The network that provides resources is called the "cloud". The resources in the "cloud" seem to users to be infinitely expandable and can be obtained at any time, used on demand, expanded at any time, and paid for according to usage.
[0079] As a basic capability provider of cloud computing, a cloud computing resource pool (referred to as a cloud platform, generally called an IaaS (Infrastructure as a Service) platform) will be established, and various types of virtual resources will be deployed in the resource pool for external customers to select and use. The cloud computing resource pool mainly includes: computing devices (virtual machines containing operating systems), storage devices, and network devices.
[0080] Logically divided, the PaaS (Platform as a Service) layer can be deployed on the IaaS (Infrastructure as a Service) layer, and the SaaS (Software as a Service) layer can be deployed on top of the PaaS layer. The SaaS layer can also be directly deployed on the IaaS. PaaS is a platform for software operation, such as databases, web containers, etc. SaaS is various business software, such as web portals, SMS mass senders, etc. Generally speaking, SaaS and PaaS are upper layers relative to IaaS.
[0081] The so-called artificial intelligence cloud service is generally also called AIaaS (AI as a Service). This is a current mainstream service method for artificial intelligence platforms. Specifically, the AIaaS platform will split several common AI services and provide independent or packaged services in the cloud. This service model is similar to opening an AI-themed mall: all developers can access and use one or more artificial intelligence services provided by the platform through the API interface. Some senior developers can also use the AI frameworks and AI infrastructure provided by the platform to deploy and operate their own exclusive cloud artificial intelligence services.
[0082] The above network can include but is not limited to: wired networks, wireless networks. Among them, the wired network includes: local area networks, metropolitan area networks, and wide area networks, and the wireless network includes: Bluetooth, Wi-Fi, and other networks that implement wireless communication. It can also be specifically determined based on the actual application scenario requirements and is not limited here.
[0083] See Figure 2 ,Figure 2 FIG. 1 shows a schematic flowchart of a recommendation method provided by an embodiment of the present application. Among them, this method can be executed by any electronic device, such as a server, etc. As an alternative embodiment, this method can be executed by a server. For the convenience of description, in the description of some alternative embodiments below, the server will be taken as an example of the execution entity of this method. As Figure 2 shown, the recommendation method provided by the embodiment of the present application includes the following steps:
[0084] S201, obtain a resource request for recommending media resources to a target object, where the resource request includes an object identifier of the target object.
[0085] Specifically, the target object is, for example, a user, and the media resources are, for example, articles, videos, etc. The resource request for recommending media resources to the target object is used to instruct the server to determine the media resources to be recommended to the target object. For example, the resource request includes the object identifier (openid) of the target object, the configuration of the target object, experimental information, etc. The configuration of the target object includes relevant information of the target object. The relevant information of the target object is, for example, that the target object is in a first-tier city, the activity of the target object, etc. The experimental information is, for example, to determine whether the update of the recommendation engine as shown in Figure 3 is effective through Abtest.
[0086] For example, as Figure 3 shown in the calculation process in the recommendation system, the scheduler (Trigger) sends a resource request for recommending media resources to the target object to the recommendation engine (RS, Recommend Server), that is, obtains a resource request for recommending media resources to the target object through the scheduler.
[0087] S202, based on the object identifier of the target object, a preset media resource candidate set, and a preset historical media resource set, perform a screening process to determine the resource information of at least one batch of target media resources from the media resource candidate set. The historical media resource set includes the media resources that have been displayed on the client of the target object.
[0088] Specifically, the preset media resource candidate set is, for example, a large number of candidate media resources stored in a Redis. The candidate media resources are, for example, articles, videos, etc. The preset historical media resource set is, for example, a large number of historical media resources stored in another Redis. The large number of historical media resources include the media resources that have been displayed on the client of the target object. For example, if the client displays article A to the target object, the server sets the article identifier of article A to the historical media resource set, that is, stores the article identifier of article A in this Redis. Article A is a historical media resource.
[0089] For example, asFigure 3 The calculation process in the recommended system shown is based on the object identifier of the target object, a preset candidate set of media resources, and a preset historical media resource set. Through screening by the recommendation engine, resource information of at least one batch of target media resources is determined from the candidate set of media resources; at least one batch can be, for example, 1 batch, 2 batches, 3 batches, etc. During the real-time calculation (screening process), there is no need to perceive the specific batch number. It only needs to calculate the resource information of at least one batch of target media resources and continuously perform the calculation, improving the timeliness of the calculation result (resource information of at least one batch of target media resources) and the coverage of the target object (such as a hot user).
[0090] S203. Determine at least one batch of requests triggered by the target object's operation on the client. Each batch request in the at least one batch of requests includes the object identifier of the target object and the batch number of any batch of target media resources in the at least one batch of target media resources.
[0091] Specifically, the target object operates on the client, such as the target object clicks on the client, the target object logs in to the client, etc. For example, as Figure 3 In the distribution process in the recommended system shown, the target object operates on the client, triggering multiple batch requests. The server receives the multiple batch requests sent by the function plug-in running on the client through the push service unit (Sender). The push service unit selects a part of the batch requests from the multiple batch requests, and the part of the batch requests is at least one batch of requests; among them, the server is the server 10 in the architecture shown as Figure 1 The function plug-in is a software tool running on the client of the terminal 20. The server 10 is used to determine the media resources recommended to the target object. The function plug-in is, for example, a function plug-in applied to news, such as Figure 1 The background server 30 in the architecture shown, such as a news server, is a third-party server. The background server 30 and the server 10 are different servers. The batch number of any batch of target media resources is, for example, 2023112100, and 2023112100 represents the 00th batch on November 21, 2023.
[0092] S204. Based on the object identifier of the target object and the batch number of any batch of target media resources in each batch request, send the resource information of any batch of target media resources to the client, so that the client can recommend any batch of target media resources to the target object.
[0093] Specifically, the resource information of the target media resources includes the media resource identifier of the target media resources, the picture of the target media resources, the title of the target media resources, the link of the target media resources, etc.
[0094] For example, as Figure 3 shown in the distribution process in the recommendation system, the server sends the resource information of any batch of target media resources to the function plugin through the push service unit, and the function plugin forwards the resource information of any batch of target media resources to the client through the background server, and the client displays any batch of target media resources to the target object; wherein, the server is like Figure 1 the server 10 in the architecture shown in Figure 1 and the background server 30 in the architecture shown in, such as a news server, is a third-party server, and the background server 30 and the server 10 are different servers.
[0095] In the embodiment of the present application, a resource request for recommending media resources to a target object is obtained, and the resource request includes the object identifier of the target object; based on the object identifier of the target object, a preset media resource candidate set, and a preset historical media resource set, screening processing is performed to determine the resource information of at least one batch of target media resources from the media resource candidate set, and the historical media resource set includes the media resources that have been displayed by the client of the target object; at least one batch of requests triggered by the target object's operation on the client is determined, and each batch of requests in the at least one batch of requests includes the object identifier of the target object and the batch number of any batch of target media resources in the at least one batch of target media resources; based on the object identifier of the target object and the batch number of any batch of target media resources in each batch of requests, the resource information of any batch of target media resources is sent to the client, so that the client recommends any batch of target media resources to the target object. In this way, for the resource request, in the process of real-time calculation (screening processing), there is no need to perceive the specific batch number, only the resource information of at least one batch of target media resources needs to be calculated, and continuous calculation is performed, which improves the timeliness of the calculation result (the resource information of at least one batch of target media resources) and improves the coverage of the target object (such as a hot user); the batch number is generated only when the target object operates on the client (such as a hot user clicks on the client), that is, the batch request triggered by the operation includes the batch number, thereby reducing the overall calculation complexity; since the overall calculation complexity is reduced and the coverage of the target object is improved, the efficiency and accuracy of personalized recommendation for the target object are improved.
[0096] In one embodiment, based on the object identifier of the target object, a preset media resource candidate set, and a preset historical media resource set, screening processing is performed to determine the resource information of at least one batch of target media resources from the media resource candidate set, including steps A1 - A4:
[0097] Step A1: Based on the object identifier of the target object, the preset candidate media resource set, and the preset historical media resource set, perform recall and filtering processing to determine the first media resource set from the candidate media resource set. The first media resource set does not include the media resources that have been displayed by the client of the target object.
[0098] Specifically, for example, as Figure 3 shown in the calculation process of the recommendation system, the preset candidate media resource set includes 100 candidate media resources. Based on the object identifier of the target object, it is determined that 20 media resources in the preset historical media resource set are the media resources that have been displayed by the client of the target object. Through the recommendation engine, these 20 media resources are filtered out from the 100 candidate media resources, and 80 media resources other than these 20 media resources are recalled from the 100 candidate media resources, that is, the first media resource set includes these 80 media resources (80 candidate media resources).
[0099] Step A2: Based on the object identifier of the target object and the first media resource set, perform fine ranking processing to determine the score of each candidate media resource in the first media resource set, and determine the corresponding first feature vector for each candidate media resource. The first feature vector includes the object features of the target object and the media resource features of each candidate media resource.
[0100] Specifically, for example, as Figure 3 shown in the calculation process of the recommendation system, based on the object identifier of the target object and the 80 media resources (80 candidate media resources) in the first media resource set, through the recommendation engine for fine ranking processing, determine the score of each media resource (each candidate media resource) in the 80 media resources, and determine the corresponding first feature vector for each media resource. The first feature vector corresponding to each media resource includes the object features of the target object and the media resource features of this media resource. The object features of the target object include the age of the target object, the preferences of the target object, etc. The media resource features of this media resource include the keywords of the media resource, the classification of the media resource, etc.
[0101] Step A3: Based on the scores of the candidate media resources in the first media resource set, perform mixed ranking processing to determine multiple candidate media resources with the top scores.
[0102] Specifically, for example, as Figure 3The calculation process in the recommended system shown, based on the scores of each candidate media resource in the first media resource set, performs a mixed sorting process through the recommendation engine, determines the top 10 scores in terms of score ranking from the scores of 80 media resources, and stores the media resource identifiers of the media resources corresponding to these 10 scores into Redis through the recommendation engine. The object identifier of the target object is the key of the key-value pair in Redis, and the media resource identifiers of the media resources corresponding to these 10 scores are the values of the key-value pairs in Redis; through the recommendation engine, the first feature vectors of the media resources corresponding to these 10 scores are stored (written) into the online SOS. The object identifier (openid) of the target object is the key of the key-value pair in the online SOS, and the first feature vectors of the media resources corresponding to these 10 scores are the values of the key-value pairs in the online SOS. Each score among these 10 scores corresponds to one media resource, that is, 10 scores correspond to 10 media resources, these 10 media resources correspond to 10 first feature vectors, and these 10 first feature vectors are the values of the key-value pairs in the online SOS, that is, the vector matrix composed of these 10 first feature vectors is the value of the key-value pair in the online SOS; the online SOS can be used to store the first feature vectors of the candidate media resources with the top scores generated during the fine sorting process by the recommendation engine.
[0103] Step A4, based on multiple candidate media resources, performs a batch division process to determine at least one batch of target media resources and obtain the resource information of at least one batch of target media resources.
[0104] Specifically, for example, as Figure 3 shown in the calculation process of the recommended system, the recommendation engine divides the top 10 media resources (candidate media resources) in terms of score ranking into two batches of target media resources. The top 10 media resources in terms of score ranking are, in descending order of score, Media Resource 1, Media Resource 2, Media Resource 3, Media Resource 4, Media Resource 5, Media Resource 6, Media Resource 7, Media Resource 8, Media Resource 9, and Media Resource 10. One batch of target media resources among these two batches of target media resources is Media Resource 1, Media Resource 2, Media Resource 3, Media Resource 4, and Media Resource 5, and the other batch of target media resources among these two batches of target media resources is Media Resource 6, Media Resource 7, Media Resource 8, Media Resource 9, and Media Resource 10; among them, the resource information of each batch of target media resources includes the media resource identifier of each batch of target media resources, the picture of each batch of target media resources, the title of each batch of target media resources, the link of each batch of target media resources, etc.
[0105] In one embodiment, based on the object identifier of the target object, a preset media resource candidate set, and a preset historical media resource set, recall filtering processing is performed to determine a first media resource set from the media resource candidate set, including steps B1 - B2:
[0106] Step B1, based on the object identifier of the target object, determine a second media resource set corresponding to the object identifier from the preset historical media resource set. Each media resource in the second media resource set is a media resource that has been displayed by the client of the target object.
[0107] Specifically, for example, as Figure 3 shown in the calculation process of the recommendation system, through the recommendation engine, based on the object identifier of the target object, it is determined that 20 media resources in the preset historical media resource set are media resources that have been displayed by the client of the target object. These 20 media resources constitute the second media resource set.
[0108] Step B2, based on the preset media resource candidate set and the second media resource set, determine a first media resource set from the media resource candidate set. The first media resource set does not include each media resource in the second media resource set.
[0109] Specifically, for example, as Figure 3 shown in the calculation process of the recommendation system, the preset media resource candidate set includes 100 candidate media resources, and the second media resource set consists of 20 media resources. Through the recommendation engine, these 20 media resources are filtered out from the 100 candidate media resources, that is, 20 of the 100 candidate media resources are the same as these 20 media resources. 80 media resources other than these 20 media resources are recalled from the 100 candidate media resources, that is, the first media resource set consists of these 80 media resources.
[0110] In one embodiment, determining at least one batch request triggered by the target object's operation on the client includes:
[0111] For the set of batch requests triggered by the target object's operation on the client, within a preset time period, if the batch number corresponding to any batch request in the set of batch requests is the batch number corresponding to the batch requests allowed to be received within the preset time period, then determine any batch request as one of the at least one batch request triggered by the target object's operation on the client.
[0112] Specifically, for example, as Figure 3In the distribution process of the recommendation system shown, the target object operates on the client, triggering multiple batches of requests. The server receives the multiple batches of requests sent by the functional plug-in running on the client through the push service unit (Sender). The push service unit selects a part of the batches of requests from the multiple batches of requests, and a part of the batches of requests is at least one batch of requests.
[0113] For example, as Figure 4 shown, a day (00:00 - 24:00) is divided into 3 time periods, namely 3 preset time periods, and these 3 time periods are 00:00 - 06:30, 06:30 - 14:30, and 14:30 - 24:00 respectively; this day is today (20231121). When the target object operates on the client within the time period 00:00 - 06:30, the push service unit (Sender) only receives two batches of requests, which are the yesterday's batch 02 request and the yesterday's batch 00 request respectively. That is, the yesterday's batch 02 request and the yesterday's batch 00 request are the batches of requests allowed to be received within the time period 00:00 - 06:30. The yesterday's batch 02 request includes the object identifier of the target object and the batch number 2023112002, and the yesterday's batch 00 request includes the object identifier of the target object and the batch number 2023112000; when the target object operates on the client within the time period 06:30 - 14:30, the push service unit (Sender) only receives two batches of requests, which are the today's batch 00 request and the yesterday's batch 02 request respectively. That is, the today's batch 00 request and the yesterday's batch 02 request are the batches of requests allowed to be received within the time period 06:30 - 14:30. The today's batch 00 request includes the object identifier of the target object and the batch number 2023112100, and the yesterday's batch 02 request includes the object identifier of the target object and the batch number 2023112002; when the target object operates on the client within the time period 14:30 - 24:00, the push service unit only receives two batches of requests, which are the today's batch 02 request and the today's batch 00 request respectively. That is, the today's batch 02 request and the today's batch 00 request are the batches of requests allowed to be received within the time period 14:30 - 24:00. The today's batch 02 request includes the object identifier of the target object and the batch number 2023112102, and the today's batch 00 request includes the object identifier of the target object and the batch number 2023112100.
[0114] For example, as Figure 3The calculation process in the recommendation system shown divides the top 10 media resources (candidate media resources) sorted by score into two batches of target media resources through the recommendation engine. The top 10 media resources sorted by score from high to low are Media Resource 1, Media Resource 2, Media Resource 3, Media Resource 4, Media Resource 5, Media Resource 6, Media Resource 7, Media Resource 8, Media Resource 9, and Media Resource 10. One batch of target media resources among these two batches of target media resources is Media Resource 1, Media Resource 2, Media Resource 3, Media Resource 4, and Media Resource 5, and the other batch of target media resources among these two batches of target media resources is Media Resource 6, Media Resource 7, Media Resource 8, Media Resource 9, and Media Resource 10. The recommendation engine stores the resource information of these two batches of target media resources in Redis; as Figure 3 The distribution process in the recommendation system shown. The Push Service Unit (Sender) determines two batch requests from multiple batch requests (for example, as Figure 4 shown, the 02 batch request of yesterday and the 00 batch request of yesterday). The Push Service Unit calls the resource information of these two batches of target media resources from this Redis, and takes the resource information of Media Resource 1, Media Resource 2, Media Resource 3, Media Resource 4, and Media Resource 5 as the return result of the 02 batch request of yesterday (for example, as Figure 4 shown, the top 5 results), and takes the resource information of Media Resource 6, Media Resource 7, Media Resource 8, Media Resource 9, and Media Resource 10 as the return result of the 00 batch request of yesterday (for example, as Figure 4 shown, the top 6 - 10 results).
[0115] For example, as Figure 3 The calculation process in the recommendation system shown divides the top 10 media resources (candidate media resources) sorted by score into two batches of target media resources through the recommendation engine. The top 10 media resources sorted by score from high to low are Media Resource A, Media Resource B, Media Resource C, Media Resource D, Media Resource E, Media Resource F, Media Resource G, Media Resource H, Media Resource I, and Media Resource J. One batch of target media resources among these two batches of target media resources is Media Resource A, Media Resource B, Media Resource C, Media Resource D, and Media Resource E, and the other batch of target media resources among these two batches of target media resources is Media Resource F, Media Resource G, Media Resource H, Media Resource I, and Media Resource J. The recommendation engine stores the resource information of these two batches of target media resources in Redis; as Figure 3 The distribution process in the recommendation system shown. Through the Push Service Unit (Sender), two batch requests are determined from multiple batch requests (for example, as Figure 4As shown, for the 00 batch requests today and the 02 batch requests yesterday, the push service unit calls the resource information of the target media resources in these two batches from the Redis, and takes the resource information of media resource A, media resource B, media resource C, media resource D, and media resource E as the return result of the 00 batch requests today (for example, as Figure 4 shown, the top 5 results), and takes the resource information of media resource F, media resource G, media resource H, media resource I, and media resource J as the return result of the 02 batch requests yesterday (for example, as Figure 4 shown, the top 6 - 10 results).
[0116] For example, as Figure 3 shown in the calculation process of the recommendation system, the recommendation engine divides the top 10 media resources (candidate media resources) with the highest scores into the target media resources of two batches. The top 10 media resources in descending order of score are media resource a, media resource b, media resource c, media resource d, media resource e, media resource f, media resource g, media resource h, media resource i, and media resource j. One batch of the target media resources among these two batches of target media resources is media resource a, media resource b, media resource c, media resource d, and media resource e, and the other batch of the target media resources among these two batches of target media resources is media resource f, media resource g, media resource h, media resource i, and media resource j. The recommendation engine stores the resource information of these two batches of target media resources in the Redis; as Figure 3 shown in the distribution process of the recommendation system, the push service unit (Sender) determines two batch requests from multiple batch requests (for example, as Figure 4 shown, the 02 batch requests today and the 00 batch requests today), the push service unit calls the resource information of the target media resources in these two batches from the Redis, and takes the resource information of media resource a, media resource b, media resource c, media resource d, and media resource e as the return result of the 02 batch requests today (for example, as Figure 4 shown, the top 5 results), and takes the resource information of media resource f, media resource g, media resource h, media resource i, and media resource j as the return result of the 00 batch requests today (for example, as Figure 4 shown, the top 6 - 10 results).
[0117] For example, the target object is the target user, the functional plugin running on the client of the target user is the functional plugin applied to news, and the background server is the news server. Several fixed time points are agreed upon between the background server and the functional plugin running on the client of the target user. At the fixed time points, the background server notifies the functional plugin running on the client of the target user in batches to perform the resource information pulling of a certain batch of target media resources. The functional plugin running on the client of the active user (target user) that receives the pulling notification will carry out the pulling action with the batch number. The server sends the resource information of any batch of target media resources to the functional plugin running on the client of the target user through the push service unit (Sender), that is, the functional plugin running on the client of the target user pulls the resource information of any batch of target media resources from the push service unit. Due to the different activity levels of the target users, although it is a fixed time point to notify the functional plugin running on the client of the target user to pull the resource information of any batch of target media resources, the pulling timing of the functional plugin running on the client of the target user is relatively scattered.
[0118] It should be noted that the recommendation engine is constantly calculating in each time period. For example, the recommendation engine calculates 100 times in a certain time period, and the result of each calculation is the resource information of two batches of target media resources. The result of each calculation is stored in Redis and replaces the result of the previous calculation in Redis. These two batches of target media resources are personalized. Since the target object does not necessarily operate the client at all times, before the target object operates the client, the real-time calculation and update will recommend (display) the target media resources to the target object, ensuring the update of the breaking content (target media resources such as emergencies) and high-quality content (target media resources such as important news), thereby improving the accuracy and timeliness of personalized recommendation for the target object. The push service unit (Sender) can also receive the batch requests manually curated, such as the manually curated batch request of 01, and the content (media resources) manually curated is not personalized.
[0119] In one embodiment, the resource information of any batch of target media resources includes the media resource identifier of any batch of target media resources. After sending the resource information of any batch of target media resources to the client, it further includes:
[0120] Saving the media resource identifier of any batch of target media resources and the object identifier of the target object into the historical media resource set, so that the historical media resource set includes the association relationship between the media resource identifier of any batch of target media resources and the object identifier of the target object, and the association relationship is used to represent that the client of the target object has displayed any batch of target media resources.
[0121] Specifically, for example, as Figure 3 In the distribution process in the recommendation system shown, the Sender saves the media resource identifiers of a batch of target media resources and the object identifiers of the target objects into the historical media resource set. In the next recall and filtering process of the recommendation engine, based on the historical media resource set and the object identifiers of the target objects, this batch of target media resources will be filtered out from the media resource candidate set.
[0122] In one embodiment, after sending the resource information of any batch of target media resources to the client, the following steps C1 - C3 are further included:
[0123] Step C1, obtain the operation identifier of the target object for any one of the target media resources in any batch of target media resources.
[0124] Specifically, the operation identifier is, for example, the target object clicks on the target media resource, the target object reads the target media resource, the target object likes the target media resource, the target object comments on the target media resource, etc. For example, the target object operates on the target media resource displayed on the client, and the client sends the behavior data of the target object to the background server. The background server forwards the behavior data of the target object to the server. The behavior data of the target object includes the object identifier of the target object, the media resource identifier of the target media resource, the operation identifier, etc., that is, the operation identifier of the target object for any one of the target media resources in any batch of target media resources is obtained through the server.
[0125] Step C2, based on the operation identifier and the first feature vector corresponding to any one of the target media resources, perform identifier merging processing to determine the second feature vector corresponding to any one of the target media resources. The second feature vector corresponding to any one of the target media resources includes the object feature of the target object, the media resource feature of any one of the target media resources, and the operation feature corresponding to the operation identifier.
[0126] Specifically, for example, as Figure 3 In the distribution process in the recommendation system shown, the Sender sends the media resource identifiers of any batch of target media resources to the feature dump unit. The feature dump unit sends the media resource identifiers of this batch of target media resources to the online SOS. Based on the media resource identifiers of this batch of target media resources, the online SOS sends the vector matrix to the feature dump unit; for example, as Figure 3In the offline process of the recommendation system shown, the feature dump unit sends the vector matrix to Kafka, which temporarily stores the vector matrix. Kafka can store the vector matrix in the offline SOS, and the offline SOS can store the vector matrix for a long time. Among them, the vector matrix is composed of the first feature vectors corresponding to the target media resources of this batch. Based on the operation identifiers in the behavior data of the target object and the first feature vector corresponding to any target media resource in this batch of target media resources, the identifier merging unit (join lable) performs identifier merging processing to determine the second feature vector corresponding to any target media resource. The second feature vector corresponding to any target media resource includes the object features of the target object, the media resource features of any target media resource, and the operation features corresponding to the operation identifiers. Among them, the operation identifiers in the behavior data of the target object can be multiple operation identifiers.
[0127] For example, as Figure 5 shown, the recommendation engine stores (writes) the calculation results of the first round (the first feature vectors of the target media resources of any batch) into the online SOS at 03:00. The object identifier (openid) of the target object is the key of the key-value pair in the online SOS, and the first feature vector of the target media resources of this batch is the value (feature data) of the key-value pair in the online SOS. The recommendation engine stores the calculation results of the second round into the online SOS at 06:00, and the calculation results of the second round replace (overwrite) the calculation results of the first round in the online SOS. The recommendation engine stores the calculation results of the third round into the online SOS at 06:30, and the calculation results of the third round replace the calculation results of the second round in the online SOS. The recommendation engine stores the calculation results of the fourth round into the online SOS at 07:00, and the calculation results of the fourth round replace the calculation results of the third round in the online SOS. During the time period from 06:30 to 07:00, the push service unit (Sender) sends the media resource identifiers of the target media resources of this batch to the feature dump unit (feature dump), and the feature dump unit sends the media resource identifiers of the target media resources of this batch to the online SOS. Based on the media resource identifiers of the target media resources of this batch, the online SOS sends the first feature vector corresponding to the target media resources of this batch to the feature dump unit, and the feature dump unit sends the first feature vector corresponding to the target media resources of this batch to Kafka. Kafka stores the first feature vector corresponding to the target media resources of this batch in the offline SOS, that is, the online SOS writes the calculation results of the third round into the offline SOS. The object identifier (openid) of the target object and the batch number (pushid) of this batch are the keys of the key-value pair in the offline SOS, and the first feature vector of the target media resources of this batch is the value (feature data) of the key-value pair in the offline SOS.
[0128] Step C3: Determine training samples based on the second feature vector corresponding to any target media resource.
[0129] Specifically, for example, in the offline process of the recommendation system as Figure 3 shown, store the second feature vector corresponding to any target media resource into Kafka for storing real-time samples. When performing real-time training on the recommendation engine, the second feature vector can be called from Kafka for storing real-time samples as training samples; in this way, the real-time update of the recommendation engine is achieved, that is, the model training of the recommendation engine is realized.
[0130] For example, in the offline process of the recommendation system as Figure 3 shown, store the second feature vector corresponding to any target media resource into Kafka for storing historical samples. The second feature vector can be called from Kafka for storing historical samples to HDFS (Hadoop Distributed File System) for long-term storage. When training a new recommendation engine, the second feature vector can be called from HDFS as training samples to realize the model training of the new recommendation engine; among them, the model architectures between the new recommendation engine and the recommendation engine are different.
[0131] It should be noted that the real-time nature of the model, that is, the model (recommendation engine) is continuously updated. Therefore, the model can capture the interests of the target object faster and improve the real-time nature of the prediction metrics.
[0132] In one embodiment, determining training samples based on the second feature vector corresponding to any target media resource includes:
[0133] If the operation features corresponding to the operation identifier in the second feature vector corresponding to any target media resource include that the target object has performed the corresponding operation on any target media resource, then determine the second feature vector corresponding to any target media resource as a positive sample;
[0134] If the operation features corresponding to the operation identifier in the second feature vector corresponding to any target media resource include that the target object has not performed the corresponding operation on any target media resource, then determine the second feature vector corresponding to any target media resource as a negative sample.
[0135] Specifically, the target object has performed the corresponding operation on the target media resource, such as the target object clicks on the target media resource, the target object reads the target media resource, the target object likes the target media resource, the target object comments on the target media resource, etc.
[0136] For example, if the client presents 5 target media resources to the target object, and the target object only clicks on target media resource 1 and does not click on target media resources 2, 3, 4, and 5, then the second feature vector corresponding to target media resource 1 is used as a positive sample, and the second feature vectors corresponding to target media resources 2, 3, 4, and 5 are each used as negative samples.
[0137] In one embodiment, based on the object identifier of the target object, a preset media resource candidate set, and a preset historical media resource set, a screening process is performed to determine the resource information of at least one batch of target media resources from the media resource candidate set, including:
[0138] Based on the object identifier of the target object, a preset media resource candidate set, and a preset historical media resource set, a screening process is performed through a recommendation engine to determine the resource information of at least one batch of target media resources from the media resource candidate set;
[0139] After determining the training samples based on the second feature vector corresponding to any target media resource, it further includes:
[0140] Storing the training samples in a preset sample set, and training the recommendation engine based on the sample set to obtain a trained recommendation engine.
[0141] Specifically, the preset sample set can be Kafka for storing real-time samples, Kafka for storing historical samples, HDFS, etc.
[0142] For example, as Figure 3 shown in the offline process of the recommendation system, the second feature vector corresponding to any target media resource is stored in Kafka for storing real-time samples. When performing real-time training on the recommendation engine, the second feature vector can be called from Kafka for storing real-time samples as a training sample to train the recommendation engine to obtain a trained recommendation engine.
[0143] For example, as Figure 3 shown in the offline process of the recommendation system, the second feature vector corresponding to any target media resource is stored in Kafka for storing historical samples. The second feature vector can be called from Kafka for storing historical samples to HDFS for long-term storage. When training a new recommendation engine, the second feature vector can be called from HDFS as a training sample to train the new recommendation engine to obtain a trained new recommendation engine; wherein, the model architectures between the new recommendation engine and the recommendation engine are different.
[0144] It should be noted that since the pulling behavior and consumption behavior of the target object are relatively scattered, the production of training samples and the training of the model (recommendation engine) can be carried out continuously without being affected by the sending batches. When making training samples, it is necessary to ensure that the features for online prediction are consistent with those for offline training, so as to ensure the accuracy of model updates. As Figure 3 shown, both the calculation process and the distribution process in the recommendation system are executed online, while the offline process is executed offline.
[0145] In one embodiment, obtaining a resource request for recommending media resources to a target object includes:
[0146] Based on the historical status data of any object in a preset object set, determining the activity of any object;
[0147] If the activity of any object is greater than a preset activity threshold, determining any object as the target object, and triggering a resource request for recommending media resources to the target object through a preset scheduler.
[0148] Specifically, the activity includes, for example, primary activity, secondary activity, tertiary activity, etc. The primary activity indicates high activity, the secondary activity indicates medium activity, and the tertiary activity indicates low activity. The activity threshold is, for example, the secondary activity. If the activity of any object is greater than the secondary activity, determining any object as the target object, and triggering a resource request for recommending media resources to the target object through the scheduler.
[0149] In one embodiment, for example, as Figure 6 shown, the target object is a user, and the scheduler sends resource requests 24 hours a day, that is, triggering a resource request for recommending media resources to the user through the scheduler, that is, continuously triggering the calculation of the recommendation engine (RS); the user includes, for example, all users, highly active users, medium-active users, etc. Among them, all users represent all users, highly active users represent users with primary activity among all users, and medium-active users represent users with secondary activity among all users.
[0150] It should be noted that the scheduler (Trigger) can divide all users into highly active users, medium-active users, and low-active users according to the user's status, select users who are more likely to activate the target APP, and set the user identifiers of the users who are more likely to activate into the resource request.
[0151] Applying the embodiments of the present application has at least the following beneficial effects:
[0152] For resource requests, during the real-time calculation (filtering and processing), there is no need to be aware of the specific batch number. Only the resource information of the target media resources for at least one batch needs to be calculated, and continuous calculation is performed, improving the timeliness of the calculation results (the resource information of the target media resources for at least one batch), and improving the coverage of the target object (such as a hot user); a batch number is generated only when the target object operates on the client (for example, a hot user clicks on the client), that is, the batch request triggered by the operation includes the batch number, thus reducing the overall calculation complexity; since the overall calculation complexity is reduced and the coverage of the target object is improved, the efficiency and accuracy of personalized recommendation for the target object are improved. The recommendation engine continuously performs multiple rounds of calculations. If the target object does not operate on the client, the recommendation engine will continuously update the message content (the resource information of the target media resources) of the target object. In this way, when an unexpected event occurs, the target object has the opportunity to pull the latest content, thus improving the real-time performance; the real-time performance of the model, that is, the model (recommendation engine) is continuously updated. Therefore, the model can capture the interests of the target object faster and improve the real-time performance of the prediction indicators. The scheduling logic of the scheduler is simplified, and the scheduling of the scheduler is decoupled from the calculation of the recommendation engine, eliminating the need for a stress testing phase, thus reducing the operation and maintenance complexity; the calculation results of the recommendation engine can also be used as a backup at the same time, eliminating the need to back up the calculation results to Redis, reducing the storage capacity of Redis and the corresponding costs.
[0153] To better understand the method provided in the embodiments of the present application, the solutions of the embodiments of the present application will be further described below with reference to examples of specific application scenarios.
[0154] In one embodiment, the solution of the embodiments of the present application can be applied to scenarios of increasing the activity of various APPs (increasing the activity of the APP), reaching a large number of users through specific content, guiding users to download or activate the target APP, thereby increasing the number of users of the target APP, various consumption indicators, etc. Various consumption indicators such as duration, page views, GMV (Gross Merchandise Volume), etc.
[0155] For example, as Figure 3As shown, the functional plugin sends the result returned by the Sender (resource information of the target media resources of any batch) to the user's client, and the user's client displays the resource information of the target media resources of this batch to the user. The target media resources are, for example, articles, and the resource information of the target media resources is, for example, the pictures of the article, the title of the article, the link of the article, etc. When the user clicks on the picture of the article, since the picture of the article is associated with a certain video APP (target APP), it will jump to this video APP, and this video APP displays the video to the user, that is, the user is activated for this video APP, thereby increasing the activity of this video APP.
[0156] In a specific application scenario embodiment, for example, in a recommendation scenario, refer to Figure 7 , which shows the processing flow of a recommendation method, as Figure 7 shown, the processing flow of the recommendation method provided by the embodiments of the present application includes the following steps:
[0157] S701, the scheduler in the server sends a resource request for recommending media resources to the target object to the recommendation engine in the server.
[0158] Specifically, for example, the scheduler sends a resource request for recommending media resources to the target object to the recommendation engine in the server in real time 24 hours a day without stopping, continuously triggering the recommendation engine to perform calculations, that is, triggering the recommendation engine to execute step S702.
[0159] S702, the recommendation engine in the server performs screening processing based on the object identifier of the target object, the media resource candidate set, and the historical media resource set in the resource request, determines the resource information of at least one batch of target media resources from the media resource candidate set, and determines the first feature vector corresponding to at least one batch of target media resources.
[0160] Specifically, based on the object identifier of the target object, the media resource candidate set, and the historical media resource set, perform recall and filtering processing to determine the first media resource set from the media resource candidate set, and the first media resource set does not include the media resources that have been displayed by the client of the target object; based on the object identifier of the target object and the first media resource set, perform fine ranking processing to determine the score of each candidate media resource in the first media resource set, and determine the first feature vector corresponding to each candidate media resource, where the first feature vector includes the object features of the target object and the media resource features of each candidate media resource; based on the scores of the candidate media resources in the first media resource set, perform mixing and ranking processing to determine multiple candidate media resources with the highest scores; based on the multiple candidate media resources, perform batch division processing to determine at least one batch of target media resources, and obtain the resource information of at least one batch of target media resources.
[0161] In S703, the recommendation engine in the server stores the first feature vectors corresponding to at least one batch of target media resources in the online SOS, stores the resource information of at least one batch of target media resources in Redis for storing the resource information of target media resources, and returns a calculation success message to the scheduler in the server.
[0162] Specifically, the resource information of at least one batch of target media resources includes the media resource identifiers of at least one batch of target media resources; the calculation success message includes: the recommendation engine has successfully performed screening processing to obtain the resource information of at least one batch of target media resources. The current calculation result (the resource information of at least one batch of target media resources) is stored in Redis for storing the resource information of target media resources, replacing the previous calculation result in this Redis, thereby achieving real-time update of the calculation result.
[0163] For example, as Figure 3 shown in the calculation process of the recommendation system, the recommendation engine stores the first feature vectors corresponding to at least one batch of target media resources in the online SOS, stores the media resource identifiers of at least one batch of target media resources in Redis for storing the resource information of target media resources, and returns a calculation success message to the scheduler in the server.
[0164] In S704, if the target object does not operate the client, go to step S701 for execution; if the target object operates the client, the push service unit in the server determines at least one batch of requests triggered by the target object's operation on the client.
[0165] In S705, the push service unit in the server calls the resource information of at least one batch of target media resources from Redis for storing the resource information of target media resources, returns it to the function plugin running on the client of the target object, and saves the media resource identifiers of at least one batch of target media resources and the object identifier of the target object to the historical media resource set.
[0166] Specifically, for example, as Figure 3 shown, the historical media resource set is stored in Redis for storing the historical media resource set.
[0167] In S706, the function plugin running on the client of the target object sends the resource information of at least one batch of target media resources to the client of the target object.
[0168] In S707, the client of the target object displays the resource information of at least one batch of target media resources to the target object.
[0169] S708. The client sends the behavior data of the target object to the background server, and the background server forwards the behavior data of the target object to the server.
[0170] Specifically, the behavior data of the target object includes the object identifier of the target object, the media resource identifier of the target media resource, the operation identifier, etc.
[0171] S709. The server performs identity merging processing based on the operation identifier in the behavior data of the target object and the first feature vectors corresponding to at least one batch of target media resources, and determines the second feature vectors corresponding to at least one batch of target media resources.
[0172] S710. The server determines the training samples for training the recommendation engine based on the second feature vectors corresponding to at least one batch of target media resources.
[0173] S711. The server stores the training samples in the sample set and trains the recommendation engine based on the sample set to obtain the trained recommendation engine.
[0174] Applying the embodiments of the present application has at least the following beneficial effects:
[0175] For resource requests, during the real-time calculation (filtering process), there is no need to perceive the specific batch number. Only the resource information of at least one batch of target media resources needs to be calculated and continuously calculated, which improves the timeliness of the calculation results (the resource information of at least one batch of target media resources) and the coverage of the target object (such as a hot user); the batch number is generated only when the target object operates on the client (such as a hot user clicks on the client), that is, the batch request triggered by the operation includes the batch number, thereby reducing the overall calculation complexity; since the overall calculation complexity is reduced and the coverage of the target object is improved, the efficiency and accuracy of personalized recommendation for the target object are improved. The recommendation engine continuously performs multiple rounds of calculations. If the target object does not operate on the client, the recommendation engine will continuously update the message content of the target object (the resource information of the target media resource). In this way, when an unexpected event occurs, the target object has the opportunity to pull the latest content, thus improving the real-time performance; the real-time performance of the model, that is, the model (recommendation engine) is continuously updated. Therefore, the model can capture the interests of the target object faster and improve the real-time performance of the prediction index. The scheduling logic of the scheduler is simplified, and the scheduling of the scheduler is decoupled from the calculation of the recommendation engine, eliminating the need for a stress testing phase, thereby reducing the operation and maintenance complexity; the calculation results of the recommendation engine can also be used as a backup at the same time, eliminating the need to back up the calculation results to Redis, reducing the storage capacity of Redis and the corresponding costs.
[0176] An embodiment of the present application further provides a recommendation device. The schematic structural diagram of the recommendation device is as Figure 8 shown. The recommendation device 80 includes a first processing module 801, a second processing module 802, a third processing module 803, and a fourth processing module 804.
[0177] The first processing module 801 is configured to obtain a resource request for recommending media resources to a target object. The resource request includes the object identifier of the target object;
[0178] The second processing module 802 is configured to perform a screening process based on the object identifier of the target object, a preset media resource candidate set, and a preset historical media resource set, and determine the resource information of at least one batch of target media resources from the media resource candidate set. The historical media resource set includes the media resources that have been displayed on the client of the target object;
[0179] The third processing module 803 is configured to determine at least one batch of requests triggered by the target object's operation on the client. Each batch of requests in the at least one batch of requests includes the object identifier of the target object and the batch number of any batch of target media resources in the at least one batch of target media resources;
[0180] The fourth processing module 804 is configured to send the resource information of any batch of target media resources to the client based on the object identifier of the target object and the batch number of any batch of target media resources in each batch of requests, so that the client recommends any batch of target media resources to the target object.
[0181] In one embodiment, the second processing module 802 is specifically configured to:
[0182] Perform a recall and filtering process based on the object identifier of the target object, a preset media resource candidate set, and a preset historical media resource set, and determine a first media resource set from the media resource candidate set. The first media resource set does not include the media resources that have been displayed on the client of the target object;
[0183] Perform a fine-ranking process based on the object identifier of the target object and the first media resource set, determine the score of each candidate media resource in the first media resource set, and determine the first feature vector corresponding to each candidate media resource. The first feature vector includes the object feature of the target object and the media resource feature of each candidate media resource;
[0184] Perform a mixed-ranking process based on the scores of the candidate media resources in the first media resource set, and determine multiple candidate media resources with the highest scores;
[0185] Based on multiple candidate media resources, perform batch division processing to determine target media resources for at least one batch, and obtain resource information of the target media resources for at least one batch.
[0186] In one embodiment, the second processing module 802 is specifically configured to:
[0187] Based on the object identifier of the target object, determine a second media resource set corresponding to the object identifier from a preset historical media resource set, and each media resource in the second media resource set is a media resource that has been displayed by the client of the target object;
[0188] Based on a preset media resource candidate set and the second media resource set, determine a first media resource set from the media resource candidate set, and the first media resource set does not include each media resource in the second media resource set.
[0189] In one embodiment, the third processing module 803 is specifically configured to:
[0190] For a set of batch requests triggered by the target object's operation on the client, within a preset time period, if the batch number corresponding to any batch request in the set of batch requests is the batch number corresponding to a batch request allowed to be received within the preset time period, then determine any batch request as one of the at least one batch request triggered by the target object's operation on the client.
[0191] In one embodiment, the resource information of the target media resources for any batch includes the media resource identifier of the target media resources for any batch. The fourth processing module 804 is further configured to:
[0192] Save the media resource identifier of the target media resources for any batch and the object identifier of the target object into the historical media resource set, so that the historical media resource set includes the association relationship between the media resource identifier of the target media resources for any batch and the object identifier of the target object, and the association relationship is used to represent that the client of the target object has displayed the target media resources for any batch.
[0193] In one embodiment, the fourth processing module 804 is further configured to:
[0194] Obtain an operation identifier for the target object to perform an operation on any target media resource among the target media resources for any batch;
[0195] Based on the operation identifier and the first feature vector corresponding to any target media resource, perform identifier merging processing to determine the second feature vector corresponding to any target media resource. The second feature vector corresponding to any target media resource includes the object feature of the target object, the media resource feature of any target media resource, and the operation feature corresponding to the operation identifier.
[0196] Determine training samples based on the second feature vector corresponding to any target media resource.
[0197] In one embodiment, the fourth processing module 804 is specifically configured to:
[0198] If the operation feature corresponding to the operation identifier in the second feature vector corresponding to any target media resource includes that the target object has performed a corresponding operation on any target media resource, determine the second feature vector corresponding to any target media resource as a positive sample;
[0199] If the operation feature corresponding to the operation identifier in the second feature vector corresponding to any target media resource includes that the target object has not performed a corresponding operation on any target media resource, determine the second feature vector corresponding to any target media resource as a negative sample.
[0200] In one embodiment, the second processing module 802 is specifically configured to:
[0201] Based on the object identifier of the target object, the preset media resource candidate set, and the preset historical media resource set, perform screening processing through a recommendation engine, and determine the resource information of at least one batch of target media resources from the media resource candidate set;
[0202] The fourth processing module 804 is further configured to:
[0203] Store the training samples in a preset sample set, and train the recommendation engine based on the sample set to obtain a trained recommendation engine.
[0204] In one embodiment, the first processing module 801 is specifically configured to:
[0205] Determine the activity of any object based on the historical status data of any object in the preset object set;
[0206] If the activity of any object is greater than a preset activity threshold, determine any object as a target object, and trigger a resource request for recommending media resources to the target object through a preset scheduler.
[0207] Applying the embodiments of the present application has at least the following beneficial effects:
[0208] Obtain a resource request for recommending media resources to a target object, where the resource request includes the object identifier of the target object; based on the object identifier of the target object, a preset media resource candidate set, and a preset historical media resource set, perform screening processing to determine the resource information of at least one batch of target media resources from the media resource candidate set, and the historical media resource set includes the media resources that have been displayed on the client of the target object; determine at least one batch of requests triggered by the target object's operation on the client, and each batch of requests in the at least one batch of requests includes the object identifier of the target object and the batch number of any batch of target media resources in the at least one batch of target media resources; based on the object identifier of the target object and the batch number of any batch of target media resources in each batch of requests, send the resource information of any batch of target media resources to the client, so that the client recommends any batch of target media resources to the target object. In this way, for the resource request, during the real-time calculation (screening processing) process, there is no need to perceive the specific batch number, only need to calculate the resource information of at least one batch of target media resources, and continuously perform the calculation, which improves the timeliness of the calculation result (the resource information of at least one batch of target media resources) and improves the coverage of the target object (such as a hot user); only generate a batch number when the target object operates on the client (such as a hot user clicks on the client), that is, the batch request triggered by the operation includes the batch number, thereby reducing the overall calculation complexity; since the overall calculation complexity is reduced and the coverage of the target object is improved, the efficiency and accuracy of personalized recommendation for the target object are improved.
[0209] An embodiment of this application also provides an electronic device, and the structural schematic diagram of the electronic device is as Figure 9 shown Figure 9 The electronic device 4000 shown includes: a processor 4001 and a memory 4003. Among them, the processor 4001 and the memory 4003 are connected, such as through a bus 4002. Optionally, the electronic device 4000 may further include a transceiver 4004, and the transceiver 4004 may be used for data interaction between this electronic device and other electronic devices, such as data sending and / or data receiving, etc. It should be noted that in practical applications, the transceiver 4004 is not limited to one, and the structure of the electronic device 4000 does not constitute a limitation to the embodiments of this application.
[0210] The processor 4001 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute various exemplary logical blocks, modules, and circuits described in connection with the disclosure of this application. The processor 4001 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.
[0211] The bus 4002 may include a path for transmitting information between the above components. The bus 4002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. The bus 4002 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 9 only a thick line is shown herein, but it does not mean that there is only one bus or one type of bus.
[0212] The memory 4003 may be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, or it may also be an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory), or other optical disc storage, optical disc storage (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media, other magnetic storage devices, or any other medium that can be used to carry or store computer programs and can be read by a computer, which is not limited herein.
[0213] The memory 4003 is used to store the computer program for implementing the embodiments of the present application and is controlled by the processor 4001 to execute. The processor 4001 is used to execute the computer program stored in the memory 4003 to implement the steps shown in the foregoing method embodiments.
[0214] Among them, the electronic device includes but is not limited to: servers, etc.
[0215] Applying the embodiments of the present application has at least the following beneficial effects:
[0216] Obtain a resource request for recommending media resources to a target object, where the resource request includes the object identifier of the target object; based on the object identifier of the target object, a preset media resource candidate set, and a preset historical media resource set, perform a screening process to determine the resource information of at least one batch of target media resources from the media resource candidate set, and the historical media resource set includes the media resources that have been displayed on the client of the target object; determine at least one batch of requests triggered by the target object's operation on the client, and each batch of requests in the at least one batch of requests includes the object identifier of the target object and the batch number of any batch of target media resources in the at least one batch of target media resources; based on the object identifier of the target object and the batch number of any batch of target media resources in each batch of requests, send the resource information of any batch of target media resources to the client, so that the client recommends any batch of target media resources to the target object. In this way, for the resource request, during the real-time calculation (screening process), there is no need to perceive the specific batch number, only the resource information of at least one batch of target media resources needs to be calculated, and continuous calculation is performed, which improves the timeliness of the calculation result (the resource information of at least one batch of target media resources) and improves the coverage of the target object (such as a hot user); the batch number is generated only when the target object operates on the client (such as a hot user clicks on the client), that is, the batch request triggered by the operation includes the batch number, thereby reducing the overall calculation complexity; since the overall calculation complexity is reduced and the coverage of the target object is improved, the efficiency and accuracy of personalized recommendation for the target object are improved.
[0217] The embodiments of the present application provide a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps and corresponding contents of the foregoing method embodiments can be implemented.
[0218] The embodiments of the present application further provide a computer program product, including a computer program, and when the computer program is executed by a processor, the steps and corresponding contents of the foregoing method embodiments can be implemented.
[0219] Based on the same principle as the method provided in the embodiments of the present application, the embodiments of the present application also provide a computer program product or a computer program. The computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the method provided in any one of the optional embodiments of the present application above.
[0220] It should be understood that although the flowchart of the embodiments of the present application indicates each operation step by an arrow, the execution order of these steps is not limited to the order indicated by the arrow. Unless otherwise clearly stated in this article, in some implementation scenarios of the embodiments of the present application, the implementation steps in each flowchart can be executed in other orders according to requirements. In addition, some or all of the steps in each flowchart may include multiple sub-steps or multiple stages based on the actual implementation scenario. Some or all of these sub-steps or stages can be executed at the same time, and each sub-step or stage among these sub-steps or stages can also be executed at different times respectively. In the scenario where the execution times are different, the execution order of these sub-steps or stages can be flexibly configured according to requirements, and the embodiments of the present application do not limit this.
[0221] The above are only optional implementation manners of some implementation scenarios of the present application. It should be noted that for those of ordinary skill in the art, without departing from the technical concept of the solution of the present application, using other similar implementation means based on the technical idea of the present application also belongs to the protection scope of the embodiments of the present application.
Claims
1. A recommendation method, characterized in that, Including: Obtain a resource request for recommending media resources to a target object, where the resource request includes the object identifier of the target object; Based on the object identifier of the target object, a preset media resource candidate set, and a preset historical media resource set, perform a screening process to determine resource information of at least one batch of target media resources from the media resource candidate set, where the historical media resource set includes media resources that have been displayed on the client of the target object; Determine at least one batch of requests triggered by the target object's operation on the client, where each batch of requests in the at least one batch of requests includes the object identifier of the target object and the batch number of any batch of target media resources in the at least one batch of target media resources; Based on the object identifier of the target object and the batch number of any batch of target media resources in each batch of requests, send the resource information of the any batch of target media resources to the client, so that the client recommends the any batch of target media resources to the target object.
2. The method according to claim 1, wherein The performing a screening process based on the object identifier of the target object, a preset media resource candidate set, and a preset historical media resource set to determine resource information of at least one batch of target media resources from the media resource candidate set includes: Based on the object identifier of the target object, a preset media resource candidate set, and a preset historical media resource set, perform a recall and filtering process to determine a first media resource set from the media resource candidate set, where the first media resource set does not include media resources that have been displayed on the client of the target object; Based on the object identifier of the target object and the first media resource set, perform a fine ranking process to determine the score of each candidate media resource in the first media resource set, and determine the first feature vector corresponding to each candidate media resource, where the first feature vector includes the object feature of the target object and the media resource feature of each candidate media resource; Based on the scores of the candidate media resources in the first media resource set, perform a mixed ranking process to determine multiple candidate media resources with the highest scores; Based on the multiple candidate media resources, perform a batch division process to determine at least one batch of target media resources and obtain the resource information of the at least one batch of target media resources.
3. The method according to claim 2, wherein The performing a recall and filtering process based on the object identifier of the target object, a preset media resource candidate set, and a preset historical media resource set to determine a first media resource set from the media resource candidate set includes: Based on the object identifier of the target object, determine a second media resource set corresponding to the object identifier from the preset historical media resource set, where each media resource in the second media resource set is a media resource that has been displayed on the client of the target object; Based on the preset media resource candidate set and the second media resource set, determine a first media resource set from the media resource candidate set, where the first media resource set does not include each media resource in the second media resource set.
4. The method according to claim 1, characterized in that Determining at least one batch of requests triggered by the target object's operation on the client includes: For the set of batch requests triggered by the target object's operation on the client, within a preset time period, if the batch number corresponding to any batch request in the set of batch requests is the batch number corresponding to the batch requests allowed to be received within the preset time period, then determine the any batch request as one of the at least one batch of requests triggered by the target object's operation on the client.
5. The method according to claim 1, wherein The resource information of the target media resource of any batch includes the media resource identifier of the target media resource of any batch. After sending the resource information of the target media resource of any batch to the client, it further includes: Saving the media resource identifier of the target media resource of any batch and the object identifier of the target object into the historical media resource set, so that the historical media resource set includes the association relationship between the media resource identifier of the target media resource of any batch and the object identifier of the target object, and the association relationship is used to represent that the target object's client has displayed the target media resource of any batch.
6. The method according to claim 1, wherein After sending the resource information of the target media resource of any batch to the client, it further includes: Obtaining an operation identifier of the target object's operation on any target media resource in the target media resource of any batch; Based on the operation identifier and the first feature vector corresponding to the any target media resource, performing identification merging processing to determine the second feature vector corresponding to the any target media resource, and the second feature vector corresponding to the any target media resource includes the object feature of the target object, the media resource feature of the any target media resource, and the operation feature corresponding to the operation identifier; Based on the second feature vector corresponding to the any target media resource, determining a training sample.
7. The method according to claim 6, characterized in that, The determining a training sample based on the second feature vector corresponding to the any target media resource includes: If the operation feature corresponding to the operation identifier in the second feature vector corresponding to the any target media resource includes that the target object has performed a corresponding operation on the any target media resource, then determine the second feature vector corresponding to the any target media resource as a positive sample; If the operation feature corresponding to the operation identifier in the second feature vector corresponding to the any target media resource includes that the target object has not performed a corresponding operation on the any target media resource, then determine the second feature vector corresponding to the any target media resource as a negative sample.
8. The method according to claim 6, characterized in that The performing screening processing based on the object identifier of the target object, the preset media resource candidate set, and the preset historical media resource set to determine the resource information of at least one batch of target media resources from the media resource candidate set includes: Based on the object identifier of the target object, the preset media resource candidate set, and the preset historical media resource set, performing screening processing through a recommendation engine to determine the resource information of at least one batch of target media resources from the media resource candidate set; After determining the training samples based on the second feature vectors corresponding to any of the target media resources, the following steps are further included: Storing the training samples into a preset sample set, and training the recommendation engine based on the sample set to obtain a trained recommendation engine.
9. The method according to claim 1, characterized in that The obtaining of the resource request for recommending media resources to a target object includes: Determining the activity of any object in a preset object set based on the historical status data of the any object; If the activity of the any object is greater than a preset activity threshold, determining the any object as a target object, and triggering, through a preset scheduler, a resource request for recommending media resources to the target object.
10. A recommendation device, characterized in that, Including: A first processing module, configured to obtain a resource request for recommending media resources to a target object, where the resource request includes an object identifier of the target object; A second processing module, configured to perform a screening process based on the object identifier of the target object, a preset media resource candidate set, and a preset historical media resource set, and determine resource information of at least one batch of target media resources from the media resource candidate set, where the historical media resource set includes media resources that have been displayed on the client of the target object; A third processing module, configured to determine at least one batch of requests triggered by the target object's operations on the client, where each batch of requests in the at least one batch of requests includes the object identifier of the target object and the batch number of any batch of target media resources in the at least one batch of target media resources; A fourth processing module, configured to send the resource information of any batch of target media resources to the client based on the object identifier of the target object and the batch number of the any batch of target media resources in each batch of requests, so that the client recommends the any batch of target media resources to the target object.
11. An electronic device, comprising a memory, a processor, and a computer program stored on the memory, characterized in that, The processor executes the computer program to implement the steps of the method according to any one of claims 1-9.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the method according to any one of claims 1-9.
13. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the method according to any one of claims 1-9.