Content processing method and apparatus, content recommendation method, electronic device, and storage medium
By generating word vectors and position vectors, building user sequence list signs, and directly learning users' preferences for content semantics, it solves the problems of item-ID cold start and data sparseness in virtual social environments, and improves the accuracy and freshness of content recommendations.
Patent Information
- Application Number
- PCT/CN2025/071858
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-02-21
- Filing Date
- 2025-01-10
- Publication Date
- 2025-08-28
AI Technical Summary
In virtual social environment, existing content recommendation methods have problems such as item-ID cold start and data sparseness, resulting in poor recommendation results and inability to effectively utilize users' preferences for content semantics.
By generating word vectors, word position vectors, word type vectors and content position vectors, a user sequence list is constructed, and the user's positive feedback content record is used to directly learn the user's preference for content semantics, replace item-ID, and realize content recommendation.
It improves the content recommendation effect in virtual social scenarios, solves the problem of item cold start, and enhances the accuracy and freshness of recommendations.
Smart Images

Figure CN2025071858_28082025_PF_FP_ABST
Abstract
Description
Content processing method, content recommendation method, device, electronic device and storage medium
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority to Chinese patent application number 202410195000.5 filed on February 21, 2024, entitled “Content processing method, content recommendation method, device, electronic device and storage medium”, the entire contents of which are incorporated herein by reference. Technical Field
[0003] The present disclosure relates to the field of information processing technology, and in particular to a content processing method, a content recommendation method, a content processing device, an electronic device, and a computer-readable storage medium. Background Art
[0004] As virtual applications featuring virtual interaction scenarios gradually increase their share of social activities, more and more people are engaging in social activities such as interaction, collaboration, and competition within virtual worlds. Similar to the real world, virtual worlds also have their own social circles and content delivery channels. For example, in gaming applications, players can communicate about daily life and share anecdotes through diverse communication channels such as in-game communities, virtual news media, and anonymous social media. The in-game social environment provides players with ways to access information and build social connections, enabling them to empathize and drive the game world forward.
[0005] The particularity of virtual social interaction lies in that its content is usually closely related to virtual elements such as the world view, characters, virtual interactive events, etc. provided by virtual applications. The content shared and transmitted by users is usually different from the content in conventional social media. Discovering high-quality content in a virtual social environment and recommending it to users can increase user activity and interactivity and promote the social attributes of virtual applications.
[0006] Current content recommendation methods include those based on item-ID (content ID). This method converts content into uniquely identified item-IDs, such as 123, 124, 125, and then creates an embedding table to lookup and encode the item-ID as a vector representation of the item. However, compared to real-world content platforms, content in virtual social environments is more time-sensitive and has a smaller data volume. Therefore, new content is published and consumed in a shorter period of time. The virtual world changes faster, and users are more accustomed to browsing fresh content. Outdated content does not bring a sense of freshness. Therefore, there will be a large number of item-ID cold start and data sparsity issues. Most item-IDs lack training data for fitting, and underfitting item vector representations will lead to poor content recommendation results. Summary of the Invention
[0007] The present disclosure provides a content processing method, a content recommendation method, a content processing device, an electronic device, and a computer-readable storage medium to solve or at least partially solve the above-mentioned problems, as follows.
[0008] In a first aspect, the present disclosure provides a content processing method, the method comprising:
[0009] Step S1: Acquire a plurality of historical content data of positive and negative feedback of social interactions performed by a target user in a first virtual interaction scene, wherein the historical content data includes words or characters of a meaning type representing content, and words or characters of a meaning type representing semantics of the content;
[0010] Step S2: generating a word vector for representing a word or character in the plurality of historical content data, and a word position vector for representing a position of the word or character in the plurality of historical content data in the plurality of historical content data;
[0011] Step S3: generating a word type vector for representing the meaning type of words or characters in the plurality of historical content data, and a content position vector for representing the position of each historical content data in the plurality of historical content data;
[0012] Step S4: generating a user sequence representation of the target user according to the word vector, the word position vector, the word type vector and the content position vector;
[0013] Step S5: Acquire multiple content sequence representations, and determine a candidate content sequence representation from the multiple content sequence representations based on the similarity between the user sequence representation of the target user and each of the content sequence representations, wherein the content corresponding to the candidate content sequence representation is the candidate content for recommendation to the target user.
[0014] In a second aspect, the present disclosure further provides a content recommendation method, comprising:
[0015] Processing candidate content for recommendation to a target user using a preset processing strategy to obtain content to be recommended to the target user, wherein the candidate content is content corresponding to the candidate content sequence representation according to the first aspect above;
[0016] Recommend the content to be recommended to the target user.
[0017] In a third aspect, the present disclosure further provides a content processing device, the device comprising:
[0018] a historical content data acquisition module configured to acquire a plurality of historical content data of positive and negative feedback of social interactions performed by the target user in the first virtual interaction scene, wherein the historical content data includes words or characters of a meaning type representing content and words or characters of a meaning type representing semantics of the content;
[0019] a first vector generating module configured to generate a word vector for representing a word or a character in the plurality of historical content data, and a word position vector for representing a position of the word or the character in the plurality of historical content data in the plurality of historical content data;
[0020] a second vector generating module configured to generate a word type vector for representing a meaning type of a word or character in the plurality of historical content data, and a content position vector for representing a position of each historical content data in the plurality of historical content data;
[0021] A user sequence representation generating module is configured to generate a user sequence representation of the target user based on the word vector, the word position vector, the word type vector and the content position vector;
[0022] The candidate recommended content determination module is configured to obtain multiple content sequence representations and determine a candidate content sequence representation from the multiple content sequence representations based on the similarity between the user sequence representation of the target user and each of the content sequence representations, wherein the content corresponding to the candidate content sequence representation is the candidate content for recommendation to the target user.
[0023] In a fourth aspect, the present disclosure further provides an electronic device, comprising: a processor, a memory, and computer program instructions stored in the memory and executable on the processor;
[0024] When the processor executes the computer program instructions, it implements the content processing method described in the first aspect and / or the content recommendation method described in the second aspect.
[0025] In a fifth aspect, the present disclosure further provides a computer-readable storage medium, which stores computer program instructions. When the computer program instructions are executed by a processor, they are used to implement the content processing method described in the first aspect above, and / or the content recommendation method described in the second aspect.
[0026] The exemplary embodiments of the present disclosure have the following beneficial effects:
[0027] Through the content processing method provided by the present disclosure, first, multiple historical content data of positive and negative feedback of social interactions performed by the target user in the first virtual interactive scene can be obtained, wherein the historical content data include words or characters representing the meaning type of content, and words or characters representing the meaning type of semantics of the content; then, word vectors for representing the words or characters in the multiple historical content data and word position vectors for representing the positions of the words or characters in the multiple historical content data in the multiple historical content data are generated, and word type vectors for representing the meaning types of the words or characters in the multiple historical content data and content position vectors for representing the positions of each historical content data in the multiple historical content data are generated; then, a user sequence representation of the target user is generated based on the word vectors, word position vectors, word type vectors and content position vectors; then, a multiple content sequence representation is obtained, and a candidate content sequence representation is determined from the multiple content sequence representations based on the similarity between the user sequence representation of the target user and each content sequence representation, wherein the content corresponding to the candidate content sequence representation is the candidate content for recommendation to the target user. The exemplary embodiment of the present disclosure utilizes the item meaning embodied by the word type vector instead of the item ID. By determining the similarity between the user's positive feedback content records and specific content, the user's preference for content semantics is directly learned, so that content with the same or similar semantics is regarded as the same type of content. This solves the problem of item cold start caused by different content with the same or similar semantics having different item IDs, and improves the recommendation effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] FIG1 is a flow chart of a content processing method provided by one embodiment of the present disclosure;
[0029] FIG2 is a schematic diagram of a vector representation provided by one embodiment of the present disclosure;
[0030] FIG3 is an architecture diagram of a content service provided by one embodiment of the present disclosure;
[0031] FIG4 is a block diagram of a content processing device provided by one embodiment of the present disclosure;
[0032] FIG5 is a schematic diagram of the logical structure of an electronic device for implementing content processing provided by one embodiment of the present disclosure. DETAILED DESCRIPTION
[0033] In order to make the purpose, technical solutions and advantages of the embodiments of the present disclosure clearer, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. The components of the embodiments of the present disclosure generally described and shown in the drawings herein can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present disclosure provided in the drawings is not intended to limit the scope of the disclosure for which protection is sought, but merely represents selected embodiments of the present disclosure. Based on the embodiments of the present disclosure, every other embodiment obtained by those skilled in the art without making creative work falls within the scope of protection of the present disclosure.
[0034] The terms "a", "an", "the" and "said" are used in this specification to indicate the presence of one or more elements / components / etc.; the terms "including" and "having" are used to express open-ended inclusion and mean that additional elements / components / etc. may exist in addition to the listed elements / components / etc.; the terms "first" and "second" etc. are used only as labels and are not intended to limit the quantity of their objects.
[0035] It should be understood that in the embodiments of the present disclosure, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The word or character " / " generally indicates that the previous and subsequent associated objects are in an "or" relationship. "Including A, B and / or C" means including any one, any two, or any three of A, B, and C.
[0036] It should be understood that in the embodiments of the present disclosure, "B corresponding to A," "B corresponding to A," "A corresponds to B," or "B corresponds to A" means that B is associated with A and B can be determined based on A. Determining B based on A does not mean determining B based solely on A; B can also be determined based on A and / or other information.
[0037] The present disclosure provides a content processing method, and the execution subject of the method can be an electronic device or a server. The electronic device can be a desktop computer, a laptop computer, a game console, a smart watch, a tablet computer, a mobile phone, a television, etc., or other electronic devices, which are not specifically limited by the present disclosure. The server is used to provide background services for the client of the application in the electronic device. For example, the server can be the background server of the above-mentioned application. The server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), and basic cloud computing services such as big data and artificial intelligence platforms, which are not specifically limited by the present disclosure.
[0038] Before describing the embodiments of the present disclosure in detail, the related art will be further introduced.
[0039] In addition to the recommendation method based on item-ID (content ID) (please refer to the background technology section and will not be repeated here), the current content recommendation methods also include transferable recommendation methods, such as the transferable item-ID recommendation method and the transferable modal information recommendation method. These two transferable recommendation methods will be introduced below.
[0040] Recommended method for migrating item-IDs:
[0041] This method usually assumes the existence of some shared information, such as overlap in user-content interaction and common features between the two domains. It then reduces the differences between different domains by learning semantic mapping or migrating components. For example, if there are some items with the same name in movie data and novel data, these items can be used to directly migrate features.
[0042] However, this assumption is usually difficult to achieve in real scenarios because it requires the existence of common users or items between different data sets. In a virtual social environment, even if the same user publishes and browses content in different gameplay modes, the difference in item-IDs will make item-ID migration difficult to achieve.
[0043] Recommended methods for transferring modal information:
[0044] Compared to content ID features, this method, based on multimodal text and image features, can reuse and transfer models across different tasks. This method typically uses a pre-trained language model to extract text features from the content, which are then fed into the recommendation model to learn how to convert text features into content features.
[0045] However, this method also has its shortcomings. On the one hand, pre-trained language models usually use large-scale general corpus, and the semantics of the extracted content do not match the specific data in a specific field (such as the gaming field), such as gaming community content; on the other hand, the training objectives of the pre-trained language model are inconsistent with those of the recommendation model, which will result in the transferable semantic information not being fully mined.
[0046] In view of the current relevant technologies, this disclosure provides a content processing method. Aiming at the characteristics of strong timeliness and small data volume in virtual social environments, a solution from model to application service is designed to better improve the content recommendation effect in virtual social scenarios.
[0047] First, the present disclosure provides a model that combines natural language understanding tasks and recommendation tasks. It uses the meaning of items represented by word type vectors instead of item IDs. By determining the similarity between the user's positive and negative feedback content records and specific content, it directly learns the user's preference for content semantics, solving the problem of item cold start. Secondly, a joint training paradigm combining text understanding tasks and recommendation tasks is adopted for the model, realizing the migration of language model generality to recommendation tasks. Furthermore, the model training data incorporates the content of multiple virtual interaction scenes in virtual applications for training data enhancement, adapting to the characteristics of virtual social environments with little data and many scenes.
[0048] The following is a detailed introduction to an embodiment of the content processing method provided by the present disclosure.
[0049] FIG1 shows a flow chart of a content processing method provided by one embodiment of the present disclosure. As shown in FIG1 , the content processing method includes the following steps S1 to S5 .
[0050] Step S1: Acquire multiple historical content data of positive and negative feedback of social interactions performed by the target user in the first virtual interaction scene, wherein the historical content data includes words or characters of the meaning type representing content, and words or characters of the meaning type representing the semantics of the content.
[0051] Characters refer to glyph-like units or symbols, including letters, numbers, operators, punctuation marks, and other symbols, as well as some functional symbols. Words include single characters and phrases.
[0052] The target user refers to one of the users of a virtual interactive application, which includes gaming applications, metaverse applications, immersive applications (such as immersive conference applications), and the like, and this disclosure does not specifically limit this. Based on the diverse application functions of virtual interactive applications, the content processing method provided in this disclosure can also be applied to various application scenarios such as gaming scenarios, metaverse virtual social networking, immersive conferences, and immersive virtual experiences.
[0053] For example, the target user may be a player of a game application. Taking a game application as an example, the game application may provide users with a variety of virtual interaction scenarios, such as game scenarios, game lobby scenarios, world channel chat scenarios, local channel chat scenarios, virtual news media scenarios, game community forum scenarios, virtual item trading scenarios, etc. For example, the first virtual interaction scenario may be one of the virtual interaction scenarios provided by the game. Users can engage in social interactions with other users in various virtual interaction scenarios provided by the game, such as game play, chatting, liking, commenting, adding favorites, selecting interested users, blocking uninterested users, etc.
[0054] In an exemplary embodiment of the present disclosure, content includes text content (text includes words, numbers, letters, symbols, etc.), as well as content with descriptive text that represents the meaning of the content. For example, many images, videos, and special effects elements can be written for them during the development phase of the virtual interactive application to represent the meaning of the corresponding content. In the present disclosure, for example, candidate content for recommendation can be determined based on the descriptive text, but when the candidate content needs to be recommended, the candidate content is displayed to the user in its original form. For example, when it is determined that the content to be recommended is the descriptive text of an image, the image can be displayed to the user.
[0055] In one or more virtual interaction scenarios provided by a virtual interaction application, content recommendations can be made to users, such as anonymous user comments, virtual news, game events, etc. Before recommending content to a target user in the first virtual interaction scenario, it is necessary to select candidate content suitable for recommendation as a candidate for recommendation to the target user.
[0056] First, in step S1, multiple historical content data of positive and negative social interaction feedback provided by the target user in the first virtual interaction scene provided by the virtual interaction application can be obtained. Among them, positive feedback refers to positive feedback, which expresses positive meanings such as approval and interest. For example, the content that the target user has liked or collected in the first virtual interaction scene is the historical content of positive social interaction feedback provided by the target user in the first virtual interaction scene; correspondingly, negative feedback refers to negative feedback, which expresses negative meanings such as disapproval and lack of interest. For example, the content that the target user has clicked on or selected in the first virtual interaction scene that he is not interested in is the historical content of negative social interaction feedback provided by the target user in the first virtual interaction scene.
[0057] In an alternative embodiment, any historical content data Ti can be defined in dictionary format: {k1:v1, k2:v2, ..., km:vm}, for example, {"content":"Hi, come find someone with gold coins", "category":"Finding a partner", "rolename":"Suwen"}. To model this in the form of a language model, it can be flattened into a sentence, i.e., Ti = {k1,v1,k2,v2, ...,km,vm}, where k and v can be words or characters.
[0058] For example, the historical content data corresponding to a user's historical message is {"content":"hi, come here with gold coins","category":"Find a relationship","rolename":"Su Wen"}, where {"hi, come here with gold coins","Find a relationship","Su Wen"} are words or characters of the meaning type that represent the semantics of the content in the historical content data, and {"content","category","rolename"} are words or characters of the meaning type that represent the semantics of the content in the historical content data, that is, the semantics of "hi, come here with gold coins" is content (i.e., the content of the message), the semantics of "Find a relationship" is category (i.e., the category of the message), and the semantics of "Su Wen" is rolename (i.e., the role name of the user who left the message).
[0059] In an optional embodiment, multiple historical contents of positive and negative feedback of social interactions performed by the target user in the first virtual interaction scene can be arranged in descending order of time, so as to be serialized as s={i n ,i n-1, ..., i1}, where i j Refers to one of the historical content data in which the target user has made positive feedback on social interaction in the first virtual interaction scene, and adds a special mark [CLS] at the beginning of the sequence s, which is used as the beginning of the historical content data sequence X, so that each historical content data in the historical content data sequence X can be distinguished. [CLS], a symbol without obvious semantic information, will more fairly integrate the semantic information of each word or character in each historical content data. Therefore, multiple historical content data in which the target user has made positive feedback on social interaction in the first virtual interaction scene can be organized into a historical content data sequence X = {[CLS], T n ,T n-1 ,..., T1}, where Ti refers to one of the historical content data of the target user's positive and negative social interaction feedback in the first virtual interaction scene, and X represents the splicing of all the historical content data of the target user's positive and negative social interaction feedback in the first virtual interaction scene.
[0060] In one embodiment, the method provided by the present disclosure can be implemented through a model. Accordingly, the historical content data sequence X is the input data of the model (hereinafter referred to as the content processing model) used to implement the method provided by the present disclosure.
[0061] Step S2: Generate word vectors for representing words or characters in the plurality of historical content data, and word position vectors for representing positions of the words or characters in the plurality of historical content data.
[0062] In step S2, for a historical content data sequence X in which the target user has provided positive feedback on social interactions in the first virtual interaction scenario, word vector representations may be generated for words or characters in the historical content data sequence X, and word position vector representations may be generated for the positions of the words or characters in the historical content data sequence X in multiple historical content data. In one embodiment, step S2 may be implemented via an embedding layer of a content processing model.
[0063] In the following, step S2 and step S3 will be described in detail in the introduction of step S3.
[0064] Step S3: Generate a word type vector for representing the meaning type of words or characters in the plurality of historical content data, and a content position vector for representing the position of each historical content data in the plurality of historical content data.
[0065] In step S3, for the historical content data sequence X in which the target user has provided positive feedback on social interactions in the first virtual interaction scenario, a vector representation of the meaning type, i.e., a word type vector, can be generated for each word or character in the historical content data sequence X. Furthermore, a position representation of each piece of historical content data in X can be generated. The position representations of each piece of historical content data are arranged in order of position, i.e., a content position vector. In one embodiment, step S3 can be implemented via the embedding layer of the content processing model.
[0066] To combine the modeling methods of sequential recommendation models and language models, the inventors designed four types of vector mapping tables (embedding tables) to understand the input historical content data sequence X. This includes the historical content data sequence X used in content processing model inference and the historical content data sequence used as training samples when building the content processing model (the historical content data training samples mentioned below). In other words, the content data sequence is vectorized using four methods. For ease of description, content data will sometimes be referred to as item sentences, and content data sequences as item sentence sequences.
[0067] A word vector can represent a word or character, that is, the embedding corresponding to each word or character in the content data sequence.
[0068] A word position vector can represent the position of a word or character in a complete content data sequence. The word position vector can help understand the sequence pattern of words or characters.
[0069] The word type vector can distinguish the meaning type of a word or character. In one embodiment, the word type vector may include attribute type tags for representing the semantic meaning type of the word or character in the plurality of historical content data (i.e., content data sequence), such as C Key , and attribute value type tags used to characterize words or characters representing the meaning type of content in multiple historical content data (i.e., content data sequences), such as C Value That is, the word type vector can be used to distinguish between words or characters that express the content in the content data sequence (such as "hi, come and have a gold coin", "search for fate", "Suwen"), and characters or characters that express the semantics of the content (such as "content", "category", "rolename"). In addition, the word type vector can also include a start mark for representing the starting position of multiple historical content data, such as C CLS .
[0070] The content position vector can represent the position of each content data in the complete content data sequence. It is similar to the expansion of the word position vector, so that different meaning descriptions in the same content data have partially the same semantics.
[0071] In the present disclosure, there is no limitation on the order of generating the word vector, the word position vector, the word type vector, and the content position vector.
[0072] Related technologies directly map content data to IDs (item_ids), but this fails to learn the semantics of the content data during a cold start. The method provided in this disclosure maps content data to four vector representations, then analyzes the semantic similarity between content in the vector space. Therefore, even brand-new content will have semantic relevance to previous content, thus achieving semantic transfer.
[0073] Still taking the content data sequence including {"content":"hi, come with a gold coin","category":"looking for love","rolename":"Su Wen"} as an example, after the content data is input into the embedding layer of the content processing model, it is processed by the embedding layer to obtain the word vector, word position vector, word type vector and content position vector shown in Figure 2.
[0074] Step S4: Generate a user sequence representation of the target user based on the word vector, word position vector, word type vector and content position vector.
[0075] In one embodiment, step S4 can be implemented by the following steps:
[0076] S41. Word vector A w , word position vector B w , word type vector C w and content position vector D w Perform summation to obtain the summation result.
[0077] S42, normalize the summation result to obtain a normalized result E w [E CLS , E w1 ,...,E wr ].
[0078] The above steps S41 and S42 can be expressed by the following formula:
[0079] E w =LayerNorm(A w +B w +C w +D w )
[0080] Among them, E w Represents the normalized result.
[0081] S43, normalized result E w Encode and obtain the user sequence representation h of the target user i =[h CLS , h w1 ,...,h wr ].
[0082] The above step S43 can be expressed by the following formula:
[0083] [h CLS , h w1 ,...,h wr ]=Transformer([E CLS , E w1 ,...,E wr ])
[0084] Optionally, the above steps S41-S43 can be implemented by a Transformer encoder. For example, the word vector, word position vector, word type vector and content position vector shown in FIG2 are input into the Transformer encoder, thereby obtaining the user sequence representation of the target user [hcLS ,h1,...,h 15 ].
[0085] Step S5: Acquire multiple content sequence representations, and determine candidate content sequence representations from the multiple content sequence representations based on the similarity between the target user's user sequence representation and each content sequence representation, wherein the content corresponding to the candidate content sequence representation is the candidate content for recommendation to the target user.
[0086] In the present disclosure, multiple content sequence representations may also be obtained, where each content sequence representation is a vector representation of a piece of content. Therefore, each content sequence representation corresponds to a piece of content. In this step, the similarity between the target user's user sequence representation and each of the obtained content sequence representations may be determined. Based on the similarity data, candidate content sequence representations may be determined from the multiple content sequence representations. In other words, candidate content for recommendation to the target user may be determined from the multiple pieces of content.
[0087] Among them, the multiple content sequence representations obtained can also be generated by the method of obtaining user sequence representation for the historical content data sequence in the above steps S2-S4, that is, the corresponding content sequence representation can be generated for a content data by the method provided in the above steps S2-S4.
[0088] For users who need content recommendation, the input to the content processing model is a content data sequence consisting of multiple content data, that is, an item sentence sequence including multiple item sentences, which can be expressed as X = {[CLS], T n ,T n-1 , ..., T1}.
[0089] As for the content required for comparing semantic similarity, the input to the content processing model is a content data sequence consisting of content data, which is regarded as a special item sentence sequence with a length of 1 in this disclosure, that is, an item sentence sequence consisting of only one item sentence, which can be expressed as X = {[CLS], t i}
[0090] In one embodiment, cosine similarity can be used to measure the semantic relevance between the target user's user sequence representation and each acquired content sequence representation. i and obtain the content sequence representation h s The similarity r i,s It can be calculated using the following cosine similarity calculation formula:
[0091] In one embodiment, the content corresponding to the content sequence representations with the TopK similarities (ie, the K content sequence representations with the highest similarity) may be selected as candidate content for recommendation to the target user.
[0092] Further optionally, the content recommendation method for recommending content corresponding to the candidate content sequence representation to the target user may include the following steps:
[0093] Processing candidate content for recommendation to a target user using a preset processing strategy to obtain content to be recommended to the target user, the candidate content being content corresponding to the candidate content sequence representation obtained according to the above-mentioned content processing method;
[0094] Recommend the content to be recommended to the target users.
[0095] Among them, the preset processing strategy can be a processing strategy set based on business needs. According to the business needs, the candidate content for recommendation to the target user can be rearranged, screened, etc., so as to obtain the content finally recommended to the target user.
[0096] Alternatively, the content corresponding to the candidate content sequence representation obtained according to the above content processing method may be directly recommended to the target user without additional processing.
[0097] In one embodiment of the present disclosure, as described above, steps S2 through S5 in the embodiment of the present disclosure can be implemented using a trained content processing model. Specifically, multiple historical content data can be input into the trained content processing model, causing the model to execute steps S2 through S5 based on the multiple historical content data and output candidate content sequence representations for recommendation to a target user, as well as the similarity between the target user's user sequence representation and the candidate content sequence representations.
[0098] The inventors designed an efficient and available content service framework based on the proposed model, including a data module, an offline model module, and an online service module. An exemplary process is shown in FIG3 .
[0099] 1. Data production stage:
[0100] 1. After integrating new virtual interactive gameplay into the virtual interactive application, extract player content interaction behavior records based on the application's basic logs, including content exposure, browsing, likes, and dislikes. Construct a daily feature data table and import it into the Hive database. The table is then deployed daily using the Airflow task scheduling system.
[0101] Hive distributed database: Hive is a data warehouse tool based on Hadoop, used for data extraction, transformation, and loading. It is a mechanism for storing, querying, and analyzing large-scale data stored in Hadoop.
[0102] Airflow: Open-sourced by Airbnb, it is a platform for orchestrating, scheduling, and monitoring workflows. It provides a rich set of command-line tools and a simple, user-friendly interface for viewing operations. Airflow also offers a monitoring and alerting system.
[0103] 2. Using the Hive database, we retrieve content sequences from players within a specific time window (e.g., 30 days) to form an offline training set, which we then use for the model production phase. Furthermore, the content pool is represented using offline model inference to calculate content sequence representations, which are then imported into the Milvus database and provided to the online service phase. These two tasks are routinely deployed daily using the Airflow task scheduling system.
[0104] Milvus Database: Milvus is a database specifically designed to process queries on input vectors. Its sole goal is to store, index, and manage large-scale embedding vectors generated by deep neural networks and other machine learning (ML) models.
[0105] 2. Model production stage:
[0106] 1. Model training: Use the constructed training data set to train the model and calculate offline evaluation indicators for model verification.
[0107] 2. Model deployment: Store the trained model as a model file that can be deployed for timely response. Deploy the model file as an "online inference service API" to respond to prediction requests online in a timely manner.
[0108] 3. Online service stage:
[0109] 1. Model input data processing: Read user features from the data module, process the data, and format it into data that can be understood by the model inference service.
[0110] 2. Call the model inference service to determine the user sequence representation of the target user.
[0111] 3. Search for semantically similar content sequence representations from the Milvus database based on the similarity with the user's sequence representation.
[0112] 4. Model output data processing: After the found semantically similar content sequence representation is processed by business policy, it is returned to the user end of the virtual interactive application (including cloud client, local client, web page, etc.) to display the recommendation results, that is, the recommended content, to the user.
[0113] In an optional embodiment, the training method of the content processing model may include:
[0114] Step a: Obtain historical content data training samples corresponding to sample users and labeling results corresponding to the historical content data training samples;
[0115] Step b: training the model to be trained based on the historical content data training samples and the labeling results corresponding to the historical content data training samples to obtain a content processing model.
[0116] In an optional implementation, the step of obtaining the historical content data training sample corresponding to the sample user in step a above can be specifically implemented by the following steps:
[0117] Step a1: obtaining a first historical content data sample of social interaction feedback provided by a sample user in a first virtual interaction scene, and a second historical content data sample of social interaction feedback provided by the sample user in a second virtual interaction scene.
[0118] The second virtual interaction scene is a virtual interaction scene other than the first virtual interaction scene provided by the virtual interaction application, and there may be one or more second virtual interaction scenes.
[0119] The first historical content data sample includes positive samples of the sample user providing positive feedback on social interactions in the second virtual interaction scene, and negative samples of the sample user providing negative feedback on social interactions in the second virtual interaction scene. Similarly, the second historical content data sample includes positive samples of the sample user providing positive feedback on social interactions in the first virtual interaction scene, and negative samples of the sample user providing negative feedback on social interactions in the first virtual interaction scene.
[0120] Step a2: Based on the second historical content data sample, data enhancement is performed on the first historical content data sample to obtain a historical content data training sample.
[0121] Considering the small data volume of virtual social environments, this embodiment utilizes historical content data from sample users' social interactions in other virtual interaction scenarios within the virtual interaction application to augment the sample data needed for model training, thereby compensating for the limited content data available within a single virtual interaction scenario. Because both the first and second virtual interaction scenarios are social environments provided by the same virtual interaction application, users are shared, and the social content is largely centered around the same application, making the migration of content data feasible.
[0122] In an optional implementation, in step a2, data enhancement may be performed on the sample data required for training the model in the following manner, including:
[0123] Performing data enhancement on first historical content data samples of positive and negative social interactions performed by the sample user in the first virtual interaction scene based on second historical content data samples of positive and negative social interactions performed by the sample user in the second virtual interaction scene;
[0124] and / or,
[0125] According to the second historical content data sample in which the sample user has provided negative feedback on social interaction in the second virtual interaction scene, data enhancement is performed on the first historical content data sample in which the sample user has provided negative feedback on social interaction in the first virtual interaction scene.
[0126] In this embodiment, positive samples of other virtual interaction scenes in the virtual interaction application can be used to perform data enhancement on positive samples of the first virtual interaction scene in the virtual interaction application, and negative samples of other virtual interaction scenes in the virtual interaction application can be used to perform data enhancement on negative samples of the first virtual interaction scene in the virtual interaction application.
[0127] Optionally, data enhancement may be achieved by constructing new training samples based on the original first historical content data samples by adding, replacing, deleting, exchanging sample elements in the training samples, etc.
[0128] The new historical content data sample in the first virtual interaction scene is constructed by using sample elements in the historical content data samples of other virtual interaction scenes, and the construction method may include an addition method and a replacement method.
[0129] For example, the adding method is as follows:
[0130] One target sample element is extracted from the second historical content data sample, and the target sample element is added to the first historical content data sample, thereby constructing a new historical content data sample based on the first historical content data sample.
[0131] For example, the first historical content data sample of the first virtual interaction scene [X'={[CLS], T n ', T n-1 ', ..., T1'}, Y = T n+1 '], Y is a label, and the meanings of other letters will be explained below. For the first historical content data sample of the first virtual interaction scene [X'={[CLS],T n ', T n-1 ', ..., T1'}, Y = T n+1'], the second historical content data sample [X"={[CLS],R n ', R n-1 ', ..., R1'}] select the target sample element R n-1 ', then add to [X'={[CLS],T n ',T n-1 ', ..., T1'}, Y = T n+1 '], and without modifying the label Y of the target scene, the data after data enhancement can be [X'={[CLS],T n ',T n-1 ', R n-1 ', ..., T1'}, Y = T n+1 '].
[0132] Exemplarily, the replacement is as follows:
[0133] One of the target sample elements is extracted from the second historical content data sample, and one of the sample elements in the first historical content data sample is replaced with the target sample element.
[0134] For example, for the first historical content data sample of the first virtual interaction scene [X'={[CLS], T n ', T n-1 ', ..., T1'}, Y = T n+1 '], the second historical content data sample [X"={[CLS],R n ', R n-1 ', ..., R1'}] select the target sample element R n-1 ', then add to [X'={[CLS],T n ',T n-1 ', ..., T1'}, Y = T n+1 '], and without modifying the label Y of the target scene, the sample after data enhancement can be [X'={[CLS],T n ',T n-1 ', R n-1 ', ..., T1'}, Y = T n+1 '].
[0135] In addition, the sample elements in the historical content data sample of the first virtual interaction scene may be used to construct a new historical content data sample in the first virtual interaction scene, and the construction method may include a deletion method and a replacement method.
[0136] For example, the deletion method is as follows:
[0137] One of the sample elements is deleted from the first historical content data sample.
[0138] For example, the first historical content data sample of the first virtual interaction scene [X'={[CLS], T n ', T n-1 ', ..., T1'}, Y = T n+1 '], delete T n-1 'This sample element, the sample after data enhancement can be [X'={[CLS],T n ',T n-2 ', ..., T1'}, Y = T n+1 '].
[0139] For example, the exchange method is as follows:
[0140] The positions of two sample elements in the first historical content data sample are exchanged.
[0141] For example, the first historical content data sample of the first virtual interaction scene [X'={[CLS], T n ', T n-1 ', ..., T1'}, Y = T n+1 T in '] n-1 ' and T n-2 'The positions of these two sample elements are swapped, and the sample after data enhancement can be [X'={[CLS],T n ',T n-1 ', T n-2 ', ..., T1'}, Y = T n+1 '].
[0142] By incorporating content from other social environments in virtual interactive applications into model training data enhancement, the amount of data available for model training is increased, adapting to the characteristics of virtual social environments with less data and more scenarios, and improving the model's recommendation effect.
[0143] In an optional implementation, the above step b may specifically include step b1.
[0144] Step b1: Based on the historical content data training samples and the labeling results corresponding to the historical content data training samples, the model to be trained is jointly trained for the natural language understanding task and the recommendation task to obtain a content processing model.
[0145] Among them, the natural language understanding task can be used to understand the semantics of the content, and the recommendation task can be used to recommend content suitable for a specific user. By combining the natural language understanding task and the recommendation task for joint model training, the user's preference for content semantics can be directly learned, thereby finding content suitable for recommendation to the user based on the user's preference for content semantics.
[0146] This implementation uses a joint training paradigm that combines natural language understanding tasks (or text understanding tasks) and recommendation tasks for content processing models, thereby achieving the migration of general language models to recommendation tasks.
[0147] In one embodiment of the present disclosure, the natural language understanding task may adopt a Masked Language Modeling (MLM) task; and the recommendation task may adopt an item-item comparative learning task.
[0148] In this disclosure, the goal of the Masked Language Modeling task is to randomly mask a word to see if the model can predict the masked word. The MLM task prevents the language model from forgetting the semantics of words or characters when jointly trained with other specific tasks. Specifically, 15% of the word vectors in a sequence of word vectors are randomly replaced with a special token [MASK]. The goal of the MLM task is to restore the word or character as much as possible based on the semantics of the context.
[0149] In this disclosure, the training data format of the item-item contrastive learning task is [X'={[CLS], T n ', T n-1 ', ..., T1'}, Y = T n+1 '], X' is the historical content data training sample (positive sample or negative sample) corresponding to the sample user, Y is the label corresponding to X', that is, the label result corresponding to the historical content data training sample, which refers to the sample user in T n 'The next historical content data of social interaction feedback, if X' is a positive sample, then T n+1 ' corresponds to the historical content data of the next social interaction positive feedback. If X' is a negative sample, then T n+1 This corresponds to the historical content data for the next negative feedback on social interaction. The goal of the item-item comparative learning task is to have the model improve the similarity between user-item (user sequence representation) and item (content sequence representation) for positive samples, and to minimize the similarity between user-item and item for negative samples. The Y label for positive samples is a label from the training data, while the Y label for negative samples is a randomly selected label from other training labels within the same batch.
[0150] Further optionally, step b1 may specifically include:
[0151] Step b1-1: inputting historical content data training samples into the model to be trained, so that the model to be trained outputs prediction results corresponding to the historical content data training samples.
[0152] In this step, the model to be trained is first used to output the prediction results corresponding to the historical content data training samples.
[0153] Step b1-2: Based on the labeling results and prediction results corresponding to the historical content data training samples, determine the function value of the first objective function of the model to be trained for the natural language understanding task, and the function value of the second objective function of the model to be trained for the recommendation task.
[0154] Among them, a first objective function is set for the natural language understanding task, and a second objective function is set for the recommendation task.
[0155] Exemplarily, the first objective function may include a cross entropy function, which is formulated as follows:
[0156] In this formula, V represents the size of the entire vocabulary, p i represents the probability that the model predicts that the [MASK] tag is the word i in the vocabulary, that is, the predicted value of the [MASK] tag, y i Indicates whether the [MASK] tag is a 0 / 1 label of word i, that is, the true value of the [MASK] tag. If the [MASK] tag is word i, then y i If the [MASK] tag is not a character i, then y i The label is 0.
[0157] In this formula, p=Softmax(W0m+b0), where W0 and b0 are trainable model parameter matrices, Softmax is the activation function, and p represents the predicted probability of each word marked with [MASK].
[0158] In this formula, m=LayerNorm(RELU(W h h w +b h )), where LayerNorm is the layer normalization function (normalization of each dimension feature), RELU is the activation function, and W h 、b h It is a trainable model parameter matrix, and hw is the vector representation of each word after Tranformer encoding.
[0159] Exemplarily, the second objective function may include an infoNCE loss function, and the formula is as follows:
[0160] In this formula, no temperature coefficient is set for smoothing.
[0161] In this formula, B represents the set of all historical content data training samples, sim(h s , h i '+) indicates the content sequence representation h s With historical content data training sample h i '+(i.e., a user sequence represents a positive sample) cosine similarity, sim(h s , h i ') represents the content sequence representation h s With historical content data training sample h i '(i.e., a user sequence characterization negative sample) cosine similarity between them. Among them, h i '+ indicates positive sample, h i ' represents negative samples.
[0162] Step b1-3: According to the function value of the first objective function and the function value of the second objective function, adjust the parameters of the model to be trained to obtain a content processing model.
[0163] In order to take into account both the natural language understanding task and the recommendation task, the two objective functions mentioned above can be weighted so that the model can be jointly trained in the form of multiple tasks. The objective function L of the joint training is as follows: L = L MLM +λL Rec
[0164] In this formula, λ∈(0, 1], the inventors have tried values such as 0.2, 0.4, 0.6, 0.8, and 1. For example, λ=0.2 can be selected.
[0165] In this step, the parameters of the model to be trained can be adjusted according to the function value of the objective function L of the joint training. Each adjustment is performed in the direction of reducing the function value of the objective function L of the joint training until the function value of the objective function L meets certain requirements, such as being less than a certain threshold, and the joint training of the content processing model is completed.
[0166] In addition, after the model training is completed, it can also go through conventional processes such as model verification, which is not specifically limited in this disclosure.
[0167] Through the content processing method provided by the present disclosure, first, multiple historical content data of positive and negative feedback of social interactions performed by the target user in the first virtual interactive scene can be obtained, wherein the historical content data include words or characters representing the meaning type of content, and words or characters representing the meaning type of semantics of the content; then, word vectors for representing the words or characters in the multiple historical content data and word position vectors for representing the positions of the words or characters in the multiple historical content data in the multiple historical content data are generated, and word type vectors for representing the meaning types of the words or characters in the multiple historical content data and content position vectors for representing the positions of each historical content data in the multiple historical content data are generated; then, a user sequence representation of the target user is generated based on the word vectors, word position vectors, word type vectors and content position vectors; then, a multiple content sequence representation is obtained, and a candidate content sequence representation is determined from the multiple content sequence representations based on the similarity between the user sequence representation of the target user and each content sequence representation, wherein the content corresponding to the candidate content sequence representation is the candidate content for recommendation to the target user. The exemplary embodiment of the present disclosure utilizes the item meaning embodied by the word type vector instead of the item ID. By determining the similarity between the user's positive feedback content records and specific content, the user's preference for content semantics is directly learned, so that content with the same or similar semantics is regarded as the same type of content. This solves the problem of item cold start caused by different content with the same or similar semantics having different item IDs, and improves the recommendation effect.
[0168] Corresponding to the content processing method provided by the embodiment of the present disclosure, the embodiment of the present disclosure also provides a content processing device. As shown in FIG4 , the content processing device 700 includes:
[0169] The historical content data acquisition module 701 is configured to acquire a plurality of historical content data of positive and negative feedback of social interactions performed by the target user in the first virtual interaction scene, wherein the historical content data includes words or characters of the meaning type representing content and words or characters of the meaning type representing semantics of the content;
[0170] A first vector generation module 702 is configured to generate a word vector for representing a word or character in the plurality of historical content data, and a word position vector for representing a position of a word or character in the plurality of historical content data;
[0171] A second vector generating module 703 is configured to generate a word type vector for representing the meaning type of words or characters in the plurality of historical content data, and a content position vector for representing the position of each historical content data in the plurality of historical content data;
[0172] A user sequence representation generating module 704 is configured to generate a user sequence representation of the target user based on the word vector, the word position vector, the word type vector, and the content position vector;
[0173] The candidate recommended content determination module 705 is configured to obtain multiple content sequence representations and determine a candidate content sequence representation from the multiple content sequence representations based on the similarity between the user sequence representation of the target user and each of the content sequence representations, wherein the content corresponding to the candidate content sequence representation is the candidate content for recommendation to the target user.
[0174] Optionally, the word type vector includes attribute type tags for representing words or characters of the semantic meaning type representing the content in the multiple historical content data, and attribute value type tags for representing words or characters of the semantic meaning type representing the content in the multiple historical content data.
[0175] Optionally, the user sequence representation generation module includes:
[0176] a summing submodule, configured to sum the word vector, the word position vector, the word type vector, and the content position vector to obtain a summing result;
[0177] a normalization submodule, configured to perform normalization processing on the summation result to obtain a normalized result;
[0178] The encoding submodule is configured to encode the normalization result to obtain a user sequence representation of the target user.
[0179] Optionally, the content processing device includes:
[0180] a model processing module configured to input the plurality of historical content data into a content processing model obtained through training, so that the content processing model executes steps S2 to S5 according to the plurality of historical content data, and outputs a candidate content sequence representation for recommendation to the target user, and a similarity between the user sequence representation of the target user and the candidate content sequence representation;
[0181] Wherein, the training device of the content processing model includes:
[0182] A sample acquisition module is configured to acquire a historical content data training sample corresponding to a sample user and a marking result corresponding to the historical content data training sample;
[0183] The model training module is configured to train the model to be trained based on the historical content data training samples and the labeling results corresponding to the historical content data training samples to obtain the content processing model.
[0184] Optionally, the model training module includes:
[0185] The joint training submodule is configured to jointly train the model to be trained for the natural language understanding task and the recommendation task based on the historical content data training samples and the labeling results corresponding to the historical content data training samples to obtain the content processing model.
[0186] Optionally, the joint training submodule includes:
[0187] a model prediction unit configured to input the historical content data training sample into the model to be trained, so that the model to be trained outputs a prediction result corresponding to the historical content data training sample;
[0188] an objective function value determining unit, configured to determine, based on the labeling results and prediction results corresponding to the historical content data training samples, a function value of a first objective function of the model to be trained for the natural language understanding task, and a function value of a second objective function of the model to be trained for the recommendation task;
[0189] The model parameter adjustment unit is configured to adjust the parameters of the model to be trained according to the function value of the first objective function and the function value of the second objective function to obtain the content processing model.
[0190] Optionally, the natural language understanding task includes a masked language modeling task; and the recommendation task includes an item-item contrastive learning task.
[0191] Optionally, the sample acquisition module includes:
[0192] A sample acquisition submodule is configured to acquire a first historical content data sample of social interaction feedback provided by the sample user in the first virtual interaction scene, and a second historical content data sample of social interaction feedback provided by the user in the second virtual interaction scene;
[0193] The sample enhancement submodule is configured to perform data enhancement on the first historical content data sample according to the second historical content data sample to obtain the historical content data training sample.
[0194] Optionally, the sample enhancement submodule includes:
[0195] A positive sample enhancement unit is configured to perform data enhancement on a first historical content data sample in which the sample user has provided positive feedback on social interaction in the first virtual interaction scenario based on a second historical content data sample in which the sample user has provided positive feedback on social interaction in the second virtual interaction scenario;
[0196] and / or,
[0197] The negative sample enhancement unit is configured to perform data enhancement on the first historical content data sample in which the sample user has provided negative feedback on social interaction in the first virtual interaction scenario based on the second historical content data sample in which the sample user has provided negative feedback on social interaction in the second virtual interaction scenario.
[0198] Optionally, the sample enhancement submodule includes:
[0199] The additive sample enhancement unit is configured to extract one target sample element from the second historical content data sample and add the target sample element to the first historical content data sample.
[0200] Optionally, the sample enhancement submodule includes:
[0201] The replacement sample enhancement unit is configured to extract one target sample element from the second historical content data sample and replace one sample element in the first historical content data sample with the target sample element to obtain the content data training sample.
[0202] Optionally, the device for recommending the candidate content to the target user includes:
[0203] a candidate content processing module configured to process the candidate content for recommendation to the target user using a preset processing strategy to obtain content to be recommended to the target user;
[0204] The content recommendation module is configured to recommend the content to be recommended to the target user.
[0205] Through the content processing device provided by the present disclosure, first, multiple historical content data of positive and negative feedback of social interactions performed by the target user in the first virtual interactive scene can be obtained, wherein the historical content data include words or characters representing the meaning type of content, and words or characters representing the meaning type of semantics of the content; then, word vectors for representing the words or characters in the multiple historical content data and word position vectors for representing the positions of the words or characters in the multiple historical content data in the multiple historical content data are generated, and word type vectors for representing the meaning types of the words or characters in the multiple historical content data and content position vectors for representing the positions of each historical content data in the multiple historical content data are generated; then, a user sequence representation of the target user is generated based on the word vectors, word position vectors, word type vectors and content position vectors; then, a multiple content sequence representation is obtained, and a candidate content sequence representation is determined from the multiple content sequence representations based on the similarity between the user sequence representation of the target user and each content sequence representation, wherein the content corresponding to the candidate content sequence representation is the candidate content for recommendation to the target user. The exemplary embodiment of the present disclosure utilizes the item meaning embodied by the word type vector instead of the item ID. By determining the similarity between the user's positive feedback content records and specific content, the user's preference for content semantics is directly learned, so that content with the same or similar semantics is regarded as the same type of content. This solves the problem of item cold start caused by different content with the same or similar semantics having different item IDs, and improves the recommendation effect.
[0206] Next, an electronic device provided by an embodiment of the present disclosure is introduced. Please refer to Figure 5, which is a structural diagram of an electronic device provided by an embodiment of the present disclosure. Among them, the content processing device described in the embodiment of the present disclosure can be deployed on the electronic device 800 to implement the functions in the embodiment of the present disclosure. Specifically, the electronic device 800 includes a receiver 801, a transmitter 802, a processor 803 and a memory 804 (wherein the number of processors 803 in the electronic device 800 can be one or more, and Figure 5 takes one processor as an example), wherein the processor 803 may include an application processor 8031 and a communication processor 8032. In some embodiments of the present disclosure, the receiver 801, the transmitter 802, the processor 803 and the memory 804 may be connected via a bus or other means.
[0207] The memory 804 may include a read-only memory and a random access memory, and provides instructions and data to the processor 803. A portion of the memory 804 may also include non-volatile random access memory (NVRAM). The memory 804 stores processor and operation instructions, executable modules, or data structures, or subsets or extended sets thereof. The operation instructions may include various operation instructions for implementing various operations.
[0208] Processor 803 controls the operation of the execution device. In specific applications, the various components of the execution device are coupled together via a bus system. In addition to a data bus, the bus system may also include a power bus, a control bus, and a status signal bus. However, for clarity, all bus systems are referred to as a bus system in the figure.
[0209] The methods disclosed in the above embodiments of the present disclosure can be applied to or implemented by the processor 803. The processor 803 can be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by hardware integrated logic circuits or software instructions in the processor 803. The above processor 803 can be a general-purpose processor, a digital signal processor (DSP), a microprocessor, or a microcontroller, and can further include 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. The processor 803 can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present disclosure. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in conjunction with the embodiments of the present disclosure can be directly implemented and executed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium well-known in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. The storage medium is located in memory 804, and processor 803 reads information in memory 804 and, in conjunction with its hardware, completes the steps of the above method.
[0210] Receiver 801 can be used to receive input digital, word, or character information and generate signal input related to executing device-related settings and function control. Transmitter 802 can be used to output digital, word, or character information via the first interface. Transmitter 802 can also be used to send instructions to the disk pack via the first interface to modify data in the disk pack. Transmitter 802 can also include a display device such as a display screen.
[0211] In the embodiments of the present disclosure, the application processor 8031 in the processor 803 is configured to execute the content processing method in the embodiments of the present disclosure. It should be noted that the specific manner in which the application processor 8031 executes each step is based on the same concept as the various method embodiments in the present disclosure, and the technical effects achieved are the same as those of the various method embodiments in the present disclosure. For details, please refer to the description of the method embodiments shown above in the present disclosure, and will not be repeated here.
[0212] The embodiment of the present disclosure further provides a chip for executing instructions, which is used to execute the technical solution of the content processing method in the above embodiment.
[0213] The embodiments of the present disclosure further provide a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions. When the computer instructions are executed on a processor, the processor executes the technical solution of the content processing method in the above embodiment.
[0214] The embodiments of the present disclosure further provide a computer program product, including a computer program, which is used to execute the technical solution of the content processing method in the above embodiment when executed by a processor.
[0215] The computer-readable storage medium may be implemented by any type of volatile or non-volatile memory device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The computer-readable storage medium may be any available medium that can be accessed by a general-purpose or dedicated server.
[0216] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
[0217] Although the present disclosure is disclosed as above in terms of preferred embodiments, it is not intended to limit the present disclosure. Any person skilled in the art may make possible changes and modifications without departing from the spirit and scope of the present disclosure. Therefore, the scope of protection of the present disclosure shall be based on the scope defined by the claims of the present disclosure.
Claims
1. A content processing method, comprising: Step S1: Acquire a plurality of historical content data of positive and negative feedback of social interactions performed by a target user in a first virtual interaction scene, wherein the historical content data includes words or characters of a meaning type representing content, and words or characters of a meaning type representing semantics of the content; Step S2: generating a word vector for representing a word or character in the plurality of historical content data, and a word position vector for representing a position of the word or character in the plurality of historical content data in the plurality of historical content data; Step S3: generating a word type vector for representing the meaning type of words or characters in the plurality of historical content data, and a content position vector for representing the position of each historical content data in the plurality of historical content data; Step S4: generating a user sequence representation of the target user according to the word vector, the word position vector, the word type vector and the content position vector; Step S5: Acquire multiple content sequence representations, and determine a candidate content sequence representation from the multiple content sequence representations based on the similarity between the user sequence representation of the target user and each of the content sequence representations, wherein the content corresponding to the candidate content sequence representation is the candidate content for recommendation to the target user.
2. The method according to claim 1, wherein The word type vector includes attribute type tags for representing words or characters of the semantic meaning type representing content in the multiple historical content data, and attribute value type tags for representing words or characters of the content meaning type representing content in the multiple historical content data.
3. The method according to claim 1, wherein Generating a user sequence representation of the target user according to the word vector, the word position vector, the word type vector, and the content position vector includes: Summing the word vector, the word position vector, the word type vector, and the content position vector to obtain a summation result; Normalizing the summation result to obtain a normalized result; The normalization result is encoded to obtain a user sequence representation of the target user.
4. The method according to claim 1, wherein Steps S2 to S5 include: Inputting the plurality of historical content data into a content processing model obtained through training, so that the content processing model executes steps S2 to S5 according to the plurality of historical content data, and outputs candidate content sequence representations for recommendation to the target user, and similarities between the user sequence representation of the target user and the candidate content sequence representations; The training method of the content processing model includes: Obtaining historical content data training samples corresponding to sample users and labeling results corresponding to the historical content data training samples; The model to be trained is trained according to the historical content data training samples and the labeling results corresponding to the historical content data training samples to obtain the content processing model.
5. The method according to claim 4, wherein The training of the model to be trained based on the historical content data training samples and the labeling results corresponding to the historical content data training samples to obtain the content processing model includes: According to the historical content data training samples and the labeling results corresponding to the historical content data training samples, the model to be trained is jointly trained for the natural language understanding task and the recommendation task to obtain the content processing model.
6. The method according to claim 5, wherein: The step of jointly training the model to be trained for a natural language understanding task and a recommendation task based on the historical content data training samples and the labeling results corresponding to the historical content data training samples to obtain the content processing model includes: Inputting the historical content data training sample into the model to be trained, so that the model to be trained outputs a prediction result corresponding to the historical content data training sample; Determining, based on the labeling results and prediction results corresponding to the historical content data training samples, a function value of a first objective function of the model to be trained for the natural language understanding task, and a function value of a second objective function of the model to be trained for the recommendation task; According to the function value of the first objective function and the function value of the second objective function, the parameters of the model to be trained are adjusted to obtain the content processing model.
7. The method according to claim 5, wherein: The natural language understanding task includes a masked language modeling task; the recommendation task includes an item-item contrastive learning task.
8. The method according to claim 4, wherein: Obtaining a historical content data training sample corresponding to the sample user includes: Acquire a first historical content data sample of social interaction feedback provided by the sample user in the first virtual interaction scene, and a second historical content data sample of social interaction feedback provided by the user in the second virtual interaction scene; The first historical content data sample is data enhanced based on the second historical content data sample to obtain the historical content data training sample.
9. The method according to claim 8, wherein The performing data enhancement on the first historical content data sample according to the second historical content data sample includes: Performing data enhancement on a first historical content data sample in which the sample user provided positive feedback on social interactions in the first virtual interaction scenario, based on a second historical content data sample in which the sample user provided positive feedback on social interactions in the second virtual interaction scenario; and / or, Data enhancement is performed on the first historical content data sample in which the sample user provided negative feedback on social interaction in the first virtual interaction scenario based on the second historical content data sample in which the sample user provided negative feedback on social interaction in the second virtual interaction scenario.
10. The method according to claim 8, wherein The performing data enhancement on the first historical content data sample according to the second historical content data sample includes: One target sample element is extracted from the second historical content data sample, and the target sample element is added to the first historical content data sample.
11. The method according to claim 8, wherein The performing data enhancement on the first historical content data sample according to the second historical content data sample includes: One target sample element is extracted from the second historical content data sample, and one sample element in the first historical content data sample is replaced with the target sample element to obtain the content data training sample.
12. A content recommendation method, comprising: Processing candidate content for recommendation to a target user using a preset processing strategy to obtain content to be recommended for the target user, wherein the candidate content is content corresponding to the candidate content sequence representation according to any one of claims 1 to 11; Recommend the content to be recommended to the target user.
13. A content processing device, comprising: a historical content data acquisition module configured to acquire a plurality of historical content data of positive and negative feedback of social interactions performed by the target user in the first virtual interaction scene, wherein the historical content data includes words or characters of a meaning type representing content and words or characters of a meaning type representing semantics of the content; a first vector generating module configured to generate a word vector for representing a word or a character in the plurality of historical content data, and a word position vector for representing a position of the word or the character in the plurality of historical content data in the plurality of historical content data; a second vector generating module configured to generate a word type vector for representing a meaning type of a word or character in the plurality of historical content data, and a content position vector for representing a position of each historical content data in the plurality of historical content data; A user sequence representation generating module is configured to generate a user sequence representation of the target user based on the word vector, the word position vector, the word type vector and the content position vector; The candidate recommended content determination module is configured to obtain multiple content sequence representations and determine a candidate content sequence representation from the multiple content sequence representations based on the similarity between the user sequence representation of the target user and each of the content sequence representations, wherein the content corresponding to the candidate content sequence representation is the candidate content for recommendation to the target user.
14. An electronic device comprising: a processor, a memory, and computer program instructions stored on the memory and executable on the processor; When the processor executes the computer program instructions, it implements the content processing method according to any one of claims 1 to 11 and / or the content recommendation method according to claim 12.
15. A computer-readable storage medium, wherein computer program instructions are stored in the computer-readable storage medium, and when the computer program instructions are executed by a processor, they are used to implement the content processing method as described in any one of claims 1 to 11 above, and / or the content recommendation method as described in claim 12.
Citation Information
Patent Citations
Title text processing method and device, electronic equipment and storage medium
CN111507097A
Content recommendation method, device and equipment and storage medium
CN111680217A
Content recommendation method, device and equipment and readable storage medium
CN111831924A
Recommendation method and device based on multi-hop sub-network, equipment and storage medium
CN117312674A
Machine learning-based user selection prediction based on sequence of prior user selections
US20230351225A1
Cited By
Content reasoning system and electronic device
CN122264133A