Content recommendation method and apparatus, electronic device, related medium and program product

CN122925699APending Publication Date: 2026-10-16BEIJING SOGOU TECHNOLOGY DEVELOPMENT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510405825.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-01
Publication Date
2026-10-16

AI Technical Summary

Technical Problem

然而,相关技术往往会预先学习特征交互过程中所需的权重(例如每个特征对的权重),这导致其在特征交互上的灵活性不足,难以平衡不同特征之间的复杂交互,从而致使内容推荐的准确性低下

Benefits of technology

[0019]本公开实施例中,首先,获取多个特征对。其中,每个特征对包含输入特征集中的两个输入特征,输入特征集中的输入特征为推荐对象的对象特征或待推荐内容的内容特征。其次,对每个特征对中的两个输入特征进行特征交互处理,得到每个特征对对应的特征交互向量,如此,能够实现不同输入特征之间的初步交互,从而初步捕获不同输入特征之间的浅层次关系。然后,基于每个特征对对应的特征交互向量的级联结果,进行注意力计算,得到每个特征对对应的注意力权重,如此,能够自适应计算每个特征对的交互重要性,从而灵活平衡不同输入特征之间的复杂交互,提升特征交互的灵活性,并充分挖掘不同输入特征之间的深层次关系。之后,根据多个特征对分别对应的注意力权重,对多个特征对分别对应的特征交互向量分别进行加权处理,得到多个特征对分别对应的加权特征交互向量,如此,通过注意力权重来有效控制特征交互向量的交互强度,使得得到的加权特征交互向量更加准确,从而能够有效提升特征交互的准确性。最后,根据多个特征对分别对应的加权特征交互向量,进行预测处理,得到推荐对象对待推荐内容的触发概率,并根据触发概率,执行向推荐对象推荐待推荐内容的操作,如此,将多个特征对分别对应的加权特征交互向量量化为一个触发概率,能够基于该触发概率制定有效的推荐策略。综上,本公开实施例通过实时计算每个特征对的注意力权重,能够自适应实现不同特征对的权重分配,有效提升特征交互的灵活性,并充分挖掘不同输入特征之间的深层次关系,从而有效提升内容推荐的精准度。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122925699A_ABST
    Figure CN122925699A_ABST
Patent Text Reader

Abstract

The present disclosure provides a content recommendation method, device, electronic equipment, related medium and program product. The method comprises: obtaining a plurality of feature pairs, each feature pair containing two input features in an input feature set, the input features being object features of a recommendation object or content features of to-be-recommended content; performing feature interaction processing on the two input features in each feature pair to obtain a feature interaction vector corresponding to each feature pair; performing attention calculation based on a concatenation result of the feature interaction vectors corresponding to each feature pair to obtain an attention weight corresponding to each feature pair, and performing weighted processing on the feature interaction vector corresponding to each feature pair according to the attention weight to obtain a weighted feature interaction vector corresponding to each feature pair; performing prediction processing on the weighted feature interaction vectors corresponding to the plurality of feature pairs respectively to obtain a trigger probability of the recommendation object to the to-be-recommended content, and performing an operation of recommending the to-be-recommended content to the recommendation object. The present disclosure can improve the accuracy of content recommendation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computers, and in particular to a content recommendation method, apparatus, electronic device, related media, and program product. Background Technology

[0002] Content recommendation refers to the process of recommending relevant or interesting content to an individual. For example, in an online shopping mall, given the wide variety of products offered, it can be difficult for an individual to find items they are truly interested in from a vast array of goods. Therefore, content recommendation data processing methods can be used to recommend products that the individual might be interested in, thereby meeting their shopping needs.

[0003] When performing content recommendation, it's crucial to consider not only the impact of the object features of the recommended object on the recommendation, but also the impact of the content features of the content to be recommended. Furthermore, since object features and content features are related, the interaction features between them must also be considered. Related technologies typically perform feature interaction analysis on the object features and content features, then process the results based on the interaction using models such as deep neural networks to achieve content recommendation. However, these technologies often pre-learn the weights required for feature interaction (e.g., the weights of each feature pair), resulting in insufficient flexibility in feature interaction and difficulty in balancing complex interactions between different features, ultimately leading to low accuracy in content recommendation. Summary of the Invention

[0004] This disclosure provides a content recommendation method, apparatus, electronic device, related medium, and program product that can improve the accuracy of content recommendation.

[0005] To solve the above-mentioned technical problems, this disclosure provides the following technical solutions: According to one aspect of this disclosure, a content recommendation method is provided, comprising: Multiple feature pairs are obtained, each feature pair containing two input features from an input feature set, wherein the input features in the input feature set are either object features of the recommended object or content features of the content to be recommended; Perform feature interaction processing on the two input features in each feature pair to obtain the feature interaction vector corresponding to each feature pair; Based on the concatenation result of the feature interaction vectors corresponding to each feature pair, attention calculation is performed to obtain the attention weights corresponding to each feature pair; Based on the attention weights corresponding to the multiple feature pairs, the feature interaction vectors corresponding to the multiple feature pairs are weighted to obtain the weighted feature interaction vectors corresponding to the multiple feature pairs. Based on the multiple features, the corresponding weighted feature interaction vectors are predicted to obtain the trigger probability of the recommended object for the content to be recommended. Based on the trigger probability, the operation of recommending the content to be recommended to the recommendation object is performed.

[0006] According to one aspect of this disclosure, a content recommendation device is provided, comprising: The acquisition module is used to acquire multiple feature pairs, each feature pair containing two input features from an input feature set, wherein the input features in the input feature set are object features of the recommended object or content features of the content to be recommended; The feature interaction module is used to perform feature interaction processing on the two input features in each feature pair to obtain the feature interaction vector corresponding to each feature pair. The attention module is used to perform attention calculation based on the concatenation result of the feature interaction vectors corresponding to each feature pair, so as to obtain the attention weight corresponding to each feature pair; The weighted processing module is used to perform weighted processing on the feature interaction vectors corresponding to the multiple feature pairs according to the attention weights corresponding to the multiple feature pairs respectively, so as to obtain the weighted feature interaction vectors corresponding to the multiple feature pairs respectively. The prediction module is used to perform prediction processing on the weighted feature interaction vectors corresponding to the multiple features to obtain the trigger probability of the recommendation object for the content to be recommended. The recommendation module is used to recommend the content to be recommended to the recommendation object based on the trigger probability.

[0007] Optionally, the attention module is specifically used for: The feature interaction vectors corresponding to the multiple feature pairs are transformed to obtain the transformation vectors corresponding to the multiple feature pairs. Based on the transformation vector corresponding to each of the plurality of feature pairs, determine the influence weight of each feature pair relative to each of the other feature pairs in the plurality of feature pairs; The attention weight corresponding to each feature pair is determined based on the influence weight of each feature pair relative to each of the other feature pairs among the plurality of feature pairs.

[0008] Optionally, the attention module is specifically used for: Based on the query transformation matrix, the feature interaction vectors corresponding to the multiple feature pairs are transformed to obtain the query vectors corresponding to the multiple feature pairs. Based on the key transformation matrix, the feature interaction vectors corresponding to the multiple feature pairs are transformed to obtain the key vectors corresponding to the multiple feature pairs. Based on the key vector corresponding to each feature pair and the query vector corresponding to the other feature pairs, the influence weight of each feature pair relative to the other feature pairs is determined.

[0009] Optionally, the attention module is specifically used for: The influence weight of each feature pair on the other feature pairs and the influence weight of the other feature pairs on each feature pair are averaged to obtain the average influence weight corresponding to each feature pair. Based on the average influence weight corresponding to each feature pair, update the influence weight of each feature pair on the other feature pairs, and the influence weight of the other feature pairs on each feature pair.

[0010] Optionally, the attention module is specifically used for: In each of the multiple attention heads, attention is calculated based on the concatenation result of the feature interaction vectors corresponding to each feature pair, to obtain the attention weight corresponding to each feature pair in each attention head; The weighted processing module is specifically used for: The attention weights of each feature pair in the plurality of attention heads are averaged to obtain the average attention weights corresponding to each feature pair. Based on the average attention weights corresponding to the multiple feature pairs, the feature interaction vectors corresponding to the multiple feature pairs are weighted respectively to obtain the weighted feature interaction vectors corresponding to the multiple feature pairs.

[0011] Optionally, the feature interaction module is specifically used for: In the latent vector matrix, determine the latent vectors corresponding to the two input features in each feature pair, respectively; Based on the latent vectors corresponding to the two input features in each feature pair, feature interaction processing is performed on the two input features in each feature pair to obtain the feature interaction vector corresponding to each feature pair.

[0012] Optionally, the feature interaction module is specifically used for: The latent vectors corresponding to the two input features in each feature pair are multiplied element-wise to obtain the interaction latent vectors corresponding to each feature pair. Multiply the two input features in each feature pair to obtain the interaction feature corresponding to each feature pair; The interaction latent vector corresponding to each feature pair is multiplied with the interaction feature to obtain the feature interaction vector corresponding to each feature pair.

[0013] Optionally, the prediction module is specifically used for: The weighted feature interaction vectors corresponding to the multiple feature pairs are fused to obtain the target feature interaction parameters. The probability of the recommended object triggering the content to be recommended is obtained by performing probability calculation based on the target feature interaction parameters.

[0014] Optionally, the prediction module is specifically used for: The weighted feature interaction vectors corresponding to the multiple feature pairs are integrated into a feature interaction matrix; The elements in the feature interaction matrix are summed column-wise to obtain the intermediate feature interaction vector; The intermediate feature interaction vector is subjected to dimensionality reduction processing to obtain the target feature interaction parameters.

[0015] Optionally, the prediction module is specifically used for: Multiple input features in the input feature set are weighted separately to obtain multiple weighted input features; The target linear parameters are obtained by performing feature fusion processing on the multiple weighted input features; The probability of the recommended object triggering the content to be recommended is obtained by calculating the probability based on the target feature interaction parameters and the target linear parameters.

[0016] Optionally, the prediction module is specifically used for: Determine the contextual features associated with the recommended object; The context features are weighted to obtain context parameters; The probability of the recommended object triggering the content to be recommended is obtained by calculating the probability based on the target feature interaction parameters and the context parameters.

[0017] According to one aspect of this disclosure, an electronic device is provided, including a memory and a processor, the memory storing a computer program, the processor executing the computer program to implement the content recommendation method as described above.

[0018] According to one aspect of this disclosure, a computer-readable storage medium is provided that stores a computer program, which, when executed by a processor, implements the content recommendation method described above. According to one aspect of this disclosure, a computer program product is provided, the computer program product comprising a computer program that is read and executed by a processor of an electronic device, causing the electronic device to perform the content recommendation method as described above.

[0019] In this embodiment, firstly, multiple feature pairs are obtained. Each feature pair contains two input features from an input feature set, where the input features are either object features of the recommended object or content features of the content to be recommended. Secondly, feature interaction processing is performed on the two input features in each feature pair to obtain a feature interaction vector corresponding to each feature pair. This enables preliminary interaction between different input features, thereby initially capturing shallow relationships between them. Then, based on the concatenation result of the feature interaction vectors corresponding to each feature pair, attention calculation is performed to obtain the attention weight for each feature pair. This allows for adaptive calculation of the interaction importance of each feature pair, flexibly balancing the complex interactions between different input features, improving the flexibility of feature interaction, and fully exploring the deep relationships between different input features. Subsequently, according to the attention weights corresponding to each feature pair, the feature interaction vectors corresponding to each feature pair are weighted to obtain weighted feature interaction vectors corresponding to each feature pair. Thus, the interaction strength of the feature interaction vectors is effectively controlled by the attention weights, making the obtained weighted feature interaction vectors more accurate, thereby effectively improving the accuracy of feature interaction. Finally, based on the weighted feature interaction vectors corresponding to multiple feature pairs, prediction processing is performed to obtain the trigger probability of the recommended content for the recommended object. Based on the trigger probability, the operation of recommending the content to be recommended to the recommended object is executed. In this way, the weighted feature interaction vectors corresponding to multiple feature pairs are quantified into a single trigger probability, enabling the formulation of an effective recommendation strategy based on this probability. In summary, this embodiment of the present disclosure, by calculating the attention weight of each feature pair in real time, can adaptively realize the weight allocation of different feature pairs, effectively improving the flexibility of feature interaction and fully exploring the deep relationships between different input features, thereby effectively improving the accuracy of content recommendation.

[0020] Other features and advantages of this disclosure will be set forth in the following description and will be apparent in part from the description or may be learned by practicing the disclosure. The objects and other advantages of this disclosure may be realized and obtained by means of the structures particularly pointed out in the description, claims, and drawings. Attached Figure Description

[0021] The accompanying drawings are provided to further understand the technical solutions of this disclosure and constitute a part of the specification. They are used together with the embodiments of this disclosure to explain the technical solutions of this disclosure and do not constitute a limitation on the technical solutions of this disclosure. Figure 1 This is a system architecture diagram of a content recommendation method applied according to embodiments of the present disclosure; Figure 2 This is a schematic diagram illustrating the application of the content recommendation method according to embodiments of this disclosure to an online shopping mall scenario; Figure 3 This is a schematic diagram illustrating the application of the content recommendation method according to embodiments of this disclosure to a news and information reading scenario; Figure 4 This is a schematic diagram illustrating the application of the content recommendation method according to embodiments of this disclosure to an educational materials recommendation scenario; Figure 5 This is a general flowchart of a content recommendation method according to an embodiment of the present disclosure; Figure 6A -C is Figure 5 A schematic diagram of three specific embodiments of step 510; Figure 7 yes Figure 5 A detailed flowchart of step 530; Figure 8 This is a schematic diagram illustrating the principle that influences weight calculation; Figure 9 This is a schematic diagram illustrating the principle of averaging the influence weights. Figure 10 This is a schematic diagram illustrating the principle of fusion processing of influence weights; Figure 11 This is a schematic diagram illustrating the principle of multi-head attention mechanism and weighted processing; Figure 12 yes Figure 5 A detailed flowchart of step 520; Figure 13 yes Figure 5 A detailed flowchart of step 550; Figure 14 This is a flowchart illustrating a specific implementation of a content recommendation method according to an embodiment of the present disclosure; Figure 15 This is a schematic diagram illustrating the principle of attention calculation performed by the attention head; Figure 16 This is a schematic diagram illustrating the principle of weighted fusion processing; Figure 17 This is a block diagram of a content recommendation apparatus according to an embodiment of the present disclosure; Figure 18 This is implemented according to an embodiment of the present disclosure. Figure 5 The diagram shows the terminal structure of the content recommendation method. Figure 19 This is implemented according to an embodiment of the present disclosure. Figure 5 The diagram shows the server architecture of the content recommendation method. Detailed Implementation

[0022] To enable those skilled in the art to better understand the solutions disclosed herein, the technical solutions in the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of this disclosure, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of this disclosure without creative effort are within the scope of protection of this disclosure.

[0023] It should be noted that while some processes described in the specification, claims, and accompanying drawings contain multiple steps that appear in a specific order, it should be clearly understood that these steps may not be performed in the order they appear herein, or may be performed in parallel. The step numbers are merely used to distinguish different steps and do not represent any particular order of execution. Furthermore, descriptions such as "first," "second," or "objective" in this document are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.

[0024] It is worth noting that in various specific embodiments of this disclosure, when processing is required based on relevant data such as object characteristics and content characteristics, the permission or consent of the object is obtained first. Furthermore, the collection, use, and processing of this data comply with relevant laws, regulations, and standards. In addition, when embodiments of this disclosure require obtaining relevant data such as object characteristics and content characteristics, separate permission or consent from the object is obtained through pop-ups or redirection to a confirmation page. Only after obtaining the object's separate permission or consent is the necessary relevant data, such as object characteristics and content characteristics, required for the proper functioning of embodiments of this disclosure is obtained.

[0025] Before providing a further detailed description of the embodiments of this disclosure, the terms and concepts used in these embodiments are explained, and they are subject to the following interpretations: Content Recommendation (CR) refers to the intelligent filtering and recommendation of massive amounts of content. Relying on artificial intelligence technology, it analyzes relevant data about objects or content from multiple dimensions to select content that is relevant to or of interest to the target audience and then pushes this content to them. Currently, content recommendation is widely used in scenarios such as video platforms, e-commerce websites, and news information, improving both the efficiency of content discovery and the user experience, as well as the accuracy of content distribution.

[0026] Self-attention is a key technique in deep learning for processing sequential data. Widely used in fields such as natural language processing, computer vision, and cross-modal tasks, its core principle lies in simultaneously calculating the relationships between all elements within a sequence to address the limitations of traditional sequence models (such as recurrent neural networks) in capturing long-range dependencies and parallel computation. For example, in the sentence "The cat sat on the mat because it was tired," self-attention can directly establish the association between "it" and "cat" without relying on progressively passed hidden states, thus effectively uncovering the semantic connections within the data.

[0027] Multi-head attention is an extension of self-attention. Widely used in fields such as natural language processing, computer vision, and cross-modal tasks, it acquires the attention distribution across different subspaces of the input sequence by running multiple independent self-attention mechanisms in parallel, thus capturing a more comprehensive range of potential semantic relationships within the sequence. In this way, multi-head attention can process the input sequence from different perspectives in parallel, thereby improving the model's ability to understand and capture complex dependencies.

[0028] Faced with the need for content recommendation, current solutions typically involve feature interaction between object features and content features. The results of this interaction are then processed using models such as deep neural networks to achieve content recommendation. However, these technologies often pre-learn the weights required for feature interaction, such as the weights of each feature pair. This results in insufficient flexibility in feature interaction, making it difficult to balance the complex interactions between different features, thus leading to low accuracy in content recommendation. Therefore, a technology capable of accurately recommending content to objects is needed.

[0029] To address this, embodiments of this disclosure provide a content recommendation method, apparatus, electronic device, related medium, and program product. The method first acquires multiple feature pairs, each containing two input features from an input feature set, where the input features are either object features of the recommended object or content features of the content to be recommended. Next, feature interaction processing is performed on the two input features in each feature pair to obtain a feature interaction vector corresponding to each feature pair. Then, based on the concatenation result of the feature interaction vectors corresponding to each feature pair, attention calculation is performed to obtain the attention weight corresponding to each feature pair. Subsequently, according to the attention weights corresponding to the multiple feature pairs, the feature interaction vectors corresponding to the multiple feature pairs are weighted to obtain weighted feature interaction vectors corresponding to the multiple feature pairs. Finally, based on the weighted feature interaction vectors corresponding to the multiple feature pairs, prediction processing is performed to obtain the trigger probability of the recommended object for the content to be recommended, and based on the trigger probability, the operation of recommending the content to be recommended to the recommended object is executed. Compared to related technologies that rely on pre-learned weights, the embodiments of this disclosure can adaptively allocate weights to different feature pairs by calculating the attention weights of each feature pair in real time, thereby improving the flexibility of feature interaction and fully exploring the deep relationships between different input features. Therefore, the embodiments of this disclosure can effectively improve the accuracy of content recommendation.

[0030] System architecture and scenario description of the embodiments disclosed herein Figure 1 This is a system architecture diagram of the content recommendation method applied according to embodiments of the present disclosure. It includes a terminal 140, an Internet 130, a gateway 120, a server 110, etc.

[0031] Terminal 140 can take various forms, including desktop computers, laptops, personal digital assistants (PDAs), mobile phones, in-vehicle terminals, and dedicated terminals. Furthermore, it can be a single device or a collection of multiple devices. For example, multiple desktop computers connected via a local area network, sharing a single monitor, can work collaboratively to form a single terminal 140. Terminal 140 can communicate with the Internet 130 via wired or wireless means to exchange data.

[0032] Server 110 refers to a computer system capable of providing certain services to terminal 140. Compared to ordinary terminal 140, server 110 has higher requirements in terms of stability, security, and performance. Server 110 can be a single high-performance computer in a network platform, a cluster of multiple high-performance computers, a portion of a single high-performance computer (e.g., a virtual machine), or a combination of portions of multiple high-performance computers (e.g., virtual machines). Server 110 can also communicate with the Internet 130 via wired or wireless means to exchange data.

[0033] Gateway 120, also known as an internetwork connector or protocol converter, is a computer system or device that acts as a translator, enabling network interconnection at the transport layer. It bridges the gap between two systems using different communication protocols, data formats, languages, or even completely different architectures. Gateways can also provide filtering and security functions. Messages sent from terminal 140 to server 110 are forwarded to the corresponding server 110 via gateway 120. Messages sent from server 110 to terminal 140 are also forwarded to the corresponding terminal 140 via gateway 120.

[0034] The embodiments disclosed herein can be applied in various scenarios, such as Figure 2 The online shopping scenario shown Figure 3 The scene shown is a news reading scenario. Figure 4 The educational course platform shown here features optimized display scenarios, etc.

[0035] (a) Scenarios of online shopping malls.

[0036] In today's digital age, online shopping has become an indispensable part of people's daily lives, offering an ever-expanding variety of goods, from fashion apparel and electronics to home furnishings. Despite the vast array of products available online, shoppers often struggle to find items they are truly interested in or need. For example, when someone wants to buy a particular product, they may be faced with hundreds or even thousands of different brands and models, each with varying specifications, features, and prices. This makes the product selection process both time-consuming and laborious, resulting in a poor shopping experience.

[0037] The content recommendation method of this disclosure can quickly and accurately recommend products that an object needs or is interested in. For example, such as... Figure 2The e-commerce interface of terminal 140 shown includes a product search input area 141, a product search control 142, and a product display area 143. Users can enter the keyword "skin" in the product search input area 141 and trigger the product search control 142 to search for desired skin products. Responding to the trigger command of the product search control 142, terminal 140 determines the trigger probability for each product based on multiple object characteristics (such as industry, browsing history, purchase history, currently entered product keywords, etc.) and multiple content characteristics of the products (such as type, function, parameters, price, etc.), and displays products with trigger probabilities higher than a probability threshold in the product display area 143. (The text abruptly ends here, likely due to an incomplete sentence or missing information.) Figure 2 In the shopping mall interface of terminal 140 shown, the final displayed products are skin product 1, skin product 2, skin product 3, and skin product 4. These products are recommended to the user, allowing them to quickly find skin products that meet their shopping needs, thereby improving their shopping experience. The triggering method for the product search control 142 is not specifically limited. For example, the product search control 142 can be a click-to-confirm button, triggered by clicking; it can also be a scrolling / sliding selector, triggered by scrolling or sliding selection, but it is not limited to these.

[0038] The following example uses any one of the aforementioned products (named "Current Product") as the content to be recommended. First, terminal 140 acquires multiple object features of the object and multiple content features of the current product, and combines these features to obtain multiple feature pairs. Then, terminal 140 performs feature interaction processing on each feature pair to obtain feature interaction vectors corresponding to each feature pair, and calculates attention for these feature interaction vectors to obtain attention weights for each feature pair. Next, terminal 140 weights the feature interaction vectors corresponding to each feature pair according to their attention weights to obtain weighted feature interaction vectors for each feature pair. Finally, terminal 140 performs prediction processing based on the weighted feature interaction vectors to obtain the trigger probability of the object for the current product. If the trigger probability of the object for the current product is higher than a probability threshold, the current product is displayed on the marketplace interface to recommend it to the object; otherwise, the current product is not displayed on the marketplace interface.

[0039] By using the above method, the probability of an object triggering the current product can be accurately determined based on multiple object features of the object and multiple content features of the current product. Based on this trigger probability, the operation of recommending the current product to the object can be executed, thereby improving the object's shopping experience, meeting the object's shopping needs, and helping to increase the purchase rate of the product.

[0040] (ii) Scenarios for reading news and information.

[0041] Currently, consumers' needs for news reading primarily focus on efficiently acquiring information closely aligned with their personal interests. With the accelerating pace of life, consumers increasingly prefer to utilize fragmented time to quickly browse news of interest in order to stay informed about social dynamics. However, faced with a massive and diverse amount of news daily, consumers struggle to quickly locate news that truly interests them. For example, a consumer interested in technology news might be overwhelmed by entertainment or sports news, requiring them to spend considerable time finding technology-related information, resulting in a poor reading experience.

[0042] The content recommendation method of this disclosure can reorder current news information to recommend news information that an individual truly needs or is genuinely interested in. As an example, in... Figure 3 The news interface of the terminal 140 shown includes a news rearrangement control 144 and a news display area 145. The news display area 145 displays multiple news items of different types, such as News 1, News 2, ..., News N. An object can trigger the news rearrangement control 144 to rearrange the news and refresh the multiple news items displayed in the news display area 145. In response to the trigger command to the news rearrangement control 144, the terminal 140 determines the trigger probability for each news item based on multiple object characteristics (such as industry, daily work type, education level, browsing history, search history, average reading time per news item, etc.) and multiple content characteristics of the news items (such as type, keywords, word count, estimated reading time, etc.). These news items are then displayed in the news display area 145 in descending order of trigger probability. News items ranked higher are more relevant to the object's reading needs, while news items ranked lower are less relevant. In other words, [the text abruptly ends here]. Figure 3 In the news interface of terminal 140 shown, the news items ultimately displayed are, in order, News 2, News N, ..., News 1, with News N being the news information that best suits the reader's needs. The triggering method for the news rearrangement control 144 is not specifically limited. For example, the news rearrangement control 144 can be a click-to-confirm button, triggered by clicking; the news rearrangement control 144 can also be a scroll / slide selector, triggered by scrolling or sliding selection, but it is not limited to these.

[0043] The following example uses any one of the aforementioned news items (named "Current News") as the content to be recommended. First, terminal 140 acquires multiple object features of the object and multiple content features of the current news item, and combines these features to obtain multiple feature pairs, each pair consisting of two features. Then, terminal 140 performs feature interaction processing on each feature pair to obtain feature interaction vectors corresponding to each feature pair, and calculates attention for these feature interaction vectors to obtain attention weights for each feature pair. Next, terminal 140 weights the feature interaction vectors corresponding to each feature pair according to their attention weights to obtain weighted feature interaction vectors for each feature pair. Finally, terminal 140 performs prediction processing based on the weighted feature interaction vectors for each feature pair to obtain the trigger probability of the object for the current news item.

[0044] By employing the above method, the trigger probability of an object for the current news can be accurately determined based on multiple object features and multiple content features of the current news. Based on this trigger probability, the operation of recommending the current news to the object is executed, thereby satisfying the object's reading needs. For example, if an object using terminal 140 is interested in financial news but cannot find news that meets its reading needs due to the large volume of news, terminal 140 can calculate the trigger probability of the object for each news item using the above method. Based on the calculated trigger probability, multiple news items are sorted, with the news at the top of the sort being the financial news that the object is interested in, allowing the object to quickly find financial news and thus improving its reading experience.

[0045] (III) Optimized display scenarios for educational course platforms.

[0046] With the rapid development of the online education market, educational course platforms have experienced explosive growth, providing users with educational materials such as video courses, e-books, and after-class exercises. Users' core needs often revolve around efficiently accessing high-quality materials closely related to their learning goals. However, these platforms offer thousands of educational resources for each subject category, making it difficult for users to choose which materials they truly need, resulting in a poor learning experience.

[0047] The content recommendation method of this disclosure can quickly locate the educational materials needed by an object and recommend them to the object. As an example, in... Figure 4The terminal 140's educational course platform interface displays a data display area 146. During the loading process of the educational course platform, the terminal 140 determines the trigger probability of each educational material for the object based on multiple object characteristics (such as industry, education level, daily work type, years of work experience, content type preference information, historical learning records, average daily learning time, etc.) and multiple content characteristics of the educational materials (such as content type, subject area, difficulty, estimated learning time, etc.). Educational materials with a trigger probability higher than a probability threshold are pre-displayed in the data display area 146. This allows the object to quickly locate the required educational materials when entering the educational course platform interface, thereby improving the object's learning experience. Figure 4 In the educational course platform interface of the terminal 140 shown, the final displayed educational materials are Educational Material 1, Educational Material 2, ..., Educational Material 9, which are the educational materials ultimately recommended to the target audience.

[0048] The following example uses any of the aforementioned educational materials (named "Current Educational Material") as the content to be recommended. First, terminal 140 acquires multiple object features of the object and multiple content features of the current educational material, and combines these features to obtain multiple feature pairs, each containing two features. Then, terminal 140 performs feature interaction processing on each feature pair to obtain feature interaction vectors corresponding to each feature pair, and performs attention calculations on these feature interaction vectors to obtain attention weights for each feature pair. Next, terminal 140 weights the feature interaction vectors corresponding to each feature pair according to their attention weights to obtain weighted feature interaction vectors for each feature pair. Finally, terminal 140 performs prediction processing based on the weighted feature interaction vectors for each feature pair to obtain the trigger probability of the object for the current educational material.

[0049] By using the above method, the trigger probability of an object to the current educational material can be accurately determined based on multiple object features of the object and multiple content features of the current educational material. Based on this trigger probability, the operation of optimizing the display of the current educational material to the object can be performed, thereby improving the object's learning experience and meeting the object's learning needs.

[0050] It is worth noting that, Figure 1 The system architecture shown and Figures 2 to 4 The scenarios shown are for the purpose of more clearly illustrating the technical solutions of the embodiments of this disclosure, and do not constitute a limitation on the technical solutions provided by the embodiments of this disclosure. As those skilled in the art will know, with the evolution of content recommendation technology and the emergence of new business scenarios, the technical solutions provided by the embodiments of this disclosure are also applicable to similar technical problems.

[0051] General Description of Embodiments in this Disclosure According to one embodiment of this disclosure, a content recommendation method is provided.

[0052] Content refers to the information to be recommended; it is any information that can be manipulated (e.g., read, used). In some embodiments, content can be categorized by its presentation format, such as text-based content, multimedia content, etc. For example, text-based content may include news, blogs, e-books, etc., while multimedia content may include short videos, music, movies, etc. In some embodiments, content can be categorized by its function and purpose, such as information, knowledge and learning, goods and services, etc. For example, goods and services content may include e-commerce products, courses, travel packages, etc.

[0053] Recommendation refers to the process of pushing information to recommended objects, which are the entities that trigger the recommendation behavior. In some embodiments, the recommended object can be a real user. In other embodiments, the recommended object can be an account.

[0054] Content recommendation methods are methods for pushing recommended content to users. These methods can be used for search recommendations on social media feeds, click-through rate prediction and ad placement, and for applications such as online shopping, news reading, and optimized display of educational courses.

[0055] The content recommendation method of this disclosure can be executed on terminal 140, on server 110, or partly on terminal 140 and partly on server 110.

[0056] like Figure 5 As shown, a content recommendation method according to one embodiment of this disclosure includes: Step 510: Obtain multiple feature pairs. Each feature pair contains two input features from the input feature set. The input features in the input feature set are either the object features of the recommended object or the content features of the content to be recommended. Step 520: Perform feature interaction processing on the two input features in each feature pair to obtain the feature interaction vector corresponding to each feature pair; Step 530: Based on the concatenation result of the feature interaction vectors corresponding to each feature pair, perform attention calculation to obtain the attention weights corresponding to each feature pair; Step 540: Based on the attention weights corresponding to the multiple feature pairs, perform weighted processing on the feature interaction vectors corresponding to the multiple feature pairs respectively to obtain the weighted feature interaction vectors corresponding to the multiple feature pairs respectively. Step 550: Based on multiple features, perform prediction processing on the corresponding weighted feature interaction vectors to obtain the trigger probability of the recommended object for the recommended content; Step 560: Based on the trigger probability, perform the operation of recommending the content to be recommended to the recommendation object.

[0057] Steps 510-560 are briefly described below.

[0058] In step 510, when executing the content recommendation method provided in this embodiment, firstly, the object that triggers content recommendation (i.e., recommendation behavior) and the information that can be operated (e.g., read, use, etc.) during content recommendation are determined. In this embodiment, the object that triggers content recommendation is recorded as the recommendation object, and the information that can be operated during content recommendation is recorded as the content to be recommended. Then, multiple object features of the recommendation object and multiple content features of the content to be recommended are obtained, and an input feature set is constructed based on these features. It should be understood that the input feature set includes multiple input features, which are either the object features of the recommendation object or the content features of the content to be recommended. Finally, the multiple input features in the input feature set are combined in pairs to obtain multiple feature pairs. Here, multiple feature pairs are obtained based on the input feature set, and each feature pair contains two input features from the input feature set, which are either the object features of the recommendation object or the content features of the content to be recommended. In this way, while retaining the key information related to the recommendation object and the content to be recommended, using feature pairs as the processing objects for subsequent feature interaction processing helps to improve the efficiency of feature interaction.

[0059] Object features refer to the characteristic information associated with the basic attributes, behaviors, preferences, and other characteristics of the recommended object. Object features can be set according to the actual application scenario. For example, in the scenario of online shopping, the object features of the recommended object can be its basic attribute features, behavioral features, and preference features. Basic attribute features can be industry, terminal model used, etc.; behavioral features can be browsing history, purchase history, search history, currently entered product keywords, etc.; and preference features can be product ratings, product reviews, product favorites, etc. As another example, in the scenario of reading news and information, the object features of the recommended object can be its basic attribute features, behavioral features, and preference features. Basic attribute features can be industry, daily work type, education level, etc.; behavioral features can be browsing history, search history, high-frequency access periods, average reading time per news article, etc.; and preference features can be language preference information (e.g., Chinese, English), news reviews, news favorites, etc. For another example, in the scenario of optimizing the display of educational courses on an educational platform, the object characteristics of the recommended object can be the basic attribute characteristics, behavioral characteristics, and preference characteristics of the recommended object. Among them, the basic attribute characteristics can be industry, education level, daily work type, years of work experience, etc.; the behavioral characteristics can be historical learning records, average daily learning time, peak learning time, etc.; and the preference characteristics can be language preference information, content type preference information (e.g., video, text), educational material collection list, etc.

[0060] Object features are highly correlated with the recommended objects and can highlight the characteristics of the recommended objects. Recommended objects that share a common set of features are likely to exhibit certain commonalities in content recommendation. Therefore, using object features for content recommendation may help improve the effectiveness of content recommendation. The following example illustrates this using object features including education level, industry, years of work experience, and preference characteristics.

[0061] People with similar educational backgrounds are more likely to be recommended the same content. For example, in a scenario where educational course platforms optimize the display, most high school students may prefer high school educational materials such as Chinese, mathematics, and English, while most college students may prefer college educational materials such as advanced mathematics, linear algebra, and college physics.

[0062] People within the same industry may also have certain preferences when it comes to content recommendations. For example, in the scenario of optimizing the display of educational courses on an educational platform, programmers tend to prefer educational materials related to programming, so recommending programming-related educational materials to programmers is more likely than to people in other industries.

[0063] In terms of work experience, users with longer work experience are more likely to choose recommended content that benefits their career development, while users with shorter work experience are more likely to choose content that helps them familiarize themselves with their work. For example, in the context of optimized display on educational course platforms, users with longer work experience are more likely to choose advanced educational materials, while users with shorter work experience are more likely to choose introductory educational materials.

[0064] Furthermore, different preferences and behaviors can also influence content recommendations. For example, in an online shopping mall scenario, if a user who likes skin products repeatedly browses their favorite skins and adds them to their favorites list, similar skin products can be recommended to that user.

[0065] In this embodiment, the method of obtaining object features is not limited. For example, object features can be obtained locally or from the cloud. In some embodiments, object features can be collected from various information channels on the Internet, such as web pages, online stores, forums, blogs, or social media platforms, to obtain feature information related to the recommended object as object features. In some embodiments, object features can also be uploaded by the recommended object itself. Figure 1 Taking the illustrated system architecture as an example, the recommended object can edit its object features according to its needs and input them into the terminal 140 that executes the content recommendation method provided in this embodiment. The terminal 140 can then recommend the content to be recommended to the recommended object by executing the content recommendation method provided in this embodiment. Furthermore, there is no limitation on the language involved in the acquired object features; for example, it can be feature information in at least one language such as "Chinese," "English," "French," and "German." In addition, there is no limitation on the number of object features corresponding to the recommended object; that is, the number of object features of the recommended object can be arbitrary. Similarly, there is no limitation on the number of feature information contained in a single object feature. In some embodiments, a single object feature can include multiple feature information; for example, in the scenario of reading news and information, object feature 1 includes industry and education level. In some embodiments, a single object feature can also include only one feature information; for example, in the scenario of reading news and information, object feature 1 only includes industry.

[0066] It should be noted that in this embodiment of the disclosure, when obtaining object characteristics, it is necessary to ensure the legality of the object characteristics acquisition, that is, to comply with relevant laws and regulations and protect the privacy and data security of the relevant objects.

[0067] Content features refer to the characteristic information associated with the content to be recommended. The type of content features can be set according to the actual application scenario. For example, in the scenario of online shopping mall, the content to be recommended is a product. The content features of the content to be recommended can be the type of content (e.g., watch, sofa), function, parameters, price, shipping location, production location, number of favorites, etc. For example, in the scenario of news reading, the content to be recommended is news. The content features of the content to be recommended can be the type of content (e.g., technology, finance), keywords, length, word count, estimated reading time, number of favorites, number of views, etc. For example, in the scenario of optimizing the display of educational courses on an educational platform, the content to be recommended is educational materials. The content features of the content to be recommended can be the content type (e.g., video, text), subject area (e.g., Chinese, mathematics), difficulty (e.g., low, medium, high difficulty), estimated learning time, etc.

[0068] Content features are highly correlated with the content to be recommended and can highlight its characteristics. Content to be recommended that shares a common set of features is likely to exhibit certain commonalities in content recommendation. For example, in online shopping scenarios, skincare products may be recommended to a specific group of items. Similarly, in news reading scenarios, lengthy news articles may be recommended to a specific group of items. Furthermore, in educational course platform optimization scenarios, low-difficulty educational materials may be recommended to a specific group of items. Therefore, using content features in content recommendation may help improve its effectiveness.

[0069] In this embodiment, the method of acquiring content features is not limited. For example, content features can be acquired locally or from the cloud. In some embodiments, content features can be collected from various information channels on the Internet. For example, in an online shopping mall scenario, the content to be recommended is a product, and the feature information related to the product is acquired from the online shopping mall platform as content features. Furthermore, there are no restrictions on the language involved in the acquired content features. For example, it can be feature information in at least one language such as "Chinese," "English," "French," and "German." Also, there is no restriction on the number of content features corresponding to the content to be recommended; that is, the number of content features of the content to be recommended can be arbitrary. Similarly, there is no restriction on the number of feature information contained in the content features. In some embodiments, a single content feature can include multiple feature information. For example, in an online shopping mall scenario, content feature 1 can include type, function, and parameters. In some embodiments, a single content feature can also include only one feature information. For example, in an online shopping mall scenario, content feature 1 only includes type.

[0070] It's worth noting that the input feature set can be represented as a 1xW matrix, where W is the number of features, rows have no special meaning, and elements represent the specific values ​​of the features. Quantifying the specific values ​​of features can be done by directly using the numerical value of the feature as its specific value. For example, if the price value is 70, then the specific value of the content feature corresponding to the price is 70. Alternatively, the feature value can be mapped to a specific value. For example, if the price value is 70, the corresponding mapping value can be found in a price value mapping table. For instance, if the mapping value is 0.1, this mapping value can be used as the specific value of the content feature corresponding to the price; that is, the specific value of the content feature corresponding to the price is 0.1. This price value mapping table can include multiple price values ​​and their corresponding mapping values. The relationship between price values ​​and their corresponding mapping values ​​can be flexibly set according to the actual situation. Using matrix representation allows for the rapid integration of all content features and all object features in the input feature set. If the matrix is ​​used as a basis for subsequent processing, it helps simplify the computational workload of subsequent processing, thereby accelerating the content recommendation speed.

[0071] Feature pairs refer to information obtained by combining multiple content features and multiple recommendation features in pairs. A feature pair contains two input features, which can be object features or content features.

[0072] The following is combined Figures 6A-6C The different combinations of feature pairs are described.

[0073] In some embodiments, for multiple object features of a recommended object, pairwise combinations of these object features yield multiple feature pairs belonging to the recommended object, with each feature pair including two object features. Similarly, for multiple content features of the content to be recommended, pairwise combinations of these content features yield multiple feature pairs belonging to the content to be recommended, with each feature pair including two content features. The multiple feature pairs belonging to the recommended object and the multiple feature pairs belonging to the content to be recommended are determined as the final multiple feature pairs. Thus, by combining the object features of the recommended object and the content features of the content to be recommended separately, the internal correlations between the recommended object and the content to be recommended can be mined, capturing the internal latent patterns of both object features and content features. This effectively enhances the information representation of both the object features of the recommended object and the content features of the content to be recommended, contributing to improved accuracy in subsequent feature interaction processing.

[0074] by Figure 6ATaking the content features and object features shown as examples, the recommended object corresponds to object feature 1, object feature 2, and object feature 3, and the content to be recommended corresponds to content feature 1, content feature 2, and content feature 3. Combining object features 1, 2, and 3 in pairs yields three feature pairs: feature pair 1 (composed of object features 1 and 2), feature pair 2 (composed of object features 1 and 3), and feature pair 3 (composed of object features 2 and 3). Combining content features 1, 2, and 3 in pairs yields three feature pairs: feature pair 4 (composed of content features 1 and 2), feature pair 5 (composed of content features 1 and 3), and feature pair 6 (composed of content features 2 and 3). Through these combinations, six feature pairs can be obtained.

[0075] In some embodiments, for multiple object features of the recommended object and multiple content features of the content to be recommended, a single object feature and a single content feature can be combined to obtain a single feature pair that simultaneously belongs to both the recommended object and the content to be recommended. Such a single feature pair includes a single content feature and a single object feature. Multiple feature pairs simultaneously belonging to both the recommended object and the content to be recommended can be obtained through this combination method, and these multiple feature pairs are determined as the final multiple feature pairs. In this way, by mixing and combining the object features of the recommended object and the content features of the content to be recommended, the object features of the recommended object and the content features of the content to be recommended are directly associated (e.g., in the scenario of online shopping malls, the industry of the recommended object and the type of the content to be recommended are directly associated). This allows for the initial capture of the correlation between the recommended object and the content to be recommended, retaining key information that is simultaneously associated with both, thereby helping to improve the accuracy of subsequent feature interaction processing.

[0076] by Figure 6B Taking the content features and object features shown as examples, the recommended object corresponds to object feature 1 and object feature 2, and the content to be recommended corresponds to content feature 1 and content feature 2. By combining a single object feature and a single content feature, four feature pairs can be obtained, namely feature pair 1 (composed of object feature 1 and content feature 1), feature pair 2 (composed of object feature 1 and content feature 2), feature pair 3 (composed of object feature 2 and content feature 1), and feature pair 4 (composed of object feature 2 and content feature 2).

[0077] In some embodiments, firstly, for multiple object features of the recommended object, the multiple object features are combined in pairs to obtain multiple feature pairs belonging to the recommended object. Each feature pair belonging to the recommended object includes two object features. Similarly, for multiple content features of the content to be recommended, the multiple content features are combined in pairs to obtain multiple feature pairs belonging to the content to be recommended. Each feature pair belonging to the content to be recommended includes two content features. Secondly, for the multiple object features of the recommended object and the multiple content features of the content to be recommended, a single object feature and a single content feature are combined to obtain a single feature pair belonging to both the recommended object and the content to be recommended. Such a single feature pair includes a single content feature and a single object feature. The multiple feature pairs belonging to the recommended object, the multiple feature pairs belonging to the content to be recommended, and the multiple feature pairs belonging to both the recommended object and the content to be recommended are determined as the final multiple feature pairs. The above method combines separate combination methods and hybrid combination methods. By combining separately, the internal latent patterns of object features and the internal latent patterns of content features can be captured, thereby effectively enhancing the information expression of the object features of the recommended object and the information expression of the content features of the content to be recommended. Meanwhile, by employing a hybrid combination approach, the correlation between the recommended object and the content to be recommended can be initially captured, while retaining key information that is associated with both. Thus, by integrating separate and hybrid combination methods, more effective information can be provided for subsequent feature interaction processing, thereby helping to further improve the accuracy of subsequent feature interaction processing.

[0078] by Figure 6C Taking the content shown as an example, the recommended objects correspond to object feature 1, object feature 2, and object feature 3, while the content to be recommended corresponds to content feature 1 and content feature 2. First, object feature 1, object feature 2, and object feature 3 are combined in pairs to obtain three feature pairs: feature pair 1 (composed of object feature 1 and object feature 2), feature pair 2 (composed of object feature 1 and object feature 3), and feature pair 3 (composed of object feature 2 and object feature 3). Similarly, content feature 1 and content feature 2 are combined in pairs to obtain one feature pair, namely feature pair 4 (composed of content feature 1 and content feature 2). Second, by combining individual object features and individual content features, nine feature pairs can be obtained: feature pair 5 (composed of object feature 1 and content feature 1), feature pair 6 (composed of object feature 1 and content feature 2), feature pair 7 (composed of object feature 2 and content feature 1), feature pair 8 (composed of object feature 2 and content feature 2), feature pair 9 (composed of object feature 3 and content feature 1), and feature pair 10 (composed of object feature 3 and content feature 2). The above combination method can yield 10 feature pairs.

[0079] In this embodiment of the disclosure, the representation of feature pairs is not specifically limited. In some embodiments, feature pairs are represented such that the feature with the smaller number is represented first, and the feature with the larger number is represented later.

[0080] by Figure 6A Taking the content features and object features shown as examples, and taking feature pair 1 as an example, feature pair 1 consists of object feature 1 and object feature 2. Since the number of object feature 1 is 1 and the number of object feature 2 is 2, and the number of object feature 1 is less than the number of object feature 2, feature pair 1 can be represented as [object feature 1, object feature 2]. by Figure 6B Taking the content features and object features shown as examples, object feature 1, object feature 2, content feature 1, and content feature 2 are sorted. The sorting method can be flexibly set according to the actual situation; for example, object features can be sorted first, followed by content features, or vice versa, but it is not limited to this. In some embodiments, object features are sorted first, followed by content features, that is, object feature 1 is feature 1, object feature 2 is feature 2, content feature 1 is feature 3, and content feature 2 is feature 4, etc. Figure 6B Taking feature pair 1 as an example, feature pair 1 consists of object feature 1 and content feature 1, that is, feature pair 1 consists of feature 1 and feature 3. Since the sorted number of object feature 1 is 1 and the sorted number of content feature 1 is 3, the sorted number of object feature 1 is less than the sorted number of content feature 1. Therefore, feature pair 1 can be represented as [object feature 1, content feature 1]. In some embodiments, the content features are sorted first and the object features are sorted second, that is, content feature 1 is feature 1, content feature 2 is feature 2, object feature 1 is feature 3, and object feature 2 is feature 4, and so on. Figure 6B Taking feature pair 1 as an example, since the number of content feature 1 after sorting is 1 and the number of object feature 1 after sorting is 3, and the number of content feature 1 after sorting is less than the number of object feature 1 after sorting, feature pair 1 can be represented as [content feature 1, object feature 1].

[0081] by Figure 6CTaking the content features and object features shown as examples, object feature 1, object feature 2, object feature 3, content feature 1, and content feature 2 are sorted. The sorting method can be flexibly set according to the actual situation; for example, object features can be sorted first, followed by content features, or vice versa, but it is not limited to this. In some embodiments, object features are sorted first, followed by content features, that is, object feature 1 is feature 1, object feature 2 is feature 2, object feature 3 is feature 3, content feature 1 is feature 4, and content feature 2 is feature 5, etc. Figure 6C Taking feature pair 10 as an example, feature pair 10 consists of object feature 3 and content feature 2, that is, feature pair 10 consists of feature 3 and feature 5. Since object feature 3 is numbered 3 after sorting and content feature 2 is numbered 5 after sorting, the number of object feature 3 after sorting is less than the number of content feature 2 after sorting. Therefore, feature pair 10 can be represented as [object feature 3, content feature 2]. In some embodiments, the content features are sorted first and the object features are sorted second, that is, content feature 1 is feature 1, content feature 2 is feature 2, object feature 1 is feature 3, object feature 2 is feature 4, object feature 3 is feature 5, and so on. Figure 6C Taking feature pair 10 as an example, since content feature 2 is numbered 2 after sorting and object feature 3 is numbered 5 after sorting, and the number of content feature 2 after sorting is less than the number of object feature 3 after sorting, feature pair 10 can be represented as [content feature 2, object feature 3].

[0082] In some embodiments, feature pairs are represented such that the feature with the larger number is represented first, and the feature with the smaller number is represented later.

[0083] by Figure 6A Taking the content features and object features shown as examples, and taking feature pair 1 as an example, feature pair 1 consists of object feature 1 and object feature 2. Since the number of object feature 1 is 1 and the number of object feature 2 is 2, and the number of object feature 2 is greater than the number of object feature 1, feature pair 1 can be represented as [object feature 2, object feature 1].

[0084] by Figure 6B Taking the content features and object features shown as examples, object feature 1, object feature 2, content feature 1, and content feature 2 are sorted. The sorting method can be flexibly set according to the actual situation; for example, object features can be sorted first, followed by content features, or vice versa, but it is not limited to this. In some embodiments, object features are sorted first, followed by content features, that is, object feature 1 is feature 1, object feature 2 is feature 2, content feature 1 is feature 3, and content feature 2 is feature 4, etc. Figure 6B Taking feature pair 1 as an example, feature pair 1 consists of object feature 1 and content feature 1, that is, feature pair 1 consists of feature 1 and feature 3. Since the sorted number of object feature 1 is 1 and the sorted number of content feature 1 is 3, the sorted number of content feature 1 is greater than the sorted number of object feature 1. Therefore, feature pair 1 can be represented as [content feature 1, object feature 1]. In some embodiments, the content features are sorted first and the object features are sorted second, that is, content feature 1 is feature 1, content feature 2 is feature 2, object feature 1 is feature 3, and object feature 2 is feature 4, and so on. Figure 6B Taking feature pair 1 as an example, since the content feature 1 is numbered 1 after sorting and the object feature 1 is numbered 3 after sorting, and the number of the object feature 1 after sorting is greater than the number of the content feature 1 after sorting, feature pair 1 can be represented as [object feature 1, content feature 1].

[0085] by Figure 6C Taking the content features and object features shown as examples, object feature 1, object feature 2, object feature 3, content feature 1, and content feature 2 are sorted. The sorting method can be flexibly set according to the actual situation; for example, object features can be sorted first, followed by content features, or vice versa, but it is not limited to this. In some embodiments, object features are sorted first, followed by content features, that is, object feature 1 is feature 1, object feature 2 is feature 2, object feature 3 is feature 3, content feature 1 is feature 4, and content feature 2 is feature 5, etc. Figure 6C Taking feature pair 10 as an example, feature pair 10 consists of object feature 3 and content feature 2, that is, it consists of feature 3 and feature 5. Since object feature 3 is numbered 3 after sorting and content feature 2 is numbered 5 after sorting, the number of content feature 2 after sorting is greater than the number of object feature 3 after sorting. Therefore, feature pair 10 can be represented as [content feature 2, object feature 3]. In some embodiments, the content features are sorted first and the object features are sorted second, that is, content feature 1 is feature 1, content feature 2 is feature 2, object feature 1 is feature 3, object feature 2 is feature 4, and object feature 3 is feature 5, and so on. Figure 6C Taking feature pair 10 as an example, since content feature 2 is numbered 2 after sorting and object feature 3 is numbered 5 after sorting, and the number of object feature 3 after sorting is greater than the number of content feature 2 after sorting, feature pair 10 can be represented as [object feature 3, content feature 2].

[0086] It is worth noting that each feature is represented by any of the above examples.

[0087] In step 520, feature interaction processing is performed on the two input features in each feature pair to obtain the feature interaction vector corresponding to each feature pair, thereby enabling preliminary interaction between different input features and initially capturing the shallow relationship between different input features.

[0088] Shallow relationships refer to simple connections between input features based on surface attributes or direct associations. They reflect the correlation between input features at a local or explicit level, such as linear correlation between two input features. Step 520 is equivalent to using the feature pair as a benchmark and performing preliminary interactions between the two input features within the feature pair to achieve shallow feature extraction. This shallow feature extraction method not only effectively reduces data dimensionality, ensuring that the number of data objects for attention computation is not excessive and reducing subsequent data processing, but also quickly captures the shallow relationships between different input features. That is, the extracted feature interaction vector can represent the shallow relationship between the two input features in the feature pair, thereby improving the accuracy of feature interactions and providing initial feature representation input for subsequent attention computation, which helps to further enhance the effect of attention computation.

[0089] In this embodiment of the disclosure, the feature interaction vector corresponds one-to-one with the feature pair, meaning that each feature pair has an independent feature interaction vector. For example, for feature pair 1 and feature pair 2, feature pair 1 consists of content feature 1 and object feature 1, then feature pair 1 has feature interaction vector 1, which is used to indicate the interaction result between content feature 1 and object feature 1; feature pair 2 consists of content feature 1 and content feature 2, then feature pair 2 has feature interaction vector 2, which is used to indicate the interaction result between content feature 1 and content feature 2.

[0090] In some embodiments, feature interaction processing is performed on the two input features in each feature pair to obtain the feature interaction vector corresponding to each feature pair. This may include: performing feature interaction processing on the two input features in each feature pair through a distance-based interaction modeling method to obtain the feature interaction vector corresponding to each feature pair.

[0091] Here, distance-based interaction modeling can be used to process the interaction between the two input features in each feature pair. This involves using a distance function to measure the shallow relationship between the two input features in each pair, thus obtaining the feature interaction vector for each pair. The type of distance function can be flexibly set according to the actual situation. For example, the distance function can be Euclidean distance, cosine similarity, Mahalanobis distance, etc., but is not limited to these. For instance, a cosine similarity function can be used as the distance function. By determining the cosine similarity between the two input features in each feature pair, the feature interaction vector for each pair can be obtained. This accurately captures the abstract semantic similarity between the two input features in each pair and reflects the dynamic changes between these two input features, thereby improving the accuracy of feature interaction. For example, the distance function can also include both cosine similarity and Euclidean distance functions. By determining the cosine similarity and Euclidean distance between the two input features in each feature pair, and averaging these values, the feature interaction vector for each feature pair is obtained. Cosine similarity-based interaction modeling can accurately capture the abstract semantic similarity between the two input features in each feature pair, while Euclidean distance-based interaction modeling can directly capture the geometric differences between the two input features in each feature pair. By focusing on the similarity and differences between two input features, the shallow relationships between them can be explored, thereby effectively improving the accuracy of feature interaction.

[0092] In step 530, since shallow feature extraction is limited to the local correlation between input features and is difficult to reveal the complex nonlinear correlation between input features, in order to further explore the correlation between input features, attention is calculated based on the concatenation result of the corresponding feature interaction vectors of each feature pair, based on the shallow feature extraction, to obtain the attention weight of each feature pair. This can flexibly balance the complex interaction between different input features, improve the flexibility of feature interaction, and fully explore the deep relationship between different input features.

[0093] Cascade refers to the mapping relationship or connection method between multiple objects. Specifically, in the embodiments of this disclosure, multiple feature pairs exist when implementing content recommendation. These feature pairs are the objects in the cascade concept, and the cascade result of the feature interaction vectors corresponding to each feature pair represents the connection between the feature interaction vectors corresponding to the multiple feature pairs respectively. For example, for feature pair 1, feature pair 2, and feature pair 3, feature pair 1 has feature interaction vector 1, feature pair 2 has feature interaction vector 2, and feature pair 3 has feature interaction vector 3. Taking feature pair 1 as an example, the cascade result of feature interaction vector 1 can include the connection between feature interaction vector 1 and feature interaction vector 2, and the connection between feature interaction vector 1 and feature interaction vector 3. Based on the former connection relationship, attention calculation can be performed based on feature interaction vector 1 and feature interaction vector 2 (for example, connecting feature interaction vector 1 and feature interaction vector 2 and inputting it into the attention head to perform attention calculation on feature interaction vector 1 and feature interaction vector 2 in the attention head). Based on the latter connection relationship, attention calculation can be performed based on feature interaction vector 1 and feature interaction vector 3.

[0094] Attention weighting refers to assigning different weights to different pieces of information that need to be considered in solving a problem in a specific scenario. Information that is more helpful in solving the problem is given higher weights, while information that is less helpful is given lower weights, thus making better use of this information to solve the problem. Specifically, in this embodiment of the disclosure, multiple feature pairs exist when implementing content recommendation. Each feature pair contributes to content recommendation to varying degrees. Feature pairs that are more helpful in content recommendation are assigned higher attention weights through attention calculation, while feature pairs that are less helpful are assigned lower attention weights.

[0095] Deep relationships refer to the complex connections implicit between input features. They often exist in non-linear relationships and reflect the inherent abstract patterns or global structures between input features, such as semantic associations or semantic dependencies between different input features. Step 530 is equivalent to using the concatenated result of the feature interaction vectors of feature pairs as a benchmark, and using an attention mechanism to perform deep interactions on the feature interaction vectors corresponding to multiple feature pairs, thereby achieving deep feature extraction for multiple feature pairs. This deep feature extraction method based on the attention mechanism can accurately capture the deep relationships between different input features, further explore the complex correlations between different input features, and thus make up for the shortcomings caused by the limitations of shallow feature extraction (i.e., feature interaction). In addition, this deep feature extraction method based on the attention mechanism can also improve the flexibility of feature interaction and balance the importance of interactions between different input features, so that it does not only rely on pre-learned weights, thereby helping to improve the accuracy of content recommendation. Here, interaction importance refers to the importance of the interaction behavior between input features for content recommendation.

[0096] In this embodiment of the disclosure, attention weights correspond one-to-one with feature pairs, meaning that each feature pair has an independent attention weight. For example, for feature pair 1 and feature pair 2, feature pair 1 has feature interaction vector 1, and feature pair 2 has feature interaction vector 2. By performing attention calculations on feature interaction vector 1 and feature interaction vector 2, attention weight 1 for feature pair 1 and attention weight 2 for feature pair 2 can be obtained.

[0097] In some embodiments, attention calculation is performed based on the concatenation result of the feature interaction vectors corresponding to each feature pair to obtain the attention weights corresponding to each feature pair. This may include: performing attention calculation based on the concatenation result of the feature interaction vectors corresponding to each feature pair using a non-linear activation function to obtain the attention weights corresponding to each feature pair.

[0098] Here, a non-linear activation function can be used to calculate the attention for each feature pair. Taking any two feature pairs as an example, in this embodiment, one feature pair is designated as the first feature pair, and the other as the second feature pair. The feature interaction vectors of the first and second feature pairs are concatenated, meaning they have a connection relationship. Therefore, attention is calculated based on their feature interaction vectors. First, the feature interaction vectors of the first and second feature pairs are concatenated to obtain a concatenated feature interaction vector, which incorporates the shallow relationship represented by the two feature pairs. Then, the product of the weight matrix and the concatenated feature interaction vector is determined. The weight matrix is ​​typically used to learn the importance of different dimensions. Next, the sum of this product and the bias term is determined. Then, the sum is activated. Finally, the activated sum is normalized to obtain a normalized sum, which is then used as the attention weights corresponding to the first and second feature pairs. The attention calculation method using a non-linear activation function has low computational cost and can quickly calculate the attention weights corresponding to each feature pair, thereby improving the efficiency of content recommendation. The activation function can be flexibly set according to the actual situation. For example, the activation function can be the ReLU function, or other functions such as Tanh, but it is not limited to these. Similarly, the normalization function can be flexibly set according to the actual situation. For example, the normalization function can be the Softmax function, or other functions such as Sigmoid, but it is not limited to these.

[0099] In step 540, shallow feature extraction can obtain feature interaction vectors corresponding to multiple feature pairs, deep feature extraction can obtain attention weights corresponding to multiple feature pairs, and the results of shallow feature extraction are weighted by the results of deep feature extraction to obtain weighted feature interaction vectors corresponding to multiple feature pairs, thereby further improving the accuracy of feature interaction.

[0100] The weighted feature interaction vector refers to the feature interaction vector after weighting. Step 540 is equivalent to correcting the feature interaction vector. Shallow feature extraction is limited to the local correlation between input features. If the interaction strength between input features is too strong or too weak, the feature interaction vector cannot truly reflect the interaction between input features. Deep feature extraction, on the other hand, can effectively capture the complex correlation between different input features, and attention weights can accurately reflect the interaction between input features. Therefore, for each feature pair, the feature interaction vector corresponding to the feature pair is weighted according to the attention weight corresponding to the feature pair. That is, the product of the attention weight corresponding to the feature pair and the feature interaction vector corresponding to the feature pair is determined as the weighted feature interaction vector corresponding to the feature pair. This can effectively control the interaction strength of the feature interaction vector while retaining the key information related to content recommendation, making the obtained weighted feature interaction vector more accurate, thereby further improving the accuracy of feature interaction.

[0101] In this embodiment of the disclosure, the weighted feature interaction vector corresponds one-to-one with the feature pair, that is, each feature pair has an independent weighted feature interaction vector. For example, for feature pair 1 and feature pair 2, feature pair 1 has feature interaction vector 1 and attention weight 1. The feature interaction vector 1 and attention weight 1 are weighted to obtain the weighted feature interaction vector 1 of feature pair 1; feature pair 2 has feature interaction vector 2 and attention weight 2. The feature interaction vector 2 and attention weight 2 are weighted to obtain the weighted feature interaction vector 2 of feature pair 2.

[0102] In step 550, multiple feature pairs are used to perform prediction processing on their respective weighted feature interaction vectors to obtain the trigger probability of the recommended object for the recommended content, thereby quantifying the weighted feature interaction vectors of multiple feature pairs into a single trigger probability.

[0103] The trigger probability of a recommendation object for recommended content represents the probability that the recommendation object will perform a triggering action, such as clicking, on the recommended content. A higher trigger probability indicates that the recommendation object is more likely to trigger the recommended content, while a lower trigger probability indicates that the recommendation object is less likely to trigger the recommended content. Step 550 is a probability prediction process. The weighted feature interaction vectors of feature pairs incorporate both shallow and deep relationships between input features. Based on this, content recommendation prediction processing is performed to obtain the trigger probability of a recommendation object for recommended content. This quantifies the weighted feature interaction vectors corresponding to multiple feature pairs into a single trigger probability, which helps to accurately recommend the desired content to the recommendation object.

[0104] In some embodiments, predicting the probability of a recommended object triggering the recommended content based on the weighted feature interaction vectors corresponding to multiple features can include: using machine learning methods to obtain the probability of a recommended object triggering the recommended content based on the weighted feature interaction vectors corresponding to multiple features.

[0105] Here, Machine Learning (ML) is a core branch of artificial intelligence. Its core purpose is to enable computer systems to automatically learn patterns and rules from data, rather than relying on explicit program instructions, thereby gaining the ability to predict, classify, or make decisions about unknown data. During prediction processing, weighted feature interaction vectors corresponding to multiple feature pairs can be input into the machine learning model. This model is trained using multiple vector samples and their labels. Each vector sample includes weighted feature interaction vectors corresponding to multiple feature pairs. Each vector sample can be obtained by processing the content features of the content sample to be recommended and the object features of the recommended object sample, similar to steps 510-540. The label of the vector sample indicates whether the recommended object sample triggers the content sample to be recommended; it is typically represented as one or zero, where one indicates the recommended object sample triggers the content sample to be recommended, and zero indicates the recommended object sample does not trigger the content sample to be recommended. By performing prediction processing through the machine learning model, the trigger probability of the recommended object for the content to be recommended is obtained. Due to the superior performance of machine learning models in prediction, this effectively improves the accuracy of trigger probability prediction. The machine learning method can be flexibly set according to the actual situation. In some embodiments, the machine learning method can be a traditional machine learning method using models such as Support Vector Machine (SVM), Logistic Regression (LR), and Random Forest (RF). In some embodiments, the machine learning method can also be a deep learning method using models such as Convolutional Neural Networks (CNN). Compared to traditional machine learning methods, deep learning methods have superior performance in prediction tasks. By using deep learning methods to perform trigger probability prediction processing, the prediction accuracy of trigger probability can be further improved.

[0106] In step 560, after predicting the trigger probability of the recommended content for the recommended object, the operation of recommending the content to be recommended to the recommended object is executed according to the trigger probability. This allows for the formulation of an effective recommendation strategy based on the trigger probability, achieving accurate content recommendation. It is worth noting that executing the operation of recommending the content to be recommended to the recommended object means recommending the content to be recommended to the recommended object. Figure 1 Taking the system architecture shown as an example, one or more pieces of content to be recommended can be displayed on the terminal 140 based on the trigger probability, thereby realizing content recommendation.

[0107] In some embodiments, the operation of recommending content to be recommended to a recommendation object based on the trigger probability may include: when there are multiple content items to be recommended, selecting a target content item to be recommended from among the multiple content items to be recommended based on the trigger probability of the recommendation object for each of the multiple content items to be recommended, and performing the operation of recommending the target content item to the recommendation object.

[0108] Here, when performing a recommendation operation on a single recommendation object, if there are multiple pieces of content to be recommended, the multiple pieces of content to be recommended can be filtered based on the trigger probability of each recommendation object. A higher trigger probability for a recommendation object indicates that it is more likely to trigger the recommended content, while a lower trigger probability indicates that it is less likely to trigger the recommended content. Based on this, the recommended content with a trigger probability higher than a probability threshold is selected as the target recommended content. The target recommended content is highly likely to be triggered by the recommendation object, meaning it better matches the actual needs of the recommendation object. After selecting the target recommended content, the operation of recommending the target recommended content to the recommendation object is executed. Figure 1 Taking the system architecture shown as an example, the target content to be recommended can be displayed on the terminal 140 of the recommending object, thereby accurately recommending the target content to the recommending object and improving the accuracy of content recommendation.

[0109] For example, in an online shopping mall scenario, the content to be recommended consists of multiple products. The content recommendation method provided in this embodiment can determine the trigger probability of the recommended object for each product, select one or more products whose trigger probability is higher than a probability threshold from the multiple products based on the trigger probability, and perform the operation of recommending these selected products to the recommended object. For example, using... Figure 1 Taking the system architecture shown as an example, these selected products are displayed on the terminal 140 of the recommending object, so that suitable products can be recommended to the recommending object, thereby improving the shopping experience of the recommending object.

[0110] In some embodiments, the operation of recommending content to be recommended to a recommendation object based on the trigger probability may include: when there are multiple recommendation objects, selecting a target recommendation object from among the multiple recommendation objects based on the trigger probability of the content to be recommended to each of the multiple recommendation objects, and performing the operation of recommending content to be recommended to the target recommendation object.

[0111] Here, when performing a recommendation operation on a single piece of content to be recommended, if there are multiple recommendation objects, they can first be filtered based on the trigger probability of the content to be recommended for each object. A higher trigger probability for a recommendation object means it's more likely to trigger the content to be recommended; a lower trigger probability means it's less likely. Based on this, the recommendation object with the highest trigger probability is selected as the target recommendation object. The target recommendation object is highly likely to trigger the content to be recommended, meaning the content to be recommended is more closely aligned with the target recommendation object's actual needs. After selecting the target recommendation object, the operation of recommending the content to be recommended is performed on the target recommendation object. Figure 1 Taking the system architecture shown as an example, the content to be recommended can be displayed on the terminal 140 of the target recommendation object, thereby accurately recommending the content to the target recommendation object and improving the accuracy of content recommendation.

[0112] For example, in an advertising scenario, the content to be recommended is an advertisement uploaded by the advertiser. The content recommendation method provided in this embodiment can determine the trigger probability of each recommendation object for that advertisement, select one or more recommendation objects with the highest trigger probability from among multiple recommendation objects based on the trigger probability, and perform the operation of recommending the advertisement to these selected recommendation objects. For example, using... Figure 1 Taking the system architecture shown as an example, the advertisement is displayed on the terminal 140 of these selected recommended objects. This can find suitable targets for the advertisement, thereby effectively improving the advertisement conversion rate.

[0113] For example, in a scenario of searching and recommending social media posts, where the content to be recommended is a specific social media post, the content recommendation method provided in this disclosure can determine the trigger probability of each recommendation object for that social media post. Based on the trigger probability, one or more recommendation objects with the highest trigger probability are selected from multiple recommendation objects, and the operation of recommending the social media post to these selected recommendation objects is performed. For example, using... Figure 1 Taking the system architecture shown as an example, the social media post is displayed on the terminal 140 of these selected recommended objects. This allows the social media post to be accurately pushed to certain recommended objects who are interested in it, thereby improving the accuracy of the social media post push.

[0114] In steps 510-560 above, multiple feature pairs are obtained. Each feature pair contains two input features from the input feature set, where the input features are either object features of the recommended object or content features of the content to be recommended. Next, feature interaction processing is performed on the two input features in each feature pair to obtain a feature interaction vector corresponding to each feature pair. This is equivalent to shallow feature extraction, thus enabling preliminary interaction between different input features and capturing the shallow relationships between them. Then, based on the concatenated result of the feature interaction vectors corresponding to each feature pair, attention calculation is performed to obtain the attention weight for each feature pair. This is equivalent to deep feature extraction, allowing for adaptive calculation of the interaction importance of each feature pair. This flexibly balances the complex interactions between different input features, improves the flexibility of feature interaction, and fully explores the deep relationships between different input features. Subsequently, based on the attention weights corresponding to each feature pair, the feature interaction vectors corresponding to each feature pair are weighted to obtain weighted feature interaction vectors for each feature pair. This is equivalent to using the results of deep feature extraction to correct the results of shallow feature extraction. Thus, by effectively controlling the interaction intensity of the feature interaction vectors through attention weights, the obtained weighted feature interaction vectors are made more accurate, thereby effectively improving the accuracy of feature interaction. Finally, based on the weighted feature interaction vectors corresponding to each feature pair, prediction processing is performed to obtain the trigger probability of the recommended content for the recommended object. Based on the trigger probability, the operation of recommending the recommended content to the recommended object is executed. In this way, the weighted feature interaction vectors corresponding to each feature pair are quantified into a trigger probability, which allows for the formulation of an effective recommendation strategy. In summary, this embodiment of the present disclosure, by calculating the attention weights of each feature pair in real time, can adaptively realize the weight allocation of different feature pairs, improve the flexibility of feature interaction, and fully explore the deep relationships between different input features, thereby effectively improving the accuracy of content recommendation.

[0115] Steps 510-560 will be described in detail below. Since steps 510 and 560 have already been described in detail above, they will not be repeated here.

[0116] Detailed description of step 520 In some implementations, refer to Figure 12 , Figure 12 yes Figure 5 A specific flowchart of step 520, such as Figure 12 As shown, Figure 5 Step 520 shown includes: Step 710: In the latent vector matrix, determine the latent vectors corresponding to the two input features in each feature pair; Step 720: Based on the latent vectors corresponding to the two input features in each feature pair, perform feature interaction processing on the two input features in each feature pair to obtain the feature interaction vector corresponding to each feature pair.

[0117] Steps 710-720 are described in detail below.

[0118] In step 710, the latent vectors corresponding to the two input features in each feature pair are determined within the latent vector matrix. The latent vector matrix is ​​a low-dimensional dense matrix that includes latent vectors corresponding to multiple input features, namely, latent vectors corresponding to multiple content features and latent vectors corresponding to multiple object features. The latent vectors for content features represent the latent features of the content features, and the latent vectors for object features represent the latent features of the object features. These latent features help capture the implicit relationship between the recommended object and the content to be recommended. For each feature pair, the latent vector matrix is ​​searched to retrieve the latent vectors corresponding to the two input features in that feature pair. This facilitates feature interaction processing based on the latent features of each input feature.

[0119] In this embodiment, no specific limitations are placed on the latent vector matrix. In some embodiments, the latent vector matrix is ​​a learnable matrix. The initial value of the learnable transformation matrix is ​​randomly generated, and then the error signal is backpropagated through training data to continuously update each element in the matrix, making the matrix output closer to the true value. In this case, the latent vectors of the input features are fixed vectors. The static latent vector matrix helps to quickly determine the latent vectors corresponding to multiple input features, thereby improving the efficiency of feature interaction processing. In some embodiments, the latent vector matrix is ​​obtained by embedding the input features. Embedding is a technique that maps discrete features to a continuous low-dimensional vector space. In this case, because the content of the input features is different, the latent vectors of the input features are dynamic vectors. The dynamic latent vector matrix helps to capture the implicit relationships between input features, thereby improving the accuracy of feature interaction processing.

[0120] It's worth noting that, regardless of the scenario described above, the number of latent vectors in the latent vector matrix is ​​the same as the number of features; that is, the number of latent vectors is the sum of the number of content features and the number of object features. Therefore, the latent vector matrix can be represented as an M x N matrix, where M is the number of features, N is the dimension of the latent vectors, and the latent vectors for each feature have the same dimension. Rows represent features, columns have no special meaning, and the elements in each row represent the latent vectors for each feature. Representing the latent vector matrix in matrix form simplifies the subsequent feature interaction processing, thereby improving its efficiency.

[0121] For example, defining the implicit vector matrix as a 3x2 matrix can be represented as follows: This means that the latent vector matrix contains latent vectors for three features, and the dimension of the latent vectors is 2. For object feature 1, object feature 2, and content feature 1, the elements corresponding to the first row... The latent vector of object feature 1, the element corresponding to the second row The latent vector of object feature 2, the element corresponding to the third row This is the latent vector for content feature 1.

[0122] In step 720, feature interaction processing is performed on the two input features in each feature pair based on the latent vectors corresponding to the two input features in each feature pair, to obtain the feature interaction vector corresponding to each feature pair.

[0123] Building upon latent vectors, for each feature pair, feature interaction processing is performed on the two input features based on their respective latent vectors. This yields a feature interaction vector for the feature pair. Thus, by performing preliminary interaction between the two input features within a feature pair, shallow feature extraction is achieved. Since latent vectors are low-dimensional vector representations, using the latent vectors corresponding to the two input features in a feature pair as a basis for feature interaction processing effectively reduces data dimensionality, ensuring that the number of data objects for attention computation is not excessive, thereby reducing the amount of subsequent data processing. Furthermore, feature interaction processing can quickly capture shallow relationships between different input features; that is, the extracted feature interaction vector can represent the shallow relationships between the two input features in the feature pair, providing initial feature representation input for subsequent attention computation and helping to further enhance the effectiveness of attention computation.

[0124] It is worth noting that the feature interaction vector corresponding to each feature pair can be represented as a 1-row N-column matrix. The columns have no special meaning, N represents the dimension of the feature interaction vector, and the dimension of the feature interaction vector is the same as the dimension of the latent vector. The elements in the matrix represent the feature interaction vector of the feature.

[0125] In some embodiments, feature interaction processing is performed on the two input features in each feature pair based on the latent vectors corresponding to the two input features in each feature pair to obtain the feature interaction vector corresponding to each feature pair. This may include: if the latent vector matrix is ​​obtained by embedding the input features, then the inner product processing is performed on the latent vectors corresponding to the two input features in each feature pair to obtain the feature interaction vector corresponding to each feature pair.

[0126] Here, when latent vectors of features are obtained by embedding input features, the inner product of the latent vectors corresponding to the two input features in each feature pair can be used to determine the feature interaction vector for each feature pair. A larger inner product indicates a higher degree of matching between features, and vice versa. The inner product is a commonly used operation with low computational complexity and ease of implementation. The inner product operation can explicitly model the interaction relationship between the two input features in a feature pair, effectively capturing the potential nonlinear relationship (shallow relationship) between the two input features. This is suitable for situations where different input features influence each other in this embodiment, thereby improving the accuracy of feature interaction processing. Furthermore, this approach can reduce computational complexity and help improve the efficiency of feature interaction processing.

[0127] In some implementations... Figure 12 The illustrated step 720 includes: performing element-wise multiplication of the latent vectors corresponding to the two input features in each feature pair to obtain the interaction latent vector corresponding to each feature pair; multiplying the two input features in each feature pair to obtain the interaction feature corresponding to each feature pair; and multiplying the interaction latent vector and interaction feature corresponding to each feature pair to obtain the feature interaction vector corresponding to each feature pair.

[0128] Here, to achieve interactive processing between the two input features in a feature pair, for each feature pair, firstly, the latent vectors corresponding to the two input features are multiplied element-wise to obtain the interactive latent vector of the feature pair, thus capturing the interaction between latent vector dimensions at a fine-grained level. Secondly, the two input features in the feature pair are multiplied to obtain the interactive feature of the feature pair, thus performing a preliminary interaction between the contents of the two input features. Then, the product of the interactive latent vector and the interactive feature is determined as the feature interaction vector of the feature pair. For example, for feature pair 1, which includes content feature 1 and object feature 1, in the feature interaction processing, the latent vectors of content feature 1 (i.e., latent vector 1) and object feature 1 (i.e., latent vector 2) are first determined. Then, latent vector 1 and latent vector 2 are multiplied element-wise to obtain the interactive latent vector A. Simultaneously, content feature 1 and object feature 1 are multiplied to obtain the interactive feature B. Finally, interactive latent vector A and interactive feature B are multiplied to obtain the feature interaction vector C of feature pair 1.

[0129] By using the latent vectors of the input features as a basis for feature interaction, the dimensionality of the data can be effectively reduced, ensuring that the number of data objects for attention computation is not excessive, thus reducing the amount of subsequent data processing and improving the efficiency of feature interaction processing. Furthermore, by explicitly modeling the second-order interaction between two input features within a feature pair using the latent vectors of the input features, the shallow relationships between different input features can be accurately captured at a fine-grained level, thereby effectively improving the accuracy of feature interaction processing.

[0130] Through steps 710 to 720 above, firstly, the latent vectors corresponding to the two input features in each feature pair are determined in the latent vector matrix. Then, based on the latent vectors corresponding to the two input features in each feature pair, feature interaction processing is performed on the two input features in each feature pair to obtain the feature interaction vector corresponding to each feature pair. Since latent vectors are a low-dimensional vector representation, using the latent vectors corresponding to the two input feature pairs in a feature pair as a basis for feature interaction processing can effectively reduce the data dimensionality, ensuring that the data objects for attention calculation are not excessive, and reducing the amount of subsequent data processing. In addition, feature interaction processing can quickly capture the shallow relationships between different input features, that is, the extracted feature interaction vectors can represent the shallow relationships between the two input features in the feature pair, thereby providing initial feature representation inputs for subsequent attention calculation and helping to further enhance the effect of attention calculation.

[0131] Detailed description of step 530 In some implementations, refer to Figure 7 , Figure 7 yes Figure 5 A specific flowchart of step 530, such as Figure 7 As shown, Figure 5 Step 530 shown includes: Step 610: Transform the feature interaction vectors corresponding to each feature pair to obtain the transformation vectors corresponding to each feature pair. Step 620: Based on the transformation vector corresponding to each feature pair in the multiple feature pairs, determine the influence weight of each feature pair relative to each other feature pair in the multiple feature pairs; Step 630: Determine the attention weight corresponding to each feature pair based on the influence weight of each feature pair relative to each other feature pair among the multiple feature pairs.

[0132] Steps 610 to 630 are described in detail below.

[0133] In step 610, the feature interaction vectors corresponding to the multiple feature pairs are transformed to obtain the transformation vectors corresponding to the multiple feature pairs.

[0134] For each feature pair, the corresponding feature interaction vector is transformed to obtain the transformed vector for that feature pair. That is, there is a one-to-one correspondence between feature pairs and transformed vectors, and each feature pair has an independent transformed vector. Compared to the feature interaction vector, the transformed vector is a more focused and deeper representation of the features, thus more accurately capturing the relationships between different feature pairs during subsequent vector interaction processing, thereby improving the accuracy of attention calculation. The specific content of the transformed vector is not specifically limited. In some embodiments, the transformed vector may include a query vector, a value vector, and a key vector. In some embodiments, the transformed vector may only include the query vector and the key vector.

[0135] In some embodiments, transforming the feature interaction vectors corresponding to multiple feature pairs respectively to obtain transform vectors corresponding to multiple feature pairs may include: transforming the feature interaction vectors corresponding to each feature pair through a multilayer perceptron to obtain the query vector, key vector, and value vector corresponding to each feature pair.

[0136] Here, a Multilayer Perceptron (MLP) is a feedforward artificial neural network model consisting of at least three layers: an input layer, one or more sequentially connected hidden layers, and an output layer. Each layer comprises multiple neurons (or nodes), and except for the input layer, each neuron is connected to all neurons in the next layer via weights. The MLP can map the feature interaction vectors of a target feature pair to corresponding transformation vectors, thereby enhancing the capture of deep relationships between features. The following explanation uses any single feature pair as an example; in this embodiment, any single feature pair is denoted as the target feature pair. Taking the conversion of the feature interaction vector corresponding to the target feature pair into the corresponding query vector as an example, firstly, the feature interaction vector corresponding to the target feature pair is input into the MLP through the input layer. Then, in each hidden layer, a nonlinear transformation is performed on the feature interaction vector corresponding to the target feature pair. This involves determining the product of the hidden layer's weight matrix and the feature interaction vector corresponding to the target feature pair, then determining the sum of this product and the hidden layer's bias term, and finally activating this sum to obtain the transformed features of the hidden layer. Multiple hidden layers allow for the gradual abstraction of higher-order features. Finally, in the output layer, the product of the transformed features of the hidden layer with respect to the weight matrix of the output layer is determined, and the sum of this product and the bias term of the output layer is used as the query vector corresponding to the target feature pair. It should be understood that the transformation processes of the key vector and value vector can refer to the query vector transformation process described above. The activation function used can be flexibly set according to the actual situation; for example, the activation function can be the ReLU function, or other functions such as Tanh, but it is not limited to these. Thus, considering the non-linear dependency between the content to be recommended and the recommended object during content recommendation, using a multilayer perceptron to convert the feature interaction vector corresponding to each feature pair into the corresponding query vector, key vector, and value vector can capture the non-linear dependency within each feature pair while simultaneously performing the transformation processing of the query vector, key vector, and value vector, thereby ensuring the accuracy of subsequent vector interaction processing.

[0137] Of course, in addition to multilayer perceptrons, other methods such as nonlinear transformations and low-rank decompositions can also be used to convert the feature interaction vectors of target feature pairs into corresponding transformation vectors. This disclosure does not limit this approach.

[0138] In step 620, the influence weight of each feature pair relative to each other feature pair is determined based on the transformation vector corresponding to each feature pair in the plurality of feature pairs.

[0139] The influence weight of each feature pair relative to each other among multiple feature pairs reflects the local importance of each feature pair. Local importance indicates the degree of influence of each feature pair on individual feature pairs other than itself. For example, for feature pair 1, feature pair 2, and feature pair 3, the influence weight of feature pair 1 on feature pair 2 can be obtained based on the transformation vectors of feature pair 1 and feature pair 2, which represents the degree of influence of feature pair 1 on feature pair 2; similarly, the influence weight of feature pair 2 on feature pair 3 can be obtained based on the transformation vectors of feature pair 2 and feature pair 3, which also represents the degree of influence of feature pair 2 on feature pair 3.

[0140] After converting the feature interaction vector into a transformation vector, the influence weight of each feature pair relative to the other feature pairs is determined based on the transformation vector corresponding to each feature pair in the multiple feature pairs. This process not only dynamically captures the deep relationships between different input features and further explores the complex correlations between different input features, but also improves the flexibility of feature interactions and balances the importance of interactions between different input features, making it not solely dependent on pre-learned weights, thereby helping to improve the accuracy of content recommendation.

[0141] It should be understood that the other feature pairs corresponding to each feature pair refer to all other feature pairs besides each feature pair. For example, for feature pair 1, feature pair 2, and feature pair 3, the other feature pairs corresponding to feature pair 1 refer to feature pair 2 and feature pair 3, the other feature pairs corresponding to feature pair 2 refer to feature pair 1 and feature pair 3, and the other feature pairs corresponding to feature pair 3 refer to feature pair 1 and feature pair 2.

[0142] It is worth noting that the influence weights of each feature pair relative to each other feature pair in the multiple feature pairs can collectively form an attention matrix, where both rows and columns represent feature pairs, and elements represent the influence weights between the feature pairs represented in the rows and the feature pairs represented in the columns.

[0143] In some embodiments, determining the influence weight of each feature pair relative to each other feature pair in the plurality of feature pairs based on the transformation vector corresponding to each feature pair in the plurality of feature pairs may include: when the transformation vector corresponding to each feature pair includes a key vector, a value vector, and a query vector, using the key vector corresponding to each feature pair as the target key vector, the value vector corresponding to each feature pair as the target value vector, and the query vector corresponding to other feature pairs as the target query vector, and using a linear attention mechanism to process the target query vector, the target key vector, and the target value vector to obtain the influence weight of each feature pair relative to other feature pairs.

[0144] Here, linear attention is an attention mechanism that performs attention calculations through kernel approximation or low-rank decomposition. Taking any two feature pairs as an example, this embodiment designates one feature pair as the first feature pair and the other as the second feature pair. When the transformation vector includes a key vector, a value vector, and a query vector, the key vector corresponding to the first feature pair can be used as the target key vector, the value vector corresponding to the first feature pair as the target value vector, and the query vector corresponding to the second feature pair as the target query vector. Linear attention is then applied to obtain the influence weight of the first feature pair on the second feature pair. First, a nonlinear kernel is used to process the target query vector to obtain a nonlinear query vector, and a nonlinear kernel is used to process the target key vector to obtain a nonlinear key vector. This maps both the target query vector and the target key vector to the kernel space. The nonlinear kernel can be flexibly set according to the actual situation. Then, the nonlinear key vector is transposed to obtain the transposed key vector. The product of the nonlinear query vector and the transposed key vector is determined as the attention score. This allows the similarity between the query and the key to be represented as a linear combination of kernel functions, thus reducing computational complexity. Next, activation functions such as Softmax are used to normalize the attention score into a probability distribution. Finally, the probability distribution is multiplied by the target value vector, and the result is determined as the influence weight of the first feature pair relative to the second feature pair. The linear attention mechanism performs attention calculation through kernel approximation or low-rank decomposition, implicitly modeling the interaction relationship between the query and the key. This effectively reduces the computational complexity of feature interactions and the gradient propagation path length while mitigating gradient problems in long sequences, thus ensuring the efficiency of obtaining influence weights.

[0145] In step 630, the attention weight corresponding to each feature pair is determined based on the influence weight of each feature pair relative to each other feature pair among the multiple feature pairs.

[0146] The influence weights of each feature pair relative to each other feature pair reflect the local importance of each feature pair, that is, the degree of influence of each feature pair on individual feature pairs other than itself. However, content recommendation often requires the global importance of each feature pair, that is, the degree of influence of each feature pair on all feature pairs other than itself. Therefore, based on the influence weights of each feature pair relative to each other feature pair, the attention weight corresponding to each feature pair is determined. The attention weight corresponding to each feature pair reflects the degree of influence of each feature pair among all feature pairs other than itself. In this way, determining the global importance of each feature pair based on its local importance can effectively improve the accuracy of attention calculation, thereby contributing to the improvement of the accuracy of content recommendation. For example, for feature pair 1, feature pair 2, and feature pair 3, influence weight 1 represents the influence weight of feature pair 1 relative to feature pair 2, and influence weight 2 represents the influence weight of feature pair 1 relative to feature pair 3. Both influence weight 1 and influence weight 2 reflect the local importance of feature pair 1. Based on influence weight 1 and influence weight 2, we can obtain the influence weight of feature pair 1 relative to both feature pair 2 and feature pair 3, which is influence weight 3. Influence weight 3 reflects the global importance of feature pair 1, which is the attention weight of feature pair 1.

[0147] In some embodiments, determining the attention weight corresponding to each feature pair based on the influence weight of each feature pair relative to each other feature pair among the plurality of feature pairs may include: determining the attention weight corresponding to each of the plurality of feature pairs based on the influence weight of each feature pair relative to each other feature pair among the plurality of feature pairs, in conjunction with a multilayer perceptron.

[0148] Here, the influence weights of each feature pair relative to each other feature pair are input into a multilayer perceptron. Through prediction processing by the multilayer perceptron, the attention weights corresponding to each feature pair can be obtained. The multilayer perceptron can be trained using multiple weight samples and the labels of each weight sample. Each weight sample includes the influence weights of each feature pair sample relative to each other feature pair sample. Each weight sample can be obtained by processing the content features of the content sample to be recommended and the object features of the recommended object sample, in the same way as steps 510-520 and 610-620. The labels of the weight samples are the attention weights corresponding to each feature pair sample, which can be determined through expert annotation, historical data statistics, etc. Considering that the weight relationship between feature pairs may be highly non-linear, the data-driven approach of the multilayer perceptron transforms the influence weights of each feature pair relative to each other feature pair into the attention weights corresponding to each feature pair. This allows for a more accurate determination of the attention weights corresponding to each feature pair, thereby effectively improving the accuracy of attention calculation.

[0149] In some implementations, refer to Figure 8 , Figure 8 This is a schematic diagram illustrating the principle that affects weight calculation, such as... Figure 8 As shown, the transformation vector includes the query vector and the key vector. Figure 7 The illustrated step 610 includes: transforming the feature interaction vectors corresponding to multiple feature pairs according to the query transformation matrix to obtain query vectors corresponding to multiple feature pairs; and transforming the feature interaction vectors corresponding to multiple feature pairs according to the key transformation matrix to obtain key vectors corresponding to multiple feature pairs. Figure 7 The illustrated step 620 includes: determining the influence weight of each feature pair relative to other feature pairs based on the key vector corresponding to each feature pair and the query vector corresponding to other feature pairs.

[0150] Here, matrix transformation is an explicit modeling approach. For each feature pair, the feature interaction vector corresponding to the feature pair is transformed based on the query transformation matrix to obtain the query vector corresponding to the feature pair. That is, the product of the query transformation matrix and the feature interaction vector corresponding to the feature pair is determined as the query vector corresponding to the feature pair. The feature interaction vector corresponding to the feature pair is transformed based on the key transformation matrix to obtain the key vector corresponding to the feature pair. That is, the product of the key transformation matrix and the feature interaction vector corresponding to the feature pair is determined as the key vector corresponding to the feature pair. For ease of understanding, the above matrix transformation process can be simplified to the following formula (1): , (1); In equation (1), Indicates the first Each feature pair corresponds to a feature interaction vector; Indicates the first Each feature pair corresponds to a query vector; Represents the query transformation matrix; Indicates the first Each feature pair corresponds to a key vector; This represents the key transformation matrix. By transforming the feature interaction vectors corresponding to multiple feature pairs into query vectors and key vectors corresponding to multiple feature pairs, we can not only improve the feature representation capability and dimensional flexibility, thus helping to improve the flexibility of subsequent feature interactions, but also improve computational efficiency and meet the real-time requirements of content recommendation.

[0151] In this embodiment of the disclosure, both the query transformation matrix and the key transformation matrix are learnable transformation matrices. The initial values ​​of the learnable transformation matrices are randomly generated, and then the error signal is backpropagated through the training data to continuously update each element in the matrix, so that the matrix output is closer to the true value.

[0152] After converting the feature interaction vectors corresponding to each feature pair into corresponding query and key vectors, the influence weight of each feature pair relative to other feature pairs is determined based on the key vectors corresponding to each feature pair and the query vectors corresponding to other feature pairs. The influence weight of each feature pair relative to other feature pairs reflects the degree of influence of each feature pair on the encoding of other feature pairs. For example, for feature pair 1 and feature pair 2, feature pair 1 provides a key vector, and feature pair 2 provides a query vector. Based on the key vector of feature pair 1 and the query vector of feature pair 2, the influence weight of feature pair 1 relative to feature pair 2 can be obtained. This influence weight reflects the degree of influence of feature pair 1 on the encoding of feature pair 2. Thus, calculating the influence weights using query and key vectors as a basis not only dynamically captures the deep relationships between different input features but also improves the flexibility of feature interactions and balances the importance of interactions between different input features, making it not solely dependent on pre-learned weights, thereby helping to improve the accuracy of content recommendation.

[0153] It is worth noting that existing self-attention mechanisms typically require consideration of value vectors. However, this embodiment of the disclosure does not consider value vectors when applying the self-attention mechanism; that is, it ignores the weighted summation step of value vectors. This effectively reduces memory usage and computational costs, and accelerates the inference efficiency of content recommendation, thereby meeting the real-time requirements of content recommendation. Of course, value vectors can still be used in the self-attention mechanism even when the real-time requirements of content recommendation are not considered.

[0154] It is worth noting that in this embodiment, the influence weight of each feature pair on other feature pairs is calculated, without calculating the influence weight of each feature pair on itself. For example, for feature pair 1 and feature pair 2, only the influence weight of feature pair 1 on feature pair 2 and the influence weight of feature pair 2 on feature pair 1 need to be calculated, without calculating the influence weight of feature pair 1 on feature pair 1 and the influence weight of feature pair 2 on feature pair 2. This is because, under normal circumstances, the influence weight of a feature pair on itself is often the largest, which will affect the assessment of the interaction importance of the feature pair in the global context. Therefore, to ensure the accuracy of attention calculation, this embodiment does not need to calculate the influence weight of a feature pair on itself, and this type of influence weight is reset to null or set to zero.

[0155] In some embodiments, determining the influence weight of each feature pair relative to other feature pairs based on the key vector corresponding to each feature pair and the query vector corresponding to other feature pairs may include: transposing the key vector corresponding to each feature pair to obtain the transposed key vector corresponding to each feature pair; multiplying the transposed key vector corresponding to each feature pair and the query vector corresponding to other feature pairs to obtain the attention score of each feature pair relative to other feature pairs; determining the scaling score of each feature pair relative to other feature pairs as the ratio of the attention score of each feature pair relative to other feature pairs to the feature dimension parameter, where the feature dimension parameter is obtained by taking the square root of the feature dimension; and normalizing the scaling score of each feature pair relative to other feature pairs to obtain the influence weight of each feature pair relative to other feature pairs.

[0156] Here, the self-attention mechanism calculates the attention weight of each position to other positions through the interaction of elements within the same sequence, thereby generating a feature representation that integrates global information. Specifically, in this embodiment, all feature pairs belong to the same sequence, that is, each feature pair is an element in the same sequence. By processing the query vector corresponding to each feature pair and the key vectors corresponding to other feature pairs through the self-attention mechanism, the influence weight of each feature pair relative to other feature pairs can be obtained, thereby capturing the deep-level relationship between features. In the self-attention mechanism, for any two feature pairs (i.e., feature pair and other feature pairs besides feature pair), firstly, the key vector corresponding to the feature pair is transposed to obtain the transposed key vector corresponding to the feature pair. Then, the transposed key vector corresponding to the feature pair is multiplied with the query vector corresponding to other feature pairs to obtain the attention score of the feature pair relative to other feature pairs. In this way, the matching degree between two feature pairs is measured by the dot product, and the larger the value, the stronger the correlation between the feature pairs. Then, the ratio of the attention score of a feature pair relative to other feature pairs to the feature dimension parameter is determined as the scaling score of the feature pair relative to other feature pairs. The feature dimension parameter is obtained by taking the square root of the feature dimension, which effectively avoids the gradient vanishing situation caused by excessively large dot product results. Next, the scaling score of the feature pair relative to other feature pairs is normalized using activation functions such as Softmax to convert the scaling score into a probability distribution, obtaining the influence weight of the feature pair relative to other feature pairs. The self-attention mechanism dynamically generates the influence weight of each feature pair relative to other feature pairs by calculating the similarity between the key vector of each feature pair and the query vector of other feature pairs. This not only adaptively calculates the interaction importance of each feature pair, thus flexibly balancing the complex interactions between different input features and improving the flexibility of feature interactions, but also accurately captures the dependency relationship between any two feature pairs, effectively mining the deep relationships between input features, and prompting each feature pair to focus on information related to content recommendation in other feature pairs, thereby improving the accuracy of the influence weight.

[0157] In some embodiments, determining the influence weight of each feature pair relative to other feature pairs based on the key vector corresponding to each feature pair and the query vector corresponding to other feature pairs may include: transposing the key vector corresponding to each feature pair to obtain the transposed key vector corresponding to each feature pair; multiplying the transposed key vector corresponding to each feature pair and the query vector corresponding to other feature pairs to obtain the attention score of each feature pair relative to other feature pairs; and determining the influence weight of each feature pair relative to other feature pairs by the ratio of the attention score of each feature pair relative to other feature pairs to the feature dimension parameter, wherein the feature dimension parameter is obtained by taking the square root of the feature dimension.

[0158] Here, the process of converting the scaled attention score into a probability distribution in the self-attention mechanism is omitted. Omitting the probability transformation operation can not only effectively reduce the computational complexity and improve the efficiency of obtaining the influence weights, thus meeting the real-time requirements of content recommendation, but also avoid excessive suppression of some key areas and more flexibly calculate the influence weights between feature pairs, thereby improving the accuracy of the influence weights. Of course, if the real-time requirements and accuracy of content recommendation are not considered, the probability transformation operation can still be used in the self-attention mechanism. For ease of understanding, the above self-attention mechanism process with the probability transformation operation omitted can be simplified to the following formula (2): (2); In equation (2), Indicates the first 'Feature pair relative to the first The influence weights of each feature pair; Indicates the first ' Each feature pair corresponds to a query vector; Indicates the first Each feature pair corresponds to a key vector; Representing feature dimension, For feature dimension parameters.

[0159] In some embodiments, determining the influence weight of each feature pair relative to other feature pairs based on the key vector corresponding to each feature pair and the query vector corresponding to other feature pairs may include: determining a first influence weight of each feature pair relative to other feature pairs based on the key vector corresponding to each feature pair and the query vector corresponding to other feature pairs, combined with a self-attention mechanism; determining a second influence weight of each feature pair relative to other feature pairs based on the key vector corresponding to each feature pair and the query vector corresponding to other feature pairs, combined with a linear attention mechanism; and averaging the first and second influence weights of each feature pair relative to other feature pairs to obtain the influence weight of each feature pair relative to other feature pairs.

[0160] Here, two different attention mechanisms are introduced to capture the dependencies between each feature pair and other feature pairs, namely, the first influence weight and the second influence weight of each feature pair relative to other feature pairs. These two influence weights are then averaged to obtain the influence weight of each feature pair relative to other feature pairs. The self-attention mechanism dynamically adjusts the attention weight of each feature pair relative to other feature pairs by calculating the correlation between each feature pair and other feature pairs, thereby improving the flexibility of feature interaction while directly capturing the dependencies between each feature pair and other feature pairs. The linear attention mechanism performs attention calculation through kernel approximation or low-rank decomposition, implicitly modeling the interaction relationship between the query and the key. This effectively reduces the computational complexity of feature interaction and the gradient propagation path length while promoting feature interaction between different feature pairs, alleviating gradient problems in long sequences, thus ensuring the efficiency of influence weight acquisition and meeting the real-time requirements of content recommendation. The final influence weight is obtained by averaging the results of the self-attention mechanism and the linear attention mechanism. Thus, by introducing two different attention mechanisms to capture the dependencies between each feature pair and other feature pairs respectively, the accuracy and efficiency of obtaining influence weights can be effectively improved. It should be understood that the method for processing influence weights in the self-attention mechanism follows the implementation method of the previous embodiments, and this disclosure will not repeat it further. In the linear attention mechanism, in order to maintain the dimensional consistency of the first and second influence weights, since the value vector is omitted in the self-attention mechanism, the weighted summation step of the value vector is also omitted in the linear attention mechanism. The method for processing influence weights in the linear attention mechanism follows the implementation method of the previous embodiments.

[0161] In some implementations, refer to Figure 9 , Figure 9 This is a schematic diagram illustrating the principle of averaging the influence weights, such as... Figure 9 As shown, in Figure 7 Before step 630 shown, the content recommendation method provided in this embodiment of the disclosure further includes: averaging the influence weight of each feature pair relative to other feature pairs and the influence weight of other feature pairs relative to each feature pair to obtain the average influence weight corresponding to each feature pair; and updating the influence weight of each feature pair relative to other feature pairs and the influence weight of other feature pairs relative to each feature pair based on the average influence weight corresponding to each feature pair.

[0162] In the context of content recommendation, input features typically lack an ordered relationship. For example, the interaction between object type and content type is bidirectional. Since a feature pair consists of two input features, they often lack an ordered relationship. For instance, price-type and type-price often express the same meaning, and there is no ordered relationship between price and type. In this case, the influence weight of each feature pair relative to other feature pairs and the influence weight of other feature pairs relative to each feature pair should be equal. However, in this embodiment, the influence weight is calculated through attention, which relies on an attention mechanism. Attention mechanisms were originally designed to capture contextual relationships (e.g., word order, contextual dependencies, etc.) in text data. For example, in natural language processing, the order of each word in text data is meaningful, and changing the word order may change the meaning. For example, "cat catches mouse" and "mouse catches cat" have different meanings. Similarly, "he eats first, then goes to school" and "he goes to school first, then eats" have different meanings. In this case, the influence weight of each feature pair relative to other feature pairs and the influence weight of other feature pairs relative to each feature pair are often different, which contradicts the characteristic that feature pairs in content recommendation often do not have an order relationship.

[0163] To address this, embodiments of this disclosure perform symmetrical averaging on the influence weights of each feature pair relative to other feature pairs. For any two feature pairs, this disclosure designates one feature pair as the first feature pair and the other as the second feature pair. In calculating the influence weights, the influence weight of the first feature pair relative to the second feature pair and the influence weight of the second feature pair relative to the first feature pair can be calculated. The former represents the degree of influence of the first feature pair on the second feature pair, and the latter represents the degree of influence of the second feature pair on the first feature pair. These two degrees of influence differ due to the order in which they are calculated. First, the average of the influence weights of the first feature pair relative to the second feature pair and the second feature pair relative to the first feature pair is determined as the average influence weight. The average influence weight reflects the average degree of influence of the first and second feature pairs on each other. Then, the influence weights of the first feature pair relative to the second feature pair and the second feature pair relative to the first feature pair are both replaced with the average influence weight, thereby updating the influence weights. In this way, by using symmetrical mean processing, the influence weight of the first feature pair relative to the second feature pair and the influence weight of the second feature pair relative to the first feature pair are the same. This not only promotes the balanced distribution of feature interaction weights and ensures the symmetry of feature interactions, making the influence weights more in line with the characteristics of content recommendation, but also avoids unnecessary complexity, reduces the introduction of noise, and thus improves the accuracy of influence weights.

[0164] For example, for feature pair 1 and feature pair 2, the influence weights of feature pair 1 relative to feature pair 2 and feature pair 2 relative to feature pair 1 can be obtained by calculating the influence weights. Relative to these two influence weights, the average influence weights of feature pair 1 relative to feature pair 2 and feature pair 2 relative to feature pair 1 are first determined as the average influence weights. Then, the influence weights of feature pair 1 relative to feature pair 2 and feature pair 2 relative to feature pair 1 are replaced with the average influence weights, thereby promoting the balancing of the influence weights of feature pair 1 relative to feature pair 2 and feature pair 2 relative to feature pair 1.

[0165] In this embodiment of the disclosure, the process of symmetric mean processing can be simplified to the following formula (3): (3); In equation (3), Indicates the average influence weight; Indicates the first The feature pair relative to the first The influence weights of each feature pair; Indicates the first The feature pair relative to the first The influence weights of each feature pair.

[0166] In some embodiments, refer to Figure 10 , Figure 10 This is a schematic diagram illustrating the principle of merging influence weights, such as... Figure 10 As shown, Figure 7 The step 630 shown includes: performing weight fusion processing on the influence weights of each feature pair relative to each other feature pair in the plurality of feature pairs to obtain the attention weights corresponding to each feature pair.

[0167] Here, the influence weight of each feature pair on all other feature pairs can be obtained by calculating the influence weights. However, such influence weights reflect the local importance of each feature pair. In content recommendation, however, the global importance of individual feature pairs is often required, i.e., the degree of influence of one feature pair on all other feature pairs. To address this, this embodiment performs weight fusion processing on the influence weights of each feature pair relative to the other feature pairs in the plurality of feature pairs, obtaining the attention weight corresponding to each feature pair. This weight fusion processing converts the local importance of each feature pair into global importance, thereby capturing the degree of influence of a feature pair on all other feature pairs, rather than being limited to the local interaction influence between any two feature pairs, further improving the accuracy of attention calculation.

[0168] For example, for feature pair 1, feature pair 2, and feature pair 3, the influence weights of feature pair 1 on feature pair 2 and feature pair 3 can be obtained by calculating the influence weights. These influence weights reflect the local importance of feature pair 1. Therefore, by performing weight fusion on the influence weights of feature pair 1 on feature pair 2 and feature pair 1 on feature pair 3, the attention weight of feature pair 1 can be obtained. This transforms the local importance of feature pair 1 into global importance, thereby capturing the global influence of feature pair 1 in all feature pairs other than itself (i.e., feature pair 2 and feature pair 3), further improving the accuracy of attention calculation.

[0169] In some embodiments, weight fusion processing is performed on the influence weights of each feature pair relative to each other feature pair among the multiple feature pairs to obtain the attention weights corresponding to each feature pair. This may include: summing the influence weights of each feature pair relative to each other feature pair among the multiple feature pairs to obtain the attention weights corresponding to each feature pair.

[0170] Here, a summation method is used to fuse the influence weights of each feature pair relative to each other feature pair among multiple feature pairs. This summation method obtains the attention weight for each feature pair by summing the influence weights of each feature pair relative to each other feature pair among multiple feature pairs. The summation method is relatively simple and computationally inexpensive. It can quickly convert the local importance of each feature pair into global importance, thereby further improving the efficiency of attention computation.

[0171] In some embodiments, weight fusion processing is performed on the influence weights of each feature pair relative to each other feature pair in the plurality of feature pairs to obtain the attention weight corresponding to each feature pair. This may include: performing weighted summation processing on the influence weights of each feature pair relative to each other feature pair in the plurality of feature pairs to obtain the attention weight corresponding to each feature pair.

[0172] Here, a weighted summation method is used to fuse the influence weights of each feature pair relative to each other feature pair among multiple feature pairs. The weighted summation method assigns corresponding weight values ​​to the influence weights of each feature pair relative to each other feature pair among multiple feature pairs and then sums them to obtain the attention weight for each feature pair. This weighted summation method can accurately convert the local importance of each feature pair into global importance, thereby further improving the accuracy of attention calculation. The weight values ​​assigned to the influence weights of each feature pair relative to each other feature pair among multiple feature pairs can be set according to actual conditions, and this embodiment does not impose any limitations on this.

[0173] In steps 610 to 630 above, firstly, the feature interaction vectors corresponding to multiple feature pairs are transformed to obtain transformed vectors for each feature pair. Since each feature pair has its own transformed vector, modeling and feature interaction can be performed more flexibly in subsequent vector interaction processing, thereby helping to improve the accuracy of attention calculation. Then, based on the transformed vectors corresponding to each feature pair, the influence weight of each feature pair relative to each other feature pair is determined. The influence weight of each feature pair relative to other feature pairs reflects the local importance of each feature pair, which refers to the degree of influence of a feature pair on individual feature pairs other than itself. This not only dynamically captures the deep relationships between different input features and further explores the complex correlations between different input features, but also improves the flexibility of feature interaction and balances the interaction importance between different input features, making it not solely dependent on pre-learned weights. Finally, based on the influence weight of each feature pair relative to each other feature pair, the attention weight corresponding to each feature pair is determined. The attention weights corresponding to each feature pair reflect the degree of influence of each feature pair among all feature pairs except itself. This can effectively improve the accuracy of the attention weights corresponding to each feature pair, thereby helping to improve the accuracy of content recommendation.

[0174] Detailed description of steps 530 and 540 together In some implementations, refer to Figure 11 , Figure 11 This is a schematic diagram illustrating the principle of multi-head attention mechanisms and weighted processing, such as... Figure 11 As shown, Figure 5 The step 530 shown includes: in each of the multiple attention heads, attention calculation is performed based on the concatenation result of the feature interaction vectors corresponding to each feature pair to obtain the attention weights corresponding to each feature pair in each attention head; Figure 5 The step 540 shown includes: averaging the attention weights of each feature pair in multiple attention heads to obtain the average attention weights corresponding to each feature pair; and weighting the feature interaction vectors corresponding to the multiple feature pairs according to the average attention weights corresponding to the multiple feature pairs to obtain the weighted feature interaction vectors corresponding to the multiple feature pairs.

[0175] Here, attention computation is further optimized by introducing a multi-head attention mechanism. First, multiple attention heads are provided. The number of attention heads is not limited in this embodiment; for example, it can be 12, but is not limited to this. Then, for each attention head, attention computation is performed based on the concatenated result of the feature interaction vectors corresponding to each feature pair, obtaining the attention weight for each feature pair in the attention head. It should be understood that the processing procedure for each attention head is the same as steps 610 to 630 above, and will not be described again in this embodiment.

[0176] It is worth noting that each attention head contains the matrix required to implement attention computation and defines the execution logic, i.e., the processing procedure, for attention computation. The processing procedure for each attention head can be the same or different, and can be flexibly set according to the actual situation. In some embodiments, the processing procedures for all attention heads are the same; for example, all attention heads are attention heads that rely on a self-attention mechanism. In some embodiments, at least two attention heads have different processing procedures; for example, some attention heads rely on a self-attention mechanism, while others rely on a linear attention mechanism.

[0177] Since each attention head may focus on different feature dimensions or semantic spaces of the input, the attention weights corresponding to multiple feature pairs in a single attention head reflect the global importance of the multiple feature pairs in that single attention head, rather than their global importance across all attention heads. To address this, this disclosure further optimizes the weighting process based on the multi-head attention mechanism. First, the attention weights of each feature pair across multiple attention heads are averaged to obtain the average attention weight for each feature pair. This average attention weight reflects the global importance of each feature pair across all attention heads. By integrating the attention distributions of multiple attention heads, the comprehensive importance of each feature pair in the global context can be effectively captured.

[0178] For example, for feature pair 1, attention head 1, attention head 2, and attention head 3, the attention weight of feature pair 1 in attention head 1 is obtained through attention head 1, the attention weight of feature pair 1 in attention head 2 is obtained through attention head 2, and the attention weight of feature pair 1 in attention head 3 is obtained through attention head 3. Then, the average of the attention weights of feature pair 1 in attention head 1, attention weights of feature pair 1 in attention head 2, and attention weights of feature pair 1 in attention head 3 is determined as the average attention weight of feature pair 1.

[0179] Then, based on the average attention weights corresponding to each feature pair, the feature interaction vectors corresponding to each feature pair are weighted to obtain the weighted feature interaction vectors corresponding to each feature pair. This weighting process only replaces the attention weights corresponding to each feature pair in step 540 with the average attention weights corresponding to each feature pair; the rest is implemented similarly to step 540, and will not be described in detail in this embodiment.

[0180] In the above approach, firstly, each attention head, by focusing on different feature dimensions of the input, can extract attention weights corresponding to multiple feature pairs from different perspectives. The processing by multiple attention heads promotes complex interactions between input features, thereby more comprehensively capturing the complex interaction relationships between input features and ensuring the multi-dimensionality and diversity of input features, thus improving the accuracy of deep feature extraction. Secondly, the attention weights of each feature pair across multiple attention heads are averaged to obtain the average attention weight for each feature pair. This average attention weight reflects the global importance of each feature pair across all attention heads. By integrating the attention distributions of multiple attention heads, the comprehensive importance of feature pairs in the global context can be effectively captured. Finally, a weighted average is applied to the average attention weights of multiple feature pairs. This not only effectively preserves key information related to content recommendation but also further accurately controls the interaction strength of feature interaction vectors based on capturing the complex interaction relationships between input features, improving the accuracy of the weighted feature interaction vectors and thus further enhancing the accuracy of feature interaction.

[0181] Detailed description of step 550 In some implementations, refer to Figure 13 , Figure 13 yes Figure 5 A detailed flowchart of step 550, as follows: Figure 13 As shown, Figure 5 The illustrated step 550 includes: Step 810: Perform vector fusion processing on the weighted feature interaction vectors corresponding to multiple feature pairs to obtain the target feature interaction parameters; Step 820: Calculate the probability based on the target feature interaction parameters to obtain the trigger probability of the recommended object for the recommended content.

[0182] Steps 810 to 820 are described in detail below.

[0183] In step 810, the weighted feature interaction vectors corresponding to multiple feature pairs are fused to obtain the target feature interaction parameters.

[0184] Here, the weighted feature interaction vector refers to the feature interaction vector after weighting. Based on the weighted feature interaction vector, vector fusion processing is performed on the weighted feature interaction vectors corresponding to multiple feature pairs to obtain the target feature interaction parameter. The target feature interaction parameter covers both deep and shallow relationships between all input features. In this way, by fusing the weighted feature interaction vectors corresponding to multiple feature pairs into a comprehensive target feature interaction parameter, the data object for subsequent probability calculation can be effectively simplified, the computational complexity of probability calculation can be reduced, and thus the prediction efficiency of content recommendation can be improved.

[0185] In some embodiments, vector fusion processing is performed on the weighted feature interaction vectors corresponding to multiple feature pairs to obtain target feature interaction parameters. This may include: integrating the weighted feature interaction vectors corresponding to multiple feature pairs into a feature interaction matrix; and summing all elements in the feature interaction matrix to obtain target feature interaction parameters.

[0186] Here, the weighted feature interaction vectors corresponding to each feature pair can be represented as a K-row, N-column matrix, denoted as the feature interaction matrix. In the feature interaction matrix, K is the number of feature pairs, and N is the dimension of the weighted feature interaction vectors. The dimensions of the weighted feature interaction vectors, the feature interaction vectors, and the latent vectors are all the same. Rows represent feature pairs, and columns have no special meaning. Each element in each row represents the weighted feature interaction vector corresponding to each feature pair. By summing all elements in this feature interaction matrix, the target feature interaction parameters are obtained. Thus, by performing a simple summation operation on the weighted feature interaction vectors corresponding to each feature pair, which are represented in matrix form, the efficiency of vector fusion processing can be effectively improved.

[0187] For example, for feature pair 1, feature pair 2, and feature pair 3, the weighted feature interaction vector corresponding to feature pair 1 is: The weighted feature interaction vector corresponding to feature pair 2 is The weighted feature interaction vector corresponding to feature pair 3 is The weighted feature interaction vectors corresponding to feature pair 1, feature pair 2, and feature pair 3 are integrated into a feature interaction matrix, which can be represented as follows: The summation of all elements in the feature interaction matrix is ​​0.005574, which is the target interaction feature parameter.

[0188] In some implementations, vector fusion processing is performed on the weighted feature interaction vectors corresponding to multiple feature pairs to obtain target feature interaction parameters. This may include: integrating the weighted feature interaction vectors corresponding to multiple feature pairs into a feature interaction matrix; summing the elements in the feature interaction matrix column by column to obtain an intermediate feature interaction vector; and reducing the dimensionality of the intermediate feature interaction vector to obtain the target feature interaction parameters.

[0189] Here, the weighted feature interaction vectors corresponding to each feature pair can be represented as a K-row, N-column matrix, denoted as the feature interaction matrix. In the feature interaction matrix, K is the number of feature pairs, and N is the dimension of the weighted feature interaction vectors. The dimensions of the weighted feature interaction vectors, the feature interaction vectors, and the latent vectors are all the same. Rows represent feature pairs, and columns have no special meaning. The elements in each row of the matrix represent the weighted feature interaction vectors corresponding to each feature pair.

[0190] First, sum the elements in the same column of the feature interaction matrix (i.e., sum by column). This results in a 1-row, N-column matrix (vector). The rows and columns have no special meaning, and N is the dimension of the weighted feature interaction vector. The elements in the matrix together constitute the intermediate feature interaction vector. For example, for feature pair 1, feature pair 2, and feature pair 3, the weighted feature interaction vector corresponding to feature pair 1 is... The weighted feature interaction vector corresponding to feature pair 2 is The weighted feature interaction vector corresponding to feature pair 3 is This creates a 3x2 feature interaction matrix, which can be represented as follows: Summing the elements in the same column of this matrix yields a 1x2 matrix, represented as follows: This is the intermediate feature interaction vector.

[0191] Then, the intermediate feature interaction vector is subjected to dimensionality reduction to obtain the target feature interaction parameters. The method of dimensionality reduction is not limited; for example, the intermediate feature interaction vector can be input into a deep neural network (DNN), and the output value of the deep neural network can be used as the target feature interaction parameters. A deep neural network is a machine learning algorithm based on multi-layer nonlinear transformations. Through the processing of a deep neural network, a 1xN matrix (N-dimensional vector) can be transformed into a 1x1 matrix (scalar), and the elements in the matrix are the target feature interaction parameters. The above method first constructs a feature interaction matrix based on the weighted feature interaction vectors corresponding to multiple feature pairs. Then, the elements in the feature interaction matrix are summed vertically to obtain an intermediate feature interaction vector. This achieves the fusion processing of the weighted feature interaction vectors corresponding to multiple feature pairs, which further reduces the amount of data represented by the vector. Then, the intermediate feature interaction vector is dimensionality reduced to convert the N-dimensional vector into a scalar. Compared with simple algebraic operations, dimensionality reduction can improve the accuracy of the obtained target feature interaction parameters, effectively simplify the data objects for subsequent probability calculations, and reduce the computational complexity of probability calculations, thereby helping to improve the prediction efficiency and accuracy of content recommendation.

[0192] In step 820, probability calculation is performed based on the target feature interaction parameters to obtain the trigger probability of the recommended object for the recommended content.

[0193] Here, the target feature interaction parameters encompass both deep and shallow relationships among all input features. Probability calculations are performed based on these parameters to obtain the trigger probability of the recommended object for the content to be recommended. In this way, by fully considering the dependencies between various content features and object features, the prediction of the trigger probability of the recommended object for the content to be recommended can be achieved, effectively improving the prediction accuracy and thus helping to accurately recommend the desired content to the recommended object.

[0194] In some embodiments, calculating the probability based on the target feature interaction parameters to obtain the trigger probability of the recommended object for the recommended content may include: obtaining the trigger probability of the recommended object for the recommended content based on the target feature interaction parameters and in combination with machine learning methods.

[0195] Here, during probability calculation, the target feature interaction parameters can be input into a machine learning model. This model is trained using multiple first parameter samples and the label of each sample. The first parameter samples are the target feature interaction parameter samples. Each first parameter sample can be obtained by processing the content features of the content sample to be recommended and the object features of the recommended object sample, similar to steps 510-540 and 810. The label of the first parameter sample indicates whether the recommended object sample triggers the content sample to be recommended. It is usually represented by one or zero, where one indicates that the recommended object sample triggers the content sample to be recommended, and zero indicates that the recommended object sample does not trigger the content sample to be recommended. By performing probability calculation through the machine learning model, the trigger probability of the recommended object on the content to be recommended is obtained, thereby improving the prediction accuracy of the trigger probability. The machine learning method can be flexibly set according to the actual situation. For example, the machine learning method can be a support vector machine, or other models such as logistic regression, random forest, etc., but it is not limited to these.

[0196] In some implementations... Figure 13 The illustrated step 820 includes: weighting multiple input features in the input feature set to obtain multiple weighted input features; performing feature fusion processing on the multiple weighted input features to obtain target linear parameters; and calculating the probability of triggering the recommended content by the recommended object based on the target feature interaction parameters and the target linear parameters.

[0197] In probability calculations, the multiple input features in the input feature set are first weighted, that is, each input feature is assigned a corresponding linear weight. For example, each object feature is assigned a corresponding linear weight, and so on. This yields multiple weighted input features. Each weighted input feature corresponds one-to-one with the input features, and each weighted input feature is the weighted result of each input feature.

[0198] It is worth noting that the linear weights of content features or object features are used to represent the degree of independent influence of content features or object features on the trigger probability. Specifically, this disclosure does not limit the specific values ​​of the linear weights of object features and content features. The linear weights can be learned or preset according to the actual application scenario. For example, content features include price and parameters (such as functional parameters and skin parameters). In a certain scenario, considering that the impact of price on the trigger probability is greater than the impact of parameters, the linear weight of price is set to be greater than the linear weight of parameters, but this is not limited to this.

[0199] Then, feature fusion processing is performed on multiple weighted input features to obtain the target linear parameter. This target linear parameter encompasses the combined contribution of all input features to the trigger probability, effectively capturing the contribution of all input features to the trigger probability. Finally, probability calculation is performed based on the target feature interaction parameter and the target linear parameter to obtain the trigger probability of the recommended object for the content to be recommended. In this way, by fully considering the dependencies between each input feature and the combined contribution of each input feature to the trigger probability, the prediction accuracy of the trigger probability can be improved, thus helping to more accurately recommend the desired content to the recommended object.

[0200] It is worth noting that the dimension of the target linear parameter is the same as the dimension of the target feature interaction parameter. For example, if the target feature interaction parameter is a 1x1 matrix (i.e., a scalar), then the target linear parameter is also a 1x1 matrix (i.e., a scalar).

[0201] In some embodiments, performing feature fusion processing on multiple weighted input features to obtain a target linear parameter may include: summing the multiple weighted input features to obtain the target linear parameter.

[0202] Here, multiple weighted input features are fused into a single target linear parameter through summation; that is, the sum of the multiple weighted input features is determined as the target linear parameter. Summation is a simple and computationally inefficient method that effectively improves the efficiency of feature fusion processing, thereby contributing to improved prediction efficiency for content recommendation.

[0203] In some embodiments, performing feature fusion processing on multiple weighted input features to obtain a target linear parameter may include: performing weighted summation processing on multiple weighted input features to obtain a target linear parameter.

[0204] Here, multiple weighted input features are fused into a single target linear parameter through a weighted summation process. This involves assigning a corresponding weight value to each weighted input feature, and then summing these weighted features to obtain the target linear parameter. This weighted summation method considers the importance of different weighted input features, making the target linear parameter more closely reflect the actual contribution of all input features to the trigger probability, effectively improving the accuracy of feature fusion processing and thus contributing to improved prediction accuracy of the trigger probability. No restrictions are placed on the weight values ​​of the weighted input features.

[0205] In some embodiments, probabilities are calculated based on target feature interaction parameters and target linear parameters to obtain the trigger probability of the recommended object for the recommended content. This may include: obtaining the trigger probability of the recommended object for the recommended content by combining the target feature interaction parameters and target linear parameters with machine learning methods.

[0206] Here, in the probability calculation, the target feature interaction parameters and target linear parameters can be concatenated, and the concatenated result is input into a machine learning model. This machine learning model is trained using multiple second parameter samples and the label of each second parameter sample. Each second parameter sample is information obtained by concatenating the target feature interaction parameter samples and target linear parameter samples. Each second parameter sample can be obtained by processing the content features of the content sample to be recommended and the object features of the recommended object sample. The processing method is similar to parts of steps 510-540, 810, and 820. The label of the second parameter sample is used to indicate whether the recommended object sample triggers the content sample to be recommended. It is usually represented by one or zero, where one indicates that the recommended object sample triggers the content sample to be recommended, and zero indicates that the recommended object sample does not trigger the content sample to be recommended. By fully considering the dependencies between each content feature and each object feature, as well as the individual contribution of each content feature and each object feature to the trigger probability, the probability calculation operation is performed by the machine learning model to obtain the trigger probability of the recommended object for the content to be recommended, thereby further improving the prediction accuracy of the trigger probability. The machine learning method can be flexibly set according to the actual situation. For example, machine learning methods can be support vector machines, or other models such as logistic regression and random forests, but are not limited to these.

[0207] In some embodiments, calculating the probability of a recommended object triggering the recommended content based on the target feature interaction parameters and the target linear parameters may include: summing the target feature interaction parameters and the target linear parameters to obtain an initial predicted value of the recommended object for the recommended content; and normalizing the initial predicted value of the recommended object for the recommended content to obtain the trigger probability of the recommended object for the recommended content.

[0208] Here, in the probability calculation, the target feature interaction parameters and the target linear parameters are first summed to obtain the initial predicted value of the recommended object for the recommended content. The initial predicted value can be simplified to the following formula (4): (4); Equation (4) is equivalent to a linear regression formula. In equation (4), This represents the initial prediction value of the recommended object for the recommended content; Represents the linear weight of the i-th feature; Represents the i-th feature; Represents the target linear parameter; Represents the j-th feature; Indicates the number of content features and object features; This represents the attention weight of the feature pair consisting of the i-th feature and the j-th feature; Represents the latent vector of the i-th feature; The latent vector representing the j-th feature; This represents the interaction parameters of the target features.

[0209] Due to the influence of the target linear parameter, the initial predicted value is usually not between 0 and 1. Therefore, it is necessary to normalize the initial predicted value so that it falls between 0 and 1, thereby obtaining the trigger probability of the recommended object for the recommended content. The activation function used for normalization is not restricted; for example, it can be the sigmoid function, but it is not limited to this. Thus, by calculating the initial predicted value of the recommended object for the recommended content through linear regression and normalizing it to between 0 and 1, the trigger probability of the recommended object for the recommended content is obtained. Linear regression effectively reduces the computational burden of probability calculation, thus quickly calculating the trigger probability of the recommended object for the recommended content, meeting the real-time requirements of content recommendation. Moreover, since the target feature interaction parameter covers both shallow and deep relationships between all input features, and the target linear parameter covers the comprehensive contribution of all input features to the trigger probability, calculating the probability based on these factors can effectively improve the accuracy of the trigger probability.

[0210] In some embodiments, calculating the probability of a recommended object triggering the recommended content based on the target feature interaction parameters and the target linear parameters can include: summing the global bias parameter, the target feature interaction parameters, and the target linear parameters to obtain the initial predicted value of the recommended object for the recommended content; and normalizing the initial predicted value of the recommended object for the recommended content to obtain the trigger probability of the recommended object for the recommended content.

[0211] Here, in the probability calculation, a global bias parameter is introduced based on the target feature interaction parameter and the target linear parameter. The global bias parameter is a basic parameter, and its function is similar to the intercept in linear regression. It is used to adjust the output benchmark of the trigger probability to ensure that the specific value of the trigger probability is within the normal range. First, the sum of the global bias parameter, the target feature interaction parameter, and the target linear parameter is determined as the initial predicted value of the recommended object for the recommended content. The initial predicted value can be simplified to the following formula (5): (5); Equation (5) is equivalent to a linear regression formula. In equation (5), This represents the global bias parameter. For the definitions of other parameters, please refer to the parameter definitions in formula (4) above.

[0212] Due to the influence of the target linear parameter, the initial predicted value is usually not between 0 and 1. Therefore, it is necessary to normalize the initial predicted value to ensure it falls between 0 and 1, thus obtaining the trigger probability of the recommended object for the recommended content. The activation function used for normalization is not restricted; for example, it can be the sigmoid function, but it is not limited to this. In this way, the initial predicted value of the recommended object for the recommended content is calculated through linear regression, and this initial predicted value is normalized to between 0 and 1 to obtain the trigger probability of the recommended object for the recommended content. Linear regression effectively reduces the computational burden of probability calculation, thus quickly calculating the trigger probability of the recommended object for the recommended content, meeting the real-time requirements of content recommendation. Moreover, since the target feature interaction parameter covers both shallow and deep relationships between all input features, and the target linear parameter covers the comprehensive contribution of all input features to the trigger probability, calculating the probability based on these factors can effectively improve the accuracy of the trigger probability. Furthermore, introducing a global bias parameter can effectively prevent the trigger probability of the recommended object for the recommended content from deviating from the normal range, thereby ensuring the accuracy of the trigger probability.

[0213] In some implementations... Figure 13 The illustrated step 820 includes: determining the context features associated with the recommended object; weighting the context features to obtain context parameters; and calculating the probability of the recommended object triggering the recommended content based on the target feature interaction parameters and the context parameters.

[0214] To improve the accuracy of probability calculations, this disclosure introduces contextual features. Contextual features refer to information associated with and influencing the behavior of the recommended object; they reflect the object's needs and preferences in a specific time, place, and application scenario. The type of contextual features can be flexibly set according to actual circumstances. For example, contextual features may include the recommended object's activity cycle, geographical location, device location, network environment, emotional information, and social relationship information.

[0215] It's worth noting that although both contextual features and object features are characteristic information associated with the recommended object, there are significant differences between them. Contextual features are typically short-term, dynamic features that are generated in real-time based on the behavior of the recommended object. Object features, on the other hand, are typically long-term, static features that describe the long-term characteristics or preferences of the recommended object and are not generated in real-time based on its behavior. For example, in an online shopping mall scenario, object features such as industry and job of the recommended object tend to remain unchanged over the past week, i.e., they are static features. In contrast, contextual features such as geographical location, device location, and network environment are often variable. For instance, the geographical location of the recommended object might be location A on Monday, but location B on Wednesday. Or, the network environment of the recommended object might be 3G on Monday, but 4G on Tuesday. Thus, contextual features are often dynamic features.

[0216] In this embodiment, the method of obtaining context features is not limited. For example, context features can be obtained locally or from the cloud. In some embodiments, context features can be collected from various information channels on the Internet, such as the activity cycle, geographical location, device location, and network environment of recommended objects in an online shopping mall scenario. Furthermore, there is no limitation on the language involved in the obtained context features; for example, it can be feature information in at least one language such as "Chinese," "English," "French," and "German." Also, there is no limitation on the number of context features; that is, the number of context features can be arbitrary. Similarly, there is no limitation on the number of feature information contained in the context features. In some embodiments, a context feature can include multiple feature information; for example, context feature 1 can include the activity cycle, geographical location, and device location of the recommended object. In some embodiments, a single context feature can also include only one feature information; for example, context feature 1 only includes the activity cycle of the recommended object.

[0217] In the probability calculation, firstly, the contextual features associated with the recommended object are determined, such as the recommended object's activity cycle, geographical location, and device location. Then, the contextual features are weighted and summed, meaning each contextual feature is assigned a corresponding linear weight, and the sum of all contextual features with linear weights is determined as the context parameter. The context parameter encompasses the comprehensive influence of contextual features on the trigger probability, thus effectively capturing the contribution of all contextual features to the trigger probability. The linear weights of the contextual features represent the degree of independent influence of each contextual feature on the trigger probability. This embodiment does not limit the specific values ​​of the linear weights of the contextual features. Finally, probability calculation is performed based on the target feature interaction parameters and the context parameter to obtain the trigger probability of the recommended object for the recommended content. In this way, by fully considering the dependencies between input features and the comprehensive contribution of each contextual feature to the trigger probability, the prediction of the trigger probability of the recommended object for the recommended content can be achieved, further improving the prediction accuracy of the trigger probability and thus helping to more accurately recommend the desired content to the recommended object.

[0218] In some embodiments, probabilities are calculated based on target feature interaction parameters and context parameters to obtain the trigger probability of the recommended object for the recommended content. This may include: obtaining the trigger probability of the recommended object for the recommended content by combining the target feature interaction parameters and context parameters with machine learning methods.

[0219] Here, in probability calculation, target feature interaction parameters and context parameters can be fused to obtain a fused result. For example, the target feature interaction parameters and context parameters can be directly concatenated to achieve fusion; this method is simple and fast and can help improve the efficiency of probability calculation. Another example is using the target feature interaction parameters as the query and the context parameters as the key and value, processing these two parameters through an attention mechanism to achieve fusion. This approach allows the target feature interaction parameters and context parameters to perceive each other's feature information, thereby better mining the feature information hidden in each dimension parameter and helping to improve the accuracy of probability calculation. Subsequently, the fusion result is input into a machine learning model, which is trained using multiple third-parameter samples and the label of each third-parameter sample. Each third-parameter sample is information obtained by fusing target feature interaction parameter samples and context parameter samples, processed in a manner similar to steps 510-540, 810, and 820. The label of the third-parameter sample indicates whether the recommended object sample triggers the recommended content sample; it is typically represented as one or zero, where one indicates the recommended object sample triggers the recommended content sample, and zero indicates the recommended object sample does not trigger the recommended content sample. By fully considering the dependencies between input features and the individual contribution of each context feature to the trigger probability, the machine learning model performs probability calculations to obtain the trigger probability of the recommended object for the recommended content, thereby further improving the prediction accuracy of the trigger probability. The machine learning method can be flexibly set according to the actual situation. For example, the machine learning method can be a support vector machine, or other models such as logistic regression or random forest, but it is not limited to these.

[0220] In some embodiments, calculating the probability of a recommended object triggering the recommended content based on the target feature interaction parameters and context parameters may include: summing the target feature interaction parameters and context parameters to obtain an initial predicted value of the recommended object for the recommended content; and normalizing the initial predicted value of the recommended object for the recommended content to obtain the trigger probability of the recommended object for the recommended content.

[0221] Here, in the probability calculation, the target feature interaction parameters and context parameters are first summed to obtain the initial prediction value of the recommended object for the recommended content. The initial prediction value can be simplified to the following formula (6): (6); Equation (6) is equivalent to a linear regression formula. In equation (6), Represents the linear weight of the v-th context feature; This represents the v-th context feature; The number of context features; This indicates the context parameter. For the definitions of other parameters, please refer to the parameter definitions in formula (4) above.

[0222] Due to the influence of context parameters, the initial predicted value is usually not between 0 and 1. Therefore, it needs to be normalized to ensure that the initial predicted value falls between 0 and 1, thus obtaining the trigger probability of the recommended object for the recommended content. The activation function used for normalization is not restricted; for example, it can be the sigmoid function, but it is not limited to this. Thus, the initial predicted value of the recommended object for the recommended content is calculated using linear regression, and this initial predicted value is normalized to between 0 and 1 to obtain the trigger probability of the recommended object for the recommended content. Linear regression effectively reduces the computational cost of probability calculation, allowing for rapid calculation of the trigger probability of the recommended object for the recommended content, meeting the real-time requirements of content recommendation. Furthermore, since the target feature interaction parameters encompass both shallow and deep relationships between all input features, and the context parameters encompass the comprehensive contribution of all context features to the trigger probability, calculating the probability based on these factors effectively improves the accuracy of the trigger probability.

[0223] In some embodiments, calculating the probability of a recommendation object triggering the recommended content based on the target feature interaction parameters and context parameters may include: summing the target feature interaction parameters, target linear parameters, and context parameters to obtain an initial predicted value of the recommendation object for the recommended content; and normalizing the initial predicted value of the recommendation object for the recommended content to obtain the trigger probability of the recommendation object for the recommended content.

[0224] Here, in the probability calculation, a target linear parameter is introduced based on the target feature interaction parameter and the context parameter. First, the target feature interaction parameter, the target linear parameter, and the context parameter are summed to obtain the initial predicted value of the recommended object for the recommended content. The initial predicted value can satisfy the following formula (7): (7).

[0225] Equation (7) is equivalent to a linear regression formula. The parameter definitions in equation (7) can be found in the parameter definitions of equation (6) and equation (4) above.

[0226] Due to the influence of the target linear parameter and context parameters, the initial predicted value is usually not between 0 and 1. Therefore, it is necessary to normalize the initial predicted value so that it falls between 0 and 1, thereby obtaining the trigger probability of the recommended object for the recommended content. The activation function used for normalization is not restricted; for example, it can be the sigmoid function, but it is not limited to this. Thus, by calculating the initial predicted value of the recommended object for the recommended content through linear regression and normalizing it to between 0 and 1, the trigger probability of the recommended object for the recommended content is obtained. Linear regression effectively reduces the computational burden of probability calculation, thus quickly calculating the trigger probability of the recommended object for the recommended content, meeting the real-time requirements of content recommendation. Moreover, since the target linear parameter encompasses the comprehensive contribution of all input features to the trigger probability, the target feature interaction parameter encompasses both shallow and deep relationships between all input features, and the context parameter encompasses the comprehensive contribution of all context features to the trigger probability, calculating the probability based on these factors can effectively improve the accuracy of the trigger probability.

[0227] In some embodiments, probabilistic calculation based on target feature interaction parameters and context parameters to obtain the trigger probability of the recommended object for the recommended content may include: summing the global bias parameter, target feature interaction parameter, target linear parameter, and context parameter to obtain the initial predicted value of the recommended object for the recommended content; and normalizing the initial predicted value of the recommended object for the recommended content to obtain the trigger probability of the recommended object for the recommended content.

[0228] Here, in the probability calculation, based on the target feature interaction parameters and context parameters, target linear parameters and global bias parameters are introduced. The global bias parameter is a basic parameter, and its function is similar to the intercept in linear regression. It is used to adjust the output benchmark of the trigger probability to ensure that the specific value of the trigger probability is within the normal range. First, the global bias parameter, target feature interaction parameters, target linear parameters and context parameters are summed to obtain the initial predicted value of the recommended object for the recommended content. The initial predicted value satisfies the following formula (8): (8); Equation (8) is equivalent to a linear regression formula. The parameter definitions in Equation (8) can be found in Equation (6) and Equation (4) above.

[0229] Due to the influence of the target linear parameter and context parameters, the initial predicted value is usually not between 0 and 1. Therefore, it is necessary to normalize the initial predicted value so that it falls between 0 and 1, thereby obtaining the trigger probability of the recommended object for the recommended content. The activation function used for normalization is not restricted; for example, it can be the sigmoid function, but it is not limited to this. Thus, by calculating the initial predicted value of the recommended object for the recommended content through linear regression and normalizing it to between 0 and 1, the trigger probability of the recommended object for the recommended content is obtained. Linear regression effectively reduces the computational burden of probability calculation, thus quickly calculating the trigger probability of the recommended object for the recommended content, meeting the real-time requirements of content recommendation. Moreover, since the target linear parameter encompasses the comprehensive contribution of all input features to the trigger probability, the target feature interaction parameter encompasses both shallow and deep relationships between all input features, and the context parameter encompasses the comprehensive contribution of all context features to the trigger probability, calculating the probability based on these factors can effectively improve the accuracy of the trigger probability. In addition, introducing a global bias parameter can effectively prevent the trigger probability of the recommended content from deviating from the normal range, thereby ensuring the accuracy of the trigger probability.

[0230] Through steps 810 to 820 above, firstly, based on the weighted feature interaction vectors, vector fusion processing is performed on the weighted feature interaction vectors corresponding to multiple feature pairs to obtain the target feature interaction parameters. These target feature interaction parameters encompass both deep and shallow relationships between all features. By fusing the weighted feature interaction vectors corresponding to multiple feature pairs into a comprehensive target feature interaction parameter, the data object for subsequent probability calculations can be effectively simplified, reducing the computational complexity of probability calculations and thus improving the prediction efficiency of content recommendation. Then, by fully considering the dependencies between each input feature, the prediction of the trigger probability of the recommended object for the content to be recommended can be achieved, effectively improving the prediction accuracy of the trigger probability, thereby helping to accurately recommend the required content to the recommended object.

[0231] Example of the specific usage process of the content recommendation method in this embodiment of the disclosure The following describes the content recommendation method provided in this disclosure from the perspective of its underlying implementation. For example... Figure 14 As shown, Figure 14 This is an optional example diagram of the content recommendation method provided in this disclosure. The content recommendation method mainly includes six steps: feature pair combination, feature interaction processing, attention calculation, weighting processing, prediction processing, and recommendation operation, which will be described separately below.

[0232] 1) Feature pair combination.

[0233] In feature pair combination, firstly, multiple object features of the recommended object and multiple content features of the content to be recommended are obtained. These features are the input features, and an input feature set is constructed based on these features. Object features are highly correlated with the recommendation and highlight the characteristics of the recommended object; content features are highly correlated with the content to be recommended and highlight the characteristics of the content to be recommended. Then, multiple object features and multiple content features are paired in the input feature set to obtain multiple feature pairs. Each feature pair contains two input features from the input feature set, which can be either object features or content features. This approach retains key information related to the recommended object and the content to be recommended while improving the efficiency of subsequent feature interactions. The number of features is n, and the number of feature pairs is K.

[0234] The pairwise combination method used here involves combining multiple object features of the recommended object and multiple content features of the content to be recommended. This results in a single feature pair that simultaneously belongs to both the recommended object and the content to be recommended. This combination method yields multiple feature pairs that simultaneously belong to both the recommended object and the content to be recommended. These multiple feature pairs that simultaneously belong to both the recommended object and the content to be recommended are then identified as the final set of feature pairs.

[0235] For example, there exist object feature 1, object feature 2, and content feature 3. The specific value of object feature 1 is 0.1, the specific value of object feature 2 is 0.2, and the specific value of content feature 3 is 0.3. These features can collectively form a 1x3 matrix, which is represented as follows: The object feature 1, object feature 2, and content feature 1 are sorted, i.e., object feature 1 is feature 1, object feature 2 is feature 2, and content feature 3 is feature 3. Through feature pair combination processing, feature pair 1, feature pair 2, and feature pair 3 can be obtained. Feature pair 1 is represented as [object feature 1, object feature 2], i.e., [0.1, 0.2]; feature pair 2 is represented as [object feature 1, content feature 1], i.e., [0.1, 0.3]; and feature pair 3 is represented as [object feature 2, content feature 1], i.e., [0.2, 0.3].

[0236] 2) Feature interaction processing.

[0237] In feature interaction processing, for each feature pair, the following steps are taken: First, in the latent vector matrix, determine the latent vectors corresponding to the two input features in the feature pair, where the latent vector matrix is ​​a learnable matrix. Then, multiply the latent vectors corresponding to the two input features in the feature pair element-wise to obtain the interaction latent vector for the feature pair. Multiply the two input features in the feature pair to obtain the interaction feature for the feature pair. Multiply the interaction latent vector and the interaction feature for the feature pair to obtain the feature interaction vector for the feature pair. Thus, using the latent vectors of the input features as a basis for feature interaction effectively reduces data dimensionality, ensuring that the number of data objects for attention computation is not excessive, reducing the amount of subsequent data processing, and thus helping to improve the efficiency of feature interaction processing. Furthermore, by explicitly modeling the second-order interaction between the two input features within a feature pair using the latent vectors of the features, the shallow relationships between different input features can be accurately captured at a fine-grained level, thereby effectively improving the accuracy of feature interaction processing.

[0238] For example, continuing with the example of feature pair combinations above, the latent vector matrix is ​​defined as a 3x2 matrix, which can be represented as follows: The vector represented by the first row The latent vector for object feature 1, represented by the vector in the second row. The latent vector for object feature 2, represented by the vector in the third row. Let's define the latent vector for content feature 1, thus determining the latent vector for each feature. Subsequently, in the example above, we obtained feature pair 1, feature pair 2, and feature pair 3. Feature pair 1 is represented as [object feature 1, object feature 2], feature pair 2 as [object feature 1, content feature 1], and feature pair 3 as [object feature 2, content feature 1]. The specific feature interaction method for each feature pair is as follows: The product is multiplied, and the result of the feature interaction is the feature interaction vector: For feature pair 1, the interaction processing result between object feature 1 and object feature 2 is [0.7]. 0.3, 0.1 0.9] 0.1 0.2 = [0.0042, 0.0018], where [0.0042, 0.0018] is the feature interaction vector of feature pair 1.

[0239] For feature pair 2, the interaction processing result between object feature 1 and content feature 1 is [0.7]. 0.2, 0.1 0.8] 0.1 0.3 = [0.0042, 0.0024], where [0.0042, 0.0024] is the feature interaction vector of feature pair 2.

[0240] For feature pair 3, the interaction processing result between object feature 2 and content feature 1 is [0.3]. 0.2, 0.9 0.8] 0.2 0.3 = [0.0036, 0.0432].

[0241] Ultimately, the feature interaction vectors of all feature pairs can collectively form a 3x2 matrix, which is represented as follows: .

[0242] 3) Attention calculation.

[0243] Related technologies often pre-learn the weights required for feature interactions (e.g., the weights of each feature pair), which leads to insufficient flexibility in feature interactions and difficulty in balancing complex interactions between different features. To address this issue, this disclosure introduces a query and key approach to implement symmetric mean-based multi-head attention computation. This adaptively calculates the interaction importance of each feature pair, thereby flexibly balancing complex interactions between different input features and fully exploring the deep relationships between them. The specific process is as follows: 3.1) Attention computation based on multi-head attention mechanism.

[0244] Multi-head attention mechanisms provide multiple attention heads. Within each attention head, attention is calculated based on the concatenated result of the feature interaction vectors corresponding to each feature pair, resulting in the attention weights for each feature pair within that attention head. For example... Figure 15 As shown, the specific process within each attention head is as follows: a) Matrix Transformation. For each feature pair, the query vector corresponding to the feature pair is determined by multiplying the query transformation matrix and the corresponding feature interaction vector, and the key vector corresponding to the feature pair is determined by multiplying the key transformation matrix and the corresponding feature interaction vector. Both the query transformation matrix and the key transformation matrix are learnable matrices. This method transforms the feature interaction vectors of all feature pairs into their corresponding query and key vectors. This not only improves feature representation and dimensional flexibility, thus enhancing the flexibility of subsequent feature interactions, but also improves computational efficiency, meeting the real-time requirements of content recommendation.

[0245] For example, continuing with the example of feature interaction processing above, the learnable query transformation matrix is ​​denoted as... The learnable key transformation matrix is ​​denoted as In the example above, the feature interaction vector corresponding to feature pair 1 is [0.0042, 0.0018], the feature interaction vector corresponding to feature pair 2 is [0.0042, 0.0024], and the feature interaction vector corresponding to feature pair 3 is [0.0036, 0.0432]. The specific matrix transformation methods for the feature interaction vectors corresponding to feature pair 1, feature pair 2, and feature pair 3 are as follows: Indicates multiplication: Query vector corresponding to feature pair 1 and key vector They are respectively ; .

[0246] Query vector corresponding to feature pair 2 and key vector for ; .

[0247] Query vector corresponding to feature pair 3 and key vector They are respectively ; .

[0248] b) Calculation of Influence Weights. For any two feature pairs, one is defined as the first feature pair and the other as the second feature pair. Then: transpose the key vector of the first feature pair to obtain its transposed key vector; multiply the transposed key vector of the first feature pair by the query vector of the second feature pair to obtain the attention score; calculate the ratio of the attention score to the feature dimension parameter to obtain the influence weight of the first feature pair relative to the second feature pair, where the feature dimension parameter is obtained by taking the square root of the feature dimension. This method can calculate the influence weights between multiple feature pairs. This not only adaptively calculates the interaction importance of each feature pair, flexibly balancing the complex interactions between different input features and improving the flexibility of feature interactions, but also accurately captures the dependencies between any two feature pairs, effectively uncovering deep relationships between input features, and prompting the second feature pair to focus on information in the first feature pair related to content recommendation, thereby improving the accuracy of the influence weights.

[0249] For example, suppose the query vector corresponding to feature pair 1 is The key vector corresponding to feature pair 1 is The query vector corresponding to feature pair 2 is The key vector corresponding to feature pair 2 is The query vector corresponding to feature pair 3 is The key vector corresponding to feature pair 3 is The weighting of the influence between multiple feature pairs is calculated as follows: Dot product: The weight of the influence of feature pair 2 on the encoding of feature pair 1 is: The weight of the influence of feature pair 1 on the encoding of feature pair 2 is: .

[0250] The weight of the influence of feature pair 3 on the encoding of feature pair 1 is: The weight of the influence of feature pair 1 on the encoding of feature pair 3 is: .

[0251] The weight of the influence of feature pair 3 on the encoding of feature pair 2 is: The weight of the influence of feature pair 2 on the encoding of feature pair 3 is: .

[0252] The influence weights among the three feature pairs mentioned above together form a 3x3 matrix, denoted as the weight matrix. Both rows and columns of the weight matrix represent feature pairs. The first row and first column represent feature pair 1, the second row and second column represent feature pair 2, and the third row and third column represent feature pair 3. The elements in the matrix represent the influence weight of the column-represented feature pair relative to the row-represented feature pair encoding. For example, the first row and second column represent the influence weight of feature pair 2 relative to feature pair 1 encoding. Since the influence weight of a feature pair on itself is not calculated, the diagonal from the top left to the bottom right of the weight matrix is ​​left empty. Therefore, the weight matrix can be represented as follows: , This indicates that the value is empty. As can be seen from the weight matrix, the upper and lower triangles of the weight matrix are not symmetrical along the diagonal from the upper left corner to the lower right corner of the matrix. This means that the influence weight of one feature pair relative to the encoding of another feature pair is different from the influence weight of the other feature pair relative to the encoding of one feature pair. For example, the influence weight of feature pair 1 relative to the encoding of feature 2 is different from the influence weight of feature pair 2 relative to the encoding of feature pair 1.

[0253] It should be noted that the examples affecting the weight calculation are independent and have no necessary numerical relationship with the examples above.

[0254] c) Symmetric Mean Processing. In content recommendation, feature pairs often do not have an order relationship; the influence weight of each feature pair on other feature pairs and the influence weight of other feature pairs on each feature pair should be the same. However, when using a self-attention mechanism, the influence weight of each feature pair on other feature pairs and the influence weight of other feature pairs on each feature pair are often different. This clearly contradicts the characteristics of content recommendation, thus affecting the accuracy of content recommendation.

[0255] To address this, for any two feature pairs, one is defined as the first feature pair and the other as the second feature pair. Then, the average influence weight of the first feature pair relative to the second feature pair, and the average influence weight of the second feature pair relative to the first feature pair, is determined. Then, the average influence weight is replaced with both the average influence weight. This promotes a more balanced distribution of feature interaction weights, ensuring the symmetry of feature interactions and making the influence weights more aligned with the characteristics of content recommendation, thereby improving the accuracy of the influence weights.

[0256] For example, continuing with the example of calculating the influence weights above, the influence weight of feature pair 2 relative to feature pair 1 is 0.018, the influence weight of feature pair 1 relative to feature pair 2 is 0.022, the influence weight of feature pair 3 relative to feature pair 1 is 0.028, the influence weight of feature pair 1 relative to feature pair 3 is 0.032, the influence weight of feature pair 3 relative to feature pair 2 is 0.068, and the influence weight of feature pair 2 relative to feature pair 3 is 0.072. Therefore, the symmetric mean processing method is as follows: The average influence weight between feature pair 1 and feature pair 2 is determined by taking the mean of the influence weights of feature pair 2 relative to feature pair 1 and feature pair 2, which is (0.018 + 0.022) / 2 = 0.020. The influence weights of feature pair 1 and feature pair 2 relative to feature pair 1 are then replaced with the average influence weight between feature pair 1 and feature pair 2. That is, the final influence weights of feature pair 1 and feature pair 2 relative to feature pair 1 are both 0.020.

[0257] The average influence weight between feature pair 1 and feature pair 3 is determined by taking the mean of the influence weights of feature pair 3 relative to feature pair 1 and feature pair 1 relative to feature pair 3. This mean weight is (0.028 + 0.032) / 2 = 0.030. The influence weights of feature pair 1 and feature pair 3 relative to feature pair 1 are then replaced with the average influence weight between feature pair 1 and feature pair 3. Therefore, the final influence weights of feature pair 1 and feature pair 3 relative to feature pair 1 are both 0.030.

[0258] The average influence weight between feature pair 2 and feature pair 3 is determined by taking the average influence weight of feature pair 3 relative to feature pair 2 and feature pair 3, which is (0.068 + 0.072) / 2 = 0.070. The influence weights of feature pair 2 and feature pair 3 relative to feature pair 3, and feature pair 3 and feature pair 2, are then replaced with the average influence weight between feature pair 2 and feature pair 3. That is, the final influence weights of feature pair 2 and feature pair 3 relative to feature pair 2 are both 0.070.

[0259] After symmetric averaging, all influence weights together form a 3x3 matrix, denoted as the symmetric mean matrix. The rows and columns of the symmetric mean matrix represent feature pairs. The first row and first column represent feature pair 1, the second row and second column represent feature pair 2, and the third row and third column represent feature pair 3. The elements in the matrix represent the influence weight of the column-represented feature pair relative to the row-represented feature pair encoding. For example, the first row and second column represent the influence weight of feature pair 2 relative to feature pair 1 encoding. Since the influence weight of a feature pair on itself is not calculated, the diagonal from the top left to the bottom right of the weight matrix is ​​left empty. Therefore, the symmetric mean matrix can be represented as follows: , This indicates that the value is set to empty. As can be seen from the symmetric mean matrix, the upper and lower triangles of the symmetric mean matrix are symmetrical along the diagonal from the upper left corner to the lower right corner of the matrix. This means that the influence weight of the first feature pair relative to the encoding of the second feature pair is the same as the influence weight of the second feature pair relative to the encoding of the first feature pair. For example, the influence weight of feature pair 1 relative to the encoding of feature 2 is the same as the influence weight of feature pair 2 relative to the encoding of feature pair 1.

[0260] Of course, besides the numerical symmetric mean method mentioned above, there is also a matrix-based symmetric mean method, which is more efficient when performing calculations using matrices as the unit. The influence weight of feature pair 2 relative to feature pair 1 is 0.018, the influence weight of feature pair 1 relative to feature pair 2 is 0.022, the influence weight of feature pair 3 relative to feature pair 1 is 0.028, the influence weight of feature pair 1 relative to feature pair 3 is 0.032, the influence weight of feature pair 3 relative to feature pair 2 is 0.068, and the influence weight of feature pair 2 relative to feature pair 3 is 0.072. These influence weights constitute a weight matrix, which is represented as follows: , This indicates that the weight matrix is ​​empty. First, transpose the weight matrix to obtain the transposed weight matrix, which is represented as follows: Then, by averaging the weight matrix and the transpose of the weight matrix, a symmetric mean matrix can be obtained, i.e. The rows and columns of this symmetric mean matrix represent feature pairs. The first row and first column represent feature pair 1, the second row and second column represent feature pair 2, and the third row and third column represent feature pair 3. The elements in the matrix represent the weight of the column-represented feature pair encoding relative to the row-represented feature pair encoding. For example, the first row and second column represent the weight of the feature pair encoding relative to the feature pair encoding 1.

[0261] d) Weight fusion processing. Calculating influence weights yields the influence weight of each feature pair on all other feature pairs except itself. However, these influence weights reflect the local importance of each feature pair. Content recommendation often requires the global importance of individual feature pairs, i.e., the degree of influence each feature pair has on all other feature pairs. To address this, as follows... Figure 16 As shown, for each feature pair, we can sum the influence weights of the feature pair on other feature pairs to obtain the attention weight of the feature pair. This can capture the influence of the feature pair on all feature pairs except itself, rather than being limited to the local interaction between any two feature pairs, thus further improving the accuracy of attention calculation.

[0262] For example, if the influence weight of feature pair 1 relative to feature pair 2 is 0.02, and the influence weight of feature pair 1 relative to feature pair 3 is 0.03, then the attention weight of feature pair 1 is 0.02 + 0.03 = 0.05. If the influence weight of feature pair 2 relative to feature pair 1 is 0.02, and the influence weight of feature pair 2 relative to feature pair 3 is 0.07, then the attention weight of feature pair 2 is 0.02 + 0.07 = 0.09. If the influence weight of feature pair 3 relative to feature pair 1 is 0.03, and the influence weight of feature pair 3 relative to feature pair 2 is 0.07, then the attention weight of feature pair 3 is 0.03 + 0.07 = 0.1. The attention weights of each feature pair together form a 1x3 matrix, denoted as the global weight matrix. In the global weight matrix, rows have no special meaning, columns represent feature pairs, and elements in the matrix represent the attention weights of the feature pairs. The global weight matrix can be represented as follows: .

[0263] It should be noted that the example in the weight fusion processing section is independent and there is no necessary connection between it and the example above in terms of numerical relationship.

[0264] 3.2) Fusion processing of attention weights.

[0265] Since each attention head may focus on different feature dimensions or semantic spaces of the input, the attention weights corresponding to multiple feature pairs in a single attention head reflect the global importance of the feature pairs within that single attention head, rather than their global importance across all attention heads. Therefore, for each feature pair, we can average the attention weights of that feature pair across multiple attention heads to obtain the average attention weight for that feature pair. By integrating the attention distributions of multiple attention heads, we can effectively capture the comprehensive importance of the feature pair in the global context.

[0266] For example, three attention heads are set up, namely attention head 1, attention head 2 and attention head 3. The attention weight of feature pair 1 in attention head 1 is 0.05, the attention weight of feature pair 1 in attention head 2 is 0.02, and the attention weight of feature pair 1 in attention head 3 is 0.08. Then the average attention weight corresponding to feature pair 1 is (0.05+0.02+0.08) / 3=0.05.

[0267] 4) Weighted processing.

[0268] For each feature pair, the product of the average attention weight corresponding to the feature pair and the feature interaction vector corresponding to the feature pair is determined as the weighted feature interaction vector of the feature pair. This can effectively control the interaction intensity of the feature interaction vector while retaining the key information related to content recommendation, making the obtained weighted feature interaction vector more accurate, thereby effectively improving the accuracy of feature interaction.

[0269] 5) Predictive processing.

[0270] First, the weighted feature interaction vectors corresponding to multiple feature pairs are fused to obtain the target feature interaction parameters. For example, the weighted feature interaction vectors corresponding to multiple feature pairs are integrated into a feature interaction matrix; the sum of all elements in the feature interaction matrix yields the target feature interaction parameters. Alternatively, the weighted feature interaction vectors corresponding to multiple feature pairs are integrated into a feature interaction matrix; the sum of elements in the same column of the feature interaction matrix yields an intermediate feature interaction vector; this intermediate feature interaction vector is then transformed using a deep neural network to obtain the target feature interaction parameters. Simultaneously, multiple input features (i.e., content features and object features) in the input feature set are weighted, i.e., each input feature is assigned a corresponding linear weight, resulting in multiple weighted input features. These weighted input features correspond one-to-one with the input features. The sum of these weighted input features yields the target linear parameters. Finally, the global bias parameter, the target feature interaction parameters, and the target linear parameters are summed to obtain the initial predicted value of the recommended object for the content to be recommended. Finally, the initial predicted values ​​of the recommended objects and the content to be recommended are normalized to obtain the trigger probability of the recommended objects for the recommended content. On one hand, linear regression effectively reduces the computational cost of probability calculation, thus quickly calculating the trigger probability of the recommended objects for the recommended content, meeting the real-time requirements of content recommendation. On the other hand, since the target feature interaction parameters cover both shallow and deep relationships between all input features, and the target linear parameters cover the comprehensive contribution of all input features to the trigger probability, calculating the probability based on these factors can effectively improve the accuracy of the trigger probability. Furthermore, introducing a global bias parameter can effectively prevent the trigger probability of the recommended objects for the recommended content from deviating from the normal range, thereby ensuring the accuracy of the trigger probability.

[0271] 6) Recommended operation.

[0272] In the process of performing a recommendation operation on a single recommendation object, if there are multiple items to be recommended, the multiple items to be recommended are filtered based on the trigger probability of the recommendation object for each item. Items with a trigger probability higher than a probability threshold are selected as target items to be recommended, and the operation of recommending the target items to the recommendation object is performed. For example, the target items to be recommended are displayed on the recommendation object's terminal. Taking an online shopping scenario as an example, if the items to be recommended are skins and there are multiple items to be recommended, the content recommendation method provided in this disclosure can determine the trigger probability of the recommendation object for each skin, select one or more skins with a trigger probability higher than a probability threshold based on the trigger probability, and perform the operation of recommending these selected skins to the recommendation object. For example, using... Figure 1Taking the system architecture shown as an example, these selected skins are displayed on the terminal 140 of the recommending object, so that suitable skins can be recommended to the recommending object, thereby improving the shopping experience of the recommending object.

[0273] Therefore, this disclosure proposes a content recommendation method. First, multiple feature pairs are obtained, each containing two input features from an input feature set. These input features are either object features of the recommended object or content features of the content to be recommended. Second, feature interaction processing is performed on the two input features in each feature pair to obtain a feature interaction vector corresponding to each feature pair. Then, based on the concatenation result of the feature interaction vectors corresponding to each feature pair, attention calculation is performed to obtain the attention weight for each feature pair. Next, according to the attention weights corresponding to each feature pair, the feature interaction vectors corresponding to each feature pair are weighted to obtain weighted feature interaction vectors corresponding to each feature pair. Finally, based on the weighted feature interaction vectors corresponding to each feature pair, prediction processing is performed to obtain the trigger probability of the recommended object for the content to be recommended. Based on the trigger probability, the operation of recommending the content to be recommended to the recommended object is executed. Compared to related techniques that rely on pre-learned weights, this disclosure, by calculating the attention weight of each feature pair in real time, can adaptively achieve weight allocation for different feature pairs, improve the flexibility of feature interaction, and fully explore the deep relationships between different input features. Therefore, this disclosure can effectively improve the accuracy of content recommendation.

[0274] Experimental Results Example The content recommendation method according to the embodiments of this disclosure was experimentally verified. The verification process used a publicly available dataset of related technologies, containing 100,000 experimental samples, including object feature samples of multiple recommended objects and content feature samples of multiple recommended contents. Furthermore, the comparison networks used in the experimental verification process were Factorization Machine (FM) and Attention Factorization Machine (AFM), and AUC was selected as the evaluation metric. AUC is a commonly used evaluation metric, referring to the area under the Receiver Operating Characteristic Curve (ROC). The content recommendation method provided by the embodiments of this disclosure was integrated into a single overall model, and this overall model, the Factorization Machine, and the Attention Factorization Machine were trained and tested on the aforementioned publicly available dataset. After testing, the AUC of the Factorization Machine was 0.734, the AUC of the Attention Factorization Machine was 0.741, and the AUC of the overall model was 0.768. The content recommendation method provided by the embodiments of this disclosure can effectively improve the AUC by 1% to 3%.

[0275] Description of apparatus and devices according to embodiments of this disclosure It is understood that although the steps in the above flowcharts are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated in this embodiment, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the above flowcharts may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps.

[0276] Reference Figure 17 , Figure 17 This is a schematic diagram of the structure of the content recommendation device 910 provided in this embodiment of the disclosure. The content recommendation device 910 includes: The acquisition module 911 is used to acquire multiple feature pairs. Each feature pair contains two input features from the input feature set. The input features in the input feature set are either the object features of the recommended object or the content features of the content to be recommended. The feature interaction module 912 is used to perform feature interaction processing on the two input features in each feature pair to obtain the feature interaction vector corresponding to each feature pair. Attention module 913 is used to perform attention calculation based on the concatenation result of the corresponding feature interaction vectors of each feature pair, and obtain the attention weight of each feature pair. The weighted processing module 914 is used to perform weighted processing on the feature interaction vectors corresponding to the multiple feature pairs according to the attention weights corresponding to the multiple feature pairs, so as to obtain the weighted feature interaction vectors corresponding to the multiple feature pairs. The prediction module 915 is used to perform prediction processing on the weighted feature interaction vectors corresponding to multiple features to obtain the trigger probability of the recommended object for the recommended content. The recommendation module 916 is used to recommend content to be recommended to the recommendation object based on the trigger probability.

[0277] Optionally, the attention module 913 is specifically used for: The feature interaction vectors corresponding to multiple feature pairs are transformed to obtain the transformation vectors corresponding to the multiple feature pairs. Based on the transformation vector corresponding to each feature pair in the multiple feature pairs, determine the influence weight of each feature pair relative to each other feature pair in the multiple feature pairs; The attention weight for each feature pair is determined based on the influence weight of each feature pair relative to each other feature pair among the multiple feature pairs.

[0278] Optionally, the attention module 913 is specifically used for: Based on the query transformation matrix, the feature interaction vectors corresponding to multiple feature pairs are transformed to obtain the query vectors corresponding to multiple feature pairs. Based on the key transformation matrix, the feature interaction vectors corresponding to multiple feature pairs are transformed to obtain the key vectors corresponding to multiple feature pairs. Based on the key vector corresponding to each feature pair and the query vector corresponding to other feature pairs, the influence weight of each feature pair relative to other feature pairs is determined.

[0279] Optionally, the attention module 913 is specifically used for: The average influence weight of each feature pair on other feature pairs and the average influence weight of other feature pairs on each feature pair are processed to obtain the average influence weight of each feature pair. Based on the average influence weight of each feature pair, update the influence weight of each feature pair on other feature pairs, and the influence weight of other feature pairs on each feature pair.

[0280] Optionally, the attention module 913 is specifically used for: In each of the multiple attention heads, attention is calculated based on the concatenation result of the feature interaction vectors corresponding to each feature pair, so as to obtain the attention weights corresponding to each feature pair in each attention head; The weighted processing module 914 is specifically used for: The attention weights of each feature pair in multiple attention heads are averaged to obtain the average attention weight for each feature pair. Based on the average attention weights corresponding to multiple feature pairs, the feature interaction vectors corresponding to multiple feature pairs are weighted to obtain the weighted feature interaction vectors corresponding to multiple feature pairs.

[0281] Optionally, the feature interaction module 912 is specifically used for: In the latent vector matrix, determine the latent vectors corresponding to the two input features in each feature pair; Based on the latent vectors corresponding to the two input features in each feature pair, feature interaction processing is performed on the two input features in each feature pair to obtain the feature interaction vector corresponding to each feature pair.

[0282] Optionally, the feature interaction module 912 is specifically used for: The latent vectors corresponding to the two input features in each feature pair are multiplied element-wise to obtain the interaction latent vector for each feature pair. Multiply the two input features in each feature pair to obtain the interaction feature corresponding to each feature pair; Multiply the latent interaction vector and the interaction feature corresponding to each feature pair to obtain the feature interaction vector corresponding to each feature pair.

[0283] Optionally, the prediction module 915 is specifically used for: The weighted feature interaction vectors corresponding to multiple feature pairs are fused to obtain the target feature interaction parameters. The probability of triggering recommended content is obtained by calculating the probability of the recommended object based on the target feature interaction parameters.

[0284] Optionally, the prediction module 915 is specifically used for: The weighted feature interaction vectors corresponding to multiple feature pairs are integrated into a feature interaction matrix; The elements in the feature interaction matrix are summed column-wise to obtain the intermediate feature interaction vector. The intermediate feature interaction vector is reduced in dimensionality to obtain the target feature interaction parameters.

[0285] Optionally, the prediction module 915 is specifically used for: Multiple input features in the input feature set are weighted separately to obtain multiple weighted input features; Multiple weighted input features are fused to obtain the target linear parameters; The probability of triggering the recommended content is obtained by calculating the probability of the recommended object based on the target feature interaction parameters and the target linear parameters.

[0286] Optionally, the prediction module 915 is specifically used for: Determine the contextual features associated with the recommended object; The context features are weighted to obtain the context parameters; The probability of triggering the recommended content is obtained by calculating the probability of the recommended object based on the target feature interaction parameters and context parameters.

[0287] Reference Figure 18 , Figure 18 The structural block diagram of a portion of the terminal 140 implementing the content recommendation method of this embodiment includes: a radio frequency (RF) circuit 1100, a memory 1200, an input unit 1300, a display unit 1400, a sensor 1500, an audio circuit 1600, a wireless fidelity (WiFi) module 1700, a processor 1800, and a power supply 1900, among other components. Those skilled in the art will understand that... Figure 18 The terminal structure shown does not constitute a limitation on mobile phones or computers and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0288] The RF circuit 1100 can be used to receive and transmit signals during information transmission or calls. In particular, it receives downlink information from the base station and processes it with the processor 1800; in addition, it transmits uplink data to the base station.

[0289] The memory 1200 can be used to store software programs and modules, and the processor 1800 executes various terminal functions and data processing by running the software programs and modules stored in the memory 1200.

[0290] The input unit 1300 can be used to receive input numeric or character information, and to generate key signal inputs related to terminal settings and function control. Specifically, the input unit 1300 may include a touch panel 1310 and other input devices 1320.

[0291] The display unit 1400 can be used to display input or provided information, as well as various menus of the terminal. The display unit 1400 may include a display panel 1410.

[0292] Audio circuitry 1600, speaker 1610, and microphone 1620 provide an audio interface.

[0293] In this embodiment, the processor 1800 included in the terminal can execute the content recommendation method of the previous embodiment. The terminals disclosed in this embodiment include, but are not limited to, mobile phones, computers, intelligent voice interaction devices, smart home appliances, vehicle terminals, and aircraft. The embodiments of this invention can be applied to various scenarios, including but not limited to cloud technology, artificial intelligence, smart transportation, and assisted driving.

[0294] Reference Figure 19 , Figure 19 The structural block diagram of a server for implementing the content recommendation method of this disclosure is shown below. The server 110 can vary significantly due to different configurations or performance characteristics. It may include one or more Central Processing Units (CPUs) 2100 (e.g., one or more processors) and a memory 2200, and one or more storage media 2300 (e.g., one or more mass storage devices) for storing application programs 2410 or data 2420. The memory 2200 and storage media 2300 may be temporary or persistent storage. The program stored in the storage media 2300 may include one or more modules (not shown in the diagram), each module including a series of instruction operations on the server 110. Furthermore, the CPU 2100 may be configured to communicate with the storage media 2300 and execute the series of instruction operations in the storage media 2300 on the server 2300.

[0295] Server 110 may also include one or more power supplies 2500, one or more wired or wireless network interfaces 2600, one or more input / output interfaces 2700, and / or one or more operating systems 2410, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.

[0296] The processor 2100 in server 110 can be used to execute the content recommendation method of embodiments of this disclosure.

[0297] This disclosure also provides an electronic device, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the content recommendation method of the foregoing embodiments.

[0298] This disclosure also provides a computer-readable storage medium for storing a computer program that performs the content recommendation methods of the foregoing embodiments.

[0299] This disclosure also provides a computer program product comprising a computer program. An electronic device's processor reads and executes the computer program, causing the electronic device to perform the content recommendation method implementing the foregoing embodiments.

[0300] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in this disclosure and the foregoing drawings are used to distinguish similar objects and are not necessarily used to describe a particular order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented, for example, in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “including,” and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatuses.

[0301] It should be understood that in this disclosure, "at least one item" means one or more, and "more than one" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.

[0302] It should be understood that in the description of the embodiments of this disclosure, "multiple" means two or more, "greater than", "less than", "exceeding" etc. are understood to exclude the number itself, and "above", "below", "within" etc. are understood to include the number itself.

[0303] In the several embodiments provided in this disclosure, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, indirect coupling or communication connection between apparatuses or units, and may be electrical, mechanical, or other forms.

[0304] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0305] Furthermore, the functional units in the various embodiments of this disclosure can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0306] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this disclosure, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions (computer programs) to cause an electronic device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this disclosure. The aforementioned storage medium includes various media capable of storing computer programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0307] It should also be understood that the various implementation methods provided in this disclosure can be combined arbitrarily to achieve different technical effects. In this disclosure, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works in conjunction with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.

[0308] The above is a detailed description of the embodiments of this disclosure. However, this disclosure is not limited to the above embodiments. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of this disclosure. All such equivalent modifications or substitutions are included within the scope defined by the claims of this disclosure.

Claims

1. A content recommendation method, characterized in that, include: Multiple feature pairs are obtained, each feature pair containing two input features from an input feature set, wherein the input features in the input feature set are either object features of the recommended object or content features of the content to be recommended; Perform feature interaction processing on the two input features in each feature pair to obtain the feature interaction vector corresponding to each feature pair; Based on the concatenation result of the feature interaction vectors corresponding to each feature pair, attention calculation is performed to obtain the attention weights corresponding to each feature pair; Based on the attention weights corresponding to the multiple feature pairs, the feature interaction vectors corresponding to the multiple feature pairs are weighted to obtain the weighted feature interaction vectors corresponding to the multiple feature pairs. Based on the multiple features, the corresponding weighted feature interaction vectors are predicted to obtain the trigger probability of the recommended object for the content to be recommended. Based on the trigger probability, the operation of recommending the content to be recommended to the recommendation object is performed.

2. The content recommendation method according to claim 1, characterized in that, The attention calculation, based on the concatenation result of the feature interaction vectors corresponding to each feature pair, to obtain the attention weights corresponding to each feature pair, includes: The feature interaction vectors corresponding to the multiple feature pairs are transformed to obtain the transformation vectors corresponding to the multiple feature pairs. Based on the transformation vector corresponding to each of the plurality of feature pairs, determine the influence weight of each feature pair relative to each of the other feature pairs in the plurality of feature pairs; The attention weight corresponding to each feature pair is determined based on the influence weight of each feature pair relative to each of the other feature pairs among the plurality of feature pairs.

3. The content recommendation method according to claim 2, characterized in that, The transformation vector includes a query vector and a key vector; the transformation process performed on the feature interaction vectors corresponding to the plurality of feature pairs respectively to obtain the transformation vectors corresponding to the plurality of feature pairs includes: Based on the query transformation matrix, the feature interaction vectors corresponding to the multiple feature pairs are transformed to obtain the query vectors corresponding to the multiple feature pairs. Based on the key transformation matrix, the feature interaction vectors corresponding to the multiple feature pairs are transformed to obtain the key vectors corresponding to the multiple feature pairs. The step of determining the influence weight of each feature pair relative to each other feature pair among the plurality of feature pairs based on the transformation vector corresponding to each feature pair includes: Based on the key vector corresponding to each feature pair and the query vector corresponding to the other feature pairs, the influence weight of each feature pair relative to the other feature pairs is determined.

4. The content recommendation method according to claim 2, characterized in that, Before determining the attention weight corresponding to each feature pair based on the influence weight of each feature pair relative to each of the other feature pairs among the plurality of feature pairs, the content recommendation method further includes: The influence weight of each feature pair relative to the other feature pairs, and the influence weight of the other feature pairs relative to each feature pair are averaged to obtain the average influence weight corresponding to each feature pair. Based on the average influence weight corresponding to each feature pair, update the influence weight of each feature pair relative to the other feature pairs, and the influence weight of the other feature pairs relative to each feature pair.

5. The content recommendation method according to claim 1, characterized in that, The attention calculation, based on the concatenation result of the feature interaction vectors corresponding to each feature pair, to obtain the attention weights corresponding to each feature pair, includes: In each of the multiple attention heads, attention is calculated based on the concatenation result of the feature interaction vectors corresponding to each feature pair, to obtain the attention weight corresponding to each feature pair in each attention head; The step of weighting the feature interaction vectors corresponding to the multiple feature pairs according to the attention weights corresponding to the multiple feature pairs respectively, to obtain the weighted feature interaction vectors corresponding to the multiple feature pairs respectively, includes: The attention weights of each feature pair in the plurality of attention heads are averaged to obtain the average attention weight corresponding to each feature pair. Based on the average attention weights corresponding to the multiple feature pairs, the feature interaction vectors corresponding to the multiple feature pairs are weighted respectively to obtain the weighted feature interaction vectors corresponding to the multiple feature pairs.

6. The content recommendation method according to claim 1, characterized in that, The step of performing feature interaction processing on the two input features in each feature pair to obtain the feature interaction vector corresponding to each feature pair includes: In the latent vector matrix, determine the latent vectors corresponding to the two input features in each feature pair, respectively; Based on the latent vectors corresponding to the two input features in each feature pair, feature interaction processing is performed on the two input features in each feature pair to obtain the feature interaction vector corresponding to each feature pair.

7. The content recommendation method according to claim 6, characterized in that, The step of performing feature interaction processing on the two input features of each feature pair based on the latent vectors corresponding to the two input features in each feature pair to obtain the feature interaction vector corresponding to each feature pair includes: The latent vectors corresponding to the two input features in each feature pair are multiplied element-wise to obtain the interaction latent vectors corresponding to each feature pair. Multiply the two input features in each feature pair to obtain the interaction feature corresponding to each feature pair; The interaction latent vector corresponding to each feature pair is multiplied with the interaction feature to obtain the feature interaction vector corresponding to each feature pair.

8. The content recommendation method according to claim 1, characterized in that, The step of performing prediction processing on the weighted feature interaction vectors corresponding to the multiple features to obtain the trigger probability of the recommended object for the content to be recommended includes: The weighted feature interaction vectors corresponding to the multiple feature pairs are fused to obtain the target feature interaction parameters. The probability of the recommended object triggering the content to be recommended is obtained by performing probability calculation based on the target feature interaction parameters.

9. The content recommendation method according to claim 8, characterized in that, The step of performing vector fusion processing on the weighted feature interaction vectors corresponding to the multiple feature pairs to obtain target feature interaction parameters includes: The weighted feature interaction vectors corresponding to the multiple feature pairs are integrated into a feature interaction matrix; The elements in the feature interaction matrix are summed column-wise to obtain the intermediate feature interaction vector; The intermediate feature interaction vector is subjected to dimensionality reduction processing to obtain the target feature interaction parameters.

10. The content recommendation method according to claim 8, characterized in that, The step of calculating the probability based on the target feature interaction parameters to obtain the trigger probability of the recommended object for the content to be recommended includes: Multiple input features in the input feature set are weighted separately to obtain multiple weighted input features; The target linear parameters are obtained by performing feature fusion processing on the multiple weighted input features; The probability of the recommended object triggering the content to be recommended is obtained by calculating the probability based on the target feature interaction parameters and the target linear parameters.

11. The content recommendation method according to claim 8, characterized in that, The step of calculating the probability based on the target feature interaction parameters to obtain the trigger probability of the recommended object for the content to be recommended includes: Determine the contextual features associated with the recommended object; The context features are weighted to obtain context parameters; The probability of the recommended object triggering the content to be recommended is obtained by calculating the probability based on the target feature interaction parameters and the context parameters.

12. A content recommendation device, characterized in that, include: The acquisition module is used to acquire multiple feature pairs, each feature pair containing two input features from an input feature set, wherein the input features in the input feature set are object features of the recommended object or content features of the content to be recommended; The feature interaction module is used to perform feature interaction processing on the two input features in each feature pair to obtain the feature interaction vector corresponding to each feature pair. The attention module is used to perform attention calculation based on the concatenation result of the feature interaction vectors corresponding to each feature pair, so as to obtain the attention weight corresponding to each feature pair; The weighted processing module is used to perform weighted processing on the feature interaction vectors corresponding to the multiple feature pairs according to the attention weights corresponding to the multiple feature pairs respectively, so as to obtain the weighted feature interaction vectors corresponding to the multiple feature pairs respectively. The prediction module is used to perform prediction processing on the weighted feature interaction vectors corresponding to the multiple features to obtain the trigger probability of the recommendation object for the content to be recommended. The recommendation module is used to recommend the content to be recommended to the recommendation object based on the trigger probability.

13. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the content recommendation method according to any one of claims 1 to 11.

14. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the content recommendation method according to any one of claims 1 to 11.

15. A computer program product, the computer program product comprising a computer program, characterized in that, The computer program is read and executed by the processor of the electronic device, causing the electronic device to perform the content recommendation method according to any one of claims 1 to 11.