Method, device, server and program product for product recommendation

CN123015120APending Publication Date: 2026-10-30广州商研网络科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611018445.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-09
Publication Date
2026-10-30

AI Technical Summary

Benefits of technology

在本申请提供的技术方案中,针对用户的商品推荐请求,根据请求中携带的商品需求描述词,动态分配每个搜索关键字段对应的权重值,并且搜索关键字段除了包括商品通用字段外,还配置有每个商品专属的商品属性字段,相比于固定权重,这种动态分配权重的方案,能够更精准匹配用户的需求重点,对用户需求重点对应的关键词赋予更高的权重,使得最终检索返回给用户的待推荐商品,能够更精准的命中用户需求。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123015120A_ABST
    Figure CN123015120A_ABST
Patent Text Reader

Abstract

The application provides a commodity recommendation method, device, server and program product, relates to the technical field of computers, and the method comprises the following steps: acquiring a commodity recommendation request, wherein the commodity requirement description word is carried in the commodity recommendation request; determining the weight value corresponding to the search key field on the basis of the commodity requirement description word, wherein the search key field comprises a commodity general field and a commodity attribute field, the commodity general field comprises one or more fields in a commodity title field, a commodity detail description field, a commodity category field, a commodity sales field and a commodity rating field; and determining the commodity to be recommended on the basis of the commodity requirement description word and the weight value corresponding to each search key field. The application can more accurately recommend commodities meeting the purchase requirements of users to the users.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a method, apparatus, server, and program product for recommending goods. Background Technology

[0002] With the rapid development of the e-commerce industry, the number of products in stores is constantly increasing. Consumers are increasingly inclined to express their shopping needs to stores using natural language, such as "I want a chiffon blouse with a work style," "What are some popular dresses," or "XX brand sneakers." Against this backdrop, how to accurately recommend products that meet consumers' shopping needs based on these natural language expressions has become a pressing technical problem that needs to be solved. Summary of the Invention

[0003] This application provides a method, apparatus, server, and program product for product recommendation, which can improve the accuracy of product recommendations. The technical solution is as follows: Firstly, a method for recommending products is provided, the method comprising: Obtain a product recommendation request, wherein the product recommendation request carries product demand description words; Based on the product demand description terms, the weight values ​​corresponding to the search key fields are determined. The search key fields include general product fields and product attribute fields. The general product fields include one or more fields from the following: product title field, product details description field, product brand field, product sales field, and product rating field. Based on the product demand descriptions and the weight values ​​corresponding to each search keyword field, the products to be recommended are determined.

[0004] In one possible implementation, determining the weight value corresponding to the search key field based on the product demand descriptor includes: Generate a first prompt word containing the product demand description words, wherein the first prompt word is used to indicate the allocation rule of the weight value corresponding to the search keyword; The first prompt word is input into a pre-trained large language model (LLM) to obtain the weight values ​​corresponding to the search key fields.

[0005] In one possible implementation, determining the product to be recommended based on the weight values ​​corresponding to the product demand descriptors and the search key fields includes: Based on the product demand description terms and the weight values ​​corresponding to each search key field, a domain-specific language (DSL) query statement is generated. The Elastic Search Engine (ES) retrieves the top N candidate products with the highest relevance scores based on the DSL query statement, where N is a positive integer. Among the N candidate products, the product to be recommended is determined.

[0006] In one possible implementation, the product to be recommended is determined from the N candidate products, including: Generate a second prompt word containing semantic text corresponding to each of the N candidate products and the product demand description words. Input the prompt word into a pre-trained LLM to obtain the re-ranking scores corresponding to each of the N candidate products. The semantic text corresponding to each candidate product is used to describe one or more of the following information: product title, product details description, product category, product attributes, product sales, product price, product brand, and product rating. Among the N candidate products, the M candidate products with the highest rearrangement scores are determined as recommended products, where M is a positive integer less than N.

[0007] In one possible implementation, the method further includes: For each product in the product database, obtain one or more of the following information: product unique identifier, product title, product details description, product category, product attributes, product sales volume, product price, product brand, and product rating; and build an ES index based on the one or more pieces of information. The Elastic Search Engine (ES) retrieves the top N candidate products with the highest relevance scores based on the DSL query statement, including: The Elastic Search Engine (ES) retrieves the top N candidate products with the highest relevance scores based on the DSL query statement and the ES index.

[0008] In one possible implementation, a domain-specific language (DSL) query statement is generated based on the product demand descriptors and the weight values ​​corresponding to each search key field; Elastic Search (ES) then retrieves the top N candidate products with the highest relevance scores based on the DSL query statement, including: The first intelligent agent generates a domain-specific language (DSL) query statement based on the product demand description and the weight value corresponding to each search key field. The Elastic Search Engine (ES) then retrieves the top N candidate products with the highest relevance scores based on the DSL query statement. The process of determining the product to be recommended from the N candidate products includes: The second agent identifies the product to be recommended from among the N candidate products.

[0009] Secondly, a product recommendation device is provided, the device comprising: The acquisition module is used to acquire product recommendation requests, wherein the product recommendation requests carry product demand descriptions; The determination module is used to determine the weight value corresponding to each search key field based on the product demand description words. The search key fields include general product fields and product attribute fields. The general product fields include one or more fields among the product title field, product details description field, product brand field, product sales field, and product rating field. The recommendation module is used to determine the products to be recommended based on the product demand descriptions and the weight values ​​corresponding to each search key field.

[0010] In one possible implementation, the determining module is configured to: Generate a first prompt word containing the product demand description words, wherein the first prompt word is used to indicate the allocation rule of the weight value corresponding to the search keyword; The first prompt word is input into a pre-trained large language model (LLM) to obtain the weight value corresponding to each search key field.

[0011] In one possible implementation, the recommendation module is used to: Based on the product demand description terms and the weight values ​​corresponding to each search key field, a domain-specific language (DSL) query statement is generated. The Elastic Search Engine (ES) retrieves the top N candidate products with the highest relevance scores based on the DSL query statement, where N is a positive integer. Among the N candidate products, the product to be recommended is determined.

[0012] In one possible implementation, the recommendation module is used for: Generate a second prompt word containing semantic text corresponding to each of the N candidate products and the product demand description words. Input the prompt word into a pre-trained LLM to obtain the re-ranking scores corresponding to each of the N candidate products. The semantic text corresponding to each candidate product is used to describe one or more of the following information: product title, product details description, product category, product attributes, product sales, product price, product brand, and product rating. Among the N candidate products, the M candidate products with the highest rearrangement scores are determined as recommended products, where M is a positive integer less than N.

[0013] In one possible implementation, the index building module is configured to: For each product in the product database, obtain one or more of the following information: product unique identifier, product title, product details description, product category, product attributes, product sales volume, product price, product brand, and product rating; and build an ES index based on the one or more pieces of information. The recommendation module is used for: The Elastic Search Engine (ES) retrieves the top N candidate products with the highest relevance scores based on the DSL query statement and the ES index.

[0014] In one possible implementation, the recommendation module is used to: The first intelligent agent generates a domain-specific language (DSL) query statement based on the product demand description and the weight value corresponding to each search key field. The elastic search engine (ES) then uses the DSL query statement to find the top N candidate products with the highest relevance scores. The second agent identifies the product to be recommended from among the N candidate products.

[0015] Thirdly, a server is provided, the server including a processor and a memory, the memory storing at least one instruction, the instruction being loaded and executed by the processor to perform the operations performed as described in the first aspect and any possible implementation of the product recommendation method described in the first aspect.

[0016] Fourthly, a computer-readable storage medium is provided, the storage medium storing at least one instruction, the instruction being loaded and executed by a processor to perform the operations performed as described in the first aspect and any possible implementation of the product recommendation method described in the first aspect.

[0017] Fifthly, a computer program product is provided, the computer program product storing at least one instruction, the instruction being loaded and executed by a processor to perform the operations performed as described in the first aspect and any possible implementation of the product recommendation method described in the first aspect.

[0018] The beneficial effects of the technical solution provided in this application are: In the technical solution provided in this application, for a user's product recommendation request, the weight value corresponding to each search key field is dynamically assigned according to the product demand description words carried in the request. In addition to general product fields, the search key fields are also configured with product attribute fields specific to each product. Compared with fixed weights, this dynamic weight allocation scheme can more accurately match the user's key needs and assign higher weights to keywords corresponding to the user's key needs, so that the recommended products returned to the user in the final retrieval can more accurately hit the user's needs. Attached Figure Description

[0019] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 This is a flowchart of a product recommendation method provided in an embodiment of this application; Figure 2 This is a flowchart of a product recommendation method provided in an embodiment of this application; Figure 3 This is a flowchart of a product recommendation method provided in an embodiment of this application; Figure 4 This is a schematic diagram of a product recommendation device provided in an embodiment of this application; Figure 5 This is a schematic diagram of the structure of a terminal provided in an embodiment of this application; Figure 6 This is a schematic diagram of the structure of a server provided in an embodiment of this application. Detailed Implementation

[0021] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.

[0022] With the rapid development of the e-commerce industry, the number of products in stores is constantly increasing. Consumers are increasingly inclined to express their shopping needs to stores using natural language, such as "I want a chiffon blouse with a work style," "What are some popular dresses," or "XX brand sneakers." Against this backdrop, how to accurately recommend products that meet consumers' shopping needs based on these natural language expressions has become a key technical challenge.

[0023] Currently, intelligent shopping guide solutions based on LLM (Large Language Model) are gradually becoming an important technical path for e-commerce shopping guide scenarios. In existing technologies, when using the ES (Elasticsearch) engine for keyword matching in product retrieval, the weight assigned to each keyword is fixed. However, user needs are diverse, and fixed weights cannot accurately match the user's key needs, resulting in the retrieved products not precisely meeting the user's requirements.

[0024] This application provides a method for product recommendation, which can be implemented by a server, either a single server or a server cluster. In this method, for a user's product recommendation request, the weight value corresponding to each search keyword field is dynamically assigned based on the product demand descriptions carried in the request. In addition to general product fields, the search keyword fields also include product-specific attribute fields for each product. Compared to fixed weights, this dynamic weight allocation scheme can more accurately match the user's key needs, assigning higher weights to keywords corresponding to the user's key needs. This ensures that the recommended products returned to the user in the final retrieval are more accurately aligned with the user's requirements.

[0025] The method for recommending goods provided in this application will be described below with reference to the accompanying drawings. This method can be implemented by a server, such as... Figure 1 As shown, the processing of this method may include the following steps: Step 101: Obtain a product recommendation request.

[0026] The product recommendation request includes product demand descriptions.

[0027] The terminal can run an e-commerce platform client. When a user needs to purchase goods, they can open the e-commerce platform client to enter the target store. On the target store's display interface, the user can enter descriptive terms for the goods in the input boxes displayed on the interface. These descriptive terms are used to describe the user's needs for the goods and are in natural language form. For example, "What are some dresses that sell well?" or "XX brand sneakers".

[0028] This triggers the terminal to send a product recommendation request to the server, which includes the user's input description of their needs.

[0029] Step 102: Determine the weight values ​​corresponding to the key search fields based on the product demand descriptions.

[0030] The key search fields include general product fields and product attribute (category_attr) fields. General product fields include one or more of the following: product title (title), product description (description), product brand (brand), product sales volume (sales_volume), and product rating (rating).

[0031] After receiving a product recommendation request from a user, the server obtains a preset prompt template and generates a first prompt based on the prompt template and product demand description. The first prompt is used to indicate the allocation rules for the weight values ​​corresponding to the search key fields. Then, the first prompt is input into the pre-trained LLM to obtain the weight values ​​corresponding to the aforementioned search key fields.

[0032] The rules for assigning weight values ​​to the search keyword fields described above can be as follows: If the product demand description contains obvious sales volume requirements, such as "selling well," "hot-selling," or "bestseller," then the weight value of the sales_volume field will be increased.

[0033] If a specified brand name appears in the product demand description, such as AA brand or XX brand, the weight value of the brand field will be increased.

[0034] If the product demand description contains obvious product attribute requests, such as style, fit, efficacy, technical parameters, etc., the weight value of the category_attr field will be increased.

[0035] If the product description contains obvious rating-related requests, such as "high rating," then the weight value of the category_attr field will be increased.

[0036] If the product demand description only contains product category terms or general descriptions, without any specific demand focus, then the weight values ​​corresponding to the search key fields will all return default (default value).

[0037] Furthermore, the LLM described above can also output a set of search terms corresponding to the product demand descriptions, as well as price range filtering conditions. The search term set is obtained by extracting keywords from the user-input product demand descriptions, and the price range filtering conditions are obtained by semantic recognition of the user-input product demand descriptions. To enable the LLM to output the above information, corresponding instructions can be included in the first prompt. Below is an example of a prompt template for instructing the LLM to output the weight values ​​corresponding to the search keywords, the set of search terms corresponding to the product demand descriptions, and the price range filtering conditions: “ [System Prompt] You are a professional e-commerce shopping guide search parameter generator. Your task is to generate accurate, structured parameters for Elasticsearch product retrieval based on users' natural language shopping questions.

[0038] Strictly adhere to the following rules: Search term extraction: Extract core keywords from user questions (removing modifiers and stop words). All category terms (e.g., "shirt," "mobile phone"), brand terms (e.g., "XX brand"), and attribute terms (e.g., "chiffon," "commuter") should be retained and output as a list.

[0039] Search Key Field Weighting: Floating-point weights are assigned to the following six Elasticsearch product retrieval key fields (title, description, category_attr, brand, sales_volume, rating), with values ​​ranging from 0.0 to 5.0, and adjusted according to the following semantic focus rules: Sales targets: If words such as "selling well", "hot-selling", or "bestseller" appear, significantly increase the weight values ​​of the sales_volume and rating fields (recommended 3.0 ~ 5.0).

[0040] Brand appeal: If a specific brand name appears (such as "XX brand" or "YY brand"), the weight value of the brand field will be significantly increased (4.0 ~ 5.0 is recommended).

[0041] Attribute requirements: If words such as style (commuting), fabric (chiffon), function (moisturizing), and parameter (level 1 energy efficiency) appear, the weight value of the category_attr field will be significantly increased (3.5 ~ 5.0 recommended).

[0042] Rating criteria: If words such as "high rating" appear, increase the weight value of the rating field (3.0 ~ 5.0 recommended).

[0043] General fallback weighting: The weight values ​​corresponding to the title and description fields remain at the basic weight values ​​(1.0~2.0).

[0044] The "default" fallback trigger mechanism: If a user's question only contains category terms or extremely broad descriptions (such as "dress", "beauty", "what are some recommendations"), and does not involve any specific preferences such as sales volume, brand, or attributes, then the weight value corresponding to the search key field will directly return the string "default".

[0045] Price range filtering: If the user's question mentions a specific price (such as "around 500 yuan" or "within 1000 yuan"), it is converted into a reasonable price range filtering condition (min (min value), max (maximum value)). If no specific price is mentioned, the price range is set to null.

[0046] [User Input] The current user problem is: "{Product Demand Description}" " Step 103: Determine the products to be recommended based on the weight values ​​corresponding to the product demand description words and search key fields.

[0047] After obtaining the weight values ​​corresponding to the search keywords, an Elasticsearch (ES) search can be performed. The ES engine scores the relevance of each product in the store based on the aforementioned search term set and the weight values ​​corresponding to the search keywords. It then returns the N products with the highest relevance scores as candidate products. Further, from these N candidate products, the products to be recommended are determined. The relevance score can be the BM25 (Best Matching 25) score. The product's relevance score reflects the correlation between the product and the aforementioned product demand descriptions; a higher relevance score indicates that the product better meets the user's needs.

[0048] Specifically, a DSL (Domain Specific Language) query for Elasticsearch (ES) retrieval can be generated based on the search term set and the weight values ​​corresponding to the search keywords. Furthermore, if a price range filter condition was obtained in step 102 above, a DSL query for ES retrieval can be generated here based on the search term set, the weight values ​​corresponding to the search keywords, and the price range filter condition.

[0049] The following can be included in a DSL query statement: The main query body (query) specifically includes the set of search terms and the weight values ​​corresponding to the key search fields. The ES engine calculates the relevance score for each product through the main query body.

[0050] Filter criteria: These are used by the Elasticsearch engine to perform hard filtering when retrieving products. Products that do not meet the criteria are directly excluded. For example, the price range filter above indicates that products priced between 100 and 500 yuan will be filtered out, and those outside this range will be directly excluded without being included in the relevance score calculation.

[0051] Sort rule (sort): Instructs the Elasticsearch engine on the order in which search results are arranged. For example, sorting by relevance score in descending order, with the highest score appearing first.

[0052] Result Count (size): This indicates how many product-related information the ES engine returns. For example, if size=20, meaning N is 20, then the ES engine returns information for 20 candidate products.

[0053] After generating the DSL query, the Elasticsearch engine (ES) performs a search. The ES engine filters products in the ES index based on the filtering conditions in the DSL query. Then, through multi-field matching, it substitutes the search term set and the weight values ​​corresponding to the search keywords from the main query body to calculate the relevance score of each product in the store. Finally, the products are sorted in descending order of relevance score, and the top N products are returned as candidate products.

[0054] The following explains how to determine the recommended product from N candidate products: Based on a pre-defined prompt template, semantic text corresponding to each of the N candidate products, and product demand descriptions, a second prompt is generated. This prompt is then input into a pre-trained LLM to obtain the re-ranking scores for each of the N candidate products. The semantic text describes one or more of the following information for each candidate product: product title, product details, product category, product attributes, sales volume, price, brand, and rating.

[0055] Below is an example of a prompt template for instructing an LLM to rearrange candidate items: "You are a professional e-commerce product ranking expert. Your task is to refine the scoring and ranking of a batch of initially screened candidate products based on users' original shopping needs."

[0056] Input information: The user's original question (description of product demand).

[0057] Detailed information on the 20 candidate products (including product title, product description, product category, product attributes, sales volume, product price, product brand, and product rating).

[0058] Rating dimensions (each must be evaluated individually): Please evaluate each product based on the following four dimensions and give a comprehensive score between 0.0 and 1.0 (rounded to two decimal places). The higher the score, the better the product meets the user's needs: Category fit: Does the product belong to the category explicitly or implicitly stated in the user's question? (For example, if the user wants "running shoes," athletic shoes score high, while leather shoes score low.) Core attribute matching degree: How well do the product's style, material, efficacy, parameters, and other attributes match the user's description? (For example, if the user wants "commuter chiffon," products with "commuter" and "chiffon" in their attributes will score extremely high.) Price fit: Does the product price fall within the user's suggested budget range? (If the user does not mention a price, this item will be assigned a neutral score of 0.8.) Sales volume and reputation / trust level: Combining product sales volume and ratings, products with high sales volume and good ratings score higher. Then, among the N candidate products, the M candidate products with the highest rearrangement scores are determined as the products to be recommended, where M is a positive integer less than N, for example, M=3. Finally, the information of the products to be recommended that need to be displayed to the user is returned to the terminal. The specific information returned can be configured according to actual needs, and this embodiment does not limit this.

[0059] The semantic text of the aforementioned candidate products can be returned by the ES engine or obtained from the product platform of the store. This application embodiment does not limit the method of obtaining it.

[0060] In one possible implementation, for the selected M products to be recommended, the LLM can be called again. The details and product requirement descriptions of these M products are input into the LLM, and the LLM is instructed to output the recommendation reasons for each of the M products based on these details and product requirement descriptions. The details of the products to be recommended can be obtained from the store's product platform.

[0061] In one possible implementation, such as Figure 2 As shown, in this embodiment of the application, the above steps 101-103 can be implemented by an agent. Specifically, multiple agents can be used to implement the above steps 101-103. For example, the first agent performs the processing of querying N candidate products in the above steps 101, 102 and 103, and the second agent performs the processing of selecting M products to be recommended from the N candidate products and calling LLM to generate recommendation reasons in the above step 103.

[0062] In one possible implementation, such as Figure 3 As shown, during the product warehousing stage, a corresponding ES index can be generated for each product so that it can be retrieved by the ES engine in step 103 above.

[0063] The following explains how the above Elasticsearch index was created: For each product in the store's product library, upon product input, full product data is synchronously retrieved from the product platform, including the product's unique identifier, title, detailed description, category, product attribute table filled in by the merchant, sales volume, price, brand, and rating. This data is then cleaned, removing HTML tags, garbled characters, and special symbols. Finally, the product's attribute field (category_attr) is extracted from this data. Furthermore, an ES index is established within the ES engine. Compared to ES indexes in related technologies, the ES index in this embodiment adds some fields specifically designed to handle user attribute requirements. In related technologies, the ES index only includes the title and description fields, while in this embodiment, the ES index may include the search key fields shown in Table 1 below.

[0064]

[0065] The following explains the processing of the category_attr field for extracting products: For each product, the product category is determined, and a prompt word template corresponding to that category is obtained. A third prompt word is generated based on this template. This third prompt word instructs the LLM to extract the product's attribute information from the input data according to rules and output it in a specified format. The input data may include the product's title, detailed description, attribute table, etc. Then, a pre-trained LLM is invoked, and the third prompt word is input into the LLM to obtain the product's `category_attr` field. Finally, the product's `category_attr` field is added to the Elasticsearch index. Table 2 below illustrates the extraction rules for the `category_attr` field for each category.

[0066]

[0067] The following is an example of the prompt template used to generate the third prompt word.

[0068] "You are a professional expert in extracting structured attributes from e-commerce products. Your task is to extract core decision-making information based on the product category tags and original text, according to the preset dimensions of that category, and output it in a specified format."

[0069] Strictly adhere to the following rules: 1. Input information includes: Category label: Clearly specifies which category the current product belongs to (such as "home appliances", "clothing", "beauty", "household goods" etc.).

[0070] Original text: Includes the product title, detailed description, attribute table filled in by the merchant, etc.

[0071] 2. Sampling rules (differentiated by product category): For home appliances: Parameters such as power, capacity, energy efficiency rating, noise level, inverter / fixed frequency, and core functions must be extracted. Output example: "1.5 HP / Level 1 Energy Efficiency / 35dB Noise / Inverter / Self-Cleaning / Fresh Air System" Apparel: Style tags, fit, fabric, season, and occasion must be extracted. Output example: "Commuting / Minimalist / Slim Fit / Chiffon / Spring / Autumn / Workplace" Beauty products: Must extract core efficacy, key ingredients, suitable skin types, and fragrance. Example output: "Brightening / Moisturizing / Niacinamide / Suitable for dry skin / Fragrance-free" For household goods: You must extract the purpose, material, portability, and applicable scenarios. Example output: "Outdoor camping / waterproof / portable folding / multi-user / 304 stainless steel" 3. Extraction Principles: Extract only explicitly mentioned information from the original text, without fabricating non-existent content.

[0072] If a certain dimension is not mentioned in the original text, skip that dimension and do not output placeholders such as "none" or "unknown".

[0073] The extracted results are separated by " / " (space + forward slash + space) and concatenated into a single string.

[0074] 4. Output format requirements: You must output only a single plain text string, for example: "commuting / simple / slim fit / chiffon / spring / office". Do not output any other content (including opening remarks, closing remarks, punctuation explanations, etc.). In the above prompt template, fill in the information according to the actual information of the product in the "Input information includes:" field to generate the third prompt template.

[0075] Furthermore, the LLMs mentioned in the embodiments of this application are all pre-trained LLMs. The LLMs used in different steps can be the same or different. In actual implementation, the LLM used in each step can be configured according to the processing direction that the LLM is good at. The embodiments of this application do not limit this.

[0076] All of the above-mentioned optional technical solutions can be combined in any way to form the optional embodiments of this application, and will not be described in detail here.

[0077] In the technical solution provided in this application, for a user's product recommendation request, the weight value corresponding to each search key field is dynamically assigned according to the product demand description words carried in the request. In addition to general product fields, the search key fields are also configured with product attribute fields specific to each product. Compared with fixed weights, this dynamic weight allocation scheme can more accurately match the user's key needs and assign higher weights to keywords corresponding to the user's key needs, so that the recommended products returned to the user in the final retrieval can more accurately hit the user's needs.

[0078] Based on the same technical concept, embodiments of this application also provide a product recommendation device, which can be applied to a server, such as... Figure 4 As shown, the device includes an acquisition module 410, a determination module 420, and a recommendation module 430, wherein: The acquisition module 410 is used to acquire a product recommendation request, wherein the product recommendation request carries product demand description words; The determining module 420 is used to determine the weight value corresponding to the search key field based on the product demand description words. The search key field includes general product fields and product attribute fields. The general product fields include one or more fields among the product title field, product details description field, product category field, product sales field, and product rating field. The recommendation module 430 is used to determine the products to be recommended based on the weight values ​​corresponding to the product demand description words and the search key fields.

[0079] In one possible implementation, the determining module 420 is configured to: Generate a first prompt word containing the product demand description words, wherein the first prompt word is used to indicate the allocation rule of the weight value corresponding to the search keyword; The first prompt word is input into a pre-trained large language model (LLM) to obtain the weight value corresponding to each search key field.

[0080] In one possible implementation, the recommendation module 430 is used for: Based on the product demand description terms and the weight values ​​corresponding to each search key field, a domain-specific language (DSL) query statement is generated. Based on the DSL query statement, the Elastic Search Engine (ES) retrieves the top N candidate products with the highest relevance scores, where N is a positive integer. Among the N candidate products, the product to be recommended is determined.

[0081] In one possible implementation, module 430 is recommended for: Generate a second prompt word containing semantic text corresponding to each of the N candidate products and the product demand description words. Input the prompt word into a pre-trained LLM to obtain the re-ranking scores corresponding to each of the N candidate products. The semantic text corresponding to each candidate product is used to describe one or more of the following information: product title, product details description, product category, product attributes, product sales, product price, product brand, and product rating. Among the N candidate products, the M candidate products with the highest rearrangement scores are determined as recommended products, where M is a positive integer less than N.

[0082] In one possible implementation, the index building module is configured to: For each product in the product database, obtain one or more of the following information: product unique identifier, product title, product details description, product category, product attributes, product sales volume, product price, product brand, and product rating; and build an ES index based on the one or more pieces of information. The recommendation module 430 is used for: Using Elastic Search (ES), based on the DSL query statement and the ES index, the top N candidate products with the highest relevance scores are retrieved.

[0083] In one possible implementation, the recommendation module 430 is used for: The first intelligent agent generates a domain-specific language (DSL) query statement based on the product demand description and the weight value corresponding to each search key field. The Elastic Search Engine (ES) then retrieves the top N candidate products with the highest relevance scores based on the DSL query statement. The second agent identifies the product to be recommended from among the N candidate products.

[0084] In the technical solution provided in this application embodiment, for a user's product recommendation request, the weight value corresponding to each search key field is dynamically assigned according to the product demand description words carried in the request. In addition to general product fields, the search key fields are also configured with product attribute fields specific to each product. Compared with fixed weights, this dynamic weight allocation scheme can more accurately match the user's key needs and assign higher weights to keywords corresponding to the user's key needs, so that the recommended products returned to the user in the final retrieval can more accurately hit the user's needs.

[0085] It should be noted that the product recommendation device provided in the above embodiments is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the server can be divided into different functional modules to complete all or part of the functions described above. In addition, the product recommendation device and the product recommendation method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.

[0086] Figure 5 This illustration shows a structural block diagram of a terminal 800 provided in an exemplary embodiment of this application. The terminal 800 may be a portable mobile terminal, such as a smartphone, tablet computer, MP3 player (Moving Picture Experts Group Audio Layer III), MP4 player (Moving Picture Experts Group Audio Layer IV), laptop computer, or desktop computer. The terminal 800 may also be referred to as a user device, portable terminal, laptop terminal, desktop terminal, or other names.

[0087] Typically, terminal 800 includes a processor 801 and a memory 802.

[0088] Processor 801 may include one or more processing cores, such as a quad-core processor or an octa-core processor. Processor 801 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). Processor 801 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, processor 801 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, processor 801 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.

[0089] Memory 802 may include one or more computer-readable storage media, which may be non-transitory. Memory 802 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments, the non-transitory computer-readable storage media in memory 802 is used to store at least one instruction, which is executed by processor 801 to implement the product recommendation method provided in the method embodiments of this application.

[0090] In some embodiments, the terminal 800 may also optionally include a peripheral device interface 803 and at least one peripheral device. The processor 801, memory 802, and peripheral device interface 803 can be connected via a bus or signal line. Each peripheral device can be connected to the peripheral device interface 803 via a bus, signal line, or circuit board. Specifically, the peripheral device includes at least one of the following: a radio frequency circuit 804, a display screen 805, a camera assembly 806, an audio circuit 807, a positioning assembly 808, and a power supply 809.

[0091] Peripheral device interface 803 can be used to connect at least one I / O (Input / Output) related peripheral device to processor 801 and memory 802. In some embodiments, processor 801, memory 802 and peripheral device interface 803 are integrated on the same chip or circuit board; in some other embodiments, any one or two of processor 801, memory 802 and peripheral device interface 803 can be implemented on separate chips or circuit boards, which is not limited in this embodiment.

[0092] The radio frequency (RF) circuit 804 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The RF circuit 804 communicates with communication networks and other communication devices via electromagnetic signals. The RF circuit 804 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals back into electrical signals. Optionally, the RF circuit 804 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, etc. The RF circuit 804 can communicate with other terminals through at least one wireless communication protocol. This wireless communication protocol includes, but is not limited to: the World Wide Web, metropolitan area networks, intranets, various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks, and / or WiFi (Wireless Fidelity) networks. In some embodiments, the RF circuit 804 may also include circuitry related to NFC (Near Field Communication), which is not limited in this application.

[0093] Display screen 805 is used to display a UI (User Interface). This UI may include graphics, text, icons, videos, and any combination thereof. When display screen 805 is a touch display screen, it also has the ability to collect touch signals on or above its surface. These touch signals can be input as control signals to processor 801 for processing. In this case, display screen 805 can also be used to provide virtual buttons and / or a virtual keyboard, also known as soft buttons and / or a soft keyboard. In some embodiments, there may be one display screen 805, disposed on the front panel of terminal 800; in other embodiments, there may be at least two display screens, disposed on different surfaces of terminal 800 or in a folded design; in other embodiments, display screen 805 may be a flexible display screen, disposed on a curved or folded surface of terminal 800. Furthermore, display screen 805 may be configured as a non-rectangular irregular shape, i.e., a non-rectangular screen. Display screen 805 may be made of materials such as LCD (Liquid Crystal Display) or OLED (Organic Light-Emitting Diode).

[0094] The camera assembly 806 is used to acquire images or videos. Optionally, the camera assembly 806 includes a front-facing camera and a rear-facing camera. Typically, the front-facing camera is located on the front panel of the terminal, and the rear-facing camera is located on the back of the terminal. In some embodiments, there are at least two rear-facing cameras, which are any one of a main camera, a depth-sensing camera, a wide-angle camera, and a telephoto camera, to achieve background blurring by fusion of the main camera and the depth-sensing camera, panoramic shooting by fusion of the main camera and the wide-angle camera, VR (Virtual Reality) shooting, or other fusion shooting functions. In some embodiments, the camera assembly 806 may also include a flash. The flash can be a single-color temperature flash or a dual-color temperature flash. A dual-color temperature flash refers to a combination of a warm-light flash and a cool-light flash, which can be used for light compensation at different color temperatures.

[0095] The audio circuit 807 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, converting the sound waves into electrical signals that are input to the processor 801 for processing, or input to the radio frequency circuit 804 to achieve voice communication. For stereo sound acquisition or noise reduction purposes, multiple microphones may be used, each located at a different part of the terminal 800. The microphone may also be an array microphone or an omnidirectional microphone. The speaker is used to convert the electrical signals from the processor 801 or the radio frequency circuit 804 into sound waves. The speaker may be a conventional diaphragm speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can convert electrical signals not only into audible sound waves but also into inaudible sound waves for purposes such as distance measurement. In some embodiments, the audio circuit 807 may also include a headphone jack.

[0096] The positioning component 808 is used to determine the current geographical location of the positioning terminal 800 in order to enable navigation or LBS (Location Based Service). The positioning component 808 can be a positioning component based on GPS (Global Positioning System), BeiDou system, or Galileo system.

[0097] Power supply 809 is used to supply power to the various components in terminal 800. Power supply 809 can be AC ​​power, DC power, a disposable battery, or a rechargeable battery. When power supply 809 includes a rechargeable battery, the rechargeable battery can be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is a battery that is charged via a wired line, and a wireless rechargeable battery is a battery that is charged via a wireless coil. The rechargeable battery can also be used to support fast charging technology.

[0098] In some embodiments, the terminal 800 further includes one or more sensors 810. The one or more sensors 810 include, but are not limited to: an accelerometer 811, a gyroscope 812, a pressure sensor 813, a fingerprint sensor 814, an optical sensor 815, and a proximity sensor 816.

[0099] Accelerometer 811 can detect the magnitude of acceleration on the three coordinate axes of a coordinate system established by terminal 800. For example, accelerometer 811 can be used to detect the components of gravitational acceleration on the three coordinate axes. Processor 801 can control display screen 805 to display the user interface in either a landscape or portrait view based on the gravitational acceleration signal acquired by accelerometer 811. Accelerometer 811 can also be used for games or for acquiring user motion data.

[0100] The gyroscope sensor 812 can detect the orientation and rotation angle of the terminal 800. The gyroscope sensor 812, in conjunction with the accelerometer sensor 811, can collect 3D motion data from the user on the terminal 800. Based on the data collected by the gyroscope sensor 812, the processor 801 can perform the following functions: motion sensing (e.g., changing the UI based on the user's tilt), image stabilization during shooting, game control, and inertial navigation.

[0101] The pressure sensor 813 can be disposed on the side bezel of the terminal 800 and / or on the lower layer of the display screen 805. When the pressure sensor 813 is disposed on the side bezel of the terminal 800, it can detect the user's grip signal on the terminal 800, and the processor 801 can perform left / right hand recognition or quick operation based on the grip signal collected by the pressure sensor 813. When the pressure sensor 813 is disposed on the lower layer of the display screen 805, the processor 801 can control the operable controls on the UI interface based on the user's pressure operation on the display screen 805. The operable controls include at least one of button controls, scroll bar controls, icon controls, and menu controls.

[0102] The fingerprint sensor 814 is used to collect the user's fingerprint. The processor 801 identifies the user's identity based on the fingerprint collected by the fingerprint sensor 814, or the fingerprint sensor 814 identifies the user's identity based on the collected fingerprint. When the user's identity is identified as trusted, the processor 801 authorizes the user to perform relevant sensitive operations, including unlocking the screen, viewing encrypted information, downloading software, making payments, and changing settings. The fingerprint sensor 814 can be located on the front, back, or side of the terminal 800. When the terminal 800 has a physical button or manufacturer logo, the fingerprint sensor 814 can be integrated with the physical button or manufacturer logo.

[0103] An optical sensor 815 is used to collect ambient light intensity. In one embodiment, the processor 801 can control the display brightness of the display screen 805 based on the ambient light intensity collected by the optical sensor 815. Specifically, when the ambient light intensity is high, the display brightness of the display screen 805 is increased; when the ambient light intensity is low, the display brightness of the display screen 805 is decreased. In another embodiment, the processor 801 can also dynamically adjust the shooting parameters of the camera assembly 806 based on the ambient light intensity collected by the optical sensor 815.

[0104] The proximity sensor 816, also known as a distance sensor, is typically located on the front panel of the terminal 800. The proximity sensor 816 is used to detect the distance between the user and the front of the terminal 800. In one embodiment, when the proximity sensor 816 detects that the distance between the user and the front of the terminal 800 is gradually decreasing, the processor 801 controls the display screen 805 to switch from a screen-on state to a screen-off state; when the proximity sensor 816 detects that the distance between the user and the front of the terminal 800 is gradually increasing, the processor 801 controls the display screen 805 to switch from a screen-off state to a screen-on state.

[0105] Those skilled in the art will understand that Figure 5 The structure shown does not constitute a limitation on terminal 800 and may include more or fewer components than shown, or combine certain components, or use different component arrangements.

[0106] This application embodiment also provides a server 1100, which can be the server mentioned in the above embodiments. For example... Figure 6 As shown, server 1100 includes: bus 1102, processor 1104, memory 1106, and communication interface 1108. Processor 1104, memory 1106, and communication interface 1108 communicate with each other via bus 1102. It should be understood that this application does not limit the number of processors and memory in server 1100.

[0107] Bus 1102 can be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. Buses can be divided into address buses, data buses, control buses, etc. For ease of representation, Figure 6 The bus 1104 may be represented by a single line, but this does not mean that there is only one bus or one type of bus. The bus 1104 may include a path for transmitting information between various components of the server 1100 (e.g., memory 1106, processor 1104, communication interface 1108).

[0108] The processor 1104 may include any one or more processors such as CPU (central processing unit), GPU (graphics processing unit), or DSP (digital signal processor).

[0109] The memory 1106 may include volatile memory, such as RAM (random access memory). The memory 1106 may also include non-volatile memory, such as ROM (read-only memory), flash memory, HDD (hard disk drive), or SSD (solid state drive).

[0110] The memory 1106 stores executable program code, and the processor 1104 executes the executable program code to implement the product recommendation method.

[0111] The communication interface 1108 is used to enable communication between the server 1100 and other devices or communication networks.

[0112] In an exemplary embodiment, a computer-readable storage medium is also provided, such as a memory including instructions that can be executed by a processor in a server to perform the product recommendation method described above. This computer-readable storage medium may be non-transitory. For example, the computer-readable storage medium may be ROM (Read-Only Memory), RAM (Random Access Memory), CD-ROM (Compact Disc Read-Only Memory), magnetic tape, floppy disk, and optical data storage devices, etc.

[0113] It should be noted that all information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.), and signals (including but not limited to signals transmitted between the user server and other devices) involved in this application have been authorized by the user or fully authorized by all parties, and the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant countries and regions. For example, all images and faces involved in this application were obtained with full authorization.

[0114] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.

[0115] It should be understood that "multiple" as used herein refers to 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. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. Furthermore, the step numbers described herein are merely illustrative of one possible execution order. In some other embodiments, the steps may not be executed in numerical order, such as two steps with different numbers being executed simultaneously, or two steps with different numbers being executed in the reverse order of the illustration. This application does not limit this.

[0116] The above description is merely an optional embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A method for recommending products, characterized in that, The method includes: Obtain a product recommendation request, wherein the product recommendation request carries product demand description words; Based on the product demand description terms, the weight values ​​corresponding to the search key fields are determined. The search key fields include general product fields and product attribute fields. The general product fields include one or more fields from the following: product title field, product details description field, product brand field, product sales field, and product rating field. Based on the product demand descriptions and the weight values ​​corresponding to each search keyword field, the products to be recommended are determined.

2. The method according to claim 1, characterized in that, The step of determining the weight values ​​corresponding to the search key fields based on the product demand description terms includes: Generate a first prompt word containing the product demand description words, wherein the first prompt word is used to indicate the allocation rule of the weight value corresponding to the search keyword; The first prompt word is input into a pre-trained large language model (LLM) to obtain the weight values ​​corresponding to the search key fields.

3. The method according to claim 1, characterized in that, The process of determining the products to be recommended based on the weight values ​​corresponding to the product demand description terms and the search key fields includes: Based on the weight values ​​corresponding to the product demand descriptors and the search key fields, a domain-specific language (DSL) query statement is generated. The Elastic Search Engine (ES) retrieves the top N candidate products with the highest relevance scores based on the DSL query statement, where N is a positive integer. Among the N candidate products, the product to be recommended is determined.

4. The method according to claim 3, characterized in that, Among the N candidate products, the products to be recommended are determined, including: Generate a second prompt word containing semantic text corresponding to each of the N candidate products and the product demand description words. Input the prompt word into a pre-trained LLM to obtain the re-ranking scores corresponding to each of the N candidate products. The semantic text corresponding to each candidate product is used to describe one or more of the following information: product title, product details description, product category, product attributes, product sales, product price, product brand, and product rating. Among the N candidate products, the M candidate products with the highest rearrangement scores are determined as recommended products, where M is a positive integer less than N.

5. The method according to claim 3, characterized in that, The method further includes: For each product in the product database, obtain one or more of the following information: product unique identifier, product title, product details description, product category, product attributes, product sales volume, product price, product brand, and product rating; and build an ES index based on the one or more pieces of information. The Elastic Search Engine (ES) retrieves the top N candidate products with the highest relevance scores based on the DSL query statement, including: The Elastic Search Engine (ES) retrieves the top N candidate products with the highest relevance scores based on the DSL query statement and the ES index.

6. The method according to any one of claims 3-5, characterized in that, Based on the product demand descriptors and the weight values ​​corresponding to each search key field, a domain-specific language (DSL) query statement is generated. The Elasticsearch engine (ES) retrieves the top N candidate products with the highest relevance scores based on the DSL query statement, including: The first intelligent agent generates a domain-specific language (DSL) query statement based on the product demand description words and the weight values ​​corresponding to each search key field. The Elastic Search Engine (ES) then retrieves the top N candidate products with the highest relevance scores based on the DSL query statement. The process of determining the product to be recommended from the N candidate products includes: The second agent identifies the product to be recommended from among the N candidate products.

7. A product recommendation device, characterized in that, The device includes: The acquisition module is used to acquire product recommendation requests, wherein the product recommendation requests carry product demand descriptions; The determination module is used to determine the weight value corresponding to each search key field based on the product demand description words. The search key fields include general product fields and product attribute fields. The general product fields include one or more fields among the product title field, product details description field, product brand field, product sales field, and product rating field. The recommendation module is used to determine the products to be recommended based on the product demand descriptions and the weight values ​​corresponding to each search key field.

8. The apparatus according to claim 7, characterized in that, The determining module is used for: Generate a first prompt word containing the product demand description words, wherein the first prompt word is used to indicate the allocation rule of the weight value corresponding to the search keyword; The first prompt word is input into a pre-trained large language model (LLM) to obtain the weight value corresponding to each search key field.

9. A server, characterized in that, The server includes a processor and a memory, the memory storing at least one instruction that is loaded and executed by the processor to perform the operations performed by the product recommendation method as described in any one of claims 1-6.

10. A computer program product, characterized in that, The computer program product stores at least one instruction, which is loaded and executed by a processor to perform the operations performed by the product recommendation method as described in any one of claims 1-6.