Commodity recommendation method and device, electronic equipment and storage medium
By constructing a product vector library and using product tags for vector representation, the problem of low real-time performance of the training algorithm model of the product recommendation system on the e-commerce platform is solved, the accuracy and real-time performance of recommendations are improved, and the personalized needs of users are met.
Patent Information
- Application Number
- CN202310408915.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-17
- Publication Date
- 2024-10-22
AI Technical Summary
Due to the low real-time nature of the training algorithm model of the existing e-commerce platform's product recommendation system, the accuracy of the recommendation results is limited, making it difficult to update and adjust in time to meet the personalized needs of users.
By constructing a product vector library and using product tags for vector representation, the computing power requirements of the training process are reduced, real-time performance is improved, and target products of interest are determined and recommended based on user information.
It improves the real-time and accuracy of product recommendation, reduces the timeliness requirements of the training process, and ensures the personalization and stability of the recommendation results.
Smart Images

Figure CN118822650A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present specification relate to product recommendation technology in the field of e-commerce, and more particularly to a product recommendation method, device, electronic device, and storage medium. Background Art
[0002] With the development of logistics technology and the improvement of people's living standards, e-commerce platforms have developed rapidly. Through e-commerce platforms, people can buy their favorite products without leaving home.
[0003] At present, e-commerce platforms use recommendation systems to predict products that users may be interested in, and then recommend related products to users. The algorithm model of the recommendation system generally determines the products that users may be interested in based on the user's behavior on the e-commerce platform. In order to improve the accuracy of the recommendation, the algorithm model needs to be updated and trained frequently, but since the training time is usually long, it is difficult to ensure real-time performance, which limits the accuracy of the recommendation results. Summary of the invention
[0004] Multiple implementations in this specification provide a product recommendation method, device, electronic device and storage medium to solve the problem that the accuracy of the recommendation system is limited due to the low real-time performance of the training algorithm model.
[0005] One embodiment of the present specification provides a product recommendation method, which includes:
[0006] After obtaining the recommendation request of the target user, determining the target product that the target user is interested in based on the user information of the target user;
[0007] Based on the first vector corresponding to the target product, a search is performed in a product vector library to determine a second vector matching the first vector; wherein the product vector library is constructed by extracting labels from text information of different products in advance and vectorizing the extracted labels;
[0008] The commodity corresponding to the second vector is determined as a commodity to be recommended, and a commodity is recommended to the target user based on the commodity to be recommended.
[0009] One embodiment of the present specification provides a product recommendation device, which includes:
[0010] A determination module is used to determine the target product that the target user is interested in based on the user information of the target user after obtaining the recommendation request of the target user;
[0011] A retrieval module, configured to search a product vector library based on the first vector corresponding to the target product, and determine a second vector matching the first vector; wherein the product vector library is constructed by extracting labels from text information of different products in advance and vectorizing the extracted labels;
[0012] A recommendation module is used to determine that the commodity corresponding to the second vector is a commodity to be recommended, and recommend a commodity to the target user based on the commodity to be recommended.
[0013] An embodiment of the present specification provides an electronic device, which includes a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the above-mentioned product recommendation method is implemented.
[0014] One embodiment of the present specification provides a computer-readable storage medium storing a computer program. When the computer program is executed by a computer, the computer executes the product recommendation method as described above.
[0015] The multiple implementation methods provided in this specification are as follows: after obtaining the recommendation request of the target user, based on the user information of the target user, the target product that the target user is interested in is determined; based on the first vector corresponding to the target product, a search is performed in the product vector library to determine the second vector that matches the first vector; and then the product corresponding to the second vector is determined as the product to be recommended, and the product is recommended to the target user based on the product to be recommended; wherein the product vector library is constructed by pre-extracting labels from the text information of different products and vectorizing the extracted labels. With such a setting, after determining the target product that the user is interested in, when recalling similar products to be recommended, the product vector library is constructed by vectorizing the labels extracted from the product text information, and since the computing power requirements for the training process of vectorizing product labels in this solution are lower than those of the existing solutions, the real-time performance of the training process can be improved, thereby ensuring the accuracy of the recommendation results. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 A schematic diagram of a recommendation system provided for one embodiment of the present specification.
[0017] Figure 2 A schematic diagram of an application scenario of a product recommendation method provided in one embodiment of this specification.
[0018] Figure 3 A schematic diagram of the architecture of a product recommendation system provided for one embodiment of this specification.
[0019] Figure 4A flowchart of a product recommendation method provided for one embodiment of this specification.
[0020] Figure 5 A flowchart of a process for constructing a commodity vector library provided in accordance with one embodiment of this specification.
[0021] Figure 6 A schematic diagram of the structure of a commodity recommendation device provided in one embodiment of this specification.
[0022] Figure 7 A schematic diagram of the structure of an electronic device provided for one embodiment of the present specification. DETAILED DESCRIPTION
[0023] Overview
[0024] An e-commerce platform is also known as an electronic commerce platform, which is a platform for enterprises or individuals to conduct online transactions and negotiations. An enterprise e-commerce platform is a virtual network space for business activities on the Internet and a management environment that ensures the smooth operation of business. It is an important place to coordinate and integrate the orderly, related and efficient flow of information flow, goods flow and capital flow. Enterprises and merchants can make full use of the network infrastructure, payment platform, security platform, management platform and other shared resources provided by the e-commerce platform to carry out their own business activities effectively and at low cost. Based on this, users can participate in the above business activities through the e-commerce platform, including browsing and purchasing goods.
[0025] In related technologies, in order to encourage users to purchase more products, e-commerce platforms use recommendation systems to predict products that users may be interested in, and then recommend products that match their interests to users, thereby increasing users’ click-through rates and conversion rates. Figure 1 As shown in the figure, the framework of the recommendation system is mainly composed of two modules, namely the recall module and the sorting module. The recall module uses the recall model to filter out the recall set (hundreds of levels) that meets the requirements from the candidate set (millions of levels), and the recall module usually adopts a multi-way recall design mode, that is, it outputs the corresponding recall set through a variety of different recall models respectively; after the recall module filters out the recall set, the sorting module first sorts the objects contained in each recall set through the sorting model to obtain the sorting result. The sorting result includes the Top K most satisfactory products, and then the recall sorting results of multiple recall models are fused through the fusion model, such as allocating appropriate ratios to each model, or determining the final recommendation result through a rough sorting method. Depending on the usage scenario, the recommendation results are generally several to dozens.
[0026] Simply put, the recall module is responsible for screening out candidate products that users are more interested in from the massive product library, while the sorting module determines the display order and display position of these candidate products on the recommendation page.
[0027] From the above system framework, we can see that in order to improve the user's click-through rate and conversion rate, it is very important to design a reasonable and efficient recall model, so that we can filter out products that better meet user needs and that users are more interested in. The current mainstream recommendation recall models include hotspot recall models based on historical behavior statistics and collaborative filtering models based on user behavior.
[0028] The hot recall model based on historical behavior statistics refers to recalling hot products within a certain period of time, such as recalling products with high clicks, high transactions, high comments, or high likes in the past 7 days. The advantage of this recall model is that it can recall hot products and increase the user's click rate, but these products are not necessarily products that users want to buy, so the improvement in user conversion rate may be limited. At the same time, this recall method does not utilize personalized information between different users and cannot give different recommendation results for different users.
[0029] The collaborative filtering model based on user behavior refers to using the preferences of a group of people with similar interests and common experiences to recommend products that users are interested in. This method is highly personalized and automated, and can effectively use feedback information from other similar users, but its disadvantage is that it is less effective for new users and new products.
[0030] In order to solve the above problems, an implicit vector model based on product / user vectors is proposed, which refers to mining implicit vectors of product / user behavior through algorithms, so as to obtain more information in addition to explicit click or order behavior. This method can achieve a good effect of mining implicit information of products / users, and has a high degree of personalization for different users, but it has poor interpretability, that is, it cannot give an intuitive and easy-to-understand explanation for the mined implicit vectors.
[0031] In addition, the inventors of the present invention have discovered through research that for vector recall models such as implicit vector models based on product / user vectors, the accuracy of the recall results is highly correlated with user behavior. Since user behavior is constantly changing, the vector recall model needs to be frequently updated and trained (usually every day). Since the learning and training process of user behavior is relatively complicated, this places high demands on the computing power of the model training equipment. At the same time, since the training time is usually long, it is difficult to ensure real-time performance.
[0032] Therefore, in order to improve the accuracy and real-time performance of the final recommendation results, it is necessary to provide a product recommendation method, device, electronic device and storage medium, which can extract product labels, then build a product vector library based on product labels, and then use the product vector library to recall products, thereby solving the technical problem that the accuracy of the recommendation system is limited due to the low real-time performance of the training algorithm model. The solution of the present invention is mainly to improve the recall module of the recommendation system and propose a new recall model.
[0033] Example scenario
[0034] The technical solution of the present invention can be applied in the recommendation system of an e-commerce platform. Specifically, when a user browses or purchases goods through an e-commerce platform, the recommendation system of the e-commerce platform can determine the goods that the user may be interested in based on information such as the user's current behavior, user portrait, and historical behavior, and then filter out multiple goods that are the same, similar, or related to the goods that the user is interested in from the product library, and recommend them to the user.
[0035] Among them, the above-mentioned e-commerce platform can be an e-commerce platform for selling new goods, or it can be an e-commerce platform for recycling and selling second-hand goods.
[0036] Based on this, this specification provides an example of an application scenario of a product recommendation method. Figure 2 As shown, in this example, the user enters the search keyword "iPhone13" in the search box of the mobile e-commerce platform APP. Based on this, the e-commerce platform first searches according to the keyword and displays the search results in the main part of the display page. The search results are also products 1 to 9 in the figure. They may correspond to different merchants or different parameters such as product color, etc. The user can click the corresponding link to view the product details. In addition, the e-commerce platform can also analyze the user's user information through the recommendation system, including user portraits and historical behaviors, etc., and then determine the products that the user may be interested in, and search in the product library to recall other related or similar products. Finally, recommend in the "Guess you like" section at the bottom of the display page. The recommended content is also products 10 to 12 in the figure. For example, based on the user's historical purchase records, it is found that the user has purchased second-hand electronic devices, so a second-hand iPhone13 can be recommended to the user, etc.
[0037] System Architecture
[0038] like Figure 3As shown, the embodiment of this specification provides a product recommendation system. The product recommendation system may include a client 100 and a server 200. The client 100 may be an electronic device with network access capability. Specifically, for example, the client 100 may be a desktop computer, a tablet computer, a laptop computer, a smart phone, a digital assistant, an intelligent wearable device, a shopping guide terminal, a television, etc. Among them, intelligent wearable devices include but are not limited to smart bracelets, smart watches, smart glasses, smart helmets, etc. Alternatively, the client 100 may also be software that can be run in the electronic device. The server 200 may be an electronic device with certain computing and processing capabilities. It may have a network communication module, a processor, and a memory, etc. Of course, the server 200 may also refer to software running in the electronic device. The server 200 may also be a distributed server, which may be a system with multiple processors, memories, network communication modules, etc. operating in collaboration. Alternatively, the server 200 may also be a server cluster formed by several servers. Alternatively, with the development of science and technology, the server 200 may also be a new technical means that can realize the corresponding functions of the embodiment of the specification. For example, it may be a new form of "server" based on quantum computing.
[0039] The e-commerce platform is configured in the server 200. The client 100 and the server 200 can communicate in a wired or wireless manner, so that the user can access the e-commerce platform in the server 200 by logging in to the client 100, and perform operations such as browsing, collecting and placing orders for products on the e-commerce platform.
[0040] Example Method
[0041] One embodiment of the present specification provides a product recommendation method. The product recommendation method can be applied to the above-mentioned server 200, that is, it can be executed by the server 200. Figure 4 As shown, the commodity recommendation method of this embodiment may include the following steps:
[0042] Step S101: after obtaining the recommendation request of the target user, the target product that the target user is interested in is determined based on the user information of the target user.
[0043] In some cases, when users log in to an e-commerce platform to purchase goods, they may not have a specific purchase goal. For example, they want to buy a smartphone, but they don't know much about the brand of smartphones and cannot find specific products by searching on their own. In this case, users can use the recommendation system of the e-commerce platform to view multiple products recommended by the platform, and then purchase the required products from these products.
[0044] In this embodiment, the user first needs to send a recommendation request to the e-commerce platform. Specifically, the recommendation request is a request signal sent by the user to the e-commerce platform in the server through the client. When the e-commerce platform obtains the request signal, it performs corresponding processing. For example, the user first logs in to the client and opens the page of the e-commerce platform in the client. A virtual button "Recommend for me" can be set in the page, and the user can request the e-commerce platform to make a recommendation by clicking the button. Among them, the click operation can be a touch screen operation, or it can also be a click operation performed by a mouse connected to the client device, and so on.
[0045] In this embodiment, after obtaining the recommendation request of the target user, the e-commerce platform in the server determines that the target user wants to be recommended products. At this time, the e-commerce platform can analyze the user information of the target user to determine the target products that the target user is interested in.
[0046] Specifically, the user information of the target user refers to the personalized information corresponding to the target user. For example, it includes but is not limited to the historical behavior records and user portraits of the target user. More specifically, the historical behavior records refer to the records of the user's operation behaviors on the e-commerce platform, including but not limited to browsing products, adding products to the shopping cart, and placing orders to purchase products, etc. The user portrait refers to the information corresponding to the user's attributes and behaviors, such as the user's gender, age, location, etc.
[0047] Through the user information of the target user, the e-commerce platform can perform analysis to determine the target products that the target user is interested in.
[0048] In some specific implementations, the specific process of the target product that the target user is interested in in step S101 may include: obtaining the historical behavior record of the target user; based on the historical behavior record, determining the products that the target user has used within the target time period as the target products that the target user is interested in.
[0049] Specifically, in this embodiment, the target products that the target user is interested in are determined based on the historical behavior records of the target user. That is, from the products that the user has browsed, added to cart, and ordered in the past, the products involved in a specific target time period are determined, that is, the products that the target user has acted on in the target time period. Since the target user has acted on these products, these products can be considered to be the products that the target user is interested in. In some embodiments, the target time period can be a period of time before the current moment, such as the last seven days.
[0050] In some other implementations, in step S101, the target product that the target user is interested in may also be determined based on other information in the user information, which will not be described one by one here.
[0051] Step S102: Based on the first vector corresponding to the target product, a search is performed in a product vector library to determine a second vector matching the first vector; wherein the product vector library is constructed by pre-extracting labels from text information of different products and vectorizing the extracted labels.
[0052] Specifically, in this embodiment, a product vector library is pre-built, which includes vector information corresponding to many different products on the e-commerce platform. Then, based on the first vector of the target product, the product vector library is searched, and products matching the target product determined in the previous step are selected as the products to be recommended, and the products are recalled. The first vector of the target product can be directly queried from the product vector library.
[0053] In some implementations, the process of determining the second vector that matches the first vector in step S102 may be to calculate the similarity between the first vector and each vector in the product vector library based on the first vector corresponding to the target product, and then use the second vector whose similarity meets a preset condition as the second vector that matches the first vector.
[0054] The calculated similarity may be cosine similarity. In addition, in some implementations, the process of determining whether the preset condition is satisfied may be: sorting the similarities according to the numerical values, and then taking multiple second vectors with the largest similarities, which are the second vectors satisfying the preset condition. In other implementations, the process of determining whether the preset condition is satisfied may be: determining whether the magnitude of each similarity is greater than a set similarity threshold, and for one or more second vectors greater than the similarity threshold, they are the second vectors satisfying the preset condition.
[0055] For example, when it is determined in step S101 that the number of target products that the target user is interested in is n (n≥1), m (m≥1) second vectors matching the first vectors of the aforementioned n products can be retrieved from the product vector library. The m second vectors can be the m second vectors with the greatest similarity to the n first vectors, or can also be the m second vectors with similarity values greater than a set similarity threshold.
[0056] In addition, the product vector library is constructed by pre-extracting labels from text information of different products and vectorizing the extracted labels.
[0057] Specifically, as mentioned above, when recalling products based on the implicit vector model of product / user vectors, it is necessary to mine and extract the implicit vector of product / user behavior. Since user behavior itself is complex and changeable, and the user behavior of different users is likely to be different, when training the vector model of user behavior itself, high computing power is required and the training time is long, resulting in low real-time performance of the vector model and failure to meet the user's timeliness requirements. In other words, since the model cannot be trained in time according to the user's latest behavior, it is likely that suitable products cannot be accurately recommended to the user.
[0058] In response to this problem, in this implementation, vectors are no longer trained and extracted for user behaviors, but labels are extracted for text information of different commodities, commodity labels of each commodity are extracted, and then each commodity label is vectorized, that is, the vectors of each commodity label are trained. Finally, the vectors of each label corresponding to each commodity are used to represent the commodity, and then a commodity vector library is established. In this way, on the one hand, since commodity labels are relatively simple compared to user behaviors, the computing power required for training vectors of commodity labels can be significantly reduced compared to training vectors of user behaviors, so that the training time can be shortened, and the timeliness requirements can be better met. On the other hand, since the label information of commodities is relatively stable, that is, the label information of each commodity is basically fixed and will not change, therefore, the vector information of the commodity finally obtained is also relatively stable. In this case, there is no need to frequently update the vector information of existing commodities in the commodity vector library, that is, there is no need to frequently retrain the label vectors, which is equivalent to reducing the timeliness requirements of the training process.
[0059] In some embodiments, Figure 5 As shown in the figure, the process of building the product vector library includes:
[0060] Step S201: Acquire text information of multiple commodities, and extract multiple commodity labels corresponding to each commodity based on the text information.
[0061] In some scenarios, when publishing products on e-commerce platforms, sellers will fill in the product information about the published products in the form of text information, such as the product category, brand, appearance color, quality, configuration parameters and other characteristic information and product image information, and will also reflect various information about the product in the product title and description text. In the data preparation stage of this implementation method, all of this text information needs to be obtained to be applied to the subsequent label extraction.
[0062] Furthermore, considering that the text information of a product includes structured information and unstructured information, it is necessary to extract label information from these two types of text information in different ways.
[0063] Specifically, the structured information of a product refers to the objective information of the product that can be organized into a row and column structure and can be identified. In other words, the structured information of a product can objectively represent the characteristics of the product. More specifically, the structured information of a product can include the characteristic parameters and product image of the product, for example, the model, color, and performance parameters of a component of the product, etc. Since the structured information of a product is an objective description of the product, in some specific implementations, the structured information of each product can be directly used as the product label of the corresponding product.
[0064] The unstructured information of a product includes the description information added by the seller when publishing the product, including the description information in the title and description. Since this information is added subjectively by the seller, it may contain invalid information, such as some words that cannot reflect the product information. Therefore, it is necessary to identify the unstructured information and extract the valid information from it.
[0065] In some specific implementations, the description information of each product may be subjected to text segmentation processing, and the obtained words may be matched with a pre-built label dictionary to extract the product label of the product.
[0066] Specifically, in some implementations, a word segmentation model such as CRF (Conditional Random Field) can be used to perform text segmentation on unstructured information such as product description information, and divide the unstructured information such as description information into a large number of separate words. After that, each word obtained by word segmentation is matched with a pre-built label dictionary. During the matching process, a word included in the label dictionary is considered to be a product label, otherwise it is considered not to be a product label.
[0067] In some implementations, the tag dictionary may be constructed manually, that is, all possible tag words may be manually annotated to construct a tag dictionary for use in subsequent matching.
[0068] It should be noted that the word segmentation model used in the above word segmentation process is not limited to the CRF model, and can be replaced by other models or implemented in combination with other models. This process is a prior art and will not be described in detail here.
[0069] Through the above method, the corresponding product labels can be extracted for each product for use in subsequent steps. In a specific scenario, the product labels of a product may include: Apple, white, 90% new, official replacement, out of warranty, repaired, etc.
[0070] Step S202: Based on the historical behavior sequences of different users in historical recommendation scenarios, multiple tag sequences are determined; wherein the tag sequence is composed of multiple product tags.
[0071] Specifically, historical recommendation scenarios refer to scenarios where the e-commerce platform has previously recommended products. Historical behavior sequences refer to sequences of users’ behaviors in historical recommendation scenarios in chronological order, which record all products that the user has purchased and are arranged in chronological order. In addition, each product that the user has purchased has multiple product tags.
[0072] Based on this, in some implementations, when multiple label sequences are determined, historical behavior sequences of multiple users in historical recommendation scenarios can be obtained; the behaviors for the same category of goods within a preset time period in the historical behavior sequences are regarded as continuous behaviors, and the product labels corresponding to the various goods targeted by the continuous behaviors are combined into a label sequence.
[0073] Specifically, as mentioned above, the historical behavior sequence records all the products that the user has browsed, and these products may include various categories. For example, the user may browse smartphones, Bluetooth headsets, and sneakers in succession within an hour. These products of different categories may have certain correlations, such as smartphones and Bluetooth headsets, or they may be completely unrelated, such as smartphones and sneakers.
[0074] In this implementation, the behavior for the same category of goods within a certain period of time (that is, within the preset time period mentioned above) is regarded as continuous behavior. Simply put, continuous behavior is the behavior of users on the same category of goods in a short period of time, such as browsing, adding to cart, or placing an order. Then the product labels corresponding to each commodity targeted by the continuous behavior are combined into a label sequence. For example, in the historical recommendation scenario, an Apple mobile phone is recommended to a user. Among the specific recommended products, the user browsed iPhone13, iPhone12, and iPhone11 in 20 minutes. Then the product labels corresponding to these products iPhone13, iPhone12, and iPhone11 constitute a label sequence. A label sequence is equivalent to a sentence composed of multiple product label words (of course, from a semantic point of view, this sentence has no actual meaning).
[0075] The reason for this setting is that the various products targeted by users in the same category of products in a short period of time generally have a large correlation. When the labels corresponding to these products are used as a label sequence, the vectors of the product labels of related products can be similar when the product labels are subsequently vectorized, thereby better ensuring the accuracy of product label vectorization.
[0076] Step S203: vectorize all label sequences to obtain vectors of each product label.
[0077] Specifically, after a large number of label sequences are obtained according to the method in the aforementioned steps, vectorization training is performed on all label sequences to obtain vectors of each product label included in all label sequences.
[0078] In some implementations, a pre-trained word vector model may be used to train all tag sequences, and a vector of each product tag may be obtained based on context information included in the tag sequence.
[0079] Specifically, the word vector model used can be, for example, the word2vec model. Accordingly, all label sequences (all sentences) can be input into the word2vec model. The trained word2vec model can obtain the vector of each product label through the context information of the label sequence (sentence), and ensure the similarity of similar product labels in the vector space. For example, in the vector of product labels, the vector similarity between "apple" and "mobile phone" is much greater than the vector similarity between "apple" and "clothes".
[0080] It should be noted that the training method of the word2vec model is a prior art, so it will not be repeated here. In addition, it is understandable that the word vector model used is not limited to the word2vec model, and other word vector models that can combine context information can also be used, and there is no limitation on this.
[0081] Step S204: Aggregate the vectors of all product labels corresponding to the same product to obtain a second vector corresponding to the product.
[0082] Since each product generally has multiple product labels, and each product label corresponds to a vector, it is necessary to aggregate the vectors of all product labels corresponding to the same product, and finally obtain an aggregated vector to represent the product, that is, the aggregated second vector.
[0083] The aggregation process may be, but is not limited to, weighted summing or directly calculating the mean of vectors of all product labels of the same product.
[0084] In some implementations, if a weighted summation method is used, the specific processing process includes: calculating the weights of all product tags corresponding to the same product based on a word weight algorithm; and obtaining a second vector corresponding to the product based on the vectors and weights of all product tags corresponding to the same product by weighted calculation.
[0085] The word weight algorithm used may be but is not limited to the term-weight algorithm. The principle and process of calculating the weights of different words using the term-weight algorithm or other similar algorithms are prior arts and will not be described in detail here.
[0086] Step S205: construct a product vector library based on the second vector of each product.
[0087] Specifically, according to the methods in the above steps, the second vectors of various commodities can be obtained, and the second vectors of these commodities can be stored to form a commodity vector library.
[0088] In some implementations, the second vector of each product can be stored in an online database and an online vector search engine, respectively. The online database can be, for example, a Redis (Remote Dictionary Server) database, and the online vector search engine can be, for example, faiss. In this way, when determining the first vector corresponding to the target product, it can be directly queried from an online database such as Redis without further processing or calculation, thereby effectively reducing the overall recommendation time. When performing vector search on the product vector library, a vector search engine such as faiss can be used for search.
[0089] Step S103: Determine that the product corresponding to the second vector is a product to be recommended, and recommend the product to the target user based on the product to be recommended.
[0090] Specifically, after determining one or more second vectors that match the first vector of the target product according to the aforementioned steps, the products corresponding to these second vectors are products related to or similar to the target product, so they can be used as products to be recommended, that is, candidate products to be recalled by the recall algorithm of the present invention.
[0091] In addition, when making recommendations based on the products to be recommended, other candidate products recalled by other recall models can be combined for sorting and fusion processing, that is, recommendations are made to users through multi-channel recall.
[0092] In addition, in some embodiments, the above-mentioned product recommendation method may also include: obtaining newly released products through the real-time stream of product releases, and determining all product tags of the newly released products; vectorizing all product tags of the newly released products, and aggregating the vectors of the product tags to obtain a second vector of the newly released products; and updating the product vector library based on the second vector of the newly released products.
[0093] Among them, the real-time stream of product release can be built through spark-streaming technology. SparkStreaming can split the received real-time stream data of products according to a certain time interval and hand it over to the Spark Engine engine, and finally obtain batches of data results, including the text information of the newly released products. Then, multiple product labels of the newly released products can be obtained based on these text information. Among them, for the previously existing product labels, their corresponding vectors can be directly obtained; for the newly extracted product labels, the product labels can be vectorized according to the method of the above steps to obtain the corresponding vectors, and then the vectors of the product labels of these newly released products can be aggregated to obtain the second vectors of these newly released products. Finally, the second vectors of the newly released products are stored in the product vector library to update the product vector library. Among them, the specific process of vectorization and aggregation processing can refer to the above description, which will not be repeated here.
[0094] In summary, through the above method, after obtaining the recommendation request of the target user, the target product that the target user is interested in is determined based on the user information of the target user; based on the first vector corresponding to the target product, a search is performed in the product vector library to determine the second vector that matches the first vector; and then the product corresponding to the second vector is determined as the product to be recommended, and the product recommendation is made to the target user based on the product to be recommended; wherein, the product vector library is constructed by pre-extracting labels from the text information of different products and vectorizing the extracted labels. In this way, after determining the target product that the user is interested in, when recalling similar products to be recommended, the product vector library is constructed by vectorizing the labels extracted from the product text information, and since the computing power requirements for the training process of vectorizing product labels in this scheme are lower than those of the existing scheme, the real-time performance of the training process can be improved, thereby ensuring the accuracy of the recommendation results. In addition, since the product labels are relatively stable, the requirements for the real-time performance of the training process can also be reduced.
[0095] Example devices, electronic devices, storage media, and software
[0096] Reference Figure 6 One embodiment of the present specification also provides a product recommendation device 300. The product recommendation device 300 may include a determination module 301, a search module 302 and a recommendation module 303; wherein,
[0097] The determination module 301 is used to determine the target product that the target user is interested in based on the user information of the target user after obtaining the recommendation request of the target user;
[0098] The retrieval module 302 is used to search in a product vector library based on the first vector corresponding to the target product, and determine a second vector matching the first vector; wherein the product vector library is constructed by extracting labels from text information of different products in advance and vectorizing the extracted labels;
[0099] The recommendation module 303 is used to determine that the commodity corresponding to the second vector is a commodity to be recommended, and recommend the commodity to the target user based on the commodity to be recommended.
[0100] In some implementations, when determining the target product that the target user is interested in based on the user information of the target user, the determination module 301 is specifically used to: obtain the historical behavior record of the target user; based on the historical behavior record, determine the products that the target user has used within the target time period as the target products that the target user is interested in.
[0101] In some embodiments, when the retrieval module 302 searches in the product vector library based on the first vector corresponding to the target product and determines the second vector that matches the first vector, it is specifically used to: calculate the similarity between the first vector and each vector in the product vector library based on the first vector corresponding to the target product; and determine the second vector whose similarity meets a preset condition as the second vector that matches the first vector.
[0102] In some embodiments, the product recommendation device 300 also includes a construction module 304; the construction module 304 is used to construct a product vector library, and the construction process includes: obtaining text information of multiple products, and extracting multiple product labels corresponding to each product based on the text information; determining multiple label sequences based on historical behavior sequences of different users in historical recommendation scenarios; wherein the label sequence is composed of multiple product labels; vectorizing all label sequences to obtain vectors of each product label; aggregating the vectors of all product labels corresponding to the same product to obtain a second vector corresponding to the product; and constructing a product vector library based on the second vectors of each product.
[0103] In some implementations, the text information includes structured information and description information of the product. When the construction module 304 extracts multiple product labels corresponding to each product based on the text information, it is specifically used to: directly use the structured information of each product as the product label of the corresponding product; and perform text segmentation on the description information of each product, match the obtained words with a pre-constructed label dictionary, and extract the product label.
[0104] In some implementations, when the construction module 304 determines multiple label sequences based on the historical behavior sequences of different users in historical recommendation scenarios, it is specifically used to: obtain the historical behavior sequences of multiple users in historical recommendation scenarios; treat the behaviors for the same category of goods within a preset time period in the historical behavior sequences as continuous behaviors, and combine the product labels corresponding to each product targeted by the continuous behaviors into a label sequence.
[0105] In some implementations, when constructing module 304 vectorizes all label sequences to obtain the vectors of each product label, it is specifically used to: use a pre-trained word vector model to train all label sequences, and obtain the vectors of each product label based on the context information contained in the label sequence.
[0106] In some implementations, when the construction module 304 aggregates the vectors of all product tags corresponding to the same product to obtain the second vector corresponding to the product, it is specifically used to: calculate the weights of all product tags corresponding to the same product based on a word weight algorithm; and obtain the second vector corresponding to the product by weighted calculation based on the vectors and weights of all product tags corresponding to the same product.
[0107] In some implementations, the construction module 304 is further used to: obtain newly released products through the real-time product release stream, and determine all product tags of the newly released products; vectorize all product tags of the newly released products, and aggregate the vectors of the product tags to obtain a second vector of the newly released products; and update the product vector library based on the second vector of the newly released products.
[0108] Reference Figure 7 As shown, an embodiment of the present specification also provides an electronic device, which includes a memory 400 and a processor 410. The memory 400 stores a computer program. When the computer program is executed by the processor 410, the product recommendation method in any of the above embodiments is implemented.
[0109] Specifically, the electronic device may further include: a bus, a communication interface 420 , an input device 430 and an output device 440 .
[0110] The processor 410, the memory 400, the communication interface 420, the input device 430 and the output device 440 are connected to each other via a bus.
[0111] A bus may include a pathway that transfers information between components of a computer system.
[0112] The processor 410 may include a main processor, and may also include a baseband chip, a modem, and the like.
[0113] The memory 400 stores a program for executing the technical solution of the present application, and may also store an operating system and other key services. Specifically, the program may include program codes, and the program codes include computer operation instructions.
[0114] The input device 430 may include a device for receiving data and information input by a user, such as a keyboard, a mouse, a camera, a scanner, a light pen, a voice input device, a touch screen, a pedometer, or a gravity sensor.
[0115] Output device 440 may include a device that allows information to be output to a user, such as a display screen, a printer, a speaker, etc.
[0116] The communication interface 420 may include any transceiver or the like to communicate with other devices or communication networks, such as Ethernet, a radio access network (RAN), a wireless local area network (WLAN), etc.
[0117] The processor 410 executes the program stored in the memory 400 and calls other devices, which can be used to implement the various steps of identifying the commodity identification information provided in the above-mentioned implementation mode of the present application.
[0118] The embodiments of the present specification also provide a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a computer, the computer executes the product recommendation method in any of the above embodiments.
[0119] The embodiments of this specification also provide a computer program product including instructions, which, when executed by a computer, enables the computer to execute the product recommendation method in any of the above embodiments.
[0120] It should be understood that the specific examples herein are only intended to help those skilled in the art to better understand the embodiments of the present specification, rather than to limit the scope of the present invention.
[0121] It can be understood that in the various implementations of this specification, the size of the sequence number of each process does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the implementation methods of this specification.
[0122] It can be understood that the various embodiments described in this specification can be implemented individually or in combination, and the embodiments of this specification are not limited to this.
[0123] Unless otherwise specified, all technical and scientific terms used in the embodiments of this specification have the same meaning as those commonly understood by those skilled in the art of the technical field of this specification. The terms used in this specification are only for the purpose of describing specific embodiments and are not intended to limit the scope of this specification. The term "and / or" used in this specification includes any and all combinations of one or more related listed items. The singular forms of "a", "above", and "the" used in the embodiments of this specification and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.
[0124] It can be understood that the processor of the embodiment of this specification can be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method implementation can be completed by the hardware integrated logic circuit or software instructions in the processor. The above processor can be a general processor, a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiment of this specification can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiment of this specification can be directly embodied as a hardware decoding processor to perform, or the hardware and software modules in the decoding processor are combined and executed. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.
[0125] It is understood that the memory in the embodiments of this specification may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memory. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (programmable ROM, PROM), an erasable programmable read-only memory (erasablePROM, EPROM), an electrically erasable programmable read-only memory (EEPROM) or a flash memory. The volatile memory may be a random access memory (RAM). It should be noted that the memory of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0126] Those skilled in the art will appreciate that the units and algorithm steps of each example 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 performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this specification.
[0127] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method implementation methods and will not be repeated here.
[0128] In the several embodiments provided in this specification, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device implementation described above is only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0129] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0130] In addition, each functional unit in each embodiment of the present specification may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0131] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this specification, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of this specification. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store program codes.
[0132] The above is only a specific implementation of this specification, but the protection scope of the present invention is not limited thereto. Any person skilled in the art who is familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in this specification, which should be included in the protection scope of this specification. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A product recommendation method, characterized in that: include: After obtaining the recommendation request of the target user, determining the target product that the target user is interested in based on the user information of the target user; Based on the first vector corresponding to the target product, a search is performed in a product vector library to determine a second vector matching the first vector; wherein the product vector library is constructed by extracting labels from text information of different products in advance and vectorizing the extracted labels; The commodity corresponding to the second vector is determined as a commodity to be recommended, and a commodity is recommended to the target user based on the commodity to be recommended.
2. The method according to claim 1, characterized in that The determining, based on the user information of the target user, the target product that the target user is interested in, includes: Obtaining historical behavior records of the target user; Based on the historical behavior records, commodities that the target user has used within a target time period are determined as target commodities that the target user is interested in.
3. The method according to claim 1, characterized in that The searching in a product vector library based on the first vector corresponding to the target product to determine a second vector matching the first vector includes: Based on the first vector corresponding to the target product, calculating the similarity between the first vector and each vector in the product vector library; A second vector whose similarity satisfies a preset condition is determined as the second vector matching the first vector.
4. The method according to claim 1, characterized in that: The process of constructing the product vector library includes: Acquire text information of multiple commodities, and extract multiple commodity labels corresponding to each commodity based on the text information; Based on the historical behavior sequences of different users in historical recommendation scenarios, multiple label sequences are determined; wherein the label sequence is composed of multiple product labels; Vectorize all the label sequences to obtain vectors of the product labels; Aggregate the vectors of all product labels corresponding to the same product to obtain a second vector corresponding to the product; The commodity vector library is constructed based on the second vector of each commodity.
5. The method according to claim 4, characterized in that The text information includes structured information and description information of the commodity, and the extracting of multiple commodity tags corresponding to each commodity based on the text information includes: directly using the structured information of each product as a product label of the corresponding product; and, The description information of each product is subjected to text segmentation processing, the obtained words are matched with a pre-built label dictionary, and the product label is extracted.
6. The method according to claim 4, characterized in that Based on the historical behavior sequences of different users in historical recommendation scenarios, multiple tag sequences are determined, including: Obtain the historical behavior sequences of multiple users in historical recommendation scenarios; In the historical behavior sequence, the behaviors for commodities of the same category within a preset time period are regarded as continuous behaviors, and the commodity labels corresponding to the commodities targeted by the continuous behaviors are combined into a label sequence.
7. The method according to claim 4, characterized in that The vectorization of all the label sequences to obtain the vectors of the product labels includes: All the label sequences are trained using a pre-trained word vector model, and the vectors of the product labels are obtained based on the context information contained in the label sequences.
8. The method according to claim 4, characterized in that The step of aggregating the vectors of all product labels corresponding to the same product to obtain a second vector corresponding to the product includes: Based on the word weight algorithm, calculate the weights of all product tags corresponding to the same product; Based on the vectors and weights of all product labels corresponding to the same product, a second vector corresponding to the product is obtained by weighted calculation.
9. The method according to claim 1, characterized in that: Also includes: Acquire newly released products through the real-time product release stream, and determine all product tags of the newly released products; Vectorizing all product labels of the newly released product, and performing aggregation processing on the vectors of the product labels to obtain a second vector of the newly released product; The product vector library is updated based on the second vector of the newly released product.
10. A commodity recommendation device, characterized in that: include: A determination module is used to determine the target product that the target user is interested in based on the user information of the target user after obtaining the recommendation request of the target user; A retrieval module, configured to search a product vector library based on the first vector corresponding to the target product, and determine a second vector matching the first vector; wherein the product vector library is constructed by extracting labels from text information of different products in advance and vectorizing the extracted labels; A recommendation module is used to determine that the commodity corresponding to the second vector is a commodity to be recommended, and recommend a commodity to the target user based on the commodity to be recommended.
11. An electronic device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the commodity recommendation method according to any one of claims 1 to 9 is implemented.
12. A computer-readable storage medium, characterized in that: A computer program is stored, and when the computer program is executed by a computer, the computer executes the commodity recommendation method according to any one of claims 1 to 9.
Citation Information
Cited By
Information recommendation method and device, electronic equipment and storage medium
CN119760239A
Customized costume design recommendation system
CN120123561A
Apparatus, method and recording medium storing instructions for retrieving stores registered on a platform service
TWI934540B
