Object recommendation method, device, equipment, and computer storage medium
By constructing account feature vectors and calculating similar accounts, the problem of recalling unseen news in deep learning recall methods is solved, and the precision and accuracy of object recommendations are improved.
Patent Information
- Application Number
- CN202110347448.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-31
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2041-03-31
AI Technical Summary
Existing deep learning-based recall methods have difficulty in correctly recalling news that has not been seen during training, affecting the accuracy of object recommendations.
By obtaining the historical operation object sequence and operation object attribute sequence of the candidate account, the account feature vector is constructed, similar accounts are identified, and recommendations are made based on the historical operation objects of similar accounts. The recall accuracy is improved by combining offline calculation and weight calculation.
It improves the precision of object recall and recommendation accuracy, avoids the situation where newer objects are difficult to recall, and enhances the accuracy of similar account calculation.
Smart Images

Figure CN115146149B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, in particular to the field of artificial intelligence technology, and provides an object recommendation method, apparatus and device, and a computer storage medium. Background Art
[0002] Recommendation systems are commonly used to recommend items to users, such as news, videos, or products. Specifically, a recommendation system typically consists of four steps: recall → coarse ranking → fine ranking → re-ranking. Recall is an integral part of a recommendation system. For example, when recommending news to a user, the system first identifies a subset of potentially interesting news items from a massive news repository. This subset typically consists of hundreds or thousands of news items. This process is often called recall. Once the subset is identified, more complex ranking models are used to score and rank the news items within it, ultimately recommending one or more news items that the user is most likely to like.
[0003] Currently, the recall method in recommendation systems usually adopts deep learning-based model recall. Deep learning-based model recall usually maps each user into a vector and each news into a vector. Based on whether the user clicks on the news, a neural network is used to learn the relationship between the user vector and the news vector, so that the user vector and the news vector that the user may click are as close as possible, and the news with a close vector distance is recalled. However, this method has difficulty in correctly recalling news that has not been seen during training.
[0004] Therefore, existing recall methods still have difficulty in completing recall correctly, which affects the accuracy of subsequent object recommendations. Summary of the Invention
[0005] The embodiments of the present application provide an object recommendation method, apparatus, device, and computer storage medium for improving the precision of the object recall process and the accuracy of object recommendation.
[0006] In one aspect, a method for object recommendation is provided, the method comprising:
[0007] Based on the historical operation object sequences corresponding to each candidate account and at least one operation object attribute sequence corresponding to each historical operation object sequence, respectively, an account feature vector for each candidate account is obtained; wherein each operation object attribute sequence is composed of similar attributes of each historical operation object in the corresponding historical operation object sequence;
[0008] Based on the obtained account feature vectors, determining at least one similar account to the target account for object recommendation from the candidate accounts, each similar account being a candidate account whose similarity to the target account meets set requirements;
[0009] Obtaining a plurality of candidate recommendation objects based on a historical operation object sequence of the at least one similar account;
[0010] Determine a target recommendation object for the target account from the multiple candidate recommendation objects.
[0011] In one aspect, an object recommendation device is provided, comprising:
[0012] a feature vector acquisition unit, configured to obtain an account feature vector for each candidate account based on a historical operation object sequence corresponding to each candidate account and at least one operation object attribute sequence corresponding to each historical operation object sequence; wherein each operation object attribute sequence is composed of similar attributes of each historical operation object in the corresponding historical operation object sequence;
[0013] a similar account determining unit configured to determine, based on the obtained account feature vectors, at least one similar account to the target account for which object recommendation is to be made from the candidate accounts, wherein each similar account is a candidate account whose similarity to the target account meets a set requirement;
[0014] The recommendation object determination unit is used to obtain multiple candidate recommendation objects based on the historical operation object sequence of the at least one similar account; and determine the target recommendation object of the target account from the multiple candidate recommendation objects.
[0015] Optionally, the feature vector acquisition unit is specifically configured to:
[0016] Based on each of the historical operation object sequences and at least one operation object attribute sequence corresponding to each of the historical operation object sequences, a plurality of element sequences are constructed; wherein each element sequence is an operation object subsequence or an operation object attribute subsequence of a candidate account;
[0017] The element prediction model is iteratively trained based on the multiple element sequences, and when the element prediction model converges, each account feature vector output by the last iterative training is determined as the account feature vector of each candidate account.
[0018] Optionally, the feature vector acquisition unit is specifically configured to:
[0019] For each of the multiple element sequences, the following operations are performed: for one of the element sequences, based on the account feature vector of the corresponding candidate account and the element feature vectors of N-1 elements among the N elements included in the one element sequence, a predicted feature vector of an element other than the N-1 elements in the one element sequence is obtained, where N is a positive integer; and the predicted feature vector is compared with the element feature vector of the one element to obtain a comparison result.
[0020] Obtaining a model loss value of the element prediction model based on the comparison results corresponding to the respective element sequences;
[0021] The account feature vector of each candidate account is updated based on the model loss value.
[0022] Optionally, the feature vector acquisition unit is specifically configured to:
[0023] Obtaining a predicted feature vector of the Nth element of the element sequence based on the account feature vector of the candidate account and the element feature vectors of the first N-1 elements of the element sequence; or,
[0024] Based on the account feature vector of the candidate account, the element feature vectors of the first M elements of the element sequence, and the element feature vectors of the last M elements, the predicted feature vector of the M+1th element of the element sequence is obtained, where M is a positive integer and N=2M+1.
[0025] Optionally, the feature vector acquisition unit is specifically configured to:
[0026] Performing a fusion process on the element feature vectors of the N-1 elements to obtain a fused feature vector;
[0027] Feature extraction is performed based on the account feature vector of the candidate account and the fused feature vector to obtain the predicted feature vector.
[0028] Optionally, the feature vector acquisition unit is specifically configured to:
[0029] Performing pooling processing on the element feature vectors of the N-1 elements to obtain the fused feature vector;
[0030] According to the convolution kernel and the set convolution step size included in the element prediction model, convolution processing is performed on the feature vector matrix composed of the element feature vectors of the N-1 elements to obtain the fused feature vector;
[0031] Perform serialized feature extraction on the element feature vectors of the N-1 elements to obtain the fused feature vector.
[0032] Optionally, the feature vector acquisition unit is specifically configured to:
[0033] For each element sequence in the multiple element sequences, perform the following steps respectively:
[0034] For one element sequence among the element sequences, obtaining a content feature vector and a position feature vector of each element included in the element sequence, wherein a position feature vector is used to represent position information of a corresponding element in the element sequence;
[0035] According to the obtained content feature vector and position feature vector of each element, an element feature vector of each element included in the element sequence is obtained.
[0036] Optionally, the feature vector acquisition unit is specifically configured to:
[0037] Based on sequences of various sequence types, element prediction sub-models corresponding to various sequence types included in the element prediction model are iteratively trained. Each sequence type corresponds to an element prediction sub-model, and one sequence type is a historical operation object sequence or a type of operation object attribute sequence. In one iterative training process, the following operations are performed:
[0038] For sequences of various sequence types, the following steps are performed respectively: for a sequence of one sequence type, multiple element sequences are constructed, each element sequence including a subsequence of a candidate account on the one sequence type; for each element sequence in the multiple element sequences, an element prediction sub-model corresponding to the one sequence type is used to obtain, based on a corresponding account feature vector and N-1 elements among the N elements included in each element sequence, a prediction feature vector of an element remaining in each element sequence other than the N-1 elements; the prediction feature vector is compared with the element feature vector of the remaining element to obtain a comparison result, and a model loss value of the element prediction sub-model is obtained based on the comparison results corresponding to each element sequence;
[0039] Based on the model loss value of each element prediction sub-model and the corresponding model weight value, the account feature vector of each candidate account is updated;
[0040] When the element prediction model converges, each account feature vector output by the last iterative training is determined as the account feature vector of each account.
[0041] Optionally, the feature vector acquisition unit is specifically configured to:
[0042] Constructing a plurality of triples based on the candidate accounts; wherein the first candidate account and the second candidate account included in each triple are similar accounts, and the first candidate account and the third candidate account included in each triple are dissimilar accounts;
[0043] The feature learning model is iteratively trained based on the multiple triplets, and when the feature learning model converges, each account feature vector obtained by feature encoding based on the encoder during the last iterative training is determined as the account feature vector of each candidate account.
[0044] Optionally, the feature vector acquisition unit is specifically configured to:
[0045] Using the encoder included in the feature learning model, based on the respective historical operation object sequences,
[0046] and performing feature encoding on at least one operation object attribute sequence corresponding to each of the historical operation object sequences to obtain an account feature vector for each candidate account;
[0047] For each triple in the plurality of triplets, the following steps are performed respectively: for one triple, a first similarity between an account feature vector of a first candidate account and an account feature vector of a second candidate account is obtained, and a second similarity between the account feature vector of the first candidate account and an account feature vector of a third candidate account is obtained, and a triple loss value for the one triple is obtained based on the first similarity and the second similarity, where the triple loss value is used to represent a degree of difference between the first similarity and the second similarity;
[0048] The encoder is updated based on the obtained triplet loss values corresponding to the respective triples.
[0049] Optionally, the similar account determining unit is specifically configured to:
[0050] Based on the obtained account feature vectors of each candidate account, the similarity between each two candidate accounts is obtained;
[0051] For each candidate account, the following steps are performed: for one candidate account among the candidate accounts, based on the similarity between the candidate account and each of the remaining candidate accounts, at least one similar account is selected for the candidate account, and a corresponding relationship between the candidate account and the at least one similar account is stored;
[0052] Based on the stored correspondence, at least one similar account to the target account is determined from the candidate accounts.
[0053] Optionally, the recommendation object determination unit is specifically configured to:
[0054] For each operation object included in the historical operation object sequence of the at least one similar account, the following operations are performed respectively: for one operation object among the respective operation objects, based on the time difference between the release time of the operation object and the current time, and the relative popularity value of the operation object, an object weight value of the operation object is obtained; wherein the object weight value is negatively correlated with the time difference and positively correlated with the relative popularity value, the relative popularity value is used to represent the degree of the number of interactive operations of the operation object relative to the number of interactive operations of other operation objects, and the relative popularity value is positively correlated with the number of interactive operations;
[0055] Based on the obtained object weight values of the various operation objects, an operation object whose object weight value meets the set requirements is determined from the various operation objects as a candidate recommendation object.
[0056] In one aspect, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any one of the above methods when executing the computer program.
[0057] In one aspect, a computer storage medium is provided, on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the steps of any of the above methods are implemented.
[0058] In one aspect, a computer program product or computer program is provided, the computer program product or computer program comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the steps of any of the above methods.
[0059] In an embodiment of the present application, when obtaining the account feature vector of each candidate account, not only the historical operation object sequence of each candidate account is considered, but also each operation object in the historical operation object sequence is comprehensively considered, so that the obtained account feature vector can more comprehensively reflect the preferences of each account and improve the accuracy of similar account calculation. When object recommendation is required, the historical operation objects of similar accounts can be recalled, that is, the recall method can fully cover all objects to avoid the situation where newer objects are difficult to recall, thereby achieving the accuracy of the recall process and improving the accuracy of object recommendation. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following briefly introduces the drawings required for use in the embodiments or related technical descriptions. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0061] Figure 1 A schematic diagram of an application scenario provided in an embodiment of the present application;
[0062] Figure 2 A schematic diagram of another application scenario provided by an embodiment of the present application;
[0063] Figure 3 A flowchart of the object recommendation method provided in an embodiment of the present application;
[0064] Figure 4a and Figure 4b A schematic diagram of a historical operation object sequence provided in an embodiment of the present application;
[0065] Figure 5 A schematic diagram of an operation object attribute sequence provided in an embodiment of the present application;
[0066] Figure 6a and Figure 6b A schematic diagram of the similarity correspondence provided in an embodiment of the present application;
[0067] Figure 7 A schematic diagram showing the relationship between object weight and time difference provided in an embodiment of the present application;
[0068] Figure 8 A schematic diagram of a process for obtaining an account feature vector according to an embodiment of the present application;
[0069] Figure 9 A schematic diagram of the process of obtaining the element feature vector provided in the embodiment of the present application;
[0070] Figure 10 A schematic diagram of vector prediction of the element prediction model provided in an embodiment of the present application;
[0071] Figure 11 A schematic diagram of vector calculation using the element prediction model provided in an embodiment of the present application;
[0072] Figure 12 Another flowchart of obtaining an account feature vector according to an embodiment of the present application;
[0073] Figure 13 A schematic diagram of another process for obtaining an account feature vector according to an embodiment of the present application;
[0074] Figure 14 A schematic diagram of the news recommendation process provided in this embodiment of the application;
[0075] Figure 15 A schematic diagram of the structure of an object recommendation device provided in an embodiment of the present application;
[0076] Figure 16 A schematic diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0077] In order to make the purpose, technical solutions and advantages of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application. In the absence of conflict, the embodiments in the present application and the features in the embodiments can be combined with each other in any way. In addition, although a logical order is shown in the flow chart, in some cases, the steps shown or described can be performed in an order different from that here.
[0078] To facilitate understanding of the technical solutions provided in the embodiments of the present application, some key terms used in the embodiments of the present application are explained here:
[0079] Object: In the embodiment of the present application, pictures, articles (such as news, information), audio, video and commodities and other contents can be used as objects to recommend to users.
[0080] Account: Also known as user, on an internet platform, after a user registers an account using their personal information, the account can serve as an identifier for the user's identity. An account uniquely corresponds to a single user, and the user uses the account to access information and view recommended objects on the internet platform. In some specific application scenarios, such as browsers or news applications (APPs), users can browse objects without logging in to an account. However, in such scenarios, the user still has a specific identifier, such as the identifier of the terminal device being used. Therefore, the user can be considered to appear with a specific account identity (or a temporary account identity, i.e., a terminal identifier).
[0081] Recommender systems are tools that automatically connect users and objects. They help users discover interesting information in an information-overloaded environment and push this information to interested users. Recall is the initial stage of a recommendation system. The system retrieves a large number of candidates from a large pool of objects. Based on these candidates, the system then conducts a coarse and fine ranking process to ultimately determine the recommended objects.
[0082] Historical operation object sequence: A record of a user's specific actions within the system (such as clicks, shares, or likes), including the time and object of the action, and sorted by certain attributes (such as the time of the action). Taking click behavior as an example, if a user has clicked and played videos in the order a1, a2, a3, and a4, the historical operation object sequence corresponding to this user's click behavior could be {a1, a2, a3, a4}.
[0083] Operation object attributes: used to represent the attribute values of the object in various attribute dimensions. When the object is news, for example, the operation object attributes here mainly refer to the first-level category, second-level category and news author of the news, etc.; or, when the object is a commodity, for example, the operation object attributes here mainly refer to the first-level category, second-level category, commodity seller, manufacturer, first-level keyword and second-level keyword of the commodity, etc. Of course, other possible attributes may also be included and are not specifically limited here.
[0084] Element sequence: a sequence comprising multiple elements. In an embodiment of the present application, an element sequence is a subset of a sequence type. For example, if a subsequence {a1, a2, a3} is extracted from a historical operation object sequence {a1, a2, a3, a4}, then {a1, a2, a3} is a new element sequence, where a1, a2, and a3 are all elements in the element sequence; or, if a subsequence {b1, b2, b3} is extracted from a primary category sequence {b1, b2, b3, b4}, then {b1, b2, b3} is a new element sequence, where b1, b2, and b3 are all elements in the element sequence.
[0085] The embodiments of the present application relate to artificial intelligence (AI) and machine learning technology, and are designed based on computer vision technology and machine learning (ML) in artificial intelligence.
[0086] Artificial intelligence (AI) refers to the theories, methods, techniques, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, to perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results. In other words, AI is a comprehensive technology within computer science that seeks to understand the essence of intelligence and produce new intelligent machines that can respond in ways similar to human intelligence.
[0087] Artificial intelligence (AI) is the study of the design principles and implementation methods of various intelligent machines, enabling them to possess the capabilities of perception, reasoning, and decision-making. AI technologies primarily encompass computer vision, natural language processing, and machine learning / deep learning. With the advancement of AI technology, research and application are expanding across a wide range of fields, including smart homes, smart customer service, virtual assistants, smart speakers, smart marketing, driverless and autonomous driving, robotics, and smart healthcare. As technology advances, AI will be applied in even more areas and play an increasingly important role.
[0088] Natural language processing (NLP) is a key area of research in computer science and artificial intelligence. It studies the theories and methods that enable effective communication between humans and computers using natural language. Natural language processing (NLP) integrates linguistics, computer science, and mathematics. Therefore, research in this field involves natural language—the language we use in everyday life—and is closely linked to the study of linguistics. Natural language processing technologies typically include text processing, semantic understanding, machine translation, robotic question answering, and knowledge graphs.
[0089] Machine learning is a multidisciplinary field that encompasses probability theory, statistics, approximation theory, convex analysis, and algorithmic complexity theory. It specifically studies how computers can simulate or implement human learning behaviors to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Compared to data mining, which seeks to identify patterns within large datasets, machine learning focuses more on algorithmic design, enabling computers to automatically "learn" patterns from data and use these patterns to make predictions about unknown data.
[0090] Machine learning is at the core of artificial intelligence and the fundamental way to make computers intelligent. Its applications span all areas of AI. Machine learning and deep learning typically include techniques such as artificial neural networks, belief networks, reinforcement learning, transfer learning, and inductive learning. Artificial neural networks (ANNs) abstract the neural networks in the human brain from an information processing perspective, building a simple model that forms different networks based on different connection structures. A neural network is a computational model composed of a large number of interconnected nodes (or neurons). Each node represents a specific output function, called an activation function. Each connection between two nodes represents a weighted value for the signal passing through that connection, called a weight. This serves as the memory of the artificial neural network. The network's output varies depending on the network's connection structure, weights, and activation function. The network itself is often an approximation of a natural algorithm or function, or it may express a logical strategy.
[0091] The embodiment of the present application adopts an artificial neural network model based on deep learning when representing the characteristics of candidate accounts. The account characteristic representation in the embodiment of the present application can be divided into two parts, including a training part and an application part. Among them, the training part involves the technical field of machine learning. In the training part, the artificial neural network model (i.e., the element prediction model and feature learning model mentioned later) is trained by the machine learning technology, so that the artificial neural network model is trained based on the historical operation object sequence of each candidate account given in the embodiment of the present application and the corresponding multiple operation object attribute sequences, and the model parameters are continuously adjusted through the optimization algorithm. When the model converges, the account feature vector of each candidate account can be obtained; the application part is used to use the encoding part of the artificial neural network model trained in the training part to represent the characteristics of the newly added candidate accounts, etc. In addition, it should be noted that the artificial neural network model in the embodiment of the present application can be trained online or offline, and is not specifically limited here. In this article, offline training is used as an example for illustration.
[0092] The following is a brief introduction to the design concept of the embodiment of this application:
[0093] In the age of information overload on the internet, various websites utilize recommendation systems in their backends. These systems calculate the most suitable recommendations based on user characteristics and then present them to the user for selection. Due to the vast number of recommended items and users on the internet, recommendation systems make extensive use of cloud computing-based data mining. By mining user behavior and item information, they apply various recommendation algorithms to calculate recommendation lists, effectively presenting different items to different users and improving page conversion rates.
[0094] In related technologies, the recall module in a recommendation system selects a subset of objects from a large set of objects as candidate objects for a specific user. Generally speaking, deep learning-based recall models are currently used. This involves mapping each user to a vector and each news item to a vector. Based on whether the user clicks on the news item, a neural network is used to learn the relationship between the user vector and the news vector. This approach aims to bring the user vector as close as possible to the vectors of news items the user is likely to click on, and to recall news items with close vector distances. However, this method struggles to accurately recall news items that have not been seen during training.
[0095] In view of this, an embodiment of the present application provides an object recommendation method, in which, when obtaining the account feature vector of each candidate account, not only the historical operation object sequence of each candidate account is considered, but also each operation object in the historical operation object sequence is comprehensively considered, so that the obtained account feature vector can more comprehensively reflect the preferences of each account and improve the accuracy of similar account calculation. When object recommendation is required, the historical operation objects of similar accounts can be recalled, that is, the recall method can fully cover all objects to avoid the situation where newer objects are difficult to recall, thereby achieving the accuracy of the recall process and improving the accuracy of object recommendation.
[0096] In addition, considering that similar account calculations have the problem of huge computing resource consumption when facing a huge number of users, the embodiment of the present application performs offline fast calculations for similar account calculations and stores the index relationships of offline calculations, so that objects can be recalled directly based on the similar account index relationships during online recommendations, thereby improving the timeliness of recalled objects.
[0097] Furthermore, when determining the final recall objects, the embodiment of the present application performs a certain weight calculation on each object, and then determines the recall objects based on the weights, thereby further improving the accuracy of the recall objects.
[0098] After introducing the design concepts of the embodiments of the present application, the following briefly introduces the application scenarios to which the technical solutions of the embodiments of the present application can be applied. It should be noted that the application scenarios introduced below are only used to illustrate the embodiments of the present application and are not limiting. In the specific implementation process, the technical solutions provided by the embodiments of the present application can be flexibly applied according to actual needs.
[0099] The solution provided in the embodiment of the present application can be applied to most object recommendation scenarios, such as product recommendation scenarios, text (such as news) recommendation scenarios, audio recommendation scenarios or video recommendation scenarios. Figure 1 As shown, it is a schematic diagram of an application scenario provided by an embodiment of the present application, in which a terminal device 101 and a server 102 may be included.
[0100] The terminal device 101 can be, for example, a mobile phone, a tablet computer (PAD), a personal computer (PC), a wearable device, etc. The terminal device 101 can be installed with an application that can browse objects, such as a browser, a video client, an audio application, or a news application, etc. The user can log in to his or her account on the application and then browse the objects included in the application. The application involved in the embodiment of the present application can be a software client, or a client such as a web page or a small program, and the background server is a background server corresponding to the software or web page, small program, etc., and the specific type of the client is not limited. It should be noted that, even if the user has not logged in to an account, generally speaking, the server corresponding to the client will identify the user, for example, it can be identified through the terminal used by the user, so the identification can also be understood as the user's account.
[0101] The server 102 may be a backend server corresponding to the client installed on the terminal device 101. For example, it may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It may also be a cloud server 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, as well as big data and artificial intelligence platforms, but is not limited to these.
[0102] The server 102 may include one or more processors 1021, a memory 1022, and an I / O interface 1023 for interacting with a terminal. In addition, the server 102 may also be configured with a database 1024, which may be used to store account data of each candidate account and trained model parameters. The memory 1022 of the server 102 may also store program instructions of the object recommendation method provided in the embodiment of the present application. When these program instructions are executed by the processor 1021, they may be used to implement the steps of the object recommendation method provided in the embodiment of the present application, so as to obtain objects recommended to the target account, and then push the determined objects to the target account. The pushed object information may then be displayed accordingly on the terminal device 101 of the target account.
[0103] The terminal device 101 and the server 102 can be directly or indirectly connected to each other through one or more networks 103. The network 103 can be a wired network or a wireless network, for example, a mobile cellular network or a Wireless Fidelity (WIFI) network, or other possible networks, which are not limited in the present embodiment.
[0104] In a specific embodiment, the following can be used: Figure 2 The application scenario diagram shown in the figure shows that the recommendation method provided by the embodiment of the present application can be applied to various recommendation scenarios such as videos, news, and e-commerce. For example, it can be applied to the news recommendation channel and recommendation channel of the mobile client. The principle is similar for other recommendation scenarios. This article mainly uses news recommendation as an example for illustration.
[0105] Figure 2 The application scenario is specifically a schematic diagram of the architecture of a news recommendation system, which mainly includes a terminal device 201 and a server 202. Among them, the terminal device 201 is installed with a news client, and the server 202 may include the following modules:
[0106] (1) Recall module 2021: A module used to implement the recall logic process in the recommendation process.
[0107] (2) Similar Account Calculation Module 2022: This module is used to learn account feature vectors based on the historical click records of each account, and to perform similarity calculations based on the learned account feature vectors to obtain similar account relationships between each account. In actual applications, Similar Account Calculation Module 2022 can update similarity relationships based on a certain period or trigger condition, for example, it can implement hourly or minute-by-minute similarity relationship updates.
[0108] (3) Similar account relationship storage module 2023: used to store the similar account relationships of various accounts continuously updated by the similar account calculation module 2022.
[0109] (4) Account history click record storage module 2024: used to store the history click records of each account.
[0110] (5) Account click history real-time update module 2025: When there is a new click behavior in the account, the historical click records stored in the account history click record storage module 2024 are updated. In addition, the similar account calculation module 2022 can also trigger the similarity relationship update process based on the continuously updated click behavior.
[0111] (6) Other modules of the recommendation system 2026: for example, they may include a rough sorting module, a fine sorting module, and a rearrangement module.
[0112] In specific applications, to improve the response speed of online recommendations, similar user calculations can be performed offline in advance. This involves performing offline calculations using the Similar Account Calculation Module 2022 to obtain similar account relationships and storing them in the Similar Account Relationship Storage Module 2023 for use in online recommendations. Furthermore, when performing online recommendations, based on a request from the news client, the Recall Module 2025 reads the current user's similar account relationships from the Similar Account Relationship Storage Module 2023 and the click history of similar accounts from the Account Click History Storage Module 2024. It then selects candidate users for recall, allowing the other modules 2021 of the recommendation system to perform subsequent recommendation processes.
[0113] In one possible application scenario, the account data (such as historical operation object sequences and corresponding operation object attribute sequences), similar account relationships, and model parameters in this application can be stored using cloud storage technology. Cloud storage is a new concept that extends and develops from the concept of cloud computing. A distributed cloud storage system refers to a storage system that uses cluster applications, grid technology, and distributed storage file systems to bring together a large number of different types of storage devices (or storage nodes) in the network through application software or application interfaces to work together and provide external data storage and service access functions.
[0114] In one possible application scenario, to reduce communication latency, servers can be deployed in various regions. Alternatively, for load balancing, different servers can be assigned to serve the regions corresponding to each terminal device. Multiple servers can share data through blockchain, effectively acting as a data sharing system. For example, a terminal device located at location a communicates with a server, while a terminal device located at location b communicates with other servers.
[0115] Each server in the data sharing system has a node identifier corresponding to the server. Each server in the data sharing system can store the node identifiers of other servers in the data sharing system so that the generated blocks can be broadcast to other servers in the data sharing system based on the node identifiers of other servers. Each server can maintain a node identifier list as shown in the table below, and store the server name and node identifier in the node identifier list. The node identifier can be an Internet Protocol (IP) address for interconnection between networks or any other information that can be used to identify the node. Table 1 only uses the IP address as an example for explanation.
[0116] Server Name Node ID Node 1 119.115.151.174 Node 2 118.116.189.145 … … Node N 119.124.789.258
[0117] Table 1
[0118] Of course, the method provided in the embodiment of the present application is not limited to Figure 1 or Figure 2 The application scenarios shown can also be used in other possible application scenarios, and the embodiments of this application are not limited thereto. Figure 1 or Figure 2 The functions that can be implemented by each device in the application scenario shown will be described in subsequent method embodiments and will not be described in detail here.
[0119] See Figure 3 , is a flow chart of the object recommendation method provided in the embodiment of the present application, which can be performed by Figure 1 or Figure 2 The method is executed by the server or terminal in the embodiment. Here, the method is mainly described by taking the server as an example. The process of the method is described as follows.
[0120] Step 301: Based on the historical operation object sequence corresponding to each candidate account and at least one operation object attribute sequence corresponding to each historical operation object sequence, obtain the account feature vector of each candidate account.
[0121] Among them, candidate accounts refer to candidate accounts when selecting similar accounts. Generally, candidate accounts can be all accounts in the recommendation system. For example, for Figure 2 In the news recommendation scenario shown, candidate accounts can be all users in the news recommendation system. In some cases, for example, to narrow the selection range of similar accounts, users can be divided into categories, and similar accounts can be selected within the same category. Therefore, candidate accounts can also refer to some accounts in the recommendation system.
[0122] The historical operation object sequence is composed of the historical operation behavior records of each candidate account. Historical operation behaviors may include clicks, likes, comments, and shares, etc.
[0123] In a possible implementation, each historical operation object sequence may be composed of operation objects operated by the same operation behavior. Figure 4a As shown in the figure, it is a historical operation object sequence based on click behavior. Here, the operation object is specifically news. After sorting the news that user A has clicked on in the past by time, the following can be obtained: Figure 4a The news click sequence shown is as follows Figure 4a The user clicked on video news 1 at 17:17 on August 2, 2019, and then clicked on text news 2 at 7:34 on August 6, 2019, and so on.
[0124] In another possible implementation, each historical operation object sequence may be composed of operation objects corresponding to different types of operation behaviors. Figure 4b As shown in the figure, it is a historical operation object sequence composed of click, share, comment and like behaviors. Here, the operation object is also taken as an example of news. After user A's operation behaviors on each news history are sorted by time, the following can be obtained: Figure 4b The news operation behavior sequence shown is as follows: Figure 4b The user shared News 1 at 18:11 on August 4, 2018, then clicked News 2 at 7:34 on August 6, 2018, and commented on News 4 at 19:26 on August 10, 2018, and liked News 4 at 20:39 on August 10, 2018, and so on.
[0125] In actual applications, a candidate account may have a large number of operation objects. Considering that the operation objects within a certain time distance range can better express the recent interests of the candidate account, the most recent operation objects can be selected to form a historical operation object sequence. Taking news as an example, the 100 or 500 news items closest to the current moment can be selected to form a historical operation object sequence.
[0126] In the embodiment of the present application, each historical operation object sequence may correspond to at least one operation object attribute sequence, and each operation object attribute sequence is composed based on similar attributes of each historical operation object in the corresponding historical operation object sequence.
[0127] See also Figure 5 The following is a schematic diagram of the operation object attribute sequence. Figure 5 Specifically, taking news as an example, the historical operation object sequence includes the ID of each news, see Figure 5 Each line in is an operation object attribute sequence, and each operation object attribute sequence is composed of an operation object attribute of each news. Figure 5 The following example takes the first-level category, second-level category and author of the news as an example. Figure 5 The operation object attribute sequence in the second row shown is composed of the primary categories of each news, and the arrangement order of the ID of each news in the historical operation object sequence is the same as the arrangement order of the primary categories of each news in the operation object attribute sequence, that is, the ID of news 1 is at the first in the operation object attribute sequence, and accordingly, the primary category of news 1 is also at the first in the operation object attribute sequence. The other operation object attribute sequences are the same as this idea, and can be deduced by analogy, so they will not be repeated here.
[0128] In this embodiment of the present application, the historical operation object sequence and at least one operation object attribute sequence corresponding to each candidate account can be obtained based on the historical operation behavior records of each candidate account. Furthermore, based on the historical operation object sequence and operation object attribute sequence of each candidate account, an account feature vector for each candidate account can be obtained. The process of obtaining the account feature vector will be described in detail later and is not detailed here.
[0129] Step 302: Based on the obtained feature vectors of each account, at least one similar account of the target account to be recommended is determined from each candidate account, where each similar account is a candidate account whose similarity with the target account meets the set requirements.
[0130] The embodiment of the present application uses an account-based collaborative filtering approach to recommend objects, that is, recommendations are made based on the similarity between users. If account A is similar to account B, it indicates that the objects operated by account A are more likely to be operated by account B. In this case, the objects operated by account A can be recommended to account B. The similarity between accounts can be measured by the vector similarity between account feature vectors. Therefore, after obtaining the account feature vectors of each candidate account, the account feature vector of the target account for which object recommendation is currently required can be retrieved, and the similarity between this account feature vector and all other account feature vectors can be calculated. The candidate accounts whose similarity meets the set requirements are then selected as similar accounts to the target account. The operation objects of these similar accounts can then be used as recall objects.
[0131] In one possible implementation, considering that similarity calculation requires a lot of computing resources and time, which affects the timeliness of online recommendation response, the similarity calculation process can be converted to offline calculation to improve response timeliness. Therefore, step 302 can be specifically implemented as follows:
[0132] Based on the obtained account feature vectors of each candidate account, the similarity between every two candidate accounts is obtained respectively, and for each candidate account, the following steps are performed respectively: for one candidate account among the candidate accounts, based on the similarity between the candidate account and each of the remaining candidate accounts, at least one similar account is selected for the candidate account, and the corresponding relationship between the candidate account and the at least one similar account is stored. Then, based on the stored corresponding relationship, at least one similar account of the target account can be determined from each candidate account.
[0133] That is to say, by obtaining the account feature vector and similarity calculation offline, and storing the calculated similarity correspondence offline, then when making online recommendations, for the target account to be recommended, it is only necessary to retrieve the corresponding similarity correspondence based on the stored similarity correspondence to obtain the similar users of the target account.
[0134] Here Figure 2 Taking the news recommendation scenario shown in the figure as an example, after calculating the similarity between candidate accounts through the similar account calculation module 1022, at least one similar account is selected for each candidate account to form a similar account set. In this case, a fast vector search tool can be used to index the user vector, such as ANNOY (Approximate Nearest Neighbors Oh Yeah) and FAISS. For each candidate account, the top k candidate accounts with the closest vector distance are found as similar users. Furthermore, a corresponding relationship is established between the candidate account and its similar account set, and the corresponding relationship between the candidate account and its similar account set is stored in the similar account relationship storage module 2023.
[0135] See also Figure 6a As shown in FIG, a schematic diagram of the similarity correspondence relationship is shown. Taking the example of selecting K similar accounts for each candidate account, the correspondence relationship between each candidate account and its similar account set is stored in the similar account relationship storage module 2023, as shown in FIG. Figure 6a As shown, the similar account set corresponding to candidate account 1 includes similar accounts 11 to 1K. Therefore, in a possible implementation, reference may be made to Figure 6a The relationship is stored in a mapping manner, that is, the correspondence between a candidate account and its similar account set is converted into a key-value pair, where the key is the identifier of the candidate account and the value is the identifier of the similar account set or each similar account identifier.
[0136] In another possible implementation, storage can also be performed in the form of a relationship graph. Figure 6b As shown in the figure, a node in the relationship graph represents a candidate account, and the edge between two nodes indicates that the two accounts are similar accounts, such as Figure 6b There is a connection edge between candidate account 1 and candidate account 4, which indicates that candidate account 1 and candidate account 4 are similar accounts.
[0137] Step 303: Based on the historical operation object sequence of at least one similar account, obtain multiple candidate recommendation objects.
[0138] After obtaining at least one similar account to the target account, the historical operation object sequences of these similar accounts can be obtained, and candidate recommendation objects can be selected from the historical operation object sequences. Among them, the candidate recommendation objects are used as recall objects for subsequent rough and fine ranking processes.
[0139] In one possible implementation, in order to improve the recall rate of the determined candidate objects, the operation objects of at least one similar account can be further screened. That is, after determining at least one similar account and obtaining the recent operation objects of these similar accounts, for each operation object, its corresponding object weight value can be obtained based on the operation object attributes of each operation object, and based on the object weight values of each operation object, each operation object can be sorted, so as to determine from each operation object the operation object whose object weight value meets the set requirements as a candidate recommendation object.
[0140] In practical applications, users generally tend to prefer newer objects, and the more popular each object is, the more likely they are to operate on it. For example, when it comes to news, most users tend to pay attention to newly emerging hot news. Therefore, when calculating the weight value of each object, the newness and popularity of the object can be taken into account.
[0141] Therefore, the object weight value corresponding to the operation object attribute of each operation object is obtained. Specifically, the object weight value corresponding to the operation object can be obtained by the time difference between the release time of the operation object and the current time, as well as the relative popularity value of the operation object. Among them, the relative popularity value is used to characterize the number of interactive operations of an operation object relative to the number of interactive operations of other operation objects, and the relative popularity value is positively correlated with the number of interactive operations. See the following formula for a possible calculation expression formula of the object weight value:
[0142]
[0143] Among them, R represents the object weight of the i-th operation object, t i1 Represents the current moment, t i2 Indicates the online time of the i-th operation object. For news, the online time is the time when the news is released. For products, the online time is the time when the product is put on the shelves. c represents the bias coefficient, b is the amplitude coefficient, c and b are constants, S i1 Represents the number of interactions of the i-th operation object, which may include the number of clicks, likes, and shares, etc. max The maximum value of the number of interactive operations among the operation objects of at least one similar account obtained above, S i1 / S max Represents the relative heat value of the i-th operation object.
[0144] Specifically, the object weight value is negatively correlated with the time difference and positively correlated with the relative popularity value, that is, the newer and more popular the operation object is, the greater the possibility of being recommended to the user. Figure 7 The figure below shows the relationship between object weight and time difference. As can be seen, the larger the time difference, the lower the object weight. In the above formula, the bias coefficient c and the amplitude coefficient b are used to adjust the position of the curve in the relationship graph. Changing the bias coefficient and the amplitude coefficient will change the correspondence between the object weight value on the ordinate and the abscissa. That is, the relationship graph will shift left and right, and the amplitude will also change. For example, when the bias coefficient is 12 and the amplitude is 24, the object weight will approach 0 when the time difference between the current time and the time of going online is greater than 150 hours. However, if the bias coefficient is increased, the object weight will also increase when the time difference between the current time and the time of going online is 150 hours.
[0145] In an embodiment of the present application, the object weight values of the operation objects of all similar accounts can be calculated through the above method, so that they can be sorted from large to small according to the object weight values, and finally the K operation objects with the largest object weight values are selected as candidate recommendation objects for recall.
[0146] Step 304: Determine a target recommendation object for the target account from multiple candidate recommendation objects.
[0147] The embodiment of the present application uses similar account recall as one of the recall methods, which can be mixed with the operation objects obtained by recalling the recall loop using other recall methods as candidate recommendation objects, and scored and uniformly sorted through a subsequent sorting model, and then multiple objects with high rankings are selected as target recommendation objects recommended to the target account.
[0148] The following describes the process of obtaining the account feature vector of each candidate account based on the historical operation object sequence and the corresponding operation object attribute sequence.
[0149] In a possible implementation, the account feature vector of each candidate account can be obtained based on the following method, which specifically includes the following process, see Figure 8 As shown:
[0150] Step 801: construct multiple element sequences based on each historical operation object sequence and at least one operation object attribute sequence corresponding to each historical operation object sequence.
[0151] Each element sequence is a subsequence of operation objects or a subsequence of operation object attributes of a candidate account. To facilitate subsequent model processing, all element sequences can contain the same number of elements. For example, each element sequence can contain N elements, where N is a positive integer. When an element sequence is a subsequence extracted from a historical operation object sequence, then one element in the element sequence is an operation object. Figure 5 As shown in the figure, for the historical operation object sequence of news 1 to news N, the subsequence of news 1 to news 3 can be selected as the element sequence with N being 3. Correspondingly, a subsequence can also be extracted from the operation object attribute sequence, and one element in the element sequence is the corresponding object attribute, such as from Figure 5 As shown in the figure, for the operation object attribute sequence of author 1 to author L, a subsequence of author 1 to author 3 can be selected as an element sequence with N being 3. Then, the elements of this element sequence are authors. Of course, in actual applications, there is no limit on the number of elements N contained in each element sequence.
[0152] In the embodiment of the present application, each element is represented in the form of a vector. Therefore, each element needs to be vector mapped, such as Figure 5 As shown, an element in each sequence can be mapped to a vector, such as news 1 is mapped to vector 11, news 2 is mapped to vector 12, and author 1 is mapped to vector 41. The vectors of different elements are different, and the expression of the same element in different sequences can be the same or different.
[0153] In a possible implementation, the element feature vector of each element may be obtained in the following manner. Specifically, for each element sequence in the plurality of element sequences, the following steps are performed respectively:
[0154] For each element sequence in each element sequence, the content feature vector (item embedding) and positional feature vector (positional embedding) of each element included in each element sequence are obtained. A positional feature vector is used to represent the position information of the corresponding element in the element sequence. Then, based on the obtained content feature vector and positional feature vector of each element, the element feature vector of each element included in the element sequence is obtained.
[0155] In the embodiment of the present application, an element sequence can be represented as follows:
[0156]
[0157] in, Represents the nth element in the i-th sequence.
[0158] See also Figure 9Figure 1 shows a flow chart for obtaining element feature vectors for an element in an element sequence. After obtaining the item embedding and positional embedding for each element, the element feature vector for each element in the element sequence is obtained by summing the item embedding and positional embedding to represent the specific element in the element sequence.
[0159] In another possible implementation, the element feature vectors in each element sequence can be randomly initialized and then, during subsequent training, adjusted as model parameters along with the model training process. Initialization can be performed based on the actual content of each element, for example, using algorithms such as Word2Vec, Doc2Vec, or Convolutional Neural Networks (CNN).
[0160] In an embodiment of the present application, the element prediction model is iteratively trained based on the constructed multiple element sequences. During the training process, element sequences of different types (operation object sequences or operation object attributes) are treated equally and participate in the model training process as training samples.
[0161] Since the process of each iterative training is similar, the following takes one iterative training process as an example to introduce the process of obtaining account feature vectors through model training.
[0162] Step 802: For each element sequence, based on the account feature vector and the element feature vectors of N-1 elements among the N elements included therein, obtain a predicted feature vector of the remaining element.
[0163] In the embodiment of the present application, the model training can be performed in a self-supervised manner, that is, no manual labeling is required, which is more convenient. Figure 10 As shown, this is a vector prediction diagram of the element prediction model.
[0164] For each element sequence among all element sequences, taking element sequence A as an example, the account feature vector corresponding to element sequence A is the account feature vector corresponding to the historical operation object sequence or operation object attribute sequence from which element sequence A originates. Furthermore, the account feature vector corresponding to element sequence A and the element feature vectors of the N-1 elements in element sequence A can be used to predict the predicted feature vector of the remaining element beyond the N-1 elements. Of course, the remaining element sequences can be predicted by referring to the process of element sequence A.
[0165] In an embodiment of the present application, the element prediction model can adopt a simple neural network, such as a single-layer fully connected neural network, or a more complex neural network, such as a multi-layer deep neural network, an RNN network, or a CNN network.
[0166] In the embodiment of the present application, the N-1 elements input to the element prediction model may be any N-1 elements in the element sequence.
[0167] In one possible implementation, the Nth element in the element sequence can be predicted based on the elements of the first N-1 elements. Then, for element sequence A, the account feature vector of its corresponding candidate account and the element feature vectors of the first N-1 elements of element sequence A can be input into the element prediction model to obtain the predicted feature vector of the Nth element in element sequence A.
[0168] Here, taking the example that the number of elements N in the element sequence is 3, the element feature vectors of the first two elements in the element sequence A and the corresponding account feature vectors can be input into the element prediction model to obtain the predicted feature vector of the third element.
[0169] In another possible implementation, the middle elements can also be predicted based on multiple elements at the beginning and end. For example, for element sequence A, the corresponding account feature vector, the element feature vectors of the first M elements of element sequence A, and the element feature vectors of the last M elements can be input into the element prediction model to obtain the predicted feature vector of the M+1th element of element sequence A, where M is a positive integer and N=2M+1.
[0170] Here, we also take the example that the number of elements N in the element sequence is 3. Then the element feature vectors of the first and third elements in the element sequence A, as well as the corresponding account feature vectors, can be input into the element prediction model to obtain the predicted feature vector of the second element.
[0171] See also Figure 11 As shown in the figure, it is a schematic diagram of the vector calculation of the element prediction model. Figure 5 Taking the news scenario shown as an example, for a candidate account, multiple element sequences can be formed through its sequences of various sequence types. Specifically, the element sequence formed by the IDs of news 1 to 3 in the historical operation object sequence, the element sequence formed by the primary categories of news 1 to 3, the element sequence formed by the secondary categories of news 1 to 3, and the element sequence formed by the authors of news 1 to 3 are taken as examples. Of course, in actual applications, the element sequence can also be other possible subsequences.
[0172] For the element sequence consisting of the IDs of news items 1-3, which includes vectors 11, 12, and 13, the account feature vector, vectors 11, and 13 can be input into the element prediction model. After passing through the element prediction model's network, the predicted vector 12 can be obtained. The goal of the element prediction model is to, from the perspective of a candidate account, when presented with vectors 11 and 13, accurately output vector 12 from the original element sequence.
[0173] For the element sequence consisting of the first-level categories of news 1 to 3, which includes vector 21, vector 22 and vector 23, the account feature vector, vector 21 and vector 23 can be input into the element prediction model. After passing through the network of the element prediction model, the predicted vector 22 can be obtained.
[0174] For the element sequence consisting of the secondary categories of news 1 to 3, which includes vector 31, vector 32 and vector 33, the account feature vector, vector 31 and vector 33 can be input into the element prediction model. After passing through the network of the element prediction model, the predicted vector 32 can be obtained.
[0175] For the element sequence composed of the authors of news 1 to 3, which includes vector 41, vector 42 and vector 43, the account feature vector, vector 41 and vector 43 can be input into the element prediction model. After passing through the network of the element prediction model, the predicted vector 42 can be obtained.
[0176] In the embodiment of the present application, the vector prediction process can be performed in the following manner.
[0177] In one possible implementation, the element feature vectors of N-1 elements can be fused to obtain a fused feature vector, and then feature extraction can be performed based on the account feature vector of the candidate account and the fused feature vector to obtain a predicted feature vector. The feature extraction process can be implemented using a single-layer fully connected layer or a deep neural network.
[0178] Specifically, the above fusion processing process can be implemented in any of the following ways:
[0179] (1) Pooling method
[0180] Specifically, the fused feature vector is obtained by pooling the element feature vectors of N-1 elements. Generally speaking, the dimensions of the element feature vectors of N-1 elements are consistent, so the N-1 elements can be fused by performing mean pooling or maximum pooling on each feature dimension.
[0181] (2) Convolution processing method
[0182] Specifically, the element feature vectors of N-1 elements can be arranged in a certain way to form a feature vector matrix, and then the feature vector matrix can be convolved according to the convolution kernel included in the element prediction model and the set convolution step size to obtain a fused feature vector.
[0183] (3) Serialized feature extraction method
[0184] Specifically, a serialized feature extraction method can be used to extract serialized features from the element feature vectors of N-1 elements to obtain a fused feature vector. For example, serialized feature extraction methods can include RNN networks, Long Short-Term Memory (LSTM) networks, Bi-directional Long Short-Term Memory (BiLSTM) networks, and RNN networks combined with attention mechanisms.
[0185] Step 803: Compare the predicted feature vector with the element feature vector of the corresponding element to obtain a comparison result.
[0186] In an embodiment of the present application, after obtaining a predicted feature vector for each element sequence, the predicted feature vector can be compared with the original element feature vector in the element sequence to obtain a comparison result. Ideally, when the element prediction model is accurate enough, the predicted feature vector should be the same as the element feature vector, and then the original element feature vector in the element sequence can be used as a training target (or sample label) for self-supervised training of the model.
[0187] like Figure 11 As shown, if the predicted vector 12 is obtained using vector 11 and vector 13, the predicted vector 12 can be compared with the original vector 12 in the element sequence. When the element prediction model is accurate enough, the predicted vector 12 should be consistent with the original vector 12 in the element sequence.
[0188] Step 804: Based on the comparison results corresponding to each element sequence, obtain the model loss value of the element prediction model.
[0189] For each element sequence, a comparison result can be obtained, which can indicate the degree of difference between the predicted feature vector and the original element feature vector. Then, based on the comparison results corresponding to each element sequence, the model loss value of the element prediction model can be obtained.
[0190] Specifically, the model loss value can be expressed as follows:
[0191]
[0192] Among them, L represents the model loss value, P represents the total number of element sequences, The predicted feature vector representing the i-th element sequence, Characterize the remaining element feature vector in the i-th element sequence.
[0193] Step 805: Determine whether the element prediction model meets the convergence condition.
[0194] The convergence condition of the element prediction model may include any of the following conditions:
[0195] (1) The model loss value of the element prediction model is less than the set threshold.
[0196] (2) The number of iterative training reaches a certain upper limit.
[0197] Step 806: When the judgment result of step 805 is no, update the account feature vector of each candidate account based on the model loss value and jump to step 802.
[0198] When it is determined that the element prediction model does not meet the convergence conditions, it is necessary to continue iterative training. Then, the account feature vectors of each candidate account can be updated based on the model loss value. Of course, in actual application, in addition to the account feature vectors, other model parameters need to be updated. In the embodiment of the present application, the candidate accounts and elements in the element sequence (such as operation objects, operation object attributes) will be mapped into a unique corresponding vector, and these vectors and model weight parameters will be optimized and trained through the element prediction model. That is, the model parameters that need to be updated may include the account feature vector, the element feature vector and the weight parameters of the model itself. The model parameters can be randomly initialized during initialization, and these model parameters will be adjusted accordingly during each iterative training.
[0199] Step 807: When the judgment result of step 805 is yes, the account feature vector of each candidate account is output.
[0200] When the element prediction model is judged to meet the convergence conditions, the model iterative training ends, and the account feature vectors of each candidate account are obtained at this time. That is, the account feature vectors after the final update, that is, the account feature vectors output by the last iterative training, are determined as the account feature vectors of each candidate account.
[0201] In the embodiment of the present application, sequences of different sequence types are trained using the same neural network, that is, sequences of different sequence types share the same network parameters. Since the account feature vector and each element feature vector are trained simultaneously, the final account feature vector will have information about each element. Figure 11As shown, the account feature vector is trained simultaneously with the news ID vector, category vector, and author vector. Therefore, the resulting account feature vector includes the candidate account's preferences for different news items, different primary news categories, different secondary news categories, and different news authors. Therefore, when using the candidate account's account feature vector to find similar users, it comprehensively considers the candidate account's preferences across multiple news dimensions, resulting in a more accurate and comprehensive approach compared to simply considering the news ID sequence in the click history.
[0202] In another possible implementation, different neural networks may be used for training sequences of different sequence types to obtain the account feature vectors of each candidate account. The specific process includes the following: Figure 12 As shown:
[0203] In the embodiment of the present application, the element prediction sub-model may include multiple element prediction models, each sequence type corresponds to an element prediction sub-model, and a sequence type is a historical operation object sequence or a type of operation object attribute sequence, for example Figure 5 The news ID sequence shown is a sequence type, the first-level category sequence is a sequence type, the second-level category sequence is also a sequence type, and so on.
[0204] Then, based on the sequences of various sequence types, the element prediction sub-models corresponding to various sequence types are iteratively trained. In one iterative training process, the following steps are specifically included:
[0205] Step 1201: For each sequence type, construct multiple element sequences, each element sequence including a subsequence of a candidate account on the sequence type.
[0206] Step 1202: For each element sequence in the multiple element sequences, use the corresponding element prediction sub-model to obtain a predicted feature vector of the remaining element based on the corresponding account feature vector and N-1 elements.
[0207] by Figure 5 Taking the news ID sequence shown as an example, for each element sequence in the multiple element sequences constructed based on the news ID sequence, the element prediction sub-model corresponding to the news ID sequence is used to predict the remaining element except the N-1 elements based on the account feature vector corresponding to each element sequence and the N-1 elements among the N elements included in each element sequence, thereby obtaining the predicted feature vector of the remaining element in the element sequence.
[0208] Step 1203: Compare the predicted feature vector with the element feature vector of the remaining element to obtain a comparison result.
[0209] Step 1204: Based on the comparison results of each element sequence, obtain the model loss value of each element prediction sub-model.
[0210] In this embodiment, corresponding element prediction sub-models are established for different sequence types, and after element sequences are constructed for different sequence types, the corresponding element prediction sub-models are used to perform element prediction and calculate the loss.
[0211] See also Figure 11 As shown, the news ID sequence can be trained and learned using a separate element prediction sub-model, that is, the account feature vector, vector 11 and vector 13 are input into the element prediction sub-model corresponding to the news ID sequence to predict vector 12, and a separate category sequence can be trained and learned using a separate element prediction sub-model, that is, the account feature vector, vector 21 and vector 23 are input into the element prediction sub-model corresponding to the separate category sequence to predict vector 22, and so on.
[0212] Since each element prediction sub-model performs element prediction and model loss calculation in the same process Figure 8 The embodiments shown are similar in part, so the specific process can be found in Figure 8 The description of the embodiment shown will not be repeated here.
[0213] Step 1205: Based on the model loss values of each element prediction sub-model and the corresponding model weight values, the total loss value of the element prediction model is obtained.
[0214] In the embodiment of the present application, after each element prediction sub-model performs vector prediction and calculates loss, the total loss value of the element prediction model can be obtained based on the model loss value of each element prediction sub-model. Specifically, the total loss value of the element prediction model can be calculated based on the model loss value of each element prediction sub-model and the corresponding model weight value.
[0215] Among them, the model weight value of each element prediction sub-model can be set based on experience, or it can be trained together as a model parameter.
[0216] Step 1206: Determine whether the element prediction model meets the convergence condition.
[0217] Step 1207: When the judgment result of step 1206 is no, update the account feature vector of each candidate account based on the total loss value and jump to step 1202.
[0218] Step 1208: When the judgment result of step 1206 is yes, the account feature vector of each candidate account is output.
[0219] When the element prediction model is judged to meet the convergence conditions, the model iterative training ends, and the account feature vectors of each candidate account are obtained at this time. That is, the account feature vectors after the final update, that is, the account feature vectors output by the last iterative training, are determined as the account feature vectors of each candidate account.
[0220] In another possible implementation, the following method can be used to obtain the account feature vector of each candidate account, which specifically includes the following process, see Figure 13 As shown:
[0221] Step 1301: Construct multiple triples based on each candidate account.
[0222] A triplet is a combination of three elements. Each triplet includes three candidate accounts: a first candidate account, a second candidate account, and a third candidate account. The first and second candidate accounts in each triplet are similar accounts, while the first and third candidate accounts in each triplet are dissimilar accounts. Similar accounts refer to accounts whose similarity meets requirements, for example, a similarity greater than a set similarity threshold. Dissimilar accounts can refer to two accounts whose similarity is less than or equal to the set similarity threshold.
[0223] In the embodiments of the present application, triples can be obtained based on manual annotation. For example, any two candidate accounts can be labeled to indicate whether the two candidate accounts are similar. Then, when constructing a triple, candidate accounts that meet the triple requirements can be selected. For example, if account A and account B are similar accounts, and account A and account C are dissimilar accounts, then a triple {A, B, C} can be formed.
[0224] Step 1302: Perform feature encoding based on each historical operation object sequence and at least one operation object attribute sequence corresponding to each historical operation object sequence to obtain an account feature vector for each candidate account.
[0225] Step 1303: Based on the account feature vectors of the candidate accounts included in each triple, obtain the triple loss value of each triple.
[0226] In the embodiment of the present application, the feature learning model is iteratively trained using each triple until the feature learning model reaches convergence conditions. The iterative training includes multiple training processes, and the data processing in each training process is similar. Therefore, the following mainly uses a single training process as an example for description.
[0227] Specifically, the feature learning model may include an encoder and a loss layer. The encoder may perform feature encoding based on the historical operation object sequence of each candidate account and at least one operation object attribute sequence corresponding to each historical operation object sequence to obtain the account feature vector of each candidate account, and then use the loss layer to calculate the loss based on the obtained account feature vector.
[0228] In the embodiment of the present application, there is no restriction on the structure of the encoder, and a single-layer fully connected layer structure or a deep neural network structure such as CNN or RNN can be adopted.
[0229] The loss layer can use any algorithm that can calculate the loss value based on two sets of elements that have an intersection. One possible algorithm is the triplet loss algorithm. Then, the triplet loss value of each triplet can be obtained based on the account feature vector of each candidate account in each triplet. Taking a triplet as an example, the triplet loss value of the triplet can be obtained as follows:
[0230] First, a first similarity between the account feature vector of the first candidate account and the account feature vector of the second candidate account is calculated, as well as a second similarity between the account feature vector of the first candidate account and the account feature vector of the third candidate account is obtained. Then, a triplet loss value of a triplet is obtained based on the first similarity and the second similarity. The triplet loss value is used to characterize the degree of difference between the first similarity and the second similarity.
[0231] Specifically, the idea of triplet loss can be used to maximize the separation of the three candidate accounts included in each triplet. The purpose of the feature learning model is to learn the degree of difference between the candidate accounts. Theoretically, because the first and second candidate accounts are labeled similar accounts, the first similarity value is large, while the first and third candidate accounts are labeled dissimilar accounts, the second similarity value is small, which makes the distance between similar accounts tend to be closer, while the distance between dissimilar users becomes increasingly farther.
[0232] The definition of Triplet loss is as follows:
[0233] L=max(0, R(a1, a2)-R(a1, a3)-δ)
[0234] Wherein, L is the triple loss value of a triple, R(a1, a2) represents the first similarity between the first candidate account and the second candidate account, R(a1, a3) represents the second similarity between the first candidate account and the third candidate account, and δ is a small positive integer, also called an interval.
[0235] Step 1304: Determine whether the feature learning model meets the convergence condition.
[0236] Step 1305: When the result of step 1304 is no, update the encoder based on the obtained triplet loss values corresponding to each triplet.
[0237] Step 1306: When the result of step 1304 is yes, obtain the account feature vector of each candidate account.
[0238] Through the above process, the triplet loss values corresponding to all triples can be obtained, and then the triplet loss values can be used to determine whether the feature learning model meets the convergence conditions. The convergence conditions can include one or more of the following conditions:
[0239] (1) The triple loss value of each triple is not less than the set first threshold.
[0240] (2) The sum of the loss values of all triples is not less than a set second threshold, and the second threshold is greater than the first threshold.
[0241] (3) The number of iterative training times reaches the set threshold.
[0242] If convergence conditions are not met, the model parameters can be updated and the next training process can be started based on the updated feature learning model. The model parameters can include encoder parameters and element feature vectors of elements in each sequence, which are gradually updated as the training process progresses. Of course, in addition to these model parameters, other model parameters can also be included and gradually optimized during the training process.
[0243] When convergence conditions are met, iterative training ends, and the account feature vectors obtained by encoding the features of the encoder during the last iterative training are determined as the account feature vectors of each candidate account. In other words, through the above training process, an encoder can be trained to perform feature encoding based on the historical operation object sequence and the operation object attribute sequence to obtain account feature vectors. Therefore, when the model converges, this encoder can be directly used in the subsequent encoding process.
[0244] The object recommendation method of the embodiment of the present application can be applied to any network object recommendation scenario, for example, it can be applied to news recommendation scenarios, video recommendation scenarios, and product recommendation scenarios, etc. For example, in a news recommendation scenario, it can be applied to video recommendation in the news channel in a news application. At the same time, it is also applicable to other recommendation scenarios in news applications, such as short video channels or video channels.
[0245] Here mainly Figure 2Taking the news recommendation scenario of as an example, the recommendation process is introduced. Figure 14 The figure shows a flowchart of news recommendation.
[0246] Step 1401: The user uses account A to access the news client.
[0247] Here, entering the news client can refer to entering any page of the news client. Specifically, after operating the news application icon on the desktop, the news application client page can be entered. At the same time, in the news application, the user can operate to switch pages.
[0248] Step 1402: The news client requests the server based on the account information of account A.
[0249] Specifically, when a news client switches to a certain page, it is necessary to display the content on the page, including the recommended objects displayed on the page. Therefore, the news client initiates a request to the server to obtain relevant information about the recommended objects.
[0250] 1402: Request for recommended objects based on account A's account information
[0251] Step 1403: Server (i.e. Figure 2 After obtaining the account information, the other modules of the recommendation system (as shown) request the recall module to recall the candidate recommendation objects.
[0252] Step 1404: The recall module requests the similar account relationship storage module according to the account A identifier.
[0253] The similar account relationship storage module stores similar account relationships of multiple accounts including account A, and the recall module can then request the similar account relationship storage module to obtain similar accounts of account A.
[0254] In specific implementation, the similar account relationship storage model can be implemented using a persistent database such as Redis.
[0255] Step 1405: The recall module obtains multiple similar accounts similar to account A from the similar account relationship storage module.
[0256] Step 1406: The recall module requests the account history click record storage module based on the similar account identifier.
[0257] Similarly, the account history click record storage module can also be implemented using a persistent database such as redis.
[0258] Step 1407: The recall module obtains historical click news of multiple similar users.
[0259] Step 1408: The recall module scores and sorts the news based on the time of news release and the number of interactive operations.
[0260] Step 1409: The recall module sends the top K news items to other modules of the recommendation system.
[0261] Step 1410: Other modules of the recommendation system mix these K news items with the news items obtained from other recall loops, score them through the ranking model, and uniformly rank them.
[0262] Step 1411: The server returns the top N news items to the news client.
[0263] Step 1412: See Figure 2 As shown, the news client can display multiple news items in sorted order.
[0264] Step 1413: The news client presents the news to the user, and the user views the news.
[0265] In summary, the embodiment of the present application is based on the idea of account collaborative filtering. When learning account features, it not only considers the object ID sequence that the account has clicked on, but also comprehensively considers the various object attributes of the object. At the same time, based on the neural network model, an account is mapped to a vector, and accurate similar accounts are quickly obtained based on the obtained account feature vector and vector retrieval algorithm. Finally, objects are recalled according to certain weights based on the historical operation objects of similar accounts. This method can not only quickly calculate similar accounts offline, but also improve the accuracy of similar account calculations by considering multiple object attributes. Since the calculation of similar accounts is completed offline in advance, objects can be recalled online directly based on the click history of similar accounts updated at the hourly or minute level, and the timeliness and diversity of the recalled objects are also improved.
[0266] Taking the news scenario as an example, after this method is deployed and implemented in the actual news page scenario, that is, after the news videos recalled through the embodiment of the present application are sorted and exposed to users, the probability of being long-clicked by users (video click and playback time is greater than 7 seconds) is 51%, which is obviously much improved compared to the average value of 41% for recalling news videos by other methods, and the user's playback completion rate (playback time divided by total video time) is 67%, while the average value of news video recall by other methods is 60%, which is obviously also improved. After the recall is launched, the number of video playbacks per capita and the average length of stay in the scene per capita in the corresponding page scene have both increased positively. Therefore, it can be seen that the recommendation accuracy of the object recommendation method of the embodiment of the present application is obviously higher.
[0267] See Figure 15 Based on the same inventive concept, the embodiment of the present application further provides an object recommendation device 150, which includes:
[0268] Feature vector acquisition unit 1501 is configured to obtain an account feature vector for each candidate account based on the historical operation object sequence corresponding to each candidate account and at least one operation object attribute sequence corresponding to each historical operation object sequence. Each operation object attribute sequence is composed of similar attributes of each historical operation object in the corresponding historical operation object sequence.
[0269] A similar account determining unit 1502 is configured to determine, from each candidate account, at least one similar account to the target account for which object recommendation is to be made based on the obtained account feature vectors, where each similar account is a candidate account whose similarity to the target account meets a set requirement;
[0270] The recommendation object determination unit 1503 is configured to obtain a plurality of candidate recommendation objects based on a historical operation object sequence of at least one similar account; and determine a target recommendation object of a target account from the plurality of candidate recommendation objects.
[0271] Optionally, the feature vector obtaining unit 1501 is specifically configured to:
[0272] Based on each historical operation object sequence and at least one operation object attribute sequence corresponding to each historical operation object sequence, multiple element sequences are constructed; wherein each element sequence is an operation object subsequence or an operation object attribute subsequence of a candidate account;
[0273] The element prediction model is iteratively trained based on multiple element sequences, and when the element prediction model converges, each account feature vector output by the last iterative training is determined as the account feature vector of each candidate account.
[0274] Optionally, the feature vector obtaining unit 1501 is specifically configured to:
[0275] For each of the multiple element sequences, the following operations are performed: for one of the element sequences, based on the account feature vector of the corresponding candidate account and the element feature vectors of N-1 elements among the N elements included in the element sequence, a predicted feature vector of an element other than the N-1 elements in the element sequence is obtained; where N is a positive integer; and the predicted feature vector is compared with the element feature vector of the one element to obtain a comparison result;
[0276] Based on the comparison results corresponding to each element sequence, the model loss value of the element prediction model is obtained;
[0277] Update the account feature vector of each candidate account based on the model loss value.
[0278] Optionally, the feature vector obtaining unit 1501 is specifically configured to:
[0279] Based on the account feature vector of the candidate account and the element feature vectors of the first N-1 elements of an element sequence, a predicted feature vector of the Nth element of an element sequence is obtained; or,
[0280] Based on the account feature vector of the candidate account, the element feature vectors of the first M elements of an element sequence, and the element feature vectors of the last M elements, a predicted feature vector of the M+1th element of an element sequence is obtained, where M is a positive integer and N=2M+1.
[0281] Optionally, the feature vector obtaining unit 1501 is specifically configured to:
[0282] Perform fusion processing on the element feature vectors of N-1 elements to obtain a fused feature vector;
[0283] Feature extraction is performed based on the account feature vector and fusion feature vector of the candidate account to obtain the predicted feature vector.
[0284] Optionally, the feature vector obtaining unit 1501 is specifically configured to:
[0285] Perform pooling on the element feature vectors of N-1 elements to obtain a fused feature vector;
[0286] According to the convolution kernel included in the element prediction model and the set convolution step size, the feature vector matrix composed of the element feature vectors of N-1 elements is convolved to obtain a fused feature vector;
[0287] Perform serialized feature extraction on the element feature vectors of N-1 elements to obtain a fused feature vector.
[0288] Optionally, the feature vector obtaining unit 1501 is specifically configured to:
[0289] For each element sequence in the multiple element sequences, perform the following steps respectively:
[0290] For an element sequence in each element sequence, obtaining a content feature vector and a position feature vector of each element included in the element sequence, wherein a position feature vector is used to represent position information of a corresponding element in the element sequence;
[0291] According to the obtained content feature vector and position feature vector of each element, an element feature vector of each element included in an element sequence is obtained.
[0292] Optionally, the feature vector obtaining unit 1501 is specifically configured to:
[0293] Based on sequences of various sequence types, element prediction sub-models corresponding to various sequence types included in the element prediction model are iteratively trained. Each sequence type corresponds to an element prediction sub-model, and one sequence type is a historical operation object sequence or a type of operation object attribute sequence. In one iterative training process, the following operations are performed:
[0294] For sequences of various sequence types, the following steps are performed respectively: for a sequence of a sequence type, multiple element sequences are constructed, each element sequence includes a subsequence of a candidate account on a sequence type; for each element sequence in the multiple element sequences, an element prediction sub-model corresponding to a sequence type is used to obtain a prediction feature vector of the remaining element in each element sequence other than the N-1 elements based on the corresponding account feature vector and N-1 elements of the N elements included in each element sequence; the predicted feature vector is compared with the element feature vector of the remaining element to obtain a comparison result, and based on the comparison result corresponding to each element sequence, a model loss value of the element prediction sub-model is obtained;
[0295] Based on the model loss value of each element prediction sub-model and the corresponding model weight value, the account feature vector of each candidate account is updated;
[0296] When the element prediction model converges, the account feature vectors output by the last iterative training are determined as the account feature vectors of each account.
[0297] Optionally, the feature vector obtaining unit 1501 is specifically configured to:
[0298] Constructing multiple triples based on each candidate account; wherein the first candidate account and the second candidate account included in each triple are similar accounts, and the first candidate account and the third candidate account included in each triple are dissimilar accounts;
[0299] The feature learning model is iteratively trained based on multiple triplets, and when the feature learning model converges, each account feature vector obtained by feature encoding based on the encoder during the last iterative training is determined as the account feature vector of each candidate account.
[0300] Optionally, the feature vector obtaining unit 1501 is specifically configured to:
[0301] Using an encoder included in the feature learning model, feature encoding is performed based on each historical operation object sequence and at least one operation object attribute sequence corresponding to each historical operation object sequence to obtain an account feature vector for each candidate account;
[0302] For each triple in the plurality of triplets, the following steps are performed: for each triple, a first similarity between an account feature vector of a first candidate account and an account feature vector of a second candidate account is obtained, and a second similarity between the account feature vector of the first candidate account and an account feature vector of a third candidate account is obtained, and a triple loss value for the triple is obtained based on the first similarity and the second similarity, where the triple loss value is used to represent a degree of difference between the first similarity and the second similarity;
[0303] The encoder is updated based on the triplet loss values corresponding to each triplet obtained.
[0304] Optionally, the similar account determining unit 1502 is specifically configured to:
[0305] Based on the obtained account feature vectors of each candidate account, the similarity between each two candidate accounts is obtained;
[0306] For each candidate account, the following steps are performed: for one candidate account among the candidate accounts, based on the similarity between the candidate account and each of the other candidate accounts, at least one similar account is selected for the candidate account, and a corresponding relationship between the candidate account and the at least one similar account is stored;
[0307] Based on the stored correspondence, at least one similar account to the target account is determined from each candidate account.
[0308] Optionally, the recommendation object determination unit 1503 is specifically configured to:
[0309] For each operation object included in the historical operation object sequence of at least one similar account, the following operations are performed respectively: for one operation object among the operation objects, an object weight value of the operation object is obtained based on the time difference between the release time of the operation object and the current time, and the relative popularity value of the operation object; wherein the object weight value is negatively correlated with the time difference and positively correlated with the relative popularity value, and the relative popularity value is used to represent the number of interactive operations of the operation object relative to the number of interactive operations of other operation objects, and the relative popularity value is positively correlated with the number of interactive operations;
[0310] Based on the obtained object weight values of the various operation objects, an operation object whose object weight value meets the set requirements is determined from the various operation objects as a candidate recommendation object.
[0311] The device can be used to perform Figures 3 to 14 The method shown in the embodiment shown, therefore, for the functions that can be realized by each functional module of the device, please refer to Figures 3 to 14 The description of the illustrated embodiment is omitted for brevity.
[0312] See Figure 16 Based on the same technical concept, an embodiment of the present application also provides a computer device 160 , which may include a memory 1601 and a processor 1602 .
[0313] The memory 1601 is used to store computer programs executed by the processor 1602. The memory 1601 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function, etc.; the data storage area may store data created according to the use of the computer device, etc. The processor 1602 may be a central processing unit (CPU), or a digital processing unit, etc. The specific connection medium between the above-mentioned memory 1601 and the processor 1602 is not limited in the embodiment of the present application. The embodiment of the present application is Figure 16 In the embodiment, the memory 1601 and the processor 1602 are connected via a bus 1603. The bus 1603 is connected to the processor 1602 via a bus 1603. Figure 16 The bus 1603 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 16 Only one thick line is used in the diagram, but this does not mean that there is only one bus or one type of bus.
[0314] Memory 1601 may be a volatile memory, such as random-access memory (RAM); a non-volatile memory, such as read-only memory, flash memory, a hard disk drive (HDD), or a solid-state drive (SSD); or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but is not limited thereto. Memory 1601 may be a combination of the aforementioned memories.
[0315] The processor 1602 is configured to execute the following when calling the computer program stored in the memory 1601: Figures 3 to 14 The method executed by the device in the embodiment shown.
[0316] In some possible implementations, various aspects of the method provided in the present application may also be implemented in the form of a program product, which includes program code. When the program product is run on a computer device, the program code is used to enable the computer device to perform the steps of the method according to various exemplary embodiments of the present application described above in this specification. For example, the computer device may perform the following steps: Figures 3 to 14 The method executed by the device in the embodiment shown.
[0317] The program product may be implemented in any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.
[0318] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present application.
[0319] Obviously, those skilled in the art may make various changes and modifications to this application without departing from the spirit and scope of this application. Thus, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalents, this application is intended to include these modifications and variations.
Claims
1. An object recommendation method, characterized in that: The method comprises: Based on the historical operation object sequences corresponding to each candidate account and at least one operation object attribute sequence corresponding to each historical operation object sequence, respectively, an account feature vector for each candidate account is obtained; wherein each operation object attribute sequence is composed of similar attributes of each historical operation object in the corresponding historical operation object sequence; Based on the obtained account feature vectors of each candidate account, the similarity between each two candidate accounts is obtained; Selecting at least one similar account corresponding to each candidate account based on the similarity between each two candidate accounts, and storing the corresponding relationship between each candidate account and the at least one similar account; Based on the stored correspondence, determining at least one similar account to the target account for object recommendation from the candidate accounts, each similar account being a candidate account whose similarity to the target account meets a set requirement; Obtaining a plurality of candidate recommendation objects based on a historical operation object sequence of the at least one similar account; Determine a target recommendation object for the target account from the multiple candidate recommendation objects.
2. The method according to claim 1, wherein Based on the historical operation object sequence corresponding to each candidate account and at least one operation object attribute sequence corresponding to each historical operation object sequence, the account feature vector of each candidate account is obtained, including: Based on each of the historical operation object sequences and at least one operation object attribute sequence corresponding to each of the historical operation object sequences, a plurality of element sequences are constructed; wherein each element sequence is an operation object subsequence or an operation object attribute subsequence of a candidate account; The element prediction model is iteratively trained based on the multiple element sequences, and when the element prediction model converges, each account feature vector output by the last iterative training is determined as the account feature vector of each candidate account.
3. The method according to claim 2, wherein During one training iteration, the following operations are performed: For each of the multiple element sequences, the following operations are performed: for one of the element sequences, based on the account feature vector of the corresponding candidate account and the element feature vectors of N-1 elements among the N elements included in the one element sequence, a predicted feature vector of an element other than the N-1 elements in the one element sequence is obtained, where N is a positive integer; and the predicted feature vector is compared with the element feature vector of the one element to obtain a comparison result. Obtaining a model loss value of the element prediction model based on the comparison results corresponding to the respective element sequences; The account feature vector of each candidate account is updated based on the model loss value.
4. The method according to claim 3, wherein For one element sequence among the element sequences, based on the account feature vector of the corresponding candidate account and the element feature vectors of N-1 elements among the N elements included in the one element sequence, obtaining a predicted feature vector of the remaining element in the one element sequence except the N-1 elements, including: Obtaining a predicted feature vector of the Nth element of the element sequence based on the account feature vector of the candidate account and the element feature vectors of the first N-1 elements of the element sequence; or, Based on the account feature vector of the candidate account, the element feature vectors of the first M elements of the element sequence, and the element feature vectors of the last M elements, the predicted feature vector of the M+1th element of the element sequence is obtained, where M is a positive integer and N=2M+1.
5. The method according to claim 3, wherein The step of obtaining, for one element sequence among the element sequences, a predicted feature vector of an element other than the N-1 elements in the element sequence based on the account feature vector of the corresponding candidate account and the element feature vectors of the N-1 elements among the N elements included in the element sequence, includes: Performing a fusion process on the element feature vectors of the N-1 elements to obtain a fused feature vector; Feature extraction is performed based on the account feature vector of the candidate account and the fused feature vector to obtain the predicted feature vector.
6. The method according to claim 5, wherein The fusion processing includes any one of the following methods: Performing pooling processing on the element feature vectors of the N-1 elements to obtain the fused feature vector; According to the convolution kernel and the set convolution step size included in the element prediction model, convolution processing is performed on the feature vector matrix composed of the element feature vectors of the N-1 elements to obtain the fused feature vector; Perform serialized feature extraction on the element feature vectors of the N-1 elements to obtain the fused feature vector.
7. The method according to claim 5, wherein Before obtaining, for one element sequence among the element sequences, a predicted feature vector of an element other than the N-1 elements in the element sequence based on the account feature vector of the corresponding candidate account and the element feature vectors of the N-1 elements among the N elements included in the element sequence, the method further includes: For each element sequence in the multiple element sequences, perform the following steps respectively: For one element sequence among the element sequences, obtaining a content feature vector and a position feature vector of each element included in the element sequence, wherein a position feature vector is used to represent position information of a corresponding element in the element sequence; According to the obtained content feature vector and position feature vector of each element, an element feature vector of each element included in the element sequence is obtained.
8. The method according to claim 1, wherein The step of obtaining the account feature vectors of each candidate account based on the historical operation object sequences corresponding to each candidate account and at least one operation object attribute sequence corresponding to each historical operation object sequence includes: Based on sequences of various sequence types, element prediction sub-models corresponding to various sequence types included in the element prediction model are iteratively trained. Each sequence type corresponds to an element prediction sub-model, and one sequence type is a historical operation object sequence or a type of operation object attribute sequence. In one iterative training process, the following operations are performed: For sequences of various sequence types, the following steps are performed respectively: for a sequence of one sequence type, multiple element sequences are constructed, each element sequence including a subsequence of a candidate account on the one sequence type; for each element sequence in the multiple element sequences, an element prediction sub-model corresponding to the one sequence type is used to obtain, based on a corresponding account feature vector and N-1 elements among the N elements included in each element sequence, a prediction feature vector of an element remaining in each element sequence other than the N-1 elements; the prediction feature vector is compared with the element feature vector of the remaining element to obtain a comparison result, and a model loss value of the element prediction sub-model is obtained based on the comparison results corresponding to each element sequence; Based on the model loss value of each element prediction sub-model and the corresponding model weight value, the account feature vector of each candidate account is updated; When the element prediction model converges, each account feature vector output by the last iterative training is determined as the account feature vector of each account.
9. The method according to claim 1, wherein The step of obtaining the account feature vectors of each candidate account based on the historical operation object sequences corresponding to each candidate account and at least one operation object attribute sequence corresponding to each historical operation object sequence includes: Constructing a plurality of triples based on the candidate accounts; wherein the first candidate account and the second candidate account included in each triple are similar accounts, and the first candidate account and the third candidate account included in each triple are dissimilar accounts; Iteratively training the feature learning model based on the multiple triples. During one iterative training process, the following operations are performed: using an encoder included in the feature learning model to perform feature encoding based on each of the historical operation object sequences and at least one operation object attribute sequence corresponding to each of the historical operation object sequences to obtain an account feature vector for each candidate account; For each triple in the plurality of triplets, the following steps are performed respectively: for one triple, a first similarity between an account feature vector of a first candidate account and an account feature vector of a second candidate account is obtained, and a second similarity between the account feature vector of the first candidate account and an account feature vector of a third candidate account is obtained, and a triple loss value for the one triple is obtained based on the first similarity and the second similarity, where the triple loss value is used to represent a degree of difference between the first similarity and the second similarity; Update the encoder based on the obtained triplet loss values corresponding to the respective triples; When the feature learning model converges, each account feature vector obtained by feature encoding based on the encoder during the last iterative training is determined as the account feature vector of each candidate account.
10. The method according to any one of claims 1 to 9, wherein: Based on the historical operation object sequence of the at least one similar account, a plurality of candidate recommendation objects are obtained, including: For each operation object included in the historical operation object sequence of the at least one similar account, the following operations are performed respectively: for one operation object among the respective operation objects, based on the time difference between the release time of the operation object and the current time, and the relative popularity value of the operation object, an object weight value of the operation object is obtained; wherein the object weight value is negatively correlated with the time difference and positively correlated with the relative popularity value, the relative popularity value is used to represent the degree of the number of interactive operations of the operation object relative to the number of interactive operations of other operation objects, and the relative popularity value is positively correlated with the number of interactive operations; Based on the obtained object weight values of the various operation objects, an operation object whose object weight value meets the set requirements is determined from the various operation objects as a candidate recommendation object.
11. An object recommendation device, characterized in that: include: a feature vector acquisition unit, configured to obtain an account feature vector for each candidate account based on a historical operation object sequence corresponding to each candidate account and at least one operation object attribute sequence corresponding to each historical operation object sequence; wherein each operation object attribute sequence is composed of similar attributes of each historical operation object in the corresponding historical operation object sequence; a similar account determination unit configured to obtain, based on the obtained account feature vectors of each candidate account, the similarity between each pair of candidate accounts; select, based on the similarity between each pair of candidate accounts, at least one similar account corresponding to each candidate account, and store the corresponding relationship between each candidate account and the at least one similar account; and determine, based on the stored corresponding relationship, at least one similar account of a target account to be recommended from the candidate accounts, each similar account being a candidate account whose similarity to the target account meets a set requirement; The recommendation object determination unit is used to obtain multiple candidate recommendation objects based on the historical operation object sequence of the at least one similar account; and determine the target recommendation object of the target account from the multiple candidate recommendation objects.
12. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 10 are implemented.
13. A computer storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the steps of the method according to any one of claims 1 to 10 are implemented.
Citation Information
Patent Citations
Recommended information pushing method and device
CN106503022A
Content recommendation method and computing equipment
CN110532473A