Content recommendation method and device, equipment, medium and program product
By integrating the characteristics of historical interactive data and candidate content, the problem of low correlation of recall results caused by overlapping interests in multiple fields of users is solved, and more efficient content recommendation and resource utilization are achieved.
Patent Information
- Application Number
- CN202410166375.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-05
- Publication Date
- 2025-08-05
AI Technical Summary
In the face of overlapping interests of users in multiple fields, the existing recommendation system has low correlation with user interest, resulting in waste of computing resources and inefficient efficiency.
By performing feature fusion processing on the interest feature representation of historical interactive data and the content feature representation of candidate content, the feature representation after the fusion process contains feature information of different interest fields, improving the distinction and correlation of the recall results.
It improves the correlation between recommended content and user interests, reduces waste of computing resources, and improves user interaction probability and computing resource utilization rate.
Smart Images

Figure CN120430845A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of artificial intelligence, and in particular to a content recommendation method, apparatus, device, medium, and program product. Background Art
[0002] With the development of the digital age, platforms such as video platforms and e-commerce platforms are increasingly loaded with content. Users often face information overload when searching for content of interest on these platforms. To address this issue, recommendation systems have emerged. These systems aim to filter candidate sets relevant to users' interests from this vast amount of content, thereby providing personalized recommendations.
[0003] In related technologies, taking e-commerce platforms as an example, the recommendation system will perform feature extraction based on the user's historical interaction data (for example, clicks, browsing, purchases, etc.) to obtain multiple user vectors; then, the multiple user vectors will be aggregated to obtain multiple interest vectors, which represent the user's interest in products in different fields (for example, clothing, electronic products, etc.); finally, the recommendation system will recall products in different fields from the product dataset based on the multiple interest vectors and recommend them to the user.
[0004] However, a user's interests may overlap in multiple areas. For example, a user may be interested in both clothing and electronic products. In this case, the multiple interest vectors corresponding to the user have a high similarity, resulting in close recall results corresponding to the multiple interest vectors, and a low correlation between the recall results and the user's interests. Summary of the Invention
[0005] The present application provides a content recommendation method, apparatus, device, medium, and program product, which can improve the correlation between recall results and user interests. The technical solution is as follows:
[0006] In one aspect, a content recommendation method is provided, the method comprising:
[0007] Feature extraction is performed on the historical interaction data to obtain N interest feature representations; the historical interaction data is used to represent interaction events between the target account and at least one content within a historical time period, the i-th interest feature representation corresponds to the i-th interest area, where N is an integer greater than 1, i≤N, and i is a positive integer;
[0008] Based on N domain feature representations, feature fusion processing is performed on the N interest feature representations to obtain N first feature representations, and the i-th interest feature representation is fused with the i-th domain feature representation to obtain the i-th first feature representation, and the i-th domain feature representation corresponds to the i-th interest domain;
[0009] Perform feature extraction on each of M candidate contents belonging to N areas of interest to obtain M content feature representations, where M is an integer greater than 1;
[0010] Based on the N domain feature representations, feature fusion processing is performed on the M content feature representations to obtain M second feature representations; when the jth content feature representation belongs to the i-th field of interest, the jth content feature representation is fused with the i-th domain feature representation to obtain the j-th second feature representation, where j≤M and j is a positive integer;
[0011] Based on the N first feature representations and the M second feature representations, recommendation results corresponding to the M candidate contents in the N interest areas are determined when recommending content to the target account.
[0012] In another aspect, a content recommendation device is provided, the device comprising:
[0013] a feature extraction module configured to extract features from the historical interaction data to obtain N interest feature representations; the historical interaction data is used to represent interaction events between the target account and at least one content within a historical time period, wherein the i-th interest feature representation corresponds to the i-th interest area, where N is an integer greater than 1, i≤N, and i is a positive integer;
[0014] A feature fusion module is configured to perform feature fusion processing on the N interest feature representations based on the N domain feature representations to obtain N first feature representations, wherein the i-th interest feature representation is fused with the i-th domain feature representation to obtain the i-th first feature representation, and the i-th domain feature representation corresponds to the i-th domain of interest;
[0015] The feature extraction module is used to extract features from M candidate contents belonging to N areas of interest respectively to obtain M content feature representations, where M is an integer greater than 1;
[0016] The feature fusion module is configured to perform feature fusion processing on the M content feature representations based on the N domain feature representations to obtain M second feature representations; when the jth content feature representation belongs to the i-th field of interest, the jth content feature representation is fused with the i-th domain feature representation to obtain the j-th second feature representation, where j≤M and j is a positive integer;
[0017] The content determination module is configured to determine, based on the N first feature representations and the M second feature representations, recommendation results corresponding to the M candidate contents in the N interest areas when recommending content to the target account.
[0018] On the other hand, a computer device is provided, comprising a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set, or an instruction set, and the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by the processor to implement any of the above-mentioned content recommendation methods.
[0019] On the other hand, a computer-readable storage medium is provided, wherein the storage medium stores at least one instruction, at least one program, code set or instruction set, and the at least one instruction, the at least one program, the code set or instruction set is loaded and executed by a processor to implement any of the above-mentioned content recommendation methods.
[0020] In another aspect, a computer program product or computer program is provided, 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 any of the aforementioned content recommendation methods.
[0021] The beneficial effects of the technical solutions provided in the embodiments of the present application include at least:
[0022] Feature fusion processing is performed on the multiple interest feature representations corresponding to the target account's historical interaction data, so that the interest feature representations are integrated with the domain feature representations of the corresponding interest fields. Then, feature fusion processing is performed on the content feature representations corresponding to the multiple candidate contents, so that the content feature representations are integrated with the domain feature representations corresponding to the interest fields to which the candidate contents belong. Finally, based on the fused interest feature representations and content feature representations, recommended content in multiple interest fields is determined from the multiple candidate contents to be displayed to the target account. On the one hand, the multiple fused interest feature representations contain feature information from different interest fields, that is, the discrimination between the multiple fused interest feature representations is improved, thereby improving the discrimination between the recommended content recalled from multiple interest fields. On the other hand, because the same domain feature representation is fused, the feature correlation between the interest feature representation and the content feature representation corresponding to the same interest field increases after the fusion processing, which increases the probability that the feature representation of a specified interest field will recall candidate content belonging to the specified interest field, thereby improving the relevance between the recalled recommended content and the corresponding user interests.
[0023] In addition, the increased correlation between recommended content and user interests can also increase the probability of users interacting with recommended content (for example, clicking, playing, etc.), avoiding the waste of computer resources and improving the utilization of computer computing resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following is a brief introduction to the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field of interest, other drawings can be obtained based on these drawings without any creative work.
[0025] Figure 1 This is a schematic diagram of an implementation environment provided by an exemplary embodiment of the present application;
[0026] Figure 2 is a flowchart of a content recommendation method provided by an exemplary embodiment of the present application;
[0027] Figure 3 is a flowchart of a content recommendation method provided by another exemplary embodiment of the present application;
[0028] Figure 4 is a schematic diagram of a transformation operation provided by an exemplary embodiment of the present application;
[0029] Figure 5 is a flowchart of a content recommendation method provided by another exemplary embodiment of the present application;
[0030] Figure 6 This is a schematic diagram of the structure of a multi-interest recall model provided by an exemplary embodiment of the present application;
[0031] Figure 7 is a flowchart of a content recommendation method provided by another exemplary embodiment of the present application;
[0032] Figure 8 This is a schematic diagram of a selected page of a video playback platform provided by an exemplary embodiment of the present application;
[0033] Figure 9 is a structural block diagram of a content recommendation device provided by an exemplary embodiment of the present application;
[0034] Figure 10 is a structural block diagram of a content recommendation device provided by another exemplary embodiment of the present application;
[0035] Figure 11 It is a structural block diagram of a computer device provided by an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0036] To make the objectives, technical solutions, and advantages of this application more clear, the following will further describe the embodiments of this application in detail with reference to the accompanying drawings. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making any creative efforts are within the scope of protection of this application.
[0037] In this application, the terms "first", "second", etc. are used to distinguish identical or similar items with substantially the same effects and functions. It should be understood that there is no logical or temporal dependency between "first" and "second", nor is there any limitation on the quantity and execution order.
[0038] First, a brief introduction is given to the terms involved in the embodiments of this application.
[0039] 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 a manner similar to human intelligence. AI also studies the design principles and implementation methods of various intelligent machines, enabling them to possess the capabilities of perception, reasoning, and decision-making.
[0040] Artificial intelligence (AI) technology is a comprehensive discipline encompassing a wide range of fields, encompassing both hardware and software technologies. Foundational AI technologies generally include sensors, specialized AI chips, cloud computing, distributed storage, big data processing, pre-trained models, operating / interaction systems, and mechatronics. Pre-trained models, also known as large models or basic models, can be fine-tuned and widely applied to downstream tasks across various AI disciplines. AI software technologies primarily encompass computer vision, speech processing, natural language processing, and machine learning / deep learning.
[0041] Machine Learning (ML) 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. 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, inductive learning, and learning through demonstration.
[0042] In related technologies, using e-commerce platforms as an example, a recommendation system extracts features based on historical user interaction data to generate multiple user vectors. These vectors are then aggregated to generate multiple interest vectors, which represent the user's interest in products in different product categories. Finally, the recommendation system uses these interest vectors to retrieve products from a product dataset across different product categories and recommends them to the user. However, a user's interests may overlap across multiple categories. For example, a user may be interested in both clothing and electronics. In this case, the multiple interest vectors corresponding to the user have a high degree of similarity, resulting in similar recall results for the multiple interest vectors and a low correlation between the recall results and the user's interests.
[0043] An embodiment of the present application provides a content recommendation method, which performs feature fusion processing on the interest feature representation corresponding to the historical interaction data and the content feature representation corresponding to the candidate content. On the one hand, the multiple interest feature representations after the fusion processing respectively contain feature information of different interest fields, that is, the discrimination between the multiple interest feature representations after the fusion processing is improved, thereby improving the discrimination between the recommended contents recalled under multiple interest fields; on the other hand, since the same field feature representation is fused, the feature correlation between the interest feature representation and the content feature representation corresponding to the same interest field increases after the fusion processing, which increases the probability that the feature representation of the specified interest field recalls the candidate content belonging to the specified interest field, thereby improving the correlation between the recalled recommended content and the corresponding user interests.
[0044] The content recommendation method provided in this application can be applied to at least one of a variety of scenarios, including music recommendation, news recommendation, video recommendation, and e-commerce recommendation. It is worth noting that the above application scenarios are merely illustrative examples, and the content recommendation method provided in this embodiment can also be applied to other scenarios, which are not limited in this embodiment.
[0045] Next, the implementation environment involved in the embodiments of the present application is described.
[0046] The content recommendation method provided in the embodiment of the present application can be implemented by a terminal alone, or by a server, or by a terminal and a server through data interaction, which is not limited in the embodiment of the present application. Optionally, the content recommendation method is described by taking the interaction between a terminal and a server as an example.
[0047] For illustration, please refer to Figure 1 The implementation environment involves a terminal 110 and a server 120, and the terminal 110 and the server 120 are connected via a communication network 130. The communication network 130 can be implemented as a wired network or a wireless network, which is not limited in the present embodiment.
[0048] In some embodiments, an application with a content recommendation function is installed in the terminal 110. The application can be implemented as an instant messaging application, a video application, a news information application, a comprehensive search engine application, a social application, a game application, a shopping application, a map navigation application, etc., which is not limited in the embodiments of the present application.
[0049] Optionally, the server 120 is used to provide background computing services for applications with content recommendation functions. Schematically, a target account is logged into the application installed and running in the terminal 110, and the server 120 is used to determine the recommended content to be displayed to the target account. Figure 1 The following briefly introduces the steps for the server 120 to determine the recommended content.
[0050] Step 1: The server 120 obtains the historical interaction data 121 and the candidate content set 122 corresponding to the target account.
[0051] The historical interaction data is used to represent the interaction events between the target account and at least one content in the target account within a historical time period. For example, if the application is a video playback platform, the historical interaction data includes the event that the target account watched "TV Series 1".
[0052] The candidate content set includes multiple candidate contents, which are contents provided by the application, such as TV series, movies, variety shows, documentaries, etc. launched on the video playback platform.
[0053] Step 2: The server 120 performs feature extraction on the historical interaction data 121 to obtain a plurality of interest vectors 123 ; and performs feature extraction on the candidate content set 122 to obtain a plurality of content vectors 124 .
[0054] The server 120 stores a content recommendation model, which extracts features from historical interaction data to obtain multiple interest vectors that can represent the interests of the target account in multiple fields, for example: interest vector 1 representing the user's interest in TV series, and interest vector 2 representing the user's interest in movies.
[0055] Furthermore, feature extraction is performed on multiple candidate contents in the candidate content set through a content recommendation model to obtain content vectors corresponding to the multiple candidate contents.
[0056] Step 3: Based on multiple domain vectors 125, feature fusion processing is performed on multiple interest vectors 123 respectively to obtain first vectors 126 corresponding to the multiple interest vectors; and feature fusion processing is performed on multiple content vectors 124 respectively to obtain second vectors 127 corresponding to the multiple content vectors.
[0057] Through the content recommendation model, based on multiple domain vectors, feature fusion processing is performed on multiple interest vectors respectively. For example, interest vector 1 is fused with domain vector 1 corresponding to interest domain a to obtain first vector 1, and interest vector 2 is fused with domain vector 2 corresponding to interest domain b to obtain first vector 2.
[0058] In addition, the content recommendation model is based on multiple domain vectors and feature fusion processing is performed on multiple content vectors respectively. For example, if content vector 1 and content vector 3 belong to interest domain a, then content vector 1 and content vector 3 are respectively fused with domain vector 1 to obtain second vector 1 and second vector 3; if content vector 2 and content vector 4 belong to interest domain b, then content vector 2 and content vector 4 are respectively fused with domain vector 2 to obtain second vector 2 and second vector 4.
[0059] Step 4: Based on the multiple first vectors 126 and the multiple second vectors 127 , determine recommendation results 128 corresponding to the multiple interest areas of the candidate content set 122 when recommending content to the target account.
[0060] The content recommendation model determines the degree of match between the first vector 1 and the second vectors 1 to 4, thereby determining the recommended content for the target account in the TV series category from the candidate content set. Since the first vector 1 and the second vectors 1 and 3 are fused with the same domain vector a, the degree of match between the first vector 1 and the second vectors 1 and 3 is high, which means that the recommended content corresponding to the second vectors 1 and 3 is more likely to be recalled.
[0061] The content recommendation model determines the degree of match between first vector 2 and second vectors 1 to 4, thereby determining the recommended content for the target account in the movie category from the candidate content set. Since first vector 2 and second vectors 2 and 4 are fused with the same domain vector b, the degree of match between first vector 2 and second vectors 2 and 4 is high, meaning that the recommended content corresponding to second vectors 2 and 4 is more likely to be recalled.
[0062] Optionally, after determining multiple recommendation results, the server 120 sends the multiple recommendation results to the terminal 110. Optionally, the terminal 110 displays the multiple recommendation results in an application logged in by the target account.
[0063] It is worth noting that the terminal 110 includes but is not limited to mobile terminals such as mobile phones, tablet computers, portable laptop computers, intelligent voice interaction devices, smart home appliances, and vehicle-mounted terminals, and may also be implemented as desktop computers, etc. The server 120 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or 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 (Content Delivery Network), and big data and artificial intelligence platforms.
[0064] Cloud technology refers to a hosting technology that unifies hardware, software, and network resources within a wide area network (WAN) or local area network (LAN) to enable data computing, storage, processing, and sharing. Cloud technology is a general term for network, information technology, integration technology, management platform technology, and application technology, all based on the cloud computing business model. It can form a resource pool for on-demand, flexible, and convenient use. Cloud computing technology will become a crucial support. Backend services in technical network systems, such as those for video websites, image websites, and more portals, require significant computing and storage resources. With the rapid development and application of the internet industry, each piece of content will likely have its own unique identity and will need to be transmitted to backend systems for logical processing. Data of varying levels will be processed separately, and data from various industries will require robust system support, which can only be achieved through cloud computing. Alternatively, server 120 can also be implemented as a node in a blockchain system.
[0065] It should be noted that before collecting relevant user data (for example, historical interaction data, etc.) and during the process of collecting relevant user data, this application can display a prompt interface, pop-up window or output voice prompt information. The prompt interface, pop-up window or voice prompt information is used to remind the user that its relevant data is currently being collected, so that this application only starts to execute the relevant steps of obtaining user-related data after obtaining the user's confirmation operation on the prompt interface or pop-up window. Otherwise (that is, when the user's confirmation operation on the prompt interface or pop-up window is not obtained), the relevant steps of obtaining user-related data are terminated, that is, the user's relevant data is not obtained. In other words, all user data collected by this application are collected with the user's consent and authorization, and the collection, use and processing of relevant user data need to comply with relevant laws, regulations and standards.
[0066] Next, the content recommendation method provided by this application is described.
[0067] Figure 2 This is a flowchart of a content recommendation method provided by an embodiment of the present application, in which the method is applied to Figure 1Taking the server shown as an example, the method is as follows: steps 210 to 250.
[0068] Step 210: extract features from the historical interaction data to obtain N interest feature representations.
[0069] Optionally, historical interaction data refers to data generated in a target application, which may be an instant messaging application, a video application, a news application, a comprehensive search engine application, a social application, a game application, a shopping application, a map navigation application, etc., and is not limited in this embodiment of the present application.
[0070] Illustratively, a target account is logged into the target application, and the historical interaction data is the data generated when the target account uses the target application.
[0071] The historical interaction data is used to represent interaction events between the target account and at least one content within a historical time period.
[0072] Optionally, the at least one content indicated by the historical interaction data is content provided by the target application. Illustratively, the at least one content may be news content, music, video content, blog content, novel content, physical product, virtual product, etc.
[0073] Optionally, the data type corresponding to the at least one content includes at least one of a text type, a video type, an audio type, a picture type, etc. This embodiment of the present application does not limit this.
[0074] Optionally, the historical interaction data includes at least one of the following data:
[0075] 1. Content identification.
[0076] The content identifier refers to the unique identifier of the content with which the target account interacts, such as a product ID (Identity Document, identification number), a video content ID, etc.
[0077] 2. Interaction event type.
[0078] Optionally, different types of content correspond to different types of interactive events. For example, if the target application is a video playback platform, interactive event types include viewing, liking, favorites, comments, sharing, reporting, channel subscriptions, and downloads. For example, if the target application is an e-commerce platform, interactive event types include clicks, browsing, favorites, and purchases.
[0079] 3. Target account ID.
[0080] The target account identifier refers to the unique identifier of the target account, such as the account ID.
[0081] 4. Timestamp.
[0082] A timestamp refers to the time point when the target account interacts with the content. Adding timestamps to historical interaction data helps us understand the timing of interaction events performed by the target account.
[0083] Among them, the i-th interest feature represents the content corresponding to the i-th interest field, N is an integer greater than 1, i≤N and i is a positive integer.
[0084] Illustratively, interest feature representations are used to characterize an account's interests in different areas. The interest areas in the interest feature representation are used to represent content classification types. For example, if a video is categorized by category, the interest areas include TV series, movies, and variety shows; if a video is categorized by content, the interest areas include science fiction, documentary, and romance; and if a video is categorized by length, the interest areas include short videos and long videos. The present embodiment does not limit the specific content of the interest areas.
[0085] In some embodiments, the historical interaction data includes multiple historical interaction sequences, each of which represents an interaction event between a target account and one or more content items. For example, a historical interaction sequence may be implemented as "Account a watched TV series 100 at 19:45:00 on 2024-01-03."
[0086] Optionally, feature extraction is performed on multiple historical interaction sequences respectively to obtain sequence feature representations corresponding to the multiple historical interaction sequences respectively; and multi-interest field feature analysis is performed on the multiple sequence feature representations to obtain multiple interest feature representations.
[0087] In step 220 , based on the N domain feature representations, feature fusion processing is performed on the N interest feature representations to obtain N first feature representations.
[0088] Among them, the i-th interest feature representation and the i-th domain feature representation are fused to obtain the i-th first feature representation, and the i-th domain feature representation corresponds to the i-th interest field.
[0089] Schematically, the domain feature representation is used to describe the corresponding domain information, the i-th domain feature representation is used to describe the i-th interest domain information, and if the N interest domains are different, then the N domain feature representations are different.
[0090] Optionally, the method for performing feature fusion processing includes at least one of the following methods:
[0091] Method 1: Feature stitching.
[0092] Among them, the i-th interest feature representation and the i-th domain feature representation are spliced together to obtain the i-th first feature representation.
[0093] Schematically, N interest feature representations are respectively spliced with a field feature representation corresponding to the interest field. For example, interest feature representation 1 indicating interest field a is spliced with a feature representation corresponding to interest field a to obtain first feature representation 1; interest feature representation 2 indicating interest field b is spliced with a feature representation corresponding to interest field b to obtain first feature representation 2.
[0094] By combining the feature representation of interest with the domain feature representation of the corresponding interest domain, the distinction between feature representations of different interest domains is improved. Able to retain the original interest feature representation details This improves the relevance between the recalled recommendation results and interests.
[0095] Method 2: Feature addition.
[0096] Among them, the i-th interest feature representation and the i-th domain feature representation are added to obtain the i-th first feature representation.
[0097] Schematically, N interest feature representations are respectively added to a field feature representation of a corresponding interest field, such as adding interest feature representation 1 indicating interest field a to the feature representation corresponding to interest field a to obtain first feature representation 1; adding interest feature representation 2 indicating interest field b to the feature representation corresponding to interest field b to obtain first feature representation 2.
[0098] By combining the feature representation of interest with the domain feature representation of the corresponding interest domain, the distinction between feature representations of different interest domains is improved. Since feature addition does not increase feature dimension The input model features are relatively simple, which improves the model's processing efficiency for features.
[0099] Method 3: Feature multiplication.
[0100] Among them, the i-th interest feature representation is multiplied by the i-th domain feature representation to obtain the i-th first feature representation.
[0101] Schematically, N interest feature representations are multiplied with a field feature representation of a corresponding interest field respectively, such as multiplying the interest feature representation 1 indicating interest field a with the feature representation corresponding to interest field a to obtain the first feature representation 1; multiplying the interest feature representation 2 indicating interest field b with the feature representation corresponding to interest field b to obtain the first feature representation 2.
[0102] By multiplying the features, the interest feature representation is integrated with the domain feature representation of the corresponding interest field, which improves the discrimination between the feature representations of different interest fields. The feature multiplication method can make the feature of interest represent The full interaction between the feature representation and the domain feature representation further increases the differences between the representations of different interest features.
[0103] It should be noted that the above examples of feature fusion processing methods are only illustrative and are not limited to these in the embodiments of the present application.
[0104] Step 230 : extract features from the M candidate contents belonging to the N areas of interest to obtain M content feature representations.
[0105] M is an integer greater than 1.
[0106] Optionally, the M candidate contents provide the target application with contents belonging to N areas of interest.
[0107] In some embodiments, the M candidate contents refer to contents in a preset content set belonging to N areas of interest provided by the target application.
[0108] Optionally, the preset content set refers to the displayable content belonging to N areas of interest provided by the target application. For example: the video platform is currently broadcasting 10,000 video works, including TV series, movies, variety shows, etc., then the M candidate content is the video works among the 10,000 video works. Alternatively, the preset content set refers to the content obtained by screening the displayable content belonging to N areas of interest provided by the target application based on the search content of the target account. For example: the search term of the target account is "2023", then the M candidate content refers to the video works launched on the video platform in 2023.
[0109] Optionally, before determining the recommended content to be displayed to the target account, it is necessary to go through the recall, rough ranking, and fine ranking stages. For example, in the recall stage, a portion of candidate content is screened from a massive content library (e.g., the aforementioned preset content set) to form a rough ranking candidate content queue, which then enters the rough ranking stage. In the rough ranking stage, a portion of higher-quality candidate content is further screened from the rough ranking candidate content queue to form a fine ranking candidate content queue, which then enters the fine ranking stage. In the fine ranking stage, the fine ranking candidate content queue is further screened to determine the recommended content that is ultimately displayed to the first account.
[0110] Optionally, the M candidate contents are candidate contents in a preset content set; or, the M candidate contents are candidate contents in a coarse-ranked candidate content queue; or, the M candidate contents are candidate contents in a fine-ranked candidate content queue. This embodiment of the present application does not limit this.
[0111] Optionally, the content recommendation model further includes a second feature extraction layer, which performs feature extraction on the M candidate contents respectively to obtain content feature representations corresponding to the M candidate contents respectively.
[0112] Illustratively, the second feature extraction layer can be implemented as an RNN-based network layer, a CNN-based network layer, an attention mechanism-based network layer, etc. The second feature extraction layer can extract feature representations corresponding to the candidate content, such as semantic features of the candidate content. This embodiment of the present application is not limited to this.
[0113] In step 240 , based on the N domain feature representations, feature fusion processing is performed on the M content feature representations to obtain M second feature representations.
[0114] Among them, when the jth content feature representation belongs to the i-th interest field, the jth content feature representation is fused with the i-th field feature representation to obtain the j-th second feature representation, j≤M and j is a positive integer.
[0115] In some embodiments, the method for performing feature fusion processing is implemented as feature splicing.
[0116] Optionally, when the jth content feature representation belongs to the i-th field of interest, the jth content feature representation is concatenated with the i-th field feature representation to obtain the j-th second feature representation.
[0117] Schematically, assuming that there are candidate contents 1 and 2 belonging to the field of interest a, corresponding to content feature representation 1 and content feature representation 2 respectively; and candidate contents 3 and 4 belonging to the field of interest b, corresponding to content feature representation 3 and content feature representation 4 respectively, then the content feature representation 1 and the content feature representation 2 are respectively spliced with a feature representation corresponding to the field of interest a to obtain the second feature representation 1 and the second feature representation 2; the content feature representation 3 and the content feature representation 4 are respectively spliced with a feature representation corresponding to the field of interest b to obtain the second feature representation 3 and the second feature representation 4.
[0118] In other embodiments, the method for performing feature fusion processing is implemented as feature addition.
[0119] Optionally, when the jth content feature representation belongs to the i-th field of interest, the jth content feature representation is added to the i-th field feature representation to obtain the j-th second feature representation.
[0120] Schematically, content feature representation 1 and content feature representation 2 are respectively added to the feature representation corresponding to interest field a to obtain second feature representation 1 and second feature representation 2; content feature representation 3 and content feature representation 4 are respectively added to the feature representation corresponding to interest field b to obtain second feature representation 3 and second feature representation 4.
[0121] In other embodiments, the method for performing feature fusion processing is implemented as feature multiplication.
[0122] Optionally, when the j-th content feature representation belongs to the i-th field of interest, the j-th content feature representation is multiplied by the i-th field feature representation to obtain the j-th second feature representation.
[0123] Schematically, content feature representation 1 and content feature representation 2 are respectively multiplied by the feature representation corresponding to interest field a to obtain second feature representation 1 and second feature representation 2; content feature representation 3 and content feature representation 4 are respectively multiplied by the feature representation corresponding to interest field b to obtain second feature representation 3 and second feature representation 4.
[0124] Step 250 : Determine, based on the N first feature representations and the M second feature representations, recommendation results corresponding to the M candidate contents in the N interest areas when recommending content to the target account.
[0125] Optionally, based on the similarity between the i-th first feature representation and the M second feature representations, the recommendation scores corresponding to the M candidate contents are determined; and the candidate content whose recommendation score meets the preset score requirements is selected from the M candidate content as the recommendation result for the i-th interest area.
[0126] Optionally, W candidate contents with the highest recommendation scores are selected from the M candidate contents as the recommendation results for the i-th interest area, where W is a positive integer. Alternatively, recommended contents with recommendation scores greater than or equal to a preset score are selected from the M candidate contents as the recommendation results for the i-th interest area.
[0127] Schematically, through the above steps, the first feature representation 1 and the first feature representation 2 for determining the recommended content are obtained, and the recommendation scores corresponding to the recommended content 1 to the recommended content 4 are determined based on these two feature representations. The first feature representation 1 is used as an example for explanation:
[0128] Calculate the similarity between the first feature representation 1 and the second feature representations 1 to 4 respectively. The higher the similarity, the higher the recommendation score of the corresponding recommended content. Select the recommended content with the highest recommendation score as the recommendation result for the target account in the interest field a; or select the recommended content with a recommendation score greater than or equal to the preset score as the recommendation result for the target account in the interest field a.
[0129] Similarly, based on the first feature representation 2, the recommendation results of the target account in the interest field b can be obtained, and finally the recommendation results of the target account in the interest fields a and b are sent to the terminal where the target account is logged in.
[0130] By calculating the similarity between the first feature representation of the specified interest field and multiple second feature representations, the recommendation scores of multiple candidate contents are determined, and then the recommended content of the specified interest field displayed to the target account is accurately recalled from the multiple candidate contents based on the recommendation scores. Especially when the multiple interest feature representations corresponding to the target account are relatively close, By integrating the indication information related to the interest domain into the interest feature representation and content feature representation, the The similarity between the interest feature representation and the content feature representation belonging to the same interest field makes the final recalled recommendation content The interest field to which the content belongs is more relevant to the corresponding interest feature representation, which improves the accuracy of the recall results.
[0131] The following is a brief reasoning about the conclusion that "integrating interest domain-related indicator information into interest feature representations and content feature representations can improve the similarity between interest feature representations and content feature representations belonging to the same interest domain." This is illustrated using the feature splicing method as an example of a feature fusion method.
[0132] The above-mentioned first feature representation 1 includes two parts: interest feature representation 1 and the domain feature representation corresponding to interest field a; the above-mentioned first feature representation 2 includes two parts: interest feature representation 2 and the domain feature representation corresponding to interest field b; the above-mentioned second feature representation 1 includes two parts: content feature representation 1 and the domain feature representation corresponding to interest field a.
[0133] When interest feature representation 1 and interest feature representation 2 are relatively similar, if the domain feature representation is not added, then the similarity calculated between the first feature representation 1 and the second feature representation 1 may be approximately equal to the similarity between the first feature representation 2 and the second feature representation 1. That is, the probability of recalling the second feature representation 1 based on the first feature representation 1 and the first feature representation 2 is basically the same, which may result in recalling the same candidate content in different interest fields.
[0134] If the domain feature representation is added, the similarity between the first feature representation 1 and the second feature representation 1 is calculated as follows: the similarity between the interest feature representation 1 and the second feature representation 1 + the similarity between the feature representations of the same domain (higher), which is obviously greater than the similarity between the first feature representation 2 and the second feature representation 1 = the similarity between the interest feature representation 2 and the second feature representation 1 + the similarity between the feature representations of different domains (lower). In other words, the probability of recalling the second feature representation 1 based on the first feature representation 1 is higher, and conversely, the probability of recalling the second feature representation 1 based on the first feature representation 2 is lower. In other words, integrating the indication information related to the interest field into the interest feature representation and the content feature representation can increase the similarity between the interest feature representation and the content feature representation belonging to the same interest field, thereby increasing the probability that the interest feature representation of a specified interest field recalls the candidate content of the specified field.
[0135] In some embodiments, the M second feature representations include an i-th second feature representation and an h-th second feature representation, where i≤N and i is a positive integer, and i and h are different.
[0136] Optionally, determine the target similarity between the i-th interest feature representation and the h-th interest feature representation; when the target similarity is greater than or equal to a preset similarity threshold, determine the enhancement coefficient of the i-th domain feature representation, and determine the attenuation coefficient of the h-th domain feature representation; when the j-th content feature representation belongs to the i-th interest field, calculate the first similarity between the j-th first feature representation and the i-th first feature representation based on the enhancement coefficient, and obtain the recommendation score of the j-th candidate content, and the enhancement coefficient is positively correlated with the first similarity; when the j-th content feature representation belongs to the h-th interest field, calculate the second similarity between the j-th first feature representation and the i-th first feature representation based on the attenuation coefficient, and obtain the recommendation score of the j-th candidate content, and the attenuation coefficient is negatively correlated with the second similarity.
[0137] Schematically, the similarity threshold is preset to a higher value, for example: 90% to 99%. When the interest feature representation 1 and the interest feature representation 2 are very similar, when calculating the similarity between the first feature representation 1 and the second feature representation 1, an enhancement coefficient can be multiplied, thereby increasing the similarity between the first feature representation 1 (interest field a) and the second feature representation 1 (interest field a); when calculating the similarity between the first feature representation 1 (interest field a) and the second feature representation 3 (interest field b), an attenuation coefficient can be multiplied, thereby reducing the similarity between the first feature representation 1 and the second feature representation 3.
[0138] When the similarity between two interest features is very high, adding domain information still cannot completely avoid the situation where the same candidate content is recalled in different interest domains. In the above embodiment, when calculating the similarity, by adjusting the enhancement coefficient and the attenuation coefficient, It can avoid recalling the same candidate content in different interest areas to the greatest extent, and further Improve the relevance between recall results and interests.
[0139] In summary, the content recommendation method provided by the embodiment of the present application, on the one hand, the multiple interest feature representations after fusion processing respectively contain feature information of different interest fields, that is, the discrimination between the multiple interest feature representations after fusion processing is improved, thereby improving the discrimination between the recommended content recalled under multiple interest fields; on the other hand, due to the fusion of the same field feature representation, the feature correlation between the interest feature representation and the content feature representation corresponding to the same interest field increases after fusion processing, so that the probability of the feature representation of the specified interest field recalling the candidate content belonging to the specified interest field is increased, thereby improving the correlation between the recalled recommended content and the corresponding user interest. In addition, the improved correlation between the recommended content and the user's interest can also increase the probability of the user interacting with the recommended content (for example: clicking, playing, etc.), avoiding the waste of computer resources and improving the utilization rate of computer computing resources.
[0140] In some embodiments, the feature fusion process is implemented as feature splicing as an example for illustration, schematically, as shown in FIG. Figure 3 As shown above Figure 2 The illustrated embodiment may also be implemented as steps 310 to 350 .
[0141] Step 310: extract features from the historical interaction data to obtain N interest feature representations.
[0142] Among them, historical interaction data is used to represent the interaction events between the target account and at least one content within a historical time period. The i-th interest feature represents the corresponding i-th interest field, N is an integer greater than 1, i≤N and i is a positive integer.
[0143] In some embodiments, the content recommendation model includes a first embedding layer and a first feature extraction layer.
[0144] Optionally, the historical interaction data includes multiple historical interaction sequences, each of which is an interaction event between a target account and a content; the first embedding layer performs feature extraction on the multiple historical interaction sequences respectively to obtain sequence feature representations corresponding to the multiple historical interaction sequences; the first feature extraction layer performs feature analysis on the multiple sequence feature representations to obtain N interest feature representations.
[0145] Step 321 : Perform feature conversion processing on the N interest feature representations respectively to obtain N converted interest feature representations.
[0146] Among them, the feature scales represented by the N converted interest features are the same.
[0147] Schematically, the feature scales corresponding to the N interest feature representations may be different. In order to better compare, analyze and process, the N interest feature representations are converted to a unified scale through feature conversion processing.
[0148] Optionally, the feature conversion process includes at least one of the following processing methods:
[0149] 1. Normalization processing.
[0150] Schematically, normalization is used to scale the individual feature values represented by the feature of interest to a specific range, for example, normalizing the feature values to intervals such as [0, 1] or [-1, 1], so that the values of different features are comparable.
[0151] 2. Standardized processing.
[0152] Illustratively, the normalization process is used to normalize the data based on the mean and standard deviation of each eigenvalue represented by the feature of interest. After the process, each eigenvalue conforms to the standard normal distribution, that is, the mean is 0 and the standard deviation is 1.
[0153] 3. Standardization of decimal calibration.
[0154] Schematically, the decimal scaling normalization process is used to convert the decimal places of each eigenvalue represented by the feature of interest to [-1, 1] by shifting the decimal places, where the shifted decimal places are determined by the maximum absolute value of the eigenvalue.
[0155] It should be noted that the above examples of the feature conversion processing method are only illustrative, and the embodiments of the present application do not limit this.
[0156] Step 322: Based on the N domain feature representations, feature concatenation processing is performed on the converted N interest feature representations to obtain N first feature representations.
[0157] Among them, the i-th domain feature representation corresponds to the i-th interest field, and the i-th interest feature representation and the i-th domain feature representation are concatenated to obtain the i-th first feature representation.
[0158] In some embodiments, the N domain feature representations include N pairwise orthogonal N-dimensional vector representations, wherein the vector value of the i-th dimension in the i-th N-dimensional vector representation is a first preset value, and the vector values of other dimensions in the i-th N-dimensional vector representation are second preset values.
[0159] Optionally, the N domain feature representations can be implemented as N orthogonal vector representations. Schematically, assuming N=3, the N domain feature representations can be implemented as: interest domain a-[k, 0, 0], interest domain b-[0, k, 0], and interest domain c-[0, 0, k].
[0160] The augmented vectors of the original interest feature representation are spliced by pairwise orthogonal N N-dimensional vector representations. because Due to the orthogonality of N N-dimensional vector representations, the discrimination between multiple interest feature representations is further enhanced.
[0161] For illustration, please refer to Figure 4 , which shows a schematic diagram of a transformation operation of interest feature representation, such as Figure 4 As shown, for multiple sequence feature representations {p1, p2, p3, p4, p5}, the multiple sequence feature representations {p1, p2, p3, p4, p5} are input into the first feature extraction layer 401 of the content recommendation model, and multi-interest extraction is performed on the multiple sequence feature representations {p1, p2, p3, p4, p5} through the first feature extraction layer 401 to obtain multiple interest feature representations {u1, u2, u3}, where u1 corresponds to interest field a, u2 corresponds to interest field b, and u3 corresponds to interest field c.
[0162] After obtaining the interest feature representation {u1, u2, u3}, u1, u2, u3 need to be normalized respectively to obtain the normalized interest feature representation 402, and then each normalized interest feature representation is spliced into a field feature representation 403 according to the corresponding interest field.
[0163] exist Figure 4 In , the normalized interest feature representation u1 is concatenated with the domain feature representation [k, 0, 0]; the normalized interest feature representation u2 is concatenated with the domain feature representation [0, k, 0]; and the normalized interest feature representation u3 is concatenated with the domain feature representation [0, 0, k].
[0164] Step 330 : Extract features from the M candidate contents belonging to the N areas of interest to obtain M content feature representations.
[0165] M is an integer greater than 1.
[0166] Optionally, the content recommendation model further includes a second feature extraction layer, which performs feature extraction on the M candidate contents respectively to obtain content feature representations corresponding to the M candidate contents respectively.
[0167] Step 341 : Perform feature conversion processing on the M content feature representations respectively to obtain M converted content feature representations.
[0168] The feature scales of the converted M content features are the same.
[0169] Illustratively, the M content feature representations may correspond to different feature scales. To facilitate comparison, analysis, and processing, the M content feature representations are converted to a unified scale through feature conversion. Optionally, the feature conversion process includes normalization, standardization, decimal scaling, and the like, which are not limited in this embodiment of the present application.
[0170] Step 342: Based on the N domain feature representations, feature concatenation processing is performed on the converted M content feature representations to obtain M second feature representations.
[0171] Among them, when the jth content feature representation belongs to the i-th interest field, the jth content feature representation and the i-th field feature representation are concatenated to obtain the j-th second feature representation, j≤M and j is a positive integer.
[0172] The following example illustrates the implementation of N domain feature representations as N orthogonal vector representations.
[0173] Schematically, it is assumed that N domain feature representations are implemented as: interest domain a-[k, 0, 0], interest domain b-[0, k, 0], and interest domain c-[0, 0, k].
[0174] For the content feature representations belonging to the interest field a among the M content feature representations, they are concatenated to [k, 0, 0] to obtain the second feature representation; for the content feature representations belonging to the interest field b among the M content feature representations, they are concatenated to [0, k, 0] to obtain the second feature representation; for the content feature representations belonging to the interest field c among the M content feature representations, they are concatenated to [0, 0, k] to obtain the second feature representation.
[0175] Step 350 : Determine, based on the N first feature representations and the M second feature representations, recommendation results corresponding to the M candidate contents in the N interest areas when recommending content to the target account.
[0176] Optionally, based on the similarity between the i-th first feature representation and the M second feature representations, the recommendation scores corresponding to the M candidate contents are determined; and the candidate content whose recommendation score meets the score requirements is selected from the M candidate contents as the recommendation result for the i-th interest area.
[0177] Illustratively, the calculation method of the similarity between feature representations includes at least one of dot product, cosine similarity, Euclidean distance, Manhattan distance, Chebyshev distance, etc., which is not limited in the embodiments of the present application.
[0178] Taking dot product and cosine similarity as examples, the i-th first feature representation is divided into two parts, one part is the i-th interest feature representation, and the other part is the i-th domain feature representation; the second feature representation is also divided into quantity distribution, one part is the content feature representation, and the other part is the domain feature representation.
[0179] Assuming that the jth content feature representation belongs to the i-th interest field, the specific method for calculating the similarity between the i-th first feature representation and the j-th second feature representation is: calculating the cosine similarity between the i-th interest feature representation and the j-th content feature representation, calculating the dot product between the i-th field feature representation and the i-th field feature representation, adding the cosine similarity and the dot product, and the obtained value can be used to represent the similarity between the i-th first feature representation and the j-th second feature representation.
[0180] Among them, since the i-th interest feature representation and the j-th content feature representation belong to the same interest field, the dot product between the two feature representations of the same field is calculated, and the resulting value is obviously higher (high similarity). For example: the dot product between [k, 0, 0] and [k, 0, 0] is k 2 .
[0181] Assuming that the jth content feature representation belongs to the i+1th interest field, the specific method for calculating the similarity between the i-th first feature representation and the j-th second feature representation is: calculating the cosine similarity between the i-th interest feature representation and the j-th content feature representation, calculating the dot product between the i-th field feature representation and the i+1-th field feature representation, adding the cosine similarity and the dot product, and the obtained value can be used to represent the similarity between the i-th first feature representation and the j-th second feature representation.
[0182] Among them, since the i-th interest feature representation and the j-th content feature representation belong to different interest fields, calculating the dot product between the feature representations of two different fields will result in a lower value (low similarity), for example: the dot product between [k, 0, 0] and [0, k, 0] is 0.
[0183] In summary, the content recommendation method provided in the embodiment of the present application, on the one hand, performs feature conversion processing on N interest feature representations and M content feature representations respectively, converts the N interest feature representations to a unified scale, and converts the M content feature representations to a unified scale, thereby reducing the complexity of model calculation and improving model processing efficiency. On the other hand, the interest feature representation is fused with the domain feature representation of the corresponding interest field through the feature splicing method, while improving the discrimination between the feature representations of different interest fields, it can retain the original interest feature representation detail features, thereby improving the correlation between the recalled recommendation results and the interests.
[0184] In some embodiments, the historical interaction data includes K historical interaction sequences, where K ≥ N and K is an integer. When extracting features from the K historical interaction sequences, the historical interaction sequences may be masked according to the interest areas to which the content indicated by the historical interaction sequences belongs, thereby further improving the discrimination between the N interest feature representations obtained. Figure 5 As shown above Figure 2 Step 210 or Figure 3 Step 310 in the embodiment can also be implemented as steps 511 to 513.
[0185] Step 511 : Perform feature extraction on each of the K historical interaction sequences to obtain K sequence feature representations.
[0186] Each historical interaction sequence represents an interaction event between a target account and one or more content items. For example, a historical interaction sequence can be implemented as "Account a watched TV series 100 at 19:45:00 on 2024-01-03."
[0187] Optionally, the server stores a content recommendation model, which is used to determine recommended content to display to the target account. The content recommendation model includes a first embedding layer, which extracts features from each of the K historical interaction sequences to obtain sequence feature representations corresponding to each of the K historical interaction sequences.
[0188] Illustratively, the first embedding layer can be implemented as at least one of a network layer based on Word2Vec (Word to Vector, a deep learning model for generating word vectors), a network layer based on BERT (Bidirectional Encoder Representations from Transformers, a transformer-based pre-trained language model), etc. The first embedding layer is used to convert historical interaction sequences into low-dimensional embedding vectors (i.e., sequence feature representations), which represent the basic characteristics of the target account and content.
[0189] Step 512: Based on the N mask feature representations, mask processing is performed on the K sequence feature representations to obtain K third feature representations.
[0190] Among them, the i-th mask feature representation corresponds to the i-th field of interest. When the content indicated by the r-th sequence feature representation belongs to the i-th field of interest, the r-th sequence feature representation is masked based on the i-th mask feature representation to obtain the r-th third feature representation, where r≤K and r is a positive integer.
[0191] In some embodiments, N K-dimensional vector representations are generated based on K historical interaction sequences, and the N K-dimensional vector representations are used as N mask feature representations.
[0192] Among them, the rth dimension in the K-dimensional vector representation corresponds to the rth historical interaction sequence, the vector value of the target dimension in the i-th K-dimensional vector representation is the third preset value, and the vector values of other dimensions in the i-th K-dimensional vector representation are the fourth preset values; the target dimension refers to the dimension corresponding to the historical interaction sequence belonging to the i-th interest field, and the third preset value and the fourth preset value are different.
[0193] Schematically, the mask feature representation includes a mask feature representation with feature dimensions of K, each dimension represents a historical interaction sequence, and for the i-th mask feature representation corresponding to the i-th interest field, the eigenvalue on the dimension corresponding to the historical interaction sequence belonging to the i-th interest field in the i-th mask feature representation is the third eigenvalue (for example: 1), and the eigenvalues on other dimensions are the fourth eigenvalue (for example: 0).
[0194] For illustration, taking N=3 and K=5 as an example, the following Table 1 shows specific values of a mask feature representation.
[0195] Table 1
[0196] Historical Interaction Sequence Interactive content categories Interest #1 Mask Interest #2 Mask Interest #3 Mask Sequence 1 TV drama 1 0 0 Sequence 2 Movie 0 1 0 Sequence 3 Movie 0 1 0 Sequence 4 TV drama 1 0 0 Sequence 5 other 0 0 1
[0197] As shown in Table 1, the mask vector corresponding to interest #1 (i.e., interest area 1) is {1, 0, 0, 1, 0}; the mask vector corresponding to interest #2 (i.e., interest area 2) is {0, 1, 1, 0, 0}; and the mask vector corresponding to interest #3 (i.e., interest area 3) is {0, 0, 0, 0, 1}.
[0198] The sequence feature corresponding to the current sequence 1 is represented as p1. Then, a mask calculation is performed on p1 based on the mask vector {1, 0, 0, 1, 0}, for example: p1×{1, 0, 0, 1, 0}, to obtain p1' as the third feature representation.
[0199] Mask calculation is performed through K-dimensional vector representation to control the distinction between each content feature representation, so that Effective distinction is achieved between multiple content feature representations to prevent similar recall results.
[0200] Step 513: Based on the N areas of interest, aggregate the K third feature representations to obtain N interest feature representations.
[0201] Optionally, the content recommendation model further includes a first feature extraction layer. After obtaining K third feature representations, the first feature extraction layer aggregates the K third feature representations based on N interest areas to obtain N interest feature representations.
[0202] Illustratively, the first feature extraction layer can be implemented as a network layer based on a recurrent neural network (RNN), a network layer based on a convolutional neural network (CNN), a network layer based on an attention mechanism (Attention Mechanism), a network layer based on a capsule neural network (Capsule Neural Network), etc.
[0203] In some embodiments, the first embedding layer is further used to classify the K third feature representations to obtain third feature representations corresponding to the N areas of interest.
[0204] Optionally, the first feature extraction layer includes N sub-extraction layers, wherein the i-th sub-extraction layer is used to aggregate the third feature representations belonging to the i-th area of interest to obtain the i-th interest feature representation.
[0205] Among them, the aggregation processing methods include methods based on attention mechanisms (for example, self-attention algorithms, etc.), methods based on dynamic routing, etc., which are not limited in the embodiments of the present application.
[0206] Schematically, the method based on the attention mechanism is used as an example to illustrate.
[0207] Optionally, the attention weight corresponding to the third feature representation belonging to the i-th field of interest is determined; based on the attention weight, the third feature representation belonging to the i-th field of interest is weightedly fused to obtain the i-th interest feature representation.
[0208] Schematically, the third feature representation includes the third vector 1 and the third vector 2 as an example. First, the attention score between the third vector 1 and the third vector 2 is calculated. This score reflects the similarity or correlation between vector 1 and vector 2. The calculation method includes but is not limited to dot product, cosine similarity, etc. Secondly, the attention score is normalized by the softmax function to obtain the attention weight value; wherein, the softmax function can convert any real number into a probability distribution to ensure that the sum of the weight values is 1. Finally, the weight value is weighted and summed with the third vector 1 and the third vector 2 to obtain the fused vector, that is, fused vector = weight 1 × third vector 1 + weight 2 × third vector 2.
[0209] The third feature representation belonging to the i-th field of interest is weightedly fused through the attention mechanism, which can be used to Weighting the features, strengthening the important features and weakening the unimportant features, can help improve the accuracy of the recall results.
[0210] To sum up, the content recommendation method provided in the embodiment of the present application masks different sequence feature representations through mask feature representations corresponding to multiple interest fields, and obtains multiple third feature representations, so that the third feature representations contain mask information of the corresponding fields, so that the multiple third feature representations can be clearly distinguished in the interest field, thereby improving the distinction between the multiple interest feature representations extracted.
[0211] In some embodiments, the historical interaction data is implemented as the interaction data of the target account in the video playback platform, and the N interest areas are implemented as video categories such as TV series and movies. For example, Figure 6 As shown above Figure 2 or Figure 3 or Figure 5 The illustrated embodiment may also be implemented as steps 601 to 607 .
[0212] Step 601: Obtain K historical interaction sequences of the target account on the video playback platform.
[0213] For illustration, please refer to Figure 7 , which shows a schematic diagram of the structure of a multi-interest recall model, such as Figure 7 As shown, multiple historical interaction sequences 701 of the target account on the video playback platform are obtained, and the multiple historical interaction sequences 701 belong to different categories, where the categories include TV series, movies and other categories (for example, variety shows, documentaries, animations, etc.).
[0214] In step 602, feature extraction processing is performed on the K historical interaction sequences through the first embedding layer of the content recommendation model to obtain sequence feature representations corresponding to the K historical interaction sequences; and based on the N mask feature representations, the K sequence feature representations are masked to obtain K third feature representations.
[0215] Indicative, such as Figure 7 As shown, multiple historical interaction sequences 701 are input into the embedding layer 702, and the multiple historical interaction sequences 701 are processed separately by the embedding layer 702.
[0216] In the embedding layer 702 , it is first necessary to convert the multiple historical interaction sequences 701 into vector representations, that is, to perform feature extraction on the multiple historical interaction sequences 701 to obtain multiple interaction sequence vectors.
[0217] Secondly, it is necessary to perform mask calculation on multiple interaction sequence vectors through mask vectors to obtain multiple masked interaction sequence vectors, and then use the masked interaction sequence vectors.
[0218] Schematically, a mask vector pc is generated based on multiple historical interaction sequences 701 iThe generation process can be referred to step 512 and will not be described here in detail. i The mask value of the category (e.g. TV series) to which interest field i belongs is 1, and the mask values of other categories are 0. The interaction sequence vector after mask calculation is pc i ×P, where P represents the interaction sequence vector belonging to the area of interest i.
[0219] Through mask calculation, the K third vectors belonging to different categories are strictly mutually exclusive, thereby ensuring the discrimination between the interest vectors belonging to different categories extracted subsequently.
[0220] Finally, the K third vectors need to be classified according to category, namely, they are divided into: third vector 703 belonging to the TV series category, third vector 704 belonging to the movie category, and third vector 705 belonging to other categories; then the third vectors of different categories are input into different feature extraction networks for feature extraction.
[0221] Step 603a: perform feature aggregation on the third feature representations belonging to the TV series category among the K third feature representations through the first sub-extraction network of the content recommendation model to obtain the interest feature representation corresponding to the TV series category.
[0222] Illustratively, the third vector 703 belonging to the TV series category is input into the first sub-extraction network 706, and self-attention calculation is performed on the third vector 703 belonging to the TV series category to determine the weight of each third vector, thereby aggregating to obtain the TV series interest vector a.
[0223] Step 603b: perform feature aggregation on the third feature representations belonging to the movie category among the K third feature representations through the second sub-extraction network of the content recommendation model to obtain the interest feature representation corresponding to the movie category.
[0224] Illustratively, the third vector 704 belonging to the movie category is input into the second sub-extraction network 707, self-attention calculation is performed on the third vector 704 belonging to the movie category, the weight of each third vector is determined, and the movie interest vector b is obtained by aggregation.
[0225] Step 603c: perform feature aggregation on the third feature representations belonging to other categories in the K third feature representations through the third sub-extraction network of the content recommendation model to obtain interest feature representations corresponding to other categories.
[0226] Illustratively, the third vector 705 belonging to other categories is input into the third sub-extraction network 708, self-attention calculation is performed on the third vector 705 belonging to other categories, the weight of each third vector is determined, and the interest vector c of other categories is obtained by aggregation.
[0227] Step 604a: concatenate the interest feature representation corresponding to the TV series category with the domain feature representation corresponding to the TV series category to obtain a first feature representation corresponding to the TV series category.
[0228] Schematically, the TV series category interest vector a is L2 normalized and an information vector h1 (i.e., domain feature representation) is concatenated, where h1 takes the value of k in the first dimension (i.e., the dimension representing the TV series category) and the values of the other dimensions are 0.
[0229] Step 604b: concatenate the interest feature representation corresponding to the movie category with the domain feature representation corresponding to the movie category to obtain a first feature representation corresponding to the movie category.
[0230] Schematically, the movie category interest vector b is L2 normalized and an information vector h2 is concatenated, where h2 takes the value of k in the second dimension (i.e., the dimension representing the movie category) and the values of the other dimensions are 0.
[0231] Step 604c: Concatenate the interest feature representations corresponding to other categories with the domain feature representations corresponding to other categories to obtain first feature representations corresponding to other categories.
[0232] Schematically, for the interest vectors c of other categories, L2 normalization is performed and an information vector h3 is concatenated, where h3 takes the value of k in the third dimension (ie, the dimension representing other categories) and the values of the other dimensions are 0.
[0233] In step 605 , the second feature extraction network of the content recommendation model is used to extract features from the M candidate contents belonging to each category, thereby obtaining M content feature representations.
[0234] Wherein, M is an integer greater than 1.
[0235] Illustratively, multiple candidate contents 709 are input into the second feature extraction network 710 to obtain multiple content vectors, and the multiple content vectors belong to TV series, movies and other categories.
[0236] Step 606 : Based on the domain feature representations corresponding to the respective categories, feature concatenation processing is performed on the M content feature representations to obtain M second feature representations.
[0237] In the case where the content feature representation belongs to the TV series category, the content feature representation is concatenated with the domain feature representation corresponding to the TV series category to obtain a second feature representation.
[0238] Schematically, L2 normalization is performed on the content vector of the TV series, and an information vector h1 is concatenated, where h1 takes the value of k in the first dimension (i.e., the dimension representing the TV series category) and the values of the other dimensions are 0.
[0239] In the case where the content feature representation belongs to the movie category, the content feature representation is concatenated with the domain feature representation corresponding to the movie category to obtain a second feature representation.
[0240] Schematically, L2 normalization is performed on the movie content vectors, and an information vector h2 is concatenated, where h2 takes the value of k in the second dimension (i.e., the dimension representing the movie category) and the values of the other dimensions are 0.
[0241] In the case where the content feature representation belongs to other categories, the content feature representation is concatenated with the domain feature representation corresponding to the other categories to obtain a second feature representation.
[0242] Schematically, L2 normalization is performed on the content vectors belonging to other categories, and an information vector h3 is concatenated, where h3 takes the value of k in the third dimension (ie, the dimension representing other categories) and the values of the other dimensions are 0.
[0243] Finally, multiple content vectors after splicing are obtained as multiple second feature representations.
[0244] Step 607 : Based on the first feature representation and the M second feature representations corresponding to each category, determine the recommendation results of the M candidate contents in each category when recommending content to the target account.
[0245] Schematically, the similarity between the first feature representation corresponding to each category and the M second feature representations is calculated, wherein the similarity calculation formula is shown in the following formula 1:
[0246] Formula 1: logits = u1 × i1 + cos(u2, i2)
[0247] Among them, u1 represents the concatenated information vector in the first feature representation, i1 represents the concatenated information vector in the second feature representation, u2 represents the interest vector in the first feature representation, and i2 represents the interest vector in the second feature representation.
[0248] like Figure 7 As shown, the final calculated similarity between the first feature representation corresponding to the TV series category and the M second feature representations is logits1, the similarity between the first feature representation corresponding to the movie category and the M second feature representations is logits2, and the similarity between the first feature representation corresponding to other categories and the M second feature representations is logits3. According to logits1, recommended content of the TV series category can be recalled from the M candidate contents, according to logits2, recommended content of the movie category can be recalled from the M candidate contents, and according to logits3, recommended content of other categories can be recalled from the M candidate contents.
[0249] It should be noted that the training process of the content recommendation model provided in the embodiment of the present application is basically the same as the inference process of the above-mentioned model. During training, for the positive sample (that is, the sample candidate content to be trained), after calculating the similarity between each first feature representation and the positive sample, the loss is calculated using the first feature representation with the highest similarity to the positive sample, that is, the distance between the positive sample feature representation and the first sample feature representation is calculated, and the distance is used as the loss for backpropagation to adjust the model weight.
[0250] Among them, the first feature representation and the second feature representation can ensure that the candidate content corresponding to the interest field can be recalled by the first feature representation of the corresponding interest field through the KNN (K-Nearest Neighbors) algorithm, while irrelevant candidate content will be discarded. The principle is introduced below.
[0251] The formula for calculating similarity in the KNN algorithm is shown in Formula 2 below:
[0252] Formula 2:
[0253] in, Indicates the calculation of the i-th first feature representation and the second feature representation Similarity between, L2norm() represents L2 normalization calculation, u i refers to the i-th interest vector in the i-th first feature representation, i j refers to the jth content vector in the jth second feature representation, h i refers to the information vector in the first feature representation of the i-th element, h j refers to the information vector in the j-th second feature representation.
[0254] Among them, (L2norm(u i )·L2norm(i j )) has a value range of [-1,1]; h i ·h j The range of the value is [0,k 2 ], for h i ·h j , when the jth content vector is the same as the interest field corresponding to the current i-th first feature representation, the value is k 2 , otherwise the value is 0. Indicative, controllable
[0255] For the above information vectors h1, h2 and h3, the value of k can be realized as That is, the information vector h1 is The information vector h2 is The information vector h3 is Therefore, the inner product value range between the spliced interest vector a corresponding to the TV series category and the second vector belonging to the TV series category is [1,3], and the inner product value range between the interest vector a and the second vector belonging to the movie and other categories is [-1,1], thereby realizing the control capability of a single interest vector to recall the content of a single category.
[0256] In summary, in the embodiments of the present application:
[0257] (1) In the feature extraction layer corresponding to the target account (i.e. Figure 7 The embedding layer and each sub-feature extraction layer in the image are used to perform mask calculation on the historical interaction data according to the media asset category, and then the attention calculation is performed. This allows the following to be achieved: the discrimination between the inputs of each sub-feature extraction layer during the attention calculation is controlled by the mask, thereby effectively distinguishing between multiple interest vectors and preventing similar recall results.
[0258] (2) At the feature extraction layer corresponding to the target account, for multiple interest vectors, a set of two-to-two orthogonal vectors are used as augmented vectors to concatenate the original interest vectors. Due to the orthogonality of the augmented vectors, the discrimination between multiple interest vectors is further enhanced.
[0259] (3) In the feature extraction layer corresponding to the content (i.e. Figure 7 On the content vector output by the second feature extraction layer in (2), the same augmented vector mentioned in (2) is used to splice the content vector, and finally the K nearest neighbor recall contents of multiple user interest vectors are strictly different, and the multi-interest extraction capability of multi-interest recall is further enhanced.
[0260] For illustration, let's take the example of an application being implemented as a video playback platform. Figure 8 Schematic diagram of a selected page of a video playback platform determined by the content recommendation method provided in an embodiment of the present application is shown. Figure 8 As shown, the content recommendation method provided by the embodiment of the present application displays recommended content 800 belonging to different categories to the user, namely TV series 801, variety shows 802 and movies 803.
[0261] It should be noted that the content recommendation method provided in the embodiment of the present application can also be applied to e-commerce platforms, music playback platforms, news promotion platforms, etc., and the embodiment of the present application is not limited to this. The following e-commerce platform is used as an example to briefly explain the content recommendation method provided in the embodiment of the present application.
[0262] Step 1: Obtain K historical interaction sequences of the target account on the e-commerce platform.
[0263] Multiple historical interaction sequences belong to different types, including clothing, electronic products, snacks, beauty products, home appliances, stationery, etc.
[0264] Step 2: Perform feature extraction on the K historical interaction sequences to obtain sequence feature representations corresponding to the K historical interaction sequences; and perform masking on the K sequence feature representations based on the N mask feature representations to obtain K third feature representations.
[0265] Step 3: Perform feature aggregation on the third feature representations in the K third feature representations according to their types to obtain interest feature representations corresponding to each type.
[0266] Step 4: Concatenate the interest feature representation and the corresponding domain feature representation, and obtain the first feature representation corresponding to each type.
[0267] Schematically, the interest feature representation corresponding to the clothing and the domain feature representation corresponding to the clothing are spliced to obtain the first feature representation corresponding to the clothing.
[0268] Step 5: Extract features of the M candidate products of each type to obtain M product feature representations.
[0269] Among them, the M candidate products refer to various types of products included in the e-commerce platform.
[0270] Step 6: Based on the domain feature representations corresponding to each type, the M product feature representations are respectively subjected to feature concatenation processing to obtain M second feature representations.
[0271] Illustratively, when the product feature representation belongs to the clothing category, the product feature representation and the domain feature representation corresponding to the clothing are concatenated to obtain a second feature representation.
[0272] Step 7: Based on the first feature representation and the M second feature representations corresponding to each category, determine the recommendation results of the M candidate products under each category when recommending products to the target account.
[0273] Illustratively, the target account's recommended content in categories such as clothing, electronics, snacks, cosmetics, home appliances, and stationery is ultimately recommended to the target account. Optionally, products of a specified category are displayed in a designated category area on the homepage of the e-commerce platform where the target account is logged in. For example, a clothing recommendation window is displayed on the homepage, in which products of the clothing category determined by the above content recommendation method are scrolled.
[0274] Figure 9 is a structural block diagram of a content recommendation device provided by an exemplary embodiment of the present application. Figure 9 As shown, the device includes the following parts:
[0275] Feature extraction module 910 is configured to extract features from the historical interaction data to obtain N interest feature representations; the historical interaction data is used to represent interaction events between the target account and at least one content within a historical time period, and the i-th interest feature representation corresponds to the i-th interest area, where N is an integer greater than 1, i≤N, and i is a positive integer;
[0276] A feature fusion module 920 is configured to perform feature fusion processing on the N interest feature representations based on the N domain feature representations to obtain N first feature representations, wherein the i-th interest feature representation is fused with the i-th domain feature representation to obtain the i-th first feature representation, and the i-th domain feature representation corresponds to the i-th domain of interest;
[0277] The feature extraction module 910 is used to extract features from M candidate contents belonging to N areas of interest, respectively, to obtain M content feature representations, where M is an integer greater than 1;
[0278] The feature fusion module 920 is configured to perform feature fusion processing on the M content feature representations based on the N domain feature representations to obtain M second feature representations; when the jth content feature representation belongs to the i-th field of interest, the jth content feature representation is fused with the i-th domain feature representation to obtain the j-th second feature representation, where j≤M and j is a positive integer;
[0279] The content determination module 930 is configured to determine, based on the N first feature representations and the M second feature representations, recommendation results corresponding to the M candidate contents in the N interest areas when recommending content to the target account.
[0280] In some embodiments, please refer to Figure 10 The feature fusion module 920 includes:
[0281] The conversion unit 921 is configured to perform feature conversion processing on the N interest feature representations to obtain N converted interest feature representations, wherein the N converted interest feature representations have the same feature scale;
[0282] The splicing unit 922 is used to perform feature splicing processing on the N converted interest feature representations based on the N domain feature representations to obtain the N first feature representations; wherein the i-th interest feature representation and the i-th domain feature representation are spliced to obtain the i-th first feature representation.
[0283] In some embodiments, the conversion unit 921 is further used to perform feature conversion processing on the M content feature representations respectively to obtain M converted content feature representations, and the feature scales of the M converted content feature representations are the same; the splicing unit 922 is further used to perform feature splicing processing on the M converted content feature representations based on the N domain feature representations to obtain the M second feature representations; wherein, when the j-th content feature representation belongs to the i-th field of interest, the j-th content feature representation and the i-th domain feature representation are spliced to obtain the j-th second feature representation.
[0284] In some embodiments, the N domain feature representations include N pairwise orthogonal N-dimensional vector representations, wherein the vector value of the i-th dimension in the i-th N-dimensional vector representation is a first preset value, and the vector values of other dimensions in the i-th N-dimensional vector representation are second preset values.
[0285] In some embodiments, the historical interaction data includes K historical interaction sequences, where K ≥ N and K is an integer; the feature extraction module 910 includes:
[0286] An extraction unit 911 is configured to perform feature extraction on each of the K historical interaction sequences to obtain K sequence feature representations;
[0287] a masking unit 912 configured to perform masking processing on the K sequence feature representations based on the N mask feature representations to obtain K third feature representations; wherein the i-th mask feature representation corresponds to the i-th field of interest, and when the content indicated by the r-th sequence feature representation belongs to the i-th field of interest, masking processing is performed on the r-th sequence feature representation based on the i-th mask feature representation to obtain the r-th third feature representation, where r≤K and r is a positive integer;
[0288] The aggregation unit 913 is configured to aggregate the K third feature representations based on the N interest areas to obtain the N interest feature representations.
[0289] In some embodiments, the aggregation unit 913 is configured to:
[0290] Determining an attention weight corresponding to a third feature representation belonging to the i-th area of interest;
[0291] Based on the attention weight, the third feature representation belonging to the i-th area of interest is weightedly fused to obtain the i-th interest feature representation.
[0292] In some embodiments, the feature extraction module 910 further includes:
[0293] A generating unit 914 is configured to generate N K-dimensional vector representations based on the K historical interaction sequences, and use the N K-dimensional vector representations as the N mask feature representations;
[0294] Among them, the rth dimension in the K-dimensional vector representation corresponds to the rth historical interaction sequence, the vector value of the target dimension in the i-th K-dimensional vector representation is a third preset value, and the vector values of other dimensions in the i-th K-dimensional vector representation are fourth preset values; the target dimension refers to the dimension corresponding to the historical interaction sequence belonging to the i-th interest field, and the third preset value is different from the fourth preset value.
[0295] In some embodiments, the content determination module 930 is configured to:
[0296] Determining recommendation scores corresponding to the M candidate contents based on similarities between the i-th first feature representation and the M second feature representations;
[0297] The candidate content whose recommendation score meets the preset score requirement is selected from the M candidate content as the recommendation result corresponding to the i-th interest field.
[0298] In some embodiments, the M second feature representations include an i-th second feature representation and an h-th second feature representation, where i≤N and i is a positive integer, and i and h are different; the content determination module 930 is configured to:
[0299] Determining a target similarity between the i-th interest feature representation and the h-th interest feature representation;
[0300] When the target similarity is greater than or equal to a preset similarity threshold, determining an enhancement coefficient of the i-th domain feature representation, and determining an attenuation coefficient of the h-th domain feature representation;
[0301] When the j-th content feature representation belongs to the i-th field of interest, calculating a first similarity between the j-th first feature representation and the i-th first feature representation based on the enhancement coefficient to obtain a recommendation score for the j-th candidate content, wherein the enhancement coefficient is positively correlated with the first similarity;
[0302] In the case that the j-th content feature representation belongs to the h-th area of interest, the second similarity between the j-th first feature representation and the i-th first feature representation is calculated based on the attenuation coefficient to obtain the recommendation score of the j-th candidate content, and the attenuation coefficient is negatively correlated with the second similarity.
[0303] In some embodiments, the feature fusion module 920 is further configured to:
[0304] Adding the i-th interest feature representation and the i-th domain feature representation to obtain the i-th first feature representation;
[0305] In the case that the jth content feature representation belongs to the i-th field of interest, the jth content feature representation is added to the i-th field feature representation to obtain the jth second feature representation.
[0306] In summary, the content recommendation device provided by the embodiment of the present application, on the one hand, the multiple interest feature representations after fusion processing respectively contain feature information of different interest fields, that is, the discrimination between the multiple interest feature representations after fusion processing is improved, thereby improving the discrimination between the recommended contents recalled under multiple interest fields; on the other hand, since the same field feature representation is fused, the feature correlation between the interest feature representation and the content feature representation corresponding to the same interest field increases after fusion processing, which increases the probability that the feature representation of the specified interest field recalls the candidate content belonging to the specified interest field, thereby improving the correlation between the recalled recommended content and the corresponding user interest.
[0307] In addition, the increased correlation between recommended content and user interests can also increase the probability of users interacting with recommended content (for example, clicking, playing, etc.), avoiding the waste of computer resources and improving the utilization of computer computing resources.
[0308] It should be noted that the content recommendation device provided in the above embodiment is merely an example of the division of the aforementioned functional modules. In actual applications, the aforementioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. Furthermore, the content recommendation device provided in the above embodiment and the content recommendation method embodiment are based on the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.
[0309] Figure 11 The following is a block diagram of an electronic device 1100 according to an exemplary embodiment of the present application. The electronic device 1100 may be a portable mobile terminal, such as a smartphone, an in-vehicle terminal, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III), an MP4 player (Moving Picture Experts Group Audio Layer IV), a laptop computer, or a desktop computer. The electronic device 1100 may also be referred to as a user device, a portable terminal, a laptop terminal, a desktop terminal, or other similar names.
[0310] Typically, the electronic device 1100 includes a processor 1101 and a memory 1102 .
[0311] The processor 1101 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 1101 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), or PLA (Programmable Logic Array). The processor 1101 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 1101 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 1101 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0312] Memory 1102 may include one or more computer-readable storage media, which may be non-transitory. Memory 1102 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices and flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in memory 1102 is used to store at least one instruction, which is executed by processor 1101 to implement the content recommendation method provided in the method embodiment of the present application.
[0313] In some embodiments, the electronic device 1100 further includes one or more sensors, including but not limited to: a proximity sensor, a gyroscope sensor, and a pressure sensor.
[0314] A proximity sensor, also known as a distance sensor, is typically provided on the front panel of the electronic device 1100. The proximity sensor is used to detect the distance between the user and the front of the electronic device 1100.
[0315] The gyroscope sensor can detect the orientation and rotation angle of the electronic device 1100. It can also work with the accelerometer to collect 3D motions of the user on the electronic device 1100. Based on the data collected by the gyroscope sensor, the processor 1101 can implement the following functions: motion sensing (for example, changing the UI based on the user's tilt), image stabilization during shooting, game control, and inertial navigation.
[0316] The pressure sensor can be set on the side frame and / or the lower layer of the display screen of the electronic device 1100. When the pressure sensor is set on the side frame of the electronic device 1100, it can detect the user's grip signal of the electronic device 1100, and the processor 1101 performs left and right hand recognition or quick operation based on the grip signal collected by the pressure sensor. When the pressure sensor is set on the lower layer of the display screen, the processor 1101 controls the operability controls on the UI interface based on the user's pressure operation on the display screen. The operability controls include at least one of button controls, scroll bar controls, icon controls, and menu controls.
[0317] In some embodiments, the electronic device 1100 may further include other components, which can be understood by those skilled in the art. Figure 11 The structure shown in the figure does not constitute a limitation on the electronic device 1100, and the electronic device 1100 may include more or fewer components than shown in the figure, or combine certain components, or adopt a different component arrangement.
[0318] Embodiments of the present application also provide a computer device, which can be implemented as a terminal or a server. The computer device includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, code set, or instruction set, and the at least one instruction, at least one program, code set, or instruction set is loaded and executed by the processor to implement the content recommendation methods provided in the above-mentioned method embodiments.
[0319] An embodiment of the present application also provides a computer-readable storage medium, which stores at least one instruction, at least one program, code set or instruction set, and the at least one instruction, at least one program, code set or instruction set is loaded and executed by a processor to implement the content recommendation method provided by the above-mentioned method embodiments.
[0320] Embodiments of the present application also provide a computer program product or computer program, which includes 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 content recommendation method described in any of the above embodiments.
[0321] Optionally, the computer-readable storage medium may include: a read-only memory (ROM), a random access memory (RAM), a solid-state drive (SSD), or an optical disk. Among them, the random access memory may include a resistance random access memory (ReRAM) and a dynamic random access memory (DRAM). The serial numbers of the above embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0322] Those skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware, or by a program to instruct the relevant hardware, and the program may be stored in a computer-readable storage medium, which may be a read-only memory, a disk, or an optical disk, etc.
[0323] The above description is merely an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.
Claims
1. A content recommendation method, characterized in that: The method comprises: Feature extraction is performed on the historical interaction data to obtain N interest feature representations; the historical interaction data is used to represent interaction events between the target account and at least one content within a historical time period, the i-th interest feature representation corresponds to the i-th interest area, where N is an integer greater than 1, i≤N, and i is a positive integer; Based on N domain feature representations, feature fusion processing is performed on the N interest feature representations to obtain N first feature representations, and the i-th interest feature representation is fused with the i-th domain feature representation to obtain the i-th first feature representation, and the i-th domain feature representation corresponds to the i-th interest domain; Perform feature extraction on M candidate contents belonging to N areas of interest, respectively, to obtain M content feature representations, where M is an integer greater than 1; Based on the N domain feature representations, feature fusion processing is performed on the M content feature representations to obtain M second feature representations; when the jth content feature representation belongs to the i-th field of interest, the jth content feature representation is fused with the i-th domain feature representation to obtain the j-th second feature representation, where j≤M and j is a positive integer; Based on the N first feature representations and the M second feature representations, recommendation results corresponding to the M candidate contents in the N interest areas are determined when recommending content to the target account.
2. The method according to claim 1, characterized in that The step of performing feature fusion processing on the N interest feature representations based on the N domain feature representations to obtain N first feature representations includes: Performing feature conversion processing on the N interest feature representations respectively to obtain N converted interest feature representations, wherein the N converted interest feature representations have the same feature scale; Based on the N domain feature representations, the converted N interest feature representations are respectively subjected to feature splicing processing to obtain the N first feature representations; wherein, the i-th interest feature representation and the i-th domain feature representation are spliced to obtain the i-th first feature representation.
3. The method according to claim 2, characterized in that The step of performing feature fusion processing on the M content feature representations based on the N domain feature representations to obtain M second feature representations includes: Performing feature conversion processing on the M content feature representations respectively to obtain M converted content feature representations, wherein the feature scales of the M converted content feature representations are the same; Based on the N domain feature representations, the converted M content feature representations are respectively subjected to feature splicing processing to obtain the M second feature representations; wherein, when the j-th content feature representation belongs to the i-th field of interest, the j-th content feature representation is spliced with the i-th domain feature representation to obtain the j-th second feature representation.
4. The method according to claim 2 or 3, characterized in that The N domain feature representations include N pairwise orthogonal N-dimensional vector representations, wherein the vector value of the i-th dimension in the i-th N-dimensional vector representation is a first preset value, and the vector values of other dimensions in the i-th N-dimensional vector representation are second preset values.
5. The method according to any one of claims 1 to 3, characterized in that: The historical interaction data includes K historical interaction sequences, where K ≥ N and K is an integer; The feature extraction of the historical interaction data is performed to obtain N interest feature representations, including: Perform feature extraction on each of the K historical interaction sequences to obtain K sequence feature representations; Based on the N mask feature representations, masking is performed on the K sequence feature representations to obtain K third feature representations; wherein the i-th mask feature representation corresponds to the i-th field of interest, and when the content indicated by the r-th sequence feature representation belongs to the i-th field of interest, masking is performed on the r-th sequence feature representation based on the i-th mask feature representation to obtain the r-th third feature representation, where r≤K and r is a positive integer; Based on the N areas of interest, the K third feature representations are aggregated to obtain the N interest feature representations.
6. The method according to claim 5, characterized in that The aggregating the K third feature representations based on the N areas of interest to obtain the N interest feature representations includes: Determining an attention weight corresponding to a third feature representation belonging to the i-th area of interest; Based on the attention weight, the third feature representation belonging to the i-th area of interest is weightedly fused to obtain the i-th interest feature representation.
7. The method according to claim 5, characterized in that The method further comprises: Based on the K historical interaction sequences, generate N K-dimensional vector representations, and use the N K-dimensional vector representations as the N mask feature representations; Among them, the rth dimension in the K-dimensional vector representation corresponds to the rth historical interaction sequence, the vector value of the target dimension in the i-th K-dimensional vector representation is a third preset value, and the vector values of other dimensions in the i-th K-dimensional vector representation are fourth preset values; the target dimension refers to the dimension corresponding to the historical interaction sequence belonging to the i-th interest field, and the third preset value is different from the fourth preset value.
8. The method according to any one of claims 1 to 3, characterized in that: The determining, based on the N first feature representations and the M second feature representations, recommendation results corresponding to the M candidate contents in the N interest areas when recommending content to the target account includes: Determining recommendation scores corresponding to the M candidate contents based on similarities between the i-th first feature representation and the M second feature representations; The candidate content whose recommendation score meets the preset score requirement is selected from the M candidate content as the recommendation result corresponding to the i-th interest field.
9. The method according to claim 8, characterized in that The M second feature representations include the i-th second feature representation and the h-th second feature representation, where i≤N and i is a positive integer, and i and h are different; The determining, based on the similarities between the i-th first feature representation and the M second feature representations, the recommendation scores corresponding to the M candidate contents respectively includes: Determining a target similarity between the i-th interest feature representation and the h-th interest feature representation; When the target similarity is greater than or equal to a preset similarity threshold, determining an enhancement coefficient of the i-th domain feature representation, and determining an attenuation coefficient of the h-th domain feature representation; When the j-th content feature representation belongs to the i-th field of interest, calculating a first similarity between the j-th first feature representation and the i-th first feature representation based on the enhancement coefficient to obtain a recommendation score for the j-th candidate content, wherein the enhancement coefficient is positively correlated with the first similarity; In the case that the j-th content feature representation belongs to the h-th area of interest, the second similarity between the j-th first feature representation and the i-th first feature representation is calculated based on the attenuation coefficient to obtain the recommendation score of the j-th candidate content, and the attenuation coefficient is negatively correlated with the second similarity.
10. The method according to any one of claims 1 to 3, characterized in that: The step of performing feature fusion processing on the N interest feature representations based on the N domain feature representations to obtain N first feature representations includes: Adding the i-th interest feature representation and the i-th domain feature representation to obtain the i-th first feature representation; The step of performing feature fusion processing on the M content feature representations based on the N domain feature representations to obtain M second feature representations includes: In the case that the jth content feature representation belongs to the i-th field of interest, the jth content feature representation is added to the i-th field feature representation to obtain the jth second feature representation.
11. A content recommendation device, characterized in that: The device comprises: a feature extraction module configured to extract features from the historical interaction data to obtain N interest feature representations; the historical interaction data is used to represent interaction events between the target account and at least one content within a historical time period, wherein the i-th interest feature representation corresponds to the i-th interest area, where N is an integer greater than 1, i≤N, and i is a positive integer; A feature fusion module is configured to perform feature fusion processing on the N interest feature representations based on the N domain feature representations to obtain N first feature representations, wherein the i-th interest feature representation is fused with the i-th domain feature representation to obtain the i-th first feature representation, and the i-th domain feature representation corresponds to the i-th domain of interest; The feature extraction module is used to extract features from M candidate contents belonging to N areas of interest respectively to obtain M content feature representations, where M is an integer greater than 1; The feature fusion module is configured to perform feature fusion processing on the M content feature representations based on the N domain feature representations to obtain M second feature representations; when the jth content feature representation belongs to the i-th field of interest, the jth content feature representation is fused with the i-th domain feature representation to obtain the j-th second feature representation, where j≤M and j is a positive integer; The content determination module is configured to determine, based on the N first feature representations and the M second feature representations, recommendation results corresponding to the M candidate contents in the N interest areas when recommending content to the target account.
12. A computer device, characterized in that: The computer device includes a processor and a memory, wherein the memory stores at least one program, and the at least one program is loaded and executed by the processor to implement the content recommendation method according to any one of claims 1 to 10.
13. A computer-readable storage medium, characterized in that The storage medium stores at least one program, and the at least one program is loaded and executed by the processor to implement the content recommendation method according to any one of claims 1 to 10.
14. A computer program product, characterized in that The invention comprises a computer program, which, when executed by a processor, implements the content recommendation method according to any one of claims 1 to 10.