Content recommendation methods, devices, electronic devices, and storage media
By calculating the first and second scores of the target object, target interest features and interaction features are constructed, which solves the problem of feature information being ignored in existing recommendation systems and achieves more accurate content recommendation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-31
- Publication Date
- 2026-03-31
AI Technical Summary
Existing recommendation systems often neglect other feature information when extracting features of interest from the actual operational data of the target object, resulting in low accuracy of content recommendation.
By calculating the first and second scores of the target object, target interest features, first interaction features, and second interaction features are constructed. Feature fusion and attention calculation are then performed to recommend content.
It improves the accuracy of content recommendation, extracts interest information from the data to be processed to the maximum extent, and avoids missing interest information.
Smart Images

Figure CN116431889B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and more specifically to a content recommendation method, apparatus, electronic device, and storage medium. Background Technology
[0002] The internet provides people with a vast amount of information, satisfying their information needs in the information age. However, it also makes it difficult for people to quickly extract truly useful information from this sea of data. Recommendation systems are information filtering systems that predict a target user's rating or preference for information. They can provide the target user with the most likely content from a massive amount of information and push this content to them, allowing the target user to quickly obtain information that is useful to them.
[0003] The data generated by the actual operations of the target object contains a large amount of feature information. However, current recommendation systems usually extract the target object's interest features from the data generated by the actual operations of the target object for content recommendation, ignoring other feature information in the actual operation data, resulting in low accuracy of content recommendation. Summary of the Invention
[0004] This application provides a content recommendation method, apparatus, electronic device, and storage medium that can improve the accuracy of content recommendation.
[0005] This application provides a content recommendation method, including:
[0006] Obtain the data to be processed for the target object, wherein the data to be processed includes operation data and the operation object corresponding to the operation data;
[0007] Based on the operation data, a first score is calculated for the operation object, and the first score is used to characterize the degree of interest of the target object in the operation object;
[0008] Based on the first score corresponding to the operation object and the feature vector corresponding to the operation object, feature fusion is performed to obtain the target interest features;
[0009] Based on the first score corresponding to the operation object, calculate the second score corresponding to the operation object;
[0010] A first interaction feature between the operation objects is calculated using the first score corresponding to all operation objects, and a second interaction feature between the operation objects is calculated using the second score corresponding to all operation objects.
[0011] Based on the data to be processed, target interest features, first interaction features, and second interaction features, content is recommended for the target object.
[0012] This application also provides a content recommendation device, including:
[0013] The acquisition module is used to acquire the data to be processed of the target object, wherein the data to be processed includes operation data and the operation object corresponding to the operation data;
[0014] The first calculation module is used to calculate a first score corresponding to the operation object based on the operation data, wherein the first score is used to characterize the degree of interest of the target object in the operation object;
[0015] The first extraction module is used to perform feature fusion based on the first score corresponding to the operation object and the feature vector corresponding to the operation object to obtain target interest features;
[0016] The second calculation module is used to calculate the second score corresponding to the operation object based on the first score corresponding to the operation object;
[0017] The second extraction module is used to calculate the first interaction feature between the operation objects using the first score corresponding to all operation objects, and to calculate the second interaction feature between the operation objects using the second score corresponding to all operation objects.
[0018] The recommendation module is used to recommend content for the target object based on the data to be processed, target interest features, first interaction features, and second interaction features.
[0019] In some embodiments, the second extraction module includes:
[0020] The first vector unit is used to form a first score vector from the first scores corresponding to all the operation objects;
[0021] The second vector unit is used to form a second score vector from the second scores corresponding to all the operation objects;
[0022] The first interaction unit is used to construct a first interaction feature between the operation objects using the first score vector;
[0023] The second interaction unit is used to construct a second interaction feature between the operation objects using the second score vector.
[0024] In some embodiments, the first interaction unit is further configured to:
[0025] Transpose the first score vector to obtain the first transpose vector;
[0026] The product of the first score vector and the first transpose vector is normalized to obtain the first interactive feature.
[0027] In some embodiments, the second interaction unit is further configured to:
[0028] Transpose the second score vector to obtain the second transpose vector;
[0029] The product of the second score vector and the second transpose vector is normalized to obtain the second interactive feature.
[0030] In some embodiments, the recommendation module 360 is further configured to:
[0031] Generate features to be processed corresponding to the data to be processed; use the first interaction feature and the second interaction feature as attention weights; perform attention calculation on the features to be processed based on the attention weights to obtain target features; recommend content for the target object based on the target features and the target interest features.
[0032] In some embodiments, the target interest features include a first interest feature and a second interest feature, and the first extraction module is further configured to:
[0033] Generate a feature vector corresponding to the operation object; calculate the ratio of the first score corresponding to the operation object to the first scores corresponding to all operation objects to obtain the first interest weight corresponding to the operation object; calculate the ratio of the second score corresponding to the operation object to the second scores corresponding to all operation objects to obtain the second interest weight corresponding to the operation object; perform feature fusion on the feature vector corresponding to each operation object according to the first interest weight corresponding to each operation object to obtain the first interest feature; perform feature fusion on the feature vector corresponding to each operation object according to the second interest weight corresponding to each operation object to obtain the second interest feature.
[0034] In some embodiments, the first extraction module is further configured to:
[0035] Multiply the first interest weight corresponding to the operation object by the feature vector corresponding to the operation object to obtain the first interest vector corresponding to the operation object; calculate the sum of the first interest vectors corresponding to all operation objects to obtain the first interest feature.
[0036] In some embodiments, the first extraction module is further configured to:
[0037] Multiply the second interest weight corresponding to the operation object by the feature vector corresponding to the operation object to obtain the second interest vector corresponding to the operation object; calculate the sum of the second interest vectors corresponding to all operation objects to obtain the second interest feature.
[0038] In some embodiments, the target interest features include a first interest feature and a second interest feature, and the first extraction module is further configured to:
[0039] The module generates features to be processed corresponding to the data to be processed; calculates a first interest feature using the first interaction feature and the features to be processed; calculates a second interest feature using the second interaction feature and the features to be processed; the recommendation module is further configured to recommend content for the target object based on the first interest feature, the second interest feature and the features to be processed.
[0040] In some embodiments, the first extraction module is further configured to multiply the first interaction feature and the feature to be processed to obtain a first feature; and to perform a mean operation on the first feature to obtain the first interest feature.
[0041] In some embodiments, the first extraction module is further configured to multiply the second interaction feature and the feature to be processed to obtain a second feature; and to perform a mean operation on the second feature to obtain the second interest feature.
[0042] In some embodiments, the first calculation module is further configured to: if target data is obtained from the operation data, normalize the target data to obtain a first score corresponding to the operation object, wherein the target data is the score given by the target object to the operation object; if the target data is not obtained from the operation data, determine the operation value of the target object performing a preset operation on the operation object; and determine the first score corresponding to the operation object based on the operation value.
[0043] This application also provides an electronic device, including a memory storing multiple instructions; the processor loads instructions from the memory to execute steps in any of the content recommendation methods provided in this application.
[0044] This application also provides a computer-readable storage medium storing a plurality of instructions adapted for loading by a processor to execute steps in any of the content recommendation methods provided in this application.
[0045] This application embodiment can extract target interest features from the data to be processed based on the first score corresponding to the operation object, and construct interaction features between the operation objects based on the first score and the second score: the first interaction feature and the second interaction feature. This can extract the interest information covered in the data to be processed to the maximum extent and avoid the omission of interest information. When recommending content based on the first interaction feature, the second interaction feature and the target interest feature, it can accurately recommend content to the target object based on rich interest information, thereby improving the accuracy of content recommendation. Attached Figure Description
[0046] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0047] Figure 1a This is a schematic diagram of a scenario illustrating the content recommendation method provided in an embodiment of this application;
[0048] Figure 1b This is a flowchart illustrating the content recommendation method provided in an embodiment of this application;
[0049] Figure 1c This is a schematic diagram of the first score of the operation object provided in the embodiments of this application;
[0050] Figure 1d This is a schematic diagram of the first interest feature provided in an embodiment of this application;
[0051] Figure 1e This is a schematic diagram of the second interest feature provided in an embodiment of this application;
[0052] Figure 1f This is a schematic diagram of the first interactive feature provided in an embodiment of this application;
[0053] Figure 1g This is a schematic diagram of the second interactive feature provided in an embodiment of this application;
[0054] Figure 1h This is a schematic diagram of the overall architecture of the content recommendation method provided in the embodiments of this application;
[0055] Figure 2 This is a flowchart illustrating the application of the content recommendation method provided in this application embodiment in a music recommendation scenario;
[0056] Figure 3 This is a schematic diagram of the structure of the content recommendation device provided in the embodiments of this application;
[0057] Figure 4 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0058] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0059] This application provides a content recommendation method, apparatus, electronic device, and storage medium.
[0060] Specifically, the content recommendation device can be integrated into an electronic device, such as a terminal or server. The terminal can be a mobile phone, tablet, smart Bluetooth device, laptop, or personal computer (PC); the server can be a single server or a server cluster consisting of multiple servers.
[0061] In some embodiments, the content recommendation device can also be integrated into multiple electronic devices. For example, the content recommendation device can be integrated into multiple servers, and the content recommendation method of this application can be implemented by multiple servers.
[0062] In some embodiments, the server may also be implemented as a terminal.
[0063] For example, refer to Figure 1a The diagram illustrates an application scenario of the content recommendation method provided in this embodiment.
[0064] like Figure 1a As shown, user terminal 101 and server 102 are located in a wireless network or a wired network, and user terminal 101 and server 102 interact with each other. Server 102 can be a standalone server or a server cluster, a local server or a cloud server.
[0065] Server 102 can obtain data to be processed through user terminal 101. The data to be processed refers to information related to the target object, which may include basic data, operation data, and operation objects corresponding to the operation data.
[0066] Basic data may include basic information such as the target object's height, weight, and gender. This basic data may be sent by the target object to the server 102 and stored through the user terminal 101. For example, when the target object registers and logs in to the account of the user terminal 101, the data is entered and sent to the server 102, and the server 102 stores the data in correspondence with the target object's identity identifier.
[0067] Operation data can refer to the operation data of the target object on the application installed in the user terminal 101. For example, the duration of the target object watching videos in the video application, the number of times the target object clicks on videos in the video application, the duration of the target object reading books in the book application, etc. The server can obtain this operation data by the target object reporting it or by collecting it through the SDK components in the various applications in the user terminal 101.
[0068] The operation data can refer to the information of the object on which the operation of the target object is applied. For example, the information of the video watched or clicked by the target object in a video application; the information of the music played by the target object in a music application; the information of the book read by the target object in a book application, etc. The server can obtain the operation data of the target object by means of reporting by the target object or by collecting it through the SDK components in the various applications in the user terminal 101.
[0069] Server 102 can calculate a first score corresponding to the operation object based on the pending data of the target object and the operation data therein. The first score is used to characterize the degree of interest of the target object in the operation object. Based on the first score and the feature vector corresponding to the operation object, feature fusion is performed to obtain target interest features. Based on the first score, a second score is calculated for the operation object. A first interaction feature between the operation objects is calculated using the first scores of all operation objects, and a second interaction feature between the operation objects is calculated using the second scores of all operation objects. Based on the pending data, target interest features, first interaction features, and second interaction features, content is recommended for the target object. That is, after obtaining the recommended content, server 102 sends the recommended content to user terminal 101.
[0070] It should be noted that in the specific embodiments of this application, the data related to the target object, such as operation data, data related to the operation object corresponding to the operation data, or basic data such as the gender and age of the target object, etc., require user permission or consent when the embodiments of this application apply these data to specific products or technologies. Furthermore, the collection, use, and processing of the relevant data must comply with the relevant laws, regulations, and standards of the relevant countries and regions. These will be explained in detail below.
[0071] Artificial intelligence (AI) is a technology that uses digital computers to simulate human perception of the environment, acquire knowledge, and use that knowledge. This technology can enable machines to possess functions similar to human perception, reasoning, and decision-making. Fundamental AI technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interactive systems, and mechatronics. AI software technologies mainly include computer vision, speech processing, natural language processing, as well as machine learning / deep learning, autonomous driving, and intelligent transportation.
[0072] Machine learning (ML) is a multidisciplinary field involving probability theory, statistics, approximation theory, convex analysis, and algorithm complexity theory, among others. It specifically studies how computers can simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental way to endow computers with intelligence; its applications span all areas of artificial intelligence. Machine learning and deep learning typically include techniques such as artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and instruction-based learning.
[0073] With the research and advancement of artificial intelligence (AI) technology, AI is being studied and applied in various fields, such as smart homes, smart wearable devices, virtual assistants, smart speakers, smart marketing, autonomous driving, drones, robots, smart healthcare, smart customer service, vehicle networking, and intelligent transportation. It is believed that with the development of technology, AI will be applied in more fields and play an increasingly important role.
[0074] In this embodiment, a content recommendation method involving artificial intelligence is provided, such as... Figure 1b As shown, the specific process of this content recommendation method can be summarized as follows:
[0075] S110. Obtain the data to be processed of the target object, wherein the data to be processed includes operation data and the operation object corresponding to the operation data.
[0076] The target audience is users who need content recommendations, and the data to be processed may include operation data and the operation objects corresponding to the operation data, etc.
[0077] Operational data refers to the data generated by the target object performing operations on the application within a historical time period, such as playing music A for two minutes, playing video B for five minutes, reading book C for ten minutes, clicking on book D six times, etc.
[0078] The historical time period is a preset time period before the current time, such as 6 hours before the current time, 1 day before the current time, or 1 week before the current time. The specific time period can be set according to actual needs, and no specific limitation is made here.
[0079] The operation object can refer to the object to be operated on by the target object, such as music, books, videos, etc. For example, in the aforementioned operation data, playing music A for two minutes, the operation object is music A. Specifically, the operation object corresponding to the operation data contained in the data to be processed can refer to the identification information of the operation object, which can uniquely identify the operation object.
[0080] In some implementations, the data to be processed may be acquired at fixed time intervals, such as once every preset time interval.
[0081] In some implementations, the data to be processed may be acquired when a triggering operation on the target object is detected. The triggering operation may be a UI refresh, an application launch, etc., and can be configured according to actual needs.
[0082] S120. Based on the operation data, calculate the first score corresponding to the operation object, whereby the first score is used to characterize the degree of interest of the target object in the operation object.
[0083] The data to be processed includes operational data and the corresponding operational objects. A first score can be calculated based on the operational data for each operational object. This first score characterizes the target object's level of interest in the operational object, reflecting its importance.
[0084] In some implementations, a higher first score indicates a higher level of interest in the target object, and vice versa.
[0085] Specifically, calculating the first score corresponding to the operation object based on the operation data corresponding to the operation object may include: if target data is obtained from the operation data, normalizing the target data to obtain the first score corresponding to the operation object, where the target data is the score given by the target object to the operation object; if the target data is not obtained from the operation data, determining the operation value of the preset operation performed by the target object on the operation object; and determining the first score corresponding to the operation object based on the operation value.
[0086] Target data refers to data obtained after the target audience rates the object being operated on. For example, it could be a user's rating of the object being operated on; a higher rating indicates a greater level of interest from the user.
[0087] Based on the operational data, it can be determined whether the target object has rated the operational object. In some implementations, if the target object has rated the operational object, the score obtained by the target object after rating the operational object can be acquired; this score is the target data. Once the target data is acquired, it can be processed to obtain the first score corresponding to the operational object. Specifically, the target data can be normalized to obtain the first score corresponding to the operational object. Normalization can transform the target data into the range of 0-1 to facilitate data processing.
[0088] In some implementations, if the target object does not score the operation object, the target data cannot be obtained. In this case, the operation value of the target object performing a preset operation on the operation object can be determined from the operation data, and the first score of the operation object can be calculated based on the operation value.
[0089] Preset operations can refer to click operations, browsing operations, etc., while operation values refer to parameters that can quantify preset operations. For example, they can refer to the number of click operations, the duration of browsing operations, the duration of playback operations, etc.
[0090] When calculating the first score of an operation object based on its operation value, the ratio between the operation value of the operation object and the total operation value can be calculated. In some implementations, the total operation value may refer to the sum of the operation values of each operation object. For example, if the operation objects are book A and book B, and the target object clicks book A x1 times and book B y1 times, then the total operation value is x1+y1, the first score for book A is x1 / x1+y1, and the first score for book B is y1 / x1+y1.
[0091] In some implementations, the total operation value can refer to the total duration of the operation object. For example, when the operation object is an audio or video object, each operation object has a corresponding total duration. The browsing time for each operation object can be obtained through the operation data, and the ratio of the browsing time to the total duration is used as the first score for that operation object. For example, if the operation objects are music B and music C, and the user's browsing time for music B is x2, the total duration of music B is Z1, and the user's browsing time for music C is x3, the total duration of music C is Z2, then the first score for music B is x2 / Z1, and the first score for music C is x3 / Z2. Thus, the first score can be equivalently represented by the specific operations performed on the operation object by the target object.
[0092] From the acquired data to be processed, all operation objects are combined according to the chronological order of the operations performed on the target object to obtain an operation object sequence. After calculating the first score for each operation object in the operation object sequence, the first scores of operation objects at different time positions can be obtained. For example, refer to... Figure 1c This shows a schematic diagram of the first score of the operation object. Figure 1c It can represent the first score of the operation object in the entire sequence of operation objects. The target object performs operations on the operation object at different times, so at each moment, it is the first score corresponding to the operation object.
[0093] S130. Based on the first score corresponding to the operation object and the feature vector corresponding to the operation object, feature fusion is performed to obtain the target interest feature.
[0094] After obtaining the operation data and the operation objects corresponding to the operation data, an operation object sequence can be generated based on the operation objects.
[0095] In some embodiments, to generate feature vectors corresponding to the operation objects, the operation objects of the sample objects can be used to train a preset word vector model to obtain a trained word vector model. The word vector model can be a model used to generate word vectors, that is, representing a word as a vector. For example, if a word is input into the word vector model, the model can output the vector representation of that word, which is an important technique in natural language processing. The word vector model can be a neural network-based word vector model; for example, it can include Word2vec, etc.
[0096] Word2vec maps words to a low-dimensional vector space and calculates the similarity between words by measuring the distance between them. There are various types of Word2vec models, such as CBOW (Continuous Bag of Words) models, Skip-gram models, and so on.
[0097] The Skip-gram model is a word vector model that predicts the context words from the current word. The CBOW model predicts the word vector of the current word given the context words. For example, the input of the CBOW model is the context of wi: wi-c, ..., wi-2, wi-1, wi+1, wi+2, ..., wi+c. Its output is wi, where the window size of the context, c, can be set according to the needs of the actual application. For example, consider the sentence "I drive my car to the store". If the word group {"I", "drive", "my", "to", "the", "store"} is taken as input, then "car" is the output.
[0098] The operation objects in the data to be processed are transformed into a sequence of operation objects. Then, the sequence of operation objects is input into the trained word vector model to obtain the feature vector corresponding to each operation object.
[0099] To improve the accuracy of content recommendation, when encoding target interest features, one can encode features that the target audience is interested in and features that they are not interested in. This identifies content that the target audience is not interested in and avoids recommending such content to them, thereby improving the accuracy of content recommendation. Target interest features can include a first interest feature and a second interest feature, where the first interest feature represents the target audience's interests, and the second interest feature represents the target audience's disinterest. The target audience's interest and disinterest features can be encoded based on a first score.
[0100] Specifically, when obtaining target interest features, the ratio of the first score corresponding to the operation object to the first scores corresponding to all operation objects can be calculated to obtain the first interest weight of the operation object; the ratio of the second score corresponding to the operation object to the second scores corresponding to all operation objects can be calculated to obtain the second interest weight of the operation object; based on the first interest weight of each operation object, feature fusion is performed on the feature vector corresponding to each operation object to obtain the first interest feature; based on the second interest weight of each operation object, feature fusion is performed on the feature vector corresponding to each operation object to obtain the second interest feature.
[0101] The first interest weight can represent the proportion of interest of the current operation object among all operation objects. Specifically, it can be calculated by the ratio of the first score of the operation object to the sum of the first scores of all operation objects. Then, the first interest weight of each operation object is multiplied by the feature vector corresponding to the operation object to obtain the first interest vector corresponding to the operation object. The sum of the first interest vectors corresponding to all operation objects is calculated to obtain the first interest feature.
[0102] Specifically, the first interest feature can be calculated using the following formula:
[0103] ;
[0104] in, This represents the first interest feature vector; Let z represent the first score corresponding to the i-th operation object; z represents the sum of the first scores corresponding to all operation objects. This represents the feature vector corresponding to the i-th operation object; This represents the first interest weight corresponding to the i-th operation object.
[0105] The second interest weight can be obtained by multiplying the second interest weight of each operation object with the feature vector corresponding to the operation object by the ratio of the second score of the operation object to the sum of the second scores of all operation objects, and then calculating the sum of the second interest vectors corresponding to all operation objects to obtain the second interest feature.
[0106] The sum of the second score and the first score is 1. The first score represents the target object's level of interest in the object being manipulated, while the second score represents the target object's level of disinterest in the object being manipulated. Specifically, the first interest feature can be calculated using the following formula.
[0107] ;
[0108] in, Indicates the second interest feature; This represents the first score corresponding to the i-th operation object; This represents the second score corresponding to the i-th operation object; This represents the sum of the second scores corresponding to all operation objects; This represents the feature vector corresponding to the i-th operation object; This represents the second interest weight corresponding to the i-th operation object.
[0109] The first interest feature and the second interest feature together constitute the target interest feature, that is In the calculation of the first and second interest features, the approximate interest features are obtained by weighted summation of the first and second scores. This can also be referenced from... Figure 1d and Figure 1e , Figure 1d A schematic diagram of the first interest feature is shown. Figure 1e A schematic diagram of the first interest feature is shown, from Figure 1d and Figure 1e As can be seen, the target interest features are relatively simple. In order to extract richer interest features and improve the recommendation effect, we can continue to calculate the interaction features between the operation objects based on the first score and the second score: the first interaction feature and the second interaction feature.
[0110] S140. Calculate the second score corresponding to the operation object based on the first score corresponding to the operation object.
[0111] After obtaining the first score of the object being operated on, the second score can be calculated based on the first score of the object being operated on. The sum of the second score and the first score is 1. The first score represents the degree of interest of the target object in the object being operated on, while the second score represents the degree of disinterest of the target object in the object being operated on.
[0112] S150. Calculate the first interaction feature between the operation objects using the first score corresponding to all operation objects, and calculate the second interaction feature between the operation objects using the second score corresponding to all operation objects.
[0113] The first score of each operation object can be used to generate an interaction matrix between different operations objects. This enhances the interactivity between operations objects of interest, resulting in richer features of those operations objects—the first interaction features. Similarly, it enhances the interactivity between operations objects of little interest, resulting in more specific features of those operations objects—the second interaction features.
[0114] When generating the first interaction feature and the second interaction feature, the first scores corresponding to all operation objects can be combined into a first score vector; the second scores corresponding to all operation objects can be combined into a second score vector; the first interaction feature between the operation objects can be constructed using the first score vector; and the second interaction feature between the operation objects can be constructed using the second score vector.
[0115] For example, with This represents the first score corresponding to the i-th operation object, and the first score vector is [ ],use This represents the second score corresponding to the i-th operation object, and the second score vector is [ ].
[0116] The construction of the first interaction feature between the operation objects using the first score vector may include: transposing the first score vector to obtain a first transposed vector; and normalizing the product of the first score vector and the first transposed vector to obtain the first interaction feature. Specifically, the first interaction feature can be calculated using the following formula:
[0117] ;
[0118] in, Let D represent the first interaction feature, and let D represent the first score vector. T This represents the first transpose vector.
[0119] Similarly, constructing the second interaction feature between the operation objects using the second score vector may include: transposing the second score vector to obtain a second transposed vector; and normalizing the product of the second score vector and the second transposed vector to obtain the second interaction feature. Specifically, the second interaction feature can be calculated using the following formula:
[0120] ;
[0121] in, Indicates the second interaction feature, Represents the second score vector. This represents the transpose of the second score vector.
[0122] Therefore, the first interaction feature and the second interaction feature can be calculated using the above method, and can also be referenced. Figure 1f and Figure 1g , Figure 1f A schematic diagram of the first interactive feature is shown. Figure 1g A schematic diagram of the second interactive feature is shown, from Figure 1f and Figure 1g It can be seen that the first and second interaction features contain a relatively rich set of features.
[0123] S160. Based on the data to be processed, target interest features, first interaction features, and second interaction features, recommend content for the target object.
[0124] After calculating the target interest features, first interaction features, and second interaction features based on the first score of the operation object, content can be recommended for the target object based on the data to be processed, the target interest features, the first interaction features, and the second interaction features.
[0125] It can be understood that different machine learning models can be used for content recommendation, such as the Transformer model, the Long Short-Term Memory (LSTM) model, and the Deep Neural Networks (DNN) model. The following will explain in detail the process of recommending content to the target audience using different machine learning models.
[0126] In some implementations, in each layer or the final layer of the recommendation model based on the Transformer model, the aforementioned calculations to obtain the first interaction feature and the second interaction feature can be introduced into the multi-head attention calculation. The first interaction feature and the second interaction feature are used as attention heads in the attention calculation to perform attention calculation, thereby introducing the first interaction feature and the second interaction feature in the process of encoding the sequence of the operation object.
[0127] The Transformer model is a model based on an encoder-decoder structure, in which the number of encoders and decoders is the same. Each encoder has the same structure, including a self-attention layer and a feedforward neural network layer, but the parameters of each encoder are different, that is, they do not share parameters.
[0128] The sequence input from the encoder first passes through a self-attention layer, whose output is then passed to a feedforward neural network layer. The decoder contains both the encoder's self-attention layer and the feedforward neural network layer, with an attention layer between them to focus on relevant parts of the input sequence. During attention calculation, three vectors, Q, K, and V, are generated from each encoder's input vector. These three vectors are obtained by linearly transforming the input of the self-attention layer. Specifically, a linear transformation matrix W can be used. Q W K and W V Perform a linear transformation on the input sequence to obtain the corresponding Q, K, and V. For example, if the input is X, then Q = X * W. Q K=X*W K V=X*W V .
[0129] After obtaining Q, K, and V, the output of the self-attention layer can be calculated. Specifically, it can be calculated using the following formula:
[0130] ;
[0131] in, Denotes the transpose of K, where This refers to the number of columns in the Q and K matrices, i.e., the vector dimension. Using the above formula, self-attention can be calculated to obtain the output matrix. Multi-Head Attention is formed by combining multiple self-attention layers; that is, Multi-Head Attention contains multiple Self-Attention layers. If Multi-Head Attention contains h Self-Attention layers, the input X is passed to h different Self-Attention layers, resulting in h output matrices Z. The h output matrices Z are concatenated together to obtain the final output, as shown in the following formula:
[0132] ;
[0133] ;
[0134] in, , , W represents the linear transformation matrix corresponding to the i-th attention head. Q W K and W V , This is the weight matrix that linearly transforms the output.
[0135] because If Let A be the attention weight, then It is understood that the attention weights in the aforementioned process are calculated based on Q and K. In this embodiment, the calculated first interaction feature and second interaction feature are used as two of the attention weights in multi-head attention, so MultiHead can change to the following state:
[0136] ;
[0137] By using the first and second interaction features as attention weights and performing attention calculations on the features to be processed, the target features can be obtained. This can be understood as the target features being the features to be processed that include both the first and second interaction features. After obtaining the target features, content can be recommended to the target audience based on these target features and target interest features.
[0138] In some implementations, attention computation can be added to the recommendation model based on LSTM or DNN to calculate target interest features using first and second interaction features, replacing the aforementioned process of calculating target interest features based on the first score of the operation object.
[0139] Specifically, this can involve generating features to be processed corresponding to the data to be processed, wherein the features to be processed are composed of feature vectors corresponding to all operation objects in the data to be processed; calculating a first interest feature using the first interaction feature and the features to be processed; calculating a second interest feature using the second interaction feature and the features to be processed; and recommending content for the target object based on the first interest feature, the second interest feature, and the features to be processed.
[0140] Specifically, in LSTM or DNN-based models, target interest features can be calculated as follows. Having already calculated the first and second interaction features, the first interest feature can be calculated by multiplying the first interaction feature and the feature to be processed to obtain the first feature; then, the first feature is averaged to obtain the first interest feature. The specific formula for calculating the first interest feature can be found below:
[0141] ;
[0142] in, Indicates the primary interest feature. H represents the first interactive feature, and H represents the feature to be processed.
[0143] Similarly, when calculating the second interest feature, the second interaction feature and the feature to be processed can be multiplied to obtain the first feature; then, the second feature can be averaged to obtain the second interest feature. The specific calculation of the second interest feature can be referenced in the following formula:
[0144] ;
[0145] in, Indicates the second interest feature. H represents the second interactive feature, and H represents the feature to be processed.
[0146] The calculated first interest feature and second interest feature together constitute the target interest feature, so that content can be recommended for the target object based on the first interest feature, second interest feature and feature to be processed.
[0147] It is understandable that in the aforementioned recommendation models, whether based on Transformer, LSTM, or DNN, corresponding target interest features and features corresponding to the data to be processed can be obtained. Specifically, in a Transformer-based recommendation model, the target interest features can include a first interest feature and a second interest feature, and the features corresponding to the data to be processed are the target features obtained by attention calculation using the first and second interaction features.
[0148] Therefore, when recommending content to a target object, the target interest features and the corresponding features of the data to be processed can be concatenated, that is, the first interest feature, the second interest feature and the target feature are concatenated to obtain the target object features.
[0149] In recommendation models based on LSTM or DNN, the obtained target interest features also include first interest features and second interest features, and the features corresponding to the data to be processed are the features to be processed. Therefore, when recommending content to the target object, the target interest features obtained by using the first and second interaction features for attention calculation and the features corresponding to the data to be processed can be concatenated. That is, the first interest features, the second interest features, and the features to be processed are concatenated to obtain the target object features.
[0150] For details, please refer to [link / reference]. Figure 1h The diagram illustrates the overall architecture of the content recommendation method. After acquiring the data to be processed, the operation objects can be integrated into an operation object sequence. This operation object sequence is then input into the attention module for attention calculation. The result of concatenating the first interest feature, the second interest feature, and the features corresponding to the operation object sequence is denoted as the target object feature.
[0151] By inputting the current content into a Multi-Layer Perception (MLP) with a Rectified Linear Unit (ReLU) activation function for encoding, the corresponding content features can be obtained.
[0152] The target object attribute information, target object features, and content features are input into an MLP with SeLu activation function. During the offline model training phase, the output of the MLP is fed to the softmax layer to obtain the probability distribution of all candidate content. During the online prediction phase, the target object vector is used to calculate the distance to all content in the content library to be recommended, and the top N candidate content with the smallest distance is returned as the recommended content.
[0153] The content recommendation scheme provided in this application can be applied to various recommendation scenarios, such as music recommendation, book recommendation, and content recommendation in smart speakers. The method provided in this application can extract target interest features from the data to be processed based on a first score corresponding to the operation object. These target interest features include features of interest and features of disinterest. Furthermore, based on the first and second scores, interaction features between the operation objects are constructed: first interaction features and second interaction features. This approach considers not only the target object's interest features but also its disinterest features and the interaction features between the operation objects, maximizing the extraction of interest information from the data to be processed. This allows for accurate content recommendation based on rich interest information, thereby improving the accuracy of content recommendations.
[0154] The method described in the above embodiments will be further described in detail below.
[0155] In this embodiment, music recommendation will be used as an example to describe the method of this application embodiment in detail.
[0156] like Figure 2 As shown, the specific process of a content recommendation method is as follows:
[0157] S210. Obtain music data played by the target object within a historical time period, wherein the music data includes playback data and music already played.
[0158] S220. Calculate the first score corresponding to the played music based on the playback data.
[0159] The music data can include the duration of a particular piece of music played by the target object. If the target object's rating of the played music is not obtained, the ratio of the playback duration of each played piece of music to the total duration of the played music can be calculated to obtain the first score for the played music.
[0160] S230. Based on the first score corresponding to the played music and the feature vector corresponding to the played music, feature fusion is performed to obtain the target interest features.
[0161] S240. Based on the first score corresponding to the already played music, calculate the second score corresponding to the already played music.
[0162] S250, calculate the first interaction feature between the played music using the first score corresponding to all the played music, and calculate the second interaction feature between the played music using the second score corresponding to all the played music.
[0163] S260. Based on the music data, target interest features, first interaction features, and second interaction features, recommend music for the target object.
[0164] After obtaining the first score corresponding to the played music, the target interest features, first interaction features, and second interaction features can be calculated based on the first score corresponding to the played music.
[0165] Specifically, calculating the first interaction feature, i.e. the interaction features between music that the target object is interested in, can be done by forming a first score vector from the first scores of all the played music, multiplying the first score vector with its transpose and then normalizing the result to obtain the first interaction feature.
[0166] Subtracting the first score of the played music from 1 gives the second score. Calculating the second interaction feature, i.e. the interaction feature between music that the user is not interested in, allows us to form a second score vector from the second scores of all played music. Multiplying the second score vector by the transpose of the second score vector and then normalizing the result gives us the second interaction feature.
[0167] If the recommendation model is a Transformer-based model, the target interest feature can be calculated as follows: Having already obtained the first and second scores for the played music, when calculating the first interest feature, i.e., the target object's interest feature, it can be achieved by calculating the ratio of the first score of each played music to the sum of the first scores of all played music. This ratio is then multiplied by the feature vector of the corresponding played music to obtain the first interest vector. The sum of the first interest vectors for each played music is then calculated to obtain the first interest feature.
[0168] When calculating the second interest feature, i.e. the feature that the user is not interested in, one can calculate the ratio of the second score of each played music to the sum of the second scores of all played music, multiply the ratio by the feature vector of the corresponding played music to obtain the second interest vector, and calculate the sum of the second interest vectors of each played music to obtain the second interest feature.
[0169] The first and second interaction features are used as attention weights in the Transformer. The input features, which are composed of the feature vectors of the played music, are input into the Transformer model. After attention calculation is performed using the first and second interaction features as attention weights, the target features can be output.
[0170] The target features, first interest features, second interest features, and target object attribute information are concatenated and used as input to the classifier to recommend music to the target object. The target object attribute information is used to describe the target object, which can be described by a series of label features.
[0171] If the recommendation model is based on LSTM or DNN, the calculation methods for the first and second interaction features are similar to those in the aforementioned Transformer-based recommendation models. The difference lies in the method of calculating the target interest features. Specifically, in this type of model, the target interest features can be calculated based on the first and second interaction features.
[0172] Specifically, when calculating the first interest feature, the first interaction feature and the feature to be processed can be multiplied together and then averaged to obtain the first interest feature; when calculating the second interest feature, the second interaction feature and the feature to be processed can be multiplied together and then averaged to obtain the second interest feature. Here, the feature to be processed refers to the feature vectors of all played music.
[0173] Therefore, the features to be processed, the first interest feature, the second interest feature, and the target object attribute information can be concatenated and used as input to the classifier to recommend music to the target object.
[0174] As can be seen from the above, the content recommendation method provided in this application, in the Transformer-based recommendation model, improves the attention calculation by using the first and second interaction features. This enables importance sampling of the operation object based on the first score, thereby obtaining richer target interest features and optimizing the overall sequence modeling to improve the content recommendation effect. In the LSTM or DNN-based recommendation model, an attention calculation part is added, that is, the first and second interaction features are used to calculate the target interest features to achieve importance sampling of the operation object, thereby obtaining richer target interest features and optimizing the overall sequence modeling to improve the content recommendation effect.
[0175] Furthermore, the content recommendation process not only focuses on the target audience's interest features, but also introduces the target audience's disinterest features and the interaction features between the target audience and the target audience. This maximizes the use of interest information in the data to be processed, and further utilizes this interest information to improve the accuracy of content recommendation.
[0176] To better implement the above methods, this application also provides a content recommendation device, which can be integrated into an electronic device, such as a terminal or server. The terminal can be a mobile phone, tablet computer, smart Bluetooth device, laptop computer, or personal computer; the server can be a single server or a server cluster composed of multiple servers.
[0177] For example, in this embodiment, the method of this application embodiment will be described in detail by taking the content recommendation device specifically integrated into the server as an example.
[0178] For example, such as Figure 3 As shown, the content recommendation device may include an acquisition module 310, a first calculation module 320, a first extraction module 330, a second calculation module 340, a second extraction module 350, and a recommendation module 360.
[0179] The acquisition module 310 is used to acquire the data to be processed of the target object, wherein the data to be processed includes operation data and the operation object corresponding to the operation data;
[0180] The first calculation module 320 is used to calculate a first score corresponding to the operation object based on the operation data, wherein the first score is used to characterize the degree of interest of the target object in the operation object;
[0181] The first extraction module 330 is used to perform feature fusion based on the first score corresponding to the operation object and the feature vector corresponding to the operation object to obtain target interest features;
[0182] The second calculation module 340 is used to calculate the second score corresponding to the operation object based on the first score corresponding to the operation object;
[0183] The second extraction module 350 is used to calculate the first interaction feature between the operation objects using the first score corresponding to all operation objects, and to calculate the second interaction feature between the operation objects using the second score corresponding to all operation objects.
[0184] The recommendation module 360 is used to recommend content for the target object based on the data to be processed, target interest features, first interaction features, and second interaction features.
[0185] In some embodiments, the second extraction module 350 includes:
[0186] The first vector unit is used to form a first score vector from the first scores corresponding to all the operation objects;
[0187] The second vector unit is used to form a second score vector from the second scores corresponding to all the operation objects;
[0188] The first interaction unit is used to construct a first interaction feature between the operation objects using the first score vector;
[0189] The second interaction unit is used to construct a second interaction feature between the operation objects using the second score vector.
[0190] In some embodiments, the first interaction unit is further configured to:
[0191] Transpose the first score vector to obtain the first transpose vector;
[0192] The product of the first score vector and the first transpose vector is normalized to obtain the first interactive feature.
[0193] In some embodiments, the second interaction unit is further configured to:
[0194] Transpose the second score vector to obtain the second transpose vector;
[0195] The product of the second score vector and the second transpose vector is normalized to obtain the second interactive feature.
[0196] In some embodiments, the recommendation module 360 is further configured to:
[0197] Generate features to be processed corresponding to the data to be processed; use the first interaction feature and the second interaction feature as attention weights; perform attention calculation on the features to be processed based on the attention weights to obtain target features; recommend content for the target object based on the target features and the target interest features.
[0198] In some embodiments, the target interest features include a first interest feature and a second interest feature, and the first extraction module 330 is further configured to:
[0199] Generate a feature vector corresponding to the operation object; calculate the ratio of the first score corresponding to the operation object to the first scores corresponding to all operation objects to obtain the first interest weight corresponding to the operation object; calculate the ratio of the second score corresponding to the operation object to the second scores corresponding to all operation objects to obtain the second interest weight corresponding to the operation object; perform feature fusion on the feature vector corresponding to each operation object according to the first interest weight corresponding to each operation object to obtain the first interest feature; perform feature fusion on the feature vector corresponding to each operation object according to the second interest weight corresponding to each operation object to obtain the second interest feature.
[0200] In some embodiments, the first extraction module 330 is further configured to:
[0201] Multiply the first interest weight corresponding to the operation object by the feature vector corresponding to the operation object to obtain the first interest vector corresponding to the operation object; calculate the sum of the first interest vectors corresponding to all operation objects to obtain the first interest feature.
[0202] In some embodiments, the first extraction module 330 is further configured to:
[0203] Multiply the second interest weight corresponding to the operation object by the feature vector corresponding to the operation object to obtain the second interest vector corresponding to the operation object; calculate the sum of the second interest vectors corresponding to all operation objects to obtain the second interest feature.
[0204] In some embodiments, the target interest features include a first interest feature and a second interest feature, and the first extraction module 330 is further configured to:
[0205] The system generates features to be processed corresponding to the data to be processed; calculates a first interest feature using the first interaction feature and the features to be processed; calculates a second interest feature using the second interaction feature and the features to be processed; the recommendation module 360 is further configured to recommend content for the target object based on the first interest feature, the second interest feature and the features to be processed.
[0206] In some embodiments, the first extraction module 330 is further configured to multiply the first interaction feature and the feature to be processed to obtain a first feature; and to perform a mean operation on the first feature to obtain the first interest feature.
[0207] In some embodiments, the first extraction module 330 is further configured to multiply the second interaction feature and the feature to be processed to obtain a second feature; and to perform a mean operation on the second feature to obtain the second interest feature.
[0208] In some embodiments, the first calculation module 320 is further configured to: if target data is obtained from the operation data, normalize the target data to obtain a first score corresponding to the operation object, wherein the target data is the score given by the target object to the operation object; if the target data is not obtained from the operation data, determine the operation value of the target object performing a preset operation on the operation object; and determine the first score corresponding to the operation object based on the operation value.
[0209] In practice, each of the above modules or units can be implemented as an independent entity or can be arbitrarily combined to be implemented as the same or several entities. For the specific implementation of each of the above modules or units, please refer to the previous method embodiments, which will not be repeated here.
[0210] As can be seen from the above, the content recommendation device in this embodiment can extract target interest features from the data to be processed based on the first score corresponding to the operation object, and construct interaction features between the operation objects based on the first score and the second score: first interaction features and second interaction features. This achieves maximum extraction of interest information covered in the data to be processed, avoids omission of interest information, and performs content recommendation based on the first interaction features, the second interaction features, and the target interest features. Since the extracted interest information is relatively comprehensive and rich, the accuracy of content recommendation can be improved.
[0211] This application also provides an electronic device, which can be a terminal, a server, or other similar device. The terminal can be a mobile phone, tablet computer, smart Bluetooth device, laptop computer, personal computer, etc.; the server can be a single server or a server cluster composed of multiple servers, etc.
[0212] In some embodiments, the content recommendation device can also be integrated into multiple electronic devices. For example, the content recommendation device can be integrated into multiple servers, and the content recommendation method of this application can be implemented by multiple servers.
[0213] In this embodiment, a server will be used as an example for detailed description. For example, ... Figure 4 As shown, it illustrates a schematic diagram of the server structure involved in an embodiment of this application. Specifically:
[0214] The server may include components such as a processor 401 with one or more processing cores, a memory 402 with one or more computer-readable storage media, a power supply 403, an input module 404, and a communication module 405. Those skilled in the art will understand that... Figure 4 The SSS structure shown does not constitute a limitation on the server and may include more or fewer components than illustrated, or combine certain components, or have different component arrangements. Wherein:
[0215] The processor 401 is the control center of the server, connecting various parts of the server via various interfaces and lines. It performs various server functions and processes data by running or executing software programs and / or modules stored in the memory 402, and by calling data stored in the memory 402. In some embodiments, the processor 401 may include one or more processing cores; in some embodiments, the processor 401 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may also not be integrated into the processor 401.
[0216] The memory 402 can be used to store software programs and modules. The processor 401 executes various functional applications and data processing by running the software programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the server, etc. In addition, the memory 402 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 with access to the memory 402.
[0217] The server also includes a power supply 403 that supplies power to the various components. In some embodiments, the power supply 403 can be logically connected to the processor 401 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. The power supply 403 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
[0218] The server may also include an input module 404, which can be used to receive input numeric or character information, and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
[0219] The server may also include a communication module 405. In some embodiments, the communication module 405 may include a wireless module, through which the server can perform short-range wireless transmission, thereby providing users with wireless broadband internet access. For example, the communication module 405 can be used to help users send and receive emails, browse web pages, and access streaming media.
[0220] Although not shown, the server may also include a display unit, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 401 in the server loads the executable files corresponding to the processes of one or more applications into the memory 402 according to the following instructions, and the processor 401 runs the applications stored in the memory 402 to realize various functions, as follows:
[0221] Obtain the data to be processed for the target object, wherein the data to be processed includes operation data and the operation object corresponding to the operation data;
[0222] Based on the operation data, a first score is calculated for the operation object, and the first score is used to characterize the degree of interest of the target object in the operation object;
[0223] Based on the first score corresponding to the operation object and the feature vector corresponding to the operation object, feature fusion is performed to obtain the target interest features;
[0224] Based on the first score corresponding to the operation object, calculate the second score corresponding to the operation object;
[0225] A first interaction feature between the operation objects is calculated using the first score corresponding to all operation objects, and a second interaction feature between the operation objects is calculated using the second score corresponding to all operation objects.
[0226] Based on the data to be processed, target interest features, first interaction features, and second interaction features, content is recommended for the target object.
[0227] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0228] As can be seen from the above, the electronic device provided in this application embodiment can extract target interest features, first interaction features and second interaction features from the data to be processed based on the first score corresponding to the operation object. This can maximize the extraction of interest information covered in the data to be processed, avoid the omission of interest information, and perform content recommendation based on the first interaction features, second interaction features and target interest features to improve the accuracy of content recommendation.
[0229] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.
[0230] Therefore, embodiments of this application provide a computer-readable storage medium storing a plurality of instructions that can be loaded by a processor to execute steps in any of the content recommendation methods provided in embodiments of this application. For example, the instructions can execute the following steps:
[0231] Obtain the data to be processed for the target object, wherein the data to be processed includes operation data and the operation object corresponding to the operation data;
[0232] Based on the operation data, a first score is calculated for the operation object, and the first score is used to characterize the degree of interest of the target object in the operation object;
[0233] Based on the first score corresponding to the operation object and the feature vector corresponding to the operation object, feature fusion is performed to obtain the target interest features;
[0234] Based on the first score corresponding to the operation object, calculate the second score corresponding to the operation object;
[0235] A first interaction feature between the operation objects is calculated using the first score corresponding to all operation objects, and a second interaction feature between the operation objects is calculated using the second score corresponding to all operation objects.
[0236] Based on the data to be processed, target interest features, first interaction features, and second interaction features, content is recommended for the target object.
[0237] The storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0238] According to one aspect of this application, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods provided in various alternative implementations of the content recommendation aspect of the above embodiments.
[0239] Since the instructions stored in the storage medium can execute the steps of any of the content recommendation methods provided in the embodiments of this application, the beneficial effects that any of the content recommendation methods provided in the embodiments of this application can achieve can be realized, as detailed in the preceding embodiments, and will not be repeated here.
[0240] The foregoing has provided a detailed description of a content recommendation method, apparatus, electronic device, and computer-readable storage medium provided in the embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are only for the purpose of helping to understand the methods and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A content recommendation method characterized by, The method comprises the following steps: obtaining target object processing data, wherein the processing data comprises operation data and operation objects corresponding to the operation data; calculating a first score corresponding to the operation object according to the operation data, wherein the first score represents the degree of interest of the target object in the operation object; performing feature fusion based on the first score corresponding to the operation object and a feature vector corresponding to the operation object to obtain a target interest feature; calculating a second score corresponding to the operation object based on the first score corresponding to the operation object, wherein the second score represents the degree of disinterest of the target object in the operation object; calculating a first interaction feature between the operation objects using the first scores corresponding to all operation objects, and calculating a second interaction feature between the operation objects using the second scores corresponding to all operation objects; recommending content for the target object according to the processing data, the target interest feature, the first interaction feature and the second interaction feature.
2. The method of claim 1, wherein, The method comprises the following steps: grouping the first scores corresponding to all operation objects into a first score vector; grouping the second scores corresponding to all operation objects into a second score vector; constructing the first interaction feature between the operation objects using the first score vector; constructing the second interaction feature between the operation objects using the second score vector.
3. The method of claim 2, wherein, The method comprises the following steps: transposing the first score vector to obtain a first transposed vector; normalizing the product of the first score vector and the first transposed vector to obtain the first interaction feature.
4. The method of claim 2, wherein, The method comprises the following steps: transposing the second score vector to obtain a second transposed vector; normalizing the product of the second score vector and the second transposed vector to obtain the second interaction feature.
5. The method of claim 1, wherein, The method comprises the following steps: generating a processing feature corresponding to the processing data; using the first interaction feature and the second interaction feature as attention weights; performing attention calculation on the processing feature based on the attention weights to obtain a target feature; recommending content for the target object based on the target feature and the target interest feature.
6. The method of claim 5, wherein, The target interest feature comprises a first interest feature and a second interest feature, and the method comprises the following steps: generating a feature vector corresponding to the operation object; calculating a first interest weight corresponding to the operation object by calculating the ratio of the first score corresponding to the operation object to the first scores corresponding to all operation objects; calculate a ratio of the second score corresponding to the operation object and second scores corresponding to all operation objects, to obtain a second interest weight corresponding to the operation object; perform feature fusion on the feature vector corresponding to each operation object according to the first interest weight corresponding to each operation object, to obtain a first interest feature; perform feature fusion on the feature vector corresponding to each operation object according to the second interest weight corresponding to each operation object, to obtain a second interest feature.
7. The method of claim 6, wherein, The feature fusion on the feature vector corresponding to each operation object according to the first interest weight corresponding to each operation object to obtain the first interest feature includes: multiply the first interest weight corresponding to the operation object by the feature vector corresponding to the operation object, to obtain a first interest vector corresponding to the operation object; calculate a sum of first interest vectors corresponding to all operation objects, to obtain the first interest feature.
8. The method of claim 6, wherein, The feature fusion on the feature vector corresponding to each operation object according to the second interest weight corresponding to each operation object to obtain the second interest feature includes: multiply the second interest weight corresponding to the operation object by the feature vector corresponding to the operation object, to obtain a second interest vector corresponding to the operation object; calculate a sum of second interest vectors corresponding to all operation objects, to obtain the second interest feature.
9. The method of claim 1, wherein, The target interest feature includes the first interest feature and the second interest feature, and the method further includes: generating a to-be-processed feature corresponding to the to-be-processed data; calculating the first interest feature by using the first interaction feature and the to-be-processed feature; calculating the second interest feature by using the second interaction feature and the to-be-processed feature; recommending content for the target object according to the first interest feature, the second interest feature, and the to-be-processed feature.
10. The method of claim 9, wherein, The calculation of the first interest feature by using the first interaction feature and the to-be-processed feature includes: multiply the first interaction feature by the to-be-processed feature, to obtain a first feature; perform mean operation on the first feature to obtain the first interest feature.
11. The method of claim 9, wherein, The calculation of the second interest feature by using the second interaction feature and the to-be-processed feature includes: multiply the second interaction feature by the to-be-processed feature, to obtain a second feature; perform mean operation on the second feature to obtain the second interest feature.
12. The method according to any one of claims 1 to 11, characterized in that, The calculation of the first score corresponding to the operation object according to the operation data includes: if target data is acquired from the operation data, perform normalization processing on the target data to obtain the first score corresponding to the operation object, the target data being a score of the target object on the operation object; if the target data is not acquired from the operation data, determine an operation value of a preset operation of the target object on the operation object; determine the first score corresponding to the operation object based on the operation value.
13. A content recommendation apparatus characterized by comprising: The method includes: an acquisition module configured to acquire to-be-processed data of a target object, the to-be-processed data including operation data and operation objects corresponding to the operation data; The first calculating module is configured to calculate a first score corresponding to the operation object according to the operation data, the first score being used to represent a degree of interest of the target object in the operation object; The first extracting module is configured to perform feature fusion based on the first score corresponding to the operation object and a feature vector corresponding to the operation object to obtain a target interest feature; The second calculating module is configured to calculate a second score corresponding to the operation object based on the first score corresponding to the operation object, the second score representing a degree of disinterest of the target object in the operation object; The second extracting module is configured to calculate a first interaction feature between the operation objects based on the first scores corresponding to all the operation objects and a second interaction feature between the operation objects based on the second scores corresponding to all the operation objects; The recommendation module is configured to recommend content to the target object according to the to-be-processed data, the target interest feature, the first interaction feature and the second interaction feature.
14. The apparatus of claim 13, wherein, The second extracting module comprises: The first vector unit is configured to group the first scores corresponding to all the operation objects into a first score vector; The second vector unit is configured to group the second scores corresponding to all the operation objects into a second score vector; The first interaction unit is configured to use the first score vector to construct the first interaction feature between the operation objects; The second interaction unit is configured to use the second score vector to construct the second interaction feature between the operation objects.
15. The apparatus of claim 14, wherein, The first interaction unit is further configured to: perform a transpose operation on the first score vector to obtain a first transposed vector; and perform normalization processing on a product of the first score vector and the first transposed vector to obtain the first interaction feature.
16. The apparatus of claim 14, wherein, The second interaction unit is further configured to: perform a transpose operation on the second score vector to obtain a second transposed vector; and perform normalization processing on a product of the second score vector and the second transposed vector to obtain the second interaction feature.
17. The apparatus of claim 13, wherein, The recommendation module is further configured to: generate a to-be-processed feature corresponding to the to-be-processed data; use the first interaction feature and the second interaction feature as attention weights; perform attention calculation on the to-be-processed feature based on the attention weights to obtain a target feature; and recommend content to the target object based on the target feature and the target interest feature. The target interest feature comprises a first interest feature and a second interest feature.
18. The apparatus of claim 17, wherein, The first extracting module is further configured to: generate a feature vector corresponding to the operation object; calculate a ratio of the first score corresponding to the operation object to first scores corresponding to all the operation objects to obtain a first interest weight corresponding to the operation object; calculate a ratio of the second score corresponding to the operation object to second scores corresponding to all the operation objects to obtain a second interest weight corresponding to the operation object; perform feature fusion on the feature vector corresponding to each operation object based on the first interest weight corresponding to each operation object to obtain the first interest feature; and perform feature fusion on the feature vector corresponding to each operation object based on the second interest weight corresponding to each operation object to obtain the second interest feature. The first extracting module is further configured to: 19. The apparatus of claim 18, wherein, The first interest weight corresponding to the operation object is multiplied by the feature vector corresponding to the operation object to obtain a first interest vector corresponding to the operation object; and a sum of the first interest vectors corresponding to all operation objects is calculated to obtain the first interest feature.
20. The apparatus of claim 18, wherein, The first extraction module is further configured to: The second interest weight corresponding to the operation object is multiplied by the feature vector corresponding to the operation object to obtain a second interest vector corresponding to the operation object; and a sum of the second interest vectors corresponding to all operation objects is calculated to obtain the second interest feature.
21. The apparatus of claim 13, wherein, The target interest feature includes the first interest feature and the second interest feature. The first extraction module is further configured to: The first interest feature is calculated by using the first interaction feature and the to-be-processed feature; and the second interest feature is calculated by using the second interaction feature and the to-be-processed feature. The recommendation module is further configured to recommend content for the target object according to the first interest feature, the second interest feature and the to-be-processed feature.
22. The apparatus of claim 21, wherein, The first extraction module is further configured to multiply the first interaction feature and the to-be-processed feature to obtain a first feature; and the first interest feature is obtained by performing mean value operation on the first feature.
23. The apparatus of claim 21, wherein, The first extraction module is further configured to multiply the second interaction feature and the to-be-processed feature to obtain a second feature; and the second interest feature is obtained by performing mean value operation on the second feature.
24. The apparatus of any one of claims 13 to 23, wherein, The first calculation module is further configured to, if target data is obtained from the operation data, perform normalization processing on the target data to obtain the first score corresponding to the operation object, the target data being a score of the target object on the operation object; If the target data is not obtained from the operation data, determining an operation value of a preset operation of the target object on the operation object; Based on the operation value, determining the first score corresponding to the operation object.
25. An electronic device, comprising: The computer readable storage medium stores a plurality of instructions, and the instructions are adapted to be loaded by the processor to execute the steps in the content recommendation method according to any one of claims 1-12.
26. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a plurality of instructions, and the instructions are adapted to be loaded by the processor to execute the steps in the content recommendation method according to any one of claims 1-12.
27. A computer program product, characterised in that, The computer program product includes computer instructions stored in a computer readable storage medium; the processor of the computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions to enable the computer device to execute the steps in the content recommendation method according to any one of claims 1-12.
Citation Information
Patent Citations
Target person scoring and pushing methods, apparatuses and systems
CN106708939A
Type prediction method and device for identifying object in image and electronic device
CN108460389A