Suit recommendation method and device, medium and equipment

CN119090585AInactive Publication Date: 2024-12-06BEIJING INFORMATION SCI & TECH UNIV

Patent Information

Application Number
CN202411144975.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-20
Publication Date
2024-12-06
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing set recommendation method is difficult to accurately capture user preferences when dealing with complex fashion items, resulting in unsatisfactory recommendation results.

Method used

Using multi-head attention mechanism module and soft attention mechanism, the advanced semantic characteristics and user interest characteristics of fashionable items are extracted through low-rank attention and hashing technology, and the user's preference score for the set is calculated, reducing calculation costs and improving recommendation accuracy. .

Benefits of technology

It achieves a more comprehensive feature extraction of fashionable items and user preferences, improving the accuracy and personalized effect of set recommendations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119090585A_ABST
    Figure CN119090585A_ABST
Patent Text Reader

Abstract

The invention discloses a suit recommendation method and device, a medium and equipment, and relates to the technical field of product recommendation. Comprising the steps of obtaining compatibility characteristics of an interested suit based on a first multi-head attention mechanism; inputting the user historical network behavior codes and the output of the first attention head into a second multi-head attention mechanism to obtain user interest features; and obtaining user preference scores based on the compatibility characteristics and the user interest characteristics, and recommending the suite according to the sequence of the user preference scores. In order to solve the problem that the preference degree of a user to clothes is inaccurate due to complex matching of different fashion single items in a suit, the method comprises the following steps: extracting the characteristics of the fashion single items in multiple dimensions through a first multi-head attention mechanism module; in the second multi-head attention mechanism module, according to interaction of historical network behaviors of the user and all fashion single items in different dimensions, fashion single item characteristics closely related to the user behaviors are focused on, and preferences of the user on common characteristics of the fashion single items can be accurately captured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of product recommendation, and in particular to a package recommendation method, device, medium and equipment. Background Art

[0002] Personalized fashion set recommendation aims to accurately predict the list of fashion sets that users may be interested in through intelligent algorithms and data analysis, and evaluate the harmony between the clothing and accessories in these sets. This method has wide applications in fashion-centric social networks, online shopping platforms, and micro-video sharing platforms.

[0003] Currently, when recommending a set, features are first extracted from the user's historical behavior and clothing attributes; then the compatibility of the clothing in the set, such as style, function or material, is considered by comparing the similarities between the clothing; finally, the user's preference score for the set is predicted based on the user's preference for the clothing and the compatibility between the clothing.

[0004] However, due to the complex matching of different fashion items in a suit and the numerous and complex features, it may be impossible to accurately obtain the user's preference for clothing, resulting in unsatisfactory final recommendation results. Summary of the invention

[0005] Based on this, it is necessary to provide a package recommendation method, device, medium and equipment to address the above technical problems.

[0006] The present invention adopts the following technical solutions:

[0007] The present invention provides a package recommendation method, comprising:

[0008] Obtain N sets of interested outfits from the user's historical network behavior, where N is a positive integer and each set of interested outfit includes different fashion items.

[0009] Construct a first multi-head attention mechanism module, which includes h parallel first attention heads; digitally encode each fashion item belonging to the i-th set of interest and divide it into h parts, i∈{1,2,...,N}, and input the h parts into the first multi-head attention mechanism module. Each first attention head applies three different weight matrices W Q , W K and W V Generate query vector Q, key vector K and value vector V; based on query vector Q, key vector K and value vector V, each first attention head uses low-rank attention to obtain the representation of each fashion item in the suit of interest

[0010]

[0011] Where X represents the feature vector of fashion items extracted from the text or image related to fashion items; LowRankAttention() is the low-rank attention; softmax() is the activation function; E and F are two different matrices used to transform the key vector K and the value vector V from the dimension R to the value vector V. n×d The feature space is projected to R (n / c)×d In the feature space of to reduce the computational cost, where c is the number of fashion item categories, n is the number of fashion items contained in the suit of interest, and d is the dimension of the fashion item feature vector X; the superscript T represents the transposition operation. The first multi-head attention mechanism module captures the features of each fashion item in multiple dimensions through multiple parallel first attention heads. The output of each first attention head is stacked to extract the high-level semantic features of the fashion item:

[0012] H=LowRankAttention(LowRankAttention(X))

[0013] Among them, X represents the feature vector of fashion items extracted from the text or image related to fashion items; LowRankAttention() is low-rank attention; H represents the high-level semantic features of fashion items; LowRankAttention(LowRankAttention()) represents a stack operation. The high-level semantic features output by each first attention head are concatenated and input into the soft attention mechanism to integrate the features of each fashion item in multiple dimensions. The soft attention mechanism maps the high-level semantic features output by each first attention head into a single compact vector to capture the matching degree between each fashion item in the i-th set of interest, and obtain the compatibility features of the i-th set of interest:

[0014]

[0015] β i =q T σ 2 (W 1 z+W 2 h i +c)

[0016] Among them, SoftAttention() represents the soft attention mechanism; z represents the vector used for training; h i represents the output of the first attention head of the i-th node; q represents the query vector; σ 2 is an S-shaped function; W 1 and W 2 are the learnable parameter matrices respectively.

[0017] Construct a second multi-head attention mechanism module, and splice the high-level semantic features of fashion items and the digital encoding of the user's historical network behavior output by multiple parallel first attention heads and input them into the second multi-head attention mechanism module. The second multi-head attention mechanism module captures the interactive information of the user's historical network behavior and each fashion item in different dimensions through multiple parallel second attention heads. The interactive information is used as the user interest feature of the i-th set of interest:

[0018]

[0019] Among them, (i) represents the user interest feature of the i-th set of interested suits, MultiHead() represents the second multi-head attention mechanism module; u represents the digital encoding of the user's historical network behavior; and They represent the weight matrices used to generate the query vector, key vector, and value vector in the second multi-head attention mechanism module, respectively.

[0020] Hash technology is used to map the real-valued vector of compatibility features to the {0,1} space:

[0021]

[0022] Among them, b i (c) is the compatibility feature of the i-th set of interest, Clip(b i (c) ,0,1) function is used to convert b i (c) Map to the {0,1} space; "" represents the rounding symbol. Use Hash technology to map the real-valued vector of user interest features to the {1,-1} space:

[0023]

[0024] Among them, i (c) is the user interest feature of the i-th set of interest, Sign(o i (c) ) function is used to convert o i (c) Map to the {1,-1} space; construct a user preference model based on the compatibility feature binary code and the user preference representation binary code:

[0025]

[0026]

[0027] in, Indicates that user u is interested in the i-th set Oi User preference scores; Indicates that user u is interested in the i-th set O i A user interest score of , the user interest score comprising a visual feature interest score of the i-th interested suit and a text interest score of the i-th interested suit; Indicates that user u is interested in the i-th set O i The fashion score of , α is the fashion attention factor; represents the binary code of the compatibility feature of the i-th set of interest, The user preference of the i-th set of interest is represented by a binary code, and the superscript T represents the transposition operation; Λ (i) and Λ (c) is a diagonal matrix used to perform vector transformation; softmax() is the activation function.

[0028] A user preference score of the i-th set of interest is obtained based on the compatibility feature of the i-th set of interest and the user interest feature of the i-th set of interest; user preference scores of all sets of interest are obtained, and all sets of interest are recommended according to the order of the user preference scores.

[0029] The present invention provides a package recommendation device, comprising:

[0030] A data acquisition module is used to obtain N sets of suits of interest from the user's historical network behavior, where N is a positive integer and each set of suits of interest includes different fashion items;

[0031] A compatibility feature acquisition module is used to construct a first multi-head attention mechanism module, digitally encode each fashion item belonging to the i-th set of interest and input it into the first multi-head attention mechanism module, i∈{1,2,...,N}, and capture the features of each fashion item in multiple dimensions through multiple parallel first attention heads; and splice the outputs of multiple parallel first attention heads to obtain the features of each fashion item in multiple dimensions, and fuse the features of each fashion item in multiple dimensions as the compatibility features of the i-th set of interest;

[0032] A user interest feature acquisition module is used to construct a second multi-head attention mechanism module, which digitally encodes the user's historical network behavior and simultaneously inputs it into the second multi-head attention mechanism module together with the output of multiple parallel first attention heads, and captures the interaction information between the user's historical network behavior and each fashion item in different dimensions through multiple parallel second attention heads. The interaction information is used as the user interest feature of the i-th set of interested suits;

[0033] The recommendation module is used to obtain the user preference score of the i-th set of interested suits based on the compatibility characteristics of the i-th set of interested suits and the user interest characteristics; and to obtain the user preference scores of all interested suits in sequence, and to recommend all interested suits according to the order of the user preference scores.

[0034] The present invention provides a computer-readable storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the package recommendation method is implemented.

[0035] The present invention provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the package recommendation method is implemented when the processor executes the program.

[0036] At least one of the above technical solutions adopted by the present invention can achieve the following beneficial effects:

[0037] In the set recommendation method provided by the present invention, the features of fashion items in multiple dimensions are extracted by using the first multi-head attention mechanism module, thereby achieving more comprehensive fashion item feature extraction; after obtaining the features extracted by each head, these features are combined with the user's historical network behavior and input into the second multi-head attention mechanism module. The second multi-head attention mechanism module focuses on the features of fashion items that are closely related to the user's behavior based on the interaction between the user's historical network behavior and each fashion item in different dimensions, and can accurately capture the user's preference for the common features of fashion items, thereby generating a preference representation that can reflect the user's personalized needs, thereby improving the accuracy of set recommendations. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0039] Figure 1 A schematic diagram of a package recommendation method provided by the present invention;

[0040] Figure 2 A schematic diagram of the network framework of PA-FHNet provided by the present invention;

[0041] Figure 3 A flow chart for obtaining compatibility characteristics of a package of interest provided by the present invention;

[0042] Figure 4 A flow chart of obtaining user preference scores provided by the present invention. DETAILED DESCRIPTION

[0043] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in combination with the specific embodiments of the present invention and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the specification, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0044] The personalized fashion set recommendation system aims to predict a list of fashion sets that a user is interested in and evaluate whether the clothes and accessories in the set go well together. Research shows that solving both recommendation accuracy and retrieval performance is crucial for fashion recommendation, which is also a new problem. Existing solutions face three main challenges: First, existing solutions ignore learning hash codes for outfit embeddings, which can better model compatibility features than item pairs, where items refer to fashion items in a set, while item pair methods use complex pairwise multiplications to traverse all possible combinations. Second, existing solutions do not fully utilize user interests. Interest in fashion includes the overall perception of the entire set of clothing and the stimulation of "star" items. Third, existing solutions have difficulty learning hash codes that adapt to different semantic functions. Compatibility embedding describes the possibility of clothing composed of items, while preference embedding reveals the characteristic distribution of user interests. Treating the two hash codes equally may lead to the loss of important information and beneficial signals.

[0045] Based on this, this embodiment proposes a new task called hash-based FHR (Fashion hashing Recommendation), which is based on three assumptions: (1) A large fashion project library leads to a large scale of fashion set products and user-set interaction records; (2) User-clothing interaction behavior is jointly determined by user interests and set fashion features; (3) User interests can be decomposed into interest in the overall fashion set and the attraction of clothing items to it. Based on this task, this embodiment proposes a new PA-FHNet (Preference-aware fashion hash embedding network) to efficiently and accurately complete the FHR task. First, PA-FHNet uses a novel low-level fashion attention to learn high-level fashion relations and simulate unified compatibility embedding at low cost. Secondly, PA-FHNet also uses a preference-aware attention mechanism to learn user embeddings to capture the attractiveness of popular items. Finally, PA-FHNet uses a differential hashing binarization strategy to adapt to the different output distributions of the compatibility digital encoder and the user preference digital encoder. The network framework diagram of the PA-FHNet is shown in the figure. Figure 2As shown in FIG. 1 , the network structure of PA-FHNet includes a feature extraction module, a suit and user digital encoding module, and a hash digital encoding module connected in sequence. The feature extraction module uses a CNN (Convolutional Neural Networks) feature digital encoder to digitally encode the visual modality data or text modality data of n fashion items belonging to the i-th suit of interest input into the network to obtain the digital encoding results of each fashion item. The suit and user digital encoding module uses the first multi-head attention mechanism module based on the low-rank attention mechanism to extract features from each fashion item, and the dimension has been reduced from R n×d Down to R (n / c)×d At the same time, the high-level semantic features of each fashion item are extracted through stacking operations, and the high-level semantic features output by each first attention head are spliced ​​and input into the soft attention mechanism. The soft attention mechanism maps the high-level semantic features output by each first attention head into a single compact vector to obtain the compatibility feature O of the i-th set of interest. (c) The result of the stack operation and the digital encoding vector of the user's historical network behavior are simultaneously input into the second multi-head attention mechanism module to obtain the user interest feature O (i) The hash digital coding module uses hash digital coding technology to convert the compatibility feature O (c) Mapped to the {-1,1} space, the user interest feature O (i) Mapped to the {0,1} space, based on the hash digital encoding result, the set O that user u is interested in for the i-th set is obtained i User preference score

[0046] Figure 1 The process of the package recommendation method based on PA-FHNet provided in this embodiment is shown. Figure 1 The recommended method for this package is described in detail, which specifically includes the following steps:

[0047] S1: Obtain N sets of interested outfits from the user's historical network behavior, where N is a positive integer, and each set of interested outfits includes different fashion items. The user's historical network behavior includes the user's click, browse, collect, like, comment and purchase behaviors on the products.

[0048] S2: Construct a first multi-head attention mechanism module, digitally encode each fashion item belonging to the i-th set of interest and input it into the first multi-head attention mechanism module, i∈{1,2,...,N}, and capture the features of each fashion item in multiple dimensions through multiple parallel first attention heads; and splice the outputs of multiple parallel first attention heads to obtain the features of each fashion item in multiple dimensions, and fuse the features of each fashion item in multiple dimensions as the compatibility features of the i-th set of interest. Figure 3 To obtain a flowchart of the compatibility characteristics of the set of interest, the following specific Figure 3 Detailed description of the process for obtaining compatibility characteristics for packages of interest, including:

[0049] S201: Use the first multi-head attention mechanism module based on the low-rank attention mechanism to extract features of each fashion item.

[0050] In the FHR task, the candidate clothing scores are determined by two factors: compatibility and interest. The paired item method roughly approximates the compatibility of the entire outfit with item-level pairwise relationships, which makes it difficult for the model to exploit high-order relationships between fashion items and also requires a complex process of dot product multiplication between items. This embodiment extracts compatibility features and high-level dependencies from the entire outfit as a whole, avoids the complex pairwise vector multiplication process, and adopts an attention mechanism to model a unified clothing compatibility vector. However, in view of the high quadratic time complexity of the self-attention mechanism, this embodiment does not use scaled dot products to capture high-order relationship information in clothing at low cost, but instead designs a low-rank fashion attention to approximate the linear learning cost. The first multi-head attention mechanism module based on low-rank fashion attention is: each first attention head applies three different weight matrices W respectively. Q , W K and W V Generate query vector Q, key vector K∈R n×d The sum vector V∈R n×d Each first attention head uses low-rank attention to obtain the representation of each fashion item in the set of interest

[0051]

[0052] Where X represents the feature vector of fashion items extracted from the text or image related to fashion items; LowRankAttention() is the low-rank attention operation; softmax() is the activation function; E and F are two different matrices used to transform the key vector K and the value vector V from the dimension R to the value vector V. n×d The feature space is projected to R (n / c)×dIn the feature space of to reduce the computational cost, c is the number of fashion item categories, n is the number of fashion items contained in the suit of interest, d is the dimension of the fashion item feature vector X; the superscript T indicates the transposition operation. More specifically:

[0053] First, get the query vector Q and key vector K∈R n×d The sum vector V∈R n×d : Given n item features X∈R in the set of interest n×d (extracted from the text or image of the item), the fashion feature vector X∈R n×d Linearly mapped to 3 different data spaces, each first attention head applies three different weight matrices W Q , W K and W V , obtain the query vector Q and key vector K∈R n×d The sum vector V∈R n×d :

[0054] Q=XW Q , K = XW K , V = XW V .

[0055] Different from the previous method of using scaled dot products of paired fashion items to obtain attention and model compatibility, this embodiment uses low-rank factorization to capture the fashion associations between items. Specifically, two projection matrices E and F are introduced to convert key-value pairs into low-rank embedding representations. Then, the fashion attention factor α can be calculated using the following formula:

[0056]

[0057] The embedding of fashion items after integrating relational information is:

[0058]

[0059] Among them, E and F are used to convert K∈R n×d and V∈R n×d Projection to dimension R (n / c)×d n / c represents the number of low-level fashion spaces on clothing, which can be considered as a low-rank factorization of the scaled dot product of the self-attention operation. Therefore, the size of the low-rank is R n×(n / c) , instead of the previous self-attention R n×n Clothing can be viewed as a positionless sequence of items of different fashion types. The computational cost of compatibility modeling can range from O(n×n) to O(n×n / c). Usually, n>>n / c can be found in clothing recommendation scenarios. n is usually greater than c, for example, there is more than one top, such as a coat, underwear, and shirt; there is more than one bottom, such as leggings and skirts.

[0060] S202: Perform a stack operation on the output of the first multi-head attention mechanism module to extract high-level semantic features of each fashion item. Specifically:

[0061] A multi-head computing strategy is used to stably capture high-order fashion relationships between items and develop the robustness of fashion features. Different projection matrices are used to linearly project queries, keys, and values ​​h times to jointly process information from different representation subspaces:

[0062] Multihead(X)=Concat(head 1 ,...,head h )W o

[0063] head i =LowRankAttention(XW Qi ,XW Ki ,XW Vi )

[0064] Among them, head 1 ~head h are h first attention heads, Concat() represents the concatenation and fusion operation; W Qi , W Ki , W Vi and W o is the learnable parameter matrix.

[0065] The association relationship between any pair of items in clothing is learned through the LowRankAttention layer in the multi-head attention network layer. This approach is different from existing studies that only use paired items to estimate scores and further enhances the representation of pairwise relationship information. The low-rank attention layer is also organized through a stack operation to learn high-order relationships between items:

[0066] H=LowRankAttention(LowRankAttention(X))

[0067] Among them, LowRankAttention(LowRankAttention()) represents the stack operation, and H represents the high-level semantic features of fashion items.

[0068] S203: Input the stack operation result into the soft attention mechanism to obtain the compatibility feature O of the set of interest (c) .

[0069] In order to obtain the compatibility features, a pooling operation based on a soft attention mechanism is used to map n fashion items to a single compact vector, resulting in a unified embedding that describes the fashion features of the clothing itself. No position information is used, and the item arrangement is considered to be irrelevant to clothing compatibility. The clothing O can be obtained by calculating the fashion soft attention mechanism pool (c) Compatibility features of unified embedding:

[0070] O (c) =LayerNorm(s+σ 1 (s))

[0071] s=LayerNorm(z+SoftAttention(z,H,H))

[0072] Where z is a single trainable vector and σ 1 is the activation function, and LayerNorm() indicates that the multi-head attention network layer performs an average operation on the input. The reason for using the soft attention mechanism to perform pooling is that it can greatly simplify the calculation and avoid interactions between multiple heads. Specifically, the process of using the soft attention mechanism to aggregate into a single embedding is as follows:

[0073]

[0074] β i =q T σ 2 (W 1 z+W 2 h i +c)

[0075] Where SoftAttention() represents the soft attention mechanism; z represents the vector used for training; h i represents the output of the first attention head of the i-th node; q represents the query vector; σ 2 is an S-shaped function; W 1 and W 2 are the learnable parameter matrices, and c is the number of fashion item categories.

[0076] S3: Construct a second multi-head attention mechanism module, digitally encode the user's historical network behavior, and input it into the second multi-head attention mechanism module simultaneously with the output of multiple parallel first attention heads. Through multiple parallel second attention heads, the interaction information between the user's historical network behavior and each fashion item in different dimensions is captured, and the interaction information is used as the user interest feature of the i-th set of interest.

[0077] The user's choice may be influenced by a small number of fashion items, such as visual stimulation, prominent titles, etc. Many people will buy a whole set for a certain piece of clothing. Therefore, we imitate the process of local items of representative styles to hit the user's interest and make them want to buy, and aggregate the fashion features of items according to the degree of interest to represent the user's annoying reaction to some important items. The second multi-head attention mechanism module is used to map the interest relationship between users and items and use it as the user interest feature O. (i) :

[0078]

[0079] Among them, (i) represents the user interest feature of the i-th set of interested suits, MultiHead() represents the second multi-head attention mechanism module; u represents the digital encoding of the user's historical network behavior; and They represent the weight matrices used to generate the query vector, key vector, and value vector in the second multi-head attention mechanism module, respectively.

[0080] S4: Based on the compatibility feature of the i-th set of interested packages and the user interest feature, obtain the user preference score of the i-th set of interested packages; and obtain the user preference scores of all interested packages in sequence, and recommend all interested packages according to the order of the user preference scores. Figure 4 To obtain the flowchart of user preference scores, the following is a specific combination Figure 4 The process of obtaining the user preference score is described in detail, including:

[0081] S401: Using Hash technology, convert the compatibility characteristics and user interest characteristics of the i-th set of interested packages into binary codes respectively.

[0082] For the binary constrained objective function optimization problem, the real-valued vectors of fashion clothing are mapped to the Hamming space using the signs of continuous variables. The Hamming space is a vector space composed of binary vectors, where each dimension can only take 0 or 1, and the symbolic operation is approximated by the activation function in the neural network:

[0083] b (i) =sign(O (i) ), b (c) =sign(O (c) )

[0084]

[0085] Among them, O (c) is the compatibility feature of the package of interest, O (i) is the user interest feature of the interested set, sign() is the activation function, b (c)and b (i) They are the compatibility feature binary code and the user preference representation binary code; tanh() is the inverse trigonometric function, δ t is a scalar used for weighted hashing. During the optimization process, its value increases with the number of iterations or time t. When the optimization is finished, and will converge to the binary code b (c) and b (i) .

[0086] For the output distribution of fashion binary code mismatch, it is found that the preference feature describes the fashion attributes of user preferences, and the output distribution of activation has both positive and negative values. However, the compatibility feature is the probability of an item forming a stable match, and its output is always a value. Obviously, it is unreasonable to map the activation to the space of {-1,1} by weighted tanh(). The core idea of ​​the differential hashing strategy is to map the non-negative activation layer to the {0,1} space, and binarize the activation layer with positive and negative extraction to the {-1,+1} space.

[0087] For the neural network layer that perceives user interests, the output distribution has positive and negative values. The real-valued vector is converted to binary using the activation function symbol:

[0088]

[0089] Among them, i (c) is the user interest feature of the i-th set of interest, Sign(o i (c) ) function is used to convert the real-valued vector o of the user interest features of the i-th set of interest i (c) Mapped to {1,-1} space. The output distribution of the neural network layer with positive and negative values ​​includes the fashion item image feature extraction layer, text feature extraction layer, (key K, value Q, query V) that perceives user interests, the user's unique hot embedding representation and the user interest preference extraction layer. For the neural network layer that performs compatibility feature extraction, its output distribution is non-negative, and the real-valued vector is binarized into {0,1} space:

[0090]

[0091] Among them, b i (c) is the compatibility feature of the i-th set of interest, Clip(b i (c) ,0,1) function is used to convert b i (c) Mapped to the {0,1} space; "" represents the integer symbol.

[0092] The user interest score of the i-th set of interest is obtained based on the visual modality data and text modality data of the i-th set of interest: Assume that the binary codes from different modalities are represented by and Provided, where v and f represent the visual modality and textual modality respectively, the same hashing method is used to process the substantive features of each modality. Finally, the scores of each modality are added together to obtain the total score of multimodal information:

[0093]

[0094] in, Indicates user u's request for set O i The preference score of represents the user u's pair of suit O calculated by visual modality i The tendency preference score of (visual features), that is, the visual feature interest score of user u for the i-th suit of interest; represents the relationship between user u and set O calculated by text modality i The tendency preference score of (text feature), that is, the text interest score of user u for the i-th set of interest.

[0095] S402: Construct a binary code model of clothing compatibility and user preference, and predict the interaction between the user and the candidate clothing, as shown below:

[0096]

[0097] in, Indicates user u's request for set O i The preference score of the suit is composed of interest score and suit fashion score. represents the interest preference score, Indicates the fashion score of the fashion set itself. is the hashing embedding and binary representation of the fashion clothing set and is the hashing embedding and binary representation of user interests. (i) and Λ (c) is the diagonal matrix used to perform the transformation.

[0098] The above is a package recommendation method provided by one or more embodiments of the present invention. Based on the same idea, the present invention also provides a corresponding package recommendation device, including:

[0099] The data acquisition module is used to obtain N sets of interested suits from the user's historical network behavior, where N is a positive integer and each set of interested suit includes different fashion items.

[0100] The compatibility feature acquisition module is used to construct a first multi-head attention mechanism module, which digitally encodes each fashion item belonging to the i-th set of interest and inputs it into the first multi-head attention mechanism module, i∈{1,2,...,N}. The first multi-head attention mechanism module captures the features of each fashion item in multiple dimensions through multiple parallel first attention heads; the outputs of multiple parallel first attention heads are spliced ​​to integrate the features of each fashion item in multiple dimensions to obtain the compatibility features of the i-th set of interest.

[0101] The user interest feature acquisition module is used to construct the second multi-head attention mechanism module. After the user's historical network behavior is digitally encoded, it is input into the second multi-head attention mechanism module simultaneously with the output of multiple parallel first attention heads. The second multi-head attention mechanism module captures the interaction between the user's historical network behavior and each fashion item in different dimensions through multiple parallel second attention heads to obtain the user interest feature of the i-th set of interest.

[0102] The recommendation module is used to obtain the user preference score of the i-th set of interest based on the compatibility characteristics of the i-th set of interest and the user interest characteristics of the i-th set of interest; obtain the user preference scores of all sets of interest, and recommend all sets of interest according to the order of the user preference scores.

[0103] For the specific definition of the package recommendation device, please refer to the definition of the package recommendation method above, which will not be repeated here. Each module in the above package recommendation device can be implemented in whole or in part by software, hardware and a combination thereof. The above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0104] The present invention also provides a computer-readable storage medium, which stores a computer program, which can be used to execute the above Figure 1 The recommended method for the package provided.

[0105] The present invention also provides a computer device structure. At the hardware level, the computer device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory. Of course, it may also include other hardware required for the business. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to achieve the above Figure 1 The recommended method for the package provided.

[0106] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided by the present invention can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).

[0107] The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of the present invention.

Claims

1. A package recommendation method, characterized in that: include: Obtain N sets of interested outfits from the user's historical network behavior, where N is a positive integer and each set of interested outfits includes different fashion items; Construct a first multi-head attention mechanism module, digitally encode each fashion item belonging to the i-th set of interest and input it into the first multi-head attention mechanism module, i∈{1,2,...,N}, and capture the features of each fashion item in multiple dimensions through multiple parallel first attention heads; and splice the outputs of multiple parallel first attention heads to obtain the features of each fashion item in multiple dimensions, and fuse the features of each fashion item in multiple dimensions as the compatibility features of the i-th set of interest; Construct a second multi-head attention mechanism module, digitally encode the user's historical network behavior, and input it into the second multi-head attention mechanism module simultaneously with the output of multiple parallel first attention heads. The interactive information between the user's historical network behavior and each fashion item in different dimensions is captured through multiple parallel second attention heads, and the interactive information is used as the user interest feature of the i-th set of interest; Based on the compatibility features of the i-th set of interested suits and the user interest features, obtaining a user preference score for the i-th set of interested suits; The user preference scores of all the packages of interest are obtained in turn, and all the packages of interest are recommended according to the order of the user preference scores.

2. The package recommendation method according to claim 1, characterized in that: The method of capturing the features of each fashion item in multiple dimensions through multiple parallel first attention heads specifically includes: Each fashion item is digitally encoded and divided into h parts, each of which corresponds to h first attention heads; Each first attention head applies three different weight matrices W Q , W K and W V , according to the weight matrix W Q , W K and W V Generate query vector Q, key vector K and value vector V; Based on the query vector Q, key vector K and value vector V, each first attention head uses low-rank attention to obtain the representation of each fashion item in the outfit of interest. Where X represents the feature vector of fashion items extracted from the text or image related to fashion items; LowRankAttention() is the low-rank attention; softmax() is the activation function; E and F are two different matrices, which are used to transform the key vector K and the value vector V from the dimension of Rn to ×d The feature space is projected to R ( n / c) ×d In the feature space of , the computational cost is reduced, where c is the number of fashion item categories, n is the number of fashion items contained in the suit of interest, and d is the dimension of the fashion item feature vector X; the superscript T indicates the transposition operation.

3. The package recommendation method according to claim 1, characterized in that: The fusion of the features of each fashion item in multiple dimensions as the compatibility features of the i-th set of interest specifically includes: The output of each first attention head is stacked to extract high-level semantic features of fashion items: H=LowRankAttention(LowRankAttention(X)) Where X represents the feature vector of fashion items extracted from the text or image related to the fashion items; LowRankAttention() is low-rank attention; H represents the high-level semantic features of fashion items; LowRankAttention(LowRankAttention()) represents a stack operation; After concatenating the high-level semantic features output by each first attention head, the high-level semantic features are input into the soft attention mechanism. The soft attention mechanism maps the high-level semantic features output by each first attention head into a single compact vector to capture the matching degree between the fashion items in the i-th set of interest, and obtain the compatibility features of the i-th set of interest: b i =q T σ2(W1z+W2h i +c) Among them, SoftAttention() represents the soft attention mechanism; z represents the vector used for training; hi represents the output of the i-th first attention head; q represents the query vector; σ2 is the S-shaped function; W1 and W2 are learnable parameter matrices, respectively, and c is the number of fashion item categories.

4. The package recommendation method according to claim 3, characterized in that: The high-level semantic features of the fashion items are concatenated with the digital encoding of the user's historical network behavior and then input into the second multi-head attention mechanism module to obtain the user interest features of the i-th set of interest: Among them, (i) represents the user interest feature of the i-th set of interested suits, MultiHead() represents the second multi-head attention mechanism module; u represents the digital encoding of the user's historical network behavior; and They represent the weight matrices used to generate the query vector, key vector, and value vector in the second multi-head attention mechanism module, respectively.

5. The package recommendation method according to claim 1, characterized in that: The step of obtaining the user preference score of the i-th set of interested suit based on the compatibility feature of the i-th set of interested suit and the user interest feature specifically includes: Using Hash technology, the compatibility characteristics and user interest characteristics of the i-th set of interest are converted into binary codes respectively; Based on the compatibility feature binary code and the user preference representation binary code, a user preference model is constructed: in, Indicates that user u is interested in the i-th set O i User preference scores; Indicates that user u is interested in the i-th set O i User interest score, Indicates that user u is interested in the i-th set O i The fashion score of , α is the fashion attention factor; represents the binary code of the compatibility feature of the i-th set of interest, The user preference of the i-th set of interest is represented by a binary code, and the superscript T represents the transposition operation; Λ (i) and Λ (c) is a diagonal matrix used to perform vector transformation; softmax() is the activation function.

6. The package recommendation method according to claim 5, characterized in that: The Hash technology is used to convert the compatibility characteristics and user interest characteristics of the i-th set of interest into binary codes, specifically including: Hash technology is used to map the real-valued vector of compatibility features to the {0,1} space: Among them, b i (c) is the compatibility feature of the i-th set of interest, Clip(b i (c) ,0,1) function is used to convert b i (c) Mapped to {0,1} space; "" represents the integer symbol; Hash technology is used to map the real-valued vector of user interest features to the {1,-1} space: Among them, i (c) is the user interest feature of the i-th set of interest, Sign(o i (c) ) function is used to convert o i (c) Mapped to {1,-1} space.

7. The package recommendation method according to claim 5, characterized in that: The user interest score of the i-th set of interested suit includes a visual feature interest score of the i-th set of interested suit and a text interest score of the i-th set of interested suit.

8. A package recommendation device, characterized in that: include: A data acquisition module is used to obtain N sets of suits of interest from the user's historical network behavior, where N is a positive integer and each set of suits of interest includes different fashion items; A compatibility feature acquisition module is used to construct a first multi-head attention mechanism module, digitally encode each fashion item belonging to the i-th set of interest and input it into the first multi-head attention mechanism module, i∈{1,2,...,N}, and capture the features of each fashion item in multiple dimensions through multiple parallel first attention heads; and splice the outputs of multiple parallel first attention heads to obtain the features of each fashion item in multiple dimensions, and fuse the features of each fashion item in multiple dimensions as the compatibility features of the i-th set of interest; A user interest feature acquisition module is used to construct a second multi-head attention mechanism module, which digitally encodes the user's historical network behavior and simultaneously inputs it into the second multi-head attention mechanism module together with the output of multiple parallel first attention heads, and captures the interaction information between the user's historical network behavior and each fashion item in different dimensions through multiple parallel second attention heads. The interaction information is used as the user interest feature of the i-th set of interested suits; A recommendation module, for obtaining a user preference score for the i-th set of interested suits based on the compatibility features of the i-th set of interested suits and the user interest features; The user preference scores of all the packages of interest are obtained in turn, and all the packages of interest are recommended according to the order of the user preference scores.

9. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

10. A computer device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method described in any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Individual recommending method based on multi-view anchor graph Hash technology

    CN105956093A

  • User personalized clothes matching method and device

    CN110175253A

  • Attention-based multi-interest sequence recommendation method and system

    CN114254194A

  • Fashion compatibility analysis method and system based on deep multi-modal feature fusion

    CN114758149A

  • Individualized clothing recommendation method and system based on reinforcement learning

    CN114896497A

Cited By

  • Cross-modal content recommendation method and device, equipment, medium and product

    CN120407952A