Page skin recommendation methods, devices, computer equipment, and storage media
By combining translation models, graph neural networks, and long short-term memory networks to generate page skin recommendations, the problem of insufficient user interaction experience is solved, and accurate recommendations of personalized page skins and rapid adaptation to holidays are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-08
- Publication Date
- 2026-03-13
AI Technical Summary
Existing technologies struggle to recommend personalized page skins based on users' social relationships during holidays or special periods, resulting in an inadequate user interaction experience.
By acquiring historical data of target users, and utilizing pre-trained translation models and graph neural network models, combined with long short-term memory network models, page skin recommendations that match user preferences and social relationships are generated. This includes the fusion of embedding vectors of social relationship triples and page skin attribute triples, and the extraction of neighborhood information using graph convolutional neural network models to generate page background images.
It enables precise recommendation of page skins based on users' social relationships and historical preferences, improving the user interaction experience and reducing the cost and time of repeated page development during holidays.
Smart Images

Figure CN115062219B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and in particular to methods, apparatus, computer equipment, and storage media for recommending page skins. Background Technology
[0002] With the rapid development of the Internet, users have higher and higher requirements for interactive experience. Currently, many scenarios require the development of systems, web pages and other applications with multiple themes to enrich the visual effects.
[0003] Meanwhile, knowledge graphs are often used to represent social networks. A social network refers to a network system formed by social relationships among individual members of society. A knowledge graph is a semantic network that describes various entity concepts and their relationships in the real world. For a social network represented by a knowledge graph, nodes represent entities such as objects, and edges represent social relationships.
[0004] During holidays or special periods, users' preferences for page images can be determined based on their social relationships, and the page images can then be changed accordingly. Summary of the Invention
[0005] Based on this, a method, apparatus, computer device, and storage medium for recommending page skins are provided.
[0006] The first aspect provides a method for recommending page skins, including:
[0007] Acquire historical data of the target user, including the triplet related to the target user in the skin user map and the target user's historical page skins within a preset historical time period;
[0008] The triple is input into a preset page recommendation model to obtain the first embedding vector corresponding to the triple;
[0009] Input the historical page skin into the page recommendation model to obtain the second embedding vector corresponding to the historical page skin;
[0010] The page recommendation model obtains page skin recommendations for the target user based on the first embedding vector and the second embedding vector.
[0011] Based on the recommended page skin, a page background image matching the image information is generated.
[0012] In some embodiments, the page recommendation model includes a pre-trained translation model and a pre-trained graph neural network model;
[0013] The step of inputting the triplet into a preset page recommendation model to obtain the first embedding vector corresponding to the triplet includes:
[0014] Each node of the triple is represented as a vector to obtain the semantic vector corresponding to the triple; wherein each triple includes a head node, a relation, and a tail node, and the semantic vector includes: the head node vector of the head node, the relation vector of the relation, and the tail node vector of the tail node;
[0015] The semantic vector is input into the translation model to obtain a first embedding vector containing node-related information.
[0016] The graph neural network model performs multiple convolution operations on the embedding vector based on the neighborhood information of the nodes in the triplet to obtain the updated first embedding vector.
[0017] In some embodiments, the page skin recommendation method further includes: pre-training the translation model; wherein, pre-training the translation model includes:
[0018] Extract training triples related to training users from the skin user graph;
[0019] Determine the training semantic vector of the training triples;
[0020] According to the preset projection matrix, the head node vector and tail node vector of the training semantic vector are projected onto the corresponding relation space to obtain the positive sample triple vector, which includes: head node projection vector, relation vector and tail node projection vector.
[0021] The head node projection vector of the positive sample triplet vector is randomly replaced with the head node projection vector of other positive sample triplet vectors, and the tail node projection vector of the positive sample triplet vector is randomly replaced with the tail node projection vector of other positive sample triplet vectors, thus obtaining the negative sample triplet vector.
[0022] The positive sample triple vector and the negative sample triple vector are input into the translation model, and the translation model is optimized and trained according to the first loss function, wherein the first loss function represents the correlation between nodes in the triple.
[0023] In some embodiments, generating a page background image that matches the image information based on the page skin recommendation includes:
[0024] Based on the recommended page skin, obtain the image pixel information of the replaced page background color;
[0025] The image pixel information is sampled to obtain the first image pixel information;
[0026] The pixel information of the first image is filtered by the intensity values of the three preset color channels to obtain the pixel information of the second image.
[0027] By using the three color channels in the RGB color mode, the intensity values of the three color channels of the second image pixel information are weighted and averaged to obtain the page background color.
[0028] In some embodiments, after obtaining the page background color, the method further includes:
[0029] The obtained page background color is processed to generate a page background image that matches the image information.
[0030] In some embodiments, the page recommendation model includes a long short-term memory network model;
[0031] Inputting the historical page skin into the page recommendation model yields a second embedding vector corresponding to the historical page skin, including:
[0032] The historical page skin data is normalized.
[0033] The normalized data after normalization is input into the Long Short-Term Memory network model to obtain the second embedding vector corresponding to the historical page skin.
[0034] In some embodiments, the page recommendation model includes a fully connected layer with a linear activation function;
[0035] The step of obtaining the page skin recommendation for the target user based on the first embedding vector and the second embedding vector through the page recommendation model includes:
[0036] The concatenated vector of the first embedding vector and the second embedding vector is input into the fully connected layer with a linear activation function to obtain the page skin recommendation for the target user.
[0037] The second aspect provides a page skin recommendation device, including:
[0038] The data input unit is used to acquire the historical data of the target user, the historical data including the triplet related to the target user in the skin user map and the historical page skins of the target user within a preset historical time period;
[0039] The first vector representation unit inputs the triplet into a preset page recommendation model to obtain the first embedding vector corresponding to the triplet;
[0040] The second vector representation unit inputs the historical page skin into the page recommendation model to obtain the second embedding vector corresponding to the historical page skin;
[0041] The result output unit obtains the page skin recommendation for the target user based on the first embedding vector and the second embedding vector through the page recommendation model.
[0042] A third aspect provides a computer device including a memory and a processor, the memory storing computer-readable instructions that, when executed by the processor, cause the processor to perform the steps of the page skin recommendation method described above.
[0043] The fourth aspect provides a storage medium storing computer-readable instructions, which, when executed by one or more processors, cause the one or more processors to perform the steps of the page skin recommendation method described above.
[0044] The aforementioned page skin recommendation method, apparatus, computer equipment, and storage medium first acquire historical data of the target user. This historical data includes triples related to the target user in the skin user graph and the target user's historical page skins within a preset historical time period. Then, the triples are input into a pre-set page recommendation model to obtain a first embedding vector corresponding to the triples. The historical page skins are then input into the page recommendation model to obtain a second embedding vector corresponding to the historical page skins. Finally, the page recommendation model uses the first and second embedding vectors to obtain the target user's page skin recommendation. Therefore, in terms of feature construction, it integrates skin user graph relationship triple features and user preference sequence features, which can fully represent user influence relationships and user preference information, improving the model's learning ability. The page recommendation model can effectively extract graph node and relationship information. Secondly, each sequence data uses two LSTM layers to construct sequence embedding features. The model closely matches the data features, learns more hidden information, and creatively proposes fusing social relationship features that integrate skin user graph neighborhood information with historical page skin features, which can more accurately predict and infer user page preferences. Attached Figure Description
[0045] Figure 1 This is a flowchart of a page skin recommendation method provided in one embodiment;
[0046] Figure 2 The TransR model based on social relationships is used to learn triplet node and relation vector embeddings for the page skin recommendation method provided in one embodiment;
[0047] Figure 3 This is a structural block diagram of a page skin recommendation device in one embodiment;
[0048] Figure 4 This is a block diagram of the internal structure of a computer device in one embodiment. Detailed Implementation Manner
[0049] To make the objectives, technical solutions and advantages of the present invention clearer and more understandable, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0050] It can be understood that the terms "first", "second", etc. used in this application can be used herein to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from another element. For example, without departing from the scope of this application.
[0051] Such as Figures 1 to 4 shown, the page skin recommendation method provided in one embodiment, such as Figure 1 , may specifically include the following steps:
[0052] Step 101: Obtain the historical data of the target user. The historical data includes triples related to the target user in the skin user graph and the historical page skins of the target user within a preset historical time period.
[0053] In this embodiment, the original data for page recommendation mainly includes triples of the target user in the skin user graph and the historical page skins of the target user within a preset historical time period. The page skin presented on the page is a picture of the page, but the data stored in the background is skin parameters, which can be understood as the parameter information required to generate the skin on the page. For example, it can be the attribute information of the page skin, such as the name of the page skin and the style information of the page skin. The historical page skin is the attribute information of the skin presented on the user's historical page.
[0054] Among them, the triples include social relationship triples and skin attribute triples. The social relationship triples are used to represent the social relationships between the target user and other users in the skin user graph. For example, <target user, general friend, Zhang San>. The skin attribute triples are used to represent the usage situation of the page skin. For example, <skin A, being used by Li Si, downloaded 3000 times>.
[0055] A knowledge graph is a very large semantic network system. Its main purpose is to describe the association relationships between entities or concepts in the real world. Traditional knowledge graph representation methods use ontology languages such as OWL and RDF for description. With the development and application of deep learning, knowledge representation learning can map the entities and relationships in the knowledge graph into a low-dimensional dense vector space. The vector representation helps machine learning to understand the semantics existing between entities and relationships.
[0056] The user graph for skins here differs from traditional social networks. Traditional social networks are built based on user follows and whether they are friends; nodes in the network are simply users, and edges between nodes represent relationships between users. This user graph for skins is built based on certain user attributes, such as user's location (city), topics of interest, and age group. Users, locations, age groups, and topics are all nodes, and nodes are connected by edges.
[0057] In some embodiments, step 101 above may include:
[0058] Extract attribute triples and relation triples of the target user from the skin user graph. The attribute triples represent the target user's inherent characteristics, and the relation triples represent the page images used by the target user at a specific time.
[0059] Step 102: Input the triplet into the preset page recommendation model to obtain the first embedding vector corresponding to the triplet;
[0060] The triple includes a head node, a relation, and a tail node, and the first embedding vector corresponding to the triple includes a head node vector, a relation vector, and a tail node vector.
[0061] In this step, the page recommendation model obtains the first embedding vector based on the target user's triples, and thus the first embedding vector contains social relationship information.
[0062] In some embodiments, the page recommendation model may include a pre-trained translation model and a pre-trained graph neural network model;
[0063] Step 102 above may include:
[0064] Step 102a1: Represent each node of the triple as a vector to obtain the semantic vector corresponding to the triple; wherein, each triple includes a head node, a relation and a tail node, and the semantic vector includes: the head node vector of the head node, the relation vector of the relation and the tail node vector of the tail node.
[0065] In this step, the head node, tail node, and relation in the triple are converted into vector form, which contains the semantic information of the nodes in the triple. In one application scenario, a vector embedding representation is trained for each entity node (head node, tail node) and relation node in the triple using a word embedding layer.
[0066] Step 102a2: Input the semantic vector into the translation model to obtain the first embedding vector containing node-related information;
[0067] Understandably, the translation model uses the TransR model to learn the vector embeddings of each node and relation in the skin user graph. The core idea of the TransR model is to achieve the modeling transformation between entity space and multiple relation spaces, and then learn the vector embeddings of entity nodes and relation nodes in a specific relation space.
[0068] The translation model in this step is a pre-trained translation model. Of course, in some embodiments, the page skin recommendation method also includes: step 100, pre-trained translation model; wherein, step 100 may include:
[0069] Step 100a: Extract training triples related to the training users from the skin user map;
[0070] Among them, there can be multiple users, and it is best to have a target user among them. The training triples are the relation triples and attribute triples of the training users.
[0071] Step 100b: Determine the training semantic vectors for the training triples;
[0072] The process of determining the semantic vector is the same as step 102a1 above, and will not be repeated here.
[0073] Step 100c: Project the head node vector and tail node vector of the training semantic vector onto the corresponding relation space according to the preset projection matrix to obtain the positive sample triple vector. The positive sample triple vector includes: head node projection vector, relation vector and tail node projection vector.
[0074] In this step, for each vectorized relation triple (h,r,t), a projection matrix is set. Projecting entities in the entity space onto the corresponding relation space r, we obtain the projections of entities h and t into the relation space r. , Each triple contains one entity node and one relation node. A dimensional vector, the projection matrix is one After the dimensional matrix is calculated according to the mapping formula, that is, after being transferred from the entity space to the relation space, each head entity and tail entity becomes a vector embedding representation of the relation space, where... The dimension is dimension, The dimension is also The mapping formula is: , .
[0075] Step 100d: Randomly replace the head node projection vector of the positive sample triplet vector with the head node projection vector of other positive sample triplet vectors, and randomly replace the tail node projection vector of the positive sample triplet vector with the tail node projection vector of other positive sample triplet vectors to obtain the negative sample triplet vector.
[0076] In this step, negative sample triples are formed by randomly replacing the head and tail nodes of different relation spaces, and the node vector embedding representation of the negative sample triples in the relation space is obtained by following the above steps.
[0077] Step 100e: Input the positive sample triple vector and the negative sample triple vector into the translation model, and optimize and train the translation model according to the first loss function, where the first loss function represents the correlation between nodes in the triple.
[0078] In this step, positive and negative triplet pairs are input into the model for training. The model loss function is shown in the formula. The smaller the loss function, the closer the vector sum of the head node embedding and the relation node embedding in the relation space is to the sum of the tail node embedding. In other words, the stronger the node vector embedding representation ability of the TransR model training is. The loss function is shown below.
[0079]
[0080] In the formula, This represents a positive sample triple. Let P represent the set of positive triples and N represent the set of negative triples. For hyperparameters, .
[0081] The above model can output node vector embeddings that imply social relationships, enabling better learning of vector embedding representations of entity nodes and relationship nodes in knowledge graphs. This allows head and tail entities with a specific relationship in a particular relationship space to be close together, while head and tail entities without such a relationship are far apart. .
[0082] Step 102a3: Using a graph neural network model, perform multiple convolution operations on the embedding vector based on the neighborhood information of the triplet nodes to obtain the updated first embedding vector.
[0083] In this step, the first embedding vector containing skin user graph relationships, which has been trained by the TransR model, is input into the graph convolutional neural network model (GAT) based on the attention mechanism function to generate the first embedding vector that integrates first-order neighborhood information.
[0084] In some embodiments, step 102a3 above may include:
[0085] Step 102a31: Construct the K-order neighborhood topology matrix of the nodes based on the weights of the edges between the nodes of the triplet;
[0086] It is understandable that, regarding the definition of neighborhood, for a certain node in the skin user graph, the neighbor information with the shortest connection length of 1 is called the first-order neighborhood, and the neighbor information with the shortest connection length of 2 is called the second-order neighborhood. The length of the connection can be understood in this way.
[0087] Step 102a32: Based on the first embedding vector output by the previous convolution operation of each node, the K-order neighborhood topology matrix, and the graph convolution weight parameter matrix, obtain the current first embedding vector of each node.
[0088] Here, the current first embedding vector of each node is the first embedding vector obtained by performing the c-th convolution operation on the topological graph matrix using the graph neural network model, where c is a positive integer greater than 1;
[0089] Step 102a33: Obtain the updated first embedding vector based on the current first embedding vector of each node.
[0090] In this embodiment, for each node (head node, tail node), the topological information of its K-order neighboring nodes is obtained. Information propagation of the K-order structure is performed centered on this node, and the weights of edges between nodes are obtained through a graph attention mechanism during the propagation process. It is assumed that the embedding set of all nodes at the input of the graph attention layer is...
[0091]
[0092] Where K is the number of nodes and D is the dimension of the node features. After passing through a Graph Attention Layer, a new feature vector is output, assuming that the node feature dimension of this feature vector is... (It can be any value), this feature can be represented as
[0093] .
[0094] In some embodiments, step 102a33 above may include:
[0095] Step 102a33A: Apply the weight matrix to the nodes of the triples and calculate the amount of information propagated from the tail node to the head node through the relation.
[0096] One weight matrix is used. The formula (4) is used to calculate how much information is propagated from the tail node t to the head node h through relation r, which describes the importance of the tail node t to the head node h in relation r.
[0097] (4)
[0098] in, For activation function, , , The vector embeddings of the head node, relation, and tail node are represented respectively. Let be the projection matrix under relation r.
[0099] Step 102a33B: Calculate the influence weight of each first-order neighbor node on the current node;
[0100] Then use The formula for calculating the influence weight of each first-order neighbor node on the current node is as follows:
[0101]
[0102] Step 102a33C: The node vector embedding representation is updated with weights by using a linear combination function of the first-order neighborhood.
[0103] Specifically, the node vector embedding representation is updated using a weighted update function based on a linear combination of first-order neighbors. The updated nodes incorporate first-order neighborhood information, and the calculation formula is as follows:
[0104]
[0105] Here, the graph attention layer can improve the ability of nodes to express neighborhood information.
[0106] Step 303: Determine the sequence vector embedding representation of the target user's historical page skin data;
[0107] In this step, the LSTM network layer can be used to learn the vector embedding representation of the user's historical page skin sequence. The LSTM network layer is based on the cell state connection and adds three gate structures, namely forget gate, input gate and output gate, to the cell.
[0108] In some embodiments, the page recommendation model includes a long short-term memory network model;
[0109] Step 103 above may include:
[0110] Step 1031: Normalize the historical page skin data;
[0111] In this step, the Min-Max normalization method is used to standardize the historical page skin sequence, ensuring that all input vector elements have values between 0 and 1. The normalization calculation formula is as follows:
[0112]
[0113] In the formula, For a user's page information sequence, A normalized user preference sequence for a given user. and They are respectively The maximum and minimum values in the range.
[0114] Step 1032: Input the normalized data after normalization into the Long Short-Term Memory network model to obtain the second embedding vector corresponding to the historical page skin.
[0115] In this step, the specific computational process of the Long Short-Term Memory (LSTM) network model may include:
[0116] Step 1: Selectively discard information from the cellular state using the forgetting gate, and then discard the previous long-term memory. To what extent is it preserved? The calculation formula is as follows:
[0117]
[0118] Step 2: Determine the new information to be stored in long-term memory through the input gate. The calculation formula is as follows:
[0119]
[0120] Step 3: Describe the input candidate state at time t, and calculate it using the following formula:
[0121]
[0122] Step 4: Describe the output of the memory cell at time t, calculated using the following formula:
[0123]
[0124] Step 5: Determine the current LSTM output value of the output layer. The calculation formula is as follows:
[0125]
[0126] Step 6: Hidden Layer State The calculation formula is as follows:
[0127]
[0128] The activation function for each gate, the sigmoid function, is as follows:
[0129]
[0130] The activation function tanh for the output of each gate is as follows:
[0131]
[0132] in Let's consider the state of the forget gate at time t. Here is the weight matrix of the hidden states in the forget gate. The weight matrix is the input to the forget gate. Let's consider the state of the forget gate at time t. Let be the weight matrix of the hidden state of the input gate. The weight matrix is the input to the input gate. The output value of the LSTM layer at time t-1 t represents the input value at time t.
[0133] Finally, the user preference sequence trained by the LSTM network layers is retained in the last embedding step. .
[0134] In this embodiment, an LSTM network layer is selected to train the user preference sequence embedding, which makes full use of the long short-term memory cell training method of the LSTM network, and can retain the long and short-term features of the historical page skin sequence.
[0135] Step 104: Input the node embedding representation and sequence vector embedding representation into the page recommendation model to obtain the page recommendation data for the target user.
[0136] In some embodiments, the page recommendation model includes a fully connected layer with a linear activation function;
[0137] Step 104 above may include: inputting the concatenated vector of the first embedding vector and the second embedding vector into a fully connected layer with a linear activation function to obtain the page skin recommendation for the target user.
[0138] This step involves learning node vector embeddings (hembedding) containing neighborhood information from the social graph using the TransR-GAT model, and learning user history page skin sequence vector embeddings (htembedding) using an LSTM network layer. Based on the training results of both, h and ht are fused into an embedding representation of dimension 1x(D+D') through a concat operation. This embedding is then input into a fully connected layer with a single neuron and a linear activation function for training, using the mean squared error loss function.
[0139] The page skin recommendation method in the above embodiments uses TransR and graph convolutional neural network models to integrate knowledge graph relationships into the model, thereby optimizing the model's performance.
[0140] In knowledge graphs, the node and relation vector embedding learning application utilizes the TransR model, which closely matches the graph's relational features, enabling better extraction of node and relational information. Secondly, each sequence of data employs a two-layer LSTM layer for sequence embedding feature construction, ensuring the model closely matches the data characteristics. Overall, in terms of model construction, the structural advantages of TransR-GAT and LSTM models are fully utilized, theoretically allowing for the learning of more hidden information.
[0141] Step 105: Generate a page background image that matches the image information based on the recommended page skin.
[0142] In some embodiments, step 104 above may include:
[0143] Step 1051: Based on the recommended page skin, obtain the image pixel information of the replaced page background color;
[0144] Step 1051: Sample the image pixel information to obtain the first image pixel information;
[0145] Step 1051: Filter the first image pixel information using the intensity values of the three preset color channels respectively to obtain the second image pixel information;
[0146] Step 1051: Using the three color channels in the RGB color mode, perform a weighted average of the intensity values of the three color channels of the second image pixel information to obtain the page background color.
[0147] Furthermore, after obtaining the page background color, the process also includes:
[0148] The obtained page background color is processed to generate a page background image that matches the image information.
[0149] By controlling the RGB and saturation channels of images, and using the color values and saturation ratios of each color channel to change the corresponding colors, and then issuing color conversion ratios from the C-end platform, the page image colors can be controlled to quickly adapt to emergency holiday themes. Specifically, this can be achieved through several methods: constructing an image matrix and matching the current page based on the image matrix and seasonal type; optimizing the page style based on user-defined settings; and modifying page colors through algorithms that change numerical values. This reduces the difficulty of changing page colors, improves the user experience, reduces the cost of repetitive page development, and reduces the time and effort spent by operations teams on replacing page images to create a festive atmosphere during holidays.
[0150] like Figure 3 As shown, in one embodiment, a page skin recommendation device is provided. This page skin recommendation device can be integrated into the aforementioned computer device and may specifically include:
[0151] The data acquisition unit 311 is used to acquire the skin user graph of the target user to be recommended on the page and the historical page skin data. The skin user graph includes attribute triples and relation triples that represent the characteristics of the target user and attribute triples that represent the upstream and downstream social relationships of the target user. Each triple includes a head node, a relation and a tail node.
[0152] The first vector determination unit 312 is used to determine the node vector embedding representation of each triple in the skin user graph.
[0153] The second vector determination unit 313 is used to determine the sequence vector embedding representation of the target user's historical page skin data;
[0154] The result output unit 314 is used to input the node embedding representation and the sequence vector embedding representation into the page recommendation model to obtain the page recommendation data for the target user.
[0155] The page replacement unit 315 is used to generate a page background image that matches the image information based on the page skin recommendation.
[0156] In some embodiments, the page recommendation model includes a pre-trained translation model and a pre-trained graph neural network model;
[0157] The first vector determination unit mentioned above includes:
[0158] The transformation model is used to represent each node of a triple as a vector, thereby obtaining the semantic vector corresponding to the triple; wherein each triple includes a head node, a relation, and a tail node, and the semantic vector includes: the head node vector of the head node, the relation vector of the relation, and the tail node vector of the tail node;
[0159] A graph neural network model is used to input semantic vectors into the translation model to obtain a first embedding vector containing node-related information. The graph neural network model then performs multiple convolution operations on the embedding vector based on the neighborhood information of the nodes in the triplet to obtain an updated first embedding vector.
[0160] In some embodiments, the page replacement unit includes:
[0161] The extraction module is used to obtain the image pixel information of the replaced page background color based on the recommended page skin;
[0162] The sampling module is used to sample the image pixel information to obtain the first image pixel information;
[0163] The filtering module is used to filter the pixel information of the first image using the intensity values of the three preset color channels respectively, so as to obtain the pixel information of the second image.
[0164] The output module is used to perform weighted average processing on the intensity values of the three color channels of the second image pixel information using the three color channels in the RGB color mode to obtain the page background color.
[0165] In some embodiments, the page replacement unit includes: further comprising:
[0166] The color adjustment module is used to process the obtained page background color to generate a page background image that matches the image information.
[0167] In some embodiments, the above page recommendation model includes a long short-term memory network model;
[0168] The second vector determination unit mentioned above includes:
[0169] The normalization module is used to normalize historical page skin data;
[0170] The Long Short-Term Memory (LSTM) network model is used to input normalized data into the LTM network model to obtain the second embedding vector corresponding to the historical page skin.
[0171] In some embodiments, the above-described page recommendation model includes a fully connected layer with a linear activation function;
[0172] The output unit includes a fully connected layer module, which is used to input the concatenated vector of the first embedding vector and the second embedding vector into a fully connected layer with a linear activation function to obtain the page skin recommendation for the target user.
[0173] In one embodiment, such as Figure 4As shown, a computer device is proposed, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. The computer device includes a processor, a storage medium (such as a non-volatile storage medium or a volatile storage medium), a memory, and a network interface connected via a system bus. The non-volatile storage medium of the computer device stores an operating system, a knowledge base, and computer-readable instructions. The knowledge base may store a sequence of control information. When the computer-readable instructions are executed by the processor, they enable the processor to implement a page skin recommendation method. The processor of the computer device provides computational and control capabilities, supporting the operation of the entire computer device. The memory of the computer device may store computer-readable instructions, which, when executed by the processor, enable the processor to execute a page skin recommendation method. The network interface of the computer device is used for communication with a terminal. Those skilled in the art will understand that… Figure 4 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0174] When the processor executes the computer program, it performs the following steps: acquiring historical data of the target user, including triples related to the target user in the skin user map and the target user's historical page skins within a preset historical time period; inputting the triples into a preset page recommendation model to obtain a first embedding vector corresponding to the triples; inputting the historical page skins into the page recommendation model to obtain a second embedding vector corresponding to the historical page skins; obtaining a page skin recommendation for the target user based on the first and second embedding vectors through the page recommendation model; and generating a page background image that matches the image information based on the page skin recommendation.
[0175] In one embodiment, a storage medium storing computer-readable instructions is provided, which, when executed by one or more processors, cause the one or more processors to perform the following steps: acquiring historical data of a target user, the historical data including triples related to the target user in a skin user graph and historical page skins of the target user within a preset historical time period; inputting the triples into a preset page recommendation model to obtain a first embedding vector corresponding to the triples; inputting the historical page skins into the page recommendation model to obtain a second embedding vector corresponding to the historical page skins; obtaining a page skin recommendation for the target user based on the first and second embedding vectors through the page recommendation model; and generating a page background image matching the image information based on the page skin recommendation.
[0176] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0177] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0178] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0179] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0180] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.
[0181] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A page skin recommendation method, characterized by, The method comprises: obtaining historical data of a target user, the historical data comprising triples related to the target user in a skin user graph and historical page skins of the target user in a preset historical time period, nodes in the skin user graph comprising users, hometowns and age groups; inputting the triples into a preset page recommendation model to obtain first embedding vectors corresponding to the triples, the triples comprising skin attribute triples used to represent the use of page skins; inputting the historical page skins into the page recommendation model to obtain second embedding vectors corresponding to the historical page skins; obtaining a page skin recommendation for the target user according to the first embedding vectors and the second embedding vectors through the page recommendation model; generating a page background image matching the page image information according to the page skin recommendation; the page recommendation model comprises a pre-trained translation model and a pre-trained graph neural network model; the inputting of the triples into the preset page recommendation model to obtain the first embedding vectors corresponding to the triples comprises: representing each node of the triples as a vector to obtain semantic vectors corresponding to the triples; wherein each of the triples comprises a head node, a relation and a tail node, and the semantic vectors comprise a head node vector of the head node, a relation vector of the relation and a tail node vector of the tail node; inputting the semantic vectors into the translation model to obtain first embedding vectors containing node-related information; performing multiple convolution operations on the embedding vectors according to neighborhood information of the nodes of the triples through a graph neural network model to obtain updated first embedding vectors; the inputting of the historical page skins into the page recommendation model to obtain the second embedding vectors corresponding to the historical page skins comprises: normalizing the historical page skins; inputting normalized data obtained after the normalization into a long short-term memory network model to obtain the second embedding vectors corresponding to the historical page skins; the obtaining of the page skin recommendation for the target user according to the first embedding vectors and the second embedding vectors through the page recommendation model comprises: inputting a splicing vector of the first embedding vectors and the second embedding vectors into a fully connected layer with a linear activation function to obtain the page skin recommendation for the target user. 2.The page skin recommendation method of claim 1, wherein, The method further comprises pre-training the translation model; wherein the pre-training of the translation model comprises: extracting training triples related to a training user from a skin user graph; determining training semantic vectors of the training triples; projecting head node vectors and tail node vectors of the training semantic vectors into corresponding relation spaces respectively according to a preset projection matrix to obtain positive sample triple vectors, the positive sample triple vectors comprising head node projection vectors, relation vectors and tail node projection vectors; The head node projection vector of the positive sample triple vector is randomly replaced by the head node projection vector of another positive sample triple vector, and the tail node projection vector of the positive sample triple vector is randomly replaced by the tail node projection vector of another positive sample triple vector, to obtain a negative sample triple vector; The positive sample triple vector and the negative sample triple vector are input into a translation model, and the translation model is optimized and trained according to a first loss function, where the first loss function represents the correlation between nodes in the triple. 3.The page skin recommendation method of claim 1, wherein, The page background image matching the page image information is generated according to the page skin recommendation, including: According to the page skin recommendation, the image pixel information of the replaced page background color is obtained; The image pixel information is sampled to obtain first image pixel information; The first image pixel information is filtered by using preset intensity values of three color channels respectively to obtain second image pixel information; The intensity values of the three color channels of the second image pixel information are weighted and averaged respectively by using the three color channels in the RGB color mode to obtain the page background color. 4.The page skin recommendation method of claim 3, wherein, After the page background color is obtained, it further includes: The page background color is processed in tone to generate a page background image matching the image information.
5. A page skin recommendation apparatus, characterized by comprising: Including: A data input unit is configured to obtain historical data of a target user, the historical data including a triple related to the target user in a skin user graph and historical page skin of the target user in a preset historical time period, nodes in the skin user graph including a user, a place of origin, and an age group; A first vector representation unit is configured to input the triple into a preset page recommendation model to obtain a first embedding vector corresponding to the triple, the triple including a skin attribute triple, the skin attribute triple being used to represent a use case of a page skin; A second vector representation unit is configured to input the historical page skin into the page recommendation model to obtain a second embedding vector corresponding to the historical page skin; A result output unit is configured to obtain a page skin recommendation for the target user by the page recommendation model according to the first embedding vector and the second embedding vector; A page changing unit is configured to generate a page background image matching the page image information according to the page skin recommendation; The page recommendation model includes a pre-trained translation model and a pre-trained graph neural network model; The first vector representation unit is further configured to input the triple into the preset page recommendation model to obtain the first embedding vector corresponding to the triple in the following manner: Each node of the triple is represented as a vector to obtain a semantic vector corresponding to the triple; each triple includes a head node, a relationship, and a tail node, and the semantic vector includes a head node vector of the head node, a relationship vector of the relationship, and a tail node vector of the tail node; The semantic vector is input into the translation model to obtain a first embedding vector containing node-related information; and The first embedding vector is input into the graph neural network model to obtain a second embedding vector containing node-related information. obtaining an updated first embedding vector by performing a plurality of convolution operations on the embedding vector according to neighborhood information of nodes of the triple through a graph neural network model; inputting the historical page skin into the page recommendation model to obtain a second embedding vector corresponding to the historical page skin, including: performing normalization processing on the historical page skin; inputting the normalized data into a long short-term memory network model to obtain the second embedding vector corresponding to the historical page skin; obtaining the page skin recommendation of the target user according to the first embedding vector and the second embedding vector through the page recommendation model, including: inputting the splicing vector of the first embedding vector and the second embedding vector into a fully connected layer with a linear activation function to obtain the page skin recommendation of the target user. 6.A computer device, comprising a memory and a processor, wherein the memory stores computer readable instructions, and the computer readable instructions, when executed by the processor, cause the processor to perform steps of the page skin recommendation method according to any one of claims 1 to 4. 7.A storage medium storing computer readable instructions, wherein the computer readable instructions, when executed by one or more processors, cause the one or more processors to perform steps of the page skin recommendation method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Commodity recommendation method and device based on heterogeneous social relation and electronic equipment
CN113379494A
Video recommendation method, system and device and computer readable storage medium
CN114491150A