A b2b food material purchasing recommendation method and system based on a dynamic relationship graph
By constructing a dynamic relationship graph and event-driven updates, combined with reinforcement learning optimization, the system analyzes the explicit and implicit needs of the purchaser, generates an accurate list of recommended food ingredients, and solves the shortcomings of the existing system in handling complex business constraints and dynamic changes, thereby improving the efficiency and accuracy of B2B food ingredient procurement.
Patent Information
- Application Number
- CN202511558630.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-29
- Publication Date
- 2026-02-24
- Estimated Expiration
- 2045-10-29
AI Technical Summary
Existing B2B food procurement recommendation systems struggle to effectively handle complex business constraints and dynamic changes, resulting in infeasible or inefficient recommendation results and an inability to achieve accurate and efficient supply and demand matching.
By constructing a dynamic relationship graph and integrating structured and unstructured data, combined with event-driven updates and reinforcement learning optimization, a purchase feature representation containing dynamic preferences and constraints is generated. This analyzes the explicit and implicit needs of the purchaser and generates an optimized food purchase recommendation list.
It improved the accuracy and timeliness of B2B food procurement recommendations, increased the efficiency of online transactions on the platform, and reduced manual intervention and operating costs.
Smart Images

Figure CN121032614B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of e-commerce technology, specifically to a B2B food procurement recommendation method and system based on dynamic relationship graphs. Background Technology
[0002] With the booming development of e-commerce, business-to-business (B2B) online trading platforms have become an important channel in the food procurement field, connecting food suppliers (such as farms, producers, and distributors) with buyers (such as restaurants, hotels, food processing companies, and retailers). These platforms aim to facilitate the circulation and trade of various food ingredients.
[0003] To improve user experience and transaction efficiency, many e-commerce platforms have adopted procurement recommendation technologies to suggest potentially interesting ingredients or suppliers to buyers. Currently, commonly used recommendation technologies mainly include content-based filtering, collaborative filtering, and hybrid recommendation methods. However, directly applying these recommendation technologies derived from general e-commerce to the complex B2B ingredient procurement scenario has certain limitations: existing recommendation methods often focus on matching user preferences while neglecting the crucial business constraints in B2B procurement. For example, they rarely consider factors such as supplier dynamic inventory, production capacity, transaction volume requirements, delivery cycles, delivery network compatibility, and regional coverage. This can lead to recommendations that are impractical or inefficient in real-world operations, failing to achieve accurate and efficient supply-demand matching. Furthermore, the supply and price of ingredients are seasonal, and prices fluctuate frequently due to various factors such as market supply and demand, weather, and transportation costs. Existing recommendation systems lack effective modeling of these temporal dynamics and price elasticity characteristics, making it difficult to adjust according to real-time market conditions and the buyer's budget constraints. Finally, the B2B food ingredient market environment changes rapidly, including real-time fluctuations in inventory levels, the introduction of new ingredients or varieties, the launch and end of promotions, changes in user demand, and even sudden supply chain disruptions. Existing recommendation system models are often static or updated infrequently, making it difficult to quickly capture and respond to these dynamic changes, resulting in delayed or ineffective recommendation results.
[0004] To address the unique complexity, dynamism, and multiple constraints of food procurement, a B2B food procurement recommendation method and system based on dynamic relationship graphs is proposed. Summary of the Invention
[0005] The purpose of this invention is to provide a B2B food ingredient procurement recommendation method and system based on a dynamic relationship graph. First, a dynamic relationship graph is constructed and maintained. By integrating structured transaction data with semantically extracted unstructured business agreement terms, and combining event-driven updates and reinforcement learning optimization, the real-time purchase status is accurately reflected. Subsequently, a dynamic recommendation model is applied to process the temporal interactions of this graph, incorporating business constraints to generate a purchase feature representation containing dynamic preferences and constraint compliance. The explicit conditions and predicted implicit preferences of the purchaser are analyzed. A recommendation generation mechanism is used based on the purchase feature representation and the integrated multi-dimensional purchase constraints to generate a purchase recommendation list containing preferred food ingredients and supplier matching suggestions through an optimized ranking method. This invention improves the accuracy and timeliness of B2B food ingredient procurement recommendations and enhances the efficiency of online transactions on the platform.
[0006] To achieve the above objectives, the present invention provides the following technical solution:
[0007] A B2B food procurement recommendation method based on dynamic relationship graphs includes:
[0008] A knowledge model for food ingredient purchases is constructed to define purchase entity classes and purchase relationships. The structured information of the purchase transactions is processed by a stream processing engine, and the unstructured information of the purchase transactions is processed by semantic extraction technology. The information is then mapped to the knowledge model for food ingredient purchases to generate a dynamic relationship graph.
[0009] The purchase entity class is updated in real time using an event-driven mechanism; a reinforcement learning model is deployed to optimize the purchase relationship based on platform purchase metrics and generate the optimized dynamic relationship graph.
[0010] Based on predefined business constraints and the C-TGN architecture, a dynamic recommendation model is constructed to process the temporal interaction information in the optimized dynamic relationship graph and generate purchase feature representations.
[0011] The current purchase request constraints are analyzed, including explicit purchase constraints based on user input and implicit purchase constraints based on predictions of historical purchase behavior. A recommendation generation mechanism is constructed to calculate the ranking scores of candidate recommendation items and generate a list of recommended food items based on the purchase feature representation and the current purchase request constraints.
[0012] Furthermore, the process of constructing the knowledge model for the purchase of the ingredients:
[0013] The purchase entity class is defined using the OWL language. The purchase entity class includes: a food category, which is used to reflect the seasonality index of market supply fluctuations and a list of compliance records that record the safety status of products; and a supplier category, which is used to quantify the reliability score and on-time rate of historical performance, and to define the minimum order quantity and emergency logistics capability Boolean values for transaction conditions.
[0014] The purchase relationships are defined as follows: a dynamic substitution relationship, used to connect two of the food categories, and to generate a food priority attribute based on the real-time inventory level and price attribute of the food category; a trust chain relationship, used to connect the buyer category and the supplier category, and to generate a trust weight attribute based on the historical transaction frequency and transaction score between the buyer category and the supplier category, as well as the on-time rate attribute of the supplier category; and a compliance association relationship, used to connect the food category or supplier category to a compliance information node, wherein the information node includes status and validity date attributes.
[0015] Furthermore, the optimization process using the reinforcement learning model includes: using the current structural information and data freshness index of the dynamic relationship graph as the state input of the reinforcement learning model; setting and using the platform purchase index to guide the training of the reinforcement learning model; and updating and completing the purchase relationship according to the state input and the platform purchase index.
[0016] The platform purchase metrics include: an accuracy item for the recommendation hit rate generated based on the dynamic relationship graph and a timeliness item calculated based on the proportion of expired and unupdated data in the dynamic relationship graph.
[0017] Furthermore, the structure of the dynamic recommendation model specifically includes:
[0018] A time information processing unit is used to receive the time-series interaction information and process the time features using periodic time encoding technology; a node memory unit is used to store and update the time-series state representation of nodes in the dynamic relationship graph according to the time features; a message passing and aggregation unit is used to dynamically filter out neighbor nodes that do not meet the predefined hard business constraints when aggregating neighbor node information; for neighbor nodes that meet the hard business constraints, the attention weight of the neighbor node information is calculated and adjusted according to the degree of meeting the soft business constraints; and an embedding generation unit is used to combine the outputs of the message passing and aggregation unit and the node memory unit to generate the purchase feature representation.
[0019] Furthermore, parsing the current purchase request constraints includes: converting the specific purchase requirements input by the user into graph query filtering conditions for screening candidate entities in the dynamic relationship graph, and into constraint feature vectors for the recommendation generation mechanism to generate the explicit purchase constraints; and using the user's historical purchase behavior data and the purchase feature representation as input, using a machine learning prediction model to identify and quantify the implicit purchase constraints.
[0020] Furthermore, the process of constructing a recommendation generation mechanism includes:
[0021] The dynamic constraint prediction unit analyzes the historical purchasing behavior and real-time attributes in the dynamic relationship graph, uses a time series model to predict potential constraint preferences, and transmits the potential constraint preferences as supplementary implicit constraints to the constraint integration unit; the constraint integration unit receives and integrates the current purchase request constraints; the multi-objective ranking and scoring unit receives the purchase feature representation and the current purchase request constraints as input features, and uses a multi-objective ranking model to calculate the ranking score of candidate recommendations; the list generation unit selects and formats the food purchase recommendation list based on the ranking scores.
[0022] A B2B food ingredient procurement recommendation system based on dynamic relationship graphs includes:
[0023] The dynamic relationship graph generation module constructs a food purchase knowledge model to define purchase entity classes and purchase relationships; it processes structured information of procurement transactions through a stream processing engine and unstructured information of procurement transactions through semantic extraction technology, mapping it to the food purchase knowledge model to generate a dynamic relationship graph; it updates the purchase entity classes in real time using an event-driven mechanism; and it deploys a reinforcement learning model to optimize the purchase relationships based on platform purchase metrics, generating an optimized dynamic relationship graph.
[0024] The dynamic recommendation model construction module is used to process the temporal interaction information in the dynamic relationship graph by adopting the C-TGN architecture and incorporating predefined business constraints, and to generate purchase feature representations.
[0025] The food ingredient recommendation generation module parses the current purchase request constraints, including explicit purchase constraints based on user input and implicit purchase constraints based on historical purchase behavior predictions; it constructs a recommendation generation mechanism to calculate the ranking scores of candidate recommendation items and generate a food ingredient purchase recommendation list based on the purchase feature representation and the current purchase request constraints.
[0026] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0027] 1. This invention constructs and maintains a highly timely dynamic relationship graph. By designing a food purchase knowledge model that deeply aligns with business needs and integrating structured transaction data from stream processing with unstructured key terms extracted through semantics, it achieves a comprehensive and accurate structured representation of information in complex B2B procurement scenarios. Combining an event-driven real-time update mechanism with a reinforcement learning optimization strategy based on platform metric feedback ensures the continuous maintenance of the graph data's accuracy, providing a solid and reliable data foundation for subsequent precise representation learning and recommendation generation.
[0028] 2. This invention utilizes the C-TGN architecture to generate dynamic purchase feature representations. By applying a dynamic recommendation model based on the C-TGN architecture, it effectively processes the temporal interaction information in the dynamic relationship graph. Furthermore, by deeply integrating hard business constraints into the network layer processing, the resulting low-dimensional embedding vectors not only accurately capture the dynamic evolution of entity states and relationships but also inherently contain information on compliance with B2B business rules and constraints, thereby improving the input quality for downstream food recommendation tasks.
[0029] 3. This invention constructs a recommendation generation system that combines explicit, implicit, and dynamic contextual constraints. By analyzing explicit purchasing requirements directly input by users and basic implicit preferences predicted based on historical behavior and feature representations, it comprehensively captures user needs. Furthermore, by introducing a dynamic constraint prediction unit into the recommendation generation mechanism and combining it with real-time graph attribute prediction of contextual constraints, it achieves a deep understanding of user needs. Moreover, by employing a multi-objective ranking model to rank candidate recommendations, this invention improves the adaptability and compliance of recommendation results for complex B2B business scenarios. Attached Figure Description
[0030] Figure 1 This invention provides a flowchart illustrating a B2B food procurement recommendation method based on a dynamic relationship graph.
[0031] Figure 2 A schematic diagram of the structure of the dynamic recommendation model is provided for this invention;
[0032] Figure 3 A schematic diagram of the recommendation generation mechanism provided for this invention;
[0033] Figure 4 This invention provides a schematic diagram of the structure of a B2B food procurement recommendation system based on dynamic relationship graphs. Detailed Implementation
[0034] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0035] Please see Figures 1 to 4 This invention provides a B2B food procurement recommendation method and system based on dynamic relationship graphs, the technical solution of which is as follows:
[0036] Example 1:
[0037] This embodiment applies to a business-to-business (B2B) food e-commerce platform targeting professional buyers such as restaurants, canteens, and food processing companies. On these platforms, buyers typically encounter the following technical challenges when making daily or periodic food purchases: information overload and matching difficulties, such as numerous suppliers, diverse food specifications, and frequent changes in key information like prices and inventory, making manual screening and matching time-consuming, labor-intensive, and prone to errors; high dynamism and timeliness requirements, as the supply of fresh food is affected by seasonality, weather, logistics, and demand often fluctuates, requiring the recommendation system to reflect these dynamic changes in real time; and complex and diverse purchasing constraints, requiring purchasing decisions to consider not only price and basic preferences but also strict adherence to hard or soft constraints such as budget limits, delivery deadlines, quality and compliance certifications, minimum order quantities from suppliers, historical reliability, and contract terms.
[0038] Existing general recommendation technologies often struggle to effectively address these issues, particularly in their ability to dynamically capture market changes and deeply integrate with complex, multi-dimensional business constraints. This results in a low match between recommended results and actual procurement needs, requiring significant manual intervention from the purchasing party for screening and decision-making, impacting procurement efficiency, increasing operating costs, and raising potential supply risks. To address these problems, a B2B food procurement recommendation method based on dynamic relationship graphs is proposed, such as... Figure 1 As shown, it includes:
[0039] Step 1: Construct a knowledge model for food purchases, which is used to define purchase entity classes and purchase relationships.
[0040] The food procurement knowledge model is a structured knowledge representation system used to provide a unified standard and rules for the subsequent construction and understanding of the Dynamic Knowledge Graph (DKG). The purchase entity class is the core concept category defined in this model, covering key elements such as food ingredients, suppliers, and procurement needs. Purchase relationships are the meaningful associations used to connect different purchase entity classes or entities of the same type, ensuring that the dynamic relationship graph accurately reflects the complex interactions and constraints in the food procurement process.
[0041] Furthermore, the process of constructing the knowledge model for the purchase of the ingredients:
[0042] The purchasing entity classes are defined using the OWL language. These classes include: Food Entities, Supplier Entities, Buyers Entities, and Compliance Information Node Entities. The Food Entities class includes basic attributes such as name and specifications, a seasonality index to reflect cyclical supply capacity, and a compliance record list to link food safety and certification information. The Supplier Entities class also includes basic information such as name and address, and defines a reliability score to comprehensively reflect historical performance, an on-time delivery rate to quantify delivery timeliness, a minimum order quantity to set transaction thresholds, and emergency logistics capabilities to identify special service capabilities. The Buyers Entities class mainly includes basic attributes such as name and type. The Compliance Information Node Entities class represents events such as certification and recalls, and includes attributes such as status and expiration date.
[0043] The seasonality index is determined based on the platform's historical average supply / sales volume of the ingredient in the current month over the past few years, after normalization (mapping to a 0-1 range). The reliability score is calculated based on predefined indicators, representing the supplier's overall performance over the past year, including a weighted sum of average score (out of 5), order fulfillment rate, low return / complaint rate related to product quality, low transaction dispute rate, and on-time delivery rate. The on-time delivery rate is calculated by statistically analyzing the percentage of orders delivered within the agreed-upon time window in the past 90 days. Emergency logistics capability information is derived from the supplier's registration information or service agreement. Compliance information nodes are determined by connecting to authoritative certification databases or valid credentials uploaded by the supplier, and verified by the system.
[0044] Further, the purchase relationship is defined as including:
[0045] Dynamic substitution relationships are used to connect two of the food categories and generate food priority attributes based on the real-time inventory level and price attributes of the food categories;
[0046] The trust chain relationship is used to connect the buyer class and the supplier class, and generates a trust weight attribute based on the historical transaction frequency and transaction score between the buyer class and the supplier class, as well as the on-time rate attribute of the supplier class.
[0047] Compliance associations are used to connect the food ingredient category or supplier category to compliance information nodes, whereby the information nodes include status and expiration date attributes. Additionally, supply relationships may be included to connect the food ingredient category and the supplier category.
[0048] The ingredient priority attribute comprehensively considers the normalized real-time inventory level and price difference, and then compares the basic category, variety, grade, and cutting method of the ingredients to set matching rules to obtain attribute similarity. For example, "a size difference of less than 10% is acceptable, score 0.8", "frozen instead of refrigerated, score 0.5", etc. The ingredient priority attribute is generated by weighted summing of real-time inventory level, price difference, and attribute similarity. The trust weight attribute is calculated by comprehensively considering historical transaction frequency, transaction score, and on-time rate, and is expressed as:
[0049] ;
[0050] in, For trust weight attributes, For the number of transactions, For the trading cycle, For maximum trading frequency, Rate the transaction. For the highest transaction score, For on-time rate, , and As weight.
[0051] In addition, the validity date attribute is directly mapped from the compliance information data source. The status attribute is dynamically updated based on date verification. The system has a built-in verification logic that periodically (e.g., daily) compares the validity date of the compliance information node with the current system date. If the current date has not exceeded the validity date, the status is set to "valid"; if it has exceeded the validity date, the status is automatically updated to "expired". For recall events, the status may be updated according to official announcements, for example, changing from "in progress" to "completed".
[0052] Table 1 Example of a Purchase Entity Class
[0053]
[0054] As shown in Tables 1 and 2, Table 1 lists the specific entity objects that form the basis of the dynamic relationship graph, showcasing the key attributes and example values of different categories of entities (including ingredients, suppliers, buyers, and compliance information). Table 2 demonstrates how these entity objects are interconnected through predefined relationship types (such as supply, substitution, trust, and compliance) to form a complex network structure. Furthermore, Table 2 explains how the key attribute values of some relationships (such as dynamic substitution and trust chains) are calculated based on data or specific algorithms, highlighting the dynamic nature and computational logic of the relationships. By using ontology languages such as OWL to formally define the purchasing entity classes and purchasing relationships, the standardization of data expression within the platform is ensured. This formal definition not only comprehensively depicts the business logic and key decision-making factors of the B2B ingredient procurement scenario but also provides a solid foundation for subsequent data integration, graph construction, and precise machine learning model training.
[0055] Table 2 Example of Purchase Relationship
[0056]
[0057] Step 2: Process the structured information of the procurement transaction through the stream processing engine, and process the unstructured information of the procurement transaction by combining semantic extraction technology, and map it to the food purchase knowledge model to generate a dynamic relationship graph.
[0058] Structured information refers to data records that are typically stored in database tables and have predefined formats and data types, while unstructured information refers to data that is flexibly formatted and usually exists in the form of free text.
[0059] Furthermore, generating and optimizing the dynamic relationship graph specifically includes: deploying a stream processing engine (such as Apache Flink or Spark Streaming) to subscribe to the message queue of procurement transaction data in real time, identifying information such as the buyer, supplier, ingredients, quantity, unit price, and expected delivery date. When non-empty fields such as attachment information and remarks are detected, the attachment content and remarks text, such as "Cold chain (<5℃) transportation required, organic certification for this batch must be included with the goods." are sent to the semantic extraction technology.
[0060] Semantic extraction technology utilizes Natural Language Processing (NLP) or Large Language Modeling (LLM) to analyze contract and memo text. The model is trained or prompted to identify and extract unstructured information. Extraction includes {"Transportation Requirements": "Cold Chain (<5℃)", "Additional Document Requirements": "Organic Certification for This Batch"}. After receiving the results from the semantic extraction service, the stream processing job maps all structured and extracted unstructured information according to a predefined "Food Purchase Knowledge Model". The mapping results (including new entities, relationships, and attribute updates) are converted into operation statements for a graph database (such as Neo4j).
[0061] Step 3: Update the purchased entity class in real time using an event-driven mechanism; deploy a reinforcement learning model to optimize the purchase relationship based on platform purchase metrics, and generate the optimized dynamic relationship graph.
[0062] Furthermore, the implementation process of the event-driven mechanism includes: proactively generating a structured event message when the transaction process status changes, data content changes, or user interaction behavior changes. This message contains key information such as the event type, occurrence time, related entity IDs (e.g., order ID, user ID, and product ID), and the changed data content. The stream processing engine subscribes to this information and executes corresponding logic based on the event content to update the data in the dynamic relationship graph (e.g., modifying the purchase entity class).
[0063] Furthermore, the optimization process using the reinforcement learning model includes: using the current structural information and data freshness index of the dynamic relationship graph as the state input of the reinforcement learning model;
[0064] The current structural information includes the purchasing entity class, purchasing relationship, and corresponding attribute values of the dynamic relationship graph, as well as historical order data; the data freshness index is expressed as follows: This is achieved by comparing the difference between the last update / calculation time of the purchasing relationship and the current time using an exponential decay function.
[0065] ;
[0066] in, To score freshness, It is a natural exponential function. The attenuation constant is For time difference.
[0067] The platform purchase metrics are set and used to guide the training of the reinforcement learning model. The reinforcement learning model updates and completes the purchase relationship based on the state input and the platform purchase metrics.
[0068] The platform purchase metric is obtained by a weighted sum of an accuracy metric and a timeliness metric, including: an accuracy metric based on the recommendation hit rate generated by the dynamic relationship graph, and a timeliness metric calculated based on the proportion of outdated data in the dynamic relationship graph; wherein, the accuracy metric is the ratio of the number of hits to the total number of recommendations, i.e., the recommendation hit rate of the food purchase recommendations in relation to the user's actual needs; the calculation process for the timeliness metric is as follows:
[0069] ;
[0070] in, For the time-sensitive item, This represents the number of expired nodes. The number of expired edges. This represents the total number of nodes. This represents the total number of sides.
[0071] Specifically, in this embodiment, the reinforcement learning model employs the DQN model. The specific operations for updating and completing the purchase relationship include adjusting the purchase relationship weights and adding / deleting relationship chains. For example, by analyzing historical order data, it is discovered that "XX Delivery Company" (supplier_B) has repeatedly supplied "organic cauliflower" (ingredient_Z) to "Restaurant A" (purchaser_X). However, in the current dynamic relationship graph, a clear supply relationship is missing between supplier_B and ingredient_Z. Based on its learned strategies, the DQN model determines that this may be a missing link and outputs an instruction to complete the "supply" relationship.
[0072] Upon receiving this instruction, the system performs the following operations: First, it uses unique identifiers to locate the nodes representing Supplier_B and Ingredient_Z. Next, to avoid duplicate creation, the system queries whether a "supply" relationship already exists between these two nodes. If the query confirms that the relationship does not exist, a database command is generated to create this new "supply" relationship (e.g., using the MERGE or CREATE statement in a graph database). Finally, the system executes the creation command, thereby updating the dynamic relationship graph and successfully adding a "supply" relationship edge between the Supplier_B and Ingredient_Z nodes. This operation makes the graph more comprehensively reflect the potential supply capacity inferred from historical data. Subsequent recommendation algorithms will include Supplier_B in the candidate pool when considering suppliers for Ingredient_Z, thus improving the accuracy and comprehensiveness of the recommendation results.
[0073] Reinforcement learning enables dynamic relationship graphs to move beyond passively receiving real-time data updates and proactively adjust and optimize themselves based on their performance in practical recommendation applications. The graph can learn which combinations of structures or parameters (such as relationship weights) better support downstream tasks, thereby improving the real-time performance and accuracy of food procurement recommendations.
[0074] A dynamic recommendation model is constructed based on predefined business constraints and the C-TGN (Constraint-Guided Temporal Graph Neural Network) architecture to process the temporal interaction information in the optimized dynamic relationship graph and generate purchase feature representations.
[0075] Among them, the temporal interaction information is the interaction record between nodes with clear timestamps in the dynamic relationship graph.
[0076] Furthermore, assume that before time point t, buyer X has just completed an order with supplier A for ingredient 001. Meanwhile, predefined business constraints include: hard business constraints (the supplier must have inventory) and soft business constraints (suppliers with a reliability score > 4.5 are preferred). Under these conditions, such as... Figure 2 As shown, the structure of the dynamic recommendation model specifically includes:
[0077] refer to Figure 2 The time information processing unit is used to receive time-series interaction information involving buyer_X, supplier_A and ingredient_001, calculate the time difference between the current time and the transaction completion time, and use periodic time coding technology (such as Fourier features) to convert the time difference into time features, capturing the time information of the interaction and its position in the business cycle (such as week).
[0078] refer to Figure 2 The node memory unit is used to store and update the temporal state representation of nodes in the dynamic relationship graph according to the time characteristics, including the interaction and time information related to the buyer_X.
[0079] refer to Figure 2The message passing and aggregation unit identifies neighbor nodes related to buyer_X around time t, such as supplier_A (who has recently interacted with the company), supplier_B (who has historically cooperated but not recently interacted with the company), and frequently purchased food item_001. When aggregating neighbor node information, nodes that do not meet hard business constraints (e.g., zero inventory) are dynamically filtered out. For example, if supplier_B currently has zero inventory of a certain food item that buyer_X might be interested in, its information will be filtered out. For nodes that meet hard constraints, the attention weight of neighbor node information is calculated and adjusted based on the degree to which soft business constraints are met (e.g., reliability score > 4.5). For example, supplier_A has a reliability score of 4.8, which is higher than 4.5, and therefore receives a higher attention weight; while another supplier_C that meets hard constraints has a score of 4.6, and therefore receives a relatively lower attention weight.
[0080] refer to Figure 2 The embedded generation unit is used to combine the outputs of the message passing and aggregation unit and the node memory unit to generate a purchase feature representation of buyer_X at time t, including information such as supplier_A, supplier_C, and ingredient_001.
[0081] By employing steps such as time-based processing, memory storage, neighbor aggregation, and embedding generation, efficient fusion of multi-source information, including graph structure, node attributes, temporal interactions, and business rules, is achieved, resulting in a richer and more expressive feature representation. Since the purchased feature representation fully considers temporal dynamics and business constraints during the preprocessing stage, the recommendation generation mechanism based on this representation can more directly filter out recommendations that are both constraint-compliant and highly relevant. This not only reduces the burden of complex constraint checks in the recommendation stage but also improves the accuracy, relevance, and overall computational efficiency of the recommendation results.
[0082] The current purchase request constraints are analyzed, including explicit purchase constraints based on user input and implicit purchase constraints based on predictions of historical purchase behavior. A recommendation generation mechanism is constructed to calculate the ranking scores of candidate recommendation items and generate a list of recommended food items based on the purchase feature representation and the current purchase request constraints.
[0083] Furthermore, parsing the current purchase request constraint includes: converting the user input into graph query filtering conditions for screening candidate entities in the dynamic relationship graph, and converting it into constraint feature vectors for the recommendation generation mechanism to generate the explicit purchase constraint; and using the user's historical purchase behavior data and the purchase feature representation as input, using a machine learning prediction model to identify and quantify the implicit purchase constraint.
[0084] Among them, user input refers to the various procurement conditions and requirements that can be clearly provided; candidate entities are entity classes that initially meet the hard explicit constraints of user input in the dynamic relationship graph; historical purchase behavior data are all procurement-related activity records and statistical information of the purchaser on the platform in the past.
[0085] Specifically, when Restaurant A initiates a purchase request for "organic romaine lettuce," the first step is constraint resolution. For example, the purchase quantity is 80 kilograms, the budgeted unit price is capped at 7 yuan per kilogram, delivery must be completed by a specific date, and the supplier and product must have valid organic certification. These explicit purchase constraints are transformed into two types of structured information: one part serves as a graph query filter, used for efficient initial screening in the dynamic relational graph database, directly excluding candidates that do not meet the hard requirements for inventory, price, certification, or delivery capability; the other part is encoded as constraint feature vectors, which are provided as input to the recommendation generation mechanism.
[0086] Simultaneously, the system initiates an implicit constraint prediction process. This process utilizes historical purchase data from "Restaurant A" and combines it with current purchase characteristics, inputting this data into a machine learning prediction model. The machine learning prediction model, using an SVM model, can be trained to identify latent preferences not explicitly stated by users but reflected in their long-term behavior, such as a consistent preference for organic products, a cyclical pattern of increased weekend purchases, or a high sensitivity to supplier on-time delivery rates. These latent preferences are represented as basic implicit constraints, providing a reference for the recommendation generation mechanism.
[0087] By processing explicit and implicit constraints, user requirements and historical behaviors are transformed into a machine-usable format, laying the foundation for automated constraint processing and ensuring the effective application of constraint information in the recommendation process. Furthermore, the implicit constraint prediction function enables deeply personalized recommendations, improving fit and satisfaction. Hard constraints are transformed into early filtering conditions, improving recommendation efficiency and ensuring the recommendation system aligns with food procurement needs.
[0088] Furthermore, such as Figure 3 As shown, the process of constructing a recommendation generation mechanism includes:
[0089] The dynamic constraint prediction unit is used to analyze the historical purchasing behavior (e.g., it is found that the purchase volume on weekends has increased significantly) and the real-time attributes in the dynamic relationship graph (e.g., the current date is Thursday afternoon and the graph shows that some suppliers' emergency logistics capacity on weekends is false), use a time series model (e.g., LSTM) to predict potential constraint preferences, and transmit the potential constraint preferences as supplementary implicit constraints to the constraint integration unit.
[0090] The constraint integration unit receives and integrates the current purchase request constraints. It receives explicit purchase constraints input by the user (such as a budget limit of 7.0 yuan / kg, mandatory organic certification, and delivery no later than next Monday), combines these with previously predicted basic implicit constraints of the buyer_X (such as a preference for high reliability scores), and supplementary implicit constraints generated by the dynamic constraint prediction unit (requirements for weekend delivery capability). This unit integrates these constraints from different sources and of different natures into a structured constraint set, ready for use in ranking and scoring.
[0091] A multi-objective ranking and scoring unit receives the purchase feature representation and the current purchase request constraint from the constraint integration unit, which together constitute the input features. A pre-trained objective ranking model (e.g., LambdaMART) is employed. For each candidate recommendation (e.g., "organic romaine lettuce from supplier A"), the model directly calculates and outputs a final ranking score based on its received input features.
[0092] The list generation unit is used to select and format the ingredient purchase recommendation list based on the sorting score.
[0093] The dynamic constraint prediction unit enables the recommendation method to adjust its strategy in real time based on time and market changes, predicting potential user needs and making food procurement recommendations more accurate. The constraint integration unit integrates user input, historical, and dynamic prediction constraints, providing a comprehensive basis for ranking. The multi-objective ranking and scoring unit comprehensively evaluates recommendation options, balancing matching degree, business rules, and supply chain stability, avoiding the limitations of a single standard. These components work together to improve the quality and usability of food procurement recommendations, facilitating subsequent optimization and upgrades.
[0094] This invention improves the accuracy, timeliness, and satisfaction of multi-dimensional business constraints in food procurement recommendations, effectively enhancing procurement decision-making efficiency. First, it constructs and optimizes a dynamic relationship graph integrating structured and unstructured information, providing a comprehensive, accurate, and adaptively evolving knowledge base for the recommendation system, ensuring the timeliness and high quality of the recommendations. Second, it utilizes a dynamic recommendation model to process the graph, generating purchase feature representations that not only capture complex temporal dynamics and entity relationships but also inherently incorporate business constraints, improving the effectiveness of the representation. Third, by systematically analyzing the explicit and implicit constraints of the purchaser and combining them with high-quality purchase feature representations, and after sorting through a specific recommendation generation mechanism, the resulting food procurement recommendation list precisely meets the complex needs of B2B scenarios.
[0095] Example 2:
[0096] To further describe Embodiment 1, taking a chain fast-food restaurant as an example, a B2B food procurement recommendation system based on a dynamic relationship graph is implemented, such as... Figure 4 As shown, it includes:
[0097] refer to Figure 4 The dynamic relationship graph generation module constructs a food purchase knowledge model to define purchase entity classes and purchase relationships; it processes structured information of procurement transactions through a stream processing engine and unstructured information of procurement transactions through semantic extraction technology, mapping it to the food purchase knowledge model to generate a dynamic relationship graph; it updates the purchase entity classes in real time using an event-driven mechanism; and it deploys a reinforcement learning model to optimize the purchase relationships based on platform purchase metrics, generating an optimized dynamic relationship graph.
[0098] Specifically, Table 3 shows a comparison of some data related to "a certain fast food chain" (buyer_X), "a certain ecological farm" (supplier_A), "a certain delivery company" (supplier_B), and "organic cauliflower" (ingredient_Z) in the dynamic relationship graph before and after a certain optimization cycle (time point T1 and time point T2).
[0099] Table 3 Comparison of Dynamic Relationship Map Before and After Optimization
[0100] ;
[0101] refer to Figure 4 The dynamic recommendation model construction module is used to adopt the C-TGN architecture and incorporate predefined business constraints to process the temporal interaction information in the dynamic relationship graph and generate purchase feature representations.
[0102] Table 4. Comparison Examples of Recommended B2B Food Procurement Schemes
[0103] ;
[0104] refer to Figure 4 The food ingredient recommendation generation module parses the current purchase request constraints, including explicit purchase constraints based on user input and implicit purchase constraints based on historical purchase behavior predictions; it constructs a recommendation generation mechanism to calculate the ranking scores of candidate recommendation items and generate a food ingredient purchase recommendation list based on the purchase feature representation and the current purchase request constraints.
[0105] Table 4 shows an example of a list of recommended food purchase options, with three options generated based on the sorted scores for users to choose from.
[0106] To demonstrate the effectiveness of this invention, a baseline scheme is used for comparison. Specifically, the baseline scheme involves constructing a knowledge graph containing entities and relationships similar to those in this invention, but with static content (e.g., supplier ratings and inventory status are not real-time) and without reinforcement learning optimization. Then, the standard graph embedding algorithm Node2Vec is used to learn static embedding representations of the entities. During recommendation, initial matching is performed based on user requests and embedding similarity, followed by hard-constraint filtering of the results.
[0107] Table 5 shows the performance metrics of different recommendation schemes. The recommendation adoption rate is the proportion of products or suppliers that appear in the top 5 of the system's recommendation list when a user ultimately places an order. The new qualified supplier discovery rate refers to the proportion of "new" suppliers among the recommended schemes adopted by the user, suppliers who are not frequently cooperated with in the past 3 months but meet the requirements. Observations show that this invention can shorten decision-making time and improve the average on-time rate of recommended suppliers.
[0108] Table 5 Comparison of performance metrics of different recommended solutions
[0109] ;
[0110] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A B2B food procurement recommendation method based on dynamic relationship graphs, characterized in that, include: Construct a knowledge model for food purchases to define purchase entity classes and purchase relationships; The structured information of the procurement transaction is processed by the stream processing engine, and the unstructured information of the procurement transaction is processed by the semantic extraction technology. The information is then mapped to the food purchase knowledge model to generate a dynamic relationship graph. The purchase entity class is updated in real time using an event-driven mechanism, and the purchase relationship is optimized based on the platform's purchase metrics using a reinforcement learning model to generate the optimized dynamic relationship graph. Based on predefined business constraints and the C-TGN architecture, a dynamic recommendation model is constructed to process the temporal interaction information in the optimized dynamic relationship graph and generate purchase feature representations. The specific structure of the dynamic recommendation model includes: A time information processing unit is used to receive the time-series interaction information and process the time features using periodic time encoding technology; a node memory unit is used to store and update the time-series state representation of nodes in the dynamic relationship graph according to the time features; a message passing and aggregation unit is used to dynamically filter out neighbor nodes that do not meet the predefined hard business constraints when aggregating neighbor node information; for neighbor nodes that meet the hard business constraints, the attention weight of the neighbor node information is calculated and adjusted according to the degree of meeting the soft business constraints; and an embedding generation unit is used to combine the outputs of the message passing and aggregation unit and the node memory unit to generate the purchase feature representation. The current purchase request constraints are analyzed, including explicit purchase constraints based on user input and implicit purchase constraints based on predictions of historical purchase behavior. A recommendation generation mechanism is constructed to calculate the ranking scores of candidate recommendation items and generate a list of recommended food items based on the purchase feature representation and the current purchase request constraints.
2. The B2B food procurement recommendation method based on dynamic relationship graphs according to claim 1, characterized in that, The process of constructing the knowledge model for purchasing the ingredients: The purchase entity class is defined using the OWL language. The purchase entity class includes: a food category, which is used to reflect the seasonality index of market supply fluctuations and a list of compliance records that record the safety status of products; and a supplier category, which is used to quantify the reliability score and on-time rate of historical performance, and Boolean values that define the minimum order quantity and emergency logistics capabilities for transaction conditions. The purchase relationships are defined as follows: a dynamic substitution relationship, used to connect two of the food categories, and to generate a food priority attribute based on the real-time inventory level and price attribute of the food category; a trust chain relationship, used to connect the buyer category and the supplier category, and to generate a trust weight attribute based on the historical transaction frequency and transaction score between the buyer category and the supplier category, as well as the on-time rate attribute of the supplier category; and a compliance association relationship, used to connect the food category or supplier category to a compliance information node, wherein the information node includes status and validity date attributes.
3. The B2B food procurement recommendation method based on dynamic relationship graphs according to claim 1, characterized in that, The optimization process using the reinforcement learning model includes: taking the current structural information of the dynamic relationship graph and the data freshness index as the state input of the reinforcement learning model; comparing the difference between the last update / calculation time of the purchase relationship and the current time using an exponential decay function; setting and using the platform purchase index to guide the training of the reinforcement learning model; and updating and completing the purchase relationship according to the state input and the platform purchase index. The platform purchase metrics include: an accuracy item for the recommendation hit rate generated based on the dynamic relationship graph and a timeliness item calculated based on the proportion of expired and unupdated data in the dynamic relationship graph.
4. The B2B food procurement recommendation method based on dynamic relationship graphs according to claim 1, characterized in that, Parsing the current purchase request constraints includes: converting the specific purchase requirements input by the user into graph query filtering conditions for screening candidate entities in the dynamic relationship graph, and into constraint feature vectors for the recommendation generation mechanism to generate the explicit purchase constraints; and using the user's historical purchase behavior data and the purchase feature representation as input, using a machine learning prediction model to identify and quantify the implicit purchase constraints.
5. The B2B food procurement recommendation method based on dynamic relationship graphs according to claim 1, characterized in that, The process of building a recommendation generation mechanism includes: A dynamic constraint prediction unit is used to analyze the historical purchasing behavior and the real-time attributes in the dynamic relationship graph, predict potential constraint preferences using a time series model, and transmit the potential constraint preferences as supplementary implicit constraints to the constraint integration unit; the constraint integration unit is used to receive and integrate the current purchase request constraints; a multi-objective ranking and scoring unit is used to receive the purchase feature representation and the current purchase request constraints as input features, and calculate the ranking score of candidate recommendations using a multi-objective ranking model; a list generation unit is used to select and format the food purchase recommendation list based on the ranking scores.
6. A B2B food ingredient procurement recommendation system based on dynamic relationship graphs, characterized in that, include: The dynamic relationship graph generation module constructs a knowledge model for food purchases, used to define purchase entity classes and purchase relationships; The structured information of the procurement transaction is processed by a stream processing engine, and the unstructured information of the procurement transaction is processed by semantic extraction technology. The information is then mapped to the food purchase knowledge model to generate a dynamic relationship graph. The purchase entity class is updated in real time using an event-driven mechanism. Deploy a reinforcement learning model, optimize the purchase relationship based on platform purchase metrics, and generate the optimized dynamic relationship graph. The dynamic recommendation model construction module is used to process the temporal interaction information in the dynamic relationship graph by adopting the C-TGN architecture and incorporating predefined business constraints, and to generate purchase feature representations. The structure of the dynamic recommendation model specifically includes: A time information processing unit is used to receive the time-series interaction information and process the time features using periodic time encoding technology; a node memory unit is used to store and update the time-series state representation of nodes in the dynamic relationship graph according to the time features; a message passing and aggregation unit is used to dynamically filter out neighbor nodes that do not meet the predefined hard business constraints when aggregating neighbor node information; for neighbor nodes that meet the hard business constraints, the attention weight of the neighbor node information is calculated and adjusted according to the degree of meeting the soft business constraints; and an embedding generation unit is used to combine the outputs of the message passing and aggregation unit and the node memory unit to generate the purchase feature representation. The food ingredient recommendation generation module parses the current purchase request constraints, including explicit purchase constraints based on user input and implicit purchase constraints based on historical purchase behavior predictions; it constructs a recommendation generation mechanism to calculate the ranking scores of candidate recommendation items and generate a food ingredient purchase recommendation list based on the purchase feature representation and the current purchase request constraints.
Citation Information
Patent Citations
Bidding and purchasing information recommendation system and recommendation method based on knowledge graph
CN110148043A
Scientific and technological resource recommendation method and system based on user portraits and situations
CN113157752A