Object recommendation method, object recommendation model training method, device, equipment, medium and product
By processing the behavioral sequences of target users to generate interest summaries and feature sequences, and combining them with intent summaries to determine the target object set, the problem of ignoring dynamic temporal logic in existing technologies is solved, and more accurate product recommendations are achieved.
Patent Information
- Application Number
- CN202511740690.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-25
- Publication Date
- 2026-03-06
AI Technical Summary
In existing technologies, user short-term interest modeling in e-commerce search scenarios only focuses on the static matching between target products and user historical behavior, ignoring the dynamic temporal logic implicit in user historical behavior, resulting in insufficient accuracy of product recommendations.
By processing the reference behavior sequence of the target user, a reference interest summary and a reference feature sequence are generated. Combined with the input query, an intent summary is determined. Based on these summaries, a set of target objects is determined for recommendation. A self-attention mechanism and sparse MoE processing are used to capture temporal dependencies and diverse behavioral patterns.
It improves the accuracy of interest modeling and recommendation relevance, enhances the ability to dynamically model users' short-term interests, and improves the accuracy of product recommendations.
Smart Images

Figure CN121616375A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the fields of computer technology, internet technology, data processing technology, and product recommendation technology. More specifically, it relates to an object recommendation method, an object recommendation model training method, apparatus, equipment, medium, and product. Background Technology
[0002] In e-commerce search scenarios, modeling users' short-term interests is crucial for personalized ranking. Related technologies typically employ a target attention mechanism to model short-term user behavior sequences. This involves calculating the vector similarity between user queries, candidate products, and historical user behavior to obtain attention weights, which are then used to generate weighted short-term interest representations.
[0003] In realizing the concept disclosed herein, the inventors discovered at least the following problems in the related technologies: the above process only focuses on the static matching between the target product and the user's historical behavior, while ignoring the dynamic temporal logic implied in the user's historical behavior, thus making it difficult to effectively guarantee the accuracy of product recommendations. Summary of the Invention
[0004] In view of this, this disclosure provides an object recommendation method, an object recommendation model training method, an apparatus, a device, a medium, and a product.
[0005] According to one aspect of this disclosure, an object recommendation method is provided, comprising: in response to receiving an input query from a target user, processing an acquired sequence of reference behaviors of the target user to obtain a reference interest summary and a reference feature sequence; processing the reference feature sequence and input features determined based on the input query to obtain an intent summary; and determining a set of target objects based on the reference interest summary and the intent summary and recommending the set of target objects to the target user.
[0006] According to another aspect of this disclosure, a method for training an object recommendation model is provided, comprising: in response to receiving a sample input query from a sample user, processing an acquired sample reference behavior sequence of the sample user to obtain a sample reference interest summary and a sample reference feature sequence, wherein the sample input query corresponds to a sample recommendation object set; processing the sample reference feature sequence and sample input features determined based on the sample input query to obtain a sample intent summary; determining a sample target object set based on the sample reference interest summary and the sample intent summary; and training a model to be trained using the sample recommendation object set and the sample target object set to obtain the object recommendation model.
[0007] According to another aspect of this disclosure, an object recommendation apparatus is provided, comprising: a first processing module, configured to, in response to receiving an input query from a target user, process an acquired reference behavior sequence of the target user to obtain a reference interest summary and a reference feature sequence; a second processing module, configured to process the reference feature sequence and input features determined based on the input query to obtain an intent summary; and an object recommendation module, configured to, based on the reference interest summary and the intent summary, determine a set of target objects and recommend the set of target objects to the target user.
[0008] According to another aspect of this disclosure, a training apparatus for an object recommendation model is provided, comprising: a third processing module, configured to, in response to receiving a sample input query from a sample user, process an acquired sample reference behavior sequence of the sample user to obtain a sample reference interest summary and a sample reference feature sequence, wherein the sample input query corresponds to a sample recommendation object set; a fourth processing module, configured to process the sample reference feature sequence and sample input features determined based on the sample input query to obtain a sample intent summary; a determination module, configured to determine a sample target object set based on the sample reference interest summary and the sample intent summary; and a training module, configured to train a model to be trained using the sample recommendation object set and the sample target object set to obtain the object recommendation model.
[0009] According to another aspect of this disclosure, an electronic device is provided, comprising: one or more processors; and a memory for storing one or more instructions, wherein, when executed by the one or more processors, the one or more processors cause the one or more processors to perform the method as described in this disclosure.
[0010] According to another aspect of this disclosure, a computer-readable storage medium is provided having executable instructions stored thereon, which, when executed by a processor, cause the processor to perform the methods described in this disclosure.
[0011] According to another aspect of this disclosure, a computer program product is provided, which includes computer-executable instructions that, when executed, are used to perform the methods described in this disclosure. Attached Figure Description
[0012] The above and other objects, features and advantages of this disclosure will become clearer from the following description of embodiments with reference to the accompanying drawings, in which:
[0013] Figure 1 The illustration schematically shows a system architecture for applying object recommendation methods and object recommendation model training methods according to embodiments of the present disclosure;
[0014] Figure 2 A flowchart illustrating an object recommendation method according to an embodiment of the present disclosure is shown schematically;
[0015] Figure 3 This illustration schematically shows an example of a process for obtaining a reference interest summary and a reference feature sequence by processing an acquired reference behavior sequence of a target user according to an embodiment of the present disclosure;
[0016] Figure 4A The illustration shows an example schematic diagram of the process for obtaining a second intermediate feature sequence according to an embodiment of the present disclosure;
[0017] Figure 4B The illustration shows an example schematic diagram of a process for obtaining reference features according to an embodiment of the present disclosure;
[0018] Figure 5 The illustration shows an example of an intent summary process obtained by processing a reference feature sequence and input features determined based on an input query, according to an embodiment of the present disclosure.
[0019] Figure 6 The illustration shows an example schematic diagram of the process for obtaining a third intermediate feature sequence according to an embodiment of the present disclosure;
[0020] Figure 7 An example schematic diagram of an object recommendation process according to an embodiment of the present disclosure is shown;
[0021] Figure 8 A flowchart illustrating a training method for an object recommendation model according to an embodiment of the present disclosure is shown schematically.
[0022] Figure 9A A block diagram of an object recommendation apparatus according to an embodiment of the present disclosure is shown schematically;
[0023] Figure 9B A block diagram illustrating a training apparatus for an object recommendation model according to an embodiment of the present disclosure is shown schematically; and
[0024] Figure 10 A block diagram of an electronic device suitable for implementing an object recommendation method and a training method for an object recommendation model, according to embodiments of the present disclosure, is shown schematically. Detailed Implementation
[0025] The embodiments of the present disclosure will now be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the disclosure. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of the present disclosure for ease of explanation. However, it will be apparent that one or more embodiments may be practiced without these specific details. Furthermore, descriptions of well-known structures and techniques are omitted in the following description to avoid unnecessarily obscuring the concepts of the present disclosure.
[0026] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit this disclosure. The terms “comprising,” “including,” etc., as used herein indicate the presence of the stated features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0027] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein are to be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.
[0028] When using expressions such as "at least one of A, B and C", they should generally be interpreted in accordance with the meaning that is commonly understood by those skilled in the art (e.g., "a system having at least one of A, B and C" should include, but is not limited to, a system having A alone, a system having B alone, a system having C alone, a system having A and B, a system having A and C, a system having B and C, and / or a system having A, B and C, etc.).
[0029] In the technical solution of this invention, the user information (including but not limited to user personal information, user image information, user device information, such as location information) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, storage, use, processing, transmission, provision, disclosure, and application of related data all comply with relevant laws, regulations, and standards, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entry points for users to choose to authorize or refuse.
[0030] The process of modeling user short-term behavior sequences based on the target attention mechanism only establishes a connection by matching target products with users' historical behaviors, failing to depict the implicit temporal logic within the behavior sequence and ignoring the dynamic evolution of users' short-term interests. Furthermore, this process only matches isolated behaviors, without structurally summarizing short-term behaviors, breaking down users' true intentions into fragmented signals that cannot form a unified interest orientation. In addition, using only a single expert structure after attention interaction limits the model's parameter scale, making it unable to cover the diverse and multi-dimensional short-term behavior patterns in e-commerce scenarios.
[0031] To this end, this disclosure provides an object recommendation method, an object recommendation model training method, apparatus, device, medium, and product, which can be applied to the fields of computer technology, internet technology, data processing technology, and product recommendation technology. The object recommendation method includes: in response to receiving an input query from a target user, processing an acquired sequence of reference behaviors of the target user to obtain a reference interest summary and a reference feature sequence; processing the reference feature sequence and input features determined based on the input query to obtain an intent summary; and determining a set of target objects based on the reference interest summary and the intent summary, and recommending the set of target objects to the target user.
[0032] Figure 1 The illustration schematically depicts a system architecture according to embodiments of the present disclosure where object recommendation methods and object recommendation model training methods can be applied. It should be noted that... Figure 1 The examples shown are merely examples of system architectures that can be applied to the embodiments of this disclosure, in order to help those skilled in the art understand the technical content of this disclosure, but do not mean that the embodiments of this disclosure cannot be used in other devices, systems, environments or scenarios.
[0033] like Figure 1 As shown, the system architecture 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between different devices.
[0034] It should be noted that the object recommendation method and object recommendation model training method provided in this embodiment can generally be executed by the server 105. Accordingly, the object recommendation device and object recommendation model training device provided in this embodiment can generally be located in the server 105.
[0035] Alternatively, the object recommendation method and the object recommendation model training method provided in the embodiments of this disclosure can also be executed by the first terminal device 101, the second terminal device 102, or the third terminal device 103. Correspondingly, the object recommendation device and the object recommendation model training device provided in the embodiments of this disclosure can also be disposed in the first terminal device 101, the second terminal device 102, or the third terminal device 103.
[0036] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.
[0037] It should be noted that the sequence numbers of the operations in the following methods are for descriptive purposes only and should not be considered as indicating the execution order of the operations. Unless explicitly stated otherwise, the method does not need to be executed in the exact order shown.
[0038] Figure 2 A flowchart illustrating an object recommendation method according to an embodiment of this disclosure is shown schematically.
[0039] like Figure 2 As shown, the recommended method 200 for this object includes operations S210 to S230.
[0040] In operation S210, in response to receiving the input query from the target user, the reference interest summary and reference feature sequence are obtained by processing the acquired reference behavior sequence of the target user.
[0041] In operation S220, an intent summary is obtained by processing the reference feature sequence and the input features determined based on the input query.
[0042] In operation S230, based on the reference interest summary and intent summary, the target object set is determined and the target object set is recommended to the target user.
[0043] Upon receiving an input query from a target user, the subsequent object recommendation process can be triggered. A target user refers to the specific user who initiates a query on an e-commerce platform or other recommendation system. An input query refers to a search request entered by the target user through text, voice, or other means, which can be used to express their current needs. For example, the target user enters the keyword "laptop". In one example, the input query can be captured using an event listener mechanism; alternatively, it can be processed asynchronously based on a message queue, or synchronously responded to via an API gateway; this is not limited to this approach.
[0044] Upon receiving an input query, a reference behavior sequence of the target user can be obtained based on the query. A reference behavior sequence refers to the target user's historical behavior records within a certain time frame, which can include actions such as clicks, browsing, and purchases arranged chronologically. For example, a reference behavior sequence could be the user's browsing history within the last hour: [Product A, Product B, Product C].
[0045] After obtaining the reference behavior sequence, it can be processed to obtain a reference interest summary and a reference feature sequence. The reference interest summary is a compact vector representation extracted from the reference behavior sequence that reflects the user's overall short-term interests. For example, a summary vector obtained by aggregating the behavior sequence through a self-attention mechanism can represent the user's preferences for "electronic products" and "cost-effectiveness." The reference feature sequence is a serialized vector representation obtained after feature encoding of the reference behavior sequence, used for subsequent modeling. For example, each behavior can be converted into a vector through an embedding layer, and the output sequence can be processed by self-attention and sparse MoE.
[0046] The methods for obtaining the reference interest summary and reference feature sequence can be configured according to actual business needs and are not limited here. For example, self-attention and sparse MoE can be used to process the reference behavior sequence and output the reference interest summary and reference feature sequence. Alternatively, sequence pooling (such as average pooling), gated recurrent units, or Transformer encoders can be used to extract the reference interest summary and reference feature sequence.
[0047] After receiving the input query, input features can be determined based on it. Input features refer to the feature representation extracted based on the input query, which can be generated through embedding or an encoder. For example, the input query "laptop" can be converted into a high-dimensional vector. Alternatively, a candidate object set can be obtained based on the input query, and both the input query and the candidate object set can be converted into high-dimensional vectors.
[0048] After obtaining the reference feature sequence and input features, the reference feature sequence can be interacted with the input features to extract an intent representation relevant to the current input query, resulting in an intent summary. The intent summary refers to a highly relevant user intent representation extracted through an attention mechanism, combining the reference feature sequence and input features. In one example, the method for obtaining the intent summary can be configured according to actual business needs and is not limited here. For example, target attention and a sparse MoE layer can be used for interaction. Alternatively, a cross-attention mechanism can be introduced to directly fuse the reference feature sequence and input features.
[0049] After obtaining the intent summary, the reference interest summary and the intent summary can be merged to determine the target object set. The target object set refers to the list of target products generated based on user interests and intents. The method of obtaining the target object set can be configured according to actual business needs and is not limited here. For example, the reference interest summary and intent summary can be concatenated and input into a ranking model to calculate the scores of candidate products and return the Top N products. Alternatively, reinforcement learning can be introduced to dynamically adjust the recommendation strategy. The target object set can be recommended to target users through user interface (such as app push), email, or SMS.
[0050] In the embodiments of this disclosure, by processing the reference behavior sequence of the target user obtained based on the input query, and processing the obtained reference feature sequence and the input features determined based on the input query, a user intent representation highly relevant to the current query can be obtained. Based on this, by determining the target object set based on the reference interest summary and intent summary, the temporal evolution and diversification patterns of users' short-term interests can be effectively captured, enhancing the dynamic modeling capability based on the reference behavior sequence. This solves the technical problem in related technologies that only focus on the static matching between target products and users' historical behavior, while ignoring the dynamic temporal logic implicit in users' historical behavior, thus improving the accuracy of interest modeling and recommendation relevance, and consequently improving the accuracy of object recommendation.
[0051] According to an embodiment of this disclosure, operation S210 may include: randomly initializing learnable vectors of the same dimension based on a first intermediate feature sequence obtained by embedding a reference behavior sequence to obtain an interest summary symbol; determining a reference interest summary and a reference feature sequence based on the interest summary symbol and the first intermediate feature sequence, wherein the interest summary symbol is formed by aggregating the first intermediate feature sequence to form the reference interest summary.
[0052] After obtaining the reference behavior sequence of the target user, each behavior in the user behavior sequence can be converted into a high-dimensional vector through an embedding layer to obtain the first intermediate feature sequence. Embedding processing refers to the process of mapping discrete behavior identifiers (such as product IDs) into continuous vector representations through an embedding layer, which can capture semantic information. The first intermediate feature sequence is the vector sequence obtained after embedding the reference behavior sequence, where each vector corresponds to the feature representation of a behavior. For example, each behavior in the reference behavior sequence is encoded as a 128-dimensional vector, forming the first intermediate feature sequence with a shape of [n, 128], where n is the number of behaviors.
[0053] The specific embedding method can be configured according to actual business needs and is not limited here. For example, an embedding table can be used for vector querying to obtain the first intermediate feature sequence. Alternatively, a pre-trained language model (such as BERT) can be used to encode the reference behavior sequence to obtain the first intermediate feature sequence. Another alternative is to introduce graph embedding technology, construct a graph neural network from the reference behavior sequence, and use the graph neural network to obtain the first intermediate feature sequence.
[0054] After obtaining the first intermediate feature sequence, a trainable vector with the same dimension as the first intermediate feature sequence can be created as an interest summary for interest aggregation. The interest summary is a randomly initialized learnable vector with the same dimension as the vector in the first intermediate feature sequence, used to adaptively aggregate sequence information during training. For example, a 128-dimensional vector, with initial values sampled from a uniform distribution, can serve as a "summary token" for short-term interests.
[0055] The method for determining the interest digest can be configured according to actual business needs and is not limited here. For example, the mean or first vector of the first intermediate feature sequence can be used for initialization to determine the interest digest. Alternatively, the first intermediate feature sequence can be clustered using a clustering algorithm, and the cluster centers can be used as the interest digest.
[0056] After obtaining the interest digest symbol, it can be combined with the first intermediate feature sequence to generate a reference interest digest and a reference feature sequence. For example, a self-attention mechanism can be used, where the interest digest symbol participates in the interaction as a special token in the sequence. Alternatively, a recurrent neural network can be used, with the interest digest symbol as the initial hidden state, the final output state as the reference interest digest, and the hidden state sequence as the reference feature sequence, etc., without limitation.
[0057] In the embodiments of this disclosure, by introducing learnable interest summaries and interacting with reference behavior sequences, temporal dependencies and global context can be captured, improving the accuracy and generalization ability of interest representation. This enables the effective aggregation of fragmented signals in short-term user behavior, generating unified and rich reference interest summaries, enhancing adaptability to dynamic interest evolution, and helping to optimize personalized recommendation effects.
[0058] According to embodiments of this disclosure, determining a reference feature sequence based on an interest digest and a first intermediate feature sequence includes: processing the interest digest and M candidate intermediate features based on a first attention strategy to obtain a second intermediate feature sequence, wherein the first attention strategy is used to interact with the M candidate intermediate features to capture temporal dependencies; and processing the second intermediate feature sequence based on a first routing strategy to obtain the reference feature sequence.
[0059] The first intermediate feature sequence can include M candidate intermediate features arranged in chronological order, where M is a positive integer. For example, when M=3, the three candidate intermediate features can correspond to the embedding representations of mobile phones, tablets, and headphones, respectively. For each candidate intermediate feature, an interest summary symbol can interact with the candidate intermediate feature based on a first attention strategy to generate a second intermediate feature sequence. The second intermediate feature sequence refers to the enhanced feature sequence obtained after processing by the first attention strategy, incorporating temporal context information.
[0060] The primary attention strategy refers to an attention mechanism used to handle interactions between elements within a sequence, capable of capturing temporal dependencies. The specific interaction method can be configured according to actual business needs and is not limited here. For example, a self-attention mechanism can be used, treating the interest summary symbol as a special position in the sequence for computation. Alternatively, a hierarchical attention mechanism can be used, first performing local attention calculations on adjacent actions, and then fusing global attention.
[0061] After obtaining the second intermediate feature sequence, it can be processed based on the first routing strategy to obtain the reference feature sequence. The first routing strategy refers to a mechanism for selectively processing feature sequences, routing different features to different processing units to obtain the reference feature sequence. The specific routing method can be configured according to actual business needs and is not limited here. For example, sparse MoE can be used to select processing units based on a gating value and employ a range load balancing mechanism to optimize routing. Alternatively, the feature vectors can be clustered first, and then each cluster can be routed to its corresponding processing unit.
[0062] In the embodiments of this disclosure, a first attention strategy is used to effectively capture the temporal dependencies in the behavioral sequence, solving the problem of missing temporal logic in the prior art. Based on this, a first routing strategy is used to differentiate the feature sequence, improving the coverage of different behavioral patterns. This combination of two processing mechanisms can more accurately depict the dynamic evolution of users' short-term interests, thereby providing higher-quality personalized recommendations for target users.
[0063] Figure 3 The illustration shows an example of a process for obtaining a reference interest summary and a reference feature sequence by processing an acquired reference behavior sequence of a target user according to an embodiment of the present disclosure.
[0064] like Figure 3 As shown, in embodiment 300 for obtaining reference interest summary and reference feature sequence, an interest summary symbol 303 can be obtained by randomly initializing a vector of the same dimension based on the first intermediate feature sequence 302 obtained by embedding the reference behavior sequence 301.
[0065] Based on the first attention strategy M301, M candidate intermediate features in the interest digest 303 and the first intermediate feature sequence 302 are processed to obtain the second intermediate feature sequence 304. The first attention strategy M301 is used to interact with the M candidate intermediate features to capture temporal dependencies. Based on this, the second intermediate feature sequence 304 can be processed according to the first routing strategy M302 to obtain the reference interest digest 305 and the reference feature sequence 306.
[0066] According to embodiments of this disclosure, based on a first attention strategy, an interest digest symbol and M candidate intermediate features are processed to obtain a second intermediate feature sequence, including: determining a first intermediate feature and a first query matrix corresponding to the first intermediate feature from the M candidate intermediate features; determining a first key matrix and a first value matrix corresponding to each of the other candidate intermediate features; determining a first attention weight matrix corresponding to each candidate intermediate feature based on the first query matrix and the first key matrix corresponding to each candidate intermediate feature; and determining a second intermediate feature corresponding to the first intermediate feature based on the first attention weight matrix and the first value matrix corresponding to each candidate intermediate feature.
[0067] For a first intermediate feature determined from M candidate intermediate features, this first intermediate feature can be transformed into a first query matrix through a linear transformation. The first query matrix refers to the query representation obtained by linear transformation of the first intermediate feature, which is used to retrieve relevant information in the attention mechanism. For example, a 128-dimensional feature vector can be transformed into a 64-dimensional query vector through a learnable weight matrix.
[0068] For the M candidate intermediate features other than the first intermediate feature mentioned above, they can be converted into key and value representations respectively. The first key matrix refers to the key representation obtained by linear transformation of the other candidate intermediate features. The first value matrix refers to the value representation obtained by linear transformation of the other candidate intermediate features.
[0069] After obtaining the first query matrix of the current first intermediate feature and the first key matrix and first value matrix corresponding to the other candidate intermediate features, the similarity between the query and each key can be calculated to obtain the first attention weight matrix. The first attention weight matrix refers to the weight distribution calculated by the similarity between the query and the key, reflecting the importance of different positions.
[0070] After obtaining the first attention weight matrix, the value vectors can be weighted and summed using these first attention weights to obtain the second intermediate feature that incorporates contextual information. The second intermediate feature refers to the enhanced feature representation obtained by weighting and summing the value vectors using the attention weights.
[0071] In a specific example, the process of obtaining the second intermediate feature sequence can be shown by the following formulas (1) to (5).
[0072] (1)
[0073] (2)
[0074] (3)
[0075] (4)
[0076] (5)
[0077] in, Characterizing the first intermediate feature sequence, ; Representing the first query matrix, Characterizing the first bond matrix, Characterizing the first bond matrix, , , Characterize learnable parameters, Characterizing the first attention weight matrix, Characterizes the second intermediate feature sequence.
[0078] In the embodiments of this disclosure, the separation and transformation mechanism of the first query matrix, the first key matrix and the first value matrix enhances the modeling ability of complex associations within the first intermediate feature sequence, enabling the features at each position to be integrated with global context information, effectively capturing long-distance dependencies in the behavior sequence, which helps to improve the quality of the second intermediate feature sequence and provides richer semantic information for downstream tasks.
[0079] Figure 4A The illustration shows an example schematic diagram of the process for obtaining a second intermediate feature sequence according to an embodiment of the present disclosure.
[0080] like Figure 4A As shown, in embodiment 400A for obtaining the second intermediate feature sequence, taking the first intermediate feature 401 determined from M candidate intermediate features and any candidate intermediate feature 402 other than the first intermediate feature 401 from the M candidate intermediate features as examples, a first query matrix 403 corresponding to the first intermediate feature 401 can be determined. A first key matrix 404 and a first value matrix 405 corresponding to each candidate intermediate feature 402 are also determined.
[0081] Based on the first query matrix 403 and the first key matrix 404 corresponding to each candidate intermediate feature 402, the first attention weight matrix 406 corresponding to each candidate intermediate feature 402 is determined. Based on this, the second intermediate feature 407 corresponding to the first intermediate feature 401 is determined based on the first attention weight matrix 406 and the first value matrix 405 corresponding to each candidate intermediate feature 402.
[0082] According to embodiments of this disclosure, a first routing strategy includes a selection strategy and a fusion strategy, and a reference feature sequence includes M reference features; for each second intermediate feature, based on the first routing strategy, the second intermediate feature sequence is processed to obtain a reference feature sequence, including: determining at least two target experts from P candidate experts according to the selection strategy, where P is a positive integer; and fusing the output features of the at least two target experts according to the fusion strategy to obtain reference features, wherein the fusion strategy indicates the weights used for each output feature.
[0083] For each second intermediate feature, at least two target experts can be determined from P candidate experts according to a selection strategy. The selection strategy refers to the method of selecting suitable target experts from the set of candidate experts to process the current input feature. The P candidate experts refer to the set of all available expert networks. The target experts refer to the experts who actually participate in the computation, as determined by the selection strategy. For example, the P candidate experts could be a pool of experts containing 8 feedforward neural networks, and the target experts could be the two most relevant experts selected from these 8 candidate experts.
[0084] The method for selecting target experts can be configured according to actual business needs and is not limited here. For example, a linear transformation plus a sigmoid function can be used to calculate the matching score between the second intermediate feature and each candidate expert, and the top k experts can be selected as target experts by combining load balancing bias. Alternatively, the second intermediate feature can be clustered first, and the corresponding expert combination can be selected according to the cluster. Another alternative is to first filter expert categories with coarse granularity, and then select specific experts as target experts with fine granularity.
[0085] After obtaining at least two target experts, the output features of each expert can be fused according to a fusion strategy to obtain reference features. The fusion strategy refers to a method that combines the outputs of multiple target experts into a final output. Output features refer to the results of the target experts processing the second intermediate features.
[0086] After obtaining the output features of each target expert, the outputs of the selected target experts can be combined according to certain weights to form the final feature representation. For example, normalized gating values can be used as weights to perform a weighted summation of the output features of each target expert. Alternatively, the weights of each target expert can be dynamically adjusted based on the input features.
[0087] In the embodiments of this disclosure, the most relevant target experts are intelligently selected from the candidate experts by a selection strategy, and the output features of each target expert are effectively integrated by a fusion strategy. This can expand the model capacity while maintaining computational efficiency, thereby accurately adapting to the diversified and dynamic characteristics of users' short-term interests in e-commerce scenarios, improving the coverage and feature expression capabilities of diverse behavioral patterns, and thus helping to improve the accuracy of subsequent object recommendations.
[0088] According to embodiments of this disclosure, determining at least two target experts from P candidate experts according to a selection strategy includes: determining the evaluation value of a second intermediate feature relative to each of the P candidate experts to obtain P evaluation values; and determining the candidate experts corresponding to the first p evaluation values among the sorted P evaluation values as target experts.
[0089] For each second intermediate feature, a matching score can be calculated between that feature and each candidate expert to obtain an evaluation value. The evaluation value is a numerical score reflecting the degree of matching between the second intermediate feature and the candidate expert. The method for determining the evaluation value can be configured according to actual business needs and is not limited here. For example, a linear transformation combined with an activation function can be used to calculate the evaluation value. Alternatively, the evaluation value can be determined by calculating the cosine similarity or Euclidean distance between the prototype vectors of the second intermediate feature and the candidate expert.
[0090] After obtaining the evaluation values of each of the P candidate experts, the evaluation values of all candidate experts can be sorted to obtain the sorted P evaluation values. For example, with P=8, the 8 evaluation values [0.2,0.8,0.5,0.9,0.3,0.7,0.4,0.6] can be sorted in descending order as [0.9,0.8,0.7,0.6,0.5,0.4,0.3,0.2].
[0091] After obtaining P sorted evaluation values, the p experts with the highest scores can be selected as the final processing units. The top p evaluation values refer to the evaluation values of the top p ranked experts after sorting. For example, when p=2, the top p evaluation values are 0.9 and 0.8. Alternatively, a minimum score threshold can be set to select all experts whose scores exceed the threshold.
[0092] In a specific example, the process of selecting the target expert can be shown by the following formulas (6) to (8).
[0093] (6)
[0094] (7)
[0095] (8)
[0096] in, Characterize learnable parameters, ; , The evaluation value of behavior i on candidate expert 1, ... The evaluation value of behavior i on candidate expert P; It is based on the k largest values of behavior i for candidate expert j. The selected corresponding evaluation value, It is the normalized gate value. It is the load balancing bias of the j-th candidate expert.
[0097] In the embodiments of this disclosure, an intelligent routing allocation of input features is achieved through an expert evaluation and selection mechanism, ensuring that each feature can be processed by the most relevant expert network. By dynamically selecting the optimal target expert from among the candidate experts, the expressive power is greatly expanded, and the computational overhead is controlled through the sparse activation mechanism, which helps to improve the coverage of diverse behavioral patterns and improve the accuracy and efficiency of feature processing.
[0098] Figure 4B The illustration shows an example schematic diagram of a process for obtaining a reference feature according to an embodiment of the present disclosure.
[0099] like Figure 4B As shown, in embodiment 400B of obtaining reference features, for each second intermediate feature 408, the evaluation value of the second intermediate feature 408 relative to each of P candidate experts can be determined, resulting in P evaluation values. For example, the evaluation value 410_1 relative to candidate expert 409_1, the evaluation value 410_2 relative to candidate expert 409_2, ..., the evaluation value 410_S relative to candidate expert 409_S can be determined, where S is a positive integer.
[0100] After obtaining evaluation values 410_1, 410_2, ..., 410_S, these evaluation values can be sorted to obtain P sorted evaluation values. The candidate experts corresponding to the first p sorted evaluation values are then identified as target experts. For example, with p=2, the candidate experts corresponding to the first two evaluation values can be identified as target experts 411_1 and 411_2.
[0101] Based on this, the output features of at least two target experts can be fused according to a fusion strategy to obtain reference feature 413, wherein the fusion strategy indicates the weights used for each output feature. For example, the output feature 412_1 output by target expert 411_1 and the output feature 412_2 output by target expert 411_2 can be fused to obtain reference feature 413.
[0102] According to embodiments of this disclosure, for each candidate expert, the method further includes: in response to the number of candidate experts selected as target experts not meeting a preset balance condition, adjusting the load balancing bias for the candidate experts so that the number meets the preset balance condition; the preset balance condition is determined based on the average number of candidate experts selected as target experts and a preset parameter, the preset parameter being determined based on the uniformity of user behavior distribution.
[0103] For each candidate expert, their load status can be monitored. When load imbalance is detected, routing decisions are guided by adjusting the load balancing bias to ensure the load distribution meets preset balancing conditions. Load balancing bias is an adjustable parameter introduced to regulate expert load. The specific adjustment method for load balancing bias can be configured according to actual business needs and is not limited here. For example, load balancing bias can be adjusted based on a preset threshold range. Alternatively, load balancing bias can be dynamically adjusted based on the degree of load imbalance.
[0104] Preset balance conditions refer to the balance judgment criteria set based on the expert load distribution. Preset balance conditions can be determined based on the average number of experts selected and preset parameters. The average number of experts selected refers to the average number of times each candidate expert is chosen as the target expert. Preset parameters are adjustment parameters set according to the characteristics of the business scenario, reflecting the uniformity of user behavior distribution. The uniformity of user behavior distribution refers to the concentration of different types of products interacted with by users. For example, when user behavior distribution is uniform, the preset parameter can be set relatively small, such as 0.1; alternatively, when user behavior is uneven, the preset parameter can be set relatively large, such as 0.3.
[0105] In the embodiments of this disclosure, by setting preset balancing conditions based on actual business characteristics and adaptive load balancing bias adjustment, the load balancing bias used for candidate experts can be adjusted according to the distribution of user behavior with different uniformity. This effectively solves the problem of expert load imbalance caused by uneven distribution of user behavior in sparse expert networks, ensuring full utilization of each candidate expert resource while avoiding resource waste of a few experts being overloaded while most experts are idle.
[0106] According to embodiments of this disclosure, adjusting the load balancing bias for candidate experts includes: reducing the load balancing bias when the number of candidate experts selected as target experts is greater than an upper limit; increasing the load balancing bias when the number of candidate experts selected as target experts is less than a lower limit; and keeping the load balancing bias unchanged when the number of candidate experts selected as target experts is between the lower and upper limits.
[0107] Preset load balancing conditions can include lower and upper limits determined based on the average load of the current batch and preset parameters. In other words, these are the reasonable ranges for load balancing calculated according to the average load of the current batch and the preset parameters. The lower limit refers to the lowest boundary of the load balancing range. The upper limit refers to the highest boundary of the load balancing range.
[0108] The specific methods for determining the lower and upper limits can be configured according to actual business needs and are not limited here. For example, the lower and upper limits can be calculated by processing the mean and preset parameters using preset formulas. Alternatively, the lower and upper limits can be calculated using the quantiles of the load distribution (such as the 25th and 75th quantiles). Alternatively, the preset parameters can be adaptively adjusted according to the number of candidate experts.
[0109] When a candidate expert is overloaded, the probability of being selected can be reduced by decreasing the load balancing bias. For example, the bias can be reduced in fixed steps. Alternatively, the bias reduction factor can be gradually increased as the overload level increases. Another option is to simultaneously reduce the biases of the overloaded expert and its similar experts.
[0110] When a candidate expert has too low a load, the probability of being selected can be increased by increasing the load balancing bias. For example, the bias can be increased in fixed steps. Alternatively, the bias can be increased gradually as the load decreases. Another option is to simultaneously increase the biases of overloaded experts and their similar experts.
[0111] In a specific example, the load balancing bias adjustment process can be shown by the following formula (9).
[0112] (9)
[0113] in, This represents the average number of candidate experts selected as target experts. Characterize the preset parameters, Characterizing a fixed step size, The term represents the number of candidate experts selected as target experts. Characterizing the lower limit value, Represents the upper limit value.
[0114] In a specific example, the process of obtaining the reference feature can be shown in the following formula (10).
[0115] (10)
[0116] in, , , Characterize the reference feature sequence.
[0117] In the embodiments of this disclosure, by setting a clear load balancing interval and a corresponding bias adjustment strategy, the problem of uneven resource allocation, where some experts are overloaded while others are idle, can be effectively prevented, ensuring that all experts can play their full role and achieving dynamic load balancing of the expert network.
[0118] According to an embodiment of this disclosure, operation S220 may include: concatenating the embedding vector of the input query and the embedding vector of the candidate object set obtained based on the input query to obtain input features; processing the input features and reference feature sequences based on a second attention strategy to obtain a third intermediate feature sequence, wherein the second attention strategy is used to interact with the input features and M reference features to capture temporal dependencies; and processing the third intermediate feature sequence based on a second routing strategy to obtain an intent summary.
[0119] After receiving the input query, the vector representation of the input query after transformation by the embedding layer can be used as the embedding vector of the input query. Simultaneously, a candidate object set can be obtained based on the input query, and the vector representation of the candidate object set after transformation by the embedding layer can be used as the embedding vector of the candidate object set. The embedding vectors of the input query and the candidate object set can be concatenated to obtain the input features. For example, if both the embedding vectors of the input query and the candidate object set are 64-dimensional, the concatenated input features can be 128-dimensional.
[0120] After obtaining the input features, a third intermediate feature sequence can be obtained by interacting with the reference feature sequence based on a second attention strategy. The second attention strategy refers to the attention mechanism used to model the interaction between the input features and the reference feature sequence. The reference feature sequence can include M reference features, each of which can correspond to an enhanced representation of a user behavior.
[0121] The third intermediate feature sequence is a feature sequence that establishes the association between query candidate product combinations and user behavior sequences through an attention mechanism. The method for obtaining the third intermediate feature sequence can be configured according to actual business needs and is not limited here. For example, a target attention mechanism can be used to calculate dot product attention weights. Alternatively, a multi-head target attention mechanism can be used to compute attention in parallel across different representation subspaces.
[0122] After obtaining the third intermediate feature sequence, a routing strategy can be used to process it to obtain an intent summary. The second routing strategy refers to a mechanism that selectively processes the third intermediate feature sequence, routing different features to different processing units to obtain the intent summary. For example, sparse MoE can be used to select processing units based on gating values and employ range load balancing to optimize routing. Alternatively, feature vectors can be clustered first, and then each cluster can be routed to its corresponding processing unit. The intent summary is the final output representation of the user's intent related to the current query.
[0123] In the embodiments of this disclosure, by interacting the input features determined based on the input query with the user behavior sequence, it is possible to capture the user's interest points most relevant to the current search intent. By combining a second routing strategy, the ability to represent intent can be further improved, ensuring that the final generated intent summary can not only reflect the user's unified interest direction, but also accurately match the current search needs, which helps to improve the accuracy of personalized recommendations.
[0124] Figure 5 The illustration shows an example diagram of an intent summary process obtained by processing a reference feature sequence and input features determined based on an input query, according to an embodiment of the present disclosure.
[0125] like Figure 5 As shown, in embodiment 500 for obtaining an intent summary, a candidate object set 502 can be obtained based on an input query 501. The embedding vector 503 of the input query 501 and the embedding vector 504 of the candidate object set 502 obtained based on the input query 501 are concatenated to obtain the input feature 505.
[0126] Based on the second attention strategy M501, the input feature 505 and the reference feature sequence 506 are processed to obtain the third intermediate feature sequence 507. The second attention strategy M501 is used to interact with the M reference features in the input feature 505 and the reference feature sequence 506 to capture temporal dependencies. Based on this, the third intermediate feature sequence 507 can be processed according to the second routing strategy M502 to obtain the intent summary 508.
[0127] According to embodiments of this disclosure, the reference feature sequence includes N reference features, and the third intermediate feature sequence includes the third intermediate features of each of the N reference features, where N is a positive integer. Based on a second attention strategy, the input features and the reference feature sequence are processed to obtain the third intermediate feature sequence, including: determining a second query matrix corresponding to the input features; determining a second key matrix and a second value matrix corresponding to each of the N reference features; determining a second attention weight matrix corresponding to each of the N reference features based on the second query matrix and the second key matrix corresponding to each of the N reference features; and determining the third intermediate feature corresponding to each reference feature based on the second attention weight matrix and the first value matrix corresponding to each of the N reference features.
[0128] For each input feature, a second query matrix corresponding to that feature can be determined. The second query matrix is the query representation obtained by linearly transforming the input feature. For each reference feature, a second key matrix and a second value matrix corresponding to that feature can be determined. The second key matrix is the key representation obtained by linearly transforming the reference feature. The second value matrix is the value representation obtained by linearly transforming the reference feature.
[0129] After obtaining the second query matrix, the second key matrix, and the second value matrix, a second attention weight matrix can be calculated using the similarity between the second query matrix and the second key matrix. This second attention weight matrix can be used to reflect the importance of each reference feature. Based on this, the second value matrix can be weighted and summed using the second attention weight matrix to generate a third intermediate feature that incorporates contextual information.
[0130] In the embodiments of this disclosure, by establishing a correlation between input queries, candidate product combinations, and user behavior sequences, the user interest features most relevant to the current search intent can be effectively captured. Based on this, through the separation, transformation, and weighted fusion of queries, keys, and values, an intent representation that reflects both the user's unified interest direction and accurately matches search needs can be generated, thereby helping to improve the relevance and accuracy of personalized recommendations.
[0131] Figure 6 The illustration shows an example schematic diagram of the process for obtaining a third intermediate feature sequence according to an embodiment of the present disclosure.
[0132] like Figure 6 As shown, in embodiment 600 for obtaining the third intermediate feature sequence, a second query matrix 603 corresponding to the input feature 601 can be determined. A second key matrix 604 and a second value matrix 605 corresponding to each of the N reference features 602 are determined.
[0133] Based on the second query matrix 603 and the second key matrix 604 corresponding to each of the N reference features 602, the second attention weight matrix 606 corresponding to each of the N reference features 602 is determined. Based on this, the third intermediate feature 607 corresponding to the reference feature 602 is determined based on the second attention weight matrix 606 and the second value matrix 605 corresponding to each of the N reference features 602.
[0134] According to an embodiment of this disclosure, operation S230 may include: concatenating the reference interest summary and the intent summary to obtain concatenated features; and determining a set of target objects from a set of candidate objects obtained based on the input query based on the concatenated features.
[0135] A reference interest summary is an overall interest representation extracted from a user's short-term behavior sequence, reflecting the user's unified interest orientation. An intent summary is a specific intent representation obtained based on the interaction between the current query and candidate items with the user's behavior sequence. After obtaining the reference interest summary and intent summary, they can be concatenated to integrate the user's overall interest preferences and current specific intent, resulting in a concatenated feature.
[0136] The specific splicing method can be configured according to actual business needs and is not limited here. For example, the weight ratio of the reference interest summary and the intent summary can be dynamically adjusted according to the specific query type. Alternatively, a gating mechanism can be used to control the degree of fusion between the reference interest summary and the intent summary. Another alternative is to use an attention mechanism to automatically learn the optimal fusion weights.
[0137] After obtaining the concatenated features, the candidate products in the candidate object set can be sorted and filtered based on these features to obtain the target object set. The candidate object set refers to the set of candidate products obtained from the initial retrieval based on the input query. The recommended object set refers to the subset of products recommended to the user after final filtering.
[0138] In the embodiments of this disclosure, by concatenating the user's overall interest summary with the intent summary, the user's interest preferences are preserved while incorporating the specific needs of the current search scenario. This achieves a unified modeling of the user's long-term and short-term interests, which helps to improve the accuracy and personalization of recommendations, thereby helping to optimize the user experience.
[0139] According to embodiments of this disclosure, determining a target object set from a set of candidate objects obtained based on an input query, based on splicing features, includes: determining the similarity between the splicing features and Q candidate objects to obtain Q similarities; and determining the candidate objects corresponding to the first q similarities among the sorted Q similarities as the target object set.
[0140] The candidate object set can include Q candidate objects, where Q is a positive integer. After obtaining the concatenated features, the matching degree between the concatenated features and each candidate object can be determined, resulting in Q similarity scores. A higher similarity score indicates a greater similarity between the candidate object and the concatenated features. The method for determining the similarity score can be configured according to actual business needs and is not limited here. For example, the similarity score can be a score between 0 and 1 calculated using cosine similarity. Alternatively, similarity scores can be calculated separately from multiple dimensions such as price, category, and brand, and then weighted and fused.
[0141] After obtaining Q similarities, these Q similarities can be sorted to obtain a sorted set of Q similarities. For this sorted set of Q similarities, the candidate objects corresponding to the first q similarities can be identified as the target object set. For example, the sorted Q similarities could be [0.95, 0.93, 0.90, 0.88, ...]. Taking q as 3, the candidate objects corresponding to 0.95, 0.93, and 0.90 can be identified as the target object set. Alternatively, after obtaining the sorted Q similarities, all candidate objects exceeding a preset similarity threshold can be identified as the target object set.
[0142] In the embodiments of this disclosure, through similarity calculation and ranking filtering mechanisms, the recommended objects that best match the user's interests and intentions can be accurately identified from a large number of candidate products. This ensures that the recommendation results are consistent with the user's overall interests and preferences, and also ensures a high degree of relevance to the current search intent, effectively improving the accuracy and personalization of the recommendations.
[0143] Figure 7 The illustration shows an example schematic diagram of an object recommendation process according to an embodiment of the present disclosure.
[0144] like Figure 7 As shown, in embodiment 700 for obtaining a set of target objects, in response to receiving an input query 701 from a target user, a reference behavior sequence 702 of the target user can be obtained. The reference behavior sequence 702 is embedded to obtain a first intermediate feature sequence 703. Based on the first intermediate feature sequence 703, vectors of the same dimension are randomly initialized to obtain an interest digest 704. Based on a first attention strategy M 701, the interest digest 704 and M candidate intermediate features are processed to obtain a second intermediate feature sequence 705. Based on a first routing strategy M 702, the second intermediate feature sequence 705 is processed to obtain a reference feature sequence 706 and a reference interest digest 707.
[0145] A candidate object set 708 is obtained based on the input query 701. The embedding vector 709 of the input query 701 and the embedding vector 710 of the candidate object set 708 are concatenated to obtain the input feature 711. Based on the second attention strategy M703, the input feature 711 and the reference feature sequence 706 are processed to obtain the third intermediate feature sequence 712. Based on the second routing strategy M704, the third intermediate feature sequence 712 is processed to obtain the intent summary 713.
[0146] Based on this, the reference interest summary 707 and intent summary 713 are concatenated to obtain the concatenation feature 714. According to the concatenation feature 714, the target object set 715 is determined from the candidate object set 708 obtained based on the input query 701.
[0147] The above are merely exemplary embodiments, but are not limited thereto. Other object recommendation methods known in the art may also be included, as long as they can improve the accuracy of object recommendations.
[0148] Figure 8 A flowchart illustrating a training method for an object recommendation model according to an embodiment of the present disclosure is shown.
[0149] like Figure 8 As shown, the training method 800 for the object recommendation model includes operations S810~S840.
[0150] In operation S810, in response to receiving a sample input query from a sample user, the sample reference behavior sequence of the obtained sample user is processed to obtain a sample reference interest summary and a sample reference feature sequence, wherein the sample input query corresponds to a set of sample recommendation objects.
[0151] In operation S820, the sample intent summary is obtained by processing the sample reference feature sequence and the sample input features determined based on the sample input query.
[0152] In operation S830, the set of target objects of the sample is determined based on the sample reference interest summary and the sample intent summary.
[0153] In the S840, the model to be trained is trained using the sample recommendation object set and the sample target object set to obtain the object recommendation model.
[0154] For explanations regarding sample users, sample input queries, sample reference behavior sequences, sample reference interest summaries, sample reference feature sequences, sample input features, sample intent summaries, and sample target object sets, please refer to the above-mentioned content regarding target users, input queries, reference behavior sequences, reference interest summaries, reference feature sequences, input features, intent summaries, and target object sets, which will not be repeated here.
[0155] The sample recommendation object set refers to the actual set of recommended objects corresponding to the sample input query. After obtaining the sample target object set, a loss function value can be obtained using the sample recommendation object set and the sample target object set, based on a preset loss function. The model parameters of the model to be trained can be adjusted according to the loss function value until predetermined conditions are met.
[0156] For example, the model parameters of the model to be trained can be adjusted using backpropagation or stochastic gradient descent algorithms until predetermined conditions are met. The model to be trained that meets the predetermined conditions is then determined as the object recommendation model. The predetermined conditions may include at least one of the following: convergence of the loss function value and reaching the maximum number of training epochs.
[0157] Figure 9A A block diagram of an object recommendation apparatus according to an embodiment of the present disclosure is shown schematically.
[0158] like Figure 9A As shown, the object recommendation device 900A may include a first processing module 910, a second processing module 920, and an object recommendation module 930.
[0159] The first processing module 910 is used to respond to the input query received from the target user by processing the obtained reference behavior sequence of the target user to obtain a reference interest summary and a reference feature sequence.
[0160] The second processing module 920 is used to obtain an intent summary by processing the reference feature sequence and the input features determined based on the input query.
[0161] The object recommendation module 930 is used to determine the target object set and recommend the target object set to the target user based on the reference interest summary and intent summary.
[0162] Figure 9B A block diagram of a training apparatus for an object recommendation model according to an embodiment of the present disclosure is shown schematically.
[0163] like Figure 9B As shown, the training device 900B for the object recommendation model may include a third processing module 940, a fourth processing module 950, a determination module 960, and a training module 970.
[0164] The third processing module 940 is used to respond to the received sample input query from the sample user, and to obtain the sample reference interest summary and sample reference feature sequence by processing the obtained sample reference behavior sequence of the sample user. The sample input query corresponds to a set of sample recommendation objects.
[0165] The fourth processing module 950 is used to process the sample reference feature sequence and the sample input features determined based on the sample input query to obtain a sample intent summary.
[0166] The determination module 960 is used to determine the set of target objects of the sample based on the sample reference interest summary and the sample intent summary.
[0167] Training module 970 is used to train the model to be trained using the sample recommendation object set and the sample target object set, so as to obtain the object recommendation model.
[0168] Any one or more of the modules, submodules, units, and subunits according to embodiments of the present disclosure, or at least part of the functions of any one or more of them, can be implemented in one module. Any one or more of the modules, submodules, units, and subunits according to embodiments of the present disclosure can be implemented by dividing them into multiple modules. Any one or more of the modules, submodules, units, and subunits according to embodiments of the present disclosure can be at least partially implemented as hardware circuitry, such as a Field-Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a System-on-Chip, a System-on-a-Substrate, a System-on-Package, an Application-Specific Integrated Circuit (ASIC), or implemented in hardware or firmware by any other reasonable means of integrating or packaging circuitry, or implemented in software, hardware, or firmware, or in any suitable combination of any of these three implementation methods. Alternatively, one or more of the modules, submodules, units, and subunits according to embodiments of the present disclosure can be at least partially implemented as computer program modules, which, when run, can perform corresponding functions.
[0169] It should be noted that the object recommendation device part in the embodiments of this disclosure corresponds to the object recommendation method part in the embodiments of this disclosure. For a detailed description of the object recommendation device part, please refer to the object recommendation method part, which will not be repeated here. Similarly, the object recommendation model training device part in the embodiments of this disclosure corresponds to the object recommendation model training method part in the embodiments of this disclosure. For a detailed description of the object recommendation model training device part, please refer to the object recommendation model training method part, which will not be repeated here.
[0170] Figure 10 A block diagram of an electronic device suitable for implementing an object recommendation method and a training method for an object recommendation model, according to embodiments of the present disclosure, is shown schematically. Figure 10 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.
[0171] like Figure 10As shown, a computer electronic device 1000 according to an embodiment of the present disclosure includes a processor 1001, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage portion 1009 into a random access memory (RAM) 1003. The processor 1001 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 1001 may also include onboard memory for caching purposes. The processor 1001 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.
[0172] RAM 1003 stores various programs and data required for the operation of electronic device 1000. Processor 1001, ROM 1002 and RAM 1003 are interconnected via bus 1004.
[0173] According to embodiments of this disclosure, the electronic device 1000 may further include an input / output (I / O) interface 1005, which is also connected to a bus 1004. The electronic device 1000 may also include one or more of the following components connected to the input / output (I / O) interface 1005: an input section 1006 including a keyboard, mouse, etc.; an output section 1007 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1008 including a hard disk, etc.; and a communication section 1009 including a network interface card such as a LAN card, modem, etc. The communication section 1009 performs communication processing via a network such as the Internet. A drive 1010 is also connected to the input / output (I / O) interface 1005 as needed. A removable medium 1011, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 1010 as needed so that computer programs read from it can be installed into the storage section 1008 as needed.
[0174] This disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into the device / apparatus / system. The aforementioned computer-readable storage medium carries one or more programs, which, when executed, implement the object recommendation method and the object recommendation model training method according to the embodiments of this disclosure.
[0175] In this disclosure, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0176] Embodiments of this disclosure also include a computer program product comprising a computer program containing program code for performing the methods provided in the embodiments of this disclosure. When the computer program product is run on an electronic device, the program code is used to enable the electronic device to implement the object recommendation method and the object recommendation model training method provided in the embodiments of this disclosure.
[0177] When the computer program is executed by the processor 1001, it performs the functions defined in the system / apparatus of this disclosure embodiments. According to embodiments of this disclosure, the systems, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0178] According to embodiments of this disclosure, program code for executing computer programs provided in embodiments of this disclosure can be written in any combination of one or more programming languages.
[0179] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. It should also be noted that in some alternative implementations, the functions indicated in the boxes may occur in a different order than those shown in the drawings.
[0180] The embodiments of this disclosure have been described above. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of this disclosure. Although various embodiments have been described above, this does not mean that the measures in the various embodiments cannot be used advantageously in combination. The scope of this disclosure is defined by the appended claims and their equivalents. Various substitutions and modifications can be made by those skilled in the art without departing from the scope of this disclosure, and all such substitutions and modifications should fall within the scope of this disclosure.
Claims
1. A method for recommending objects, comprising: in response to receiving an input query of a target user, obtaining a reference interest summary and a reference feature sequence by processing an obtained reference behavior sequence of the target user; obtaining an intent summary by processing the reference feature sequence and an input feature determined based on the input query; and determining a target object set based on the reference interest summary and the intent summary, and recommending the target object set to the target user. The obtaining the reference interest summary and the reference feature sequence by processing the obtained reference behavior sequence of the target user comprises:
2. The method of claim 1, wherein, randomly initializing a vector of the same dimension according to a first intermediate feature sequence obtained by embedding processing on the reference behavior sequence to obtain an interest summary symbol; and determining the reference interest summary and the reference feature sequence according to the interest summary symbol and the first intermediate feature sequence, wherein the interest summary symbol is obtained by aggregating the first intermediate feature sequence to form the reference interest summary. The first intermediate feature sequence comprises M candidate intermediate features arranged in a time sequence, M being a positive integer; 3. The method of claim 2, wherein, The determining the reference feature sequence according to the interest summary symbol and the first intermediate feature sequence comprises: processing the interest summary symbol and M candidate intermediate features based on a first attention strategy to obtain a second intermediate feature sequence, wherein the first attention strategy is used to interact with M candidate intermediate features to capture a time sequence dependency; and processing the second intermediate feature sequence based on a first routing strategy to obtain the reference feature sequence. The processing the interest summary symbol and M candidate intermediate features based on a first attention strategy to obtain a second intermediate feature sequence comprises:
4. The method of claim 3, wherein, determining a first intermediate feature and a first query matrix corresponding to the first intermediate feature in M candidate intermediate features; determining a first key matrix and a first value matrix corresponding to other candidate intermediate features respectively; determining a first attention weight matrix corresponding to the candidate intermediate features respectively according to the first query matrix and the first key matrix corresponding to the candidate intermediate features respectively; and determining a second intermediate feature corresponding to the first intermediate feature according to the first attention weight matrix corresponding to the candidate intermediate features respectively and the first value matrix. The second intermediate feature sequence comprises M second intermediate features, the first routing strategy comprises a selection strategy and a fusion strategy, and the reference feature sequence comprises M reference features; 5. The method of claim 3, wherein, For each second intermediate feature, the processing the second intermediate feature sequence based on a first routing strategy to obtain the reference feature sequence comprises: determining the at least two target experts according to the selection strategy in P candidate experts, wherein P is a positive integer; and fusing output features of the at least two target experts respectively according to the fusion strategy to obtain the reference feature, wherein the fusion strategy indicates a weight for each output feature. 6. The method of claim 5, wherein, The determining the at least two target experts from the P candidate experts according to the selection strategy comprises: determining respective evaluation values of the second intermediate features with respect to the P candidate experts, to obtain P evaluation values; and determining the candidate experts corresponding to the first p evaluation values in the sorted P evaluation values as the target experts.
7. The method of claim 6, for each of the candidate experts, the method further comprises: in response to a number of the candidate experts selected as the target experts failing to satisfy a preset balance condition, adjusting a load balance bias for the candidate expert to make the number satisfy the preset balance condition; wherein the preset balance condition is determined according to a mean value of the number of the candidate experts selected as the target experts and a preset parameter, and the preset parameter is determined according to uniformity of a user behavior distribution.
8. The method of claim 7, wherein, The preset balance condition comprises a lower limit value and an upper limit value determined based on the mean value of the number and the preset parameter. The adjusting the load balance bias for the candidate expert comprises: decreasing the load balance bias when the number of the candidate experts selected as the target experts is greater than the upper limit value; increasing the load balance bias when the number of the candidate experts selected as the target experts is less than the lower limit value; and keeping the load balance bias unchanged when the number of the candidate experts selected as the target experts is between the lower limit value and the upper limit value.
9. The method of any one of claims 1 to 8, wherein, The reference feature sequence comprises M reference features; The obtaining the intent summary by processing the reference feature sequence and the input feature determined based on the input query comprises: concatenating an embedding vector of the input query and embedding vectors of a candidate object set obtained based on the input query to obtain the input feature; processing the input feature and the reference feature sequence based on a second attention strategy to obtain a third intermediate feature sequence, wherein the second attention strategy is used to interact the input feature and the M reference features to capture a time sequence dependency; and processing the third intermediate feature sequence based on a second routing strategy to obtain the intent summary.
10. The method of claim 9, wherein, The reference feature sequence comprises N reference features, and the third intermediate feature sequence comprises a third intermediate feature of each of the N reference features, N being a positive integer; The processing the input feature and the reference feature sequence based on the second attention strategy to obtain the third intermediate feature sequence comprises: determining a second query matrix corresponding to the input feature; determining a second key matrix and a second value matrix corresponding to each of the N reference features; determining a second attention weight matrix corresponding to each of the N reference features according to the second query matrix and the second key matrix corresponding to each of the N reference features; and determining a third intermediate feature corresponding to the reference feature according to the second attention weight matrix corresponding to each of the N reference features and the second value matrix.
11. The method of any one of claims 1 to 8, wherein, determining a target object set based on the reference interest summary and the intention summary, and recommending the target object set to the target user, comprises: concatenating the reference interest summary and the intention summary to obtain a concatenated feature; and determining the target object set from a candidate object set obtained based on the input query according to the concatenated feature.
12. The method of claim 11, wherein, The candidate object set includes Q candidate objects, and Q is a positive integer; The determining the target object set from the candidate object set obtained based on the input query according to the concatenated feature comprises: determining a similarity between the concatenated feature and each of the Q candidate objects to obtain Q similarities; and determining the candidate objects corresponding to the first q similarities in the ordered Q similarities as the target object set.
13. A training method of an object recommendation model, comprising: in response to receiving a sample input query of a sample user, obtaining a sample reference interest summary and a sample reference feature sequence by processing a sample reference behavior sequence of the sample user, wherein the sample input query corresponds to a sample recommendation object set; obtaining a sample intention summary by processing the sample reference feature sequence and a sample input feature determined based on the sample input query; determining a sample target object set based on the sample reference interest summary and the sample intention summary; and training a to-be-trained model using the sample recommendation object set and the sample target object set to obtain the object recommendation model.
14. An object recommendation apparatus, comprising: a first processing module configured to, in response to receiving an input query of a target user, obtain a reference interest summary and a reference feature sequence by processing a reference behavior sequence of the target user; a second processing module configured to obtain an intention summary by processing the reference feature sequence and an input feature determined based on the input query; and an object recommendation module configured to determine a target object set based on the reference interest summary and the intention summary, and recommend the target object set to the target user.
15. A training apparatus of an object recommendation model, comprising: a third processing module configured to, in response to receiving a sample input query of a sample user, obtain a sample reference interest summary and a sample reference feature sequence by processing a sample reference behavior sequence of the sample user, wherein the sample input query corresponds to a sample recommendation object set; a fourth processing module configured to obtain a sample intention summary by processing the sample reference feature sequence and a sample input feature determined based on the sample input query; a determination module configured to determine a sample target object set based on the sample reference interest summary and the sample intention summary; and a training module configured to train a to-be-trained model using the sample recommendation object set and the sample target object set to obtain the object recommendation model.
16. An electronic device, comprising: one or more processors; a memory for storing one or more computer programs, characterized in that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1 to 13.
17. A computer readable storage medium having stored thereon a computer program or instructions, characterized in that, The computer program or instructions, when executed by a processor, implement the steps of the method according to any one of claims 1 to 13.
18. A computer program product comprising computer programs or instructions, characterized in that, The computer program or instructions, when executed by a processor, implement the steps of the method according to any one of claims 1 to 13.