Commodity recommendation method and device, computer device and storage medium
By detecting user historical behavior sequences and generating product semantic identifiers in a SaaS e-commerce platform, the high deployment cost of recommendation models in existing technologies is solved, achieving low-cost, lightweight deployment and efficient product recommendation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- 广州商研网络科技有限公司
- Filing Date
- 2026-04-02
- Publication Date
- 2026-06-19
AI Technical Summary
Existing generative recommendation solutions are difficult to deploy at low cost and in a lightweight manner on SaaS e-commerce platforms. Limited user access, short behavioral sequences and insufficient computing resources make cold start difficult and inference computing power requirements high.
By detecting users' historical behavior sequences, a product semantic tag is generated using a pre-defined product hierarchical semantic library and a lightweight recommendation model. Products are then recommended based on the semantic tag, thus constructing a lightweight product recommendation model that maintains recommendation accuracy even in low-computing-power environments.
It enables lightweight deployment of product recommendations under low computing power conditions, improving recommendation efficiency and accuracy, and is suitable for SaaS e-commerce platforms for small and medium-sized businesses.
Smart Images

Figure CN122243616A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of e-commerce, and more particularly to a product recommendation method, apparatus, computer equipment, and storage medium. Background Technology
[0002] Recommendation systems are one of the core technologies for improving the shopping experience for e-commerce users and increasing merchant conversion rates. Existing generative recommendation solutions are generally designed for ultra-large platforms with massive amounts of data, sufficient computing power, unified goals, and the ability to aggregate across different scenarios. This fundamentally conflicts with the relatively small-scale SaaS e-commerce platforms. For example, SaaS e-commerce platforms are mostly run by small and medium-sized merchants who struggle to provide massive amounts of user behavior data. Furthermore, their limited shared computing resources make them unable to bear the high deployment and inference costs of large-scale models. Summary of the Invention
[0003] This application discloses a product recommendation method, apparatus, computer equipment, and storage medium, which solves the technical problem that existing generative recommendation schemes are difficult to deploy at low cost and in a lightweight manner on SaaS e-commerce platforms.
[0004] This application provides a product recommendation method, the method comprising: when a user visits an online store, obtaining a historical behavior sequence corresponding to the user; generating a product semantic identifier based on the historical behavior sequence and a preset product hierarchical semantic library using a preset recommendation model; and determining at least one product related to the product semantic identifier from the online store based on the product semantic identifier, and recommending the at least one product to the user.
[0005] In some optional embodiments, the step of generating product semantic identifiers using a preset recommendation model based on the historical behavior sequence and a preset product hierarchical semantic library includes: obtaining the target semantic identifier of the target product corresponding to each behavior in the historical behavior sequence from the product hierarchical semantic library; generating a target sequence based on the behavior type corresponding to each behavior and the hierarchical semantic sequence corresponding to the target semantic identifier; encoding the target sequence to generate an encoding result; and performing hierarchical autoregressive prediction on the encoding result to generate the product semantic identifier.
[0006] In some optional embodiments, the step of performing hierarchical autoregressive prediction on the encoding result to generate the product semantic identifier includes: based on the encoding result, calling the linear layer and activation function of the recommendation model to predict a first-level result; concatenating the first-level result with the encoding result to obtain a first concatenated result; based on the first concatenated result, calling the second-level classifier of the recommendation model to predict a second-level result; concatenating the first-level result, the second-level result, and the encoding result to obtain a second concatenated result; based on the second concatenated result, calling the third-level classifier of the recommendation model to predict a third-level result; and generating the product semantic identifier based on the first-level result, the second-level result, and the third-level result.
[0007] In some optional embodiments, the method further includes: constructing the product-level semantic library, including: acquiring structured data corresponding to each product among all products in all stores on the e-commerce platform; performing multi-level discrete encoding on the structured data to generate a hierarchical semantic sequence, the hierarchical semantic sequence including a category level, an attribute level, and a metric level; acquiring store user data corresponding to all online stores on the e-commerce platform; generating multiple discrete codes based on the store user data and a dual-tower model; updating the attribute level and the metric level using the multiple discrete codes to obtain updated attribute levels and updated metric levels; constructing an updated hierarchical semantic sequence based on the category level, the updated attribute level, and the updated metric level; and constructing the product-level semantic library based on the updated hierarchical semantic sequence corresponding to each product, wherein each updated hierarchical semantic sequence has a corresponding hierarchical semantic identifier.
[0008] In some optional embodiments, the method further includes: configuring a reward function in the online store configuration in response to business needs of the online store; generating a reward score using the reward function in response to user feedback on the at least one product; and updating the model parameters corresponding to the recommendation model based on the reward score to obtain an updated recommendation model.
[0009] In some optional embodiments, the method further includes: recording user feedback data for at least one recommended product each time; and triggering a corresponding control strategy of the online store when it is determined based on the feedback data that one or more preset rule conditions are met, wherein the control strategy is used to change the product status of the product in the online store.
[0010] In some optional embodiments, the method further includes: if the store traffic corresponding to the online store is less than a preset threshold, determining at least one associated store with the same business model as the online store; wherein the store traffic of the at least one associated store is greater than or equal to the store traffic of the online store; using the model parameters of the recommendation model configured in each associated store as a first preset parameter, and using the model parameters of the recommendation model configured in the online store as a second preset parameter; aggregating the first preset parameter and the second preset parameter to generate an aggregate parameter; and updating the model parameters of the recommendation model of the online store using the aggregate parameter.
[0011] This application also provides a product recommendation device, comprising: a detection module, configured to acquire a historical behavior sequence corresponding to the user when the user visits an online store; a generation module, configured to generate a product semantic identifier based on the historical behavior sequence and a preset product hierarchical semantic library using a preset recommendation model; and a recommendation module, configured to determine at least one product related to the product semantic identifier from the online store based on the product semantic identifier, and recommend the at least one product to the user.
[0012] This application also provides a computer device, which includes a processor and a memory, wherein the processor is used to implement the product recommendation method by executing a computer program stored in the memory.
[0013] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the product recommendation method described above.
[0014] In the product recommendation method provided in this application, a mechanism for recommending products to the user is triggered when a user visits an online store. To determine the user's intent to enter the online store, the user's historical behavior sequence can be obtained. Based on the historical behavior sequence and a pre-defined product hierarchical semantic library, a low-dimensional product semantic identifier is generated through a pre-defined recommendation model, balancing low computational power and recommendation accuracy. Based on the product semantic identifier, at least one product related to the semantic identifier is identified from the online store, and at least one product is recommended to the user. This method enables lightweight deployment of the recommendation model, achieving both high recommendation accuracy and low computational power, thus improving product recommendation efficiency to a certain extent. Attached Figure Description
[0015] Figure 1 This is a schematic diagram illustrating the application environment of the product recommendation method provided in the embodiments of this application.
[0016] Figure 2This is a flowchart of the product recommendation method provided in the embodiments of this application.
[0017] Figure 3 This is a schematic diagram illustrating the triggering of the rule base provided in the embodiments of this application.
[0018] Figure 4 This is a product recommendation interface diagram provided in an embodiment of this application.
[0019] Figure 5 This is a flowchart illustrating the generation process of product semantic identifiers provided in this application embodiment.
[0020] Figure 6 This is a schematic diagram illustrating the generation of product semantic identifiers provided in an embodiment of this application.
[0021] Figure 7 This is a flowchart illustrating the construction process of the product-level semantic library provided in this application embodiment.
[0022] Figure 8 This is a schematic diagram illustrating the generation of hierarchical semantic sequences provided in an embodiment of this application.
[0023] Figure 9 This is a flowchart illustrating the update process of the recommended model provided in this application embodiment.
[0024] Figure 10 This is a schematic diagram illustrating the update of the recommended model provided in the embodiments of this application.
[0025] Figure 11 This is a flowchart of the update process for the recommendation model provided in another embodiment of this application.
[0026] Figure 12 This is a schematic diagram illustrating the update of the recommendation model provided in another embodiment of this application.
[0027] Figure 13 This is a schematic diagram of the product recommendation device provided in the embodiments of this application.
[0028] Figure 14 This is a schematic diagram of the structure of the computer device provided in the embodiments of this application. Detailed Implementation
[0029] For ease of understanding, some concepts related to the embodiments of this application are illustrated and explained by way of example for reference.
[0030] It should be noted that in this application, "at least one" means one or more, and "more than one" means two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The terms "first," "second," "third," "fourth," etc. (if present) in the specification, claims, and drawings of this application are used to distinguish similar objects, not to describe a specific order or sequence.
[0031] Recommendation systems are one of the core technologies for improving the shopping experience for e-commerce users and the conversion rate for merchants. Existing generative recommendation solutions typically adopt a "recall first, then sort" approach for product recommendations. For example, a dual-tower model is first used to quickly filter the candidate set (recall stage), and then a deep learning model is used to finely predict the click-through rate for final sorting (sorting stage).
[0032] In recent years, inspired by the success of Large Language Models (LLMs), the task of product recommendation has been redefined as an autoregressive generation problem of "predicting the next item," and reinforcement learning (RL) has been introduced to align user preferences. For example, the current "OneMall" framework, through semantic tokenizers, a pure Transformer architecture, and post-RL training, has achieved significant results in scenarios such as short videos and live streaming.
[0033] However, SaaS platforms are mostly used by small and medium-sized businesses, with limited user traffic, short behavioral sequences, and sparse positive samples. Existing recommendation solutions, such as Tokenizer with fine-tuned large language models and MoE Transformer which requires long training sequences, struggle to converge or perform poorly in sparse data scenarios, leading to difficulties in cold starts.
[0034] Furthermore, existing recommendation schemes often involve hundreds of millions of parameters, resulting in high computational demands for single inference iterations. SaaS e-commerce platforms, which need to serve tens of thousands of merchants at low cost, have limited shared computing resources and cannot afford the large-scale deployment and inference overhead of models.
[0035] Therefore, in order to solve the technical problem that existing generative recommendation schemes are difficult to deploy at low cost and in a lightweight manner on SaaS e-commerce platforms, this application proposes a product recommendation method, apparatus, computer equipment and storage medium, which can ensure the accuracy and efficiency of product recommendation through lightweight deployment and low computing power inference.
[0036] The application scenarios of the product recommendation method in this application will be described below.
[0037] Figure 1 This is a schematic diagram illustrating the application environment of the product recommendation method provided in the embodiments of this application. For example... Figure 1 As shown, the product recommendation method described in this application uses the operating environment of an e-commerce platform 10 as its application environment. The e-commerce platform 10 can be an e-commerce service platform with open independent site services. The e-commerce platform 10 can be used to provide merchants' goods and services to users. Among them, users can be merchant users (e.g., sellers, retailers, wholesalers, or product providers), consumer users (e.g., buyers, purchasing agents, or product users), potential users (e.g., users who are browsing but have not yet committed to purchasing, etc.).
[0038] E-commerce platform 10 can be implemented through a processing facility including a processor and memory. When instructions stored in the memory are executed, the e-commerce platform 10 performs the e-commerce functions and supporting functions described herein. The processing facility can be a server, client, network infrastructure, mobile computing platform, cloud computing platform, or other computing platform, and provides electronic connectivity and communication between electronic components of e-commerce platform 10, merchant devices 20, client devices 30, etc. E-commerce platform 10 can be implemented as cloud computing services, Software as a Service (SaaS), Infrastructure as a Service (IaaS), Platform as a Service (PaaS), Desktop as a Service (DaaS), Managed Software as a Service (MSaaS), Mobile Backend as a Service (MBaaS), Information Technology Management as a Service (ITMaaS), etc.
[0039] E-commerce platform 10 can provide a centralized system for offering merchants online resources and facilities to manage their businesses. E-commerce platform 10 includes communication facilities 101 and a merchant data server 102, which maintains data related to each merchant, such as merchant profiles, merchant settings, transaction data, product data, collected data, etc. In an optional embodiment, communication facilities 101 may be deployed on merchant data server 102, which is not limited herein. Merchant data server 102 includes a memory 1021 for storing all merchant data. Merchant data server 102 further includes a processor 1022 for directly executing or directing all operations performed by merchant data server 102. Processor 1022 may be implemented by one or more processors that execute instructions stored in memory 1021.
[0040] In some optional embodiments, the e-commerce platform 10 receives data requests from merchant device 20 or client device 30 via communication facility 101. Merchant data server 102 processes the data requests via processor 1022, retrieves the data requested by merchant device 20 or client device 30 from memory 1021, and provides the requested data to communication facility 101 via network.
[0041] E-commerce platform 10 may be configured with a business management engine 104 for content management, task automation, and data management to support and serve multiple online stores 103 (e.g., independent website stores). The business management engine 104 includes basic or "core" functions of e-commerce platform 10 (e.g., common to most online store activities, such as cross-channel, administrator interface, merchant location, industry, product type, etc.) that can be reused across online stores 103 (e.g., functions that can be reused / modified across core functions). In one example, the business management engine 104 may be used to extract relevant features from the product image of each product in a preset store and associate these features with the product image, storing them in the memory 1021 of merchant data server 102.
[0042] Merchants can manage one or more storefronts in online store 103 through merchant device 20 and offer goods to customers through various channels (e.g., online store 103). The terms "online store 103" and "storefront" can be used synonymously to refer to online e-commerce provided by the merchant through e-commerce platform 10.
[0043] Merchants can log in to administrator 105 via merchant device 20 (such as from a desktop computer or mobile device) and manage various aspects of their online store 103. For example, merchants can customize the appearance of their online store 103 through a theme system, or customize the content presented on the product detail page (such as product title, product details, product images, product attributes, frequently asked questions, and other types of content).
[0044] Online store 103 can support a large number of independently managed stores and process a large amount of transaction data for various products every day. Transaction data may include customer contact information, information about the purchased goods, information about the services presented, and any other information related to the business conducted through e-commerce platform 10. In some embodiments, e-commerce platform 10 may store this data in merchant data server 102.
[0045] In some embodiments, customers can interact via customer device 30 (e.g., computer, mobile terminal, etc.) or any other business interface device known in the art. E-commerce platform 10 enables merchants to contact customers through online store 103, facilitate business with customers through dialogue via electronic communication facility 101, etc., thereby providing a system for contacting customers and facilitating merchant services for real or virtual paths that can be used to contact and interact with customers.
[0046] Online store 103 can be provided to customers by e-commerce platform 10, where customers can browse and purchase various available goods. For example, online store 103 can be served to customer device 30 via a webpage provided by the server of e-commerce platform 10. The server can receive requests for webpages from a browser or other application installed on customer device 30, and in response, the server sends back the requested webpage, which is then displayed by the web browser (or other application) of customer device 30. For example, a product search box can be displayed to customers on the store's homepage of online store 103, which can accept text input and graphic input, etc.
[0047] It is understood that the application scenarios illustrated in the embodiments of this application do not constitute specific limitations. In other embodiments of this application, the e-commerce platform 10 may also include more or fewer components, such as network interfaces, data analysis components, etc.
[0048] Figure 2 This is a flowchart of a product recommendation method provided in an embodiment of this application, applied to an e-commerce platform (e.g., Figure 1 In the e-commerce platform 10), the order of steps in this flowchart can be changed, and some steps can be omitted, depending on different needs.
[0049] Step S201: If a user is detected visiting an online store, obtain the user's historical behavior sequence.
[0050] In some embodiments of this application, the online store can be any store on an e-commerce platform. Users can authenticate themselves and log in to their registered e-commerce platform account through client devices (such as smartphones, tablets, or PCs).
[0051] After successfully entering the main interface of the e-commerce platform, users can locate and access any store through various interactive methods such as navigation bar search, category directory browsing, personalized recommendation stream clicking, or historical order association entry. The store visited by the user is called an online store.
[0052] Typically, when a user enters an online store, the system loads a separate page instance for that store, presenting a complete digital representation including the store sign, product list, marketing campaign area, customer service portal, and store rating system. Therefore, to better present relevant information to users (such as product lists), it's advisable to first obtain the user's historical behavioral data on the e-commerce platform.
[0053] The aforementioned historical behavioral data can include behavioral types such as interactive behavior, social behavior, and user attrition behavior. Interactive behavior can include browsing behavior, adding to cart behavior, purchasing behavior, favorites behavior, following behavior, search behavior, filtering behavior, sorting behavior, image interaction behavior, video interaction behavior, review interaction behavior, customer service inquiry behavior, live broadcast interaction behavior, coupon redemption behavior, etc. Social behavior can include sharing behavior, group buying behavior, invitation behavior, etc. User attrition behavior can include quickly exiting after entering any product page, not clicking on any products after entering search terms, adding products to cart and then deleting them, order cancellation behavior, return behavior, refund behavior, negative review behavior, complaint behavior, etc. The above is just an example; more or less historical behavioral data may be included.
[0054] Historical behavioral data can be short-term (e.g., data from the past three months) or long-term (e.g., data from the past year). E-commerce platforms can collect user behavior data through a module-event mapping mechanism. In one example, product cards are displayed on the platform interface. Once a user clicks on any product card, a click event is triggered, confirming an interaction.
[0055] Historical behavior data can also include the target products corresponding to each user behavior type and the time of occurrence of the corresponding behavior type. Based on the time of occurrence of the behavior and the hierarchical semantic identifiers corresponding to each behavior type and its target product, a historical behavior sequence is constructed. The hierarchical semantic identifiers are determined based on a pre-built product hierarchical semantic library, with one associated product corresponding to one hierarchical semantic identifier. The construction of this hierarchical semantic library is described below. Figure 7 The illustrated embodiment.
[0056] In one example, for each behavior type, the hierarchical semantic identifier of its associated target product is recorded. All behaviors corresponding to each behavior type and their respective hierarchical semantic identifiers are then concatenated in chronological order to form a historical behavior sequence S. , of which each The hierarchical semantic identifier corresponding to the target product (hereinafter referred to as the target semantic identifier), for example, This represents the target semantic identifier of the target product corresponding to the second behavior type, and the hierarchical semantic sequence corresponding to the target product's target semantic identifier is denoted as... .
[0057] Step S202: Based on the historical behavior sequence and the preset product hierarchical semantic library, generate product semantic identifiers using a preset recommendation model.
[0058] In some embodiments of this application, the product-level semantic library can be pre-constructed based on the structured data corresponding to the products. The specific construction process is described below. Figure 7 The illustrated embodiment. The product hierarchical semantic library stores the hierarchical semantic sequence corresponding to each product, and each hierarchical semantic sequence has a corresponding hierarchical semantic identifier.
[0059] Historical behavior sequences are input into the recommendation model, which processes them through an encoding phase and a hierarchical generation phase. Since the historical behavior sequences record multiple behavior types and the target semantic identifiers of the target products for each behavior type, the hierarchical semantic sequences associated with the target semantic identifiers can be retrieved from the product hierarchical semantic database during the encoding phase, providing a data foundation for the subsequent hierarchical generation phase. The specific processing procedures for the encoding and hierarchical generation phases are described below. Figure 5 The illustrated embodiment.
[0060] The recommendation model processes historical behavior sequences to obtain semantic identifiers for products. The input data processed by the aforementioned recommendation model is a sequence of user behavior. Compared to directly processing structured data corresponding to products, this embodiment achieves lightweight deployment and inference of the recommendation model, ensuring recommendation accuracy while maintaining low computational power.
[0061] Step S203: Based on the product semantic identifier, determine at least one product related to the product semantic identifier from the online store, and recommend the at least one product to the user.
[0062] In some embodiments of this application, a pre-built mapping table associating hierarchical semantic identifiers and product identifiers is constructed. This mapping table can be a mapping list corresponding to the entire e-commerce platform or a mapping list unique to an online store. When it is determined that a user has visited an online store, the mapping table corresponding to that online store can be invoked to query at least one product associated with the product semantic identifier output by the recommendation model. If a hierarchical semantic identifier identical to the product semantic identifier is found in the mapping table, then the at least one product includes the product corresponding to the same hierarchical semantic identifier as the product semantic identifier.
[0063] If no hierarchical semantic identifier that is exactly the same as the product semantic identifier is found in the mapping table, then a hierarchical semantic identifier that is similar to the product semantic identifier output by the recommendation model is obtained as a similar identifier. In this case, at least one product also includes the product corresponding to the similar identifier.
[0064] The mapping table described above decodes the semantic identifiers of products output by the recommendation model into specific products. It also supports one-to-many query methods to enrich the decoded products.
[0065] In some embodiments of this application, after determining at least one product in an online store, the at least one product can be sorted according to similarity, the sorted at least one product can be recommended to the user, and the sorted at least one product can be displayed on the display interface of the client device.
[0066] The above embodiments trigger a mechanism to recommend products to users when a user visits an online store. To determine the user's intent to enter the online store, their historical behavior sequence can be obtained. Based on this historical behavior sequence and a pre-defined product hierarchical semantic library, a low-dimensional product semantic identifier is generated using a pre-defined recommendation model, balancing low computational cost and recommendation accuracy. Based on the product semantic identifier, at least one product related to that identifier is identified from the online store, and this product is recommended to the user. This method enables lightweight deployment of the recommendation model, achieving both high recommendation accuracy and low computational cost, thus improving product recommendation efficiency to some extent.
[0067] In other embodiments of this application, user feedback data is recorded after each recommendation of at least one product to a user. The term "user" refers to any person entering the online store, not any specific individual. Each online store is configured with a business trigger. When the feedback data corresponding to at least one recommended product meets one or more preset rule conditions, the business trigger is triggered to execute a corresponding control strategy. This control strategy is used to change the product status corresponding to the product in the online store.
[0068] These rules include, but are not limited to, automatic bundling conditions, display block optimization conditions, marketing campaign triggering conditions, and inventory warning conditions. The following section will combine... Figure 3 and Figure 4 Describe it.
[0069] Four types of rules are set in the rule base, such as Figure 3 Rules 1 through 4 are shown. During the monitoring and triggering phase: The performance of recommended products is continuously monitored, consecutive window targets are checked, trigger conditions are determined, and it is judged whether one or more rule conditions are met. If one or more rule conditions are met, the execution engine phase begins. The recommendation results and rules are parsed to obtain the products that meet the rule conditions and the met rule conditions themselves. After parsing, the control strategy is triggered, and the API is called through the MCP (Model Context Protocol) Server while simultaneously recording the execution log, and manual intervention and rollback are supported.
[0070] For the automatic bundling scenario in Rule 1: If the conversion rate of products A and B exceeds the threshold for 7 consecutive days in the recommendation scenario of "users who bought this product also bought", then the automatic bundling API will be called to automatically add products A and B as an "automatic bundling - complementary products" combination, such as... Figure 4 As shown in (a).
[0071] For the scenario of optimizing the display area in Rule 2: If the click-through rate of a product recommended on the store's homepage is higher than the average for similar products for three consecutive days, the product pinning API will be called to automatically pin it to the top three positions in the "You May Also Like" section. For example... Figure 4 As shown in (b), in the "You May Also Like" section, products C, A, and B are displayed in descending order of click-through rate.
[0072] For the scenario triggered by revenue activities in Rule 3: If a product receives more than M clicks during the recommendation process but has no purchase record, the coupon creation API will be called to automatically create a "new user exclusive 10% off" coupon for the product and send it to users who click on the product.
[0073] For the scenario of inventory warning in rule 4: If the inventory of a recommended product is lower than the threshold, the notification API for the merchant will be called to automatically demote the product from the recommendation pool and notify the merchant to replenish the stock.
[0074] In addition, the feedback results of the above-mentioned control strategies can also be used as part of the training data in the training module of the online store as feature / reward input.
[0075] The control strategies executed by the above execution engine all run with merchant authorization. Furthermore, these strategies must be executed after T consecutive time windows to avoid misjudgments caused by single-data analysis. Asynchronous message queues are used to process API call requests to avoid blocking the online recommendation service. The same product triggers only one action of the same type within 24 hours to avoid duplication.
[0076] Figure 5 This is a flowchart illustrating the generation process of product semantic identifiers provided in an embodiment of this application. For example... Figure 5 As shown, the semantic identifier of a product is predicted using a recommendation model.
[0077] Step S501: Based on each behavior in the historical behavior sequence, obtain the target semantic identifier of the target product corresponding to each behavior from the product hierarchical semantic library.
[0078] In some embodiments of this application, the recommendation model includes an encoding stage and a hierarchical generation stage. In the encoding stage, historical behavior sequences are preprocessed. These sequences include various user behaviors, each with a corresponding target semantic identifier for a target product. The target semantic identifier for each behavior is retrieved from a product hierarchical semantic database.
[0079] In one example, the historical behavior sequence is represented as ,in, This represents the target semantic identifier of the target product corresponding to the t-th behavior.
[0080] Step S502: Generate a target sequence based on the behavior type corresponding to each behavior and the hierarchical semantic sequence corresponding to the target semantic identifier.
[0081] In some embodiments of this application, in order to distinguish the semantics of the target product corresponding to each behavior, an independent behavior type embedding can be learned for the target semantic identifier of the target product corresponding to each behavior, as expressed by the following formula: ; In the formula, The embedded representation of the target semantic identifier of the target product corresponding to the t-th behavior; The type embedding representation indicates the type of behavior corresponding to the behavior.
[0082] The target sequence is obtained using the above formula. ].
[0083] Step S503: Encode the target sequence to generate an encoding result.
[0084] In some embodiments of this application, a lightweight Transformer encoder (2-4 layers, hidden layer dimension 128-256) is used to encode the target sequence, outputting the encoded result of the context representation. ],use This encoding result serves as a representation of user interests.
[0085] Step S504: Perform hierarchical autoregressive prediction on the encoding result to generate the product semantic identifier.
[0086] In some embodiments of this application, the recommendation model includes hierarchical autoregressive prediction, specifically including first-level prediction, second-level prediction, and third-level prediction.
[0087] In the first-level prediction, the encoded results will be... As input, prediction is performed through a linear layer + Softmax. Based on the probability distribution, the top-K candidates are selected as the first-level results. Each candidate in the first-level results... The corresponding embedding and encoding result The pieces are then stitched together to obtain the first stitched result.
[0088] In the second-level prediction, the first concatenation result is used as input, and the prediction is performed by the second-level classifier. The probability is used to obtain the second-level result. The corresponding embedding is represented by Embedding. The corresponding embedding and encoding result The two parts are then spliced together to obtain the second spliced result.
[0089] In the third-level prediction, the second concatenation result is used as input, and the prediction is performed by the third-level classifier. The probability is used to obtain the third-level result.
[0090] Based on the results of the first level, the second level, and the third level, a semantic identifier for the product is generated, expressed by the following formula: P( ) = P( ) P( ) P( ); The advantage of the above hierarchical prediction is that the search space expands from... Decomposed into This significantly reduces computational complexity. Furthermore, each level of prediction can independently incorporate business constraints. For example, after the first level of prediction, categories that do not match the current online store category can be filtered out based on business constraints.
[0091] In other embodiments of this application, when the recommendation model is trained offline, a multi-level cross-entropy loss can be used to evaluate whether the training is complete, as expressed by the following formula: ; In the formula, This represents the hierarchical semantic sequence of the products that a user actually clicks on or purchases.
[0092] The above embodiments not only enable accurate product recommendations to users, but also reduce computational complexity through hierarchical prediction.
[0093] To understand more clearly, as Figure 5 The process of generating product semantic identifiers, and the parsing process of identifying at least one product using product semantic identifiers, are illustrated below. Figure 6 The diagram is used to describe this.
[0094] like Figure 6 As shown, the user's historical behavior sequence S is used as input to the recommendation model. During the encoding stage, based on the user's historical behavior sequence and the product-level semantic library, a behavior type is embedded for the target product for each behavior. That is, a target sequence is generated based on the embedded representation of the behavior type and the embedded representation of the target semantic identifier of the target product. The target sequence is then processed by a lightweight Transformer encoder to generate a user interest representation. User interest representations are used as input in the hierarchical generation stage, sequentially passing through first-level prediction, second-level prediction, and third-level prediction to generate product semantic identifiers. In the post-processing stage, a mapping table is used to parse the product semantic identifiers into at least one specific product, forming a product recommendation list, which is then displayed to the user through the front end.
[0095] Figure 7 This is a flowchart illustrating the construction process of the product-level semantic library provided in this application embodiment. For example... Figure 7 The diagram shows the construction process of the product-level semantic library.
[0096] Step S701: Obtain the structured data corresponding to each product in all products of all stores in the e-commerce platform.
[0097] In some embodiments of this application, the structured data includes the category, attribute tags, numeric fields, and text fields for each product. Categories, for example, include women's clothing, dresses, and French dresses. Categories can be further divided into first-level, second-level, and third-level categories; for example, a first-level category could be women's clothing, a second-level category could be dresses, and a third-level category could be French dresses. Attribute tags include color, size, material, and style, such as red, cotton, and French style. Numerical fields include price, inventory, and listing time. Text fields include product title and product description.
[0098] The above are just examples; structured data can include much more data than those shown in the examples.
[0099] Step S702: Perform multi-level discrete encoding on the structured data to generate a hierarchical semantic sequence.
[0100] In some embodiments of this application, the multi-level discrete encoding includes a first-level discrete encoding, a second-level discrete encoding, and a third-level discrete encoding, and the hierarchical semantic sequence includes a category level, an attribute level, and a metric level.
[0101] In the first-level discrete coding, categories in the structured data are encoded to generate coarse-grained category codes. For example, the first-level, second-level, and third-level categories of goods are used as the category hierarchy in a hierarchical semantic sequence. The coarse-grained category codes are maintained uniformly by the SaaS platform, and the codebook size is typically on the order of 10^3.
[0102] In the second-level discrete coding, the attribute labels in the structured data are combined and hashed to map them to a fixed-size codebook (e.g., ...). ), generate attribute hierarchy The formula is as follows: ; When a product has multiple attributes, the top 3 attributes can be selected to participate in the hashing based on preset weights.
[0103] In the third-level discrete coding, the numerical fields in the structured data are binned, such as by equal-frequency binning or equal-interval binning. The identifier of each bin is used as the metric level. In addition, an "whether it's a new product" indicator can be introduced as an extra code.
[0104] After completing the multi-level discrete coding, according to the category hierarchy Attribute hierarchy and metric hierarchy Generate hierarchical semantic sequences Category hierarchy Used to identify the coarse-grained category to which a product belongs; attribute hierarchy Fine-grained attribute combinations used to identify products; metric hierarchy This is used to identify the price range and new / old status of products. This hierarchical structure aligns with each level in the hierarchical autoregressive prediction in recommendation models. For example, in autoregressive prediction, the categories that a user might be interested in are predicted first, then specific attributes are predicted, and finally, price ranges are filtered.
[0105] Step S703: Obtain the store user data corresponding to all online stores in the e-commerce platform.
[0106] In some embodiments of this application, for online stores that are not newly registered but have a certain number of visits, the corresponding store user data can be obtained. This store user data includes all the behaviors of all users who enter the store, such as browsing behavior, purchasing behavior, etc.
[0107] Step S704: Based on the store user data and the dual-tower model, generate multiple discrete codes.
[0108] In some embodiments of this application, the Item Tower model can be a pre-trained lightweight model. User behavior sequences and corresponding products for each behavior are obtained from store user data. These sequences and products are used as input data to the Item Tower model to predict the probability of user-product interaction. The output of the Item Tower is then selected as the semantic embedding of the product.
[0109] Two-layer residual quantization is used to compress the semantic embedding of the product into two discrete codes, denoted as the first discrete code. Second discrete code .
[0110] Step S705: Update the attribute level and the metric level using the plurality of discrete codes to obtain the updated attribute level and the updated metric level.
[0111] In some embodiments of this application, a first discrete code is used. Update attribute hierarchy The updated attribute level is obtained; the metric level is updated using the second discrete code. This results in an updated metric hierarchy. A smooth transition from heuristic coding to data-driven coding is achieved.
[0112] Step S706: Based on the category level, the updated attribute level, and the updated metric level, construct an updated hierarchical semantic sequence.
[0113] In some embodiments of this application, an updated hierarchical semantic sequence is constructed by fusing the category hierarchy, the updated attribute hierarchy, and the updated metric hierarchy, denoted as... Additionally, an updated hierarchical semantic sequence can be constructed through updates, denoted as... .
[0114] Step S707: Construct the product hierarchical semantic library based on the updated hierarchical semantic sequence corresponding to each product.
[0115] In some embodiments of this application, each updated hierarchical semantic sequence has a corresponding hierarchical semantic identifier, used to distinguish hierarchical semantic sequences corresponding to different products. The updated hierarchical semantic sequences corresponding to each product are combined to form a product hierarchical semantic library.
[0116] In addition, the product hierarchical semantic library can also be associated with a mapping table to build the relationship between hierarchical semantic identifiers and specific products, so that the specific product corresponding to the hierarchical semantic identifier can be queried through the mapping table.
[0117] Through the above embodiments, by constructing a product hierarchical semantic library, the recommendation model can make predictions sequentially based on category, attribute, and price during the hierarchical prediction process.
[0118] To better understand, Figure 7 The illustrated embodiment will be discussed below in conjunction with... Figure 8 Describe the process of constructing the hierarchical semantic sequence corresponding to each product.
[0119] like Figure 8 As shown, the process involves obtaining structured product data, calling a product semantic identifier (ID) generator, performing a three-level category ID mapping for the category structured data, and generating a hierarchical semantic sequence of category levels. For attribute tag structured data, performing attribute combination hashing, and generating a hierarchical semantic sequence of attribute levels. For numeric field structured data, performing price binning / new product identification, and generating a hierarchical semantic sequence of metric levels. The hierarchical semantic sequence is then constructed using the category level, attribute level, and metric level.
[0120] For stores with a certain user traffic, a progressive enhancement branch can be used to update the hierarchical semantic sequence. The dual-tower model Item Tower is invoked to process the store's user behavior sequence and corresponding products. Then, residual quantization layer 2 is invoked to compress the output of the dual-tower model Item Tower, generating updated attribute and metric hierarchies. Through fusion or replacement, the hierarchical semantic sequence is updated, resulting in an updated hierarchical semantic sequence.
[0121] Figure 9 This is a flowchart illustrating the update process of the recommendation model provided in this application embodiment. Since each merchant has unique business needs—for example, new product promotions require exposure, inventory clearance requires conversion, and high-margin products need priority recommendation—a uniform optimization objective cannot meet the personalized needs of each merchant. Therefore, each online store can be configured with a dynamic reward function to guide the recommendation model to favor the business needs set by the merchant when recommending products.
[0122] Step S901: In response to the business needs of the online store, configure a reward function in the online store configuration.
[0123] In some embodiments of this application, merchants can configure business requirements for their online stores, which may include business objectives, weight settings, constraints, etc. Multiple options are displayed on the configuration page, including options for setting business objectives, setting weights, and setting constraints.
[0124] The business objectives include improving conversion rates, increasing average order value, clearing inventory, attracting new customers, and launching new products. The relative importance of each business objective can be dynamically adjusted through weight settings; for example, conversion rate can be weighted at 0.6, and average order value at 0.4. Constraints can be customized by the merchant, such as "Do not recommend products with inventory below X" or "Prioritize recommending new products launched within the last 7 days."
[0125] After configuring the business requirements such as business objectives, weight settings, and constraints, the reward function is automatically generated. The formula is as follows: ; In the formula, This represents the conversion probability output by the lightweight CVR prediction model of the e-commerce platform. This indicates that increasing the average order value is effective when the business objective is to achieve this. Indicates a new product identifier (0 or 1); This indicates a penalty for insufficient inventory (e.g., set to 0 when inventory < 10). Automatic normalization based on merchant configuration ensures consistent dimensions.
[0126] Step S902: In response to the user's feedback on the at least one item, a reward score is generated using the reward function.
[0127] In some embodiments of this application, after configuring the reward function, the merchant calls the reward function to calculate the reward score based on the user's feedback on at least one recommended product.
[0128] For user access requests Call the recommendation model Recommend at least one product (also known as a recommendation list). Record the generation probability of each recommended product. .
[0129] Real-time monitoring of user feedback on recommended products and calculation of reward scores. For example, if a product is viewed but not clicked, the calculated reward score is... When a user's click behavior is detected, a reward score is calculated. (Preset small positive value, such as 0.1). When a user adds items to their cart, a reward score is calculated. (e.g., 0.3). When a user's purchasing behavior is detected, a reward score is calculated. (e.g., 1.0, or weighted according to the actual payment amount).
[0130] Step S903: Update the model parameters corresponding to the recommendation model based on the reward score to obtain the updated recommendation model.
[0131] In some embodiments of this application, in order to maintain each user request The historical average reward can be used to calculate the baseline. This is used to reduce variance, as shown in the following formula: ; In the formula, The average reward for the current access request. This represents the baseline update rate.
[0132] For products that receive positive feedback from users (such as clicks, add-to-cart actions, and purchases), the recommendation model parameters can be updated according to the following rules. : ; For products that are displayed but not clicked, the model parameters are updated negatively with a small probability (p). (To prevent the recommendation model from over-penalizing unexposed products): ; in, Represents the learning rate, and .
[0133] By calculating reward scores, the model parameters of the recommendation model are updated, enabling the model to favor the user-configured reward function when performing hierarchical autoregressive predictions. This parameter update eliminates the need for storing experience pools and complex PPO / DPO calculations; the computational cost of a single update is comparable to that of a forward propagation, and it can be executed asynchronously on idle CPU cores of the online service.
[0134] In addition, to ensure the stability of the recommendation model, a "micro-batch update" strategy can be adopted: after collecting N user feedback (e.g., 100 pieces), the model parameters are updated once after aggregating and calculating the average gradient, and the baseline b is updated simultaneously.
[0135] To better understand, Figure 9 The illustrated embodiment will be discussed below in conjunction with... Figure 10 Describe it. For example... Figure 10As shown, merchants can configure constraints, weight settings (setting weights for each business objective), and business objective settings through the merchant configuration interface. The recommendation model is invoked to recommend at least one product to the user, obtaining user feedback from the data stream, such as impressions / clicks / add-to-cart / purchase feedback behaviors. Reward calculation is triggered. User feedback is received and the CVR (Conversion Rate) estimate, i.e., the conversion probability output by the CVR prediction model, is obtained. The price_factor / new_boost is calculated, and then the constraints are applied to stock_penalty. Finally, based on the constraints, weight settings, and business objective settings, the reward r is dynamically generated. To maintain the historical average reward for each user request q, a baseline b can be calculated. For products recommended by the recommendation model and receiving positive feedback from the user, a positive feedback update is calculated, and the model parameters are updated using micro-batch aggregation, feeding the updated model parameters back to the recommendation model. For products recommended by the recommendation model and receiving negative feedback from the user, a negative feedback update can be calculated, feeding the updated model parameters back to the recommendation model. After receiving the model parameters, the recommendation model can generate a recommended product list for the next user visit by invoking the updated model parameters.
[0136] Figure 11 This is a flowchart illustrating the update process of a recommendation model provided in another embodiment of this application. For merchants newly joining the SaaS platform and experiencing a "cold start" with extremely sparse data, relying solely on single-store data is insufficient to support the rapid convergence of the recommendation model and reward function. Given the strict data isolation requirements of the SaaS platform, such as... Figure 11 The example shown introduces lightweight federated learning, grouping merchants with similar business models into a federated learning group to improve the recommendation accuracy of the recommendation model for "cold start" merchants.
[0137] Step S1101: If the number of visits to the online store is less than a preset threshold, determine at least one associated store that has the same business model as the online store.
[0138] In some embodiments of this application, the number of store visits corresponding to an online store is less than a preset threshold. In this case, the online store is identified as a "cold start" merchant that has just joined the SaaS platform and has extremely sparse data. For example, the store's traffic is less than [a certain number]. In the case that the online store has been authorized, the federated learning task is performed.
[0139] Federated learning tasks can improve the recommendation accuracy of recommendation models for such online stores by grouping them into federated learning groups already categorized by business model. Within each federated learning group, at least one associated store is identified. This associated store must have a store visit count greater than or equal to the total store visit count of the online store.
[0140] Furthermore, in the process of dividing the federated learning groups, not only the primary category to which the merchant belongs is considered, but also factors such as product price range and user profile statistical characteristics (such as age and gender distribution) are taken into account. Clustering algorithms are used to group online stores corresponding to merchants with similar business models into the same federated learning group.
[0141] Step S1102: The model parameters of the recommendation model configured in each associated store are used as the first preset parameters, and the model parameters of the recommendation model configured in the online store are used as the second preset parameters.
[0142] In some embodiments of this application, each store has an independent database and model instance (recommendation model), and each independent database is not shared. Therefore, each store completes the training of the model instance locally.
[0143] Each store completes its recommendation model locally. The model is trained, and gradients or updated parameters are calculated. In one example, the model parameters of the recommendation model configured in each associated store are used as the first preset parameters. The model parameters of the recommendation model configured in the online store are used as the second preset parameters. The first and second preset parameters may include gradients or updated parameters, etc.
[0144] In other embodiments of this application, to enhance the security of local training data, differential privacy noise is added to the data in an independent database before each store's model is trained (meeting the requirements of privacy). -DP), and limit the number of rounds of federated learning and the minimum number of stores participating in aggregation (e.g., K≥5).
[0145] Step S1103: Aggregate the first preset parameter and the second preset parameter to generate aggregated parameters.
[0146] In some embodiments of this application, a secure aggregation protocol (such as SecAgg) is used to aggregate model parameters of all stores (e.g., K stores), for example, aggregating a first preset parameter and a second preset parameter, thereby generating aggregated parameters. The formula is as follows: ; Step S1104: Update the model parameters of the recommendation model of the online store using the aggregation parameters.
[0147] In some embodiments of this application, the model parameters of the recommendation model of the online store are updated using aggregation parameters, thereby deploying the recommendation model with updated model parameters in the store of the "cold start" merchant and improving the product recommendation accuracy of the store.
[0148] By employing an "attribute combination hash mapping to a fixed-size codebook" design when processing structured data, the underlying feature dimensions of different stores are physically aligned. This design ensures that even if different stores sell completely different products, their trained model parameter spaces remain completely consistent. This removes the technical obstacles to "horizontal secure aggregation" of cross-store models, achieving the co-evolution of the model capabilities corresponding to the recommendation models of online stores without compromising the privacy of the original structured data of related stores.
[0149] The above embodiments can improve the recommendation capabilities of stores with extremely sparse data.
[0150] To better understand, Figure 11 The illustrated embodiment will be discussed below in conjunction with... Figure 12 Describe it. For example... Figure 12 As shown, taking merchants A, B, and C as an example, each corresponding to one online store and two associated stores, the data for each store is independent and isolated. For example, merchant A has an independent database, merchant B has an independent database, and merchant C has an independent database. Merchants A, B, and C belong to a federated learning group with similar categories. The goal is to determine if the amount of data (which could be store visits) for any one of the stores (merchants A, B, and C) is less than a preset threshold. Under certain conditions, the triggering criteria are met. Merchants A, B, and C are triggered to call independent databases to train their recommendation models. Furthermore, to ensure data privacy, differential privacy noise is added to the data. After local training is completed, the model parameters (including the first and second preset parameters) for each model are aggregated using a secure aggregation protocol and aggregation formula. Aggregated parameters are generated, and these parameters are used to update the model parameters of the recommendation models for Merchants A, B, and C. The recommendation model with updated parameters is called the aggregated model. This aggregated model is then fed back to the stores corresponding to Merchants A, B, and C, and used as the initial model for the next local training.
[0151] Figure 13 This is a schematic diagram of a product recommendation device provided in an embodiment of this application, which is a functional representation of the product recommendation method of this application. The product recommendation device 130 includes a detection module 1310, used to obtain the historical behavior sequence corresponding to the user when the user visits an online store; a generation module 1320, used to generate product semantic identifiers based on the historical behavior sequence and a preset product hierarchical semantic library using a preset recommendation model; and a recommendation module 1330, used to determine at least one product related to the product semantic identifier from the online store based on the product semantic identifier, and recommend the at least one product to the user.
[0152] In some optional embodiments, the step of generating product semantic identifiers using a preset recommendation model based on the historical behavior sequence and a preset product hierarchical semantic library includes: obtaining the target semantic identifier of the target product corresponding to each behavior in the historical behavior sequence from the product hierarchical semantic library; generating a target sequence based on the behavior type corresponding to each behavior and the hierarchical semantic sequence corresponding to the target semantic identifier; encoding the target sequence to generate an encoding result; and performing hierarchical autoregressive prediction on the encoding result to generate the product semantic identifier.
[0153] In some optional embodiments, the step of performing hierarchical autoregressive prediction on the encoding result to generate the product semantic identifier includes: based on the encoding result, calling the linear layer and activation function of the recommendation model to predict a first-level result; concatenating the first-level result with the encoding result to obtain a first concatenated result; based on the first concatenated result, calling the second-level classifier of the recommendation model to predict a second-level result; concatenating the first-level result, the second-level result, and the encoding result to obtain a second concatenated result; based on the second concatenated result, calling the third-level classifier of the recommendation model to predict a third-level result; and generating the product semantic identifier based on the first-level result, the second-level result, and the third-level result.
[0154] In some optional embodiments, the method further includes: constructing the product-level semantic library, comprising: acquiring structured data corresponding to each product among all products in all stores on the e-commerce platform; performing multi-level discrete encoding on the structured data to generate a hierarchical semantic sequence, the hierarchical semantic sequence including a category level, an attribute level, and a metric level; acquiring store user data corresponding to all online stores on the e-commerce platform; generating multiple discrete codes based on the store user data and a dual-tower model; updating the attribute level and the metric level using the multiple discrete codes to obtain updated attribute levels and updated metric levels; constructing an updated hierarchical semantic sequence based on the category level, the updated attribute level, and the updated metric level; and constructing the product-level semantic library based on the updated hierarchical semantic sequence corresponding to each product, wherein each updated hierarchical semantic sequence has a corresponding hierarchical semantic identifier.
[0155] In some optional embodiments, the method further includes: configuring a reward function in the online store configuration in response to business needs of the online store; generating a reward score using the reward function in response to user feedback on the at least one product; and updating the model parameters corresponding to the recommendation model based on the reward score to obtain an updated recommendation model.
[0156] In some optional embodiments, the method further includes: recording user feedback data for at least one recommended product each time; and triggering a corresponding control strategy of the online store when it is determined based on the feedback data that one or more preset rule conditions are met, wherein the control strategy is used to change the product status of the product in the online store.
[0157] In some optional embodiments, the method further includes: if the store traffic corresponding to the online store is less than a preset threshold, identifying at least one associated store with the same business model as the online store; wherein the store traffic of the at least one associated store is greater than or equal to the store traffic of the online store; using the model parameters of the recommendation model configured in each associated store as a first preset parameter, and using the model parameters of the recommendation model configured in the online store as a second preset parameter; aggregating the first preset parameter and the second preset parameter to generate an aggregate parameter; and updating the model parameters of the recommendation model of the online store using the aggregate parameter.
[0158] Another embodiment of this application also provides a computer device. Figure 14 This is a schematic diagram of the structure of the computer device provided in the embodiments of this application, such as... Figure 14 As shown, in one embodiment of this application, the computer device 140 can be a tablet computer, an augmented reality (AR) / virtual reality (VR) device, a laptop computer, a netbook, a server cluster, a large server, etc. This application embodiment does not limit the specific type of the computer device 140. The computer device 140 is used to carry devices such as… Figure 1 The e-commerce platform 10 shown.
[0159] like Figure 14 As shown, the computer device 140 may include, but is not limited to, a communication module 1410, a memory 1411, a processor 1412, an input / output (I / O) interface 1413, and a bus 1414. The processor 1412 is coupled to the communication module 1410, the memory 1411, and the I / O interface 1413 via the bus 1414.
[0160] Those skilled in the art will understand that the schematic diagram is merely an example of the computer device 140 and does not constitute a limitation on the computer device 140. It may include more or fewer components than shown, or combine certain components, or different components. For example, the computer device 140 may also include network access devices, etc.
[0161] Communication module 1410 may include a wired communication module and / or a wireless communication module. The wired communication module may provide one or more wired communication solutions such as Universal Serial Bus (USB) and Controller Area Network (CAN). The wireless communication module may provide one or more wireless communication solutions such as Wireless Fidelity (Wi-Fi), Bluetooth (BT), mobile communication networks, Frequency Modulation (FM), Near Field Communication (NFC), and Infrared (IR) technologies.
[0162] The memory 1411 can be used to store computer-readable instructions and / or modules. The processor 1412 implements various functions of the computer device 140 by running or executing the computer-readable instructions and / or modules stored in the memory 1411 and by calling the data stored in the memory 1411. The memory 1411 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the computer device 140, etc. The memory 1411 may include non-volatile and volatile memory, such as: hard disk, memory, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one disk storage device, flash memory device, or other storage device.
[0163] The memory 1411 may be the external memory and / or internal memory of the computer device 140. Furthermore, the memory 1411 may be a memory in physical form, such as a memory stick, a TF card (Trans-flash Card), etc.
[0164] Processor 1412 can be a Central Processing Unit (CPU), or 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. The general-purpose processor can be a microprocessor or any conventional processor. Processor 1412 is the computing core and control center of computer device 140, connecting various parts of computer device 140 through various interfaces and lines, and executing the operating system of computer device 140 as well as various installed application programs and program code.
[0165] For example, computer-readable instructions can be divided into one or more modules / submodules / units, one or more of which are stored in memory 1411 and executed by processor 1412 to complete this application. One or more modules / submodules / units can be a series of computer-readable instruction segments capable of performing a specific function, which describe the execution process of the computer-readable instructions in computer device 140.
[0166] If the modules / units integrated in the computer device 140 are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by instructing related hardware through computer-readable instructions. The computer-readable instructions can be stored in a computer-readable storage medium, and when executed by a processor, the computer-readable instructions can implement the steps of the various method embodiments described above.
[0167] Computer-readable instructions include computer-readable instruction code, which can be in the form of source code, object code, executable file, or some intermediate form. Computer-readable media can include: any entity or device capable of carrying computer-readable instruction code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), and random access memory (RAM).
[0168] The memory 1411 in the computer device 140 stores computer-readable instructions. The specific implementation method of the processor 1412 of the above-mentioned computer-readable instructions can be referred to the description of the relevant steps in the above embodiments, and will not be repeated here.
[0169] I / O interface 1413 is used to provide a channel for user input or output. For example, I / O interface 1413 can be used to connect various input and output devices, such as mouse, keyboard, touch device, display screen, etc., so that users can enter information or visualize information.
[0170] Bus 1414 is used at least to provide a channel for communication between communication modules 1410, memory 1411, processor 1412, and I / O interface 1413 in computer device 140.
[0171] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and other division methods may be used in actual implementation.
[0172] The modules described as separate components may or may not be physically separate. The components shown as modules 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 modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0173] Furthermore, the functional modules in the various embodiments of this application 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 in the form of hardware plus software functional modules.
[0174] Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of this application is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be embraced within this application. No appended diagram markings in the claims should be construed as limiting the scope of the claims.
[0175] Furthermore, it is clear that the word "including" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices can also be implemented by a single unit or device through software or hardware. Terms such as "first," "second," etc., are used to indicate names and do not indicate any specific order.
[0176] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application and are not intended to limit it. Although this application has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of this application without departing from the spirit and scope of the technical solutions of this application.
Claims
1. A product recommendation method, characterized in that, The method includes: Upon detecting that a user has visited an online store, the user's historical behavior sequence is obtained; Based on the historical behavior sequence and the preset product hierarchical semantic library, a preset recommendation model is used to generate product semantic identifiers; Based on the product semantic identifier, at least one product related to the product semantic identifier is identified from the online store, and the at least one product is recommended to the user.
2. The product recommendation method according to claim 1, characterized in that, The process of generating product semantic identifiers based on the historical behavior sequence and a preset product hierarchical semantic library, using a preset recommendation model, includes: Based on each behavior in the historical behavior sequence, the target semantic identifier of the target product corresponding to each behavior is obtained from the product hierarchical semantic library; A target sequence is generated based on the behavior type corresponding to each behavior and the hierarchical semantic sequence corresponding to the target semantic identifier; The target sequence is encoded to generate an encoding result; The encoding results are subjected to hierarchical autoregressive prediction to generate the semantic identifier of the product.
3. The product recommendation method according to claim 2, characterized in that, The step of performing hierarchical autoregressive prediction on the encoding results to generate the product semantic identifier includes: Based on the encoding results, the linear layer and activation function of the recommendation model are invoked to predict the first-level results; By concatenating the first-level result with the encoded result, a first concatenation result is obtained; Based on the first concatenation result, the second-level classifier of the recommendation model is invoked to predict the second-level result; By concatenating the first-level result, the second-level result, and the encoded result, a second concatenation result is obtained; Based on the second concatenation result, the third-level classifier of the recommendation model is called to predict the third-level result; Based on the first-level results, the second-level results, and the third-level results, the product semantic identifier is generated.
4. The product recommendation method according to claim 1, characterized in that, The method further includes: constructing the product-level semantic library, including: Obtain the structured data corresponding to each product in all products across all stores on the e-commerce platform; The structured data is subjected to multi-level discrete encoding to generate a hierarchical semantic sequence, which includes a category level, an attribute level, and a metric level. Obtain the store user data corresponding to all online stores on the e-commerce platform; Based on the aforementioned store user data and the dual-tower model, multiple discrete codes are generated; The attribute level and the metric level are updated using the multiple discrete codes to obtain the updated attribute level and the updated metric level; Based on the category hierarchy, the updated attribute hierarchy, and the updated metric hierarchy, an updated hierarchical semantic sequence is constructed; Based on the updated hierarchical semantic sequence corresponding to each product, the product hierarchical semantic library is constructed, wherein each updated hierarchical semantic sequence has a corresponding hierarchical semantic identifier.
5. The product recommendation method according to claim 1, characterized in that, The method further includes: In response to the business needs of the online store, a reward function is configured in the online store configuration; In response to the user's feedback on the at least one item, a reward score is generated using the reward function; The model parameters corresponding to the recommendation model are updated based on the reward score to obtain the updated recommendation model.
6. The product recommendation method according to claim 1, characterized in that, The method further includes: Record user feedback data for at least one recommended product each time; When the feedback data determines that one or more preset rule conditions are met, the corresponding control strategy of the online store is triggered. The control strategy is used to change the product status of the products in the online store.
7. The product recommendation method according to claim 1, characterized in that, The method further includes: If the number of visits to the online store is less than a preset threshold, at least one associated store with the same business model as the online store is identified; wherein the number of visits to the at least one associated store is greater than or equal to the number of visits to the online store. The model parameters of the recommendation model configured in each associated store are used as the first preset parameters, and the model parameters of the recommendation model configured in the online store are used as the second preset parameters. The first preset parameter and the second preset parameter are combined to generate the aggregated parameter; The model parameters of the recommendation model for the online store are updated using the aggregation parameters.
8. A product recommendation device, characterized in that, The product recommendation device includes: The detection module is used to obtain the historical behavior sequence of a user when a user visits an online store. The generation module is used to generate product semantic identifiers based on the historical behavior sequence and a preset product hierarchical semantic library, using a preset recommendation model. The recommendation module is used to determine at least one product related to the product semantic identifier from the online store based on the product semantic identifier, and recommend the at least one product to the user.
9. A computer device, characterized in that, The computer device includes a processor and a memory, the memory storing a computer program, and the processor, when executing the computer program, implements the product recommendation method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores at least one instruction, which, when executed by a processor, implements the product recommendation method as described in any one of claims 1 to 7.