Canteen food material traceability and dynamic purchase optimization method and system

By classifying and storing food supply chain data in the blockchain and grouping it using the fuzzy C-Means clustering algorithm, calculating the cost-effectiveness coefficient of ingredients and generating dynamic procurement plans, the problems of data security and traceability accuracy in the food supply chain are solved, and efficient data management and procurement optimization are achieved.

CN120851901APending Publication Date: 2025-10-28WUHAN YIGELE NETWORK TECHNOLOGY CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510934603.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-08
Publication Date
2025-10-28

AI Technical Summary

Technical Problem

The existing technology has problems such as insufficient data security protection in the food supply chain, difficulty in improving the accuracy of food data traceability, and low efficiency of data classification and analysis.

Method used

By using blockchain technology, food supply chain data is categorized and stored in the main chain and subordinate chains. The data in the subordinate chains is grouped using the fuzzy C-Means clustering algorithm, and the cost-effectiveness coefficient is calculated based on the cost and sales price of ingredients to generate dynamic procurement plans.

Benefits of technology

It improved the accuracy of food data traceability and the efficiency of classification analysis, optimized procurement plans, reduced procurement costs, and enhanced the overall efficiency of the food supply chain.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120851901A_ABST
    Figure CN120851901A_ABST
Patent Text Reader

Abstract

The invention discloses a canteen food material traceability and dynamic purchase optimization method and system, and relates to the technical field of block chains. The method comprises the steps of obtaining various data in a food supply chain; classifying various types of data, and storing the data in a block chain, the block chain being divided into a main chain and a subordinate chain; grouping the data stored in the subordinate chain according to a fuzzy C-Means clustering algorithm; obtaining index information of the main chain, and determining grouped data of the subordinate chain according to the index information; the grouped data comprises costs and sales prices of the food materials; calculating the cost performance coefficient of the food material according to the cost and the sales price of the food material; according to the invention, the data security and traceability can be improved, and the purchase cost can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of blockchain technology, specifically to a method and system for tracing and optimizing the dynamic procurement of canteen ingredients. Background Technology

[0002] Blockchain technology is a decentralized, immutable, distributed ledger technology that creates a transparent ledger by storing data across multiple nodes. It utilizes cryptographic methods to ensure data security and leverages smart contracts to automate the execution of contract terms; thus improving data security and transparency while reducing trust costs and optimizing business processes.

[0003] Existing technology (publication number: CN110472989A) discloses a blockchain-based food traceability method and system, comprising: a blockchain node receiving distribution information and identity verification information sent by food distributors at various levels; wherein, the distribution information sent by each level of food distributor includes: the quantity of food distributed by the food distributor at that level, information on all the food distributors at the next higher level of that level, the quantity of food distributed by each of the previous higher-level food distributors to the food distributor at that level, information on all the food distributors at the next lower level of that level, and the quantity of food distributed by the food distributor at that level to each of the next lower-level food distributors; the blockchain node verifies the identity of each level of food distributor through the identity verification information and uploads the distribution information sent by the verified food distributors to the blockchain, so as to trace the origin of the food based on the blockchain.

[0004] However, in practical applications, the following shortcomings still exist: insufficient data security in the food supply chain, difficulty in improving the accuracy of food data traceability, and low efficiency in data classification and analysis. Summary of the Invention

[0005] The purpose of this invention is to address the problems of insufficient data security in the food supply chain, difficulty in improving the accuracy of food data traceability, and low efficiency of data classification and analysis. Therefore, this invention proposes a method and system for optimizing the traceability and dynamic procurement of canteen ingredients.

[0006] The objective of this invention can be achieved through the following technical solutions:

[0007] First, a method for sourcing and optimizing dynamic procurement of food ingredients for canteens is proposed. The method includes:

[0008] Acquire various types of data in the food supply chain; classify the various types of data and store them in a blockchain, which is divided into a main chain and subordinate chains. The main chain is responsible for the management of the subordinate chains, and each subordinate chain includes at least one subordinate chain.

[0009] Group the data stored in the dependent chain according to the fuzzy C-Means clustering algorithm;

[0010] Obtain the index information of the main chain, and determine the grouping data of the subordinate chains based on the index information; the grouping data includes the cost and selling price of the ingredients;

[0011] The cost-effectiveness coefficient of the ingredients is calculated based on their cost and selling price; an adjusted procurement plan is generated based on the cost-effectiveness coefficient; the cost-effectiveness coefficient is an indicator describing the cost-effectiveness of the ingredients.

[0012] Optionally, the process of classifying and storing various types of data in the blockchain includes:

[0013] Extract feature parameters from various types of data, construct feature vectors based on the feature parameters, and input the feature vectors into the data storage model to obtain storage scores for various types of data;

[0014] Retrieve preset storage scoring thresholds from the database, classify various types of data into different levels, and store them on different blockchains;

[0015] The storage scoring thresholds include a first threshold, a second threshold, and a third threshold;

[0016] If the storage score is less than the first threshold, the data will be classified as the first level and stored in the main blockchain.

[0017] If the first threshold ≤ storage score < second threshold, then the data is divided into the second level, and the data of the second level is stored in the first slave chain of the blockchain;

[0018] If the second threshold ≤ storage score ≤ third threshold, then the data is divided into the third level, and the data of the third level is stored in the second sub-chain of the blockchain;

[0019] If the storage score is greater than the third threshold, the data will be classified into the fourth level, and the data of the fourth level will be stored in the third sub-chain of the blockchain.

[0020] Optionally, the data stored in the dependent chain is grouped according to the fuzzy C-Means clustering algorithm, including:

[0021] S1: Divide the data stored in the dependent chain into several sample groups and initialize the data for each sample; obtain the minimum loss function using the fuzzy C-Means clustering algorithm:

[0022]

[0023] Where J(u,c) represents the minimum loss function, n represents the total number of samples, c represents the total number of clusters; m represents the fuzziness exponent, and the value of m ranges from (2,+∞), x i c represents the number of the i-th sample; ju represents the center vector of the j-th cluster; ij ||x represents the membership degree of the i-th sample in the j-th cluster; i -c j || represents the number of samples x i To cluster center c j The Euclidean distance; j = 1, 2, ..., c; i = 1, 2, ..., n;

[0024] S2: Further optimize the minimum loss function: through u ij and c j Alternate updates, updating membership degree u ij The calculation formula is: If the distance between the i-th sample and the center vector of the j-th cluster is 0, then the membership degree of that sample is set to 1; k Represent the center vector of the k-th cluster; update the cluster center c. j The calculation formula is:

[0025] S3: Repeat step S2 until the value of the minimum loss function J(u,c) is less than the preset threshold or the maximum number of iterations is reached. Finally, the clusters corresponding to each number of samples are obtained, and the samples are grouped according to the clusters.

[0026] Optionally, the grouping data of the dependent chain can be determined based on the index information, including:

[0027] Lock the corresponding group data on the slave chain, and generate the same locked group data on the slave chain on the main chain; the index information is the index address corresponding to each group on the slave chain; query the main chain to generate the locked group data on the slave chain based on the identification information.

[0028] Optionally, the cost-effectiveness coefficient of the ingredients is calculated based on their cost and selling price; this coefficient is then used to generate an adjusted procurement plan, including:

[0029] The cost-effectiveness coefficient is calculated by comparing the current cost of ingredients with their selling price.

[0030] Compare the cost-effectiveness ratio with a preset threshold;

[0031] If the cost-effectiveness ratio is less than the preset threshold, the procurement plan will be downgraded.

[0032] If the cost-effectiveness ratio is greater than or equal to the preset threshold, the procurement plan will be adjusted upwards.

[0033] Adjusting the procurement plan includes lowering the procurement plan and raising the procurement plan.

[0034] A canteen food ingredient traceability and dynamic procurement optimization system is proposed, including:

[0035] Block storage module: acquires various types of data in the food supply chain; classifies the various types of data and stores them in the blockchain, which is divided into a main chain and subordinate chains. The main chain is responsible for the management of the subordinate chains, and each subordinate chain includes at least one subordinate chain.

[0036] Subordinate chain grouping module: Groups the data stored in the subordinate chain according to the fuzzy C-Means clustering algorithm;

[0037] Data query module: Obtains the index information of the main chain and determines the grouped data of the subordinate chain based on the index information; the grouped data includes the cost and selling price of the ingredients;

[0038] Dynamic adjustment module: Calculates the cost-effectiveness coefficient of ingredients based on their cost and selling price; generates an adjustment procurement plan based on the cost-effectiveness coefficient; the cost-effectiveness coefficient is an indicator describing the cost-effectiveness of ingredients.

[0039] Optional, the block storage module includes a storage scoring module and a level division module:

[0040] The storage scoring module is used to extract feature parameters of various types of data, construct feature vectors based on the feature parameters, and input the feature vectors into the data storage model to obtain storage scores for various types of data.

[0041] The level division module is used to obtain a preset storage scoring threshold from the database, divide various types of data into different levels, and store them on different blockchains.

[0042] The storage scoring thresholds include a first threshold, a second threshold, and a third threshold;

[0043] If the storage score is less than the first threshold, the data will be classified as the first level and stored in the main blockchain.

[0044] If the first threshold ≤ storage score < second threshold, then the data is divided into the second level, and the data of the second level is stored in the first slave chain of the blockchain;

[0045] If the second threshold ≤ storage score ≤ third threshold, then the data is divided into the third level, and the data of the third level is stored in the second sub-chain of the blockchain;

[0046] If the storage score is greater than the third threshold, the data will be classified into the fourth level, and the data of the fourth level will be stored in the third sub-chain of the blockchain.

[0047] Optional, the subordinate chain grouping module includes a data processing module and a data optimization module:

[0048] The data processing module is used to divide the data stored in the dependent chain into various sample numbers and initialize the data of each sample; it also obtains the minimum loss function through the fuzzy C-Means clustering algorithm.

[0049]

[0050] Where J(u,c) represents the minimum loss function, n represents the total number of samples, c represents the total number of clusters; m represents the fuzziness exponent, and the value of m ranges from (2,+∞), x i c represents the number of the i-th sample; j u represents the center vector of the j-th cluster; ij ||x represents the membership degree of the i-th sample in the j-th cluster; i -c j || represents the number of samples x i To cluster center c j The Euclidean distance; j = 1, 2, ..., c; i = 1, 2, ..., n;

[0051] The data optimization module is used to optimize the minimum loss function: through u ij and c j Alternate updates, updating membership degree u ij The calculation formula is: If the distance between the i-th sample and the center vector of the j-th cluster is 0, then the membership degree of that sample is set to 1; k Represent the center vector of the k-th cluster; update the cluster center c. j The calculation formula is: The process continues until the value of the minimum loss function J(u,c) is less than a preset threshold or the maximum number of iterations is reached. Finally, the clusters corresponding to each number of samples are obtained, and the samples are grouped according to the clusters.

[0052] Optional, the data query module includes a data transfer module:

[0053] The data transfer module is used to lock the corresponding group data on the slave chain, and the main chain generates the same locked group data on the slave chain; the index information is the index address corresponding to each group on the slave chain; the main chain is queried based on the identification information to generate the locked group data on the slave chain.

[0054] Optional, dynamic adjustment modules, including adjustments to the procurement module:

[0055] The adjusted procurement module is used to calculate the cost-performance ratio by comparing the current cost of ingredients with their selling price.

[0056] Compare the cost-effectiveness ratio with a preset threshold;

[0057] If the cost-effectiveness ratio is less than the preset threshold, the procurement plan will be downgraded.

[0058] If the cost-effectiveness ratio is greater than or equal to the preset threshold, the procurement plan will be adjusted upwards.

[0059] Adjusting the procurement plan includes lowering the procurement plan and raising the procurement plan.

[0060] The beneficial effects of this invention are:

[0061] This invention proposes a method for traceability and dynamic procurement optimization of canteen ingredients. It involves acquiring various data from the food supply chain; classifying and storing this data in a blockchain, which is divided into a main chain and subordinate chains, with each subordinate chain containing at least one sub-chain; grouping the data stored in the subordinate chains using a fuzzy C-Means clustering algorithm; obtaining the index information of the main chain and determining the grouped data of the subordinate chains based on this information; the grouped data includes the cost and selling price of the ingredients; calculating the cost-effectiveness coefficient of the ingredients based on their cost and selling price; and generating and adjusting procurement plans based on the cost-effectiveness coefficient. By storing food supply chain data on the blockchain and coordinating between the main chain and subordinate chains, data security and traceability are ensured. The fuzzy C-Means clustering algorithm efficiently classifies data such as ingredient costs and selling prices, facilitating subsequent analysis. Determining grouped data based on index information allows for accurate acquisition of ingredient costs and selling prices, enabling the calculation of the cost-effectiveness coefficient, which helps optimize procurement plans, reduce procurement costs, and improve the overall efficiency of the food supply chain. Attached Figure Description

[0062] Figure 1 A flowchart illustrating a method for sourcing and optimizing dynamic procurement of canteen ingredients, provided in an embodiment of the present invention;

[0063] Figure 2 This is a framework diagram of a canteen food traceability and dynamic procurement optimization system provided in an embodiment of the present invention. Detailed Implementation

[0064] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. 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 making creative efforts are within the scope of protection of the present invention.

[0065] This invention provides a method for sourcing and optimizing dynamic procurement of food ingredients for canteens. See also... Figure 1 , Figure 1A flowchart illustrating a method for sourcing and optimizing dynamic procurement of food ingredients for a canteen, provided by an embodiment of the present invention. The method includes the following steps:

[0066] Acquire various types of data in the food supply chain; classify the data and store it in the blockchain. The blockchain is divided into a main chain and subordinate chains. The main chain is responsible for the management of subordinate chains, and each subordinate chain includes at least one subordinate chain.

[0067] Group the data stored in the dependent chain according to the fuzzy C-Means clustering algorithm;

[0068] Obtain the index information of the main chain, and determine the grouping data of the subordinate chains based on the index information; the grouping data includes the cost and selling price of the ingredients;

[0069] The cost-effectiveness coefficient of ingredients is calculated based on their cost and selling price; an adjusted procurement plan is generated based on the cost-effectiveness coefficient; the cost-effectiveness coefficient is an indicator describing the cost-effectiveness of ingredients.

[0070] This invention provides a method for sourcing and optimizing dynamic procurement of canteen ingredients. It utilizes blockchain to store food supply chain data, coordinating between the main chain and subordinate chains to ensure data security and traceability. A fuzzy C-Means clustering algorithm is employed to group data from subordinate chains, efficiently classifying data such as ingredient costs and sales prices for easier subsequent analysis. By determining grouped data based on index information, ingredient costs and sales prices can be accurately obtained, allowing for the calculation of the ingredient's cost-effectiveness coefficient. This metric measures the cost-effectiveness of ingredients, helping to optimize procurement plans, reduce procurement costs, and improve the overall efficiency of the food supply chain.

[0071] Specifically, the process of classifying and storing various types of data in the blockchain includes:

[0072] Extract feature parameters from various types of data, construct feature vectors based on the feature parameters, and input the feature vectors into the data storage model to obtain storage scores for various types of data;

[0073] Retrieve preset storage scoring thresholds from the database, classify various types of data into different levels, and store them on different blockchains;

[0074] Storage scoring thresholds include a first threshold, a second threshold, and a third threshold;

[0075] If the storage score is less than the first threshold, the data will be classified as the first level, and the data of the first level will be stored on the main chain of the blockchain.

[0076] If the first threshold ≤ storage score < second threshold, then the data is divided into the second level, and the data of the second level is stored in the first slave chain of the blockchain;

[0077] If the second threshold ≤ storage score ≤ third threshold, then the data is divided into the third level, and the data of the third level is stored in the second sub-chain of the blockchain;

[0078] If the storage score is greater than the third threshold, the data will be classified into the fourth level, and the data of the fourth level will be stored in the third sub-chain of the blockchain.

[0079] Specifically, it should be noted that the data storage model is an artificial intelligence model obtained through pre-training; the storage score is used to describe the location of various types of data on the blockchain; and the storage score threshold is obtained by staff based on historical experience.

[0080] The specific training process of the data storage model:

[0081] The system retrieves feature vectors and storage scores from the database, integrates the feature vectors and their corresponding storage scores into several training data and test data, imports the training data into the artificial intelligence model for training, and uses the test data to test the trained artificial intelligence model. Finally, it obtains a data storage model with feature vectors and their corresponding storage scores as inputs and storage scores as outputs, where the artificial intelligence model is an MLP model, etc.

[0082] In one implementation, the main chain is the first blockchain generated by the system; the subordinate chains are blockchains extended from the main chain using sidechain technology; the first subordinate chain is the first extension chain of the main chain, the second subordinate chain is an extension of the first-level subordinate chain, and the third subordinate chain is an extension of the second-level subordinate chain; the data stored in the first subordinate chain includes production and initial processing costs, production quantity, acquisition costs, acquisition batches and quantities, acquisition personnel information, etc.; the data stored in the second subordinate chain includes transportation costs, transportation batches and quantities, etc.; the data stored in the third subordinate chain includes transportation costs, transportation batches and quantities, purchase price, sales price, etc.

[0083] Specifically, the data stored in the dependent chain is grouped according to the fuzzy C-Means clustering algorithm, including:

[0084] S1: Divide the data stored in the dependent chain into several sample groups and initialize the data for each sample; obtain the minimum loss function using the fuzzy C-Means clustering algorithm:

[0085]

[0086] Where J(u,c) represents the minimum loss function, n represents the total number of samples, c represents the total number of clusters; m represents the fuzziness exponent, and the value of m ranges from (2,+∞), x i c represents the number of the i-th sample; j u represents the center vector of the j-th cluster; ij ||x represents the membership degree of the i-th sample in the j-th cluster; i-c j || represents the number of samples x i To cluster center c j The Euclidean distance; j = 1, 2, ..., c; i = 1, 2, ..., n;

[0087] S2: Further optimize the minimum loss function: through u ij and c j Alternate updates, updating membership degree u ij The calculation formula is: If the distance between the i-th sample and the center vector of the j-th cluster is 0, then the membership degree of that sample is set to 1; k Represent the center vector of the k-th cluster; update the cluster center c. j The calculation formula is:

[0088] S3: Repeat step S2 until the value of the minimum loss function J(u,c) is less than the preset threshold or the maximum number of iterations is reached. Finally, the clusters corresponding to each number of samples are obtained, and the samples are grouped according to the clusters.

[0089] In one implementation, the sample data is divided into different clusters. By using the minimum loss function and the alternating updates of membership degree and cluster center, the cluster corresponding to each number of samples can be effectively determined, achieving reasonable data grouping. This facilitates subsequent data processing and improves the efficiency and accuracy of data processing.

[0090] Specifically, the grouping data of the dependent chain is determined based on the index information, including:

[0091] Lock the corresponding group data on the slave chain, and generate the same locked group data on the slave chain on the main chain; the index information is the index address corresponding to each group on the slave chain; query the main chain to generate the locked group data on the slave chain based on the identification information.

[0092] In one implementation, the index information is stored on the main chain. For example, in the blockchain field, the main chain works in collaboration with multiple subordinate chains. The subordinate chains group and encrypt the data in chronological order at regular intervals. The main chain generates the corresponding group data through the blocks of the cross-chain subordinate chains and then queries the corresponding group data through the index information in the main chain.

[0093] By locking grouped data in the subordinate chain and generating corresponding data in the main chain, data consistency and protection are ensured; index information is associated with the grouped address in the subordinate chain to improve query efficiency; and the locked data generated in the main chain is queried based on the identifier information to achieve rapid data location and verification, thereby enhancing the reliability and security of data management.

[0094] Specifically, the cost-effectiveness ratio of ingredients is calculated based on their cost and selling price; this ratio is then used to generate an adjusted procurement plan, including:

[0095] The cost-effectiveness coefficient is calculated by comparing the current cost of ingredients with their selling price.

[0096] Compare the cost-effectiveness ratio with a preset threshold;

[0097] If the cost-effectiveness ratio is less than the preset threshold, the procurement plan will be downgraded.

[0098] If the cost-effectiveness ratio is greater than or equal to the preset threshold, the procurement plan will be adjusted upwards.

[0099] Specifically, it should be noted that adjusting the procurement plan includes both lowering the procurement plan and raising the procurement plan;

[0100] In one implementation method, the procurement plan is reduced as follows:

[0101] Let's assume the ingredient we're currently purchasing is cucumber;

[0102] The cost-effectiveness coefficient is calculated as follows: the cost of cucumbers is 0.5 yuan / jin, and the selling price is 2 yuan / jin. Therefore, the cost-effectiveness coefficient = 0.5 ÷ 2 = 0.25. Comparing this to the preset threshold: the preset cost-effectiveness coefficient threshold is 0.3. Since 0.25 is less than 0.3, a reduced procurement plan is adopted.

[0103] Specific measures to reduce costs include: reducing the purchase volume of cucumbers, for example, reducing the purchase volume from 1,000 jin per week to 800 jin; or finding other suppliers and trying to lower the purchase price, such as negotiating with another supplier to lower the purchase price to 0.4 yuan / jin, thereby reducing costs, improving the cost-effectiveness ratio, and avoiding excessively low cost-effectiveness from affecting profits.

[0104] The procurement plan has been revised upwards as follows:

[0105] Assume the ingredient being purchased is crucian carp. Calculate the cost-effectiveness ratio: the cost of crucian carp is 8 yuan / jin, and the selling price is 20 yuan / jin, so the cost-effectiveness ratio = 8 ÷ 20 = 0.4. Compare with the preset threshold: the preset cost-effectiveness ratio threshold is 0.35. Since 0.4 ≥ 0.35, the upward adjustment purchase plan will be used.

[0106] Specific measures to increase prices include: appropriately increasing the purchase volume of sea bass, for example, increasing the purchase from 50 to 70 per batch to obtain more profit; or negotiating with suppliers to appropriately increase the purchase price to ensure a high-quality and stable supply, such as raising the purchase price to 8.5 yuan / jin. However, if after evaluation it is determined that even at this price, the cost-effectiveness is still within a reasonable range and the quality of the dishes and services can be guaranteed, then such an increase is acceptable. Subsequently, more customers can be attracted by improving the quality of ingredients, thereby increasing the selling price and further maintaining a good cost-effectiveness and profit margin.

[0107] Based on the same inventive concept, this invention also provides a canteen food ingredient traceability and dynamic procurement optimization system. See also... Figure 2 , Figure 2 A framework diagram of a canteen food ingredient traceability and dynamic procurement optimization system provided in this embodiment of the invention includes the following modules:

[0108] Block storage module: Acquires various types of data in the food supply chain; classifies the various types of data and stores them in the blockchain. The blockchain is divided into a main chain and subordinate chains. The main chain is responsible for the management of subordinate chains, and each subordinate chain includes at least one subordinate chain.

[0109] Subordinate chain grouping module: Groups the data stored in the subordinate chain according to the fuzzy C-Means clustering algorithm;

[0110] Data query module: retrieves the index information of the main chain and determines the grouped data of the subordinate chains based on the index information; the grouped data includes the cost and selling price of ingredients;

[0111] Dynamic adjustment module: Calculates the cost-effectiveness coefficient of ingredients based on their cost and selling price; generates an adjustment procurement plan based on the cost-effectiveness coefficient; the cost-effectiveness coefficient is an indicator describing the cost-effectiveness of ingredients.

[0112] This invention provides a canteen food ingredient traceability and dynamic procurement optimization system. It utilizes blockchain to store food supply chain data, coordinating between the main chain and subordinate chains to ensure data security and traceability. A fuzzy C-Means clustering algorithm is employed to group data from subordinate chains, efficiently classifying data such as ingredient costs and sales prices for easier subsequent analysis. By determining grouped data based on index information, ingredient costs and sales prices can be accurately obtained, allowing for the calculation of the ingredient's cost-effectiveness coefficient. This enables the measurement of ingredient cost-effectiveness, helping to optimize procurement plans, reduce procurement costs, and improve the overall efficiency of the food supply chain.

[0113] It should be noted that, in this document, terms such as “comprising,” “including,” or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.

[0114] 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.

Claims

1. A method for sourcing and optimizing dynamic procurement of canteen ingredients, characterized in that, The method includes: Acquire various types of data in the food supply chain; classify the various types of data and store them in a blockchain, which is divided into a main chain and subordinate chains. The main chain is responsible for the management of the subordinate chains, and each subordinate chain includes at least one subordinate chain. Group the data stored in the dependent chain according to the fuzzy C-Means clustering algorithm; Obtain the index information of the main chain, and determine the grouping data of the subordinate chains based on the index information; the grouping data includes the cost and selling price of the ingredients; The cost-effectiveness coefficient of the ingredients is calculated based on their cost and selling price; an adjusted procurement plan is generated based on the cost-effectiveness coefficient; the cost-effectiveness coefficient is an indicator describing the cost-effectiveness of the ingredients.

2. The method for sourcing and optimizing dynamic procurement of canteen ingredients according to claim 1, characterized in that, The process of classifying various types of data and storing them in the blockchain includes: Extract feature parameters from various types of data, construct feature vectors based on the feature parameters, and input the feature vectors into the data storage model to obtain storage scores for various types of data; Retrieve preset storage scoring thresholds from the database, classify various types of data into different levels, and store them on different blockchains; The storage scoring thresholds include a first threshold, a second threshold, and a third threshold; If the storage score is less than the first threshold, the data will be classified as the first level, and the data of the first level will be stored on the main chain of the blockchain. If the first threshold ≤ storage score < second threshold, then the data is divided into the second level, and the data of the second level is stored in the first slave chain of the blockchain; If the second threshold ≤ storage score ≤ third threshold, then the data is divided into the third level, and the data of the third level is stored in the second sub-chain of the blockchain; If the storage score is greater than the third threshold, the data will be classified into the fourth level, and the data of the fourth level will be stored in the third sub-chain of the blockchain.

3. The method for sourcing and optimizing dynamic procurement of canteen ingredients according to claim 1, characterized in that, The grouping of data stored in the dependent chain according to the fuzzy C-Means clustering algorithm includes: S1: Divide the data stored in the dependent chain into several sample groups and initialize the data for each sample; obtain the minimum loss function using the fuzzy C-Means clustering algorithm: Where J(u,c) represents the minimum loss function, n represents the total number of samples, c represents the total number of clusters; m represents the fuzziness exponent, and the value of m ranges from (2,+∞), x i c represents the number of the i-th sample; j u represents the center vector of the j-th cluster; ij ||x represents the membership degree of the i-th sample in the j-th cluster; i -c j || represents the number of samples x i To cluster center c j The Euclidean distance; j = 1, 2, ..., c; i = 1, 2, ..., n; S2: Further optimize the minimum loss function: through u ij and c j Alternate updates, updating membership degree u ij The calculation formula is: If the distance between the i-th sample and the center vector of the j-th cluster is 0, then the membership degree of that sample is set to 1; k Represent the center vector of the k-th cluster; update the cluster center c. j The calculation formula is: S3: Repeat step S2 until the value of the minimum loss function J(u,c) is less than the preset threshold or the maximum number of iterations is reached. Finally, the clusters corresponding to each number of samples are obtained, and the samples are grouped according to the clusters.

4. The method for sourcing and optimizing dynamic procurement of canteen ingredients according to claim 1, characterized in that, The step of determining the grouping data of the dependent chain based on the index information includes: Lock the corresponding group data on the slave chain, and generate the same locked group data on the slave chain on the main chain; the index information is the index address corresponding to each group on the slave chain; query the main chain to generate the locked group data on the slave chain based on the identification information.

5. The method for sourcing and optimizing dynamic procurement of canteen ingredients according to claim 1, characterized in that, The cost-effectiveness coefficient of the ingredients is calculated based on the cost and selling price of the ingredients. The procurement plan is adjusted based on the cost-effectiveness ratio, including: The cost-effectiveness coefficient is calculated by comparing the current cost of ingredients with their selling price. Compare the cost-effectiveness ratio with a preset threshold; If the cost-effectiveness ratio is less than the preset threshold, the procurement plan will be downgraded. If the cost-effectiveness ratio is greater than or equal to the preset threshold, the procurement plan will be adjusted upwards. The proposed adjustments to the procurement plan include both lowering and raising the procurement plan.

6. A canteen food ingredient traceability and dynamic procurement optimization system, characterized in that, The system includes: Block storage module: acquires various types of data in the food supply chain; classifies the various types of data and stores them in the blockchain, which is divided into a main chain and subordinate chains. The main chain is responsible for the management of the subordinate chains, and each subordinate chain includes at least one subordinate chain. Subordinate chain grouping module: Groups the data stored in the subordinate chain according to the fuzzy C-Means clustering algorithm; Data query module: Obtains the index information of the main chain and determines the grouped data of the subordinate chain based on the index information; the grouped data includes the cost and selling price of the ingredients; Dynamic adjustment module: Calculates the cost-effectiveness coefficient of ingredients based on their cost and selling price; generates an adjustment procurement plan based on the cost-effectiveness coefficient; the cost-effectiveness coefficient is an indicator describing the cost-effectiveness of ingredients.

7. The canteen food ingredient traceability and dynamic procurement optimization system according to claim 6, characterized in that, The block storage module includes a storage scoring module and a level division module: The storage scoring module is used to extract feature parameters of various types of data, construct feature vectors based on the feature parameters, and input the feature vectors into the data storage model to obtain storage scores for various types of data. The level division module is used to obtain a preset storage scoring threshold from the database, divide various types of data into different levels, and store them on different blockchains. The storage scoring thresholds include a first threshold, a second threshold, and a third threshold; If the storage score is less than the first threshold, the data will be classified as the first level and stored in the main blockchain. If the first threshold ≤ storage score < second threshold, then the data is divided into the second level, and the data of the second level is stored in the first slave chain of the blockchain; If the second threshold ≤ storage score ≤ third threshold, then the data is divided into the third level, and the data of the third level is stored in the second sub-chain of the blockchain; If the storage score is greater than the third threshold, the data will be classified into the fourth level, and the data of the fourth level will be stored in the third sub-chain of the blockchain.

8. The canteen food ingredient traceability and dynamic procurement optimization system according to claim 6, characterized in that, The subordinate chain grouping module includes a data processing module and a data optimization module: The data processing module is used to divide the data stored in the dependent chain into various sample numbers and initialize the data of each sample; it also obtains the minimum loss function through the fuzzy C-Means clustering algorithm. Where J(u,c) represents the minimum loss function, n represents the total number of samples, c represents the total number of clusters; m represents the fuzziness exponent, and the value of m ranges from (2,+∞), x i c represents the number of the i-th sample; j u represents the center vector of the j-th cluster; ij ||x represents the membership degree of the i-th sample in the j-th cluster; i -c j || represents the number of samples x i To cluster center c j The Euclidean distance; j = 1, 2, ..., c; i = 1, 2, ..., n; The data optimization module is used to optimize the minimum loss function: through u ij and c j Alternate updates, updating membership degree u ij The calculation formula is: If the distance between the i-th sample and the center vector of the j-th cluster is 0, then the membership degree of that sample is set to 1; k Represent the center vector of the k-th cluster; update the cluster center c. j The calculation formula is: The process continues until the value of the minimum loss function J(u,c) is less than a preset threshold or the maximum number of iterations is reached. Finally, the clusters corresponding to each number of samples are obtained, and the samples are grouped according to the clusters.

9. A canteen food ingredient traceability and dynamic procurement optimization system according to claim 6, characterized in that, The data query module includes a data transfer module: The data transfer module is used to lock the corresponding group data on the slave chain, and the main chain generates the same locked group data on the slave chain. The index information is the index address corresponding to each group in the subordinate chain; Based on the identifier information, query the main chain to generate slave chain locked group data.

10. A canteen food ingredient traceability and dynamic procurement optimization system according to claim 6, characterized in that, The dynamic adjustment module includes an adjustment procurement module: The adjusted procurement module is used to calculate the cost-performance ratio by comparing the current cost of ingredients with their selling price. Compare the cost-effectiveness ratio with a preset threshold; If the cost-effectiveness ratio is less than the preset threshold, the procurement plan will be downgraded. If the cost-effectiveness ratio is greater than or equal to the preset threshold, the procurement plan will be adjusted upwards. The proposed adjustments to the procurement plan include both lowering and raising the procurement plan.

Citation Information

Patent Citations

  • Food material tracing method and system based on block chain

    CN110472989A