Commodity recommendation method, computer device and storage medium
By performing multiple rounds of semantic search and enhancement on data from both new and existing users, and calculating similarity, the problem of inaccurate recommendations to new users by e-commerce platforms has been solved, thereby increasing the order rate of new users.
Patent Information
- Application Number
- CN202511280355.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-09
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2045-09-09
AI Technical Summary
When recommending products to new users, existing e-commerce platforms may not recommend the best-selling items that new users actually want to buy, resulting in recommendations that are not targeted enough.
By acquiring data from new and existing users, and using M code tables for multi-round searches to enhance semantic vector representation, similarity is calculated, and products from existing users with similar preferences are recommended.
It enables precise product recommendations for new users, improving the accuracy of user supply recall and order placement rate.
Smart Images

Figure CN120765357B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of system recommendation technology, and in particular to a product recommendation method, computer device, and storage medium. Background Technology
[0002] In related technologies, e-commerce platforms typically recommend products with high sales volume or high click-through rates to new users to encourage them to place orders.
[0003] However, in the above methods, the best-selling products on the platform may not be the products that new users want to buy, so this method cannot specifically recommend products to new users. Summary of the Invention
[0004] This application provides a product recommendation method, apparatus, computer equipment, and storage medium, which can recommend products to new users in a targeted manner by referencing the preferences of similar users. The technical solution includes the following:
[0005] Firstly, a product recommendation method is provided, applied to a server, and this product recommendation method includes:
[0006] Obtain the first data of the first object and the second data of multiple candidate objects;
[0007] The first data is embedded to obtain a first vector representation, and the embedding process is performed on each of the multiple second data to obtain multiple second vector representations;
[0008] Based on the first vector representation, multiple rounds of searching are performed from M code tables to obtain multiple first reference vectors. When the multiple first reference vectors satisfy the combination condition, the multiple first reference vectors are combined to obtain a first semantic vector. Each of the M code tables includes a semantic vector corresponding to different semantic information, and M is an integer greater than or equal to 1.
[0009] Based on any one of the plurality of second vector representations, the multiple rounds of search are performed in the M code tables to obtain a plurality of second reference vectors corresponding to the second vector representation. If the plurality of second reference vectors satisfy the combination condition, the plurality of second reference vectors are combined to obtain the second semantic vector corresponding to the second vector representation.
[0010] Based on the similarity between the first semantic vector and multiple second semantic vectors, at least one second object is determined from the multiple candidate objects;
[0011] Based on the recommended products corresponding to the at least one second object, product recommendations are made for the first object.
[0012] In this application, for the first data of the first object and the second data of multiple candidate objects, after obtaining the first vector representation of the first data and the second vector representation of the second data, multiple rounds of searching are performed from M code tables to find the semantic vectors corresponding to the first vector representation and the multiple second vector representations. Since the M code tables include semantic vectors corresponding to different semantic information, multiple rounds of searching from the M code tables can obtain the semantic information of the first data and the multiple second data, thereby achieving semantic enhancement of the first vector representation and the multiple second vector representations, resulting in first semantic vectors and multiple second semantic vectors with higher semantic accuracy. In this case, the similarity between the first semantic vector and the multiple second semantic vectors can be accurately calculated. Subsequently, based on the similarity between the first semantic vector and the multiple second semantic vectors, at least one second object with similar preferences to the first object can be accurately determined from multiple candidate objects. Finally, based on the recommended products corresponding to at least one second object, product recommendations are made for the first object. This allows for the reference of product recommendation information of second objects with similar preferences when recommending products to the first object, thereby achieving targeted product recommendations to the first object and improving the accuracy of user supply recall.
[0013] For example, after obtaining the vector representations of new users and multiple existing users, multiple rounds of searches can be performed in M code tables to find the semantic information corresponding to the new user and the multiple existing users. This allows for semantic enhancement of both the vector representations of the new user and the vector representations of the multiple existing users, thereby accurately obtaining the first semantic vector corresponding to the new user and multiple second semantic vectors corresponding to the multiple existing users. Subsequently, by calculating the similarity between the first semantic vector of the new user and the multiple second semantic vectors corresponding to the multiple existing users, it is possible to identify which existing users have similar preferences to the new user. Based on the recommendation information of these existing users, product recommendations can then be made to the new user.
[0014] In conjunction with the first aspect, in some implementations of the first aspect, the step of performing multiple rounds of lookups from M code tables based on the first vector representation to obtain multiple first reference vectors includes:
[0015] Encode the first vector representation to obtain the first encoded feature;
[0016] Based on the first encoding feature, multiple rounds of searching are performed from the M code tables to obtain the plurality of first reference vectors.
[0017] In the above method, it is equivalent to first extracting key features from the first vector representation, and then obtaining the semantic representation of the key features through multiple rounds of searching in M code tables. In this way, by extracting key features from the first vector representation, a preliminary quantization of the first vector representation can be achieved, thereby enabling the rapid retrieval of multiple first reference vectors.
[0018] In combination with the first aspect and the above implementation methods, in some implementation methods of the first aspect, the step of performing multiple rounds of lookup from the M code tables based on the first coding feature to obtain the plurality of first reference vectors includes:
[0019] In the first round of search, for the first code table of the M code tables, the first first reference vector is randomly searched from the first code table;
[0020] In the second round of search, based on the residual between the first first reference vector and the first coding feature, the second first reference vector is searched from the second code table of the M code tables;
[0021] In the i-th round of search, based on the residual between the first i-1 first reference vectors and the first coding feature, the i-th first reference vector is searched from the i-th code table of the M code tables, where i is an integer greater than or equal to 3.
[0022] In the above method, by setting up M code tables hierarchically, the code table setup becomes more layered, allowing the M code tables to cover a wider range of more detailed semantic information. Through the aforementioned steps and multiple rounds of lookups, the semantic enhancement of the first vector representation can be achieved using more accurate semantic information. Furthermore, for each lookup of the first reference vector, the residual is passed to the next-level code table, and the semantic vector closest to that residual is searched from the next-level code table as the first reference vector. In this way, multiple first reference vectors can be found quickly, thereby improving the efficiency of finding multiple first reference vectors.
[0023] In conjunction with the first aspect and the above implementation methods, in some implementation methods of the first aspect, the product recommendation method also includes:
[0024] Based on the multiple first reference vectors, feature reconstruction is performed to obtain the third encoded feature;
[0025] If the difference between the third coding feature and the first coding feature satisfies the first condition, it is determined that the plurality of first reference vectors satisfy the combination condition;
[0026] If the difference between the third coding feature and the first coding feature does not satisfy the first condition, it is determined that the plurality of first reference vectors do not satisfy the combination condition.
[0027] In the above method, feature reconstruction is first performed on multiple first reference vectors, that is, the multiple first reference vectors are decoded by a DNN decoder to obtain the third encoded features in the continuous vector space. Then, the third encoded features are compared with the first encoded features to determine whether the third encoded features are consistent with the first encoded features, that is, to determine whether the first encoded features can be restored based on multiple first reference vectors. In this way, the first semantic vector obtained by combining multiple first reference vectors can accurately represent the semantic information represented by the first vector, thus improving the accuracy of the multiple first reference vectors.
[0028] In conjunction with the first aspect and the above implementation methods, in some implementation methods of the first aspect, the product recommendation method also includes:
[0029] If the multiple first reference vectors do not satisfy the combination condition, based on the difference and the first coding feature, the step of performing multiple rounds of search from the M code tables to obtain multiple first reference vectors is re-executed to update the multiple first reference vectors.
[0030] In combination with the first aspect and the above implementation methods, in some implementation methods of the first aspect, the embedding process of the first data to obtain the first vector representation includes:
[0031] The first data is input into the vector representation model, and the first data is embedded through the vector representation model to obtain the first vector representation. The vector representation model is trained based on historical data.
[0032] In the above approach, after the first data is input into the vector representation model, the model, during the embedding process, can automatically associate relevant semantics by combining its learned world knowledge, thus enriching the data representation of the first data and obtaining a more information-rich vector representation, i.e., a more accurate first vector representation. Furthermore, the same vector representation model is used to complete the embedding process for both the first data and multiple second data, ensuring that the vector representation process for both is identical. This results in first vector representations and multiple second vector representations at the same level and in the same format, which is beneficial for subsequent calculations of the similarity of preferences between new and old users.
[0033] In conjunction with the first aspect and the above implementation methods, in some implementation methods of the first aspect, the product recommendation method also includes:
[0034] The first vector representation is pooled to obtain the third vector representation;
[0035] Perform a pooling operation on each of the plurality of second vector representations to obtain a plurality of fourth vector representations;
[0036] And, based on the first vector representation, the process of performing multiple rounds of lookups from M code tables to obtain multiple first reference vectors includes:
[0037] Based on the third vector representation, multiple rounds of searching are performed from M code tables to obtain multiple first reference vectors;
[0038] And, based on any one of the plurality of second vector representations, perform the plurality of rounds of lookup from the M code tables to obtain a plurality of second reference vectors corresponding to the second vector representation, including:
[0039] Based on any one of the plurality of fourth vector representations, multiple rounds of lookup are performed in the M code tables to obtain a plurality of second reference vectors corresponding to the fourth vector representation.
[0040] In the above method, by performing pooling operation on the first vector representation, the dimensionality of the first vector representation can be significantly reduced, transforming the high-dimensional first vector representation into a low-dimensional vector representation, and the high-dimensional second vector representation into a low-dimensional vector representation. This allows subsequent similarity calculations to be performed based on the low-dimensional vector representation, thereby significantly reducing the computational load in the similarity calculation process and saving computational resources.
[0041] In conjunction with the first aspect and the above implementation methods, in some implementation methods of the first aspect, before determining at least one second object from the plurality of candidate objects based on the similarity between the first semantic vector and the plurality of second semantic vectors, the method further includes:
[0042] Obtain the current position of the first object and the frequently used positions of the multiple candidate objects;
[0043] Based on the current location and the common locations of the multiple candidate objects, at least one reference object is determined from the multiple candidate objects;
[0044] And, based on the similarity between the first semantic vector and the plurality of second semantic vectors, determining at least one second object from the plurality of candidate objects includes:
[0045] The at least one second object is determined from the at least one reference object based on the similarity between the first semantic vector and the second semantic vector corresponding to the at least one reference object.
[0046] In the above method, at least one reference object is determined from multiple candidate objects based on the current location of the first object and the frequently used locations of multiple candidate objects. This allows for the consideration of location constraints in conjunction with the characteristics of specific life scenarios, ensuring that only candidate objects within the same delivery area can be used for subsequent similarity calculations. In other words, the recommendation information of an existing user can be truly used for product recommendations for new users. This improves the efficiency of similar user discovery and reduces the computational load of subsequent similarity calculations.
[0047] In conjunction with the first aspect and the above implementation methods, in some implementation methods of the first aspect, determining at least one reference object from the plurality of candidate objects based on the current position and the common positions of the plurality of candidate objects includes:
[0048] For any one of the plurality of candidate objects, if the candidate object's usual location and the current location are in the same delivery area, the candidate object is determined as the reference object.
[0049] In conjunction with the first aspect and the above implementation methods, in some implementation methods of the first aspect, the step of recommending products to the first object based on the recommended products corresponding to the at least one second object includes:
[0050] Based on the recommended products corresponding to the at least one second object, a first recommended product is determined;
[0051] The first recommended product is recommended to the first object.
[0052] In the above approach, at least one second user has similar preferences to the first user, and the recommended products for at least one second user should also meet the needs of the first user. Therefore, when there is limited behavioral data for the first user, by mining similar users (at least one second user) and combining this with the recommended products for at least one second user to determine the first recommended product, and then recommending products to the first user, the first user can receive targeted product recommendations, thereby increasing the first user's order rate, which in turn increases the first user's recall rate.
[0053] In conjunction with the first aspect and the above implementation methods, in some implementation methods of the first aspect, the product recommendation method also includes:
[0054] Obtain search keywords;
[0055] Based on the search keywords, the target store was identified;
[0056] And, the step of recommending products to the first object based on the recommended products corresponding to the at least one second object includes:
[0057] Based on the products in the target store and the recommended products corresponding to the at least one second object, a second recommended product is determined;
[0058] The second recommended product is recommended to the first object.
[0059] Secondly, a product recommendation device is provided for use with a server, the product recommendation device comprising:
[0060] The acquisition module is used to acquire the first data of the first object and the second data of multiple candidate objects;
[0061] An embedding processing module is used to perform embedding processing on the first data to obtain a first vector representation, and to perform the embedding processing on each of the plurality of second data to obtain a plurality of second vector representations;
[0062] The lookup module is used to perform multiple rounds of lookup from M code tables based on the first vector representation to obtain multiple first reference vectors, and combine the multiple first reference vectors to obtain a first semantic vector when the multiple first reference vectors meet the combination conditions. Each of the M code tables includes a semantic vector corresponding to different semantic information, and M is an integer greater than or equal to 1.
[0063] The search module is further configured to perform multiple rounds of search in the M code tables based on any one of the multiple second vector representations to obtain multiple second reference vectors corresponding to the second vector representation, and combine the multiple second reference vectors to obtain the second semantic vector corresponding to the second vector representation when the multiple second reference vectors satisfy the combination condition.
[0064] A determining module is configured to determine at least one second object from the plurality of candidate objects based on the similarity between the first semantic vector and a plurality of second semantic vectors;
[0065] The recommendation module is used to recommend products to the first object based on the recommended products corresponding to the at least one second object.
[0066] In conjunction with the second aspect, in some implementations of the second aspect, the search module is specifically used for:
[0067] Encode the first vector representation to obtain the first encoded feature;
[0068] Based on the first encoding feature, multiple rounds of searching are performed from the M code tables to obtain the plurality of first reference vectors.
[0069] In conjunction with the second aspect and the above implementation methods, in some implementation methods of the second aspect, the search module is specifically used for:
[0070] In the first round of search, for the first code table of the M code tables, the first first reference vector is randomly searched from the first code table;
[0071] In the second round of search, based on the residual between the first first reference vector and the first coding feature, the second first reference vector is searched from the second code table of the M code tables;
[0072] In the i-th round of search, based on the residual between the first i-1 first reference vectors and the first coding feature, the i-th first reference vector is searched from the i-th code table of the M code tables, where i is an integer greater than or equal to 3.
[0073] In conjunction with the second aspect and the above-described implementations, in some implementations of the second aspect, the product recommendation device further includes:
[0074] The feature reconstruction module is used to reconstruct features based on the plurality of first reference vectors to obtain the third encoded features;
[0075] The determination module is configured to determine that the plurality of first reference vectors satisfy the combination condition when the difference between the third coding feature and the first coding feature satisfies the first condition; and to determine that the plurality of first reference vectors do not satisfy the combination condition when the difference between the third coding feature and the first coding feature does not satisfy the first condition.
[0076] In conjunction with the second aspect and the above-described implementations, in some implementations of the second aspect, the product recommendation device further includes:
[0077] The execution module is configured to, when the plurality of first reference vectors do not satisfy the combination condition, re-execute the step of performing multiple rounds of search from the M code tables to obtain a plurality of first reference vectors based on the differences and the first coding features, so as to update the plurality of first reference vectors.
[0078] In conjunction with the second aspect and the above implementation methods, in some implementation methods of the second aspect, the embedding processing module is specifically used for:
[0079] The first data is input into the vector representation model, and the first data is embedded through the vector representation model to obtain the first vector representation. The vector representation model is trained based on historical data.
[0080] In conjunction with the second aspect and the above-described implementations, in some implementations of the second aspect, the product recommendation device further includes:
[0081] The pooling module is used to perform a pooling operation on the first vector representation to obtain a third vector representation; and to perform a pooling operation on each of the plurality of second vector representations to obtain a plurality of fourth vector representations.
[0082] Furthermore, the search module is specifically used for:
[0083] Based on the third vector representation, multiple rounds of searching are performed from M code tables to obtain multiple first reference vectors;
[0084] Furthermore, the search module is also specifically used for:
[0085] Based on any one of the plurality of fourth vector representations, multiple rounds of lookup are performed in the M code tables to obtain a plurality of second reference vectors corresponding to the fourth vector representation.
[0086] In conjunction with the second aspect and the above implementation methods, in some implementation methods of the second aspect, the acquisition module is further used to: acquire the current position of the first object and the common positions of the plurality of candidate objects;
[0087] The determining module is further configured to determine at least one reference object from the plurality of candidate objects based on the current position and the common positions of the plurality of candidate objects;
[0088] And, determine the specific use of the module for:
[0089] The at least one second object is determined from the at least one reference object based on the similarity between the first semantic vector and the second semantic vector corresponding to the at least one reference object.
[0090] In conjunction with the second aspect and the above implementation methods, in some implementation methods of the second aspect, the determining module is specifically used for:
[0091] For any one of the plurality of candidate objects, if the candidate object's usual location and the current location are in the same delivery area, the candidate object is determined as the reference object.
[0092] In conjunction with the second aspect and the above implementation methods, in some implementation methods of the second aspect, the recommendation module is specifically used for:
[0093] Based on the recommended products corresponding to the at least one second object, a first recommended product is determined;
[0094] The first recommended product is recommended to the first object.
[0095] In conjunction with the second aspect and the above implementation methods, in some implementation methods of the second aspect, the acquisition module is also used for:
[0096] Obtain search keywords;
[0097] The determining module is also used to: determine the target store based on the search keywords;
[0098] Furthermore, the recommendation module is specifically used for:
[0099] Based on the products in the target store and the recommended products corresponding to the at least one second object, a second recommended product is determined;
[0100] The second recommended product is recommended to the first object.
[0101] Thirdly, a product recommendation method is provided for application on a terminal, and this product recommendation method includes:
[0102] Receive product recommendation information, wherein the product recommendation information is determined according to the product recommendation method provided in the first aspect above.
[0103] In this application, by receiving product recommendation information determined by recommended products corresponding to at least one second object with similar preferences to the first object, the terminal can display the product recommendation information, so that the first object can browse products that match its preferences, thereby enabling targeted product recommendations to the first object and improving the accuracy of supply recall.
[0104] Fourthly, a product recommendation device is provided for use in a terminal, the product recommendation device comprising:
[0105] A receiving module is used to receive product recommendation information, wherein the product recommendation information is determined according to the product recommendation method provided in the first aspect above.
[0106] Fifthly, a computer device is provided, the computer device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the above-described product recommendation method.
[0107] Sixthly, a computer-readable storage medium is provided, the computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described product recommendation method.
[0108] In a seventh aspect, a computer program product containing instructions is provided, which, when run on a computer, causes the computer to perform the steps of the above-described product recommendation method.
[0109] It is understood that the beneficial effects of the second aspect can be found in the relevant descriptions of the first aspect, the beneficial effects of the fourth aspect can be found in the relevant descriptions of the third aspect, and the beneficial effects of the fifth, sixth, and fourth aspects can be found in the relevant descriptions of the first or third aspect, and will not be repeated here.
[0110] The technical solution of this invention can be applied to the transaction and delivery services of instant e-commerce platforms, such as Taobao Flash Sale, Taoxianda, Ele.me takeaway and retail. Attached Figure Description
[0111] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0112] Figure 1 This is a flowchart of a user supply recall chain provided in an embodiment of this application;
[0113] Figure 2 This is a flowchart of a U2I recall method provided in an embodiment of this application;
[0114] Figure 3 This is a flowchart of a product recommendation method provided in an embodiment of this application;
[0115] Figure 4 This is an overall flowchart of a product recommendation method provided in an embodiment of this application;
[0116] Figure 5 This is a flowchart of an embedding process provided in an embodiment of this application;
[0117] Figure 6 This is a schematic diagram of the structure of a product recommendation device provided in an embodiment of this application;
[0118] Figure 7 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0119] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0120] It should be understood that "multiple" as mentioned in this application refers to two or more. In the description of this application, unless otherwise stated, " / " indicates "or," for example, A / B can mean A or B; "and / or" in this document is merely a description of the relationship between related objects, indicating that three relationships can exist, for example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Furthermore, to facilitate a clear description of the technical solutions of this application, the terms "first," "second," etc., are used to distinguish identical or similar items with essentially the same function and effect. Those skilled in the art will understand that the terms "first," "second," etc., do not limit the quantity or execution order, and that "first," "second," etc., do not necessarily imply differences.
[0121] The application scenarios of the embodiments of this application will be explained first.
[0122] Currently, from the perspective of user supply recall on the platform, it is generally necessary to recommend some products to users in order to increase the likelihood of users placing orders on the platform.
[0123] For example, Figure 1 This is a flowchart of a user supply recall chain provided in an embodiment of this application.
[0124] like Figure 1 As shown, in the user supply recall chain, multiple recall methods exist for both new and existing users. The multi-path recall methods for new users can differ from those for existing users. When recommending products to users, recall methods such as hot-sell recall and U2I recall can generally be combined to determine the products to recommend, thereby achieving product recommendation to the user.
[0125] Specifically, in this embodiment of the application, it is first determined whether the user is a new user or an old user. If the user is an old user, multiple recalls can be performed through the recall link on the left. For example, recalls such as hot-sell recalls and U2I recalls can be combined to obtain the recall result.
[0126] Hot item recall refers to selecting popular items from a large number of items based on factors such as their popularity and recommending them to users. For example, items with high click-through rates, purchase rates, and collection rates are recommended to users as popular items.
[0127] User-to-Instrument (U2I) recall refers to directly matching users with items and filtering items from a database that are potentially relevant to the user as a recommendation candidate set. Generally, U2I recall models the recall problem as a nearest neighbor search problem in a vector space. It trains a model to map users and items to the same vector space, generating user vectors and item vectors. During online service, an approximate nearest neighbor search algorithm is used to find the few item vectors closest to the user vector; these items are then used as the recall results.
[0128] For example, Figure 2 This is a flowchart of a U2I recall provided in an embodiment of this application.
[0129] like Figure 2 As shown, this U2I recall method is implemented based on a dual-tower model of DNN (Deep Neural Network), consisting of a user tower and an item tower. The user tower, constructed from a DNN network trained on historical data, is used to extract features from the input data and generate user vectors based on user characteristics. The item tower, also constructed from a DNN network trained on a large amount of item data, is used to extract features from the item data and generate item vectors based on those features.
[0130] Finally, items that match the user are selected by calculating the similarity between the user vector and the item vector, and these items are recommended to the user.
[0131] With the launch of promotional activities, some retail platforms may gain many new users. To retain these new users, it's necessary to provide targeted product recommendations. However, new users have limited or no behavioral data on the platform. Therefore, in the product recommendation process based on the DNN dual-tower model, effective user features cannot be extracted, making it impossible to accurately generate user vectors. Consequently, the calculated similarity cannot accurately measure a new user's preference for an item, resulting in low product recommendation accuracy and an inability to provide precise recommendations to new users.
[0132] Therefore, in this embodiment, when the user is a new user, multiple recall can be performed through the multi-path recall link on the right. This multi-path recall link includes recall methods such as hot-sell recall, U2I recall, and U2U (User to User) recall. U2U recall is the product recommendation method provided in this embodiment, which recommends products to new users based on recommendation information from existing users with similar preferences.
[0133] In this product recommendation method, after obtaining the vector representations of new user data and multiple existing user data, multiple rounds of searches are performed from M code tables to find the semantic information corresponding to the new user and the multiple existing users. This allows for semantic enhancement of both the vector representations of the new user and the vector representations of the multiple existing users, thereby accurately obtaining the first semantic vector corresponding to the new user and multiple second semantic vectors corresponding to the multiple existing users. Subsequently, by calculating the similarity between the first semantic vector of the new user and the multiple second semantic vectors corresponding to the multiple existing users, it is possible to identify which existing users have similar preferences to the new user. Based on the recommendation information of these existing users, product recommendations are then made to the new user.
[0134] In this scenario, when recommending products to new users, referencing product recommendations from existing users with similar preferences allows for targeted product recommendations to new users, thereby increasing the order rate of new users and improving the accuracy of user supply recall.
[0135] Furthermore, by performing multiple rounds of searches from M code tables to semantically enhance the user's vector representation, a more accurate first semantic vector and multiple second semantic vectors can be obtained, which can then be used to calculate a more accurate similarity. This allows for the accurate selection of existing users with similar preferences to new users from among multiple existing users.
[0136] The technical solutions in the embodiments of this application will be described below with reference to the accompanying drawings.
[0137] In one possible approach, during the development of the first application, the technician can configure the product recommendation function as a preset function on the home screen of the target channel in the first application, so that when the first application enters the home screen of the target channel, products can be recommended to the user on the home screen of the target channel based on the product recommendation method provided in the embodiments of this application.
[0138] For example, when a user opens the first application and enters the target channel of the first application, the mobile phone can display the home screen of the target channel in the first application, and can receive recommended products determined by the product recommendation method provided in the embodiments of this application sent by the server, and display the recommended products to the user on the home screen.
[0139] It should be noted that the first application mentioned above can be an application with an order placement function, and this application embodiment does not specifically limit the first application.
[0140] Another possible approach is that, during the development of the first application, the technicians can configure the product recommendation function as a preset function on the search results display interface after searching for keywords within the target channel. This allows products to be recommended to the user on the search results display interface based on the product recommendation method provided in this application embodiment after searching for keywords within the target channel.
[0141] Specifically, after a user searches for keywords within the target channel of the first application, the server can obtain the search keywords entered by the user on their mobile phone and retrieve search results related to those keywords. Then, based on the product recommendation method provided in this application embodiment, the server determines recommended products from the search results and finally sends the determined recommended products related to the search keywords to the mobile phone. After receiving the search results (recommended products related to the search keywords), the mobile phone can display the received search results on the search results display interface, that is, display the recommended products related to the search keywords.
[0142] Before describing the product recommendation method provided in the embodiments of this application, the terms involved in the embodiments of this application will be explained.
[0143] 1. Embedding
[0144] Embedding processing essentially maps high-dimensional, discrete, or unstructured data (text, images, etc.) into low-dimensional, continuous vectors through mathematical models. Its basic idea is to assign a dense floating-point vector to each data point in the vector space, so that similar data points are closer together in the vector space.
[0145] Raw data often presents challenges that models struggle to process directly. Embedding transforms raw data into uniform, low-dimensional, continuous vectors. Furthermore, raw data is typically discrete, lacking inherent connections. Embedding can imbue data with implicit relationships through context, transforming raw data into computable, semantically meaningful vectors. This provides core technical support for natural language processing, recommender systems, and other related fields.
[0146] 2. Large Language Model (LLM)
[0147] The core idea of LLM (Language Learning Model) is to capture the deep patterns of human language through statistical learning of massive amounts of text data, thereby achieving language understanding and generation, and ultimately realizing human-like text interaction capabilities. Language contains a large number of statistical patterns, and LLM records these patterns through parameters, forming an implicit memory of language patterns. When the predictive ability is strong enough, it can capture grammar, semantics, logic, and even common sense. In other words, the trained LLM model not only has the ability to predict and generate text, but also the ability to understand it.
[0148] 3. Prompt
[0149] Prompts in large language models are text input when interacting with the model to guide it in generating specific outputs. The design of prompts is intuitively important for obtaining the desired response and can significantly impact model performance and the quality of generated content.
[0150] 4. DNN
[0151] Deep Neural Networks (DNNs) are multi-layered artificial neural network models used to process complex data patterns and nonlinear relationships. A DNN consists of an input layer, multiple hidden layers, and an output layer. Each layer undergoes a nonlinear transformation through an activation function, enabling it to automatically extract and learn hierarchical features. Due to its powerful feature learning capabilities and excellent accuracy, DNNs are widely used in image recognition, natural language processing, semantic recognition, and other fields.
[0152] 5. Codebook
[0153] A code table is a predefined set of discrete vectors (usually a matrix). In this embodiment, the code table may include semantic vectors corresponding to different semantic information. The model learns representative feature patterns in the data and encodes these feature patterns into fixed semantic vectors. The code table is like a discrete feature dictionary, replacing the original high-dimensional features by looking up the table index.
[0154] 6. LBS (Location Based Services) Constraints
[0155] Location-based services (LBS) constraints typically refer to the restrictions or rules imposed on the provision and use of services due to various factors. In this application embodiment, LBS constraints refer to location-based condition constraints, which can be used to filter existing users within the same area.
[0156] The product recommendation method provided in the embodiments of this application will be explained in detail below.
[0157] Figure 3 This is a flowchart illustrating a product recommendation method provided in an embodiment of this application. The method can be applied to a computer device, which can be a server. The server can be a single server or a server cluster consisting of multiple servers.
[0158] It should be understood that this product recommendation method can be executed either when the first application is launched and the target channel is entered, as described above, or when the search function is used within the target channel, as described above. Further details will not be provided below. See also Figure 3 The method includes the following steps.
[0159] Step 301: Obtain the first data of the first object and the second data of multiple candidate objects.
[0160] The first target can be anyone who opens the first application or enters the target channel after opening the first application. For example, both the first target and multiple candidate targets can be users. The first target can be a new user, and the multiple candidate targets can be existing users. A new user can refer to a user who has not placed an order within the target channel of the first application, or whose number of orders placed within the target channel has not exceeded a preset threshold.
[0161] The first data may include profile data and behavioral data of the first object. Profile data may include attribute information such as age, occupation, and hobbies, while behavioral data may include click behavior, search behavior, and purchase behavior. Since the first object's behavioral data within the target channel is relatively limited, in this case, behavioral data may include the first object's behavioral data outside the target channel within the first application.
[0162] The second data may include candidate profile data and behavioral data. Since candidate objects possess abundant behavioral data within the first application, this behavioral data may include their behavior within the target channel of the first application, such as search behavior, click behavior, and purchase behavior. In some embodiments, the second data may also include candidate object behavior data outside the target channel of the first application.
[0163] It should be noted that the second set of data mentioned above is the data after de-identification / anonymization processing.
[0164] Since the target channel is the shopping channel in the first application, the behavioral data of the first object / multiple candidate objects outside the target channel in the first application can also reflect their preferences for products. In the above method, while acquiring the behavioral data of the first object / multiple candidate objects within the target channel, behavioral data outside the target channel in the first application is also acquired. This expands the data, allowing for a more thorough analysis of the first object's preferences.
[0165] It is worth noting that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, data stored, data displayed, etc.) and signals involved in the embodiments of this specification are all authorized by the user or fully authorized by all parties, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0166] Step 302: Embedding processing is performed on the first data to obtain a first vector representation, and embedding processing is performed on each of the multiple second data to obtain multiple second vector representations.
[0167] In step 302, embedding processing is performed on the first data to convert the discrete first data into a continuous vector representation. Similarly, embedding processing is performed on each of the multiple second data sets to convert each discrete second data set into a continuous vector representation. In other words, for both the first and second data sets, the data is first represented in vector form, thus converting the data into a machine-processable data format.
[0168] In one possible approach, the specific operation of embedding the first data to obtain the first vector representation can be: inputting the first data into a vector representation model, and then embedding the first data through the vector representation model to obtain the first vector representation.
[0169] Similarly, the specific operation of embedding each of the multiple second data to obtain multiple second vector representations can be as follows: for any one of the multiple second data, input the second data into the vector representation model, and embed the second data through the vector representation model to obtain the second vector representation.
[0170] The vector representation model can be a Large Language Model (LLM), which can be trained based on historical data. This historical data can be the historical data of a third-party object.
[0171] The third object is an object with rich behavioral data. For example, the third object may include, but is not limited to, long-time users on a single platform.
[0172] Since the third object has rich behavioral data, the above method trains the vector representation model based on the historical data (portrait data and historical behavioral data) of the third object. This allows the vector representation model to fully learn the semantic relationships in the data and fully learn the data representation, enabling it to learn sufficient world knowledge and thus possess accurate text understanding ability, and consequently, accurate vector representation ability.
[0173] In this case, after the first data is input into the vector representation model, the vector representation model can automatically associate relevant semantics with its learned world knowledge during the embedding process of the first data, thereby enriching the data representation of the first data and obtaining a vector representation with richer information representation, that is, obtaining a more accurate first vector representation.
[0174] Furthermore, the embedding process is completed using the same vector representation model for both the first data and multiple second data, making the vector representation process identical for both the first data and multiple second data. This allows us to obtain the first vector representation and multiple second vector representations at the same level and in the same format, which is beneficial for subsequent calculation of the similarity of preferences between the first object and multiple candidate objects.
[0175] Figure 4 This is an overall flowchart of a product recommendation method provided in an embodiment of this application.
[0176] like Figure 4 As shown, in order to improve the model processing efficiency and model output quality, this embodiment of the application inputs the first data and multiple second data as prompt words into the vector representation model, so as to prompt the vector representation model to perform embedding processing on the first data and multiple second data to obtain the vector representation of each of the first data and multiple second data.
[0177] Since both the first and second data are composed of profile data and behavioral data, before inputting either the first or second data as prompt words into the vector representation model, prompt words corresponding to the profile data and prompt words corresponding to the behavioral data can be constructed based on the first or second data, respectively. Taking the vector representation of the first data as an example, the prompt words corresponding to the profile data and the prompt words corresponding to the behavioral data of the first object are then fused to obtain the first prompt word. The first prompt word is then input into the vector representation model to output a vector representation, thus obtaining the first embedding (first vector representation).
[0178] The following section uses the embedding process of the first data as an example to illustrate the embedding process of this vector representation model.
[0179] For example, Figure 5 This is a flowchart of an embedding process provided in an embodiment of this application.
[0180] like Figure 5 As shown, after the first prompt word is input into the vector representation model, the first prompt word is first segmented to obtain N tokens. Each token is assigned a unique ID. Then, the N tokens are embedded to generate the corresponding first vector representation.
[0181] It should be understood that the model processes text based on tokens. A token is the smallest unit of text data that the model processes. Therefore, after inputting the first prompt word into the vector representation model, the first prompt word needs to be divided into a series of tokens for subsequent model processing.
[0182] During the training phase, the vector representation model learns meaningful vector representations corresponding to different tokens by learning contextual relationships. After obtaining N tokens, for each token, each token can be mapped to a fixed-dimensional vector space, and an embedding vector of the token can be generated by combining the learned vector representations. Finally, the first embedding can be obtained by combining the embedding vectors of N tokens.
[0183] It is worth noting that the first vector representation or multiple second vector representations output by this vector representation model are high-dimensional sparse vectors. High-dimensional vectors are not conducive to subsequent similarity calculations, resulting in a very large amount of similarity computation. Therefore, in this embodiment, after obtaining the first vector representation and multiple second vector representations, a pooling operation can be performed on the first vector representation to obtain a third vector representation, and a pooling operation can be performed on each of the multiple second vector representations to obtain multiple fourth vector representations.
[0184] Pooling operations can include, but are not limited to, sliding window pooling based on maximum value, average value, or adaptive pooling. For example, if both the first and second vector representations are 1024-dimensional vectors, a 128-dimensional vector representation can be obtained through pooling operations.
[0185] It should be understood that during the sliding window pooling process, for each local area covered by the window, an output value is calculated through an aggregation function as the feature value of the area covered by the window. The aggregation function corresponds to max pooling, average pooling, and adaptive pooling.
[0186] In the above method, by performing pooling operation on the first vector representation, the dimensionality of the first vector representation can be significantly reduced, transforming the high-dimensional first vector representation into a low-dimensional vector representation, and the high-dimensional second vector representation into a low-dimensional vector representation. This allows subsequent similarity calculations to be performed based on the low-dimensional vector representation, thereby significantly reducing the computational load in the similarity calculation process and saving computational resources.
[0187] Step 303: Based on the first vector representation, perform multiple rounds of searching from the M code tables to obtain multiple first reference vectors. If the multiple first reference vectors satisfy the combination condition, combine the multiple first reference vectors to obtain the first semantic vector. Each of the M code tables includes a semantic vector corresponding to different semantic information, where M is an integer greater than or equal to 1.
[0188] It should be understood that, after the first vector representation has undergone the above-mentioned pooling operation, the operation in step 303 is to perform multiple rounds of searching from the M code tables based on the third vector representation to obtain multiple first reference vectors, and then combine the multiple first reference vectors to obtain the first semantic vector when the multiple first reference vectors meet the combination conditions.
[0189] Since the multiple first reference vectors found are discrete semantic vectors, while the first vector representation is a continuous vector, it is necessary to determine whether these multiple first reference vectors satisfy a combination condition. If the combination condition is satisfied, the multiple first reference vectors need to be combined into a continuous first semantic vector. In this case, the combination condition is used to determine whether the multiple first reference vectors can be combined into a first semantic vector.
[0190] In the embodiments of this application, when there are multiple code tables, the M code tables can be set up hierarchically. Among the M code tables, the next level code table can be the semantic vector corresponding to the semantic information obtained by fine-grained division of the semantic information indicated by the previous level code table.
[0191] For example, one column in the first code table represents "20-year-olds". In the second code table, some columns can further refine the definition of "20-year-olds", such as including semantic information for "students" and "non-students". The third code table can include further subdivisions of attributes for "students" and "non-students", such as purchasing power, which can be categorized as strong, medium, or weak. Finally, the fourth code table can include finer-grained classifications under "purchasing power", such as semantic information about preferred product categories.
[0192] In the above method, by setting M code tables in a hierarchical manner, the setting of the code tables is made more hierarchical, so that the M code tables can cover a wider range and more detailed semantic information. Through the above step 303, the semantic enhancement of the first vector representation can be performed through more accurate semantic information.
[0193] One possible approach is to perform multiple rounds of searches in M code tables based on the first vector representation to obtain multiple first reference vectors. This can be achieved by: encoding the first vector representation to obtain a first encoded feature; and performing multiple rounds of searches in M code tables based on the first encoded feature to obtain multiple first reference vectors.
[0194] In the above method, it is equivalent to first extracting key features from the first vector representation, and then obtaining the semantic representation of the key features through multiple rounds of searching in M code tables. In this way, by extracting key features from the first vector representation, a preliminary quantization of the first vector representation can be achieved, thereby enabling the rapid retrieval of multiple first reference vectors.
[0195] The operation of encoding the first vector representation to obtain the first encoded feature can be as follows: the first vector representation is encoded by a DNN encoder to obtain the first encoded feature.
[0196] A DNN encoder can be constructed from a deep neural network (DNN) to extract features from a first vector representation, thereby extracting key features from the first vector representation.
[0197] The operation of obtaining multiple first reference vectors by performing multiple rounds of searches from M code tables based on the first coding feature can be as follows: In the first round of search, for the first code table in the M code tables, the first first reference vector is randomly searched from the first code table; in the second round of search, based on the residual between the first first reference vector and the first coding feature, the second first reference vector is searched from the second code table in the M code tables; in the i-th round of search, based on the residual between the first i-1 first reference vectors and the first coding feature, the i-th first reference vector is searched from the i-th code table in the M code tables.
[0198] Where i is an integer greater than or equal to 3.
[0199] In the above method, a first reference vector is first randomly searched in the first code table. Then, the residual between this first reference vector and the first coding feature is calculated. Next, the first reference vector closest to the residual is searched in the second code table. Then, the residual between the first reference vector searched in the second code table, the first reference vector searched in the first code table, and the first coding feature is calculated. Based on the residual, the first reference vector is searched in the third code table, and so on. Multiple first reference vectors can be found from M code tables in sequence.
[0200] Furthermore, since the goal is to find the semantic vector corresponding to the first encoded feature, the multiple first reference vectors found must ultimately be able to reconstruct the first encoded feature for it to be considered that the semantic vector obtained by combining the multiple first reference vectors is the semantic vector corresponding to the first encoded feature. In this case, multiple first reference vectors are searched in M code tables based on the residuals between the first i-1 first reference vectors and the first encoded feature. During the search for multiple first reference vectors, the first encoded feature can serve as a guiding feature, influencing the search of multiple first reference vectors. This makes the search of multiple first reference vectors more accurate and maximizes the possibility of combining the searched first reference vectors to reconstruct the first encoded feature.
[0201] Specifically, based on the residuals between the first i-1 first reference vectors and the first coding features, the operation of finding the i-th first reference vector from the i-th code table of M code tables can be as follows: during the process of finding the i-th first reference vector in the i-th code table, each semantic vector in the i-th code table is matched with the residual, and the semantic vector in the i-th code table that best matches the residual is determined as the first reference vector, thus obtaining the first reference vector found from the i-th code table.
[0202] Among them, the semantic vector that best matches the residual in the i-th code table is also the semantic vector that is closest to the residual in the i-th code table.
[0203] In the above method, for each lookup of the first reference vector, the residual is passed to the next-level code table, and the semantic vector closest to the residual is searched in the next-level code table as the first reference vector. In this way, multiple first reference vectors can be found quickly, thereby improving the search efficiency of multiple first reference vectors.
[0204] It is worth noting that after finding multiple first reference vectors from M code tables, feature reconstruction can be performed based on the multiple first reference vectors to obtain third coding features; if the difference between the third coding features and the first coding features satisfies the first condition, it is determined that the multiple first reference vectors satisfy the combination condition; if the difference between the third coding features and the first coding features does not satisfy the first condition, it is determined that the multiple first reference vectors do not satisfy the combination condition.
[0205] The third encoded feature can be obtained by reconstructing features from multiple first reference vectors using a DNN decoder.
[0206] Since multiple first reference vectors are discrete semantic vectors, while the first encoded feature is a continuous vector, in order to determine whether multiple first reference vectors can be reconstructed into a continuous first encoded feature, it is necessary to first map the multiple first reference vectors into a continuous vector space.
[0207] In the above method, feature reconstruction is first performed on multiple first reference vectors, that is, the multiple first reference vectors are decoded by a DNN decoder to obtain the third encoded features in the continuous vector space. Then, the third encoded features are compared with the first encoded features to determine whether the third encoded features are consistent with the first encoded features, that is, to determine whether the first encoded features can be restored based on multiple first reference vectors. In this way, the first semantic vector obtained by combining multiple first reference vectors can accurately represent the semantic information represented by the first vector, thus improving the accuracy of the multiple first reference vectors.
[0208] One possible approach is to determine that multiple first reference vectors satisfy the combination condition when the distance between the third coding feature and the first coding feature is less than a preset distance threshold; and to determine that multiple first reference vectors do not satisfy the combination condition when the distance between the third coding feature and the first coding feature is greater than the preset distance threshold.
[0209] The distance between the third coding feature and the first coding feature includes, but is not limited to, Euclidean distance, Manhattan distance, etc., and the embodiments of this application do not limit this.
[0210] In the above method, the difference between the third coding feature and the first coding feature is measured by calculating the distance between the third coding feature and the first coding feature. This makes it easier to determine whether the third coding feature and the first coding feature are consistent, and thus the difference between the third coding feature and the first coding feature can be determined more quickly, and then the difference can be determined more quickly to determine whether the difference meets the first condition.
[0211] Furthermore, if multiple first reference vectors do not satisfy the combination condition, based on the difference and the first coding feature, the step of performing multiple rounds of search from the M code tables to obtain multiple first reference vectors is re-executed to update the multiple first reference vectors.
[0212] It should be understood that if multiple first reference vectors do not meet the combination condition, it means that the first coding feature cannot be restored based on the multiple first reference vectors. This also means that the first semantic vector obtained by combining multiple first reference vectors cannot accurately represent the semantic information represented by the first vector. Therefore, it is necessary to search for multiple first reference vectors again, that is, to update multiple first reference vectors, and then determine whether the first coding feature can be restored based on the updated multiple first reference vectors.
[0213] Furthermore, the difference between the third coding feature and the first coding feature can serve as a guide for multiple rounds of searching, influencing the process of obtaining multiple first reference vectors through multiple rounds of searching from M code tables. This can make the third coding feature after reconstruction of the features of the multiple first reference vectors closer to the first coding feature.
[0214] The above is the specific execution process of step 303. For each time multiple first reference vectors are found in the M code tables, feature reconstruction is performed on the multiple first reference vectors to obtain the third coding feature. Then, by judging whether the difference between the third coding feature and the first coding feature satisfies the first condition, it is determined whether the multiple first reference vectors satisfy the combination condition. If the multiple first reference vectors satisfy the combination condition, the multiple first reference vectors are combined into the first semantic vector, and the semantic information represented by the first vector can be obtained.
[0215] If multiple first reference vectors do not meet the combination condition, step 303 is re-executed to update the multiple first reference vectors, and feature reconstruction is performed on the updated multiple first reference vectors to update the third coding feature. Then, the step of judging whether the difference between the third coding feature and the first coding feature meets the first condition is executed to determine whether the multiple first reference vectors meet the combination condition. If they meet the condition, the multiple first reference vectors are combined into a first semantic vector. If they do not meet the condition, step 303 is re-executed until the multiple first reference vectors meet the combination condition.
[0216] In some embodiments, after obtaining multiple first reference vectors in step 303, the indices of the multiple first reference vectors in M code tables can be recorded. Then, if the multiple first reference vectors satisfy the combination conditions, the indices of the multiple first reference vectors can be combined to obtain the semantic ID of the first semantic vector.
[0217] Since the semantic vectors stored in the code table are often low-dimensional dense vectors, and the index is simpler to operate on than the semantic vector, discrete dimensionality reduction can be achieved by obtaining the semantic ID of the first semantic vector instead of storing the first semantic vector, thus solving the problem of low computational efficiency in the subsequent process.
[0218] Furthermore, since the M code tables are set up hierarchically (coarse-grained semantics → fine-grained semantics), the semantic IDs also represent semantics from coarse-grained to fine-grained. Additionally, since the semantic vectors in the M code tables are pre-selected and trained standard vectors that can represent a certain type of similar semantic features, semantic vectors with the same semantics may be represented using similar semantic IDs. That is, in this embodiment, for two users with similar preferences, the semantic vectors corresponding to their user embeddings may have similar semantic IDs.
[0219] In this scenario, by determining the semantic ID of the first semantic vector, subsequent similarity calculations can be divided into a coarse-screening stage and a fine-ranking stage. In the coarse-screening stage, the semantic ID can be used for rapid filtering. In the fine-ranking stage, similarity calculation at the semantic vector level can be used to specifically measure the similarity of preferences between two users. This approach improves the similarity calculation speed while maintaining accuracy, thereby increasing the speed of similar user filtering while ensuring accurate selection of similar users.
[0220] like Figure 4 As shown, after extracting the first embedding, it can be input into the semantic enhancement module. First, the first embedding is encoded by a DNN encoder to obtain the first encoded feature. Then, based on the first encoded feature, multiple rounds of searching are performed from M code tables to find multiple first reference vectors, and the indices of these first reference vectors are recorded. The indices of these multiple first reference vectors are then combined and fed into the DNN decoder for decoding. It is determined whether the first encoded feature can be reconstructed from the found first reference vectors; that is, whether the difference between the decoded third encoded feature and the first encoded feature satisfies the first condition. If the first encoded feature cannot be reconstructed from the found first reference vectors, multiple first reference vectors are searched again from the M code tables based on the difference between the third and first encoded features and the first encoded feature, and subsequent steps are performed until the first encoded feature can be reconstructed from the multiple first reference vectors. Finally, the semantic ID of the first semantic vector is obtained by combining the indices of the multiple first reference vectors. Simultaneously, multiple first reference vectors can also be combined to obtain the first semantic vector.
[0221] Step 304: Based on any one of the multiple second vector representations, perform multiple rounds of search in the M code tables to obtain multiple second reference vectors corresponding to the second vector representation. If the multiple second reference vectors satisfy the combination condition, combine the multiple second reference vectors to obtain the second semantic vector corresponding to the second vector representation.
[0222] It should be understood that, when each of the multiple second vector representations undergoes the above-mentioned pooling operation, the operation in step 304 can be as follows: based on any one of the multiple fourth vector representations, perform multiple rounds of searching from the M code tables to obtain multiple second reference vectors corresponding to the fourth vector representation, and when the multiple second reference vectors satisfy the combination condition, combine the multiple second reference vectors to obtain the second semantic vector corresponding to the second vector representation.
[0223] Since the product recommendation method provided in this application embodiment is based on the recommendation information of similar objects to recommend products to the first object, it is necessary to first obtain similar objects. The means to obtain similar objects can be implemented by similarity calculation. In this case, after performing the above step 303 to obtain the first semantic vector of the first object, it is also necessary to obtain the semantic vectors of multiple candidate objects.
[0224] In the above method, by performing the same semantic enhancement process on multiple candidate objects as on the first object, the resulting second semantic vector and the first semantic vector belong to the same level and dimension of vector representation, so the subsequent similarity calculation can be more accurate.
[0225] One possible approach is to perform multiple rounds of searches in M code tables based on any one of the multiple second vector representations to obtain multiple second reference vectors corresponding to the second vector representation. This can be achieved by: encoding the second vector representation to obtain a second encoding feature; and performing multiple rounds of searches in M code tables based on the second encoding feature to obtain multiple second reference vectors.
[0226] Specifically, the second vector representation is encoded using a DNN encoder to obtain the second encoded feature. Then, based on the second encoded feature, multiple second reference vectors are searched from M code tables. Specifically: first, a second reference vector is randomly selected from the first code table; then, the residual between this second reference vector and the second encoded feature is calculated; next, the second reference vector closest to this residual is searched from the second code table; then, the residuals between the second reference vector searched from the second code table, the second reference vector searched from the first code table, and the second encoded feature are calculated; then, based on this residual, a second reference vector is searched from the third code table, and so on, sequentially searching from the M code tables to find multiple second reference vectors.
[0227] It should be understood that encoding the second vector representation to obtain the second encoding feature, and performing multiple rounds of searches in the M code tables based on the second encoding feature to obtain multiple second reference vectors, are similar to the specific operations in step 303 above, which involve encoding the first vector representation to obtain the first encoding feature and performing multiple rounds of searches in the M code tables based on the first encoding feature. These operations will not be elaborated on here.
[0228] It is worth noting that after finding multiple second reference vectors from M code tables, feature reconstruction can be performed based on the multiple second reference vectors to obtain the fourth coding feature; if the difference between the fourth coding feature and the second coding feature satisfies the first condition, it is determined that the multiple second reference vectors satisfy the combination condition; if the difference between the fourth coding feature and the second coding feature does not satisfy the first condition, it is determined that the multiple second reference vectors do not satisfy the combination condition.
[0229] In the above method, feature reconstruction is first performed on multiple second reference vectors, that is, the DNN decoder first decodes the multiple second reference vectors to obtain the fourth encoded feature in the continuous vector space. Then, the fourth encoded feature is compared with the second encoded feature to determine whether the fourth encoded feature is consistent with the second encoded feature, that is, to determine whether the second encoded feature can be restored based on multiple second reference vectors. In this way, the second semantic vector obtained by combining multiple second reference vectors can accurately represent the semantic information represented by the second vector, thus improving the accuracy of multiple second reference vectors.
[0230] It should be understood that the above-described feature reconstruction based on multiple second reference vectors to obtain a fourth encoded feature; determining that multiple second reference vectors satisfy the combination condition when the difference between the fourth encoded feature and the second encoded feature meets the first condition; and determining that multiple second reference vectors do not satisfy the combination condition when the difference between the fourth encoded feature and the second encoded feature does not meet the first condition are similar to the specific operations in step 303 above, namely, "feature reconstruction based on multiple first reference vectors to obtain a third encoded feature; determining that multiple first reference vectors satisfy the combination condition when the difference between the third encoded feature and the first encoded feature meets the first condition; and determining that multiple first reference vectors do not satisfy the combination condition when the difference between the third encoded feature and the first encoded feature does not meet the first condition," and will not be elaborated on here.
[0231] Furthermore, if multiple second reference vectors do not satisfy the combination condition, based on a similar operation, the step of performing multiple rounds of search from the M code tables to obtain multiple second reference vectors can be re-executed based on the difference between the fourth coding feature and the second coding feature, so as to update the multiple second reference vectors.
[0232] The above is the specific execution process of step 304. For each second reference vector found in the M code tables, the features of the multiple second reference vectors are reconstructed to obtain the fourth coding feature. Then, by judging whether the difference between the fourth coding feature and the second coding feature satisfies the first condition, it is determined whether the multiple second reference vectors satisfy the combination condition. If the multiple second reference vectors satisfy the combination condition, the multiple second reference vectors are combined into a second semantic vector, and the semantic information represented by the second vector can be obtained.
[0233] If multiple second reference vectors do not meet the combination condition, step 304 is re-executed to update the multiple second reference vectors, and feature reconstruction is performed on the updated multiple second reference vectors to update the fourth coding feature. Then, the step of judging whether the difference between the fourth coding feature and the second coding feature meets the first condition is executed to determine whether the multiple second reference vectors meet the combination condition. If they do, the multiple second reference vectors are combined into a second semantic vector. If they do not meet the condition, step 304 is re-executed until the multiple second reference vectors meet the combination condition.
[0234] It should be noted that step 304 above is performed for each of the multiple second vector representations to obtain the second semantic vector corresponding to each second vector representation, thereby achieving semantic enhancement of the second vector representation of each candidate object.
[0235] In some embodiments, after obtaining multiple second reference vectors in step 304, the indices of the multiple second reference vectors in M code tables can be recorded. Then, if the multiple second reference vectors satisfy the combination conditions, the indices of the multiple second reference vectors can be combined to obtain the semantic ID of the second semantic vector.
[0236] Step 305: Based on the similarity between the first semantic vector and multiple second semantic vectors, determine at least one second object from multiple candidate objects.
[0237] Multiple second semantic vectors refer to multiple second vectors representing the corresponding second semantic vectors.
[0238] At least one second object is a candidate object among multiple candidate objects that has similar preferences to the first object. In the case that the first object / multiple candidate objects are users, at least one second object is also an old user among multiple old users who has similar preferences to the new user.
[0239] In step 305, by calculating the similarity between the first semantic vector and multiple second semantic vectors, the degree of similarity between the first object and multiple candidate objects can be known, and at least one second object (similar object) can be selected from multiple candidate objects accordingly.
[0240] In one possible approach, prior to step 305, the current position of the first object and the common positions of multiple candidate objects can be obtained; based on the current position and the common positions of multiple candidate objects, at least one reference object is determined from the multiple candidate objects.
[0241] In this case, step 305 can be performed as follows: based on the similarity between the first semantic vector and the second semantic vector corresponding to at least one reference object, determine at least one second object from at least one reference object.
[0242] It should be understood that when the first object enters the target channel of the first application through the mobile phone, the mobile phone can automatically obtain the current location, use it as the current location of the first object, and send the current location of the first object to the server, so that the server can obtain the current location of the first object.
[0243] For multiple candidate objects, the server can store data for multiple candidate objects, and the data can also include frequently used locations, which can be frequently used delivery locations.
[0244] At least one reference object can be a candidate object that is in the same delivery area as the first object among multiple candidate objects.
[0245] In this case, the operation of determining at least one reference object from multiple candidate objects based on the current location and the common locations of multiple candidate objects can be as follows: for any candidate object among multiple candidate objects, if the common location of the candidate object is in the same delivery area as the current location, this candidate object is determined as the reference object.
[0246] By performing the above location determination on each of the multiple candidate objects, it is possible to find the candidate object that is in the same delivery area as the first object from among the multiple candidate objects.
[0247] It should be understood that the aforementioned same delivery area can refer to an area where the distance between the frequently used location and the current location is within the target distance threshold, such as a target distance threshold of 1km, 1.5km, etc.
[0248] Taking the first / multiple candidate users as an example, since in some scenarios, users within the same delivery area are exposed to the same business district, the preferences of new and old users within the same delivery area should also be based on the business district exposed to that delivery area. Otherwise, the products preferred by an old user may not be available in the business district exposed to a new user in a different delivery area. Therefore, even if the old user is a similar user to the new user, the old user's recommendation information cannot effectively recommend products to the new user.
[0249] In the above method, at least one reference object is determined from multiple candidate objects based on the current location of the first object and the frequently used locations of multiple candidate objects. This allows for the consideration of location constraints by taking into account the specific characteristics of the life scenario, ensuring that only candidate objects within the same delivery area can be used for subsequent similarity calculations. In other words, the recommendation information of a candidate object can be truly used in the subsequent product recommendation of the first object. This improves the efficiency of similar object discovery and reduces the computational load of subsequent similarity calculations.
[0250] The operation of determining at least one second object from at least one reference object based on the similarity between the first semantic vector and the second semantic vector corresponding to at least one reference object can be as follows: for any reference object among at least one reference object, calculate the similarity between the first semantic vector and the reference object, and if the similarity is greater than or equal to a preset similarity threshold, determine the reference object as the second object.
[0251] The preset similarity threshold can be set relatively high, for example, the preset similarity threshold can be set to 80%.
[0252] In this case, the above method only identifies the reference object as the second object when the similarity between the first semantic vector and the reference object is very high, thereby enabling accurate mining of similar users.
[0253] It is worth noting that, in the case that steps 303-304 above also determine the semantic ID of the first semantic vector and the semantic ID of each of the multiple second semantic vectors, the operation of step 305 above can be: determining preliminary similar objects based on the similarity between the semantic ID of the first semantic vector and the semantic ID of each of the multiple second semantic vectors; determining at least one second object from the preliminary similar objects based on the similarity between the first semantic vector and the second semantic vector corresponding to the preliminary similar object.
[0254] Specifically, since the semantic ID is obtained by combining the indices of the semantic vector in M code tables, the first j indices of the semantic ID can be obtained during the coarse screening. The first j indices of the semantic ID of the first semantic vector are then compared with the first j indices of the semantic ID of each second semantic vector to calculate similarity. Candidate objects corresponding to second semantic vectors with similarity scores greater than a preset similarity threshold are identified as preliminary similar objects. Subsequently, to ensure accurate discovery of similar objects, in the fine-tuning stage, similarity calculations can be performed using specific semantic vectors to extract at least one second object from the preliminary similar objects.
[0255] It should be understood that the M code tables are divided into layers of fine-grained subdivisions. Earlier code tables represent broader semantic information, corresponding to larger semantic categories, while later code tables represent more detailed semantic information, indicating more subtle differences. In the above approach, objects with similar semantic categories (preliminary similar objects) are first filtered using the first j indices. Then, from these semantically similar objects, final similar objects are selected based on fine-grained semantic information. This improves the efficiency of similar object mining while ensuring accurate identification of similar objects.
[0256] like Figure 4 As shown, after determining the semantic embedding (first semantic vector) of the first object and the semantic embedding (second semantic vector) of the candidate objects through the semantic enhancement module, the similarity object mining part can proceed. In the similarity object mining part, LBS constraints are first applied to the first object and multiple candidate objects to identify candidate objects located in the same delivery area as the first object. Then, similarity is calculated between the semantic embedding of the first object and the semantic embeddings of the candidate objects within the same delivery area. Next, at least one second object is mined from the candidate objects within the same delivery area based on the similarity, resulting in a second object set. Finally, product recommendations are made for the first object based on the recommendation information of each second object in the second object set.
[0257] Step 306: Based on the recommended products corresponding to at least one second object, recommend products to the first object.
[0258] The recommended products corresponding to at least one second object can be obtained by matching their respective data with product data. Since at least one second object has rich behavioral data, the recommended products corresponding to at least one second object should meet the needs of the second object.
[0259] Since at least one second user shares similar preferences with the first user, the recommended products for that second user should also align with the needs of the first user. Therefore, when behavioral data for the first user is limited, by mining similar users (at least one second user) and combining this with recommended products for the first user, targeted product recommendations can be provided, thereby improving the accuracy of supply recall.
[0260] One possible approach is that step 306 can be: determining a first recommended product based on recommended products corresponding to at least one second object; and recommending the first recommended product to the first object.
[0261] Specifically, the recommended product common to each of the recommended products corresponding to at least one second object can be used as the first recommended product, and the first recommended product can be recommended to the first object.
[0262] It should be understood that the recommended product common to each of the recommended products corresponding to at least one second object is a product commonly preferred by at least one second object. Since at least one second object is a similar object to the first object, this product may also be a product preferred by the first object. In the above method, by recommending the recommended product common to each of the recommended products corresponding to at least one second object as the first recommended product to the first object, accurate recommendations to the first object can be achieved.
[0263] Another possible approach is to obtain search keywords; based on the search keywords, determine the target store. In this case, step 306 can be: based on the products in the target store and at least one recommended product corresponding to the second object, determine the second recommended product and recommend the second recommended product to the first object.
[0264] The above method can be applied to scenarios where users use the search function within a target channel, that is, recommending products to users by combining search keywords when they use the search function.
[0265] The target stores are those related to the search keywords. In this embodiment, there are multiple target stores. It should be understood that within the target channel of the first application, search results are generally displayed to users on a store-by-store basis. Therefore, after obtaining the search keywords, the target stores can be determined first, that is, the stores related to the search keywords.
[0266] Generally, the merchant display area also shows some of the store's products. These products can be those related to the search keywords, or they can be recommended products.
[0267] In the above method, a second recommended product is determined based on the products in the target store and at least one recommended product corresponding to a second object, so that the second recommended product can be displayed under the target store in the search results display interface.
[0268] It is worth noting that in this embodiment, by introducing a Large Language Model (LLM) and training it with user historical data, a vector representation model is obtained. This allows the vector representation model to learn large-scale world knowledge, thereby generating richer vector representations when extracting data. This is particularly beneficial when the behavioral data of the first object is limited; using the vector representation model to represent the first data yields richer vector representations. Furthermore, without sacrificing the accuracy of the vector representation, pooling operations are introduced to reduce the original high-dimensional vectors to low-dimensional vectors. This significantly improves the inference speed for similar objects in subsequent links and greatly reduces the amount of computational data.
[0269] It should be noted that the code table described in this application embodiment can be pre-trained before actual application, so that the semantic vectors stored in the code table can more accurately represent the corresponding semantic information.
[0270] Specifically, the first step is to obtain a target training set, which may include multiple training samples. Each training sample includes input data, such as the object's behavioral feature vector or attribute description vector. After obtaining the target training set, an encoder is first used to generate a high-dimensional continuous latent feature vector z corresponding to each input data.
[0271] First, hierarchical initialization code table
[0272] For M code tables, each code table is set to a size of K (e.g., K = 1024). Then, for the first-level code table, a clustering algorithm is used to cluster all high-dimensional continuous latent feature vectors z, obtaining K cluster centers, which serve as the initial semantic vectors in the first-level code table. Next, for the second to M-level code tables, the residual after the first-level quantization is calculated (continuous latent feature vector - first-level matched semantic vector), and then the clustering algorithm is used to cluster this residual to obtain the initial semantic vectors in the second-level code table. This process continues until the M-level code tables are traversed, and so on, initializing the current level's code table based on the residuals of the previous level.
[0273] Second, hierarchical quantification
[0274] First, for level 1 quantization, calculate the distance between z and all initial semantic vectors in the first code table, and select the closest semantic vector c1. The residual of level 1 quantization is r1 = z - c1. For level 2 quantization, calculate the distance between r1 and all semantic vectors in the level 2 code table, and select the closest semantic vector c2. The residual of level 2 quantization is r2 = r1 - c2. This process continues until level M quantization is performed, resulting in the semantic sequence [c1, c2, ..., c...]. M Then, the quantized semantic vector [c1, c2, ..., c] is decoded.M Reconstruct it into an approximation of the input data.
[0275] Secondly, the encoder, decoder, and code table are jointly optimized and trained.
[0276] Since the code table stores semantic vectors with different semantic information on the one hand, and semantic vectors are also low-dimensional vectors on the other hand, the training process of the code table also includes the quantization process of semantic vectors. In this case, the goal of training the code table should be to minimize the reconstruction error, quantization loss and regularization term, while optimizing the code table to better fit the data distribution.
[0277] 1. Reconstruction Loss
[0278] The reconstruction loss is used to measure the difference between the decoder's output and the high-dimensional continuous latent feature vector (such as the L2 regularization of the two), ensuring that the quantized features retain the core information of the input.
[0279] 2. Quantifying Losses
[0280] Quantization loss is used to approximate the residuals of latent features with semantic vectors, avoiding the loss of too much information during the quantization process.
[0281] 3. Code table regularization
[0282] For each selected semantic vector c i Using the corresponding residual r i The average value is updated slowly. That is, the code table is updated by the following formula (1).
[0283] (1)
[0284] in, The semantic vector is updated after selecting the semantic vector at the u-th level of quantization. This is a smoothing coefficient, for example, 0.99. For the residual of the uth order quantization, The residual calculated in each u-th quantization process The average value, The semantic vector selected for the u-th level quantization.
[0285] Finally, iterative training and code table optimization.
[0286] By freezing the code table and updating only the encoder and decoder parameters, the total loss (the sum of reconstruction loss and quantization loss) is minimized. The code table is then updated separately, specifically using the code table regularization update rules described above. This training process is repeated until the loss converges.
[0287] It should be understood that the semantic vectors stored in the M code tables obtained after training can accurately represent the semantics of the input data, thus obtaining M code tables containing standard semantic vectors corresponding to different semantic information.
[0288] In this embodiment, after obtaining the first vector representation of the first data and the second vector representation of the second data of multiple candidate objects, the server performs multiple rounds of searches in M code tables to find the semantic vectors corresponding to the first vector representation and the multiple second vector representations. Since the M code tables include semantic vectors corresponding to different semantic information, multiple rounds of searches in the M code tables can obtain the semantic information of the first data and the multiple second data, thereby achieving semantic enhancement of the first vector representation and the multiple second vector representations, resulting in first semantic vectors and multiple second semantic vectors with higher semantic accuracy. In this case, the similarity between the first semantic vector and the multiple second semantic vectors can be accurately calculated. Subsequently, based on the similarity between the first semantic vector and the multiple second semantic vectors, at least one second object with similar preferences to the first object can be accurately determined from multiple candidate objects. Finally, based on the recommended products corresponding to at least one second object, product recommendations are made to the first object. This allows the product recommendation information of second objects with similar preferences to be referenced when recommending products to the first object, thereby achieving targeted product recommendations to the first object and improving the accuracy of supply recall.
[0289] This application also provides another product recommendation method, which can be applied to a terminal, including but not limited to mobile phones, tablets, desktop computers, and other terminal devices that can install the first application.
[0290] The product recommendation method includes: receiving product recommendation information, wherein the product recommendation information is determined according to steps 301-306 above.
[0291] In other words, the product recommendation information is determined based on the recommended products of at least one second object that has similar preferences to the first object. The specific operation of determining the product recommendation information is described in steps 301-306 above, and will not be repeated here.
[0292] It should be understood that after receiving the product recommendation information, the terminal can display the product recommendation information.
[0293] In this embodiment of the application, the product recommendation information can be displayed in the following two possible ways.
[0294] One possible approach is to display the product recommendation information on the first screen of the first application.
[0295] The first interface can be the home screen of the target channel in the first application.
[0296] In this scenario, after the user opens the first application and enters the target channel, the product recommendation information is displayed to the user on the target channel's home screen, thus enabling targeted product recommendations to be made to the user on the home screen.
[0297] Another possible approach is to display product recommendations on the search results page.
[0298] In some embodiments, users can also use the search function within the target channel, and the terminal can recommend products to users on the search results display interface.
[0299] Specifically, in response to a click on the search control on the first interface, a search interface is displayed; in response to an input of search keywords on the search interface, a search result is obtained, which includes product information of a second recommended product, which is determined according to another possible method in step 306, and the target store is determined based on the search keywords; the search result is then displayed.
[0300] In this case, the product recommendation information is also the product information of the second recommended product.
[0301] In this embodiment, the terminal receives product recommendation information determined by recommended products corresponding to at least one second object that has similar preferences to the first object. This allows the terminal to display the product recommendation information, enabling the first object to browse products that match its preferences. This allows for targeted product recommendations to the first object, thereby improving the accuracy of supply recall.
[0302] Figure 6 This is a schematic diagram of a product recommendation device provided in an embodiment of this application. The product recommendation device can be implemented as part or all of a computer device by software, hardware, or a combination of both. This computer device can be as described below. Figure 7 The computer equipment shown. See also Figure 6 The device includes: an acquisition module 601, an embedding processing module 602, a search module 603, a determination module 604, and a recommendation module 605.
[0303] The acquisition module 601 is used to acquire the first data of the first object and the second data of multiple candidate objects;
[0304] The embedding processing module 602 is used to perform embedding processing on the first data to obtain a first vector representation, and to perform embedding processing on each of the multiple second data to obtain multiple second vector representations;
[0305] The lookup module 603 is used to perform multiple rounds of lookup from M code tables based on the first vector representation to obtain multiple first reference vectors, and combine the multiple first reference vectors to obtain a first semantic vector when the multiple first reference vectors meet the combination conditions. Each of the M code tables includes a semantic vector corresponding to different semantic information, and M is an integer greater than or equal to 1.
[0306] The lookup module 603 is also used to perform multiple rounds of lookup in M code tables based on any one of the multiple second vector representations to obtain multiple second reference vectors corresponding to the second vector representation, and combine the multiple second reference vectors to obtain the second semantic vector corresponding to the second vector representation when the multiple second reference vectors satisfy the combination condition.
[0307] The determination module 604 is used to determine at least one second object from multiple candidate objects based on the similarity between the first semantic vector and multiple second semantic vectors;
[0308] The recommendation module 605 is used to recommend products to the first object based on the recommended products corresponding to at least one second object.
[0309] In one possible implementation, the lookup module 603 is specifically used for:
[0310] Encode the first vector representation to obtain the first encoded feature;
[0311] Based on the first coding feature, multiple rounds of searching are performed from M code tables to obtain multiple first reference vectors.
[0312] In one possible implementation, the lookup module 603 is specifically used for:
[0313] In the first round of search, for the first code table of M code tables, the first first reference vector is randomly searched from the first code table;
[0314] In the second round of search, based on the residual between the first first reference vector and the first coding feature, the second first reference vector is searched from the second code table of the M code tables;
[0315] In the i-th round of search, based on the residual between the first i-1 first reference vectors and the first coding feature, the i-th first reference vector is searched from the i-th code table of M code tables, where i is an integer greater than or equal to 3.
[0316] In one possible implementation, the product recommendation device further includes:
[0317] The feature reconstruction module is used to reconstruct features based on multiple first reference vectors to obtain third encoded features;
[0318] The judgment module is used to determine that multiple first reference vectors satisfy the combination condition if the difference between the third coding feature and the first coding feature satisfies the first condition; and to determine that multiple first reference vectors do not satisfy the combination condition if the difference between the third coding feature and the first coding feature does not satisfy the first condition.
[0319] In one possible implementation, the product recommendation device further includes:
[0320] The execution module is used to re-execute the step of searching through M code tables multiple times to obtain multiple first reference vectors based on differences and first coding features when multiple first reference vectors do not meet the combination conditions, so as to update the multiple first reference vectors.
[0321] In one possible implementation, the embedding processing module 602 is specifically used for:
[0322] The first data is input into the vector representation model, and the first data is embedded through the vector representation model to obtain the first vector representation. The vector representation model is trained based on historical data.
[0323] In one possible implementation, the product recommendation device further includes:
[0324] The pooling module is used to perform pooling operations on the first vector representation to obtain the third vector representation; and to perform pooling operations on each of the multiple second vector representations to obtain multiple fourth vector representations.
[0325] Furthermore, the lookup module 603 is specifically used for:
[0326] Based on the third vector representation, multiple rounds of searching are performed from M code tables to obtain multiple first reference vectors;
[0327] Furthermore, the lookup module 603 is also specifically used for:
[0328] Based on any one of the multiple fourth vector representations, multiple rounds of searching are performed in M code tables to obtain multiple second reference vectors corresponding to the fourth vector representation.
[0329] In one possible implementation, the acquisition module 601 is further used to: acquire the current position of the first object and the common positions of multiple candidate objects;
[0330] The determining module 604 is also used to determine at least one reference object from multiple candidate objects based on the current position and the common positions of multiple candidate objects;
[0331] And, module 604 is specifically used for:
[0332] Based on the similarity between the first semantic vector and the second semantic vector corresponding to at least one reference object, at least one second object is determined from at least one reference object.
[0333] In one possible implementation, the determining module 604 is further used for:
[0334] For any one of multiple candidate objects, if the candidate object's usual location and current location are in the same delivery area, the candidate object will be identified as the reference object.
[0335] In one possible implementation, the recommendation module 605 is specifically used for:
[0336] Based on the recommended products corresponding to at least one second object, determine the first recommended product;
[0337] Recommend the first recommended product to the first target audience.
[0338] In one possible implementation, the acquisition module 601 is further used for:
[0339] Obtain search keywords;
[0340] Module 604 is also used to: determine the target store based on search keywords;
[0341] Furthermore, the recommended module 605 is specifically used for:
[0342] Based on the products in the target store and at least one recommended product corresponding to a second object, determine the second recommended product;
[0343] Recommend the second recommended product to the first target audience.
[0344] In this embodiment, for the first data of the first object and the second data of multiple candidate objects, after obtaining the first vector representation of the first data and the second vector representation of the second data, multiple rounds of searching are performed from M code tables to find the semantic vectors corresponding to the first vector representation and the multiple second vector representations. Since the M code tables include semantic vectors corresponding to different semantic information, multiple rounds of searching from the M code tables can obtain the semantic information of the first data and the multiple second data, thereby achieving semantic enhancement of the first vector representation and the multiple second vector representations, resulting in first semantic vectors and multiple second semantic vectors with higher semantic accuracy. In this case, the similarity between the first semantic vector and the multiple second semantic vectors can be accurately calculated. Subsequently, based on the similarity between the first semantic vector and the multiple second semantic vectors, at least one second object with similar preferences to the first object can be accurately determined from multiple candidate objects. Finally, based on the recommended products corresponding to at least one second object, product recommendations are made for the first object. This allows for the reference of product recommendation information of second objects with similar preferences when recommending products to the first object, thereby achieving targeted product recommendations to the first object and improving the accuracy of supply recall.
[0345] It should be noted that the product recommendation device provided in the above embodiments is only illustrated by the division of the above functional modules when making product recommendations. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0346] This application also provides another product recommendation device. This product recommendation device can be implemented as part or all of a computer device, which can be described below. Figure 7 The computer device shown. The device includes:
[0347] A receiving module is used to receive product recommendation information, wherein the product recommendation information is determined according to steps 301-306 above;
[0348] In this embodiment of the application, by receiving product recommendation information determined by recommended products corresponding to at least one second object with similar preferences to the first object, the terminal can display the product recommendation information, so that the first object can browse products that match its preferences, thereby enabling targeted product recommendations for the first object and improving the accuracy of supply recall.
[0349] The functional units and modules in the above embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of the embodiments of this application.
[0350] The product recommendation device and product recommendation method embodiments provided in the above embodiments belong to the same concept. The specific working process and technical effects of the units and modules in the above embodiments can be found in the method embodiment section, and will not be repeated here.
[0351] Figure 7 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Figure 7 As shown, the computer device 700 includes: a processor 70, a memory 71, and a computer program 72 stored in the memory 71 and executable on the processor 70. When the processor 70 executes the computer program 72, it implements the steps in the product recommendation method in the above embodiments.
[0352] The computer device 700 can be a general-purpose computer device or a special-purpose computer device. In specific implementations, the computer device 700 can be a desktop computer, a portable computer, a network server, a handheld computer, a mobile phone, a tablet computer, a wireless terminal device, a communication device, or an embedded device. This application does not limit the type of computer device 700. Those skilled in the art will understand that... Figure 7 The computer device 700 is merely an example and does not constitute a limitation on the computer device 700. It may include more or fewer components than shown in the figure, or combine certain components, or different components, such as input / output devices, network access devices, etc.
[0353] Processor 70 can be a Central Processing Unit (CPU), or it can be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor.
[0354] In some embodiments, memory 71 may be an internal storage unit of computer device 700, such as a hard disk or memory of computer device 700. In other embodiments, memory 71 may be an external storage device of computer device 700, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., provided on computer device 700. Furthermore, memory 71 may include both internal and external storage units of computer device 700. Memory 71 is used to store operating systems, applications, boot loaders, data, and other programs. Memory 71 can also be used to temporarily store data that has been output or will be output.
[0355] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, can implement the steps in the various method embodiments described above.
[0356] This application provides a computer program product that, when run on a computer, causes the computer to perform the steps described in the various method embodiments above.
[0357] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the above method embodiments of this application can be implemented by a computer program instructing related hardware. This computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or some intermediate form. The computer-readable medium can include at least: any entity or device capable of carrying the computer program code to a photographing device / terminal device, a recording medium, a computer memory, ROM (Read-Only Memory), RAM (Random Access Memory), CD-ROM (Compact Disc Read-Only Memory), magnetic tape, floppy disk, and optical data storage devices. The computer-readable storage medium mentioned in this application can be a non-volatile storage medium; in other words, it can be a non-transient storage medium.
[0358] It should be understood that all or part of the steps of the above embodiments can be implemented by software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented in whole or in part as a computer program product. The computer program product includes one or more computer instructions. The computer instructions can be stored in the above-described computer-readable storage medium.
[0359] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0360] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0361] In the embodiments provided in this application, it should be understood that the disclosed apparatus / computer devices and methods can be implemented in other ways. For example, the apparatus / computer device embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0362] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0363] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. A product recommendation method, characterized in that, The method is applied to a server, and the method includes: Obtain the first data of the first object and the second data of multiple candidate objects; The first data is embedded to obtain a first vector representation, and the embedding process is performed on each of the multiple second data to obtain multiple second vector representations; Based on the first vector representation, multiple rounds of searching are performed from M code tables to obtain multiple first reference vectors. When the multiple first reference vectors satisfy the combination conditions, the multiple first reference vectors are combined to obtain a first semantic vector. Each of the M code tables includes a semantic vector corresponding to different semantic information. The M code tables are set up hierarchically. In the M code tables, the next level code table includes a semantic vector corresponding to the semantic information after fine-grained division of the semantic information indicated by the previous level code table. M is an integer greater than 1. Based on any one of the plurality of second vector representations, the multiple rounds of search are performed in the M code tables to obtain a plurality of second reference vectors corresponding to the second vector representation. If the plurality of second reference vectors satisfy the combination condition, the plurality of second reference vectors are combined to obtain the second semantic vector corresponding to the second vector representation. Based on the similarity between the first semantic vector and multiple second semantic vectors, at least one second object is determined from the multiple candidate objects; Based on the recommended products corresponding to the at least one second object, product recommendations are made for the first object.
2. The method according to claim 1, characterized in that, The process of performing multiple rounds of searches from M code tables based on the first vector representation to obtain multiple first reference vectors includes: Encode the first vector representation to obtain the first encoded feature; Based on the first encoding feature, multiple rounds of searching are performed from the M code tables to obtain the plurality of first reference vectors.
3. The method according to claim 2, characterized in that, The step of obtaining the plurality of first reference vectors by performing multiple rounds of searches from the M code tables based on the first encoded feature includes: In the first round of search, for the first code table of the M code tables, the first first reference vector is randomly searched from the first code table; In the second round of search, based on the residual between the first first reference vector and the first coding feature, the second first reference vector is searched from the second code table of the M code tables; In the i-th round of search, based on the residual between the first i-1 first reference vectors and the first coding feature, the i-th first reference vector is searched from the i-th code table of the M code tables, where i is an integer greater than or equal to 3.
4. The method according to claim 2, characterized in that, The method further includes: Based on the multiple first reference vectors, feature reconstruction is performed to obtain the third encoded feature; If the difference between the third coding feature and the first coding feature satisfies the first condition, it is determined that the plurality of first reference vectors satisfy the combination condition; If the difference between the third coding feature and the first coding feature does not satisfy the first condition, it is determined that the plurality of first reference vectors do not satisfy the combination condition.
5. The method according to claim 4, characterized in that, The method further includes: If the multiple first reference vectors do not satisfy the combination condition, based on the difference and the first coding feature, the step of performing multiple rounds of search from the M code tables to obtain multiple first reference vectors is re-executed to update the multiple first reference vectors.
6. The method according to any one of claims 1-5, characterized in that, The embedding process of the first data to obtain the first vector representation includes: The first data is input into the vector representation model, and the first data is embedded through the vector representation model to obtain the first vector representation. The vector representation model is trained based on historical data.
7. The method according to any one of claims 1-5, characterized in that, The method further includes: The first vector representation is pooled to obtain the third vector representation; Perform a pooling operation on each of the plurality of second vector representations to obtain a plurality of fourth vector representations; And, based on the first vector representation, the process of performing multiple rounds of lookups from M code tables to obtain multiple first reference vectors includes: Based on the third vector representation, multiple rounds of searching are performed from M code tables to obtain multiple first reference vectors; And, based on any one of the plurality of second vector representations, perform the plurality of rounds of lookup from the M code tables to obtain a plurality of second reference vectors corresponding to the second vector representation, including: Based on any one of the plurality of fourth vector representations, multiple rounds of lookup are performed in the M code tables to obtain a plurality of second reference vectors corresponding to the fourth vector representation.
8. The method according to any one of claims 1-5, characterized in that, Before determining at least one second object from the plurality of candidate objects based on the similarity between the first semantic vector and a plurality of second semantic vectors, the method further includes: Obtain the current position of the first object and the frequently used positions of the multiple candidate objects; Based on the current location and the common locations of the multiple candidate objects, at least one reference object is determined from the multiple candidate objects; And, based on the similarity between the first semantic vector and the plurality of second semantic vectors, determining at least one second object from the plurality of candidate objects includes: The at least one second object is determined from the at least one reference object based on the similarity between the first semantic vector and the second semantic vector corresponding to the at least one reference object.
9. The method according to claim 8, characterized in that, The step of determining at least one reference object from the multiple candidate objects based on the current location and the commonly used locations of the multiple candidate objects includes: For any one of the plurality of candidate objects, if the candidate object's usual location and the current location are in the same delivery area, the candidate object is determined as the reference object.
10. The method according to any one of claims 1-5, characterized in that, The step of recommending products to the first object based on the recommended products corresponding to the at least one second object includes: Based on the recommended products corresponding to the at least one second object, a first recommended product is determined; The first recommended product is recommended to the first object.
11. The method according to any one of claims 1-5, characterized in that, The method further includes: Obtain search keywords; Based on the search keywords, the target store was identified; And, the step of recommending products to the first object based on the recommended products corresponding to the at least one second object includes: Based on the products in the target store and the recommended products corresponding to the at least one second object, a second recommended product is determined; The second recommended product is recommended to the first object.
12. A product recommendation method, characterized in that, The method is applied to a terminal, and the method includes: Receive product recommendation information, wherein the product recommendation information is determined by the method according to any one of claims 1-11.
13. A computer device, characterized in that, The computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the method according to any one of claims 1 to 12.
14. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method according to any one of claims 1 to 12.
Citation Information
Patent Citations
Method for solving cold start problem of collaborative filtering algorithm
CN110083764A