Article recommendation method, device and equipment, readable storage medium and program product

By constructing and dividing the largest connected subgraph, combining a large language model with item structured data, we address the problems of low efficiency and insufficient reliability of item recommendations in existing technologies, and achieve fast and accurate product selection in segmented markets and multi-attribute comparison.

CN120687659AActive Publication Date: 2025-09-23HANGZHOU PINGPONG INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510567976.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-30
Publication Date
2025-09-23
Estimated Expiration
2045-04-30

AI Technical Summary

Technical Problem

Existing technologies are unable to quickly identify target subgroups with similar needs, characteristics, or behavioral patterns, and are unable to effectively compare the multiple attributes of multiple similar items, resulting in inefficient and unreliable item recommendations.

Method used

By determining the target text elements of the most fine-grained attributes of items and their normalized attribute labels, a maximum connected subgraph is constructed and divided into multiple target clusters. The query results are output using a large language model and recommended based on the item's structured data.

Benefits of technology

It improves the efficiency and reliability of item recommendations, can quickly find market segments and accurately compare the multiple attributes of multiple similar products, and meet the needs of sellers for quick product selection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120687659A_ABST
    Figure CN120687659A_ABST
Patent Text Reader

Abstract

The invention relates to an article recommendation method and device, equipment, a readable storage medium and a program product. The method comprises the following steps: determining attribute tags corresponding to all target text elements representing the finest granularity attribute information of an article after normalization processing; obtaining a maximum connected sub-graph representing that an association relationship exists between the articles; determining N target nodes from all the nodes according to the centrality value of each node; and respectively taking N target nodes as iteration starting nodes, traversing residual nodes in the connected sub-graphs, and performing iteration division on the maximum connected sub-graph according to the shortest path until the number of clustered nodes meets a preset iteration ending condition, thereby obtaining a relation graph. And inputting relation graph data for determining the to-be-queried article in the relation graph and article structured data determined in the article structured database into the large language model as context information to obtain a query result matched with the inquiry data. By adopting the method, the item recommendation efficiency and reliability can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to an item recommendation method, apparatus, device, readable storage medium, and program product. Background Art

[0002] With the rapid development of e-commerce platforms, to meet the diverse needs of users, they need to process massive amounts of product and user data to enhance their shopping experience and satisfaction. For example, e-commerce platforms need to attract users through precise product selection and recommendations, while users hope to quickly find their desired products by reducing search costs. With the rapid development of artificial intelligence technology, especially the rise of large language models (LLMs), large-scale language models have achieved outstanding performance in understanding human intent and providing rapid responses. Large language models are increasingly being applied to generative question answering.

[0003] In related technologies, the relevant parameters of the products are input into a large language model, which then generates a recommendation solution. However, this technology cannot quickly identify target subgroups with similar needs, characteristics, or behavior patterns, nor can it simultaneously compare the multiple attributes of multiple similar items. Therefore, a method is needed to improve the efficiency and reliability of item recommendations. Summary of the Invention

[0004] Based on this, it is necessary to provide an item recommendation method, device, computer equipment, computer-readable storage medium and computer program product that can improve the efficiency and reliability of item recommendation in order to address the above technical problems.

[0005] In a first aspect, the present application provides an item recommendation method, comprising:

[0006] Determine all target text elements that represent the finest-grained attributes of the item, and the attribute labels corresponding to each of the target text elements after normalization;

[0007] Obtaining a maximum connected subgraph representing the association relationship between the items; each node in the connected subgraph represents an item, and each node has the attribute label;

[0008] Determine the centrality value of each of the nodes, and determine N target nodes from all the nodes according to the centrality value;

[0009] Taking N target nodes as iteration start nodes, traversing the remaining nodes in the connected subgraph, determining the locations of the remaining nodes according to the shortest path, iteratively dividing the largest connected subgraph based on the locations, until the number of nodes in the resulting clusters meets a preset iteration end condition, thereby obtaining multiple target clusters, and determining the relationship graph of the items based on the multiple target clusters;

[0010] Acquire query data of the item to be queried, determine the relationship graph data of the item to be queried from the relationship graph according to the query data, and determine the item structured data of the item to be queried from the item structured database according to the query data;

[0011] The relationship graph data and the item structured data are input into a large language model as context information, and a query result matching the query data is output through the large language model.

[0012] In one embodiment, determining all target text elements representing the finest-grained attributes of an item, and the attribute labels corresponding to each target text element after normalization, includes:

[0013] Get the item information of all items in the preset database;

[0014] Extracting the information of each item using a preset large language model to obtain a target text element of at least one finest-grained attribute of each item;

[0015] A preset prompt word template is obtained, and all the target text elements are merged according to the preset prompt word template to determine a plurality of merged text element sets and attribute labels corresponding to each merged element set; each merged text element set includes at least two target text elements.

[0016] In one embodiment, the locations of the remaining nodes are determined according to the shortest path, and the maximum connected subgraph is iteratively divided based on the locations until the number of nodes in the clusters obtained after the division meets a preset iteration end condition, thereby obtaining multiple target clusters, including:

[0017] Taking each target node as an iteration start node, determining the path distance between each iteration start node and the remaining nodes in the maximum connected subgraph except the target node;

[0018] Based on the path distance, determining the affiliation between the remaining nodes and each of the target nodes according to the shortest path, and obtaining N estimated clusters;

[0019] If the number of nodes in each of the estimated clusters meets the preset iteration end condition, the estimated cluster is determined as the target cluster;

[0020] If the number of nodes in the target estimated cluster in the estimated cluster does not meet the preset iteration end condition, then for the target estimated cluster, the steps of determining the centrality value of each node and determining N target nodes from all the nodes according to the centrality value are performed until the number of nodes in the cluster obtained after division meets the preset iteration end condition, and multiple target clusters are obtained.

[0021] In one embodiment, the method further comprises:

[0022] For each target cluster, determine the proportion of the target attribute label in each target cluster;

[0023] Aggregating all the target subgroups according to the proportion values ​​to obtain multiple complete subgroups; each of the complete subgroups includes a complete association relationship between the items;

[0024] The relationship graph is updated according to the complete cluster.

[0025] In one embodiment, determining, for each target cluster, a proportion of target attribute labels in each target cluster includes:

[0026] For each target cluster, determine the number of target attribute labels in the target cluster and the total number of attribute labels in the target cluster;

[0027] The proportion of the target attribute tag is determined according to the number of tags and the total number of attribute tags.

[0028] In one embodiment, aggregating all the target clusters according to the proportion values ​​to obtain multiple complete clusters includes:

[0029] For all the target clusters, if a first proportion value exists among the multiple proportion values, and the first proportion value is within a first preset range, all first nodes corresponding to the first proportion value are determined as an independent complete cluster;

[0030] If there is a second proportion value within the second preset range and a third proportion value within the third preset range among the multiple proportion values, all second nodes corresponding to the second proportion value are split to obtain independent nodes, and all the split second nodes are divided by all third nodes corresponding to the third proportion value to obtain independent complete clusters.

[0031] In a second aspect, the present application further provides an item recommendation device, comprising:

[0032] A normalization processing module, used to determine all target text elements that represent the finest-grained attributes of an item, and the attribute labels corresponding to each target text element after normalization processing;

[0033] A data acquisition module is used to obtain a maximum connected subgraph representing the association relationship between the items; each node in the connected subgraph represents an item, and each node has the attribute label;

[0034] A subgraph partitioning module is used to determine the centrality value of each node, and determine N target nodes from all the nodes according to the centrality value;

[0035] Taking N target nodes as iteration start nodes, traversing the remaining nodes in the connected subgraph, determining the locations of the remaining nodes according to the shortest path, iteratively dividing the largest connected subgraph based on the locations, until the number of nodes in the resulting clusters meets a preset iteration end condition, thereby obtaining multiple target clusters, and determining the relationship graph of the items based on the multiple target clusters;

[0036] a question-answering processing module, configured to obtain query data of an item to be queried, and determine relationship graph data of the item to be queried from the relationship graph according to the query data;

[0037] The relationship graph data is input into a large language model as context information, and a query result matching the query data is output through the large language model.

[0038] In a third aspect, the present application further provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any one of the methods described above when executing the computer program.

[0039] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of any of the above methods when executed by a processor.

[0040] In a fifth aspect, the present application also provides a computer program product, comprising a computer program, which implements the steps of any of the methods described above when executed by a processor.

[0041] The above-mentioned item recommendation method, device, computer equipment, computer-readable storage medium and computer program product normalize the target text elements of the minimum granularity attribute information of the item to obtain the attribute labels corresponding to each normalization, that is, obtain the mapping relationship between each target text element and the normalized attribute label. This method avoids the problem of complex item categories and unclear classification boundaries; on this basis, by splitting and reorganizing the maximum connected subgraph representing the association relationship of the items, a preset number of target clusters are obtained, and a relationship graph of the items is constructed. Then, the relationship graph data of the item to be queried is determined from the relationship graph based on the query data; the relationship graph data and the item structured data are input into the large language model as context information, and the large language model outputs the query results that match the query data, meeting the needs of sellers to quickly find market segments and compare the multiple attributes of multiple similar products at the same time, thereby improving the efficiency and accuracy of product selection. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following briefly introduces the drawings required for use in the embodiments of the present application or related technical descriptions. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying any creative work.

[0043] Figure 1 A diagram of an application environment of an item recommendation method in one embodiment;

[0044] Figure 2 A schematic flow chart of an item recommendation method according to an embodiment;

[0045] Figure 3 202 is a flow chart of step 202 in one embodiment;

[0046] Figure 4 Schematic diagram of a flow chart of a method for splitting a connected subgraph in one embodiment;

[0047] Figure 5 A schematic flow chart of an item recommendation method according to another embodiment;

[0048] Figure 6 is a structural block diagram of an item recommendation device in one embodiment;

[0049] Figure 7 FIG. 1 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0050] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0051] KAG (Knowledge-Augmented Generation): A technique that enhances the accuracy and relevance of generated content by integrating external knowledge bases.

[0052] RAG (Retrieval-Augmented Generation): A method that combines a retrieval system and a generative model to first retrieve relevant information and then generate answers, thereby improving the accuracy of the output facts.

[0053] LLM (Large Language Model): A deep learning model based on large-scale parameters and training data that can understand and generate human-like natural language text.

[0054] NL2SQL (Natural Language to SQL): Technology that automatically converts natural language queries into structured SQL query statements, enabling non-technical users to interact with the database through everyday language.

[0055] Amazon has nearly 20,000 subcategories, and some products are mixed and have unclear boundaries. To help customers better identify blue ocean markets, further product classification is necessary. For example, the bird toy category needs to be further subdivided into parrot toys, chicken toys, marking tools, brackets, props, etc., and the relevance of products needs to be determined to determine whether the subdivision is a red ocean or blue ocean market.

[0056] In related technologies, the relevant parameters of the product are input into a large language model, and a recommendation solution is generated by the large language model. However, this solution has low product selection efficiency and reliability, and cannot meet the needs of sellers to quickly find market segments and compare multiple attributes of multiple similar products at the same time. Therefore, a product relationship graph question-and-answer product selection system based on KAG is proposed. The system can query basic product information and related information based on natural language, and conduct questions and answers based on this information, greatly improving the product selection efficiency and experience.

[0057] The item recommendation method provided in the embodiment of the present application can be applied to Figure 1In the application environment shown, the terminal 102 communicates with the server 104 via a network. The data storage system can store data that the server 104 needs to process. The data storage system can be integrated on the server 104 or placed on the cloud or other network servers. The terminal obtains item information of an item from a server, and based on the item information, determines all target text elements representing the finest-grained attributes of the item, as well as the attribute labels corresponding to each target text element after normalization; obtains a maximum connected subgraph representing the association relationship between items; each node in the connected subgraph represents an item, and each node has an attribute label; determines the centrality value of each node, and determines N target nodes from all nodes based on the centrality value; uses the N target nodes as iteration start nodes, traverses the remaining nodes in the connected subgraph, determines the location of the remaining nodes according to the shortest path, and iteratively divides the maximum connected subgraph based on the location until the number of nodes in the resulting clusters meets a preset iteration end condition, thereby obtaining multiple target clusters, and determining a relationship graph of the item based on the multiple target clusters; obtains query data of the item to be queried, determines relationship graph data of the item to be queried from the relationship graph based on the query data, and determines item structured data of the item to be queried from an item structured database based on the query data; inputs the relationship graph data and item structured data as context information into a large language model, and outputs a query result matching the query data through the large language model.

[0058] The terminal 102 may be, but is not limited to, various personal computers, laptops, smartphones, tablet computers, IoT devices, and portable wearable devices. The server 104 may be an independent physical server, a server cluster or distributed system consisting of multiple physical servers, or a cloud server providing cloud computing services.

[0059] In an exemplary embodiment, Figure 2 As shown, an item recommendation method is provided, which is applied to Figure 1 The terminal in FIG is taken as an example to illustrate, including the following steps 202 to 212. Among them:

[0060] Step 202 : Determine all target text elements that represent the finest-grained attributes of the item, and the attribute labels corresponding to each target text element after normalization.

[0061] The target text element can be understood as the core keyword phrase that represents the smallest granular attribute information for an item. It's important to note that multiple attribute descriptions for the same dimension can exist for the same item. This is to avoid confusion between item categories and unclear boundaries, which can hinder accurate recommendation. For example, consider sneakers, whose uppers are primarily made of mesh and leather. Different sellers may offer "mesh + leather," "leather and mesh," "breathable mesh with leather," "mesh and leather combination," and "leather and mesh upper." If an e-commerce platform categorizes "mesh + leather" as "mesh" and "leather and mesh" as "leather," searches may fail to find these shoes, and it will be impossible to accurately determine whether "mesh and leather combination" and "leather and mesh" are made of the same material. Furthermore, when LLM is used to merge and normalize target text elements, attributes within the target text element containing multiple sub-attributes are split to the finest granularity, such as splitting "mesh + leather" into two granular attributes: mesh and leather.

[0062] For another example, taking color as an example, white may have different descriptions such as gray-white, light-white, and a combination of gray and white. Due to the different descriptions, different attributes are difficult to normalize. Furthermore, when LLM is used to merge and normalize the target text elements, gray and white cannot be further split because gray and white are combined attributes. Based on this, it is necessary to normalize each target text element. Normalization can be understood as deduplicating the target text elements belonging to the same item subcategory and then merging them to obtain a mapping relationship between the original key information (i.e., the target text element) and the merged key information. The merged key information is the normalized attribute label. It should be noted that the target text element normalization method can be implemented through existing methods, which will not be elaborated here.

[0063] Step 204 : Obtain a maximum connected subgraph representing the association relationship between items; each node in the connected subgraph represents an item, and each node has an attribute label.

[0064] Among them, the maximum connected subgraph can be a relationship graph constructed by the e-commerce platform in a collaborative filtering manner, which represents the association relationship between items and similar items. The specific method of determining the maximum connected subgraph is achieved through existing implementations and will not be repeated here. The attribute label is determined based on the merged key information obtained after merging the target text elements determined above. Among them, the relationship between asin and attribute label can be one-to-many. The product attributes are generally at the asin granularity, that is, the sku variant granularity. For example, the item is a water cup, and its asin is xxx. The water cup has three colors (red, blue, white) and three sizes (S, M, L), so there will be 9 sku variant granularities. The relationship between the target text element and the attribute label can be one-to-many. Since LLM merges the target text element, the attributes containing multiple sub-attributes in the target text element will be split into the finest granularity.

[0065] It's important to note that similar item recommendations on e-commerce platforms collect millions of edge relationships daily, and the largest connected subgraph has over 10,000 nodes. This can lead to an overwhelming amount of information in the graph, sparse connections between nodes, and a significant increase in the complexity of computing connectivity, similarity, and paths. This can require significant computing resources, ultimately resulting in unreliable and inefficient item recommendations. Therefore, it's necessary to split the largest connected subgraph.

[0066] Step 206: Determine the centrality value of each node, and determine N target nodes from all nodes based on the centrality value.

[0067] The centrality value may be determined by adding the in-degree and out-degree of each node, or by other methods. The attribute labels of the N target nodes are different.

[0068] For example, the centrality value of each node is calculated, the maximum connected subgraph is partitioned, the total number of clusters N is estimated based on the N nodes in each cluster, and the top N target nodes with different attribute labels corresponding to their centrality values ​​are determined from all nodes based on their centrality values. This includes the maximum distribution interval of hot products, the length limit of the LLM context, and the upper limit of products that can be compared simultaneously.

[0069] In step 208, N target nodes are used as the iteration start nodes, and the remaining nodes in the connected subgraph are traversed. The locations of the remaining nodes are determined according to the shortest path, and the largest connected subgraph is iteratively divided based on the locations until the number of nodes in the cluster after division meets the preset iteration end condition, thereby obtaining multiple target clusters, and determining the relationship graph of the items based on the multiple target clusters.

[0070] The shortest path determination method may be implemented using the Dijkstra shortest path algorithm. The preset iteration termination condition includes pausing the iteration if the number of cluster nodes exceeds a preset number, which indicates that the market corresponding to the cluster is saturated.

[0071] Exemplarily, N target nodes are used as the iteration starting nodes, and the locations of the remaining nodes except the N target nodes in the maximum connected subgraph are determined according to the Dijkstra shortest path algorithm until all the remaining nodes have their corresponding locations, completing the initial division of the maximum connected subgraph. If the number of nodes in all clusters of the estimated total number of clusters N obtained by the initial division meets the preset iteration end condition, the iteration is terminated, and multiple target clusters are obtained, and the relationship graph of the items is determined based on the multiple target clusters.

[0072] If the number of nodes in all clusters of the estimated total number N of clusters obtained by the initial division does not meet the preset iteration end condition, the centrality value of each cluster determined by the divided nodes is recalculated, and the step of selecting N target nodes with different attribute labels corresponding to the topN centrality values ​​is performed to determine the belonging position of each node, until the number of nodes in the cluster obtained after the division meets the preset iteration end condition, and multiple target clusters are obtained.

[0073] Step 210 , obtaining query data of the item to be queried, determining the relationship graph data of the item to be queried from the relationship graph according to the query data, and determining the item structured data of the item to be queried from the item structured database.

[0074] The query data may include items associated with the item to be queried, average prices of items associated with the item to be queried, sales data of items associated with the item to be queried, feature analysis data of items associated with the item to be queried, or at least one of the market segments according to which demand dimensions the items associated with the item to be queried can be divided.

[0075] The item structured database can be understood as a knowledge graph based on item information. It includes basic item attribute information, such as basic product profile information written based on the basic information of the ASIN (Associated Product Indicator), including ASIN, pasin, most-visited keywords, sales volume in the past 30 days, and other basic information. It should be noted that product attributes are generally specified at the ASIN level, or SKU variant level. Pasin is a product concept; for example, a cup corresponds to a pasin, and different colors correspond to different ASINs.

[0076] For example, query data for the item being searched is obtained and converted into a Cy query statement based on the LLM. The Cy query statement is then used to determine the relationship graph data for the item being searched from the relationship graph. The query data is then converted into an SQL query statement based on the NL2SQL prompt word template. Based on this SQL query statement, the structured item data for the item being searched is retrieved from the structured item database. The prompt word template includes the query scope and query quantity limit for the SQL query statement. The query scope and query quantity limit for the SQL query statement can be based on the selection of the top k retrieval results in the RAG. Generally, the recall phase selects the top 2 k items, while the ranking phase selects the top k items in the context.

[0077] In step 212, the relationship graph data and the item structured data are input into the large language model as context information, and the large language model outputs a query result that matches the query data.

[0078] Optionally, the query data is for obtaining items related to the item to be queried, and the corresponding output query result is a relationship graph; the query data is the average price of items related to the item to be queried, and the corresponding output is a relationship graph and structured data statistics; the query data is the sales data of items related to the item to be queried, and the corresponding output is a relationship graph and structured data statistics sales; the query data is feature analysis data of items related to the item to be queried, and the corresponding output is a relationship graph, structured data, and analysis data of a large language model.

[0079] Exemplarily, the relationship graph data and item structured data are integrated as context information, and the context information and query data are used as a complete input to the large language model to perform rag retrieval and question answering, and output query results that match the query data.

[0080] The above-mentioned item recommendation method normalizes the target text elements of the item's minimum granularity attribute information to obtain the attribute labels corresponding to each normalization, that is, obtains the mapping relationship between each target text element and the normalized attribute label. This method avoids the problem of complex item categories and unclear classification boundaries. On this basis, by splitting and reorganizing the maximum connected subgraph representing the item association relationship, a preset number of target clusters are obtained, and a relationship graph of the items is constructed. Then, the relationship graph data of the item to be queried is determined from the relationship graph based on the query data. By dividing the maximum connected subgraph, the complexity of the graph is simplified and the amount of data processing is reduced. Compared with directly using a large language model to achieve recommendation, the relationship graph data is input into the large language model as context information, and the large language model outputs query results that match the query data. That is, by integrating an external knowledge base to enhance the accuracy of generated content, the efficiency of product selection is improved, and the needs of sellers to quickly find market segments and compare the multiple attributes of multiple similar products at the same time are met.

[0081] In an exemplary embodiment, Figure 3 As shown, step 202 includes steps 302 to 306 .

[0082] in:

[0083] Step 302: Obtain item information of all items in a preset database.

[0084] Item information includes item descriptions, which are used on e-commerce platforms to describe item features. These descriptions can include the product's core functions or main features, its materials or quality information, applicable scenarios or target audience, additional information or services, and user reviews. By describing the item as a commodity, we obtain a five-point product description.

[0085] For example, a market analysis tool based on big data analysis and artificial intelligence algorithms is used to obtain the relationship between product descriptions and keywords in segmented markets. Based on the relationship between product descriptions and keywords, a large language model (e.g., Qwen2.5) is further trained through SFT (Supervised Fine-Tuning) to enable it to better understand and process product information, thereby obtaining a trained large language model LLM.

[0086] Step 304 : extract information about each item using a preset large language model to obtain a target text element of at least one finest-grained attribute of each item.

[0087] For example, the trained large language model is used to extract the target text elements of the finest-grained attributes of each item from the five-point description, that is, to extract key short sentences for representing the item information.

[0088] Step 306: Obtain a preset prompt word template, merge all target text elements according to the preset prompt word template, determine multiple merged text element sets, and attribute labels corresponding to each merged element set; each merged text element set includes at least two target text elements.

[0089] Among them, the preset prompt word template includes a merging strategy and output format requirements for the merged data. The merging strategy may include merging target text elements whose similarity is within a preset numerical range, merging invalid target text elements or target text elements that cannot be classified into other categories, and controlling the number of characters of the merged target text elements within a preset number range. The output format requirements include returning the processing results in JSON format, and the processing results include original key information and merged key information. The merged key information here refers to the attribute labels determined after normalization processing of the target text elements whose similarity is within a preset numerical range. The original key information refers to the target text elements. Exemplarily, a preset prompt word template is obtained, and the target text elements whose similarity is within a preset numerical range are determined according to the preset prompt word template, that is, the batch is divided according to the words that hit the same. If a single batch is too large, it is randomly and evenly split multiple times according to the LLMtoken context restriction to obtain multiple merged text element sets that meet the text length restriction, and the attribute labels corresponding to each merged element set, that is, the mapping relationship between the target text elements and the attribute labels of the normalized description is obtained. This mapping relationship can be expressed as:

[0090] {asin1:[tag1, tag2], asin2:[tag1, tag3, tag4]}, where asin1 and asin2 represent different attribute tags, respectively. The target text elements that are mapped to asin1 include tag1 and tag2, and the target text elements that are mapped to asin2 include tag1, tag3, and tag4. In this embodiment, the target text elements with the finest granularity of attributes are extracted. The extracted target text elements are then merged in batches within the same subcategory by a large language model to obtain the attribute tags corresponding to each target text element. This achieves normalization of the attribute information and avoids the situation where item categories are mixed and boundaries are unclear.

[0091] It should be noted that when e-commerce platforms recommend similar products, the number of edge relationships collected from data sources associated with the products reaches millions every day, and the maximum number of connected subgraph nodes exceeds 10,000. Product recommendations based on this will have the problem of low efficiency. Therefore, how to further split the connected subgraph is a technical problem that needs to be solved urgently.

[0092] In an exemplary embodiment, a method for splitting a connected subgraph is provided, such as Figure 4 As shown, the following steps are included:

[0093] Step 402: Determine the centrality value of each node, and determine N target nodes from all nodes based on the centrality value.

[0094] Step 404 : Taking each target node as an iteration start node, determine the path distance between each iteration start node and the remaining nodes in the maximum connected subgraph excluding the target node.

[0095] Step 406: Based on the path distance, determine the affiliation between the remaining nodes and each target node according to the shortest path to obtain N estimated clusters; if the number of nodes in each estimated cluster meets the preset iteration end condition, the estimated cluster is determined as the target cluster.

[0096] Step 408: If the number of nodes in the target estimated cluster in the estimated cluster does not meet the preset iteration end condition, then for the target estimated cluster, the steps of determining the centrality value of each node and determining N target nodes from all nodes according to the centrality value are performed until the number of nodes in the cluster obtained after division meets the preset iteration end condition, and multiple target clusters are obtained.

[0097] The above-mentioned method of splitting the connected subgraph determines the centrality values ​​of the nodes in the connected subgraph, and determines multiple target nodes as the iteration starting nodes of the clusters. The locations of the remaining nodes in the connected subgraph are determined according to the shortest distance. After completing a round of iteration, if the current clusters all meet the preset iteration end conditions, the iteration is terminated. If not, the clusters that do not meet the preset iteration end conditions are iterated according to the same iteration principle until the number of nodes in the clusters after division meets the preset iteration end conditions. The division and re-merging of the connected subgraph are completed. Division in this way can obtain clusters that meet the requirements of item segmentation. In the case of recommendation, the problems of excessive calculation and errors in edges that lead to low recommendation efficiency and accuracy can be avoided.

[0098] It is understandable that some items in a connected subgraph may not be directly related due to the recommendation algorithm mechanism (collaborative filtering), but they are still recommended; some items may have the same information, but due to collaborative filtering, they are not in the same connected subgraph, which leads to inaccurate item information recommendations. To address this situation, the following methods are provided for decoupling and information association:

[0099] In an exemplary embodiment, for each target cluster, the proportion of the target attribute label in each target cluster is determined; all target clusters are aggregated according to the proportion to obtain multiple complete clusters; each complete cluster includes the complete association relationship between items, and the relationship graph is updated according to the complete cluster.

[0100] The percentage is determined based on the number of target attribute labels in the target cluster and the total number of attribute labels in the target cluster. The number of target attribute labels refers to the number of attribute labels that are hit by the target text element of the node. Each target cluster can include multiple attribute labels, and accordingly, there will be multiple percentage values. The aggregation strategy is determined based on the multiple percentage values ​​of each target cluster and the preset indicator range.

[0101] Optionally, in an exemplary embodiment, for each target cluster, determining the proportion of the target attribute label in each target cluster includes: for each target cluster, determining the number of target attribute labels in the target cluster and the total number of attribute labels in the target cluster; and determining the proportion of the target attribute label based on the number of labels and the total number of attribute labels. The target attribute label can be the attribute label with the most label hits. The proportion can be determined by:

[0102]

[0103] The aggregation strategy is determined based on the multiple proportion values ​​of each target cluster and the preset indicator range. That is, all target clusters are aggregated according to the proportion values ​​to obtain multiple complete clusters, including:

[0104] For all target clusters, if a first proportion value exists in multiple label centrality indicators and the first proportion value is within a first preset range, all first nodes corresponding to the first proportion value are determined as an independent complete cluster;

[0105] If multiple label centrality indicators have a second proportion value within a second preset range and a third proportion value within a third preset range, all second nodes corresponding to the second proportion value are split to obtain independent nodes, and all the split second nodes are divided by all third nodes corresponding to the third proportion value to obtain independent complete clusters.

[0106] Among them, different preset ranges are used to characterize the completeness of the node relationship in the cluster within the corresponding range. The first preset range is larger than the third preset range, and the second preset range is smaller than the third preset range. The first proportion value within the first preset range can indicate that the corresponding target cluster, i.e., the subgraph, has good self-organization, and has decoupled the recommendation algorithm mechanism (collaborative filtering) to recommend item information that has no direct association, and associates some associated information that is not determined to exist in the connected subgraph. Part of the associated information may be some cold-start items, such as goods on an e-commerce platform that lack a preset amount of user interaction data (such as purchase, browsing, evaluation, etc.). The goods may be newly added, so there is a lack of collaborative filtering recommendation mechanism for such items, so they need to be supplemented by the edge relationship of the product information relationship graph.

[0107] The second proportion within the second preset range indicates that the corresponding target cluster, i.e., the subgraph, is poorly organized, has no decoupled information, and has not associated some associated information that is not determined to exist in the connected subgraph. The third proportion within the third preset range indicates that the corresponding target cluster, i.e., the subgraph, has decoupled the recommendation algorithm mechanism (collaborative filtering), resulting in the recommendation of item information that has no direct association, or has associated some associated information that is not determined to exist in the connected subgraph. All second nodes corresponding to the second proportion value are split to obtain independent nodes, and all the split second nodes are divided by all the third nodes corresponding to the third proportion value to obtain independent complete clusters. This can be an attempt to re-attribute these independent nodes according to the center label until each obtains a new cluster.

[0108] In the above method, by determining the proportion of attribute labels in each target group, decoupling the recommendation algorithm mechanism to recommend items that have no direct association, and associating some related information that is not determined to exist in the connected subgraph, different types of items are segmented and the same items are reorganized, a detailed comparison of multiple competing products can be achieved, which greatly improves the efficiency of product selection and ensures the reliability of product selection.

[0109] In an exemplary embodiment, Figure 5 As shown, an item recommendation method is provided, which is applied to Figure 1 The terminal in FIG is taken as an example to illustrate, including the following steps 502 to 516. Among them:

[0110] Step 502 : Determine all target text elements that represent the finest-grained attribute information of the item, and the attribute labels corresponding to each target text element after normalization.

[0111] Step 504: Obtain a maximum connected subgraph representing the association relationship between items; each node in the connected subgraph represents an item, and each node has an attribute label.

[0112] Step 506: Determine the centrality value of each node, and determine N target nodes from all nodes based on the centrality value.

[0113] In step 508, N target nodes are used as the iteration start nodes, and the remaining nodes in the connected subgraph are traversed. The locations of the remaining nodes are determined according to the shortest path, and the largest connected subgraph is iteratively divided based on the locations until the number of nodes in the cluster after division meets the preset iteration end condition, thereby obtaining multiple target clusters, and determining the relationship graph of the items based on the multiple target clusters.

[0114] Step 510: For each target cluster, determine the proportion of the target attribute label in each target cluster.

[0115] Step 512: Aggregate all target clusters according to the proportion values ​​to obtain multiple complete clusters; each complete cluster includes the complete association relationship between items, and update the relationship graph based on the complete clusters.

[0116] Step 514 , obtaining query data of the item to be queried, determining the relationship graph data of the item to be queried from the relationship graph according to the query data, and determining the item structured data of the item to be queried from the item structured database according to the query data.

[0117] In step 516, the relationship graph data and the item structured data are input into the large language model as context information, and the large language model outputs a query result that matches the query data.

[0118] It should be noted that the specific implementation of this embodiment can be achieved through the above-mentioned limited methods, which will not be described in detail here.

[0119] In the above embodiment, by normalizing the target text elements of the item's minimum granularity attribute information, the corresponding attribute labels after normalization are obtained, that is, the mapping relationship between each target text element and the normalized attribute label is obtained. This method avoids the problem of complex item categories and unclear classification boundaries. On this basis, a relationship graph is constructed based on the maximum connected subgraph of items and similar items, and the item structured database is determined as a knowledge graph. In combination with the KAG method, intelligent question and answer are performed. The relationship graph data and item structured data are input into the large language model as context information. The large language model outputs query results that match the query data, meeting the needs of sellers to quickly find market segments and simultaneously compare the multiple attributes of multiple similar products, thereby improving product selection efficiency and accuracy. Relevant results can be obtained quickly and accurately. In practical applications, it can quickly locate and find blue ocean products in the red ocean of market segments, improving product selection efficiency and accuracy.

[0120] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the instructions of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above can include multiple steps or multiple stages, and these steps or stages are not necessarily executed and completed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of steps or stages in other steps.

[0121] Based on the same inventive concept, embodiments of the present application also provide an item recommendation device for implementing the aforementioned item recommendation method. The solution provided by this device is similar to the solution described in the aforementioned method. Therefore, the specific limitations of one or more item recommendation device embodiments provided below can be found in the limitations of the item recommendation method above and will not be repeated here.

[0122] In an exemplary embodiment, Figure 6 As shown, an item recommendation device is provided, comprising: a normalization processing module 602, a data acquisition module 604, a subgraph partitioning module 606, and a question-answering processing module 608, wherein:

[0123] The normalization processing module 602 is used to determine all target text elements that represent the finest-grained attributes of an item, and the attribute labels corresponding to each target text element after normalization processing.

[0124] The data acquisition module 604 is used to obtain a maximum connected subgraph representing the association relationship between items; each node in the connected subgraph represents an item, and each node has an attribute label.

[0125] The subgraph partitioning module 606 is used to determine the centrality value of each node and determine N target nodes from all nodes based on the centrality value; take the N target nodes as the iteration starting nodes, traverse the remaining nodes in the connected subgraph, determine the belonging positions of the remaining nodes according to the shortest path, and iteratively divide the largest connected subgraph based on the belonging positions until the number of nodes in the cluster obtained after the division meets the preset iteration end condition, thereby obtaining multiple target clusters, and determining the relationship map of the items based on the multiple target clusters.

[0126] The question-answer processing module 608 is used to obtain query data of the item to be queried, determine the relationship graph data of the item to be queried from the relationship graph based on the query data, and determine the item structured data of the item to be queried from the item structured database based on the query data; input the relationship graph data and the item structured data into the large language model as context information, and output the query results that match the query data through the large language model.

[0127] The above-mentioned item recommendation device normalizes the target text elements of the item's minimum granularity attribute information to obtain the attribute labels corresponding to each normalization, that is, obtains the mapping relationship between each target text element and the normalized attribute label. This method avoids the problem of complex item categories and unclear classification boundaries; on this basis, by splitting and reorganizing the maximum connected subgraph representing the item association relationship, a preset number of target clusters are obtained, and a relationship graph of the items is constructed. Then, the relationship graph data of the item to be queried is determined from the relationship graph based on the query data; the relationship graph data and the item structured data are input into the large language model as context information, and the large language model outputs the query results that match the query data, meeting the needs of sellers to quickly find market segments and compare the multiple attributes of multiple similar products at the same time, thereby improving the efficiency and accuracy of product selection.

[0128] In an exemplary embodiment, the normalization processing module 602 is further configured to obtain item information of all items in a preset database;

[0129] Extracting information about each item using a preset large language model to obtain a target text element representing at least one fine-grained attribute of each item;

[0130] A preset prompt word template is obtained, and all target text elements are merged according to the preset prompt word template to determine multiple merged text element sets and attribute labels corresponding to each merged element set; each merged text element set includes at least two target text elements.

[0131] In an exemplary embodiment, the subgraph partitioning module 606 is further configured to use each target node as an iteration start node and determine the path distance between the remaining nodes in the maximum connected subgraph excluding the target node and each iteration start node;

[0132] Based on the path distance, the relationship between the remaining nodes and each target node is determined according to the shortest path, and N estimated clusters are obtained;

[0133] If the number of nodes in each estimated cluster meets the preset iteration end condition, the estimated cluster is determined as the target cluster;

[0134] If the number of nodes in the target estimated cluster in the estimated cluster does not meet the preset iteration end condition, then for the target estimated cluster, the steps of determining the centrality value of each node and determining N target nodes from all nodes according to the centrality value are executed until the number of nodes in the cluster obtained after division meets the preset iteration end condition, and multiple target clusters are obtained.

[0135] In an exemplary embodiment, the item recommendation device further includes a subgraph merging module, which is configured to determine, for each target cluster, a proportion of target attribute labels in each target cluster;

[0136] All target clusters are aggregated according to their proportions to obtain multiple complete clusters; each complete cluster includes the complete association relationship between items, and the relationship graph is updated based on the complete clusters.

[0137] In an exemplary embodiment, the subgraph merging module is configured to determine, for each target cluster, the number of target attribute labels in the target cluster and the total number of attribute labels in the target cluster;

[0138] Determine the proportion of the target attribute label based on the number of labels and the total number of attribute labels.

[0139] In an exemplary embodiment, the subgraph merging module is configured to, for all target clusters, if a first proportion value exists among the multiple proportion values ​​and the first proportion value is within a first preset range, determine all first nodes corresponding to the first proportion value as an independent complete cluster;

[0140] If there is a second proportion value within the second preset range and a third proportion value within the third preset range among the multiple proportion values, all second nodes corresponding to the second proportion value are split to obtain independent nodes, and all the split second nodes are divided by all third nodes corresponding to the third proportion value to obtain independent complete clusters.

[0141] Each module in the aforementioned item recommendation device may be implemented in whole or in part through software, hardware, or a combination thereof. Each module may be embedded in or independent of a processor within a computer device in the form of hardware, or may be stored in a computer device memory in the form of software, so that the processor can call and execute the corresponding operations of each module.

[0142] In an exemplary embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in FIG. Figure 7As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface, the display unit and the input device are connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, a mobile cellular network, near field communication (NFC) or other technologies. When the computer program is executed by the processor, an item recommendation method is implemented. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device casing, or an external keyboard, touchpad or mouse.

[0143] Those skilled in the art will understand that Figure 7 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0144] In one embodiment, a computer device is further provided, including a memory and a processor. The memory stores a computer program, and the processor implements the steps in the above method embodiments when executing the computer program.

[0145] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0146] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0147] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0148] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, database or other media used in the embodiments provided in this application may include at least one of non-volatile memory and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory may include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, distributed databases based on blockchains. The processor involved in the various embodiments provided herein may be, but are not limited to, a general-purpose processor, a central processing unit (CPU), a graphics processing unit (GPU), a digital signal processor (DSP), a programmable logic unit (PLC), a data processing logic unit based on quantum computing, an artificial intelligence (AI) processor, and the like.

[0149] The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0150] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.

Claims

1. An item recommendation method, characterized in that: The method comprises: Determine all target text elements representing the finest-grained attribute information of the item, and the attribute labels corresponding to each of the target text elements after normalization; Obtaining a maximum connected subgraph representing the association relationship between the items; each node in the connected subgraph represents an item, and each node has the attribute label; Determine the centrality value of each of the nodes, and determine N target nodes from all the nodes according to the centrality value; Taking N target nodes as iteration start nodes, traversing the remaining nodes in the connected subgraph, determining the locations of the remaining nodes according to the shortest path, iteratively dividing the largest connected subgraph based on the locations, until the number of nodes in the resulting clusters meets a preset iteration end condition, thereby obtaining multiple target clusters, and determining the relationship graph of the items based on the multiple target clusters; Acquire query data of the item to be queried, determine the relationship graph data of the item to be queried from the relationship graph according to the query data, and determine the item structured data of the item to be queried from the item structured database according to the query data; The relationship graph data and the item structured data are input into a large language model as context information, and a query result matching the query data is output through the large language model.

2. The method according to claim 1, characterized in that The step of determining all target text elements representing the finest-grained attributes of an item, and the attribute labels corresponding to each target text element after normalization, includes: Get the item information of all items in the preset database; Extracting the information of each item using a preset large language model to obtain a target text element of at least one finest-grained attribute of each item; A preset prompt word template is obtained, and all the target text elements are merged according to the preset prompt word template to determine a plurality of merged text element sets and attribute labels corresponding to each merged element set; each merged text element set includes at least two target text elements.

3. The method according to claim 1, characterized in that The determining of the locations of the remaining nodes according to the shortest path, iteratively dividing the maximum connected subgraph based on the locations until the number of nodes in the clusters obtained after the division meets a preset iteration end condition, and obtaining multiple target clusters, including: Taking each target node as an iteration start node, determining the path distance between each iteration start node and the remaining nodes in the maximum connected subgraph except the target node; Based on the path distance, determining the affiliation between the remaining nodes and each of the target nodes according to the shortest path, and obtaining N estimated clusters; If the number of nodes in each of the estimated clusters meets the preset iteration end condition, the estimated cluster is determined as the target cluster; If the number of nodes in the target estimated cluster in the estimated cluster does not meet the preset iteration end condition, then for the target estimated cluster, the steps of determining the centrality value of each node and determining N target nodes from all the nodes according to the centrality value are performed until the number of nodes in the cluster obtained after division meets the preset iteration end condition, and multiple target clusters are obtained.

4. The method according to any one of claims 1 to 3, characterized in that The method further comprises: For each target cluster, determine the proportion of the target attribute label in each target cluster; Aggregating all the target subgroups according to the proportion values ​​to obtain multiple complete subgroups; each of the complete subgroups includes a complete association relationship between the items; The relationship graph is updated according to the complete cluster.

5. The method according to claim 4, characterized in that The determining, for each target cluster, a proportion of target attribute labels in each target cluster includes: For each target cluster, determine the number of target attribute labels in the target cluster and the total number of attribute labels in the target cluster; The proportion of the target attribute tag is determined according to the number of tags and the total number of attribute tags.

6. The method according to claim 4, characterized in that The step of aggregating all the target clusters according to the proportion values ​​to obtain multiple complete clusters includes: For all the target clusters, if a first proportion value exists among the multiple proportion values, and the first proportion value is within a first preset range, all first nodes corresponding to the first proportion value are determined as an independent complete cluster; If there is a second proportion value within the second preset range and a third proportion value within the third preset range among the multiple proportion values, all second nodes corresponding to the second proportion value are split to obtain independent nodes, and all the split second nodes are divided by all third nodes corresponding to the third proportion value to obtain independent complete clusters.

7. An item recommendation device, characterized in that: The device comprises: A normalization processing module, used to determine all target text elements that represent the finest-grained attributes of an item, and the attribute labels corresponding to each target text element after normalization processing; A data acquisition module is used to obtain a maximum connected subgraph representing the association relationship between the items; each node in the connected subgraph represents an item, and each node has the attribute label; A subgraph partitioning module is used to determine the centrality value of each node, and determine N target nodes from all the nodes according to the centrality value; Taking N target nodes as iteration start nodes, traversing the remaining nodes in the connected subgraph, determining the locations of the remaining nodes according to the shortest path, iteratively dividing the largest connected subgraph based on the locations, until the number of nodes in the resulting clusters meets a preset iteration end condition, thereby obtaining multiple target clusters, and determining the relationship graph of the items based on the multiple target clusters; a question-answering processing module, configured to obtain query data of an item to be queried, determine the relationship graph data of the item to be queried from the relationship graph based on the query data, and determine the item structured data of the item to be queried from an item structured database based on the query data; The relationship graph data and the item structured data are input into a large language model as context information, and a query result matching the query data is output through the large language model.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Relational query method implemented on large-scale data set

    CN102332009A

  • Commodity information query method and related equipment based on knowledge graph

    CN119782341A