Method and system for recommending chemical and plastic products based on user needs
By constructing a multi-dimensional chemical plastic industry knowledge graph and deep semantic understanding of user needs, the problems of insufficient understanding of complex user needs and insufficient processing capabilities of new users in the existing technology are solved, and high accuracy and personalized chemical plastic product recommendations are achieved.
Patent Information
- Application Number
- CN202411249078.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-06
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2044-09-06
AI Technical Summary
It is difficult to deeply integrate industry professional knowledge and accurately understand complex user needs. It has limited ability to deal with new users and cold start problems. The degree of personalization and interpretability of recommendation results need to be improved.
By building a multi-dimensional plastic industry knowledge graph, deeply understanding user needs, optimizing query condition generation, personalized sorting and other methods, we can improve the relevance and accuracy of recommendations.
It has achieved accurate understanding and matching of user needs of chemical plastic products, significantly improved the accuracy and relevance of recommendations, and improved user experience and procurement decision efficiency.
Smart Images

Figure CN119128177B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of chemical and plastic product recommendation, and in particular to a chemical and plastic product recommendation method and system based on user needs. Background Art
[0002] The chemical and plastics industry is an important part of the modern manufacturing industry, and its products are widely used in many fields, including automobiles, construction, packaging, electronics, and medical. This industry has a wide variety of product types and complex specifications, and each product often has multiple application scenarios and attribute characteristics. Therefore, providing personalized chemical and plastic product recommendation services based on user needs can not only improve procurement efficiency, but also better meet customers' business needs.
[0003] The existing chemical and plastic product recommendation technologies mainly include the following aspects: Recommendation method based on collaborative filtering: by analyzing user historical behavior data, similar users or similar products are found and recommended. Content-based recommendation method: using product attributes and user preferences for matching. Knowledge graph-assisted recommendation: using domain knowledge to enhance the interpretability and accuracy of the recommendation system.
[0004] Although the above research has made certain progress in the field of chemical and plastic product recommendation, the existing technology still has the following defects: lack of deep integration of professional knowledge of the chemical and plastic industry, it is difficult to accurately understand and match complex user needs; the multi-dimensional relationship between products and the temporal characteristics of user behavior are not fully considered in the recommendation process; the ability to handle new users and cold start problems is limited; the personalization and interpretability of recommendation results need to be improved.
[0005] In summary, when dealing with personalized recommendation issues in complex professional fields, existing chemical and plastic product recommendation technologies still lack a comprehensive solution that can deeply integrate domain knowledge, accurately understand user needs, and dynamically adapt to market changes. Summary of the invention
[0006] In view of this, the present invention proposes a chemical and plastic product recommendation method and system based on user needs, which improves the relevance and accuracy of recommendations by constructing a multi-dimensional chemical and plastic industry knowledge graph, deeply understanding user needs through semantics, optimizing query condition generation, and personalized sorting, thereby enhancing user experience, optimizing procurement decisions, and providing strong support for the digital transformation of the chemical and plastic industry.
[0007] The technical solution of the present invention is achieved in this way:
[0008] In one aspect, the present invention provides a method for recommending plastic products based on user needs, comprising:
[0009] S1 builds a knowledge graph for the chemical and plastics industry;
[0010] S2 obtains user historical data and current user needs, including historical search data, historical browsing data, historical interaction data, and historical transaction data;
[0011] S3 preprocesses the user's historical data, analyzes the preprocessed user's historical data, and extracts historical demand features;
[0012] S4 uses the semantic understanding model to extract keywords based on current user needs, and combines it with the knowledge graph of the chemical and plastics industry to generate optimized query conditions;
[0013] S5 searches in the chemical and plastic product database using the optimized query condition to obtain a first list;
[0014] S6 uses the knowledge graph of the chemical and plastics industry to personalize the sorting of the first list, takes the first k to generate a recommendation list, and presents the recommendation list to the user.
[0015] Preferably, the construction process of the chemical and plastic industry knowledge graph includes:
[0016] Extract relevant information from chemical and plastic product databases, industry standard documents, expert knowledge bases, and user interaction records;
[0017] Use named entity recognition methods to identify plastic products, product categories, attributes, attribute values, professional terms and application scenarios, and use relationship extraction algorithms to extract semantic relationships between entities;
[0018] Construct a multi-dimensional knowledge graph, including a first-dimensional sub-graph, a second-dimensional sub-graph, a third-dimensional sub-graph, and a fourth-dimensional sub-graph, wherein the first-dimensional sub-graph is constructed based on the product-product category-attribute triple format, the second-dimensional sub-graph is constructed based on the product-attribute-attribute value triple format, the third-dimensional sub-graph is constructed based on the product-professional term-synonym / nearbyon triple format, and the fourth-dimensional sub-graph is constructed based on the product-attribute-application scenario triple format;
[0019] The TransE algorithm is used to perform representation learning on multi-dimensional knowledge graphs to generate low-dimensional vector representations of entities and relationships;
[0020] Perform entity alignment and relationship mapping on sub-graphs of different dimensions, and use graph fusion algorithms to integrate sub-graphs of various dimensions into a unified knowledge graph for the chemical and plastics industry.
[0021] Preferably, entity alignment and relationship mapping are performed on sub-graphs of different dimensions, and a graph fusion algorithm is used to integrate the sub-graphs of various dimensions into a unified knowledge graph of the chemical and plastic industry, including:
[0022] Step 1: For each sub-graph G i Entity e ini :
[0023] Calculate e i With other subgraphs G j All entities in j The similarity sim(e i ,e j );
[0024] If sim(e i ,e j )>threshold T, then e i and e j Marked as the same entity;
[0025] Step 2: Construct the relationship mapping matrix R, where R [i][j] Represents the subgraph G i Chinese Relations i To G j Chinese Relations j For each pair of mapping relations (r i ,r j ):
[0026] Choose a unified representation and update R [i][j] and R [j][i] ;
[0027] Step 3: Use the first-dimensional sub-graph G1 as the initialized fusion graph G, and the sub-graphs G of the remaining dimensions i :
[0028] G i Add the entities and relations in to G, and use the results of step 1 and step 2 to handle duplication and conflict of entities or relations;
[0029] Step 4. For each entity e in G:
[0030] If there is a conflict in the attribute value of e, the attribute value with the latest timestamp is retained;
[0031] For each relation r in G:
[0032] If there is a conflict in r, the relationship with the highest confidence is retained;
[0033] Step 5: For any two triples in G (entity e1, relation r1, entity e2), (entity e2, relation r2, entity e3):
[0034] If entities e1 and e3 satisfy the predefined reasoning rules, then add a new triple (entity e1, relation r new , entity e3) to G;
[0035] Step 6. Delete all dangling entities and relationships in G. For each entity e in G:
[0036] If the connectivity of e is less than the threshold K, e is marked as pending review;
[0037] Step 7: Calculate the importance PR of all entities in G. For entities with PR lower than the threshold P and their corresponding relationships:
[0038] If it does not affect the overall structure of G, remove it from G;
[0039] Step 8. For the entity e marked as pending review in step 6:
[0040] Check the importance of e in its original subgraph. If the importance exceeds the threshold P, keep e and increase its connectivity. If its importance is lower than the threshold P, remove it.
[0041] Step 9. Repeat steps 1 to 8 until the fusion is completed, store the fused graph G in the graph database D, and establish a multidimensional index structure on D to obtain the knowledge graph of the chemical and plastic industry.
[0042] Preferably, step S3 includes:
[0043] S31 cleans the user historical data, removes invalid or abnormal data, and unifies the format to obtain pre-processed user historical data;
[0044] S32 uses the TF-IDF method to extract high-frequency words from historical search data and historical browsing data, and applies the word2vec model to convert high-frequency words into vector representations to obtain high-frequency word vectors. The high-frequency word vectors are clustered based on the clustering algorithm. Each cluster represents a user topic, and the user topic set is obtained.
[0045] S33 extracts target product attributes from historical browsing data and historical interaction data, calculates the attention frequency and dwell time of each product attribute, and generates an attribute preference vector;
[0046] S34 analyzes the price distribution in the historical transaction data, calculates the average transaction price and price fluctuation of the user, and generates a price sensitivity index;
[0047] S35 analyzes the time series of historical transaction data, identifies purchasing cycles and seasonal patterns, calculates average purchase volume and purchase frequency, and generates a purchasing behavior matrix;
[0048] S36 uses a naive Bayes classifier to infer application scenarios based on historical search data and historical transaction data, and calculates the probability score of each application scenario;
[0049] S37 calculates the similarity between the user and each user's topic, converts the user topic set into a topic similarity vector, takes the topic similarity vector, attribute preference vector, price sensitivity index, purchasing behavior matrix, and probability score of the application scenario as features, standardizes them, and performs weighted fusion to form historical demand characteristics.
[0050] Preferably, step S37 further includes: calculating a time weight for each feature, applying the time weight to each feature and performing standardization processing, wherein the calculation formula of the time weight is:
[0051]
[0052]
[0053] Where w is the time weight, λ is the time decay coefficient, t1 is the current time, t0 is the time when the feature is generated, λ0 is the basic decay coefficient, t s is the time window.
[0054] Preferably, step S4 comprises:
[0055] S41 inputs the current user demand into the pre-trained semantic understanding model to extract keywords, semantic feature vectors and prediction information;
[0056] S42 uses the knowledge graph of the chemical and plastic industry to perform entity linking and expansion of the extracted keywords, including synonyms, antonyms and related concepts;
[0057] S43 adjusts the weight of the expanded keywords based on historical demand characteristics and entity importance in the knowledge graph;
[0058] S44 calculates the similarity between the semantic feature vector and the historical demand feature, and combines it with the entity relationship in the knowledge graph to obtain the query preference;
[0059] S45 generates preliminary query conditions based on the weighted keywords and query preferences, combined with the attribute preferences, price sensitivity and application scenario information in the historical demand characteristics, and the product attribute hierarchy in the knowledge graph;
[0060] S46 uses semantic feature vectors, prediction information, and association rules in the knowledge graph to expand the initial query conditions;
[0061] S47 performs similarity calculation on the expanded query conditions and removes redundant or contradictory conditions using the constraint relationships in the knowledge graph;
[0062] S48 reorders the remaining conditions based on the importance of entities in the knowledge graph to obtain the final optimized query conditions.
[0063] Preferably, the semantic understanding model includes an input layer, an embedding layer, a multi-layer transformer encoder, a context enhancement layer, a multi-scale feature extraction layer, an adaptive pooling layer, and a multi-task output layer, wherein:
[0064] The multi-layer transformer encoder contains L transformer layers, each of which includes a multi-head self-attention sublayer and a feedforward neural network sublayer. The multi-head self-attention sublayer includes h attention heads, and the dimension of each attention head is d / h. The feedforward neural network sublayer uses a two-layer fully connected network with a GELU activation function in the middle. LN and residual connections are used after each sublayer of the multi-layer transformer encoder.
[0065] The context enhancement layer uses a bidirectional long short-term memory network;
[0066] The multi-scale feature extraction layer contains multiple one-dimensional convolutions with different kernel sizes, each of which is followed by a LeakyReLU activation function and a maximum pooling operation;
[0067] The adaptive pooling layer uses a self-attention mechanism;
[0068] The multi-task output layer consists of three branches. The first branch uses conditional random fields to extract keywords, the second branch uses nonlinear transformation to generate semantic feature vectors, and the third branch is a multi-label classifier, which is used to generate prediction information, including predicting product categories, predicting attributes, and predicting application scenarios.
[0069] Preferably, the processing process of the semantic understanding model for the current user demand is:
[0070] The input layer receives the current user demand, converts the text into a token sequence, and adds [CLS] and [SEP] tags, where [CLS] is used to capture the semantic information of the entire input, and [SEP] is used to distinguish different input fragments;
[0071] The embedding layer generates word embedding, position embedding, and segment embedding for each token, and adds the three embeddings together to get the initial representation;
[0072] The initial representation is processed through multiple layers of transformer encoders, each layer consisting of:
[0073] Multi-head self-attention calculates the attention weight of each token relative to other tokens and extracts sentence-level semantic features.
[0074] Feedforward neural networks process attention outputs through nonlinear transformations;
[0075] Use a bidirectional long short-term memory network to process the output of the multi-layer transformer encoder and add contextual information;
[0076] The multi-scale feature extraction layer uses a variety of convolution kernels to extract features, and concatenates the features output by different convolution kernels to obtain multi-scale features;
[0077] The adaptive pooling layer transforms multi-scale features into fixed-length semantic representations through a self-attention mechanism;
[0078] In the multi-task output layer, the first branch uses conditional random fields to sequence each token and output a keyword list. The second branch converts the pooled semantic representation into a semantic feature vector through a nonlinear layer. The third branch uses a multi-label classifier to perform structured prediction on product categories, key attributes, and application scenarios.
[0079] Preferably, step S6 comprises:
[0080] S61 calculates the semantic relevance of the optimized query condition for each chemical and plastic product in the first list based on the chemical and plastic industry knowledge graph;
[0081] S62 combines user historical data to calculate the personalized score of each plastic product;
[0082] S63 uses the multi-dimensional information of the chemical and plastic industry knowledge graph to calculate the similarity between chemical and plastic products;
[0083] S64 performs weighted combination of the semantic relevance, the personalized score, and the similarity to obtain a comprehensive score for each plastic product, and rearranges the first list according to the comprehensive score to obtain a second list;
[0084] S65 selects the first k options from the second list, generates a recommendation list, and presents the recommendation list to the user.
[0085] On the other hand, the present invention also provides a plastic product recommendation system based on user needs, the system is used to execute any of the above methods, the system comprising:
[0086] A knowledge graph construction module configured to extract information from chemical and plastic product databases, industry standard documents, and expert knowledge bases, use entity recognition and relationship extraction to form a multi-dimensional knowledge graph, and perform entity alignment, relationship mapping, and graph fusion operations to generate a unified chemical and plastic industry knowledge graph;
[0087] a data collection module configured to obtain historical search data, browsing data, interaction data, and transaction data from user interaction activities;
[0088] A preprocessing module, connected to the data acquisition module, and configured to perform data cleaning, format standardization, and outlier removal on the acquired user historical data to generate a preprocessed user data set;
[0089] A user modeling module configured to extract user historical behavior characteristics by analyzing the preprocessed user data set, and generate user interest topics, attribute preference vectors, price sensitivity indexes, purchase behavior matrices, and probability scores of application scenarios;
[0090] Semantic understanding module, with built-in semantic understanding model, including input layer, embedding layer, multi-layer transformer encoder, context enhancement layer, multi-scale feature extraction layer, adaptive pooling layer, and multi-task output layer, which performs semantic analysis on current user needs, extracts keywords, semantic feature vectors, and prediction information;
[0091] The query optimization module is connected between the semantic understanding module and the knowledge graph construction module, and is configured to perform semantic expansion, weight adjustment and condition optimization on user queries in combination with the user's historical demand characteristics and the chemical and plastic industry knowledge graph, and generate optimized query conditions;
[0092] A product search module configured to perform a search operation in a chemical and plastic product database according to an optimized query condition, thereby generating a first list;
[0093] A personalized sorting module, which is connected to the product search module and is configured to comprehensively calculate the comprehensive score of each plastic product based on the semantic relevance, the personalized score and the product similarity, so as to adjust the sorting of the first list;
[0094] a recommendation generation module configured to select a preset number of products from the sorted and adjusted first list to generate a final recommendation list and output it to the user;
[0095] The feedback collection module is used to collect user feedback on the recommendation results to optimize the knowledge graph of the chemical and plastic industry.
[0096] Compared with the prior art, the present invention has the following beneficial effects:
[0097] (1) By integrating multi-dimensional knowledge graphs, deep semantic understanding, query optimization, and personalized sorting, we have achieved accurate understanding and matching of user needs for chemical and plastic products, significantly improved the accuracy and relevance of recommendations, and effectively solved the problem of product recommendations in the complex semantic environment of the chemical and plastic industry;
[0098] (2) By constructing a multi-dimensional knowledge graph of the plastics industry and performing graph fusion, we systematically integrated information such as product categories, attributes, professional terms, and application scenarios, providing a rich knowledge foundation for subsequent semantic understanding and query optimization, and enhancing the recommendation system's ability to grasp industry characteristics;
[0099] (3) Using a semantic understanding model based on a multi-layer Transformer encoder, combined with context enhancement and multi-scale feature extraction, we can achieve in-depth analysis of user needs, extract keywords, semantic feature vectors, and prediction information, and greatly improve the system's ability to understand complex user needs;
[0100] (4) A multi-stage query optimization strategy is adopted, including entity linking, semantic expansion, weight adjustment, and condition generation, which effectively transforms user needs into optimized query conditions, improving retrieval efficiency and the relevance of results;
[0101] (5) Through a comprehensive ranking mechanism that integrates semantic relevance, personalization score, and product similarity, personalized re-ranking of search results is achieved, ensuring that the recommendation list is highly matched with user needs while taking into account product diversity;
[0102] (6) Through modular design and the integration of multiple innovative technologies, the recommendation system realizes intelligent processing of the entire process from user demand input to the output of the final recommendation list, providing users in the chemical and plastics industry with efficient, accurate and personalized product recommendation services, significantly improving user experience and procurement decision-making efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0103] 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.
[0104] Figure 1 is a flow chart of the method of the present invention;
[0105] Figure 2 The knowledge graph construction process of the present invention;
[0106] Figure 3 It is a flow chart of the graph fusion algorithm of the present invention;
[0107] Figure 4 It is a framework diagram of the semantic understanding model of the present invention;
[0108] Figure 5 It is a structural diagram of a multi-layer transformer encoder of the present invention;
[0109] Figure 6 This is a diagram of the multi-scale feature extraction layer structure of the present invention;
[0110] Figure 7 It is a structural diagram of the multi-task output layer of the present invention;
[0111] Figure 8 It is a system framework diagram of the present invention. DETAILED DESCRIPTION
[0112] The following will be combined with 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.
[0113] like Figure 1 As shown, firstly, the present invention provides a method for recommending plastic products based on user needs, comprising:
[0114] S1 builds a knowledge graph for the chemical and plastics industry;
[0115] S2 obtains user historical data and current user needs, including historical search data, historical browsing data, historical interaction data, and historical transaction data;
[0116] S3 preprocesses the user's historical data, analyzes the preprocessed user's historical data, and extracts historical demand features;
[0117] S4 uses the semantic understanding model to extract keywords based on current user needs, and combines it with the knowledge graph of the chemical and plastics industry to generate optimized query conditions;
[0118] S5 searches in the chemical and plastic product database using the optimized query condition to obtain a first list;
[0119] S6 uses the knowledge graph of the chemical and plastics industry to personalize the sorting of the first list, takes the first k to generate a recommendation list, and presents the recommendation list to the user.
[0120] Specifically, Figure 2 As shown, in one embodiment of the present invention, the process of constructing the knowledge graph of the chemical and plastics industry includes:
[0121] Extract relevant information from chemical and plastic product databases, industry standard documents, expert knowledge bases, and user interaction records;
[0122] The purpose of this step is to obtain comprehensive industry data, including product information, technical specifications, expert experience and actual application scenarios. The specific implementation methods include: using SQL queries to extract product information from structured databases, including product names, specifications, performance parameters, etc.; using web crawler technology to obtain standard documents such as GB / T, ISO and other standards from industry websites and public document libraries; accessing expert knowledge management systems through API interfaces to extract knowledge points contributed by experts, including expert descriptions of product applications and technical points; and extracting user query and feedback information from the log data of user interaction systems.
[0123] Use named entity recognition methods to identify plastic products, product categories, attributes, attribute values, professional terms and application scenarios, and use relationship extraction algorithms to extract semantic relationships between entities;
[0124] Specifically, named entity recognition is performed based on a deep learning model based on BERT-CRF. After fine-tuning the model on the chemical and plastics industry corpus, it can accurately identify industry-specific entities. A remotely supervised neural network model is used for relationship extraction, combined with an attention mechanism to improve the recognition accuracy of long-distance dependencies.
[0125] Construct a multi-dimensional knowledge graph, including a first-dimensional sub-graph, a second-dimensional sub-graph, a third-dimensional sub-graph, and a fourth-dimensional sub-graph, wherein the first-dimensional sub-graph is constructed based on the product-product category-attribute triple format, the second-dimensional sub-graph is constructed based on the product-attribute-attribute value triple format, the third-dimensional sub-graph is constructed based on the product-professional term-synonym / nearbyon triple format, and the fourth-dimensional sub-graph is constructed based on the product-attribute-application scenario triple format;
[0126] Specifically, this embodiment constructs a sub-graph of four dimensions, each of which focuses on different aspects of the chemical and plastic industry knowledge to fully capture the industry knowledge structure. Among them, the first dimension reflects the classification system of products, the second dimension describes product characteristics, the third dimension constructs a terminology system, and the fourth dimension associates products with practical applications. The purpose of constructing these four-dimensional sub-graphs is to comprehensively represent the chemical and plastic industry knowledge from different angles, which is convenient for subsequent complex queries and reasoning.
[0127] The TransE algorithm is used to perform representation learning on multi-dimensional knowledge graphs to generate low-dimensional vector representations of entities and relationships;
[0128] The reason why the TransE algorithm is selected in this embodiment is that it is simple and effective, suitable for processing large-scale knowledge graphs, and the generated vector representation is convenient for subsequent similarity calculation and reasoning tasks.
[0129] Perform entity alignment and relationship mapping on sub-graphs of different dimensions, and use graph fusion algorithms to integrate sub-graphs of various dimensions into a unified knowledge graph for the chemical and plastics industry. Figure 3 As shown, the step includes:
[0130] Step 1: For each sub-graph G i Entity e in i :
[0131] Calculate e i With other subgraphs G j All entities in j The similarity sim(e i ,e j );
[0132] If sim(e i ,e j )>threshold T, then e i and e j Marked as the same entity.
[0133] This step is the entity alignment step, which aims to identify entities representing the same concept in different sub-graphs.
[0134] Step 2: Construct the relationship mapping matrix R, where R [i][j] Represents the subgraph G i Chinese Relations i To G j Chinese Relations j For each pair of mapping relations (r i ,r j ):
[0135] Choose a unified representation and update R [i][j] and R [j][i] .
[0136] This step is the relationship mapping step, which ensures that relationships with the same semantics but different expressions in different sub-graphs can be represented uniformly.
[0137] Step 3: Use the first-dimensional sub-graph G1 as the initialized fusion graph G, and the sub-graphs G of the remaining dimensions i :
[0138] G i The entities and relations in are added to G, and the duplication and conflict of entities or relations are handled using the results of steps 1 and 2.
[0139] Step 4. For each entity e in G:
[0140] If there is a conflict in the attribute value of e, the attribute value with the latest timestamp is retained;
[0141] For each relation r in G:
[0142] If there is a conflict in r, the relationship with the highest confidence is retained.
[0143] Step 5: For any two triples in G (entity e1, relation r1, entity e2), (entity e2, relation r2, entity e3):
[0144] If entities e1 and e3 satisfy the predefined reasoning rules, then add a new triple (entity e1, relation r new , entity e3) to G.
[0145] Step 6. Delete all dangling entities and relationships in G. For each entity e in G:
[0146] If the connectivity of e is less than the threshold K, e is marked as pending review.
[0147] Specifically, connectivity = 2*the number of actual connections between neighbors / (the number of neighbors*(the number of neighbors-1)).
[0148] Step 7: Calculate the importance PR of all entities in G. For entities with PR lower than the threshold P and their corresponding relationships:
[0149] If it does not affect the overall structure of G, remove it from G.
[0150] The formula for calculating the importance PR of an entity is as follows:
[0151] PR(e)=(1-d)+d*Σ(PR(i) / L(i));
[0152] Where d is the damping coefficient (valued at 0.85), i is the entity pointing to e, and L(i) is the out-degree of i.
[0153] Step 8. For the entity e marked as pending review in step 6:
[0154] Check the importance of e in its original subgraph. If the importance exceeds the threshold P, retain e and increase its connectivity. If its importance is lower than the threshold P, remove it.
[0155] Specifically, the way to increase connectivity is as follows:
[0156] Using existing relationship patterns, infer and add new reasonable relationships. For example: if A is a subclass of B, and B has attribute C, then it can be inferred that A may also have attribute C.
[0157] Based on the attributes of similar entities, the possible missing attributes of entity e are supplemented.
[0158] Add synonyms or near-synonyms related to entity e and establish corresponding relationships.
[0159] Step 9. Repeat steps 1 to 8 until the fusion is completed, store the fused graph G in the graph database D, and establish a multidimensional index structure on D to obtain the knowledge graph of the chemical and plastic industry.
[0160] Specifically, establishing a multidimensional index structure includes:
[0161] Analyze the most common query types based on user needs and how the query optimization module works. Determine the query dimensions that need to be optimized, such as product attributes, application scenarios, professional terms, etc.
[0162] Based on the first dimension sub-graph (product-product category-attribute), a product category index and an attribute index are established. Based on the second dimension sub-graph (product-attribute-attribute value), an attribute value index is established. Based on the third dimension sub-graph (product-professional term-synonym / near synonym), a term index is established. Based on the fourth dimension sub-graph (product-attribute-application scenario), an application scenario index is established.
[0163] For text attributes such as product name and chemical composition, use full-text index, such as inverted index. For numeric attributes, such as physical properties, use B-tree or R-tree index. For categorical attributes, use hash index. For time-related attributes, such as update time, use time index.
[0164] Product category index: Use a tree structure to represent the product category hierarchy. Attribute index: Create a B-tree index for common attributes. Attribute value index: Create a range index for numeric attribute values. Term index: Create an inverted index from professional terms to products. Application scenario index: Create a mapping index from application scenarios to products.
[0165] Create composite indexes based on common query patterns, such as a composite index of product category, attribute, and attribute value.
[0166] Create adjacency list indexes to optimize graph traversal operations. Implement path indexes to speed up multi-hop queries.
[0167] Create vector indexes for entity and relationship vector representations generated by the TransE algorithm. Use approximate nearest neighbor search algorithms, such as HNSW, to achieve efficient similarity queries.
[0168] Partition the data based on product category or other key attributes. Build local index structures on each partition.
[0169] Through the above steps, a comprehensive multidimensional index structure can be established on the graph database D to support efficient query and recommendation functions of the knowledge graph of the chemical and plastic industry.
[0170] This embodiment comprehensively captures the knowledge structure of the chemical and plastics industry, including product classification, attribute characteristics, professional terminology, and application scenarios, through the construction of a multi-dimensional sub-graph. It uses a deep learning model for entity recognition and relationship extraction to improve the accuracy of knowledge extraction. It uses a knowledge graph to represent learning, providing a good semantic foundation for subsequent intelligent applications. Through a graph fusion algorithm, it realizes the organic integration of multi-dimensional knowledge and constructs a unified knowledge graph for the chemical and plastics industry.
[0171] Specifically, in one embodiment of the present invention, step S2 includes:
[0172] Get historical search data: record all search queries of users on the platform, including search keywords, search time, and search frequency.
[0173] Get historical browsing data: record the product pages that users have browsed, including the browsed product ID, browsing time, and browsing duration. Record the user's scrolling behavior on the product page to determine the degree of attention.
[0174] Get historical interaction data: record various interactions between users and the platform, including operations such as adding products to favorites, adding to shopping carts, and comparing products.
[0175] Get historical transaction data: record all the user's purchase behaviors, including the purchased product ID, purchase time, purchase quantity, and transaction amount. Record order status changes, such as order placement, payment, shipment, and receipt.
[0176] Current user demand acquisition: Capture the user's current search query or browsing behavior. Analyze the user's behavior sequence in the current session.
[0177] Specifically, in one embodiment of the present invention, step S3 includes:
[0178] S31 cleans the user historical data, removes invalid or abnormal data, and unifies the format to obtain pre-processed user historical data;
[0179] S32 uses the TF-IDF method to extract high-frequency words from historical search data and historical browsing data, and applies the word2vec model to convert high-frequency words into vector representations to obtain high-frequency word vectors. The high-frequency word vectors are clustered based on the clustering algorithm. Each cluster represents a user topic, and the user topic set is obtained.
[0180] S33 extracts target product attributes from historical browsing data and historical interaction data, calculates the attention frequency and dwell time of each product attribute, and generates an attribute preference vector;
[0181] S34 analyzes the price distribution in the historical transaction data, calculates the average transaction price and price fluctuation of the user, and generates a price sensitivity index;
[0182] S35 analyzes the time series of historical transaction data, identifies purchasing cycles and seasonal patterns, calculates average purchase volume and purchase frequency, and generates a purchasing behavior matrix;
[0183] S36 uses a naive Bayes classifier to infer application scenarios based on historical search data and historical transaction data, and calculates the probability score of each application scenario;
[0184] S37 calculates the similarity between the user and each user's topic, converts the user topic set into a topic similarity vector, takes the topic similarity vector, attribute preference vector, price sensitivity index, purchasing behavior matrix, and probability score of the application scenario as features, standardizes them, and performs weighted fusion to form historical demand characteristics.
[0185] Let's take a specific example to illustrate:
[0186] The original historical data of user A is as follows:
[0187] Search records: ["polypropylene", "PP material", "transparent plastic", "high-strength plastic bag"]; browsing records: [product ID1, product ID2, product ID3]; transaction records: [{product ID: 1, price: 5000, quantity: 1000, date: "2023-01-15"}, {product ID: 2, price: 6000, quantity: 800, date: "2023-03-20"}].
[0188] Preprocess the data: remove duplicate search records; unify product ID formats (for example, convert all to strings); check and remove abnormal prices and quantities (for example, values that significantly deviate from the normal range); unify the date format to YYYY-MM-DD.
[0189] The cleaned data is:
[0190] Search records: ["polypropylene", "PP material", "transparent plastic", "high-strength plastic bag"]; browsing records: ["001", "002", "003"]; transaction records: [{product ID: "001", price: 5000, quantity: 1000, date: "2023-01-15"}, {product ID: "002", price: 6000, quantity: 800, date: "2023-03-20"}].
[0191] Use TF-IDF to extract high-frequency words: TF-IDF(t,d)=TF(t,d)*IDF(t), where TF(t,d) is the frequency of word t in document d, IDF(t)=log(N / DF(t)), N is the total number of documents, and DF(t) is the number of documents containing word t. The extracted high-frequency words are: ["polypropylene", "PP material", "transparent", "high strength"].
[0192] Use word2vec to convert high-frequency words into 100-dimensional vectors. Use K-means clustering algorithm to cluster word vectors, where k=3, and get three clusters: cluster 1: ["polypropylene", "PP material"]; cluster 2: ["transparent"]; cluster 3: ["high strength"]. These three clusters represent three user themes: raw material type, appearance characteristics, and strength characteristics.
[0193] The target attributes are: material type, transparency, strength, and price. For each attribute, the attention frequency and average dwell time are calculated, and an attribute preference vector can be constructed as [(material type attention frequency, material type average dwell time), (transparency attention frequency, transparency average dwell time), (strength attention frequency, strength average dwell time), (price attention frequency, price average dwell time)].
[0194] Calculate the average transaction price, then calculate the price fluctuation, price fluctuation = standard deviation / average price, and then generate the price sensitivity index = 1 / (1 + price fluctuation).
[0195] Identify the purchasing cycle, calculate the average purchasing volume and frequency, and construct a purchasing behavior matrix [purchasing cycle, average purchasing volume, purchasing frequency].
[0196] Set the target application scenarios as packaging, construction, and auto parts, use the naive Bayes classifier, and calculate the probability of each scenario based on historical search and transaction data: P(scenario|data) = P(data|scenario)*P(scenario) / P(data). Obtain the probability score: [Packaging: 0.6, Construction: 0.3, Auto Parts: 0.1].
[0197] Using cosine similarity, we calculate the similarity between the user and each topic, and get the topic similarity vector [material type: 0.8, appearance characteristics: 0.5, intensity characteristics: 0.7]. Apply time weight to each feature, and the calculation formula for time weight is:
[0198]
[0199]
[0200] Where w is the time weight, λ is the time decay coefficient, t1 is the current time, t0 is the time when the feature is generated, λ0 is the basic decay coefficient, t s is the time window.
[0201] At this time, the time window can be set to 1 day, that is, one day is used as the window, and the weight is adjusted accordingly as the time is farther away from the current time. Then all features are normalized by min-max, and then weighted fusion is performed to obtain historical demand features.
[0202] The final historical demand feature is a multidimensional vector that contains information such as users' interest topics, attribute preferences, price sensitivity, purchasing behavior, and application scenario preferences.
[0203] Specifically, in one embodiment of the present invention, step S4 includes:
[0204] S41 inputs the current user demand into the pre-trained semantic understanding model to extract keywords, semantic feature vectors and prediction information;
[0205] Specifically, Figure 4 As shown in the figure, the semantic understanding model includes an input layer, an embedding layer, a multi-layer transformer encoder, a context enhancement layer, a multi-scale feature extraction layer, an adaptive pooling layer, and a multi-task output layer, where:
[0206] like Figure 5 As shown in the figure, the multi-layer transformer encoder contains L transformer layers, each layer includes a multi-head self-attention sublayer and a feedforward neural network sublayer. The multi-head self-attention sublayer includes h attention heads, and the dimension of each attention head is d / h. The feedforward neural network sublayer uses a two-layer fully connected network with a GELU activation function in the middle. LN and residual connections are used after each sublayer of the multi-layer transformer encoder.
[0207] The context enhancement layer uses a bidirectional long short-term memory network;
[0208] like Figure 6 As shown in the figure, the multi-scale feature extraction layer contains multiple one-dimensional convolutions with different kernel sizes, each of which is followed by a LeakyReLU activation function and a maximum pooling operation;
[0209] The adaptive pooling layer uses a self-attention mechanism;
[0210] like Figure 7 As shown in the figure, the multi-task output layer includes three branches. The first branch uses conditional random fields to extract keywords, the second branch uses nonlinear transformation to generate semantic feature vectors, and the third branch is a multi-label classifier for generating prediction information, including predicting product categories, predicting attributes, and predicting application scenarios.
[0211] The semantic understanding model processes the current user needs as follows:
[0212] The input layer receives the current user demand, converts the text into a token sequence, and adds [CLS] and [SEP] tags, where [CLS] is used to capture the semantic information of the entire input and [SEP] is used to distinguish different input fragments; specifically, [CLS] is at the beginning of the sequence and [SEP] is at the end of the sequence, for example, "I need high-strength PP material" → [CLS], I, need, high, strength, PP, material, [SEP].
[0213] The embedding layer generates word embedding, position embedding and segment embedding for each token, and adds the three embeddings to get the initial representation; among them, word embedding is the semantic representation of each token, position embedding captures the position information of the token in the sequence, and segment embedding distinguishes different input fragments.
[0214] The initial representation is processed through multiple layers of transformer encoders, each layer consisting of:
[0215] Multi-head self-attention calculates the attention weight of each token relative to other tokens and extracts sentence-level semantic features.
[0216] The feedforward neural network processes the attention output through a nonlinear transformation.
[0217] Specifically, in this embodiment, the multi-layer transformer encoder includes 12 transformer layers, each layer contains: h attention heads, each head has a dimension of d / h, and the attention weight is calculated: The feedforward neural network consists of two layers of fully connected networks using the GELU activation function.
[0218] Each sub-layer is followed by LN and residual connection.
[0219] Use a bidirectional long short-term memory network to process the output of the multi-layer transformer encoder and add contextual information.
[0220] The multi-scale feature extraction layer applies multiple convolution kernels to extract features, and concatenates the features output by different convolution kernels to obtain multi-scale features. Specifically, the multi-scale feature extraction layer uses multiple parallel one-dimensional convolutions, each of which is followed by LeakyReLU activation and maximum pooling.
[0221] The adaptive pooling layer transforms multi-scale features into fixed-length semantic representations through a self-attention mechanism;
[0222] In the multi-task output layer, the first branch uses conditional random fields to sequence each token and output a keyword list. The second branch converts the pooled semantic representation into a semantic feature vector through a nonlinear layer. The third branch uses a multi-label classifier to perform structured prediction on product categories, key attributes, and application scenarios.
[0223] S42 uses the knowledge graph of the chemical and plastics industry to perform entity linking and expansion of the extracted keywords, including synonyms, antonyms and related concepts.
[0224] Specifically, the extracted keywords are matched with entities in the knowledge graph. A method combining string matching and semantic similarity calculation is used. For example, the keyword "PP material" is linked to the "polypropylene" entity in the knowledge graph.
[0225] Entity expansion includes synonym expansion, near-synonym expansion and related concept expansion.
[0226] Synonym expansion: find other entities that are synonymous with the linked entity. For example: "polypropylene" → {"PP", "polypropylene", "propylene polymer"}.
[0227] Synonym expansion: find entities that are similar to the linked entity. For example: "high-strength plastic" → {"high-rigidity plastic", "high-toughness plastic"}.
[0228] Related concept expansion: find other entities that are closely related to the linked entity. For example: "plastic bag" → {"packaging material", "film", "shopping bag"}.
[0229] S43 adjusts the weights of the expanded keywords based on historical demand characteristics and the importance of entities in the knowledge graph.
[0230] Specifically, the similarity between each keyword after expansion and the user's historical interest topics is calculated. The higher the similarity, the higher the weight is given. The importance of the corresponding entity of each keyword in the knowledge graph is calculated. The higher the importance, the higher the weight is given.
[0231] S44 calculates the similarity between the semantic feature vector and the historical demand feature, and combines it with the entity relationship in the knowledge graph to obtain the query preference.
[0232] Specifically, the cosine similarity is used to calculate the similarity between the semantic feature vector and the historical demand features. The main components in the semantic feature vector and the entity relationships in the knowledge graph are analyzed. For example, if the semantic vector emphasizes "intensity", the weight of the attributes related to intensity is increased. Based on the similarity and entity relationship analysis, a preference vector is generated. The preference vector contains the weights of different attributes and characteristics.
[0233] S45 generates preliminary query conditions based on the weighted keywords and query preferences, combined with the attribute preferences, price sensitivity and application scenario information in the historical demand characteristics, and the product attribute hierarchy in the knowledge graph.
[0234] Specifically, we combine the weighted keywords and query preferences. We use the attribute preference vector, price sensitivity index, and application scenario information in the historical demand features. We map user preferences to specific product attributes and attribute values in the knowledge graph. Then we generate preliminary query conditions.
[0235] S46 uses semantic feature vectors, prediction information, and association rules in the knowledge graph to expand the preliminary query conditions.
[0236] Specifically, analyze the main semantic components in the semantic feature vector and add relevant query conditions. Add corresponding query conditions based on the predicted product categories, attributes, and application scenarios. Utilize the association rules in the knowledge graph: Apply the frequent item set mining algorithm to discover the association rules between attributes. Expand the query conditions based on the association rules.
[0237] S47 performs similarity calculation on the expanded query conditions and uses the constraint relationships in the knowledge graph to remove redundant or contradictory conditions.
[0238] Specifically, GloVe is used to calculate the semantic similarity between the expanded query conditions. Check whether the conditions violate the constraints defined in the knowledge graph. If the similarity of two conditions exceeds the threshold, the more specific or more important one is retained. If contradictory conditions are found, one is retained according to the weight of the condition, or the contradictory condition is converted into a range query.
[0239] S48 reorders the remaining conditions based on the importance of entities in the knowledge graph to obtain the final optimized query conditions.
[0240] Specifically, the remaining query conditions are sorted using the importance of entities in the knowledge graph, and the sorted conditions are converted into a structured query format, such as a SQL query.
[0241] Specifically, in one embodiment of the present invention, step S5 includes:
[0242] Access the chemical and plastic product database and perform a query in the database. The result returned from the database query is a preliminary product list, which contains all product records that meet the query conditions. Perform a preliminary screening and formatting of the query results, using the default relevance screening method. Output the screened and formatted product records as the first list.
[0243] Specifically, in one embodiment of the present invention, step S6 includes:
[0244] S61 calculates the semantic relevance of the optimized query conditions for each chemical and plastic product in the first list based on the chemical and plastic industry knowledge graph.
[0245] Specifically, the optimized query conditions are converted into vector representations, and the cosine similarity is used to calculate the similarity between the query vector and the product vector. The specific attribute requirements in the query conditions are compared with the product attributes, the degree of matching is calculated, and the fuzzy matching algorithm is used to process the approximate matching of the numerical range and the text description. The structural similarity between the query entity and the product entity in the graph is calculated using the graph structure of the knowledge graph. The vector similarity, attribute matching, and graph structure similarity are comprehensively considered to obtain the final semantic relevance score. This embodiment uses weighted average to obtain the semantic relevance.
[0246] S62 combines user historical data to calculate a personalized score for each plastic product.
[0247] Specifically, the user interest model is constructed using matrix decomposition technology: construct the user-product interaction matrix R, where R[u,i] represents the interaction intensity of user u to product i, and apply SVD (singular value decomposition) to perform matrix decomposition: R≈U*Σ*V T , extract the user latent factor matrix U and the product latent factor matrix V, the interest vector of user u: I u =U[u].
[0248] For each product attribute a, calculate the preference of user u: P(u,a) = Σ(w(u,i)*v(i,a)) / Σw(u,i), where: w(u,i) is the interaction weight of user u to product i, and v(i,a) is the value of product i on attribute a.
[0249] Construct a context vector C, which contains information such as season and geographic location, and use a context-aware neural network model: f(u,i,C)=σ(W2*ReLU(W1*[I u ; V i ; C] + b1) + b2), where V i is the latent factor vector for product i.
[0250] Use user-based collaborative filtering: sim(u,v) = cos(I u ,I v ); CF(u,i)=Σ(sim(u,v)*R[v,i]) / Σsim(u,v).
[0251] The gradient boosted tree (GBT) model is used to fuse various factors to obtain a personalized score.
[0252] S63 uses the multi-dimensional information of the chemical and plastic industry knowledge graph to calculate the similarity between chemical and plastic products.
[0253] Specifically, the multi-dimensional information includes attributes, functions, structures, etc. The similarities of each dimension are integrated to obtain a similarity score.
[0254] S64 performs weighted combination of semantic relevance, personalization score, and similarity to obtain a comprehensive score for each plastic product, and rearranges the first list according to the comprehensive score to obtain a second list.
[0255] S65 selects the first k options from the second list, generates a recommendation list, and presents the recommendation list to the user.
[0256] Specifically, the user interaction behavior is tracked, and feedback information such as the clicks and browsing time of the recommended results is recorded. The knowledge graph is then optimized.
[0257] Also, see Figure 8 The present invention also provides a plastic product recommendation system based on user needs, the system is used to execute any of the above methods, and the system includes:
[0258] A knowledge graph construction module configured to extract information from chemical and plastic product databases, industry standard documents, and expert knowledge bases, use entity recognition and relationship extraction to form a multi-dimensional knowledge graph, and perform entity alignment, relationship mapping, and graph fusion operations to generate a unified chemical and plastic industry knowledge graph;
[0259] a data collection module configured to obtain historical search data, browsing data, interaction data, and transaction data from user interaction activities;
[0260] A preprocessing module, connected to the data acquisition module, and configured to perform data cleaning, format standardization, and outlier removal on the acquired user historical data to generate a preprocessed user data set;
[0261] A user modeling module configured to extract user historical behavior characteristics by analyzing the preprocessed user data set, and generate user interest topics, attribute preference vectors, price sensitivity indexes, purchase behavior matrices, and probability scores of application scenarios;
[0262] Semantic understanding module, with built-in semantic understanding model, including input layer, embedding layer, multi-layer transformer encoder, context enhancement layer, multi-scale feature extraction layer, adaptive pooling layer, and multi-task output layer, which performs semantic analysis on current user needs, extracts keywords, semantic feature vectors, and prediction information;
[0263] The query optimization module is connected between the semantic understanding module and the knowledge graph construction module, and is configured to perform semantic expansion, weight adjustment and condition optimization on user queries in combination with the user's historical demand characteristics and the chemical and plastic industry knowledge graph, and generate optimized query conditions;
[0264] A product search module configured to perform a search operation in a chemical and plastic product database according to an optimized query condition, thereby generating a first list;
[0265] A personalized sorting module, which is connected to the product search module and is configured to comprehensively calculate the comprehensive score of each plastic product based on the semantic relevance, the personalized score and the product similarity, so as to adjust the sorting of the first list;
[0266] a recommendation generation module configured to select a preset number of products from the sorted and adjusted first list to generate a final recommendation list and output it to the user;
[0267] The feedback collection module is used to collect user feedback on the recommendation results to optimize the knowledge graph of the chemical and plastic industry.
[0268] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for recommending plastic products based on user needs, characterized in that: include: S1 builds a knowledge graph for the chemical and plastics industry; The construction process of the knowledge graph of the chemical and plastics industry includes: Extract relevant information from chemical and plastic product databases, industry standard documents, expert knowledge bases, and user interaction records; Use named entity recognition methods to identify plastic products, product categories, attributes, attribute values, professional terms and application scenarios, and use relationship extraction algorithms to extract semantic relationships between entities; Construct a multi-dimensional knowledge graph, including a first-dimensional sub-graph, a second-dimensional sub-graph, a third-dimensional sub-graph, and a fourth-dimensional sub-graph, wherein the first-dimensional sub-graph is constructed based on the product-product category-attribute triple format, the second-dimensional sub-graph is constructed based on the product-attribute-attribute value triple format, the third-dimensional sub-graph is constructed based on the product-professional term-synonym / nearbyon triple format, and the fourth-dimensional sub-graph is constructed based on the product-attribute-application scenario triple format; The TransE algorithm is used to perform representation learning on multi-dimensional knowledge graphs to generate low-dimensional vector representations of entities and relationships; Perform entity alignment and relationship mapping on sub-graphs of different dimensions, and use graph fusion algorithms to integrate sub-graphs of various dimensions into a unified knowledge graph for the chemical and plastics industry; S2 obtains user historical data and current user needs, including historical search data, historical browsing data, historical interaction data, and historical transaction data; S3 preprocesses the user's historical data, analyzes the preprocessed user's historical data, and extracts historical demand features; Step S3 includes: S31 cleans the user historical data, removes invalid or abnormal data, and unifies the format to obtain pre-processed user historical data; S32 uses the TF-IDF method to extract high-frequency words from historical search data and historical browsing data, and applies the word2vec model to convert high-frequency words into vector representations to obtain high-frequency word vectors. The high-frequency word vectors are clustered based on the clustering algorithm. Each cluster represents a user topic, and the user topic set is obtained. S33 extracts target product attributes from historical browsing data and historical interaction data, calculates the attention frequency and dwell time of each product attribute, and generates an attribute preference vector; S34 analyzes the price distribution in the historical transaction data, calculates the average transaction price and price fluctuation of the user, and generates a price sensitivity index; S35 analyzes the time series of historical transaction data, identifies purchasing cycles and seasonal patterns, calculates average purchase volume and purchase frequency, and generates a purchasing behavior matrix; S36 uses a naive Bayes classifier to infer application scenarios based on historical search data and historical transaction data, and calculates the probability score of each application scenario; S37 calculates the similarity between the user and each user topic, converts the user topic set into a topic similarity vector, takes the topic similarity vector, attribute preference vector, price sensitivity index, purchase behavior matrix, and probability score of the application scenario as features, standardizes them, and performs weighted fusion to form historical demand features; S4 uses the semantic understanding model to extract keywords based on current user needs, and combines it with the knowledge graph of the chemical and plastics industry to generate optimized query conditions; Step S4 includes: S41 inputs the current user demand into the pre-trained semantic understanding model to extract keywords, semantic feature vectors and prediction information; S42 uses the knowledge graph of the chemical and plastic industry to perform entity linking and expansion of the extracted keywords, including synonyms, antonyms and related concepts; S43 adjusts the weight of the expanded keywords based on historical demand characteristics and entity importance in the knowledge graph; S44 calculates the similarity between the semantic feature vector and the historical demand feature, and combines it with the entity relationship in the knowledge graph to obtain the query preference; S45 generates preliminary query conditions based on the weighted keywords and query preferences, combined with the attribute preferences, price sensitivity and application scenario information in the historical demand characteristics, and the product attribute hierarchy in the knowledge graph; S46 uses semantic feature vectors, prediction information, and association rules in the knowledge graph to expand the initial query conditions; S47 performs similarity calculation on the expanded query conditions and removes redundant or contradictory conditions using the constraint relationships in the knowledge graph; S48 reorders the remaining conditions based on the importance of entities in the knowledge graph to obtain the final optimized query conditions; S5 searches in the chemical and plastic product database using the optimized query condition to obtain a first list; S6 uses the knowledge graph of the chemical and plastics industry to personalize the sorting of the first list, takes the first k to generate a recommendation list, and presents the recommendation list to the user.
2. The method for recommending plastic products based on user needs according to claim 1, characterized in that: Perform entity alignment and relationship mapping on sub-graphs of different dimensions, and use graph fusion algorithms to integrate sub-graphs of various dimensions into a unified knowledge graph for the chemical and plastics industry, including: Step 1: For each sub-graph G i Entity e in i : Calculate e i With other subgraphs G j All entities in j The similarity sim(e i ,e j ); If sim(e i ,e j )>threshold T, then e i and e j Marked as the same entity; Step 2: Construct the relationship mapping matrix R, where R [i][j] Represents the subgraph G i Chinese Relations i To G j Chinese Relations j For each pair of mapping relations (r i ,r j ): Choose a unified representation and update R [i][j] and R [j][i] ; Step 3: Use the first-dimensional sub-graph G1 as the initialized fusion graph G, and the sub-graphs G of the remaining dimensions i : G i Add the entities and relations in to G, and use the results of step 1 and step 2 to handle duplication and conflict of entities or relations; Step 4. For each entity e in G: If there is a conflict in the attribute value of e, the attribute value with the latest timestamp is retained; For each relation r in G: If there is a conflict in r, the relationship with the highest confidence is retained; Step 5: For any two triples in G (entity e1, relation r1, entity e2), (entity e2, relation r2, entity e3): If entities e1 and e3 satisfy the predefined reasoning rules, then add a new triple (entity e1, relation r new , entity e3) to G; Step 6. Delete all dangling entities and relationships in G. For each entity e in G: If the connectivity of e is less than the threshold K, e is marked as pending review; Step 7: Calculate the importance PR of all entities in G. For entities with PR lower than the threshold P and their corresponding relationships: If it does not affect the overall structure of G, remove it from G; Step 8. For the entity e marked as pending review in step 6: Check the importance of e in its original subgraph. If the importance exceeds the threshold P, keep e and increase its connectivity. If its importance is lower than the threshold P, remove it. Step 9. Repeat steps 1 to 8 until the fusion is completed, store the fused graph G in the graph database D, and establish a multidimensional index structure on D to obtain the knowledge graph of the chemical and plastic industry.
3. The method for recommending plastic products based on user needs according to claim 1, characterized in that: Step S37 also includes: calculating the time weight of each feature, applying the time weight to each feature and performing standardization processing, wherein the calculation formula of the time weight is: Where w is the time weight, λ is the time decay coefficient, t1 is the current time, t0 is the time when the feature is generated, λ0 is the basic decay coefficient, t s is the time window.
4. The method for recommending plastic products based on user needs according to claim 1, characterized in that: The semantic understanding model includes an input layer, an embedding layer, a multi-layer transformer encoder, a context enhancement layer, a multi-scale feature extraction layer, an adaptive pooling layer, and a multi-task output layer, where: The multi-layer transformer encoder contains L transformer layers, each of which includes a multi-head self-attention sublayer and a feedforward neural network sublayer. The multi-head self-attention sublayer includes h attention heads, and the dimension of each attention head is d / h. The feedforward neural network sublayer uses a two-layer fully connected network with a GELU activation function in the middle. LN and residual connections are used after each sublayer of the multi-layer transformer encoder. The context enhancement layer uses a bidirectional long short-term memory network; The multi-scale feature extraction layer contains multiple one-dimensional convolutions with different kernel sizes, each of which is followed by a LeakyReLU activation function and a maximum pooling operation; The adaptive pooling layer uses a self-attention mechanism; The multi-task output layer consists of three branches. The first branch uses conditional random fields to extract keywords, the second branch uses nonlinear transformation to generate semantic feature vectors, and the third branch is a multi-label classifier, which is used to generate prediction information, including predicting product categories, predicting attributes, and predicting application scenarios.
5. The method for recommending plastic products based on user needs according to claim 4, characterized in that: The semantic understanding model processes the current user needs as follows: The input layer receives the current user demand, converts the text into a token sequence, and adds [CLS] and [SEP] tags, where [CLS] is used to capture the semantic information of the entire input, and [SEP] is used to distinguish different input fragments; The embedding layer generates word embedding, position embedding, and segment embedding for each token, and adds the three embeddings together to get the initial representation; The initial representation is processed through multiple layers of transformer encoders, each layer consisting of: Multi-head self-attention calculates the attention weight of each token relative to other tokens and extracts sentence-level semantic features; Feedforward neural networks process attention outputs through nonlinear transformations; Use a bidirectional long short-term memory network to process the output of the multi-layer transformer encoder and add contextual information; The multi-scale feature extraction layer uses a variety of convolution kernels to extract features, and concatenates the features output by different convolution kernels to obtain multi-scale features; The adaptive pooling layer transforms multi-scale features into fixed-length semantic representations through a self-attention mechanism; In the multi-task output layer, the first branch uses conditional random fields to sequence each token and output a keyword list. The second branch converts the pooled semantic representation into a semantic feature vector through a nonlinear layer. The third branch uses a multi-label classifier to perform structured prediction on product categories, key attributes, and application scenarios.
6. The method for recommending plastic products based on user needs according to claim 1, characterized in that: Step S6 includes: S61 calculates the semantic relevance of the optimized query condition for each chemical and plastic product in the first list based on the chemical and plastic industry knowledge graph; S62 combines user historical data to calculate the personalized score of each plastic product; S63 uses the multi-dimensional information of the chemical and plastic industry knowledge graph to calculate the similarity between chemical and plastic products; S64 performs weighted combination of the semantic relevance, the personalized score, and the similarity to obtain a comprehensive score for each plastic product, and rearranges the first list according to the comprehensive score to obtain a second list; S65 selects the first k options from the second list, generates a recommendation list, and presents the recommendation list to the user.
7. A plastic product recommendation system based on user needs, characterized in that: The system is used to execute the method according to any one of claims 1 to 6, and the system comprises: A knowledge graph construction module configured to extract information from chemical and plastic product databases, industry standard documents, and expert knowledge bases, use entity recognition and relationship extraction to form a multi-dimensional knowledge graph, and perform entity alignment, relationship mapping, and graph fusion operations to generate a unified chemical and plastic industry knowledge graph; a data collection module configured to obtain historical search data, browsing data, interaction data, and transaction data from user interaction activities; A preprocessing module, connected to the data acquisition module, and configured to perform data cleaning, format standardization, and outlier removal on the acquired user historical data to generate a preprocessed user data set; A user modeling module configured to extract user historical behavior characteristics by analyzing the preprocessed user data set, and generate user interest topics, attribute preference vectors, price sensitivity indexes, purchase behavior matrices, and probability scores of application scenarios; Semantic understanding module, with built-in semantic understanding model, including input layer, embedding layer, multi-layer transformer encoder, context enhancement layer, multi-scale feature extraction layer, adaptive pooling layer, and multi-task output layer, which performs semantic analysis on current user needs, extracts keywords, semantic feature vectors, and prediction information; The query optimization module is connected between the semantic understanding module and the knowledge graph construction module, and is configured to perform semantic expansion, weight adjustment and condition optimization on user queries in combination with the user's historical demand characteristics and the chemical and plastic industry knowledge graph, and generate optimized query conditions; A product search module configured to perform a search operation in a chemical and plastic product database according to an optimized query condition, thereby generating a first list; A personalized sorting module, which is connected to the product search module and is configured to comprehensively calculate the comprehensive score of each plastic product based on the semantic relevance, the personalized score and the product similarity, so as to adjust the sorting of the first list; a recommendation generation module configured to select a preset number of products from the sorted and adjusted first list to generate a final recommendation list and output it to the user; The feedback collection module is used to collect user feedback on the recommendation results to optimize the knowledge graph of the chemical and plastic industry.
Citation Information
Patent Citations
Knowledge-guided large-scale language model query clarification method and system oriented to API (Application Program Interface) recommendation
CN116776895A
Artificial intelligence data search and distribution method and system
CN118467851A