Commodity information query method and related equipment based on knowledge graph
By constructing multi-layer knowledge graphs and wide dynamic semantic analysis technology, non-precision queries are transformed into cross-layer constraints, the problems of insufficient semantic understanding and lack of timeliness in the existing technology are solved, and the retrieval accuracy and adaptability in complex query scenarios are improved.
Patent Information
- Application Number
- CN202510277959.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-10
- Publication Date
- 2025-05-16
- Estimated Expiration
- 2045-03-10
AI Technical Summary
The existing product information retrieval system has low retrieval accuracy and scenario adaptability in complex query scenarios, mainly due to problems such as insufficient semantic understanding, single data dimensions, and lack of timeliness.
By building a multi-layer knowledge graph, including the basic attribute layer, scene correlation layer and dynamic perception layer, and combining wide dynamic semantic analysis technology, inaccurate queries are transformed into cross-layer constraints to improve semantic understanding and timeliness.
It improves the search accuracy and scenario adaptability in complex query scenarios, can better understand user intentions and provide real-time and multi-dimensional query results.
Smart Images

Figure CN119782341B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of video processing technology, and in particular to a commodity information query method based on a knowledge graph and related equipment. Background Art
[0002] With the rapid development of e-commerce, users' query needs for product information are becoming increasingly diverse and complex. Traditional product information retrieval systems usually implement queries based on keyword matching or single-dimensional attribute screening (such as price, category, etc.), and their underlying layers rely on structured databases or simple knowledge graph modeling. However, such methods have significant limitations. For example: insufficient semantic understanding causes retrieval results to deviate from the user's true intentions, the single data dimension makes it difficult to support the multi-dimensional constraints of complex queries, and the lack of timeliness causes query results to lag behind actual scenarios. Therefore, the existing product information retrieval systems have low retrieval accuracy and scenario adaptability in complex query scenarios. Summary of the invention
[0003] The embodiment of the present invention provides a commodity information query method based on a knowledge graph, aiming to improve the retrieval accuracy and scene adaptability in complex query scenarios. The present invention constructs a multi-layer knowledge graph including a basic attribute layer, a scene association layer and a dynamic perception layer, and combines wide dynamic semantic analysis technology to convert non-precise queries into cross-layer constraints to solve the technical problems of insufficient multi-dimensional semantic understanding, lack of dynamic real-time performance and broken cross-layer associations, thereby improving the retrieval accuracy and scene adaptability in complex query scenarios.
[0004] In a first aspect, an embodiment of the present invention provides a commodity information query method based on a knowledge graph, the method comprising:
[0005] Obtaining the user's query information and determining whether the query information contains accurate query semantics;
[0006] If the query information does not contain precise query semantics, the query information is subjected to wide dynamic semantic analysis in combination with a preset multi-layer commodity knowledge graph to obtain cross-layer constraint conditions for the target commodity. The multi-layer commodity knowledge graph includes a basic attribute layer, a scene association layer, and a dynamic perception layer. The basic attribute layer is used to store the physical attribute relationship between entities, the scene association layer is used to store the commodity connectivity relationship between commodity scenes, and the dynamic perception layer is used to store real-time updated price, inventory, and user behavior derivative relationships.
[0007] Based on the cross-layer constraint condition, query target product information corresponding to the target product;
[0008] The target product information is returned to the user.
[0009] Optionally, before the step of performing wide dynamic semantic analysis on the query information in combination with a preset multi-layer commodity knowledge graph, the method further includes:
[0010] Get dynamic product information and static product information of different products;
[0011] Based on the static commodity information, physical attribute relationships between entities are extracted to construct the basic attribute layer;
[0012] And, based on the static commodity information, extract the commodity connectivity relationship between commodity scenes to construct the scene association layer;
[0013] Based on the dynamic commodity information, the real-time updated price, inventory and user behavior derivative relationship are extracted to construct the dynamic perception layer.
[0014] Optionally, the step of performing wide dynamic semantic analysis on the query information in combination with a preset multi-layer commodity knowledge graph to obtain cross-layer constraint conditions for the target commodity includes:
[0015] Performing multi-granular semantic analysis on the query information to extract entity elements, scene elements and behavior elements;
[0016] Mapping the entity elements to the basic attribute layer to perform attribute association expansion and generate an attribute constraint sub-graph;
[0017] Mapping the scene elements to the scene association layer to perform scene path reasoning and generate a scene constraint sub-graph;
[0018] Mapping the behavior elements to the dynamic perception layer for time-effectiveness correlation analysis to generate a dynamic constraint sub-graph;
[0019] The attribute constraint sub-graph, scenario constraint sub-graph and dynamic constraint sub-graph are fused through a graph neural network to generate cross-layer constraint conditions with hierarchical weights, wherein the hierarchical weights are used to indicate the distribution density and association strength of the query information in the multi-layer commodity knowledge graph.
[0020] Optionally, the step of mapping the scene elements to the scene association layer for scene path reasoning includes:
[0021] Identifying, in the scene association layer, multi-hop scene nodes associated with scene elements;
[0022] Constructing a scenario propagation path based on the weight value of the commodity connectivity relationship, wherein the weight value is calculated by the co-occurrence frequency of historical purchase data;
[0023] The scene node combinations with weights greater than a preset threshold in the propagation path are screened to generate a scene constraint sub-graph containing a topological structure.
[0024] Optionally, the step of performing time-effect association analysis includes:
[0025] Identify dynamic features related to time sensitivity in user behavior derivative relationships, including price fluctuation cycles, inventory decay rates, and behavior trigger intervals;
[0026] The evolution trend of each dynamic feature in the future time window is calculated through the time series prediction model;
[0027] The dynamic features that meet the preset trend conditions are bound to the current query timestamp to generate a dynamic constraint sub-graph with timeliness mark.
[0028] Optionally, the step of querying target product information corresponding to the target product based on the cross-layer constraint condition includes:
[0029] Analyze the hierarchical weights in the cross-layer constraint conditions, and determine the query priorities of the attribute constraint sub-graph, the scene constraint sub-graph, and the dynamic constraint sub-graph in the multi-layer commodity knowledge graph;
[0030] Based on the query priority, the hierarchical query results are jointly verified through a cross-layer graph traversal algorithm to identify intersection products that simultaneously meet the three-layer constraint conditions;
[0031] The intersection commodities are weighted and sorted based on the user behavior derived relationship of the dynamic perception layer to generate a target commodity information list including real-time attributes, scene paths and behavior correlations.
[0032] Optionally, the step of performing joint verification by a cross-layer graph traversal algorithm includes:
[0033] Extract the entity association graph of the basic attribute layer, the path connectivity graph of the scene association layer, and the time efficiency graph of the dynamic perception layer;
[0034] Construct a cross-layer mapping relationship table to record the node identification mapping relationship of the same product in the three-layer graph;
[0035] Adopting a bidirectional graph search strategy, starting from the entity nodes of the intersection products in the basic attribute layer, synchronously traverse the scene path nodes in the scene association layer and the dynamic feature nodes in the dynamic perception layer;
[0036] When the mapping relationship between the three-layer nodes satisfies the topological consistency in the cross-layer constraint condition, the product is determined to be a valid intersection product.
[0037] In a second aspect, an embodiment of the present invention provides a product information query device based on a knowledge graph, and the product information query device based on a knowledge graph includes:
[0038] A first acquisition module is used to acquire the user's query information and determine whether the query information contains accurate query semantics;
[0039] A processing module, for performing wide dynamic semantic analysis on the query information in combination with a preset multi-layer commodity knowledge graph to obtain cross-layer constraint conditions for the target commodity if the query information does not contain precise query semantics, wherein the multi-layer commodity knowledge graph includes a basic attribute layer, a scene association layer, and a dynamic perception layer, wherein the basic attribute layer is used to store the physical attribute relationship between entities, the scene association layer is used to store the commodity connectivity relationship between commodity scenes, and the dynamic perception layer is used to store the real-time updated price, inventory, and user behavior derivative relationship;
[0040] A query module, used for querying target commodity information corresponding to the target commodity based on the cross-layer constraint condition;
[0041] The return module is used to return the target product information to the user.
[0042] In a third aspect, an embodiment of the present invention provides an electronic device, comprising: a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of the knowledge graph-based product information query method provided in an embodiment of the present invention when executing the computer program.
[0043] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the product information query method based on the knowledge graph provided in the embodiment of the invention are implemented.
[0044] In an embodiment of the present invention, the query information of the user is obtained, and it is determined whether the query information contains precise query semantics; if the query information does not contain precise query semantics, the query information is subjected to wide dynamic semantic analysis processing to obtain cross-layer constraints for the target product; based on the cross-layer constraints and the preset multi-layer product knowledge graph, the target product information corresponding to the target product is queried, and the multi-layer product knowledge graph includes a basic attribute layer, a scene association layer, and a dynamic perception layer, wherein the basic attribute layer is used to store the physical attribute relationship between entities, the scene association layer is used to store the product connectivity relationship between product scenes and product scenes, and the dynamic perception layer is used to store the real-time updated price, inventory, and user behavior derivative relationship; the target product information is returned to the user. The present invention constructs a multi-layer knowledge graph including a basic attribute layer, a scene association layer, and a dynamic perception layer, and combines wide dynamic semantic analysis technology to convert inaccurate queries into cross-layer constraints to solve the technical problems of insufficient multi-dimensional semantic understanding, lack of dynamic real-time performance, and broken cross-layer associations, thereby improving the retrieval accuracy and scene adaptability in complex query scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0046] Figure 1 It is a flow chart of a commodity information query method based on knowledge graph provided by an embodiment of the present invention;
[0047] Figure 2 It is a structural schematic diagram of a commodity information query device based on a knowledge graph provided by an embodiment of the present invention;
[0048] Figure 3 It is a structural schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0049] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0050] like Figure 1 As shown, Figure 1: is a method flow chart of a method for querying commodity information based on a knowledge graph provided by an embodiment of the present invention. The method for querying commodity information based on a knowledge graph comprises the following steps:
[0051] 101. Obtain the user's query information and determine whether the query information contains accurate query semantics.
[0052] In the embodiment of the present invention, the user can input query information on the user terminal, and the user terminal uploads the query information to the server, which is parsed by the server. The query information can be precise query information or imprecise query information, and the query information can be in the form of natural language or database rule language.
[0053] After receiving the query information, the server parses the query information. If the query information is in the form of a database rule language, the product information that the user wants to query is directly queried in the database based on the database rule language. If the query information is in the form of a natural language, it can be determined whether the query information contains precise query semantics, such as the brand, model, style, color, etc. of the target product. If the query information contains precise query semantics, a database rule language can be generated based on the precise query semantics, and the product information that the user wants to query is directly queried in the database based on the generated database rule language. The above-mentioned precise query semantics can be understood as semantics indicating the query of specific target product information.
[0054] It should be noted that database rule language can be understood as the language composed of database search rules, including entity words, attribute words and logical words, and is mostly used by people who have a deep understanding of database rules. Natural language is the language that humans speak naturally, and using natural language does not require understanding of database rules.
[0055] 102. If the query information does not contain precise query semantics, the query information is subjected to wide dynamic semantic analysis and processing in combination with a preset multi-layer product knowledge graph to obtain cross-layer constraint conditions for the target product.
[0056] In the embodiment of the present invention, for query information that does not contain precise query semantics, it cannot be converted into database rule language and cannot be hit in the database. In this case, the present application uses wide dynamic semantic analysis to process the query information to obtain the cross-layer constraint conditions of the target product that the user wants to query.
[0057] Specifically, if the server determines that the query information does not contain precise query semantics (for example, the query entered by the user is "a lightweight backpack suitable for hiking on rainy days" or "recently popular and cost-effective home appliances"), the wide dynamic semantic analysis and processing mechanism is activated to generate composite constraints through multi-layer semantic analysis and cross-layer knowledge graph association.
[0058] The multi-layer commodity knowledge graph includes a basic attribute layer, a scene association layer, and a dynamic perception layer. The basic attribute layer is used to store the physical attribute relationship between entities, the scene association layer is used to store the commodity connectivity relationship between commodity scenes, and the dynamic perception layer is used to store real-time updated prices, inventories, and user behavior derivative relationships.
[0059] The above entities are product entities and ingredient entities. The product entity can be the product name in the product information, and the ingredient entity can be the ingredient name in the product information. The physical property relationship between the above entities can be used to indicate the physical property relationship between products, or the physical property relationship between products and ingredients, or the physical property relationship between ingredients. The above physical property relationship can include "inclusion", "parallel", "combination", etc. For example: there is a combination attribute relationship between a teapot (product entity) and a teacup (product entity), an inclusion relationship between a backpack (product entity) and nylon (ingredient entity), a parallel relationship between a travel bag (product entity) and travel shoes (product entity), and a combination relationship between water (ingredient entity) and additives (ingredient entity).
[0060] The above commodity scenes are usage scenes of commodities. There is a commodity connectivity relationship between commodity scenes. If there is a commodity that can be used in both commodity scene A and commodity scene B, it can be determined that commodity scene A is connected to commodity scene B. The degree of connectivity of the above connectivity relationship can be related to the number of connected commodities and the relevance of commodity categories. The more connected commodities there are, the higher the degree of connectivity. The smaller the relevance of commodity categories, the greater the degree of connectivity. The above commodity scenes can be directly connected through connecting edges. The connection value of the connecting edge is positively correlated with the degree of connectivity.
[0061] In a possible embodiment, the commodity scenes in the above-mentioned scene association layer can be connected according to the commodity entities in the basic attribute layer, and one commodity scene can be connected to multiple commodity entities.
[0062] In the above dynamic perception layer, each product corresponds to a node, which is used to store the real-time updated price and inventory of the corresponding product. The above user behavior derivative relationship can be understood as the user's behavioral relationship with at least two products. Specifically, after a user generates a behavior for one product, he or she also generates a behavior for another product within a short period of time, which means that there is a user behavior derivative relationship. The above behavior derivative relationship can be recommendation, browsing, adding to cart, purchase, comment, etc. For example, after the user browses product A, the user also browses the recommended product B, which is considered a behavior derivative. After the user purchases product A, the user also browses the recommended product B, which is also considered a behavior derivative. After the user purchases product A, the user also purchases the recommended product B, which is also considered a behavior derivative.
[0063] In a possible embodiment, the nodes (commodities) in the dynamic perception layer may correspond one-to-one to the commodity entities in the basic attribute layer.
[0064] It should be noted that the above-mentioned wide dynamic semantic analysis needs to be implemented in combination with a multi-layer commodity knowledge graph. It can be understood that the above-mentioned wide dynamic semantic analysis is a collaborative reasoning of multi-source heterogeneous semantic levels designed for the multi-layer commodity knowledge graph with a specific structure in the embodiment of the present invention.
[0065] The above-mentioned cross-layer constraints refer to the constraints of different levels in the multi-layer commodity knowledge graph. The above-mentioned cross-layer constraints may include level order, level weight, level range, etc.
[0066] 103. Based on the cross-layer constraint condition, query the target product information corresponding to the target product.
[0067] In the embodiment of the present invention, after the cross-layer constraint condition is obtained, the cross-layer constraint condition can be converted into a rule language of a database, and the target commodity information corresponding to the target commodity can be queried in the database through the rule language.
[0068] The above cross-layer constraints refer to the constraints of different layers in the multi-layer commodity knowledge graph. The above cross-layer constraints may include hierarchical sub-conditions such as hierarchical order, hierarchical weight, and hierarchical range. You can query the corresponding layers in the multi-layer commodity knowledge graph according to the hierarchical order, hierarchical weight, and hierarchical range. Therefore, when converted into the rule language of the database, you can get rule languages with different query orders (corresponding to the hierarchical order), different query priorities (corresponding to the hierarchical weight), and different query ranges (corresponding to the hierarchical range), and then search them in the database accordingly.
[0069] In the embodiment of the present invention, the target product information corresponding to the target product can also be queried based on the cross-layer constraint conditions and the preset multi-layer product knowledge graph. Based on the attribute constraint sub-condition (such as "material = nylon AND weight ≤ 1.5kg"), the product set that satisfies the physical attribute association can be matched (for example, all backpacks made of lightweight nylon are filtered out); according to the scene constraint sub-condition (such as "the applicable scene includes 'outdoor waterproof' and is connected to the 'light travel' scene"), the product subset with scene connectivity (for example, the product associated with the path of "rainy day hiking → waterproof → lightweight") is filtered out through scene path reasoning; combined with the dynamic constraint sub-condition (such as "the click growth rate in the past 7 days ≥ 20% AND the remaining inventory ≥ 50 pieces") and the current timestamp, the candidate products that meet the real-time conditions (such as outdoor travel bags that are popular recently and have sufficient inventory) are filtered out.
[0070] The candidate products may be determined as target products, and product information corresponding to the target products may be found in the basic attribute layer to obtain target product information. The target products may be one or more.
[0071] 104. Return the target product information to the user.
[0072] In the embodiment of the present invention, after obtaining the target product information, a product information list is formed and the product information list is returned to the user.
[0073] For example, if a user searches for “lightweight backpacks suitable for rainy day hiking”, the server processes the query in step 103 and the product list finally returned may be:
[0074] Product X: Nylon material (0.9kg), associated with the "outdoor waterproof → lightweight travel" scenario path, with a 30% increase in clicks in the past 7 days and 80 pieces in stock;
[0075] Product Y: Polyester material (1.2kg), associated with the "Hiking → Waterproof → Breathable" scenario path, with a 22% increase in clicks in the past 7 days and 120 pieces in stock;
[0076] Among them, product X is ranked first due to its higher dynamic weight (click growth rate + lightweight attribute).
[0077] In an embodiment of the present invention, the query information of the user is obtained, and it is determined whether the query information contains precise query semantics; if the query information does not contain precise query semantics, the query information is subjected to wide dynamic semantic analysis and processing in combination with a preset multi-layer commodity knowledge graph to obtain cross-layer constraints for the target commodity, wherein the multi-layer commodity knowledge graph includes a basic attribute layer, a scene association layer, and a dynamic perception layer, wherein the basic attribute layer is used to store the physical attribute relationship between entities, the scene association layer is used to store the commodity connectivity relationship between commodity scenes, and the dynamic perception layer is used to store the real-time updated price, inventory, and user behavior derivative relationship; based on the cross-layer constraints, the target commodity information corresponding to the target commodity is queried; and the target commodity information is returned to the user. The present invention converts the inaccurate query into a cross-layer constraint by constructing a multi-layer knowledge graph including a basic attribute layer, a scene association layer, and a dynamic perception layer, and combining the wide dynamic semantic analysis technology, so as to solve the technical problems of insufficient multi-dimensional semantic understanding, lack of dynamic real-time performance, and broken cross-layer association, thereby improving the retrieval accuracy and scene adaptability in complex query scenarios.
[0078] It is understandable that in the specific implementation of this application, related data such as user data and historical shopping behavior data are involved. When the embodiments in this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data, as well as the training, deployment and calling of data models, must comply with relevant laws, regulations and standards of relevant countries and regions.
[0079] Optionally, before the step of performing wide dynamic semantic analysis on the query information in combination with a preset multi-layer product knowledge graph, dynamic product information and static product information of different products can also be obtained; based on the static product information, the physical attribute relationship between entities is extracted to construct a basic attribute layer; and, based on the static product information, the product connectivity relationship between product scenes is extracted to construct the scene association layer; based on the dynamic product information, the real-time updated price, inventory and user behavior derivative relationship is extracted to construct the dynamic perception layer.
[0080] In the embodiment of the present invention, the physical attribute relationship between entities is extracted based on the static commodity information to construct a basic attribute layer. Specifically, entities corresponding to different commodities and the physical attribute relationship between the entities can be extracted from the static commodity information, and the entities include commodity entities and component entities; the basic attribute layer is constructed with the entity as the first node and the physical attribute relationship between the entities as the first connecting edge between the corresponding first nodes.
[0081] The first connection edge between the first nodes uses the correlation between the corresponding entities as the connection value, that is, the greater the correlation between the two entities, the greater the connection value, and the lower the correlation, the smaller the connection value. The above correlation can be the similarity of product information between product entities, the dependency between product entities and ingredient entities, and the ratio between ingredient entities. The similarity of product information between product entities, for example: the similarity of product information between sunglasses and glasses, the similarity of product information between hats and headscarves, etc. The content between product entities and ingredient entities: for example, the water content in beverages, the nylon content in backpacks, etc. The ratio between ingredient entities, such as 10% juice and 90% water, etc.
[0082] For example, Example 1: The association between sunglasses and glasses.
[0083] Product entity: sports sunglasses, driving glasses.
[0084] Function: All have the attribute of "eye protection" (weight 0.6);
[0085] Material: sports sunglasses are "polycarbonate", driving glasses are "resin" (low similarity, weight 0.3);
[0086] Applicable scenarios: Sports sunglasses are suitable for "outdoor sports", and driving glasses are suitable for "night driving" (the scenarios partially overlap, with a weight of 0.4).
[0087] The comprehensive weights are weighted summed (e.g., 0.6 for features + 0.3 for materials + 0.4 for scenes = 1.3), and normalized to 0.65 (assuming the maximum possible value is 2.0).
[0088] Sports sunglasses--[Similarity 0.65]-->Driving glasses, indicating that the two are moderately correlated, and the corresponding connection value of the first connection edge is 0.65.
[0089] Example 2: The association between hats and headscarves.
[0090] Product entity: sun hat, sports headscarf.
[0091] Function: Sun hats focus on "ultraviolet protection", while sports headscarves focus on "sweat absorption and breathability" (large functional differences, weight 0.2);
[0092] Material: All contain "polyester fiber" (similar materials, weight 0.7);
[0093] Applicable scenarios: All can be used for "outdoor activities" (high overlap of scenarios, weight 0.8).
[0094] The combined weight is 0.2 + 0.7 + 0.8 = 1.7, normalized to 0.85.
[0095] Sun hat--[similarity 0.85]-->sports headscarf, indicating that the two are highly correlated, and the corresponding first connection value is 0.85.
[0096] The degree of correlation between the product entity and the ingredient entity: ingredient dependence.
[0097] Set a connection value based on the amount or necessity of the ingredient in the product. The higher the amount or the more critical the ingredient, the greater the connection value.
[0098] Example 3: Water content in beverages.
[0099] Product entity: mineral water, juice.
[0100] Ingredients: Water
[0101] If the product must contain the ingredient (e.g. mineral water must contain water), the connection value corresponding to the first connection edge between the product and water is 1.0;
[0102] If the proportion of ingredients is high (e.g., juice contains 80% water), the connection value corresponding to the first connection edge between the product and water is 0.8;
[0103] If the proportion of ingredients is low (such as functional drinks containing 50% water), the connection value corresponding to the first connection edge between the product and water is 0.5.
[0104] Mineral Water --[Dependency 1.0]-->Water,
[0105] Juice --[Dependency 0.8]-->Water,
[0106] Energy drink--[Dependence 0.5]-->Water.
[0107] Example 4: Nylon content of a backpack
[0108] Product entity: Mountaineering bag A, daily backpack B
[0109] Ingredients: Nylon
[0110] Ingredient ratio:
[0111] The nylon content of mountaineering bag A is 60% → the connection value is 0.6. The connection value of the first connection edge between mountaineering bag A and nylon is 0.6.
[0112] The nylon proportion of the daily backpack B is 30% → the connection value is 0.3, and the connection value corresponding to the first connection edge between the mountaineering bag B and the nylon is 0.3.
[0113] Mountaineering bag A --[Dependency 0.6]-->Nylon,
[0114] Everyday Backpack B --[Dependency 0.3]-->Nylon.
[0115] The degree of correlation between component entities: matching ratio.
[0116] The connection value is calculated based on the synergistic effect or recommended ratio of the ingredients in the formula. The closer to the ideal ratio, the higher the connection value.
[0117] Example 5: The ratio of vitamin C and vitamin E in skin care products.
[0118] Ingredients: Vitamin C, Vitamin E.
[0119] Ideal ratio: 1:1 (e.g. 10% vitamin C + 10% vitamin E) → connection value 1.0, that is, the connection value corresponding to the first connection edge between vitamin C and vitamin E is 1.0;
[0120] If product A contains 8% vitamin C + 12% vitamin E (ratio 0.67:1), the deviation is low → connection value 0.7, that is, the connection value corresponding to the first connection edge between vitamin C and vitamin E is 0.7;
[0121] If product B contains 15% vitamin C + 5% vitamin E (ratio 3:1), the deviation is high → the connection value corresponding to the first connection edge between vitamin C and vitamin E is 0.3.
[0122] Vitamin C --[ratio 0.7]-->Vitamin E (Product A),
[0123] Vitamin C --[ratio 0.3]-->Vitamin E (product B).
[0124] Example 6: Sugar and salt ratio in food
[0125] Ingredients: Sugar, salt
[0126] Recommended healthy ratio: sugar-salt ratio ≤ 2:1 (e.g. 10% sugar + 5% salt → ratio 2:1) → connection value 1.0;
[0127] Actual ratio:
[0128] If snack C contains 12% sugar + 4% salt (ratio 3:1) → the connection value corresponding to the first connection edge between sugar and salt is 0.6;
[0129] If snack D contains 20% sugar + 3% salt (ratio 6.7:1) → the connection value corresponding to the first connection edge between sugar and salt is 0.2.
[0130] Sugar--[ratio 0.6]-->Salt (Snack C);
[0131] Sugar--[ratio 0.2]-->Salt (Snack D).
[0132] In the step of extracting the product connectivity relationship between product scenes and product scenes based on static product information to construct a scene association layer, the product scenes corresponding to different products and the product connectivity relationship between product scenes can be extracted from the static product information; the scene association layer is constructed with the product scene as the second node and the product connectivity relationship between product scenes as the second connecting edge between the corresponding second nodes.
[0133] The above-mentioned second node corresponds to a commodity scene, one second node corresponds to one commodity scene, and the second connection edge between the second nodes has a corresponding connection value. The connection value of the second connection edge is related to the degree of connectivity. The degree of connectivity can be related to the number of connected commodities and the relevance of commodity categories. The more the number of connected commodities, the higher the degree of connectivity, and the smaller the relevance of commodity categories, the greater the degree of connectivity. That is, between two commodity scenes, the more the number of connected commodities and the wider the commodity categories, the greater the connection value of the corresponding second connection edge.
[0134] The above connection value can be calculated by the following formula:
[0135]
[0136] Among them, r is the connection value between two commodity scenes, is the total number of connected products between two product scenes, M is the number of categories of connected products, For the i Product categories, For the j Product categories, For the i Product categories The number of connected products in For product category The number of connected products in For product category The k Connected products, For product category The l Connected products, To connect products Connected Products The similarity between them can be the cosine similarity of the product information.
[0137] In the step of extracting the real-time updated price, inventory and user behavior derivative relationship based on the dynamic product information to build a dynamic perception layer, the real-time updated price, inventory and user behavior derivative relationship corresponding to different products can be extracted from the dynamic product information; the dynamic perception layer is constructed with the product as the third node, the real-time updated price and inventory corresponding to the product as the dynamic attribute data of the third node, and the user behavior derivative relationship as the third connecting edge between the corresponding third nodes.
[0138] In the above dynamic perception layer, each commodity corresponds to a third node, which is used to store the real-time updated price and inventory of the corresponding commodity. The above user behavior derivative relationship can be understood as the user's behavior relationship between at least two commodities. Specifically, after a user generates a behavior for one commodity, he also generates a behavior for another commodity within a short period of time, and then there is a user behavior derivative relationship. The above behavior derivative relationship can be recommendation, browsing, add-to-cart, purchase, comment, etc. For example, after a user browses commodity A, the user also browses the recommended commodity B, which is regarded as a behavior derivative. After the user purchases commodity A, the user also browses the recommended commodity B, which is also regarded as a behavior derivative. After the user purchases commodity A, the user also purchases the recommended commodity B, which is also regarded as a behavior derivative. Different behavior derivatives correspond to different connection values. For example, the connection value corresponding to recommendation-->browse is 0.5, the connection value corresponding to recommendation-->purchase is 0.85, the connection value corresponding to purchase-->purchase is 0.95, the connection value corresponding to add-to-cart-->purchase is 0.75, etc.
[0139] Optionally, in the step of performing wide dynamic semantic analysis on the query information in combination with a preset multi-layer product knowledge graph to obtain cross-layer constraints for the target product, the query information can be subjected to multi-granularity semantic analysis to extract entity elements, scene elements and behavior elements; the entity elements are mapped to the basic attribute layer for attribute association expansion to generate an attribute constraint sub-graph; the scene elements are mapped to the scene association layer for scene path reasoning to generate a scene constraint sub-graph; the behavior elements are mapped to the dynamic perception layer for timeliness association analysis to generate a dynamic constraint sub-graph; and the attribute constraint sub-graph, the scene constraint sub-graph and the dynamic constraint sub-graph are fused through a graph neural network to generate cross-layer constraints with hierarchical weights, wherein the hierarchical weights are used to indicate the distribution density and association strength of each sub-graph in the multi-layer product knowledge graph.
[0140] In an embodiment of the present invention, when mapping entity elements to the basic attribute layer for attribute association expansion, after the mapping is completed, the remaining first nodes whose connection values with the mapped first node are greater than the first connection value threshold can be determined as expansion targets, thereby obtaining an attribute constraint sub-graph. Among them, the first connection value threshold can be set based on experience, and generally, it can be set between 0.5 and 1 under wide dynamic conditions. If there are multiple attribute constraint sub-graphs, the connection values of all first connection edges in each attribute constraint sub-graph can be accumulated, and the multiple attribute constraint sub-graphs can be sorted from small to large according to the accumulated results to obtain an attribute constraint sub-graph sequence.
[0141] When mapping scene elements to the scene association layer for scene path reasoning, after the mapping is completed, in the scene association layer, the second node to which the scene element is mapped can be determined, and based on the connection value between the second node and the remaining second nodes, the second node with a connection value greater than the second connection value threshold can be determined as the scene path among the remaining second nodes, thereby obtaining a scene constraint sub-graph containing multiple scene paths. If there are multiple scene constraint sub-graphs, the complexity of the scene constraint sub-graph is determined according to the number of scene paths and the length of the scene paths, and the multiple scene constraint sub-graphs are sorted in order of complexity from small to large to obtain a scene constraint sub-graph sequence. For a scene constraint sub-graph, the more the number of scene paths and the longer the length of the scene paths, the greater the complexity of the scene path bundle sub-graph, and vice versa, the smaller the complexity of the scene path bundle sub-graph.
[0142] When mapping the behavior elements to the dynamic perception layer for time-effectiveness correlation analysis, after the mapping is completed, in the dynamic perception layer, the third node to which the behavior elements are mapped can be determined, and based on the connection value between the third node and the remaining third nodes, the third node with a connection value greater than the third connection value threshold can be determined as a candidate third node among the remaining third nodes, and among the candidate third nodes, the candidate nodes with real-time updated prices and inventories within the update interval are connected to obtain a dynamic constraint subgraph. If there are multiple dynamic constraint subgraphs, the multiple dynamic constraint subgraphs are sorted from early to late according to the update time to obtain a dynamic constraint subgraph sequence.
[0143] After obtaining the attribute constraint subgraph (or attribute constraint subgraph sequence), scene constraint subgraph (or scene constraint subgraph sequence) and dynamic constraint subgraph (or dynamic constraint subgraph sequence), the attribute constraint subgraph, scene constraint subgraph and dynamic constraint subgraph can be fused through a graph neural network to generate cross-layer constraint conditions with hierarchical weights, where the hierarchical weights are used to indicate the distribution density and association strength of the query information in the multi-layer product knowledge graph.
[0144] The above-mentioned graph neural network can be a graph neural network for graph computing such as GCN / PyG / GAE / GGN. The graph neural network training process includes collecting training data and constructing an initial graph neural network. The training data is a quadruple consisting of the above three constraint sub-graphs and a cross-layer constraint condition. The initial graph neural network is constructed as three input ports and one output port. Each input port inputs a type of constraint sub-graph respectively, and the output port is used to output the cross-layer constraint condition and the corresponding hierarchical weight. During the training process, the three constraint sub-graphs in the quadruple are respectively input into the corresponding input ports. After being generated by graph convolution calculation, the predicted cross-layer constraint condition is output through the output port. The predicted cross-layer constraint condition and the cross-layer constraint condition in the quadruple are calculated for loss value. With the minimum loss value as the optimization goal, the network parameters in the initial graph neural network are adjusted until the predicted cross-layer constraint condition is close to the cross-layer constraint condition in the quadruple or the loss value is less than the preset loss value. The training is stopped to obtain a trained graph neural network. The attribute constraint sub-graph, the scene constraint sub-graph and the dynamic constraint sub-graph are fused through the trained graph neural network to generate a cross-layer constraint condition with hierarchical weights.
[0145] Optionally, in the step of mapping scene elements to the scene association layer for scene path reasoning, multi-hop scene nodes related to the scene elements can be identified in the scene association layer; a scene propagation path is constructed based on the weight value of the commodity connectivity relationship, wherein the weight value is calculated by the co-occurrence frequency of the historical purchase data; and scene node combinations in the propagation path whose weights are greater than a preset threshold are screened to generate a scene constraint sub-graph containing a topological structure.
[0146] In an embodiment of the present invention, the co-occurrence frequency refers to the proportion of orders in historical orders that contain both types of scene products, and the weight value of the above-mentioned product connectivity relationship is the co-occurrence frequency. Further, the weight value of the above-mentioned product connectivity relationship is the normalized value of the product of the connection value of the second connection edge in the scene association layer and the co-occurrence frequency.
[0147] The maximum number of hops in a multi-hop scenario node can be set by the user, for example, the maximum number of hops can be set to 3 or 4.
[0148] The scene node combinations with weights greater than a preset threshold in the propagation path are screened to generate a scene constraint sub-graph containing a topological structure (multiple second node paths).
[0149] Optionally, in the step of performing time-sensitivity correlation analysis, dynamic features related to time sensitivity in the derived relationship of user behavior can be identified, the dynamic features include price fluctuation cycle, inventory decay rate and behavior trigger interval; the evolution trend of each dynamic feature in the future time window is calculated through a time series prediction model; the dynamic features that meet the preset trend conditions are bound to the current query timestamp to generate a dynamic constraint sub-graph with time-effect marks.
[0150] In the embodiment of the present invention, the price fluctuation period can be extracted based on the historical update of the real-time updated price in each third node, and the inventory decay rate can be extracted based on the historical update of the real-time updated inventory in each third node. The behavior trigger interval can be understood as the time interval of a user's specific behavior (such as browsing, commenting, clicking, adding to cart, purchasing, etc.).
[0151] The above time series prediction model can be a time series model based on a recurrent neural network (RNN) or a long short-term memory (LSTM) network. It is used to predict the evolution trend of the above dynamic features in a certain time window in the future. For example, the price fluctuation range, inventory decay rate, and probability distribution of the next behavior trigger in the next 24 hours.
[0152] The preset trend conditions can be the increase in the price fluctuation range within 24 hours, the increase in the inventory decay rate, the increase in the probability of the next behavior trigger, etc. For example, product A: the price will drop by 8% in the next 24 hours (confidence 90%); product B: the inventory will be exhausted in 36 hours (error range ±2 hours); product C: the probability of adding to purchase in the next 6 hours is 65%. Associate the dynamic features that meet the trend conditions with the query timestamp to construct a timeliness constraint subgraph as a dynamic constraint subgraph.
[0153] Optionally, in the step of querying the target product information corresponding to the target product based on the cross-layer constraints, the hierarchical weights in the cross-layer constraints are parsed to determine the query priority of the attribute constraint sub-graph, the scene constraint sub-graph and the dynamic constraint sub-graph in the multi-layer product knowledge graph; according to the query priority, the hierarchical query results are jointly verified through the cross-layer graph traversal algorithm to identify the intersection products that simultaneously meet the three-layer constraints; the intersection products are weighted and sorted based on the user behavior derived relationship of the dynamic perception layer to generate a list of target product information containing real-time attributes, scene paths and behavior correlations.
[0154] In an embodiment of the present invention, the target product information corresponding to the target product is jointly searched based on the cross-layer constraint conditions and the multi-layer product knowledge graph. The target product is a product included in the attribute constraint subgraph, the scene constraint subgraph, and the dynamic constraint subgraph. The query priority is used to indicate the priority query order of the basic attribute layer, the scene association layer, and the dynamic perception layer.
[0155] In the basic attribute layer, the first set of products that meet the physical attribute association is matched based on the entity topological relationship of the attribute constraint sub-graph; in the scene association layer, the second set of products with scene connectivity is filtered according to the propagation path of the scene constraint sub-graph; in the dynamic perception layer, the time limit mark of the dynamic constraint sub-graph and the current timestamp are combined to filter out the set of sensitive products that meet the real-time conditions.
[0156] The intersection of the first product set, the second product set, and the third product set can be obtained to form a final target product set, and attribute information in the basic attribute layer, scene information in the scene association layer, and dynamic perception information in the dynamic perception layer are added to the target products in the target product set to form a target product information list.
[0157] Optionally, in the step of performing joint verification through a cross-layer graph traversal algorithm, the entity association graph of the basic attribute layer, the path connectivity graph of the scene association layer, and the time efficiency graph of the dynamic perception layer can be extracted; a cross-layer mapping relationship table is constructed to record the node identifier mapping relationship of the same product in the three-layer graph; a bidirectional graph search strategy is adopted, starting from the entity node of the intersection product in the basic attribute layer, and synchronously traversing the scene path nodes of the scene association layer and the dynamic feature nodes of the dynamic perception layer; when the mapping relationship between the three-layer nodes satisfies the topological consistency in the cross-layer constraint conditions, the product is determined to be a valid intersection product.
[0158] In the embodiment of the present invention, the cross-layer mapping relationship table records the cross-layer hierarchical order and the node positions of the same commodity in the basic attribute layer, the scene attribute layer and the dynamic perception layer.
[0159] Among them, the entity association graph is used to represent the connection relationship between the first node (entity) and the first node (entity). The path connectivity graph is used to represent the connection relationship between the second node (scenario) and the second node (scenario). The timeliness graph is used to represent the price and inventory timeliness of the third node and the user behavior derived relationship timeliness between two third nodes.
[0160] Topological consistency means that the products corresponding to the first node, the second node, and the third node are the same, that is, the product exists in the attribute constraint subgraph, the scene constraint subgraph, and the dynamic constraint subgraph at the same time.
[0161] The user click volume, add-to-cart frequency and historical purchase conversion rate corresponding to the intersection products can be extracted from the dynamic perception layer; the timeliness weight of each behavior indicator is calculated through the behavior decay model, and the timeliness weight is negatively correlated with the interval from the time the behavior occurs to the current timestamp; according to the distribution density of the dynamic constraint sub-graph in the hierarchical weight, the timeliness weight is weighted and summed to generate a comprehensive ranking score; the intersection products are arranged in descending order according to the comprehensive ranking score, and the top N products are intercepted as the output result of the target product information list.
[0162] The calculation formula of the above behavior decay model is:
[0163]
[0164] Among them, W iis the timeliness weight of the ith behavior indicator, α is the preset behavior type coefficient, β is the decay rate parameter, and Δt is the interval between the behavior occurrence time and the current query time.
[0165] like Figure 2 As shown, an embodiment of the present invention provides a commodity information query device based on a knowledge graph, and the commodity information query device based on a knowledge graph includes:
[0166] The first acquisition module 201 is used to acquire the user's query information and determine whether the query information contains accurate query semantics;
[0167] Processing module 202, for performing wide dynamic semantic analysis on the query information in combination with a preset multi-layer commodity knowledge graph to obtain cross-layer constraint conditions for the target commodity if the query information does not contain precise query semantics, wherein the multi-layer commodity knowledge graph includes a basic attribute layer, a scene association layer, and a dynamic perception layer, wherein the basic attribute layer is used to store the physical attribute relationship between entities, the scene association layer is used to store the commodity connectivity relationship between commodity scenes, and the dynamic perception layer is used to store the real-time updated price, inventory, and user behavior derivative relationship;
[0168] A query module 203, configured to query target commodity information corresponding to the target commodity based on the cross-layer constraint condition;
[0169] The return module 204 is used to return the target product information to the user.
[0170] Optionally, the device further comprises:
[0171] The second acquisition module is used to acquire dynamic commodity information and static commodity information of different commodities;
[0172] A first extraction module, configured to extract physical attribute relationships between entities based on the static commodity information, so as to construct the basic attribute layer;
[0173] and, a second extraction module, configured to extract the commodity connectivity relationship between commodity scenes based on the static commodity information, so as to construct the scene association layer;
[0174] The third extraction module is used to extract the real-time updated price, inventory and user behavior derivative relationship based on the dynamic commodity information to build the dynamic perception layer.
[0175] Optionally, the processing module 202 is also used to perform multi-granularity semantic analysis on the query information to extract entity elements, scene elements and behavior elements; map the entity elements to the basic attribute layer for attribute association expansion to generate an attribute constraint sub-graph; map the scene elements to the scene association layer for scene path reasoning to generate a scene constraint sub-graph; map the behavior elements to the dynamic perception layer for timeliness association analysis to generate a dynamic constraint sub-graph; and fuse the attribute constraint sub-graph, scene constraint sub-graph and dynamic constraint sub-graph through a graph neural network to generate cross-layer constraint conditions with hierarchical weights, wherein the hierarchical weights are used to indicate the distribution density and association strength of the query information in the multi-layer commodity knowledge graph.
[0176] Optionally, the processing module 202 is also used to identify multi-hop scene nodes related to scene elements in the scene association layer; construct a scene propagation path based on the weight value of the commodity connectivity relationship, wherein the weight value is calculated by the co-occurrence frequency of historical purchase data; and filter scene node combinations in the propagation path whose weights are greater than a preset threshold to generate a scene constraint sub-graph containing a topological structure.
[0177] Optionally, the processing module 202 is also used to identify dynamic features related to time sensitivity in user behavior derivative relationships, the dynamic features including price fluctuation cycles, inventory decay rates, and behavior trigger intervals; calculate the evolution trend of each dynamic feature in a future time window through a time series prediction model; bind the dynamic features that meet preset trend conditions to the current query timestamp to generate a dynamic constraint sub-graph with a time limit mark.
[0178] Optionally, the query module 203 is also used to parse the hierarchical weights in the cross-layer constraints, determine the query priority of the attribute constraint sub-graph, scene constraint sub-graph and dynamic constraint sub-graph in the multi-layer product knowledge graph; based on the query priority, jointly verify the hierarchical query results through a cross-layer graph traversal algorithm to identify the intersection products that simultaneously meet the three-layer constraints; weight the intersection products based on the user behavior derived relationship of the dynamic perception layer, and generate a target product information list containing real-time attributes, scene paths and behavior correlations.
[0179] Optionally, the query module 203 is also used to extract the entity association graph of the basic attribute layer, the path connectivity graph of the scene association layer and the time efficiency graph of the dynamic perception layer; construct a cross-layer mapping relationship table to record the node identifier mapping relationship of the same product in the three-layer graph; adopt a bidirectional graph search strategy, starting from the entity node of the intersection product in the basic attribute layer, and synchronously traverse the scene path nodes of the scene association layer and the dynamic feature nodes of the dynamic perception layer; when the mapping relationship between the three-layer nodes meets the topological consistency in the cross-layer constraint conditions, the product is determined to be a valid intersection product.
[0180] The knowledge graph-based commodity information query device provided in the embodiment of the present invention can implement each process implemented by the knowledge graph-based commodity information query method in the above method embodiment, and can achieve the same beneficial effect. To avoid repetition, it will not be repeated here.
[0181] See also Figure 3 , Figure 3 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention, such as Figure 3 As shown, it includes: a memory 302, a processor 301, and a computer program of a commodity information query method based on a knowledge graph stored in the memory 302 and executable on the processor 301, wherein:
[0182] The processor 301 is used to call the computer program stored in the memory 302 and execute the following steps:
[0183] Obtaining the user's query information and determining whether the query information contains accurate query semantics;
[0184] If the query information does not contain precise query semantics, the query information is subjected to wide dynamic semantic analysis in combination with a preset multi-layer commodity knowledge graph to obtain cross-layer constraint conditions for the target commodity. The multi-layer commodity knowledge graph includes a basic attribute layer, a scene association layer, and a dynamic perception layer. The basic attribute layer is used to store the physical attribute relationship between entities, the scene association layer is used to store the commodity connectivity relationship between commodity scenes, and the dynamic perception layer is used to store real-time updated price, inventory, and user behavior derivative relationships.
[0185] Based on the cross-layer constraint condition, query target product information corresponding to the target product;
[0186] The target product information is returned to the user.
[0187] Optionally, before the step of performing wide dynamic semantic analysis on the query information in combination with a preset multi-layer commodity knowledge graph, the method executed by the processor 301 further includes:
[0188] Get dynamic product information and static product information of different products;
[0189] Based on the static commodity information, physical attribute relationships between entities are extracted to construct the basic attribute layer;
[0190] And, based on the static commodity information, extract the commodity connectivity relationship between commodity scenes to construct the scene association layer;
[0191] Based on the dynamic commodity information, the real-time updated price, inventory and user behavior derivative relationship are extracted to construct the dynamic perception layer.
[0192] Optionally, the step of performing wide dynamic semantic analysis on the query information in combination with a preset multi-layer commodity knowledge graph to obtain a cross-layer constraint condition for the target commodity executed by the processor 301 includes:
[0193] Performing multi-granular semantic analysis on the query information to extract entity elements, scene elements and behavior elements;
[0194] Mapping the entity elements to the basic attribute layer to perform attribute association expansion and generate an attribute constraint sub-graph;
[0195] Mapping the scene elements to the scene association layer to perform scene path reasoning and generate a scene constraint sub-graph;
[0196] Mapping the behavior elements to the dynamic perception layer for time-effectiveness correlation analysis to generate a dynamic constraint sub-graph;
[0197] The attribute constraint sub-graph, scenario constraint sub-graph and dynamic constraint sub-graph are fused through a graph neural network to generate cross-layer constraint conditions with hierarchical weights, wherein the hierarchical weights are used to indicate the distribution density and association strength of the query information in the multi-layer commodity knowledge graph.
[0198] Optionally, the step of mapping the scene elements to the scene association layer for scene path reasoning performed by the processor 301 includes:
[0199] Identifying, in the scene association layer, multi-hop scene nodes associated with scene elements;
[0200] Constructing a scenario propagation path based on the weight value of the commodity connectivity relationship, wherein the weight value is calculated by the co-occurrence frequency of historical purchase data;
[0201] The scene node combinations with weights greater than a preset threshold in the propagation path are screened to generate a scene constraint sub-graph containing a topological structure.
[0202] Optionally, the step of performing timeliness association analysis performed by the processor 301 includes:
[0203] Identify dynamic features related to time sensitivity in user behavior derivative relationships, including price fluctuation cycles, inventory decay rates, and behavior trigger intervals;
[0204] The evolution trend of each dynamic feature in the future time window is calculated through the time series prediction model;
[0205] The dynamic features that meet the preset trend conditions are bound to the current query timestamp to generate a dynamic constraint sub-graph with timeliness mark.
[0206] Optionally, the step of querying target product information corresponding to the target product based on the cross-layer constraint condition, performed by the processor 301, includes:
[0207] Analyze the hierarchical weights in the cross-layer constraint conditions, and determine the query priorities of the attribute constraint sub-graph, the scene constraint sub-graph, and the dynamic constraint sub-graph in the multi-layer commodity knowledge graph;
[0208] Based on the query priority, the hierarchical query results are jointly verified through a cross-layer graph traversal algorithm to identify intersection products that simultaneously meet the three-layer constraint conditions;
[0209] The intersection commodities are weighted and sorted based on the user behavior derived relationship of the dynamic perception layer to generate a target commodity information list including real-time attributes, scene paths and behavior correlations.
[0210] Optionally, the step of performing joint verification by a cross-layer graph traversal algorithm performed by the processor 301 includes:
[0211] Extract the entity association graph of the basic attribute layer, the path connectivity graph of the scene association layer, and the time efficiency graph of the dynamic perception layer;
[0212] Construct a cross-layer mapping relationship table to record the node identification mapping relationship of the same product in the three-layer graph;
[0213] Adopting a bidirectional graph search strategy, starting from the entity nodes of the intersection products in the basic attribute layer, synchronously traverse the scene path nodes in the scene association layer and the dynamic feature nodes in the dynamic perception layer;
[0214] When the mapping relationship between the three-layer nodes satisfies the topological consistency in the cross-layer constraint condition, the product is determined to be a valid intersection product.
[0215] It should be noted that the electronic device provided in the embodiment of the present invention can be applied to computers, servers and other devices that can perform product information query methods based on knowledge graphs.
[0216] The electronic device provided in the embodiment of the present invention can implement each process implemented by the commodity information query method based on the knowledge graph in the above method embodiment, and can achieve the same beneficial effect. To avoid repetition, it will not be described here.
[0217] An embodiment of the present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the various processes of the commodity information query method based on the knowledge graph provided by the embodiment of the present invention are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0218] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the computer-readable storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM).
[0219] The above disclosure is only the preferred embodiment of the present invention, which certainly cannot be used to limit the scope of the present invention. Therefore, equivalent changes made according to the claims of the present invention are still within the scope of the present invention.
Claims
1. A commodity information query method based on knowledge graph, characterized in that: The method comprises the following steps: Obtaining the user's query information and determining whether the query information contains accurate query semantics; If the query information does not contain precise query semantics, a wide dynamic semantic analysis is performed on the query information in combination with a preset multi-layer commodity knowledge graph to obtain cross-layer constraint conditions for the target commodity, wherein the multi-layer commodity knowledge graph includes a basic attribute layer, a scene association layer, and a dynamic perception layer, wherein the basic attribute layer is used to store the physical attribute relationship between entities, the scene association layer is used to store the commodity connectivity relationship between commodity scenes, and the dynamic perception layer is used to store real-time updated price, inventory, and user behavior derivative relationships; a wide dynamic semantic analysis is performed on the query information in combination with a preset multi-layer commodity knowledge graph to obtain cross-layer constraint conditions for the target commodity, comprising: performing multi-granular semantic parsing on the query information to extract entity elements, scene elements, and behavior elements; mapping the entity elements to the basic attribute layer for attribute association expansion to generate an attribute constraint subgraph; in the scene association Identify multi-hop scene nodes related to scene elements in the layer; construct a scene propagation path based on the weight value of the commodity connectivity relationship, wherein the weight value is calculated by the co-occurrence frequency of historical purchase data; screen the scene node combination with a weight greater than a preset threshold in the propagation path to generate a scene constraint subgraph containing a topological structure; identify dynamic features related to time sensitivity in the user behavior derivative relationship, wherein the dynamic features include price fluctuation cycle, inventory decay rate and behavior trigger interval; calculate the evolution trend of each dynamic feature in the future time window through a time series prediction model; bind the dynamic features that meet the preset trend conditions to the current query timestamp to generate a dynamic constraint subgraph with a time limit mark; fuse the attribute constraint subgraph, the scene constraint subgraph and the dynamic constraint subgraph through a graph neural network to generate a cross-layer constraint condition with a hierarchical weight, wherein the hierarchical weight is used to indicate the distribution density and association strength of each subgraph in the multi-layer commodity knowledge graph; Analyze the hierarchical weights in the cross-layer constraint conditions, determine the query priorities of the attribute constraint sub-graph, scene constraint sub-graph, and dynamic constraint sub-graph in the multi-layer commodity knowledge graph; based on the query priority, jointly verify the hierarchical query results through a cross-layer graph traversal algorithm to identify the intersection commodities that simultaneously meet the three-layer constraint conditions; weight the intersection commodities based on the user behavior derived relationship of the dynamic perception layer, and generate a target commodity information list containing real-time attributes, scene paths, and behavior correlations; The target product information is returned to the user.
2. The commodity information query method based on knowledge graph according to claim 1, characterized in that: Before the step of performing wide dynamic semantic analysis on the query information in combination with the preset multi-layer commodity knowledge graph, the method further includes: Get dynamic product information and static product information of different products; Based on the static commodity information, physical attribute relationships between entities are extracted to construct the basic attribute layer; And, based on the static commodity information, extract the commodity connectivity relationship between commodity scenes to construct the scene association layer; Based on the dynamic commodity information, the real-time updated price, inventory and user behavior derivative relationship are extracted to construct the dynamic perception layer.
3. The commodity information query method based on knowledge graph according to claim 1, characterized in that: The step of performing joint verification by a cross-layer graph traversal algorithm includes: Extract the entity association graph of the basic attribute layer, the path connectivity graph of the scene association layer, and the time efficiency graph of the dynamic perception layer; Construct a cross-layer mapping relationship table to record the node identification mapping relationship of the same product in the three-layer graph; Adopting a bidirectional graph search strategy, starting from the entity nodes of the intersection products in the basic attribute layer, synchronously traverse the scene path nodes in the scene association layer and the dynamic feature nodes in the dynamic perception layer; When the mapping relationship between the three-layer nodes satisfies the topological consistency in the cross-layer constraint condition, the product is determined to be a valid intersection product.
4. A commodity information query device based on knowledge graph, characterized in that: The commodity information query device based on the knowledge graph includes: A first acquisition module is used to acquire the user's query information and determine whether the query information contains accurate query semantics; A processing module is used for, if the query information does not contain precise query semantics, performing wide dynamic semantic analysis on the query information in combination with a preset multi-layer commodity knowledge graph to obtain cross-layer constraint conditions for target commodities, wherein the multi-layer commodity knowledge graph includes a basic attribute layer, a scene association layer and a dynamic perception layer, wherein the basic attribute layer is used to store physical attribute relationships between entities, the scene association layer is used to store commodity connectivity relationships between commodity scenes, and the dynamic perception layer is used to store real-time updated price, inventory and user behavior derivative relationships; performing wide dynamic semantic analysis on the query information in combination with a preset multi-layer commodity knowledge graph to obtain cross-layer constraint conditions for target commodities comprises: performing multi-granular semantic parsing on the query information to extract entity elements, scene elements and behavior elements; mapping the entity elements to the basic attribute layer to perform attribute association expansion to generate an attribute constraint sub-graph; in the scene Identify multi-hop scene nodes related to scene elements in the scene association layer; construct a scene propagation path based on the weight value of the commodity connectivity relationship, wherein the weight value is calculated by the co-occurrence frequency of historical purchase data; screen the scene node combination with a weight greater than a preset threshold in the propagation path to generate a scene constraint subgraph containing a topological structure; identify dynamic features related to time sensitivity in the user behavior derivative relationship, wherein the dynamic features include price fluctuation cycle, inventory decay rate and behavior trigger interval; calculate the evolution trend of each dynamic feature in the future time window through a time series prediction model; bind the dynamic features that meet the preset trend conditions to the current query timestamp to generate a dynamic constraint subgraph with a time limit mark; fuse the attribute constraint subgraph, the scene constraint subgraph and the dynamic constraint subgraph through a graph neural network to generate a cross-layer constraint condition with a hierarchical weight, wherein the hierarchical weight is used to indicate the distribution density and association strength of each subgraph in the multi-layer commodity knowledge graph; A query module is used to parse the hierarchical weights in the cross-layer constraint conditions, determine the query priority of the attribute constraint sub-graph, the scene constraint sub-graph and the dynamic constraint sub-graph in the multi-layer commodity knowledge graph; based on the query priority, jointly verify the hierarchical query results through a cross-layer graph traversal algorithm to identify the intersection commodities that simultaneously meet the three-layer constraint conditions; weight the intersection commodities based on the user behavior derivative relationship of the dynamic perception layer, and generate a target commodity information list containing real-time attributes, scene paths and behavior correlations; The return module is used to return the target product information to the user.
5. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps in the knowledge graph-based commodity information query method as described in any one of claims 1 to 3 when executing the computer program.
6. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by the processor, the steps in the knowledge graph-based commodity information query method as described in any one of claims 1 to 3 are implemented.
Citation Information
Patent Citations
Intelligent question and answer method
CN109684448A
Commodity retrieval method and system based on knowledge graph
CN117688251A
Knowledge graph construction method and object recommendation method based on knowledge graph
CN118585652A