Content recommendation method and apparatus, electronic device, medium, and product
By clustering and residual processing of the feature vectors of recommendable content, a semantic library is constructed, which solves the problem of semantic degradation in generative recommendation and realizes high-quality personalized content recommendation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HANGZHOU NETEASE CLOUD MUSIC TECH CO LTD
- Filing Date
- 2026-04-14
- Publication Date
- 2026-07-21
AI Technical Summary
In existing generative recommendation technologies, as the number of quantization layers increases, the semantics of the semantic ID sequence degrades significantly, resulting in poor content recommendation accuracy and a tendency for the hourglass phenomenon to occur, leading to uneven codebook utilization and difficulty in accurately recommending content that users are interested in.
By generating a first feature vector for recommendable content, clustering is performed to generate a residual vector, which is then combined into a second feature vector. This process is repeated until a preset number of iterations are reached to build a semantic library. Content recommendations are then made based on users' historical interaction information to ensure semantic fidelity.
It improves the accuracy of content recommendations and user engagement, reduces invalid recommendations, and achieves precise personalized recommendations.
Smart Images

Figure CN122432412A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of generative recommendation technology, specifically relating to a content recommendation method, a content recommendation device, an electronic device, and a computer-readable storage medium. Background Technology
[0002] In the field of generative recommendation, to improve recall efficiency, quantization techniques are generally used to convert the high-dimensional content features of recommendable content (such as text, images, audio, etc.) into discrete encoded sequences (i.e., semantic IDs). The sequence of semantic IDs is used to represent recommendable content in the content recommendation system, enabling the content recommendation system to capture the deep semantic information of recommendable content in the same way as processing text tokens. This significantly reduces storage and computational overhead and allows for the rapid selection of a small set of candidate data related to the user from a massive library of recommendable content for recommendation.
[0003] However, in the process of quantizing recommendable content to generate semantic ID sequences, as the number of quantization layers increases, the residual vectors of subsequent layers gradually deviate from the core semantics of the items (such as category, style, etc.), degenerating into pure numerical values. This can easily lead to the hourglass phenomenon and semantic degradation, making it difficult for the generated semantic ID sequences to accurately represent the valuable features of recommendable content, ultimately resulting in poor accuracy of content recommendation. Summary of the Invention
[0004] This application aims to address at least one of the technical problems existing in the prior art. To this end, this application proposes a content recommendation method, a content recommendation device, an electronic device, and a computer-readable storage medium, which can ensure that each preset semantic identifier in the generated semantic library has high semantic fidelity, reduce semantic degradation, provide high-quality semantic IDs for subsequent use, thereby improving the accuracy of content recommendation and achieving precise personalized recommendations.
[0005] Firstly, this application provides a content recommendation method, the method comprising: Generate a first feature vector for each recommendable content; Perform clustering processing on each of the first feature vectors to generate at least one cluster; Based on the difference between each of the first feature vectors and the corresponding cluster center of the cluster, the corresponding residual vectors are determined respectively; Each of the first feature vectors is combined with the corresponding residual vector to generate a corresponding second feature vector. If the number of clustering operations has not reached the first preset number, the corresponding first feature vector is updated by each of the second feature vectors, and the first feature vectors are clustered again to generate at least one cluster; based on the difference between each of the first feature vectors and the cluster center of the corresponding cluster, the corresponding residual vector is determined; based on the combination of each of the first feature vectors and the corresponding residual vector, the corresponding second feature vector is generated respectively. When the number of clustering processes reaches the first preset number, each preset semantic identifier corresponding to each clustering process is obtained, and a semantic library is constructed based on each preset semantic identifier corresponding to each clustering process, wherein the preset semantic identifier is determined based on each cluster generated by each clustering process; Content recommendation is performed based on the semantic database and the target object's historical interaction information to output recommended content to the target object. The historical interaction information includes at least one piece of content that has been interacted with, and the interacted content is any of the recommended content.
[0006] Secondly, this application provides a content recommendation device, the content recommendation device comprising: The first generation module is used to generate corresponding first feature vectors based on each recommendable content; A clustering module is used to perform clustering processing on each of the first feature vectors to generate at least one cluster; The residual quantization module is used to determine the corresponding residual vector based on the difference between each of the first feature vectors and the cluster center of the corresponding cluster. The combination module is used to combine each of the first feature vectors with the corresponding residual vectors to generate corresponding second feature vectors respectively. The loop module is used to update the corresponding first feature vector by each second feature vector when the number of clustering processes has not reached a first preset number of times, and to perform clustering processing on each first feature vector again to generate at least one cluster; to determine the corresponding residual vector based on the difference between each first feature vector and the cluster center of the corresponding cluster; and to combine each first feature vector with the corresponding residual vector to generate the corresponding second feature vector. The second generation module is used to obtain each preset semantic identifier corresponding to each clustering process when the number of clustering processes reaches the first preset number of times, and to construct a semantic library based on each preset semantic identifier corresponding to each clustering process, wherein the preset semantic identifier is determined based on each cluster generated by each clustering process; The recommendation module is used to recommend content based on the semantic library and the historical interaction information of the target object, so as to output recommended content to the target object. The historical interaction information includes at least one piece of content that has been interacted with, and the interacted content is any of the recommended content.
[0007] Thirdly, this application provides an electronic device, which includes a memory and a processor; the memory stores a computer program, and the processor executes the above-described content recommendation method by calling the computer program stored in the memory.
[0008] Fourthly, this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described content recommendation method.
[0009] The content recommendation method, device, electronic device, and computer-readable storage medium provided in this application generate corresponding first feature vectors for each recommendable content. Then, quantization techniques are used to convert these first feature vectors into discrete codes (i.e., semantic IDs). The quantization process includes: clustering each first feature vector to generate at least one cluster, and assigning each first feature vector to its corresponding cluster. The difference between each first feature vector and the cluster center of its corresponding cluster is then used as a residual vector. Finally, the first feature vectors and their corresponding residual vectors are combined to generate corresponding second feature vectors. This avoids the second feature vectors from becoming purely numerical errors after multi-layer clustering quantization, forcing them to retain their semantic association with the original recommendable content.
[0010] If the number of clustering operations has not reached the first preset number, the next layer of quantization needs to be performed. The corresponding first feature vector is updated according to each second feature vector, and the clustering operation is performed again on each first feature vector to generate at least one cluster. This ensures that each clustering quantization is always anchored to the core semantics of the recommendable content, thereby ensuring the high semantic fidelity of the preset semantic identifiers corresponding to each cluster generated by each clustering operation, reducing semantic degradation, and providing high-quality semantic IDs for the future.
[0011] When the number of clustering processes reaches a first preset number, each preset semantic identifier corresponding to each clustering process is obtained. The preset semantic identifier is determined based on each cluster generated by each clustering process. A semantic library is constructed based on each preset semantic identifier corresponding to each clustering process. Each preset identifier in the semantic library can be combined into a semantic ID sequence of any recommendable content.
[0012] Finally, content recommendation is performed based on the semantic database and the target audience's (i.e., the user's) historical interaction information to output recommended content to the target audience. For example, recommendable content that the user may be interested in can be displayed on the graphical user interface. In this way, by making content recommendations based on the user's previously interacted recommended content, it is possible to accurately capture the user's interests and preferences, recommend recommended content that better meets the user's needs, reduce invalid recommendations, and improve the accuracy of content recommendations and user engagement.
[0013] Additional aspects and advantages of embodiments of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of embodiments of this application. Attached Figure Description
[0014] 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 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. Wherein: Figure 1 This is an application scenario diagram of the content recommendation method provided in the embodiments of this application; Figure 2 This is a first flowchart illustrating the content recommendation method provided in this application embodiment; Figure 3 This is a second flowchart illustrating the content recommendation method provided in the embodiments of this application; Figure 4 This is a schematic diagram of the clustering process of the content recommendation method provided in the embodiments of this application; Figure 5 This is a schematic diagram of the first process of content recommendation in the content recommendation method provided in the embodiments of this application; Figure 6 This is a schematic diagram of the prediction using the Transformer model of the content recommendation method provided in the embodiments of this application; Figure 7 This is a schematic diagram of the second process of content recommendation in the content recommendation method provided in the embodiments of this application; Figure 8 This is a scoring diagram of the ranking model of the content recommendation method provided in the embodiments of this application; Figure 9 This is a schematic diagram of the module of the content recommendation device provided in the embodiments of this application; Figure 10 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application; Figure 11 This is a schematic diagram of the hardware structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0015] The embodiments of this application are described in detail below. Examples of the embodiments of this application are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain this application, and should not be construed as limiting this application.
[0016] In the description of this application, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, features defined as "first" or "second" may explicitly or implicitly include one or more features. In the description of this application, "multiple" means two or more, unless otherwise explicitly specified.
[0017] To facilitate understanding, the background technology and application scenarios of this application will be introduced below: In the field of generative recommendation, in order to improve recall efficiency, quantization techniques are generally used to convert the high-dimensional content features of recommendable content (such as text, images, audio, etc.) into discrete encoded sequences (i.e. sequences composed of semantic IDs, where semantic IDs refer to encoding the semantic features of entities into meaningful discrete identifiers).
[0018] In traditional quantization processes, as the number of quantization layers increases, the input vector of deep quantization gradually degenerates into a pure numerical error approximation, thereby losing its association with the core semantics (such as category and style) of the original recommendable content. This leads to semantic degradation, making it impossible for the semantic ID obtained from deep quantization to provide effective semantic information. Consequently, it becomes difficult to extract valuable features from the corresponding semantic ID in the deep quantization, ultimately resulting in poor accuracy in content recommendation.
[0019] Furthermore, deep quantization can easily lead to local optima, causing a few high-frequency semantic IDs to carry the vast majority of recommendable content, while a large number of other IDs remain idle—a phenomenon known as the hourglass effect. This results in extremely uneven codebook utilization of the semantic ID space, causing different recommendable content to be mapped to the same coarse encoding. This severely weakens the semantic ID's ability to distinguish fine-grained differences in recommendable content, ultimately leading to poor content recommendation accuracy.
[0020] In view of the problems existing in the background art, the embodiments of this application provide a content recommendation method, a content recommendation device, an electronic device, and a computer-readable storage medium.
[0021] Specifically, the content recommendation method in this application embodiment can be executed by a computer device, which can be a terminal or a server. The terminal can be a smartphone, tablet, laptop, smart TV, wearable smart device, smart vehicle terminal, etc. The terminal can also include a client, which can be a content recommendation client, browser client, instant messaging client, or mini-program, etc. The server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms.
[0022] For example, when this content recommendation method runs on a terminal device, the terminal device may include a display screen and a processor. The display screen is used to present recommendation screens and receive instructions generated by the user interacting with the recommendation screens. The recommendation screen may include some virtual recommendable content. The processor is used to store recommendation applications, run the recommendation applications, generate recommendation screens, respond to instructions, and control the display of recommendation screens on the display screen. When the user interacts with the recommendation screen through the display screen, the recommendation screen can control the local content of the terminal device in response to the received operation instructions. The terminal device can provide a graphical user interface to the user in various ways, such as rendering the display on the terminal device's screen or presenting the graphical user interface through holographic projection.
[0023] For example, when this content recommendation method runs on a server, it can be implemented and executed based on a cloud recommendation system. A cloud recommendation system refers to a recommendation method based on cloud computing. A cloud recommendation system includes servers and client devices. The main body running the recommendation application and the main body presenting the recommendation screen are separate. The storage and execution of the content recommendation method are completed on the server. The presentation of the recommendation screen is completed on the client. The client is mainly used for receiving and sending recommendation data and presenting the recommendation screen. For example, the client can be a display device with data transmission capabilities close to the user, such as a mobile terminal, television, computer, PDA, personal digital assistant, head-mounted display device, etc. However, the terminal device that processes the recommendation data is the server in the cloud. When performing content recommendation, the user operates the client to send instructions to the server. The server controls the operation of the recommendation application according to the instructions, encodes and compresses the recommendation screen and other data, returns it to the client through the network, and finally, the client decodes and outputs the recommendation screen.
[0024] It should be noted that, in this embodiment, the execution entity of the content recommendation method can be a terminal device or a server. The terminal device can be a local terminal device or a client device in the aforementioned cloud recommendation system. This embodiment does not limit the type of execution entity.
[0025] It is understood that in the specific implementation of this application, user object data, context data and other related data are involved. When the embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0026] For example, in conjunction with the above description, Figure 1 This application illustrates a recommendation system 100 for implementing a content recommendation method, which may include at least one terminal 10, at least one server 20, at least one database 30, and a network. The user-held terminal 10 can connect to different servers via the network. The terminal can be any device with computing hardware capable of supporting and executing software application tools corresponding to content recommendation.
[0027] In the aforementioned recommendation system 100, terminal 10 is used to install and run the recommendation application. In some cases, the recommendation application may not need to be pre-installed on terminal 10; users can directly access the recommendation application through a browser or other client. Users can log in to the recommendation application using their registered account to participate in content recommendations. When a user logs in to the recommendation application, terminal 10 sends a login request to server 20. Server 20 verifies the user's account and determines the corresponding recommendation mechanism based on the login request. If verification is successful, a login success notification is returned to terminal 10. During the user's participation in content recommendations through the recommendation application, terminal 10 and server 20 exchange data. Terminal 10 sends various information to server 20, and server 20 determines the display data for terminal 10 based on the stored content recommendation mechanism and the received information. Server 20 then sends the display data to terminal 10 so that terminal 10 can display the data sent by server 20 to the user.
[0028] In possible application scenarios, different terminals 10 may be served by different servers 20. Therefore, in order to distinguish the servers 20 corresponding to different terminals 10, the embodiments of this application will use the terms "first" and "second" to describe them. In fact, the servers 20 corresponding to different terminals 10 can be the same server 20. Therefore, without distinguishing between "first" and "second", it can be understood that the terminals 10 corresponding to virtual accounts in the same content recommendation scenario are served by the same server 20.
[0029] Furthermore, when the recommendation system 100 includes multiple terminals, multiple servers, and multiple networks, different terminals can connect to each other through different networks and servers. The network can be a wireless network or a wired network; for example, wireless networks include Wi-Fi, LAN, cellular networks, 3G networks, 4G networks, and 5G networks. Additionally, different terminals can also connect to other terminals or servers using their own Bluetooth networks or hotspot networks. Moreover, the system 100 can include multiple databases coupled to different servers, and can continuously store content recommendation-related information in the databases as different users engage in multi-user content recommendation online.
[0030] It should be noted that in this embodiment, multiple terminal devices run the same virtual content recommendation. Therefore, data interaction between multiple terminal devices can be achieved through a recommendation server. Thus, sending data from terminal device 1 to terminal device 2 can be understood as terminal device 1 sending data to the content recommendation server, which then sends the data to terminal device 2. Receiving data from terminal device 2 can be understood as terminal device 1 receiving data sent by the server, which is the data sent by terminal device 2 to the server. Alternatively, there may be no content recommendation server, and terminal device 1 can directly send recommendation data to terminal device 2.
[0031] It should be noted that, Figure 1 The schematic diagram of the recommendation system shown is merely an example. The recommendation system 100 described in this application embodiment is for the purpose of more clearly illustrating the technical solutions of this application embodiment and does not constitute a limitation on the technical solutions provided in this application embodiment. As those skilled in the art will know, with the evolution of recommendation systems and the emergence of new business scenarios, the technical solutions provided in this application embodiment are also applicable to similar technical problems.
[0032] The technical solution of this application will be described in detail below through specific embodiments. It should be noted that the following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.
[0033] Based on the above background technology and related scenarios, this application provides a content recommendation method, which will be described in detail below: Please see Figure 2 The content recommendation method provided in this application embodiment is implemented by steps 011, 012, 013, 014, 015, 016 and 017, which are described in detail below.
[0034] Step 011: Generate the corresponding first feature vector for each recommendable content; Recommendable content refers to content carriers and information units that can be pushed, browsed, and interacted with by users, such as text, images, and audio. The first feature vector is the initial high-dimensional embedding vector obtained by extracting features from the recommendable content.
[0035] Specifically, for each piece of recommended content, the various features describing the content attributes (such as text keywords, source, category tags, format, music genre, video theme, etc.) are converted into corresponding vectors, and then combined to form a high-dimensional first feature vector.
[0036] In one alternative embodiment, please refer to Figure 3 Step 011 includes: Step 0111: Extract features of each recommendable content using a preset multimodal feature extractor to generate corresponding sub-feature vectors; Step 0112: Based on each sub-feature vector and the corresponding initial residual vector, determine the corresponding first feature vector; The preset multimodal feature extractor is a pre-trained neural network module capable of simultaneously processing multiple modalities of data and mapping the modal data into a unified semantic vector. Optionally, the preset multimodal feature extractor includes, but is not limited to: a large language model (for processing text-based recommended content), a visual Transformer (for processing image / video-based recommended content), and an audio encoder (for processing audio-based recommended content).
[0037] Here, the sub-feature vector is a vector representing the features of the recommendable content itself, and each sub-feature vector is normalized (i.e., its magnitude is 1); the initial residual vector is an empirically defined vector, each initial residual vector conforms to a normal distribution, and each initial residual is positive and normalized. Optionally, each component of the sub-feature vector is taken as a positive value and normalized.
[0038] Specifically, the pre-defined multimodal feature extractor extracts a dense vector as a sub-feature vector based on the features of each recommendable content. A pre-generated initial residual vector is obtained and assigned to the corresponding recommendable content. The sub-feature vector of each recommendable content is concatenated with its corresponding initial residual vector to obtain the first feature vector. The concatenation order of the first feature vectors for each recommendable content is consistent; for example, the sub-feature vector comes first, followed by the corresponding initial residual vector; or the initial residual vector comes first, followed by the sub-feature vector.
[0039] Thus, concatenating the normalized sub-feature vectors and the initial residual vectors can eliminate differences in numerical magnitude, improve the stability and efficiency of subsequent clustering processes, and thereby enhance the accuracy of semantic IDs.
[0040] Optionally, the initial residual vector is positive-valued, converting all negative numbers to non-negative numbers to avoid negative numbers affecting subsequent clustering processes and improve the stability of clustering. Optionally, all values in the initial residual vector are set to 0, which simplifies the initial calculation and improves the efficiency of subsequent calculations, serving as the starting point for cluster quantization iterations.
[0041] Step 012: Perform clustering processing on each first feature vector to generate at least one cluster; Clustering refers to a set of vectors with similar features and semantic similarity. Clustering processing is the computational process of automatically dividing similar vectors into several clusters. Optionally, a cluster can be empty, that is, it contains no vectors.
[0042] Specifically, clustering is used to group first feature vectors according to their similarity, classifying first feature vectors with similar features and semantics into the same cluster. This ensures that first feature vectors of similar content are in the same cluster, providing a foundation for subsequent calculation of residual vectors and generation of discrete coding sequences (i.e., semantic IDs).
[0043] In one alternative embodiment, please continue to refer to Figure 3 Step 012 includes: Step 0121: Use the K-means clustering algorithm to cluster each first feature vector to generate at least one cluster.
[0044] Among them, the K-means clustering algorithm is an iterative clustering algorithm that divides samples into K (preset value) clusters to minimize the sum of squared distances from samples to the centers of their respective clusters.
[0045] Specifically, each cluster has a corresponding cluster center, which is a vector with the same dimension as the corresponding first feature vector. In the K-means algorithm, K cluster centers are first selected (e.g., randomly selected), and each first feature vector is assigned to the nearest cluster center. The cluster center of each cluster is then recalculated. Then, each first feature vector is reassigned to the nearest cluster center, and the iteration is repeated until the upper limit of the number of iterations is reached or the cluster centers no longer change.
[0046] In this way, clustering can be completed quickly, efficiently, and stably, resulting in accurate clusters and cluster centers.
[0047] In one alternative embodiment, please refer to Figure 4 Step 0121 includes: Step 01211: Classify based on the distance between each first feature vector and at least one initial cluster center, classifying each first feature vector into the cluster corresponding to each initial cluster center, wherein the initial cluster center is determined based on the first feature vector; Step 01212: Update the corresponding initial cluster centers based on the first feature vectors corresponding to each initial cluster center; The initial cluster centers are vectors set before clustering begins, based on the existing first feature vectors, and serve as the starting point for clustering. The number of initial cluster centers is a preset value. Optionally, the initial cluster centers are first feature vectors randomly selected from the existing first feature vectors.
[0048] Specifically, for any first feature vector, the distance between the first feature vector and each initial cluster center (such as Euclidean distance, Manhattan distance, cosine distance, etc.) is calculated. The minimum value of the calculated distance is determined, and the first feature vector is classified into the cluster of the initial cluster center corresponding to the minimum value. Then, the average value of each first feature vector in each cluster corresponding to each initial cluster center is taken, and the resulting vector is the updated initial cluster center.
[0049] For example, the classification process uses the Euclidean distance (i.e., Euclidean distance) between the first feature vector and the initial cluster center as the criterion. The formula for calculating the Euclidean distance between the first feature vector and any target cluster center (i.e., any cluster center) is as follows: (1) in, This represents the Euclidean distance between the first eigenvector and the target cluster center. This represents the i-th vector element of either the first feature vector or the target cluster center. This represents the i-th vector element of the first feature vector and the other one in the target cluster center. This represents the vector dimension of the first eigenvector.
[0050] Step 01213: Based on whether the number of classification processes has reached the second preset number of times, and / or whether the difference before and after updating each initial cluster center is less than the preset difference threshold, determine the classification processing completion result. The classification processing completion result includes whether all classification processes have been completed. Step 01214: If not all classification processes are completed, execute steps 01211, 01212, and 01213 again; Step 01215: After completing all classification processes, use the latest initial cluster centers as the cluster centers of their respective clusters.
[0051] The second preset number of attempts and the preset difference threshold are both default values set based on experience or user-defined values. For example, the second preset number of attempts is 10 or 20.
[0052] Specifically, if the number of classification processes reaches the second preset number (even if the changes in cluster centers before and after the update are still significant), or if the difference between the initial cluster centers before and after the update is less than a preset difference threshold (indicating that the clusters have stabilized), the classification process is considered complete, and iterative clustering is discontinued. If the number of classification processes does not reach the second preset number, and the difference between the initial cluster centers before and after the update is not less than a preset difference threshold, the classification process is considered incomplete, and iterative clustering continues, updating the clusters and cluster centers.
[0053] In this way, infinite loops can be avoided, the amount of computation can be controlled, and each cluster and cluster center can automatically converge to the optimal result, thereby improving the overall quantization efficiency.
[0054] Step 013: Based on the difference between each first feature vector and the cluster center of the corresponding cluster, determine the corresponding residual vector; Step 014: Combine each first feature vector with its corresponding residual vector to generate the corresponding second feature vector; Specifically, for each first feature vector, the residual vector is calculated by subtracting the cluster center of the corresponding cluster from the first feature vector, or by subtracting the first feature vector from the cluster center of the corresponding cluster. This ensures that each clustering process can directly reference complete, undiminished global semantic information.
[0055] For any recommendable content, the corresponding second feature vector is obtained by combining the corresponding first feature vector and the corresponding residual vector. Since the first feature vector is the concatenation of the sub-feature vectors of the recommendable content and the initial residual vector, the second feature vector also includes the concatenation of the sub-feature vectors of the recommendable content and the corresponding residual vectors. The concatenation order in the second feature vectors corresponding to each recommendable content is consistent; for example, the corresponding initial residual vector comes first, followed by the sub-feature vectors, or vice versa.
[0056] For example, the second feature vector of the content that any target can recommend is determined as shown in equation (2) below: (2) in, Indicates the first The second feature vector corresponding to the second clustering process (i.e., the subsequent first clustering) The first feature vector corresponding to the second clustering process. Indicates the first The first feature vector corresponding to the second clustering process; Indicates the first After the secondary clustering process, the cluster centers corresponding to the target recommendable content; Indicates the first The clustering process yields clusters of recommendable content corresponding to the target. This represents a sub-feature vector representing the content that the target can recommend. This indicates a splicing operation.
[0057] In this way, the second feature vector can be prevented from becoming a pure numerical error after multi-layer clustering quantization. This forces the second feature vector to retain the semantic association with the original recommendable content while containing fine-grained information of the residual vector, thereby effectively improving the accuracy of subsequent content recommendations.
[0058] Step 015: If the number of clustering operations has not reached the first preset number, update the corresponding first feature vectors using each second feature vector, and execute steps 012, 013 and 014 again. The first preset number of times is a default value set based on experience or a user-defined value, such as 3 or 4.
[0059] Specifically, by setting the number of quantization layers (i.e., the number of clustering processes) as the first preset number of times, quantization continues before the first preset number of times is reached, continuously improving the expression accuracy and semantic discriminability of features, making the final semantic identifier (i.e., semantic ID) more accurate and robust. The second feature vector corresponding to each recommendable content obtained after the previous clustering process is used as the first feature vector corresponding to the current clustering process, and quantization continues. The number of first feature vectors input for each clustering process is the same. The updated first feature vector ensures that each clustering process can directly refer to complete, undiminished global semantic information. The specific process has been described in detail in steps 012 to 014, and will not be repeated here to avoid repetition.
[0060] Step 016: When the number of clustering processes reaches the first preset number, obtain each preset semantic identifier corresponding to each clustering process, and construct a semantic library based on each preset semantic identifier corresponding to each clustering process; Among them, the preset semantic identifier (i.e., semantic ID) is an identifier assigned to each cluster generated in each clustering process; each cluster obtained in each clustering process corresponds to a preset semantic identifier. The semantic library is a set of feature identifiers composed of each preset semantic identifier.
[0061] Specifically, each clustering process corresponds to a quantization process, and the combination of preset semantic identifiers obtained from each clustering process forms the codebook corresponding to that clustering process. The preset semantic identifiers obtained from each clustering process (i.e., the quantization process) are arranged according to their corresponding number of times, ultimately forming a multi-dimensional semantic library.
[0062] In this way, a high-quality semantic library can be obtained, which can effectively improve the accuracy of subsequent content recommendations.
[0063] In one alternative embodiment, please refer to Figure 3 Step 016 includes: Step 0161: Assign a corresponding preset semantic identifier to each cluster generated by each clustering process; For example, if a clustering process yields 256 clusters, then 256 preset codes (such as codes from 1 to 256) can be assigned to these 256 clusters respectively. These 256 codes are the preset semantic identifiers corresponding to this clustering process.
[0064] Optionally, the number of clusters obtained from different clustering processes may be the same or different, and the number of corresponding preset semantic labels may also be the same or different. If two clustering processes yield the same number of clusters, the range of the preset semantic labels corresponding to these two clustering processes may be the same or different; for example, if both clustering processes yield 20 clusters, the preset semantic labels corresponding to these two clustering processes can both be codes from 1 to 20; alternatively, clusters obtained from one clustering process may have preset semantic labels from 1 to 20, while clusters obtained from another clustering process may have preset semantic labels from 21 to 40 (or 1 to 10 plus 21 to 30).
[0065] When the number of clusters obtained from different clustering processes is different, the basic principle of the allocation of preset semantic labels is similar to that when the number of clusters obtained from two clustering processes is the same, and will not be elaborated here.
[0066] Step 0162: Generate a semantic library based on each preset semantic identifier and the cluster center corresponding to each preset semantic identifier.
[0067] For example, the (The value range is [1, ...) The clustering process (integers in the original text) yields k clusters and k cluster centers. The preset semantic identifiers corresponding to the k cluster centers are encoded as 1 to k, respectively. The corresponding codebook is then... Then the semantic library can be represented as ,in, The codebook is composed of the preset semantic identifiers obtained from the first clustering process. For the first The codebook is composed of various preset semantic identifiers obtained from the secondary clustering process.
[0068] Step 017: Based on the semantic library and the target object's historical interaction information, perform content recommendation to output recommended content to the target object. The historical interaction information includes at least one piece of content that has been interacted with, and the interacted content is any recommendable content.
[0069] Here, the target audience refers to users who receive content recommendations; recommended content refers to the content that will be recommended to the target audience; historical interaction information refers to the recommended content that the target audience has viewed and clicked on; content recommendation refers to the process of selecting recommended content that the target audience is interested in and displaying it to the target audience through a graphical user interface.
[0070] Specifically, by combining a semantic database, the interactive content and each recommendable content item can be converted into corresponding semantic ID sequences. Based on the semantic ID sequences of the interactive content, predictions can be made to determine one or more recommendable content items that the target audience is most interested in (most likely to interact with). Then, each recommendable content item to be recommended to the target audience is displayed (or displayed in order) on a graphical user interface.
[0071] In this way, users' interests and preferences can be accurately captured, and recommended content that better meets their needs can be provided, thus achieving accurate personalized recommendations and improving users' click-through rates, retention rates, and user experience.
[0072] In one alternative embodiment, please continue to refer to Figure 3 Step 017 includes: Step 0171: Based on the first feature vector and semantic library corresponding to each interacted content in the historical interaction information, determine the corresponding historical semantic identifier sequence respectively; Step 0172: Match the historical semantic identifier sequences of each interacted content with each semantic identifier set in the semantic database to obtain the target semantic identifiers that the historical semantic identifier sequences match in each semantic identifier set. The semantic identifier sets correspond one-to-one with the clusters generated by each clustering process. Among them, the historical semantic identifier sequence refers to the semantic ID sequence corresponding to the interacted content, which has high semantic fidelity and can accurately characterize the user's interest features; the semantic identifier set refers to the set of preset semantic identifiers of the clusters obtained by each clustering process, that is, the codebook corresponding to each clustering process; the target semantic identifier is the preset semantic identifier corresponding to the features that the user is interested in.
[0073] Specifically, a pre-defined multimodal feature extractor can extract features from each interacted content and generate corresponding sub-feature vectors. These sub-feature vectors are then superimposed with the corresponding initial residual vectors to obtain the first feature vector. For any interacted content, the first feature vector is subjected to a first pre-defined number of cyclic clustering (quantization) processes. In each clustering process, the cluster center with the closest distance (e.g., Euclidean distance) and its corresponding pre-defined semantic identifier (i.e., semantic ID) are found. The pre-defined semantic identifiers obtained from each clustering process are arranged and combined in order of frequency, resulting in the historical semantic identifier sequence corresponding to the interacted content.
[0074] Because each clustering input vector incorporates sub-feature vectors of recommendable content, high-order (deep) pre-defined semantic identifiers retain rich semantic information, unlike traditional residual quantization which only contains minor residual noise. Therefore, the resulting historical semantic identifier sequence accurately characterizes the target object's interests, and is structurally stable with low computational cost. Determining matching target semantic identifiers based on historical semantic identifier sequences enables generative recall, reducing the computational overhead of high-dimensional features, quickly matching similar recommendable content, and improving the robustness and real-time performance of content recommendation.
[0075] In one alternative embodiment, please refer to Figure 5 Step 0172 includes: Step 01721: Input the historical semantic identifier sequence of each interacted content into the Transformer model; Step 01722: Match the historical semantic identifier sequence and the semantic identifier set using the causal attention mechanism of the Transformer model to determine the target semantic identifier.
[0076] The Transformer model is a deep learning model based on self-attention, which models sequence dependencies through an encoder-decoder structure; for example, the Transformer index (TIGER) in generative recommendation systems. The Transformer model includes an encoder and a decoder. The encoder performs bidirectional global immediate processing on the input sequence to extract contextual semantic features for the decoder. The decoder generates semantically labeled sequences word-by-word using an autoregressive next-word prediction (NTP) method, based on the contextual semantic features output by the encoder and the generated content. Causal attention is a dedicated masking mechanism for the decoder, allowing attention only to the current and previous positions while masking future information to ensure the validity of the generation sequence.
[0077] Specifically, because the input vector for each clustering process incorporates sub-feature vectors of recommendable content, the historical semantic token sequence possesses high semantic fidelity. The historical semantic token sequences of each interacted content form a total historical sequence according to the interaction order. The encoder of the Transformer model learns from this total historical sequence to predict one or more semantic tokens with the highest probability of interaction with the next target object (user). Therefore, when predicting each target semantic token, the Transformer model can utilize high-quality semantic cues, significantly improving the accuracy and convergence speed of recall prediction.
[0078] For example, please see Figure 6 The Transformer model includes a Bidirectional TransformerEncoder and a Transformer Decoder. The target object is User_5, and the interacted content includes Item233 and Item515. The historical semantic identifier of Item233 is Sem.ID = (5, 23, 55), and the historical semantic identifier of Item515 is Sem.ID = (5, 25, 78). The Bidirectional Transformer Encoder generates a contextual semantic feature (Encoded Context) based on the historical semantic identifiers of Item233 and Item515. The Transformer Decoder generates the first target semantic identifier (t_5) based on the contextual semantic feature and the Start of Sequence (BOS) marker; then, based on the contextual semantic feature and the first target semantic identifier (t_5), it generates the second target semantic identifier (t_25); then, based on the contextual semantic feature and the second target semantic identifier (t_25), it generates the third target semantic identifier (t_55); finally, based on the contextual semantic feature and the third target semantic identifier (t_55), it generates the End of Sequence (EOS). The obtained target semantic identifiers (t_5, t_25, and t_55) belong to the same recommendable content. This is the process of outputting a set of target semantic identifiers; repeating this process can output multiple sets of target semantic identifiers.
[0079] Step 0173: Generate a target semantic identifier sequence based on each target semantic identifier; Step 0174: Recommend content based on the recommended content matched by the target semantic identifier sequence, so as to output the matched recommended content to the target object.
[0080] The target language identifier sequence refers to the semantic ID sequence corresponding to the recommendable content.
[0081] Specifically, the obtained target semantic identifiers are grouped into groups according to their generation process and then explicitly ordered. Combining the target semantic identifiers within each group according to their corresponding order yields the target semantic identifier sequences. For example, please refer to [link to example]. Figure 6 If the target semantic identifiers (t_5, t_25, and t_55) belong to the same group and their order is determined, then the target semantic identifier sequence is Sem.ID = (5, 25, 55).
[0082] Based on the target semantic identifier sequence, one or more corresponding recommended content items can be found in reverse, i.e., the matched recommended content. The matched recommended content is the recommended content that the target object is most interested in (most likely to interact with), and then each matched recommended content item is displayed (or displayed in order) on the graphical user interface.
[0083] This enables accurate personalized recommendations, improving user click-through rates and user engagement.
[0084] In one alternative embodiment, please refer to Figure 5 Step 0174 includes: Step 01741: Based on the historical semantic identifier sequence and the target semantic identifier sequence of each interacted content, generate the first mapping vector corresponding to each historical semantic identifier sequence and the target semantic identifier respectively; Step 01742: Input the first mapping vector into the ranking model to obtain the ranking score of the recommendable content matching the target semantic identifier sequence; Step 01743: Based on the ranking score of the recommended content matching the target semantic identifier sequence, output the matched recommended content to the target object.
[0085] Among them, ranking models are used to match the corresponding ranking scores for the input vector; for example, pointwise ranking models, pairwise ranking models, and listwise ranking models; and for example, Deep Interest Network (DIN), Degree Factorization Machine (DeepFM), and Deep Cross Network (DCN).
[0086] Specifically, by combining historical semantic identifier sequences with a semantic database and mapping them through an embedding layer, cluster centers corresponding to each preset semantic identifier in the historical semantic identifier sequence can be obtained. The cluster centers corresponding to each preset semantic identifier are combined sequentially to form the first mapping vector corresponding to the historical semantic identifier sequence. The process of generating the first mapping vector corresponding to the target semantic identifier sequence is basically similar in principle to the process of generating the first mapping vector corresponding to the historical semantic identifier sequence, and will not be elaborated here to avoid repetition.
[0087] Then, the first mapping vectors corresponding to the historical semantic identifier sequences of each interacted content can be fused into a dense semantic vector by summing or concatenating. The ranking model is based on dense semantic vectors. The first mapping vector corresponding to any target semantic identifier sequence is used to score the target semantic identifier sequence using preset indicators such as predicted click-through rate (CTR) / conversion rate (CVR), thus generating a corresponding ranking score for the recommendable content matched with the target semantic identifier sequence. Finally, on the graphical user interface, each recommendable content is displayed sequentially (or assigned a display area from high to low importance) according to its ranking score, achieving accurate ranking and recommendation.
[0088] Optionally, when there are multiple recommendable items matching the target semantic identifier sequence (i.e., ID collision), for each recommendable item belonging to the same target semantic identifier, different identifiers are added to the first mapping vector corresponding to the target semantic identifier to distinguish between recommendable items of different matches. This allows the ranking model to be based on dense semantic vectors. The first mapping vector corresponding to the target semantic identifier after adding different identifiers is used to generate the corresponding ranking score.
[0089] In one alternative embodiment, please refer to Figure 7 Step 0174 includes: Step 01741: Based on the historical semantic identifier sequence and the target semantic identifier sequence of each interacted content, generate the first mapping vector corresponding to each historical semantic identifier sequence and the target semantic identifier respectively; Step 01744: Based on the first preset identifier of each interacted content and the second preset identifier of the recommendable content matched by the target semantic identifier sequence, generate the second mapping vector corresponding to each first preset identifier and the second preset identifier respectively. Step 01745: Concatenate each second mapping vector with the corresponding first mapping vector to obtain the third mapping vector corresponding to each of the interactive content and the recommended content matched with the target semantic identifier sequence; Step 01746: Input each third mapping vector into the ranking model to obtain the ranking score of the recommendable content matched by the target semantic identifier sequence, wherein the ranking model is used to match the corresponding ranking score for the input vector; Step 01743: Based on the ranking score of the recommended content matching the target semantic identifier sequence, output the matched recommended content to the target object.
[0090] The preset identifier (ItemID) is automatically assigned when recommendable content is added to the database (becomes eligible for recommendation). For newly added recommendable content, due to a lack of training data, the preset identifier is randomly initialized and assigned, lacking rich semantic information. The first preset identifier corresponds to already interacted content, and the second preset identifier corresponds to recommendable content yet to be recommended.
[0091] Specifically, the first and second preset identifiers can be mapped through an embedding layer to obtain their respective second mapping vectors. Each second mapping vector is then concatenated with its corresponding first mapping vector to obtain a third mapping vector. The concatenation order is consistent: either the first mapping vector comes first, followed by the second mapping vector; or vice versa. The process of outputting the sorting score based on each third mapping vector in step 01746 is essentially similar to the process in step 01743, and will not be repeated here to avoid repetition.
[0092] For example, please see Figure 8 , where s1, s2, ..., s n Let v1, v2, ..., v be the first mapping vector corresponding to each historical semantic identifier sequence of the interacted content. n For each of the interacted content items, assign a first preset identifier to a corresponding second mapping vector, c1, c2, ..., c n This represents the third mapping vector corresponding to each piece of interacted content. This represents the concatenation operation. For the i-th recommended content to be scored, t i w represents its corresponding first mapping vector. i d represents its corresponding second mapping vector. i This corresponds to its third mapping vector. The ranking model outputs the ranking score of the recommended content to be scored based on the third mapping vectors corresponding to each interacted content and the third mapping vector of the recommended content to be scored.
[0093] Finally, on the graphical user interface, each recommendable item is displayed sequentially (or assigned display areas from highest to lowest importance) according to its ranking score. Since both the historical and target semantic identifier sequences have high semantic fidelity, the corresponding first mapping vector possesses rich semantic information. After concatenation with the second mapping vector, multimodal content details are still preserved, enabling the ranking model to achieve accurate ranking with zero or few samples, thus solving the cold start problem for new items.
[0094] All of the above technical solutions can be combined in any way to form optional embodiments of this application, and will not be described in detail here.
[0095] Based on the method described in the above embodiments, this application also provides a content recommendation apparatus for performing the steps in the above content recommendation method. Please refer to... Figure 9 , Figure 9 This is a schematic diagram of a content recommendation device provided in an embodiment of this application. The content recommendation device 200 includes: The first generation module 201 is used to generate corresponding first feature vectors based on each recommendable content; Clustering module 202 is used to perform clustering processing on each first feature vector to generate at least one cluster; The residual quantization module 203 is used to determine the corresponding residual vector based on the difference between each first feature vector and the cluster center of the corresponding cluster. The combination module 204 is used to combine each first feature vector with the corresponding residual vector to generate the corresponding second feature vector. The loop module 205 is used to update the corresponding first feature vector by each second feature vector when the number of clustering processes has not reached the first preset number of times, and to perform clustering processing on each first feature vector again to generate at least one cluster; to determine the corresponding residual vector based on the difference between each first feature vector and the cluster center of the corresponding cluster; and to combine each first feature vector and the corresponding residual vector to generate the corresponding second feature vector. The second generation module 206 is used to generate each preset semantic identifier based on each cluster generated by each clustering process when the number of clustering processes reaches a first preset number, and to build a semantic library based on each preset semantic identifier corresponding to each clustering process. The recommendation module 207 is used to recommend content based on the semantic library and the historical interaction information of the target object, so as to output recommended content to the target object. The historical interaction information includes at least one piece of content that has been interacted with, and the interacted content is any recommended content.
[0096] It should be noted that the specific details of each module unit in the above-mentioned content recommendation device have been described in detail in the embodiments of the above-mentioned content recommendation method, and will not be repeated here.
[0097] In the embodiments of this application, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works 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.
[0098] In one optional embodiment, the content recommendation device in this application can be implemented in hardware, such as an electronic device or a component in an electronic device, such as an integrated circuit or a chip; the content recommendation device can also be implemented in software, such as as an application installed in an electronic device.
[0099] This application also provides an electronic device, which includes a processor and a memory. The memory stores a computer program, and the processor calls the computer program stored in the memory to implement the various processes of the above-mentioned recommended method embodiments, and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0100] A display screen can be used to display a graphical user interface (GUI) and receive user commands generated by the GUI. The display screen may include a display panel and a touch panel. The display panel can be used to display information input by the user or information provided to the user, as well as various graphical user interfaces of the electronic device. These graphical user interfaces can be composed of graphics, text, icons, video, and any combination thereof. The touch panel can be used to collect touch operations performed by the user on or near it (such as operations performed by the user using a finger, stylus, or any suitable object or accessory on or near the touch panel), generate corresponding operation commands, and execute the corresponding program according to the operation commands.
[0101] Optionally, the touch panel may include two parts: a touch detection device and a touch controller. The touch detection device detects the user's touch location and the signal generated by the touch operation, transmitting the signal to the touch controller. The touch controller receives touch information from the touch detection device, converts it into touch point coordinates, sends it to the processor, and can receive and execute commands from the processor. The touch panel may cover the display panel. When the touch panel detects a touch operation on or near it, it transmits the information to the processor to determine the type of touch event. Subsequently, the processor provides corresponding visual output on the display panel based on the type of touch event. In this embodiment, the touch panel and display panel can be integrated into the display screen to achieve input and output functions. However, in some embodiments, the touch panel and display panel can be implemented as two independent components to achieve input and output functions.
[0102] In one alternative embodiment, please refer to Figure 10 , Figure 10 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device 300 includes a processor 301 and a memory 302. The memory 302 stores a computer program 303 that can run on the processor 301. When the computer program 303 is executed by the processor 301, it implements the various processes of the embodiments of the recommended methods described above and can achieve the same technical effects. To avoid repetition, it will not be described again here.
[0103] Please see Figure 11 , Figure 11 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application. The electronic device can be a terminal or a server. Exemplarily, the electronic device 400 includes a central processing unit (CPU) 401, a system memory 404 including random access memory (RAM) 402 and read-only memory (ROM) 403, and a system bus 405 connecting the system memory 404 and the central processing unit 401.
[0104] In some embodiments, the electronic device 400 may also include a basic input / output system 406 that helps transmit information between various devices within the computer, and a mass storage device 407 for storing the operating system 413, the client 414, and other program modules 415.
[0105] In some embodiments, the basic input / output system 406 includes a display 408 for displaying information and an input device 409 for user input, such as a touch panel and other input devices. A touch panel is also called a touchscreen. A touch panel may include both a touch device and a touch controller. Other input devices may include, but are not limited to, physical keyboards, function keys (such as volume control buttons, power buttons, etc.), trackballs, mice, and joysticks, which will not be described further here.
[0106] Both the display 408 and the input device 409 are connected to the central processing unit 401 via an input / output controller 410 connected to the system bus 405. The basic input / output system 406 may also include the input / output controller 410 for receiving and processing input from touch panels, other input devices, etc. Optionally, the input / output system 406 may also include output devices, such as displays, printers, or other types of output devices.
[0107] Mass storage device 407 is connected to central processing unit 401 via a mass storage controller (not shown) connected to system bus 405. Mass storage device 407 and its associated computer-readable media provide non-volatile storage for electronic device 400. That is, mass storage device 407 may include computer-readable media (not shown) such as hard disk or compact disc read-only memory (CD-ROM) drive.
[0108] According to various embodiments of this application, the electronic device 400 can also be connected to a remote computer on a network, such as the Internet. That is, the electronic device 400 can be connected to a network 417 via a network interface unit 416 connected to the system bus 405, or the network interface unit 416 can be used to connect to other types of networks or remote computer systems (not shown).
[0109] This application also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the various processes of the embodiments of the recommended methods described above and achieves the same technical effects. To avoid repetition, it will not be described again here.
[0110] The processor can be the processor in the electronic device described in the above embodiments. The computer-readable storage medium can be a computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk, etc.
[0111] This application also provides a computer program product, which includes computer instructions stored in a computer-readable storage medium. The processor of an electronic device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the electronic device to perform the corresponding process in the content recommendation method of this application embodiment. For simplicity, further details are omitted here.
[0112] This application also provides a computer program comprising computer instructions stored in a computer-readable storage medium. The processor of an electronic device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the electronic device to perform the corresponding process in the recommended method described in this application. For brevity, further details are omitted here.
[0113] It should be understood that the processor in this application may be an integrated circuit chip with signal processing capabilities. In implementation, the steps of the above method embodiments can be completed by integrated logic circuits in the processor's hardware or by instructions in software form. The processor described above can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules can be located in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method.
[0114] It is understood that the memory in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchlink DRAM (SLDRAM), and Direct Rambus RAM (DR RAM). It should be noted that the memory used in the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0115] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0116] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0117] In the embodiments of this application, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works 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.
[0118] In the several embodiments provided in this application, 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; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0119] 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.
[0120] In addition, the functional units in this application 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.
[0121] If a function 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 application, in essence, or the part that contributes to the prior art, or a portion 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 to cause an electronic device (which may be a personal computer or a server) to execute all or part of the steps of the methods in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, ROM, RAM, magnetic disks, or optical disks.
[0122] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing a particular logical function or process, and the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order according to the functions involved, as should be understood by those skilled in the art to which embodiments of this application pertain.
[0123] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A content recommendation method, characterized in that, include: Generate a first feature vector for each recommendable content; Perform clustering processing on each of the first feature vectors to generate at least one cluster; Based on the difference between each of the first feature vectors and the corresponding cluster center of the cluster, the corresponding residual vectors are determined respectively; Each of the first feature vectors is combined with the corresponding residual vector to generate a corresponding second feature vector. If the number of clustering operations has not reached the first preset number, the corresponding first feature vector is updated by each of the second feature vectors, and the first feature vectors are clustered again to generate at least one cluster; based on the difference between each of the first feature vectors and the cluster center of the corresponding cluster, the corresponding residual vector is determined; based on the combination of each of the first feature vectors and the corresponding residual vector, the corresponding second feature vector is generated respectively. When the number of clustering processes reaches the first preset number, each preset semantic identifier corresponding to each clustering process is obtained, and a semantic library is constructed based on each preset semantic identifier corresponding to each clustering process, wherein the preset semantic identifier is determined based on each cluster generated by each clustering process; Content recommendation is performed based on the semantic database and the target object's historical interaction information to output recommended content to the target object. The historical interaction information includes at least one piece of content that has been interacted with, and the interacted content is any of the recommended content.
2. The content recommendation method according to claim 1, characterized in that, The step of generating corresponding first feature vectors based on each recommendable content includes: Features of each of the recommended contents are extracted using a preset multimodal feature extractor to generate corresponding sub-feature vectors. Based on each of the sub-feature vectors and the corresponding initial residual vectors, the corresponding first feature vectors are determined respectively, wherein each of the initial residual vectors conforms to a normal distribution.
3. The content recommendation method according to claim 1, characterized in that, The step of clustering each of the first feature vectors to generate at least one cluster includes: Classification is performed based on the distance between each of the first feature vectors and at least one initial cluster center, and each of the first feature vectors is classified into the cluster corresponding to each of the initial cluster centers, wherein the initial cluster centers are determined based on the first feature vectors; Based on the first feature vector corresponding to each initial cluster center, the corresponding initial cluster centers are updated respectively; Based on whether the number of classification processes has reached a second preset number, and / or whether the difference before and after each initial cluster center update is less than a preset difference threshold, the classification process completion result is determined, and the classification process completion result includes whether all classification processes have been completed. If all classification processing is not completed, the process of classifying based on the distance between each first feature vector and at least one initial cluster center is repeated to classify each first feature vector into the cluster corresponding to each initial cluster center. After all classification processes are completed, the latest initial cluster centers are used as the cluster centers of the corresponding clusters.
4. The content recommendation method according to claim 1, characterized in that, The step of obtaining each preset semantic identifier corresponding to each clustering process and constructing a semantic library based on each preset semantic identifier corresponding to each clustering process includes: Each cluster generated in each clustering process is assigned a corresponding preset semantic identifier; The semantic library is generated based on each of the preset semantic identifiers and the cluster centers corresponding to each of the preset semantic identifiers.
5. The content recommendation method according to any one of claims 1-4, characterized in that, The content recommendation based on the semantic database and the historical interaction information of the target object includes: Based on the first feature vector corresponding to each of the interacted contents in the historical interaction information and the semantic library, the corresponding historical semantic identifier sequence is determined respectively; The historical semantic identifier sequences of each of the interacted contents are matched with each semantic identifier set in the semantic library to obtain the target semantic identifiers that the historical semantic identifier sequences match in each of the semantic identifier sets. The semantic identifier sets correspond one-to-one with the clusters generated by each clustering process. Based on each of the aforementioned target semantic identifiers, a target semantic identifier sequence is generated; Content recommendation is performed based on the recommended content matched with the target semantic identifier sequence, so as to output the matched recommended content to the target object.
6. The content recommendation method according to claim 5, characterized in that, The step of matching the historical semantic identifier sequences of each of the interacted contents with each semantic identifier set in the semantic database includes: Input the historical semantic identifier sequence of each of the interacted contents into the Transformer model; The target semantic identifier is determined by matching the historical semantic identifier sequence and the semantic identifier set through the causal attention mechanism of the Transformer model.
7. The content recommendation method according to claim 5, characterized in that, The content recommendation based on the recommendable content matched with each of the target semantic identifier sequences, to output recommended content to the target object, includes: Based on the historical semantic identifier sequence of each of the interacted contents and the target semantic identifier sequence, a first mapping vector corresponding to each of the historical semantic identifier sequence and the target semantic identifier is generated respectively; Based on the first preset identifier of each of the interacted content and the second preset identifier of the recommendable content matched by the target semantic identifier sequence, a second mapping vector corresponding to each of the first preset identifier and the second preset identifier is generated respectively. Each of the second mapping vectors and the corresponding first mapping vectors are concatenated to obtain the third mapping vectors corresponding to each of the interactive content and the recommended content that matches the target semantic identifier sequence. Each of the third mapping vectors is input into the ranking model to obtain the ranking score of the recommendable content matched by the target semantic identifier sequence, wherein the ranking model is used to match the corresponding ranking score for the input vector; Based on the ranking score of the recommended content matched with the target semantic identifier sequence, the matched recommended content is output to the target object.
8. A content recommendation device, characterized in that, include: The first generation module is used to generate corresponding first feature vectors based on each recommendable content; A clustering module is used to perform clustering processing on each of the first feature vectors to generate at least one cluster; The residual quantization module is used to determine the corresponding residual vector based on the difference between each of the first feature vectors and the cluster center of the corresponding cluster. The combination module is used to combine each of the first feature vectors with the corresponding residual vectors to generate corresponding second feature vectors respectively. The loop module is used to update the corresponding first feature vector by each second feature vector when the number of clustering processes has not reached a first preset number of times, and to perform clustering processing on each first feature vector again to generate at least one cluster; to determine the corresponding residual vector based on the difference between each first feature vector and the cluster center of the corresponding cluster; and to combine each first feature vector with the corresponding residual vector to generate the corresponding second feature vector. The second generation module is used to obtain each preset semantic identifier corresponding to each clustering process when the number of clustering processes reaches the first preset number of times, and to construct a semantic library based on each preset semantic identifier corresponding to each clustering process, wherein the preset semantic identifier is determined based on each cluster generated by each clustering process; The recommendation module is used to recommend content based on the semantic library and the historical interaction information of the target object, so as to output recommended content to the target object. The historical interaction information includes at least one piece of content that has been interacted with, and the interacted content is any of the recommended content.
9. An electronic device, characterized in that, It includes a processor and a memory; the memory stores a computer program, and the processor executes the content recommendation method as described in any one of claims 1-7 by calling the computer program stored in the memory.
10. A computer-readable storage medium, characterized in that, The system contains a computer program that, when executed by a processor, implements the content recommendation method as described in any one of claims 1-7.