Article recall method and device, storage medium, and electronic device

CN113379493BActive Publication Date: 2026-10-27BEIJING SANKUAI ONLINE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110642396.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-06-09
Publication Date
2026-10-27
Estimated Expiration
2041-06-09

AI Technical Summary

Technical Problem

这样召回模型会倾向于大类别物品,会使数量最多的物品类别的召回准确率最高,其他类别 物品的召回准确率都偏低,间接的损害了其他物品类别的召回准确率

Benefits of technology

[0039]在本公开的示例性实施例提供的方法及装置中,一方面,对第一特 征向量和第二特征向量进行特征归一化处理,以使物品召回分值的计算 简化为点积相似度,减少了在线服务的计算成本和时间成本,提升了物 品召回的效率;另一方面,将类别对齐损失值作为确定召回物品的数据 基础,使得应用在大数据量的类别物品上的召回方式能够迁移转化到小 数据量的类别物品的召回上,将各个类别的物品召回方式对齐,提高了 各种小类别物品的召回准确率,同步促进了所有类别物品的召回精度的 提升,也丰富了物品召回方法的应用场景。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113379493B_ABST
    Figure CN113379493B_ABST
Patent Text Reader

Abstract

The present disclosure belongs to the technical field of computers and relates to an item recall method and device, a storage medium and an electronic device. The method comprises: obtaining user data features, item information features and item category identifiers, and performing sparse mapping processing to obtain a to-be-input user vector; performing iterative full connection processing on the to-be-input user vector to obtain a first feature vector, and performing feature normalization processing to obtain a user representation vector; performing sparse mapping processing on the item information features to obtain a to-be-input item vector, and performing iterative full connection processing to obtain a second feature vector; performing feature normalization processing on the second feature vector to obtain an item representation vector, and performing category alignment loss calculation to obtain a category alignment loss value; and based on the category alignment loss value, performing dot product similarity calculation on the user representation vector and the item representation vector to obtain an item recall score, so as to determine a recalled item. The present disclosure improves the recall accuracy of small-category items and the recall precision of all-category items.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer technology, and in particular to a method and device for recalling items, a computer-readable storage medium, and an electronic device. Background Technology

[0002] Recommender systems are widely used in e-commerce, filtering items of interest to users from a vast pool of candidates. The core challenge of this large-scale recommendation system is accurately rating tens or even hundreds of millions of items in real time. A common industry practice is to view recommender systems as a two-stage architecture. The recall module first retrieves a small subset of relevant candidate items from a large corpus, while the ranking model sorts the retrieved items based on previously collected user behavior data. Clearly, the quality of the candidate item set retrieved by the recall module significantly impacts the performance of the subsequent ranking module. Therefore, improving the recall performance of the recall model on a large corpus is crucial for enhancing the overall performance of the recommender system.

[0003] Existing industrial-grade recall methods primarily use deep neural networks to build recall models. While recall models are widely used in industry, the diverse business categories of items and the significant uneven distribution of numbers across categories (e.g., food delivery, hotels, tourism, movies, entertainment, etc.) mean that certain item categories (e.g., food delivery) may constitute the majority. Since recall models are highly statistical, they learn better for item categories that appear more frequently. This leads to a bias towards large item categories, resulting in the highest recall accuracy for the most numerous categories and lower recall accuracy for other categories, indirectly harming their recall accuracy.

[0004] Therefore, there is an urgent need in the field to develop a new method and apparatus for recalling items.

[0005] It should be noted that the information disclosed in the background section above is only used to enhance the understanding of the background of this disclosure, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention

[0006] The purpose of this disclosure is to provide a method, device, computer-readable storage medium, and electronic device for recalling items, thereby overcoming, at least to some extent, the technical problem of low recall accuracy caused by limitations in related technologies.

[0007] Other features and advantages of this disclosure will become apparent from the following detailed description, or may be learned in part from practice of this disclosure.

[0008] According to a first aspect of the present invention, an item recall method is provided, the method comprising: acquiring user data features, item information features and item category identifiers, and performing sparse mapping processing on the user data features to obtain a user vector to be input;

[0009] The user vector to be input is subjected to iterative fully connected processing to obtain a first feature vector, and the first feature vector is subjected to feature normalization processing to obtain a user representation vector;

[0010] The item information features are sparsely mapped to obtain the input item vector, and the input item vector is iteratively fully connected to obtain the second feature vector.

[0011] The second feature vector is normalized to obtain the item representation vector, and the category alignment loss is calculated on the user representation vector, the item representation vector and the item category identifier to obtain the category alignment loss value;

[0012] Based on the category alignment loss value, the dot product similarity of the user representation vector and the item representation vector is calculated to obtain the item recall score, and the recalled items are determined according to the item recall score.

[0013] In an exemplary embodiment of the present invention, the step of calculating the category alignment loss value by performing category alignment loss calculation on the user representation vector, the item representation vector, and the item category identifier includes:

[0014] The main loss value is obtained by performing cross-entropy loss calculation on the user representation vector and the item representation vector;

[0015] The secondary loss value is obtained by performing category loss calculation on the item representation vector based on the item category identifier, and the category alignment loss value is determined based on the primary loss value and the secondary loss value.

[0016] In an exemplary embodiment of the present invention, the step of calculating a secondary loss value by performing category loss calculation on the item representation vector based on the item category identifier includes:

[0017] Determine the primary category item identifier and secondary category item identifier that make up the item category identifier, and calculate the feature covariance of the item representation vector corresponding to the primary category item identifier to obtain the primary category matrix;

[0018] The feature covariance of the item representation vector corresponding to the sub-category item identifier is calculated to obtain the sub-category matrix, and matrix calculations are performed on the main category matrix and the sub-category matrix to obtain the secondary loss value.

[0019] In an exemplary embodiment of the present invention, determining the category alignment loss value based on the primary loss value and the secondary loss value includes:

[0020] Determine the loss coefficient corresponding to the secondary loss value;

[0021] The category alignment loss value is obtained by performing loss calculations on the primary loss value, the secondary loss value, and the loss coefficient.

[0022] In an exemplary embodiment of the present invention, the step of performing sparse mapping processing on the user data features to obtain the user vector to be input includes:

[0023] The dense user features and sparse user features in the user data features are determined, and the sparse user features are subjected to feature encoding processing to obtain the user encoded features;

[0024] The user-encoded features are processed by feature mapping to obtain a user embedding vector, and the user embedding vector and the dense user features are concatenated to obtain the user vector to be input.

[0025] In an exemplary embodiment of the present invention, the step of performing sparse mapping processing on the item information features to obtain the input item vector includes:

[0026] The dense and sparse features of the item information are determined, and the sparse features are processed by feature encoding to obtain the item encoding features;

[0027] The item encoding features are processed by feature mapping to obtain the item embedding vector, and the item embedding vector and the dense features of the item are concatenated to obtain the input item vector.

[0028] In one exemplary embodiment of the present invention, the method further includes:

[0029] Based on the category alignment loss value, the input user vector is iteratively fully connected to obtain the first feature vector, so as to determine the recall item;

[0030] Based on the category alignment loss value, the input item vector is iteratively fully connected to obtain a second feature vector, in order to determine the recalled item.

[0031] According to a second aspect of the present invention, an item recall device is provided, the device comprising: a sparse mapping module configured to acquire user data features, item information features and item category identifiers, and to perform sparse mapping processing on the user data features to obtain a user vector to be input;

[0032] The feature normalization module is configured to perform iterative fully connected processing on the user vector to be input to obtain a first feature vector, and perform feature normalization processing on the first feature vector to obtain a user representation vector;

[0033] The iterative processing module is configured to perform sparse mapping processing on the item information features to obtain the input item vector, and perform iterative fully connected processing on the input item vector to obtain the second feature vector.

[0034] The alignment loss module is configured to perform feature normalization on the second feature vector to obtain an item representation vector, and to perform category alignment loss calculation on the user representation vector, the item representation vector, and the item category identifier to obtain a category alignment loss value;

[0035] The item determination module is configured to calculate the item recall score by performing a dot product similarity calculation on the user representation vector and the item representation vector based on the category alignment loss value, so as to determine the recalled items according to the item recall score.

[0036] According to a third aspect of the present invention, an electronic device is provided, comprising: a processor and a memory; wherein the memory stores computer-readable instructions, which, when executed by the processor, implement the item recall method of any of the above exemplary embodiments.

[0037] According to a fourth aspect of the present invention, a computer-readable storage medium is provided, on which a computer program is stored, wherein the computer program, when executed by a processor, implements the item recall method in any of the above exemplary embodiments.

[0038] As can be seen from the above technical solutions, the item recall method, item recall device, computer storage medium, and electronic device in the exemplary embodiments of the present invention have at least the following advantages and positive effects:

[0039] In the methods and apparatus provided by the exemplary embodiments of this disclosure, on the one hand, feature normalization processing is performed on the first feature vector and the second feature vector to simplify the calculation of the item recall score to dot product similarity, thereby reducing the computational and time costs of online services and improving the efficiency of item recall; on the other hand, the category alignment loss value is used as the data basis for determining the recalled items, so that the recall method applied to category items with a large amount of data can be transferred to the recall of category items with a small amount of data, aligning the item recall methods of each category, improving the recall accuracy of various subcategories of items, simultaneously promoting the improvement of the recall accuracy of all categories of items, and enriching the application scenarios of the item recall method.

[0040] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

[0041] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure. It is obvious that the drawings described below are merely some embodiments of this disclosure, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.

[0042] Figure 1 This schematic diagram illustrates a flowchart of an article recall method according to an exemplary embodiment of the present disclosure;

[0043] Figure 2 The schematic diagram illustrates a flowchart of a method for obtaining a user vector to be input in an exemplary embodiment of this disclosure;

[0044] Figure 3 The schematic diagram illustrates a flowchart of a method for obtaining an input item vector in an exemplary embodiment of this disclosure;

[0045] Figure 4 The schematic diagram illustrates a flowchart of a method for calculating category alignment loss in an exemplary embodiment of this disclosure;

[0046] Figure 5 The schematic diagram illustrates a flowchart of a method for obtaining secondary loss values ​​in an exemplary embodiment of this disclosure;

[0047] Figure 6 The schematic diagram illustrates a flowchart of a method for determining category alignment loss values ​​in an exemplary embodiment of this disclosure;

[0048] Figure 7 This schematic diagram illustrates a process flow diagram of a method for determining recalled items in an exemplary embodiment of this disclosure;

[0049] Figure 8 This illustration shows a flowchart of an item recall method in an application scenario of an exemplary embodiment of the present disclosure.

[0050] Figure 9 This schematic diagram illustrates the structure of an article recall device according to an exemplary embodiment of the present disclosure;

[0051] Figure 10 An electronic device for implementing an article recall method is illustrated schematically in an exemplary embodiment of this disclosure;

[0052] Figure 11The illustration schematically depicts a computer-readable storage medium for implementing an article recall method according to an exemplary embodiment of the present disclosure. Detailed Implementation

[0053] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided to make this disclosure more comprehensive and complete, and to fully convey the concept of the exemplary embodiments to those skilled in the art. The described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a full understanding of embodiments of this disclosure. However, those skilled in the art will recognize that the technical solutions of this disclosure can be practiced with one or more of these specific details omitted, or other methods, components, apparatus, steps, etc., can be employed. In other instances, well-known technical solutions are not shown or described in detail to avoid obscuring various aspects of this disclosure.

[0054] The terms “a,” “an,” “the,” and “the” used in this specification are used to indicate the presence of one or more elements / components / etc.; the terms “including” and “having” are used to indicate an open-ended inclusion and to mean that there may be other elements / components / etc. in addition to the listed elements / components / etc.; the terms “first” and “second” are used only as markings and are not a limitation on the number of objects.

[0055] Furthermore, the accompanying drawings are merely illustrative of this disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and therefore repeated descriptions of them will be omitted. Some block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities.

[0056] In view of the problems existing in the related technologies, this disclosure proposes a method for recalling items. Figure 1 A flowchart of the item recall method is shown, such as Figure 1 As shown, the item recall method includes at least the following steps:

[0057] Step S110. Obtain user data features, item information features, and item category identifiers, and perform sparse mapping processing on the user data features to obtain the user vector to be input.

[0058] Step S120. Perform iterative fully connected processing on the input user vector to obtain the first feature vector, and perform feature normalization processing on the first feature vector to obtain the user representation vector.

[0059] Step S130. Perform sparse mapping on the item information features to obtain the input item vector, and perform iterative fully connected processing on the input item vector to obtain the second feature vector.

[0060] Step S140. Perform feature normalization on the second feature vector to obtain the item representation vector, and calculate the category alignment loss value by performing category alignment loss on the user representation vector, item representation vector and item category identifier.

[0061] Step S150. Based on the category alignment loss value, calculate the dot product similarity between the user representation vector and the item representation vector to obtain the item recall score, and determine the recalled items according to the item recall score.

[0062] In the exemplary embodiments of this disclosure, on the one hand, feature normalization processing is performed on the first feature vector and the second feature vector to simplify the calculation of the item recall score to dot product similarity, thereby reducing the computational and time costs of online services and improving the efficiency of item recall; on the other hand, the category alignment loss value is used as the data basis for determining the recalled items, so that the recall method applied to category items with a large amount of data can be transferred to the recall of category items with a small amount of data, aligning the item recall methods of each category, improving the recall accuracy of various subcategories of items, simultaneously promoting the improvement of the recall accuracy of all categories of items, and enriching the application scenarios of the item recall method.

[0063] The following provides a detailed explanation of each step in the product recall process.

[0064] In step S110, user data features, item information features, and item category identifiers are obtained, and sparse mapping processing is performed on the user data features to obtain the user vector to be input.

[0065] In an exemplary embodiment of this disclosure, user data features may include user features and scenario features. User features include features of basic user information and user historical behavior records; scenario features include various environmental features such as geographical location, time, and weather. In addition, user data features may also include features of other content, which are not specifically limited in this exemplary embodiment.

[0066] Item information features include item features and content features. Item features include the item's ID (Identity Document), category, and price; content features include item reviews and seller descriptions. In addition, item information features may include other content features, which are not specifically limited in this exemplary embodiment.

[0067] An item category identifier can be an identifier for each item in the candidate item set, and this item category identifier is a dense feature. For example, when there are 7 item categories, the item category identifier can be represented by c, where c∈{1,2,3,4,5,6,7}. c=1 represents category 1, indicating the item category with the largest amount of data in the candidate item set, while items with other item category identifiers belong to categories with smaller amounts of data.

[0068] In this context, a feature can be understood as an expression of data. If each data point is treated as a vector, the features corresponding to each data point can be represented by another vector. Therefore, sparse features can be understood as feature vectors containing many zeros, while the dimension of the non-zero vectors is much smaller than the dimension of the feature vector. Sparse features are generally discrete features. Dense features, in contrast to sparse features, are generally continuous features. Taking user features as an example, user gender and age are sparse features, while user activity level, user activity duration, and other user features are dense features.

[0069] Furthermore, sparse mapping can be performed on the user data features to obtain the user vector to be input.

[0070] In an optional embodiment, Figure 2 The flowchart illustrating the method for obtaining the user vector to be input is shown, as follows: Figure 2 As shown, the method includes at least the following steps: In step S210, dense user features and sparse user features in the user data features are determined, and the sparse user features are processed by feature encoding to obtain user encoded features.

[0071] Based on the relativity of dense and sparse features in actual situations, or the distinction between discrete and continuous types, user dense features and user sparse features in user data features can be determined.

[0072] Furthermore, one-hot encoding of the sparse user features can yield the corresponding user-coded features.

[0073] One-hot encoding mainly uses an N-bit state register to encode N states. Each state has its own independent register bit, and only one bit is valid at any given time.

[0074] In step S220, feature mapping is performed on the user-encoded features to obtain the user embedding vector, and feature concatenation is performed on the user embedding vector and the dense user features to obtain the user vector to be input.

[0075] Specifically, user-encoded features are mapped into a low-dimensional dense vector e through a mapping embedding layer.i This is the user embedding vector. K is the dimension of the vector. This mapping embedding layer mainly defines an embedding matrix. The embedding matrix E is learned and updated during training. D represents the number of unique features in all user and item data, that is, the number of different categories in user and item data. The embedding vector of the i-th feature is the i-th column of the embedding matrix E.

[0076] After obtaining the user embedding vector, the user embedding vector and the dense user features can be concatenated according to formula (1):

[0077] z u =[e 253 ||e sh ||e male ||...] (1)

[0078] Where || represents feature concatenation processing. 253 Represents UID (User Identification), e sh Indicates the geographical location as Shanghai, e male Indicates male, ..., z u This represents the user vector to be input.

[0079] In this exemplary embodiment, the corresponding user embedding vector can be obtained by performing feature encoding and feature mapping on the sparse features of the user. This vector is then concatenated with the dense features of the user to obtain the input user vector, providing a data foundation for subsequent feature processing. The process is simple, accurate, and highly practical.

[0080] In step S120, the input user vector is subjected to iterative fully connected processing to obtain the first feature vector, and the first feature vector is subjected to feature normalization processing to obtain the user representation vector.

[0081] In one exemplary embodiment of this disclosure, after obtaining the user vector to be input, iterative fully connected processing can be performed on the user vector to be input.

[0082] Specifically, this iterative fully connected processing can be performed by stacking fully connected layers with RELU (Rectified Linear Unit) activation functions.

[0083] RELU is a commonly used activation function in artificial neural networks, usually referring to nonlinear functions represented by the ramp function and its variants.

[0084] Specifically, iterative full-connection processing can be performed according to formulas (2) and (3):

[0085] h1=ReLU(W1z+b1),… (2)

[0086] h L =ReLU(W l h L-1 +b l (3)

[0087] Where z can represent the user vector to be input. u W l and b l Let h represent the weight matrix and bias vector of the l-th layer of the fully connected layer, respectively. L It can represent the first eigenvector.

[0088] After obtaining the first eigenvector, feature normalization can be performed according to formula (4):

[0089] p = L2Norm(h) L (4)

[0090] Clearly, this integer normalization process can be implemented using an L2 normalization layer. Here, p represents the output of the feature normalization process. u That is, the user representation vector.

[0091] The L2 normalization layer is used to normalize the norm of the user representation vector corresponding to the first feature vector to 1.

[0092] In step S130, the sparse mapping process is performed on the item information features to obtain the input item vector, and the input item vector is subjected to iterative fully connected processing to obtain the second feature vector.

[0093] In one exemplary embodiment of this disclosure, after obtaining the item information features, the item information features can be subjected to sparse mapping processing to obtain the input item vector.

[0094] In an optional embodiment, Figure 3 The flowchart illustrating the method for obtaining the vector of the item to be input is shown, as follows: Figure 3 As shown, the method includes at least the following steps: In step S310, the dense features and sparse features of the items in the item information features are determined, and the sparse features of the items are processed by feature encoding to obtain the item encoding features.

[0095] Based on the relativity of dense and sparse features in actual situations, or the distinction between discrete and continuous types, the dense and sparse features of items in item information features can be determined.

[0096] Furthermore, one-hot encoding of the sparse features of the items can yield the corresponding item encoding features. The encoding method is the same as in step S210, and will not be repeated here.

[0097] In step S320, feature mapping is performed on the item encoding features to obtain the item embedding vector, and feature concatenation is performed on the item embedding vector and the dense features of the item to obtain the input item vector.

[0098] Specifically, item coding features can also be mapped into low-dimensional dense vectors through the mapping embedding layer, which are the item embedding vectors.

[0099] After obtaining the item embedding vector, the item embedding vector and the dense features of the item can be concatenated according to formula (5):

[0100] z v =[e 149 ||e p10 ||e cate ||...] (5)

[0101] Where || represents feature concatenation processing. 149 This represents IID (Item Identification), e p10 This indicates a price of 10, e cate The category is food, ..., z v This represents the vector of items to be input.

[0102] In this exemplary embodiment, the corresponding item embedding vector can be obtained by performing feature encoding and feature mapping on the sparse features of the item. This vector is then concatenated with the dense features of the item to obtain the input item vector, providing a data foundation for subsequent feature processing. The process is simple, accurate, and highly practical.

[0103] After obtaining the input item vector, an iterative fully connected process can be performed on the input item vector to obtain the second feature vector.

[0104] Specifically, this iterative fully connected processing can be performed by stacking fully connected layers with ReLU activation functions to obtain the second feature vector. The iterative fully connected processing can also be implemented according to formulas (2) and (3), and z can also represent the input item vector z. v h LIt can also represent the second eigenvector. It's worth noting that W here... l and b l It can be W, which is related to the input user vector. l and b l These can be network parameters with the same network structure but different values.

[0105] In step S140, the second feature vector is normalized to obtain the item representation vector, and the category alignment loss is calculated on the user representation vector, the item representation vector and the item category identifier to obtain the category alignment loss value.

[0106] In one exemplary embodiment of this disclosure, after obtaining the second feature vector, feature normalization processing can be performed on the second feature vector to obtain the item representation vector. The specific feature normalization processing method can also be performed according to formula (4), where p can also represent the output of the feature normalization processing. v That is, the item representation vector.

[0107] After obtaining the item representation vector and the user representation vector, the category alignment loss value can be calculated by further performing category alignment calculations on the user representation vector, item representation vector, and item category identifier.

[0108] In an optional embodiment, Figure 4 A flowchart illustrating the method for calculating category alignment loss is shown, as follows: Figure 4 As shown, the method includes at least the following steps: In step S410, the cross-entropy loss is calculated on the user representation vector and the item representation vector to obtain the main loss value.

[0109] Specifically, the cross-entropy loss can be calculated for the user representation vector and the item representation vector according to the cross-entropy loss function shown in formula (6):

[0110]

[0111] Where T is the dataset The total number of data entries in the dataset, σ(·) represents the sigmoid activation function, p v Let p be the item representation vector. u User representation vector, loss p This represents the primary loss value.

[0112] In step S420, a secondary loss value is obtained by calculating the category loss of the item representation vector based on the item category identifier, and a category alignment loss value is determined based on the primary loss value and the secondary loss value.

[0113] In an optional embodiment, Figure 5A flowchart illustrating the method for obtaining secondary loss values ​​is shown, such as... Figure 5 As shown, the method includes at least the following steps: In step S510, the main category item identifier and the sub-category item identifier that make up the item category identifier are determined, and the feature covariance of the item representation vector corresponding to the main category item identifier is calculated to obtain the main category matrix.

[0114] Since the item category identifier is 1, which represents the item category with the largest amount of data in the item candidate set, i.e., the main category item identifier, when obtaining the item category identifier, other item category identifiers besides the item category identifier 1 are determined as the sub-category item identifiers.

[0115] Furthermore, the item representation vectors corresponding to the main category item identifiers form the main category item set S. major Each item corresponding to a subcategory item identifier can form its own item representation vector set S. 2 ,S 3 ,…,S 6 ,S 7 .

[0116] Furthermore, in the set of main category items corresponding to the main category identifier, the feature covariance of the item representation vector corresponding to the main category item identifier is calculated according to formula (7) to obtain the main category matrix:

[0117]

[0118] In step S520, the feature covariance of the item representation vector corresponding to the sub-category item identifier is calculated to obtain the sub-category matrix, and matrix calculations are performed on the main category matrix and the sub-category matrix to obtain the secondary loss value.

[0119] Similarly, in the set of sub-category items corresponding to the sub-category identifier, the feature covariance of the item representation vector corresponding to the sub-category item identifier is calculated according to formula (7) to obtain the sub-category matrix.

[0120] Furthermore, the secondary loss value can be obtained by performing matrix calculations on the primary category matrix and the secondary category matrix according to formula (8):

[0121]

[0122] in, Represents the square root of the sum of the squares of all corresponding elements in the matrix. , n represents the number of categories. , C(·) represents the primary category matrix or the secondary category matrix. 。

[0123] In this exemplary embodiment, formula (6) allows the feature second-order statistics of the item identifier vector corresponding to the sub-category item identifier to be aligned with those of the item identifier vector corresponding to the main category item identifier. This adds a constraint to the learning of small sample categories, enabling the relationships between the dimensions of the item representation vector to be similar to those of the main category even with insufficient data. This aligns the features in the item representation vectors of each category, allowing the item recall method to be used on other item categories, thereby improving the effectiveness of the item recall method.

[0124] After obtaining the primary and secondary loss values, the category loss value can be determined based on the primary and secondary loss values.

[0125] In an optional embodiment, Figure 6 A flowchart illustrating the method for determining the category alignment loss value is shown, as follows: Figure 6 As shown, the method includes at least the following steps: In step S610, the loss coefficient corresponding to the secondary loss value is determined.

[0126] The loss coefficient can be a hyperparameter. In the context of machine learning, hyperparameters are parameters whose values ​​are set before the learning process begins, rather than parameters obtained through training. Typically, hyperparameters need to be optimized to select an optimal set for the learning machine to improve learning performance and effectiveness. Therefore, this loss coefficient can be manually tuned.

[0127] In step S620, the primary loss value, secondary loss value, and loss coefficient are used to calculate the category alignment loss value.

[0128] After determining the loss coefficient, the category alignment loss value can be obtained by calculating the loss using formula (9) based on the primary loss value, secondary loss value, and loss coefficient:

[0129] loss = loss p +λloss CA (9)

[0130] Where λ is the loss coefficient, loss p This represents the primary loss value. CA is the secondary loss value, and loss is the class alignment loss value.

[0131] In this exemplary embodiment, the category alignment loss value can be obtained based on the primary loss value and the secondary loss value. The calculation method is simple, and the category alignment loss mechanism based on the category alignment loss value is used to implement the item recall, ensuring the effectiveness of the item recall.

[0132] In step S150, based on the category alignment loss value, the dot product similarity of the user representation vector and the item representation vector is calculated to obtain the item recall score, so as to determine the recalled items according to the item recall score.

[0133] In one exemplary embodiment of this disclosure, in order to apply the category alignment loss value to item recall, a loss value threshold corresponding to the category alignment loss value can be set.

[0134] When the category alignment loss value is less than the loss value threshold, the item recall score can be obtained by calculating the dot product similarity between the user representation vector and the item representation vector.

[0135] Specifically, the dot product similarity can be calculated according to formula (10):

[0136] s(u,v)= <p u ,p v > (10)

[0137] Here, s(u,v) represents the item recall score, which indicates the similarity between the item and the user. The larger the s(u,v) value, the higher the user u's preference for item v.

[0138] In practice, after obtaining the item recall score, you can select N items with the highest recall score as the recall items according to your needs.

[0139] In addition, when the category alignment loss value is greater than or equal to the set loss value threshold, the process can be reprocessed based on the category loss value to determine the items to be recalled.

[0140] In an optional embodiment, Figure 7 A flowchart illustrating the method for determining recalled items is shown, such as... Figure 7 As shown, the method includes at least the following steps: In step S710, based on the category alignment loss value, the input user vector is subjected to iterative fully connected processing again to obtain the first feature vector, so as to determine the recall item.

[0141] When the category loss value is greater than or equal to the set loss threshold, it means that even with subsequent item recall processing, the recalled item cannot be determined. Therefore, the weight matrix and bias vector in the fully connected layer of the iterative fully connected processing can be adjusted to re-process the input user vector using the iterative fully connected layer, followed by subsequent feature normalization and other processes, until the new category alignment loss value meets the loss threshold. Only then can the dot product similarity be calculated to determine the corresponding recalled item.

[0142] In step S720, based on the category alignment loss value, the input item vector is iteratively fully connected to obtain a second feature vector to determine the recalled item.

[0143] When the category loss value is greater than or equal to the set loss threshold, it means that even with subsequent item recall processing, the recalled item cannot be determined. Therefore, the weight matrix and bias vector in the fully connected layer of the iterative fully connected processing can be adjusted to re-process the input item vector through iterative fully connected processing, followed by subsequent feature normalization and other processes, until the new category alignment loss value meets the loss threshold. Only then is dot product similarity calculation performed to determine the corresponding recalled item.

[0144] In this exemplary embodiment, the item recall method can be processed multiple times based on the category alignment loss value to ensure the accuracy of item recall determination and the effectiveness of item recall.

[0145] The following describes in detail the item recall method in this embodiment of the present disclosure, using an application scenario as an example.

[0146] Figure 8 The flowchart illustrates the item recall method in an application scenario, as shown below. Figure 8 As shown, the item can be a commodity. The recall method for commodities can be implemented using a category-aligned dual-tower model. The category-aligned dual-tower model incorporates a category alignment loss mechanism to improve the recall accuracy of commodities in each category when dealing with multi-category commodities.

[0147] Add a product category identifier c to all products in the product candidate set. Here, c ∈ {1,2,3,4,5,6,7}. c = 1 represents category 1, indicating the product category with the largest amount of data in the product candidate set (e.g., food delivery). Therefore, other product category identifiers represent products in categories with smaller amounts of data.

[0148] It is worth noting that the number of product category identifiers can also be set to other numbers depending on other circumstances, and this exemplary embodiment does not impose any special limitations on this.

[0149] In addition, it can also obtain user data characteristics and product information characteristics.

[0150] User data features may include user characteristics and context features. User characteristics include basic user information and features related to the user's historical behavior records; context features include various environmental features such as geographical location, time, and weather. In addition, user data features may also include other features, which are not specifically limited in this exemplary embodiment.

[0151] Product information features include product features and content features. Product features include characteristics such as the product's ID, category, and price; content features include characteristics such as product reviews and seller descriptions. In addition, product information features may also include other content features, which are not specifically limited in this exemplary embodiment.

[0152] Furthermore, both user data features and product information features can be categorized into dense features and sparse features. Therefore, we can determine the dense and sparse user features in the user data features, and the dense and sparse product features in the product information features.

[0153] Specifically, based on the distinction between the relativity or discreteness and continuity of dense and sparse features in actual situations, the dense and sparse features of user data can be identified.

[0154] Similarly, based on the distinction between the relativity or discreteness and continuity of dense and sparse features in actual situations, the dense and sparse features of goods in the product information features can be determined.

[0155] Furthermore, one-hot encoding of sparse user features can yield corresponding user coding features, and one-hot encoding of sparse product features can yield corresponding product coding features.

[0156] Then, feature mapping is performed on the user-coded features to obtain the user embedding vector, and feature mapping is performed on the product-coded features to obtain the product embedding vector.

[0157] Feature mapping processing can be achieved by mapping user-encoded features or product-encoded features into a low-dimensional dense vector e through a mapping embedding layer. i This yields the corresponding user embedding vector or product embedding vector. K is the dimension of the vector. This mapping embedding layer mainly defines an embedding matrix. The embedding matrix E is learned and updated during training. D represents the number of unique features in all user and product data, that is, the number of different categories in user and product data. The embedding vector of the i-th feature is the i-th column of the embedding matrix E.

[0158] Subsequently, the user embedding vector and the dense user features are processed by feature concatenation according to formula (1) to obtain the user vector to be input, and the product embedding vector and the dense product features are processed by feature concatenation according to formula (5) to obtain the product vector to be input.

[0159] After obtaining the user vector to be input, iterative fully connected processing can be performed on the user vector. Specifically, this iterative fully connected processing can be performed by stacking fully connected layers with the ReLU activation function. For example, the first feature vector is obtained by performing iterative fully connected processing according to formulas (2) and (3).

[0160] After obtaining the input product vector, iterative fully connected processing can be performed on the input product vector to obtain the second feature vector. Specifically, this iterative fully connected processing can be performed by stacking fully connected layers with the ReLU activation function to obtain the second feature vector. The iterative fully connected processing can also be implemented according to formulas (2) and (3).

[0161] After obtaining the first feature vector, the feature is normalized by the L2 normalization layer according to formula (4) to obtain the user representation vector. The second feature vector can also be normalized to obtain the product representation vector.

[0162] After obtaining the product representation vector and the user representation vector, the category alignment loss value can be calculated by further performing category alignment on the user representation vector, product representation vector, and product category identifier.

[0163] First, the primary loss value is obtained by calculating the cross-entropy loss on the user representation vector and the product representation vector. Then, the secondary loss value is obtained by calculating the category loss on the product representation vector based on the product category identifier. Finally, the category alignment loss value is determined based on the primary and secondary loss values.

[0164] Specifically, the main loss value can be obtained by calculating the cross-entropy loss of the user representation vector and the product representation vector according to the cross-entropy loss function shown in formula (6).

[0165] Since the product category identifier is 1, which represents the product category with the largest amount of data in the product candidate set, i.e., the main category product identifier, when obtaining the product category identifier, other product category identifiers besides the one with the product category identifier 1 are determined as sub-category product identifiers.

[0166] Furthermore, the product representation vectors corresponding to the main category product identifiers form the main category product set S. major Each product corresponding to a subcategory product identifier can form its own product representation vector set S. 2 ,S 3 ,…,S 6 ,S 7 .

[0167] Furthermore, in the set of main category products corresponding to the main category identifier, the feature covariance of the product representation vector corresponding to the main category product identifier is calculated according to formula (7) to obtain the main category matrix.

[0168] Similarly, in the set of sub-category products corresponding to the sub-category identifier, the feature covariance of the product representation vector corresponding to the sub-category product identifier is calculated according to formula (7) to obtain the sub-category matrix.

[0169] Furthermore, the secondary loss value can be obtained by matrix calculation of the primary category matrix and the secondary category matrix according to formula (8).

[0170] After obtaining the primary and secondary loss values, the category loss value can be determined based on the primary and secondary loss values.

[0171] First, determine the loss coefficient corresponding to the secondary loss value. This loss coefficient can be a hyperparameter and can be adjusted manually. Then, after determining the loss coefficient, the category alignment loss value can be obtained by calculating the loss of the primary loss value, secondary loss value, and loss coefficient according to formula (9).

[0172] The class alignment dual-tower model can be trained using the final class alignment loss value and the training data.

[0173] Once the category-aligned dual-tower model is trained, the product-side tower can be used to calculate product representation vectors for all products in the corpus, and these vectors are stored in the in-memory database of the online server. Then, the category-aligned dual-tower model is pushed to the online server. To recommend products to a user online, the system simply extracts user data features from the user side, calculates the user's representation vector using the user-side tower, performs a dot product similarity calculation with all product representation vectors stored in memory, and selects the N most similar products as the recall products to recommend to that user.

[0174] The offline performance of the product recall method in the application scenario can be seen in Table 1:

[0175]

[0176] The baseline column represents the recall rates of the existing product recall method for the Top 15 and Top 120 across various business categories, while the experiment column represents the recall rates of the new product recall method for the Top 15 and Top 120 across various business categories. Furthermore, the variation column shows the changes in the Top 15 and Top 120 recall rates between the existing product recall method and the product recall method in this solution, demonstrating a significant improvement in both.

[0177] The online performance of the product recall method in the application scenario can be seen in Table 2:

[0178]

[0179] Among them, IpayPv is the annual payment volume of new customers for each business, 10,000 orders is the total order volume, and the changes in recommendation click-through rate and average clicks per exposed user have all shown positive effects under the application of the product recall method provided by this solution.

[0180] In the application scenarios disclosed herein, on the one hand, feature normalization processing is performed on the first and second feature vectors to simplify the calculation of product recall scores to dot product similarity, reducing the computational and time costs of online services and improving the efficiency of product recall; on the other hand, the category alignment loss value is used as the data basis for determining recalled products, enabling the recall method applied to categories with large amounts of data to be transferred to categories with small amounts of data, aligning the recall methods of various categories of products, improving the recall accuracy of various subcategories of products, simultaneously promoting the improvement of recall accuracy of all categories of products, and enriching the application scenarios of product recall methods.

[0181] Furthermore, in an exemplary embodiment of this disclosure, an item recall device is also provided. Figure 9 A schematic diagram of the item recall device is shown, such as... Figure 9 As shown, the item recall device 900 may include: a sparse mapping module 910, a feature normalization module 920, an iterative processing module 930, an alignment loss module 940, and an item determination module 950. Wherein:

[0182] The sparse mapping module 910 is configured to acquire user data features, item information features, and item category identifiers, and perform sparse mapping processing on the user data features to obtain the input user vector; the feature normalization module 920 is configured to perform iterative fully connected processing on the input user vector to obtain a first feature vector, and perform feature normalization processing on the first feature vector to obtain a user representation vector; the iterative processing module 930 is configured to perform sparse mapping processing on the item information features to obtain the input item vector, and perform iterative fully connected processing on the input item vector to obtain a second feature vector; the alignment loss module 940 is configured to perform feature normalization processing on the second feature vector to obtain an item representation vector, and perform category alignment loss calculation on the user representation vector, item representation vector, and item category identifier to obtain a category alignment loss value; the item determination module 950 is configured to calculate the item recall score by performing dot product similarity calculation on the user representation vector and item representation vector based on the category alignment loss value, so as to determine the recalled items according to the item recall score.

[0183] The specific details of the aforementioned item recall device 900 have been described in detail in the corresponding item recall method, so they will not be repeated here.

[0184] It should be noted that although several modules or units of the item recall device 900 are mentioned in the detailed description above, this division is not mandatory. In fact, according to embodiments of this disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.

[0185] Furthermore, in an exemplary embodiment of this disclosure, an electronic device capable of implementing the above-described method is also provided.

[0186] The following reference Figure 10 The electronic device 1000 according to this embodiment of the present invention will be described below. The electronic device 1000 shown in FIG10 is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments of the present invention.

[0187] like Figure 10 As shown, the electronic device 1000 is manifested in the form of a general-purpose computing device. The components of the electronic device 1000 may include, but are not limited to: at least one processing unit 1010, at least one storage unit 1020, a bus 1030 connecting different system components (including storage unit 1020 and processing unit 1010), and a display unit 1040.

[0188] The storage unit stores program code that can be executed by the processing unit 1010, causing the processing unit 1010 to perform the steps described in the "Exemplary Methods" section above, according to various exemplary embodiments of the present invention.

[0189] Storage unit 1020 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 1021 and / or a cache memory unit 1022, and may further include a read-only memory unit (ROM) 1023.

[0190] Storage unit 1020 may also include a program / utility 1024 having a set (at least one) program module 1025, such program module 1025 including but not limited to: operating system, one or more application programs, other program modules and program data, each or some combination of these examples may include an implementation of a network environment.

[0191] Bus 1030 can represent one or more of several types of bus structures, including a memory cell bus or memory cell controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus using any of the multiple bus structures.

[0192] Electronic device 1000 can also communicate with one or more external devices 1200 (e.g., keyboard, pointing device, Bluetooth device, etc.), one or more devices that enable a user to interact with electronic device 1000, and / or any device that enables electronic device 1000 to communicate with one or more other computing devices (e.g., router, modem, etc.). This communication can be performed via input / output (I / O) interface 1050. Furthermore, electronic device 1000 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 1060. As shown, network adapter 1060 communicates with other modules of electronic device 1000 via bus 1030. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with electronic device 1000, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0193] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, terminal device, or network device, etc.) to execute the methods according to the embodiments of this disclosure.

[0194] In exemplary embodiments of this disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the methods described above is stored. In some possible embodiments, various aspects of the invention may also be implemented as a program product comprising program code that, when the program product is run on a terminal device, causes the terminal device to perform the steps of the various exemplary embodiments of the invention described in the "Exemplary Methods" section above.

[0195] refer to Figure 11As shown, a program product 1100 for implementing the above-described method according to an embodiment of the present invention is described. It may employ a portable compact disc read-only memory (CD-ROM) and include program code, and may run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto. In this document, the readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.

[0196] The program product may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0197] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium, capable of sending, propagating, or transmitting programs for use by or in conjunction with an instruction execution system, apparatus, or device.

[0198] The program code contained on the readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.

[0199] Program code for performing the operations of this invention can be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java and C++, and conventional procedural programming languages ​​such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0200] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and embodiments are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the claims.

Claims

1. A method for recalling items, characterized in that, The method includes: Obtain user data features, item information features, and item category identifiers, and perform sparse mapping processing on the user data features to obtain the user vector to be input; The user vector to be input is subjected to iterative fully connected processing to obtain a first feature vector, and the first feature vector is subjected to feature normalization processing to obtain a user representation vector; The item information features are sparsely mapped to obtain the input item vector, and the input item vector is iteratively fully connected to obtain the second feature vector. The second feature vector is normalized to obtain the item representation vector, and the category alignment loss is calculated on the user representation vector, the item representation vector and the item category identifier to obtain the category alignment loss value; Based on the category alignment loss value, the dot product similarity of the user representation vector and the item representation vector is calculated to obtain the item recall score, and the recalled items are determined according to the item recall score; The step of calculating the category alignment loss value by performing category alignment loss calculation on the user representation vector, the item representation vector, and the item category identifier includes: The primary loss value is obtained by performing cross-entropy loss calculation on the user representation vector and the item representation vector; the secondary loss value is obtained by performing category loss calculation on the item representation vector according to the item category identifier; and the category alignment loss value is determined based on the primary loss value and the secondary loss value. The step of calculating the secondary loss value by performing category loss on the item representation vector based on the item category identifier includes: The primary category item identifier and the secondary category item identifier that make up the item category identifier are determined, and the feature covariance of the item representation vector corresponding to the primary category item identifier is calculated to obtain the primary category matrix; the feature covariance of the item representation vector corresponding to the secondary category item identifier is calculated to obtain the secondary category matrix, and the secondary category matrix and the primary category matrix are used to calculate the secondary loss value.

2. The method for recalling items according to claim 1, characterized in that, The step of determining the category alignment loss value based on the primary loss value and the secondary loss value includes: Determine the loss coefficient corresponding to the secondary loss value; The category alignment loss value is obtained by performing loss calculations on the primary loss value, the secondary loss value, and the loss coefficient.

3. The method for recalling items according to claim 1, characterized in that, The step of performing sparse mapping processing on the user data features to obtain the input user vector includes: The dense user features and sparse user features in the user data features are determined, and the sparse user features are subjected to feature encoding processing to obtain user encoded features; The user-encoded features are processed by feature mapping to obtain a user embedding vector, and the user embedding vector and the dense user features are concatenated to obtain the user vector to be input.

4. The method for recalling items according to claim 1, characterized in that, The step of performing sparse mapping processing on the item information features to obtain the input item vector includes: The dense and sparse features of the item information are determined, and the sparse features are processed by feature encoding to obtain the item encoding features; The item encoding features are processed by feature mapping to obtain the item embedding vector, and the item embedding vector and the dense features of the item are concatenated to obtain the input item vector.

5. The method for recalling items according to claim 1, characterized in that, The method further includes: Based on the category alignment loss value, the input user vector is iteratively processed again with a fully connected layer to obtain the first feature vector, so as to determine the recall item; Based on the category alignment loss value, the input item vector is iteratively fully connected to obtain a second feature vector, in order to determine the recalled item.

6. An item recall device, characterized in that, include: The sparse mapping module is configured to acquire user data features, item information features, and item category identifiers, and perform sparse mapping processing on the user data features to obtain the user vector to be input. The feature normalization module is configured to perform iterative fully connected processing on the user vector to be input to obtain a first feature vector, and perform feature normalization processing on the first feature vector to obtain a user representation vector; The iterative processing module is configured to perform sparse mapping processing on the item information features to obtain the input item vector, and perform iterative fully connected processing on the input item vector to obtain the second feature vector. The alignment loss module is configured to perform feature normalization processing on the second feature vector to obtain an item representation vector, and to perform category alignment loss calculation on the user representation vector, the item representation vector, and the item category identifier to obtain a category alignment loss value; The item determination module is configured to calculate the item recall score by performing a dot product similarity calculation on the user representation vector and the item representation vector based on the category alignment loss value, so as to determine the recalled items according to the item recall score; The step of calculating the category alignment loss value by performing category alignment loss calculation on the user representation vector, the item representation vector, and the item category identifier includes: The primary loss value is obtained by performing cross-entropy loss calculation on the user representation vector and the item representation vector; the secondary loss value is obtained by performing category loss calculation on the item representation vector according to the item category identifier; and the category alignment loss value is determined based on the primary loss value and the secondary loss value. The step of calculating the secondary loss value by performing category loss on the item representation vector based on the item category identifier includes: The primary category item identifier and the secondary category item identifier that make up the item category identifier are determined, and the feature covariance of the item representation vector corresponding to the primary category item identifier is calculated to obtain the primary category matrix; the feature covariance of the item representation vector corresponding to the secondary category item identifier is calculated to obtain the secondary category matrix, and the secondary category matrix and the primary category matrix are used to calculate the secondary loss value.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the article recall method according to any one of claims 1-5.

8. An electronic device, characterized in that, include: processor; Memory for storing the executable instructions of the processor; The processor is configured to execute the item recall method according to any one of claims 1-5 by executing the executable instructions.