An Intelligent Contract Design Method for Quality Supervision of Agricultural Product Supply Chains in the Context of Blockchain

Through blockchain technology and Stackelberg-Nash two-layer game model, combined with revised projection and ant colony algorithm, a smart contract for quality supervision of agricultural products supply chains is designed, which solves the problems of low trust and insufficient quality supervision in the agricultural product supply chain, and achieves the balance of node interests and the improvement of food safety.

CN119129824BActive Publication Date: 2025-07-08DALIAN MARITIME UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411235179.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-04
Publication Date
2025-07-08
Estimated Expiration
2044-09-04

AI Technical Summary

Technical Problem

The trust between nodes in the agricultural product supply chain is low, the quality is difficult to monitor, the quality supervision is insufficient, and the regulatory measures and technology are incomplete.

Method used

A smart contract for agricultural product supply chain quality supervision based on blockchain technology is designed, Stackelberg-Nash two-layer game model is adopted, and a correction projection algorithm is combined with ant colony algorithm to solve it, and the balance of interests of regulatory departments, manufacturers, sellers and consumer markets is coordinated.

Benefits of technology

It has achieved balanced interests at all nodes in the agricultural product supply chain, dynamically adjusted the governance mechanism, optimized the selling price and sampling rate of agricultural products, reduced the output of unqualified agricultural products, and improved the level of food safety.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119129824B_ABST
    Figure CN119129824B_ABST
Patent Text Reader

Abstract

The present invention provides a method for designing an intelligent contract for quality supervision of agricultural product supply chains in the context of blockchain. The method of the present invention includes: S1, designing an intelligent contract for quality supervision of agricultural product supply chains based on blockchain technology; S2, constructing a Stackelberg-Nash equilibrium supply chain quality supervision model; S3, using a hybrid algorithm combining a modified projection algorithm and an ant colony algorithm to solve the constructed Stackelberg-Nash equilibrium supply chain quality supervision model. The present invention formulates contract content based on Stackelberg-Nash two-layer game, analyzes the game relationships among regulatory departments, producers, sellers, and consumer markets, coordinates the equilibrium among them to the greatest extent, and realizes the interest balance of multiple nodes. At the same time, the present invention can assist relevant agricultural product supply chain regulatory departments in formulating reward and punishment strategies, giving reasonable prices, and reducing the output and sales volume of unqualified agricultural products.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical fields of the agricultural product supply chain industry and the supervision industry. Specifically, it particularly relates to a method for designing an intelligent contract for the quality supervision of an agricultural product supply chain under the background of blockchain. Background Art

[0002] The quality supervision of the agricultural product supply chain is closely related to food safety issues. The quality supervision of the agricultural product supply chain includes many roles (such as regulatory agencies, farmers, producers, retailers, consumers) and actions (such as agricultural monitoring, product quality certification, product transportation) that affect the quality of the final product. Currently, the problems existing in the quality supervision of the agricultural product supply chain are as follows: The operation of the agricultural product supply chain is complex, there are multiple games between its nodes, the mutual trust is low, the quality is difficult to monitor, the quality supervision is insufficient, and the supervision measures and technologies are imperfect. Summary of the Invention

[0003] In view of the above-mentioned technical problem of how to design an intelligent contract using the Stackelberg-Nash two-layer game under the background of blockchain, a method for designing an intelligent contract for the quality supervision of an agricultural product supply chain under the background of blockchain is provided. The present invention formulates the contract content based on the Stackelberg-Nash two-layer game, analyzes the game relationship between the supervision department and producers, sellers, and the consumer market, coordinates their equilibrium to the greatest extent, and realizes the interest balance of multiple nodes. The present invention can assist relevant agricultural product supply chain supervision departments in formulating reward and punishment strategies, giving reasonable prices, and reducing the output and sales volume of unqualified agricultural products.

[0004] The technical means adopted by the present invention are as follows:

[0005] A method for designing an intelligent contract for the quality supervision of an agricultural product supply chain under the background of blockchain, comprising:

[0006] S1. Design an intelligent contract for the quality supervision of the agricultural product supply chain based on blockchain technology;

[0007] S2. Construct a Stackelberg-Nash equilibrium supply chain quality supervision model;

[0008] S3. Solve the constructed Stackelberg-Nash equilibrium supply chain quality supervision model using a hybrid algorithm combining a modified projection algorithm and an ant colony algorithm.

[0009] Furthermore, the specific implementation process of the step S1 is as follows:

[0010] S11. Define the life cycle of the intelligent contract for the quality supervision of the agricultural product supply chain under the background of blockchain, and reshape the quality supervision process of the agricultural product supply chain under the background of blockchain;

[0011] S12. Transform the quality supervision problem of the agricultural product supply chain into a mathematical programming problem with equilibrium constraints and solve it using the idea of Stackelberg-Nash bilevel game; consider the agricultural product supply chain network consisting of the upper-level supervision department, m agricultural product producers and n agricultural product retailers at the lower level;

[0012] S13. The supervision department conducts a Stackelberg game with producers and retailers; the supervision department is the leader of the Stackelberg game, and the agricultural product supply chain network composed of producers and retailers is the follower of the Stackelberg game. The members of each node in the agricultural product supply chain are in a non-cooperative competitive relationship, and there is a Nash equilibrium; the supervision department, agricultural product producers and retailers jointly form the main body of the intelligent contract for the quality supervision of the agricultural product supply chain based on the Stackelberg-Nash equilibrium.

[0013] Furthermore, the specific implementation process of step S2 is as follows:

[0014] S21. To simplify the model, the following assumptions are made:

[0015] Assumption 1. The total output of agricultural products is affected by the planting scale and weather factors, and the output of quality and safety agricultural products is also affected by pest factors;

[0016] Assumption 2. Due to the volatility of market demand, the demand for agricultural products is fuzzy demand;

[0017] Assumption 3. There is no residual income for dealing with the remaining unsold agricultural products, and there is a cleaning and disposal cost for transporting them to the livestock farm;

[0018] Assumption 4. The transaction cost function between retailers and producers is a twice continuously differentiable convex function;

[0019] S22. Based on the above assumptions, the quality supervision problem of the agricultural product supply chain is defined as follows:

[0020] Define the subscript of the producer as i, i ∈ {1, 2,..., m};

[0021] Define the subscript of the retailer as j, j ∈ {1, 2,..., n};

[0022] Define the upper limit of the agricultural product output of producer i as determined by the planting scale or weather influence factors;

[0023] Define the actual output rate affected by pest factors during the production process of quality and safety agricultural products as c;

[0024] Define the unit production cost of non-quality-safe agricultural products for producers as c i ;

[0025] Define the unit production cost of quality-safe agricultural products for producer i as c i g ;

[0026] Define the transaction cost borne by producer i when trading with retailer j as

[0027] Define the transaction cost borne by retailer j when trading with producer i as

[0028] Define the sales competition cost of producers as e i (Y,L×Y g ), affected by the output of two types of agricultural products of all producers, where the symbol represents the matrix dot product, the same below;

[0029] Define the unit disposal cost of the remaining unsold products of producer i as v j r ;

[0030] Define the fuzzy demand quantity of agricultural products for retailer j as Affected by the prices of agricultural products of itself and other retailers, the support set is , and the credibility distribution function is

[0031] Define the maximum reward and punishment amount of the government-related department for agricultural product producers as

[0032] Define the influence factor of pesticide residues on the quality safety of agricultural products as θ;

[0033] Define the economic loss caused by food safety accidents as T c ;

[0034] Define the influence factor of the agricultural product sampling rate on the detection cost as b;

[0035] Define the quality safety standard of agricultural products as S;

[0036] Define the fixed cost of agricultural product detection as T F ;

[0037] Define the actual output rate as l i ;

[0038] Principal decision variables:

[0039] Define the reward and punishment amount of the regulatory department for agricultural product producers as β;

[0040] Define the sampling rate of agricultural products by the regulatory department as ρ;

[0041] Slave - side decision variables:

[0042] Define the output of non - quality - safe agricultural products of producer i as Y i ;

[0043] Define the output of quality - safe agricultural products of producer i as Y i g ;

[0044] Define the trading volume of non - quality - safe agricultural products between producer i and retailer j as Q ij ;

[0045] Define the trading volume of quality - safe agricultural products between producer i and retailer j as Q ij g ;

[0046] Define the selling price of agricultural products of retailer j as P j ;

[0047] Endogenous variables:

[0048] Define the trading price of agricultural products between producer i and retailer j as w ij ;

[0049] Define the purchase quantity of agricultural products of the retailer as a j ,

[0050] S23. Construct the master - side decision - making optimization model as follows:

[0051]

[0052] 0 ≤ ρ ≤ 1

[0053] S24. Construct the slave - side decision - making optimization model. The slave - side decision - making optimization model includes three nodes: the producer optimization model, the retailer optimization model, and the consumer market optimization model of the agricultural product supply chain. Since the costs generated in the transportation link are considered in the slave - side decision - making model, they are not considered as model nodes.

[0054] Furthermore, the specific process of constructing the producer optimization model is as follows:

[0055] During the production period, agricultural producers determine the output of unqualified and qualified agricultural products by adjusting the amount of pesticides used. During the sales period, they decide the quantity of agricultural products traded with retailers and sell the above - mentioned two types of agricultural products to retailers in a mixed way. At the same time, producers are subject to competition from other producers and need to deal with the remaining unsold agricultural products. Therefore, the producer's optimization model is:

[0056]

[0057]

[0058] Among them, formula (2) corresponds to the production upper limit constraint of the producer, and formulas (3) and (4) respectively correspond to the production and sales constraints of the producer for producing and selling unqualified agricultural products and qualified agricultural products;

[0059] Let the Lagrange multipliers corresponding to the production and sales constraints be λ i , γ i , μ i , all λ i , γ i , μ i respectively form m-dimensional column vectors λ, γ, μ; the relationship among producers is non-cooperative competition, so the optimal behaviors of all producers can be equivalently represented as the following variational inequality problem: Determine (Y * , Q * , Y g* , Q g* , λ * , γ * μ * ) ∈ Ω P , such that it satisfies:

[0060]

[0061] Among them,

[0062] Furthermore, the specific process of constructing the retailer optimization model is as follows:

[0063] The retailer orders agricultural products from the agricultural product producer during the sales period and sets the selling price to meet the market demand, and disposes of the remaining unsold agricultural products after the sales period; since the quality and safety level of agricultural products cannot be distinguished by appearance, and the producer will conceal the situation of non-quality and safety agricultural products from the retailer to maximize its own interests, the retailer sells the purchased agricultural products as the same kind of agricultural products. Therefore, the retailer's optimization model is as follows:

[0064]

[0065] Among them, formula (6) corresponds to the supply and sales constraint of the retailer for selling agricultural products;

[0066] Let the Lagrange multiplier corresponding to the supply and sales constraint be ε j , all ε jConstruct the n-dimensional column vector ε; the optimization model corresponding to the expected profit of the retailer is a convex programming problem, and the retailers are in a non-cooperative competition relationship. Therefore, the optimal behavior of all retailers can be equivalently represented as the following variational inequality problem: Determine (Q * , A * , Q g* , ε * ) ∈ Ω R , such that it satisfies:

[0067]

[0068] where,

[0069] Furthermore, the specific process of constructing the optimization model of the consumer market is as follows:

[0070] During the sales period, retailers sell agricultural products to the agricultural product consumer market. Consumers cannot distinguish the quality and safety level of agricultural products. Due to the volatility of market demand, the demand for agricultural products is fuzzy. Therefore, the equilibrium condition of the demand for agricultural products in the consumer market is expressed as:

[0071]

[0072] The equilibrium condition of the entire demand market is equivalently represented as the following variational inequality problem:

[0073]

[0074] where,

[0075] Furthermore, the Stackelberg-Nash equilibrium supply chain quality supervision model constructed in step S2 is a bilevel programming (MPEC) model. The upper layer is a nonlinear programming model, and the lower layer is a supply chain equilibrium network.

[0076] Furthermore, the specific implementation process of step S3 is as follows:

[0077] S31. Initialize the decision variables of the upper-layer nonlinear programming model: Set the counter to N = 1, the maximum number of iterations to N_Max, the range of the pheromone factor to [1, 4], the heuristic function factor to [3, 4.5], the pheromone evaporation factor to [0.2, 0.5], and the pheromone constant to [10, 1000];

[0078] S32. Construct the solution space: Randomly place ants at different starting points, calculate the next visited position for each ant until an ant has visited all positions; Generate the initial positions of the ant colony under the constraint conditions of the upper-layer nonlinear programming model;

[0079] S33. Substitute the reward and punishment amount β of the regulatory department and the agricultural product sampling rate ρ as parameters into the variational inequality of the lower-layer supply chain equilibrium network, and use the modified projection algorithm to solve it. Finally, obtain the equilibrium solution of the agricultural product supply chain network and input it into the lower-layer supply chain equilibrium network for iteration;

[0080] S34. Update pheromone: Update the pheromone concentration on the path, and at the same time calculate the path lengths passed by each ant, and record the optimal solution of the current iteration number;

[0081] S35. Determine whether the maximum iteration number is reached. If not, return to step S33; if so, end the program;

[0082] S36. Output the result: Select the optimal solution from the ant colony as the optimal result of the upper-layer nonlinear programming model, and its corresponding agricultural product output, trading volume, and price as the optimal result of the lower-layer supply chain equilibrium network.

[0083] Compared with the existing technology, the present invention has the following advantages:

[0084] 1. The method for designing the quality supervision smart contract of the agricultural product supply chain under the background of blockchain provided by the present invention defines the life cycle of the quality supervision smart contract of the agricultural product supply chain, reshapes the process of the smart contract for supervising the quality of the agricultural product supply chain, and designs the smart contract for supervising the quality of the agricultural product supply chain.

[0085] 2. The method for designing the quality supervision smart contract of the agricultural product supply chain under the background of blockchain provided by the present invention designs a two-layer model of the quality supervision smart contract of agricultural products based on the Stackelberg-Nash two-layer game. By solving the smart contract model, the optimal solution of the selling price of agricultural products in the quality supervision of the agricultural product supply chain is given; the best strategies for the sampling rate and the intensity of rewards and punishments; the interest balance strategy among the regulatory department, producers, sellers, and consumer markets, and dynamically adjust the governance mechanism.

[0086] 3. The method for designing the quality supervision smart contract of the agricultural product supply chain under the background of blockchain provided by the present invention uses the variational inequality combined with the ant colony algorithm to solve the Stackelberg-Nash game equilibrium problem.

[0087] For the above reasons, the present invention can be widely promoted in the agricultural product supply chain industry and the supervision industry. Description of the Drawings

[0088] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0089] Figure 1 This is the flowchart of the method of the present invention.

[0090] Figure 2 This is a schematic diagram of the life cycle of the intelligent contract for supply chain quality supervision under the blockchain background provided by the embodiment of the present invention.

[0091] Figure 3 This is a schematic diagram of the relationship among the main bodies for quality supervision of the agricultural product supply chain based on the Stackelberg-Nash game of the present invention. Detailed implementation manners

[0092] In order to enable those skilled in the art of the present technology to better understand the solutions of the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, rather than all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0093] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products, or devices.

[0094] As Figure 1 shown, the present invention provides a method for designing an intelligent contract for quality supervision of an agricultural product supply chain under the blockchain background, including:

[0095] S1. Design an intelligent contract for quality supervision of the agricultural product supply chain based on blockchain technology;

[0096] S2. Construct a Stackelberg-Nash equilibrium supply chain quality supervision model;

[0097] S3. Use a hybrid algorithm combining the modified projection algorithm and the ant colony algorithm to solve the constructed Stackelberg-Nash equilibrium supply chain quality supervision model.

[0098] The quality safety of the agricultural product supply chain is closely related to food safety, and its quality supervision issue has received extensive attention. Due to its characteristics, blockchain technology can better realize the traceability of the agricultural product supply chain and obtain real-time status data of the supervised objects, but it cannot dynamically adjust the governance mechanism and cannot fully play the supervision role. Therefore, in this embodiment, an intelligent contract for the quality supervision of the agricultural product supply chain based on blockchain technology is designed. The contract content is formulated based on the Stackelberg-Nash two-layer game. The game relationships among the supervision department, producers, sellers, and consumer markets are analyzed to maximize the coordination of the equilibrium among them and achieve the interest balance of multiple nodes. Specifically in implementation, as a preferred implementation manner of the present invention, the step S1 designs an intelligent contract for the quality supervision of the agricultural product supply chain based on blockchain technology, and the specific implementation process is as follows:

[0099] S11. As Figure 2 shown, define the life cycle of the intelligent contract for the quality supervision of the agricultural product supply chain under the blockchain background, and reshape the quality supervision process of the agricultural product supply chain under the blockchain background;

[0100] S12. Transform the quality supervision problem of the agricultural product supply chain into a mathematical programming problem with equilibrium constraints and solve it using the Stackelberg-Nash two-layer game idea; consider the agricultural product supply chain network composed of the upper-layer supervision department, m agricultural product producers in the lower layer, and n agricultural product retailers in the lower layer; as Figure 3 shown;

[0101] S13. The supervision department conducts a Stackelberg game with producers and retailers; the supervision department is the leader of the Stackelberg game, and the agricultural product supply chain network composed of producers and retailers is the follower of the Stackelberg game. The members of each node in the agricultural product supply chain are in a non-cooperative competitive relationship and there is a Nash equilibrium; the supervision department affects the production and sales decisions of the members of the agricultural product network nodes by formulating a reasonable supply chain quality supervision intelligent contract. Therefore, the supervision department, agricultural product producers, and retailers jointly form the main body of the intelligent contract for the quality supervision of the agricultural product supply chain based on the Stackelberg-Nash equilibrium.

[0102] Specifically in implementation, as a preferred implementation manner of the present invention, the specific implementation process of the step S2 is as follows:

[0103] S21. To simplify the model, the following assumptions are made:

[0104] Assumption 1: The total output of agricultural products is affected by the planting scale and weather factors, and the output of quality - safe agricultural products is also affected by pest factors.

[0105] Assumption 2: Due to the volatility of market demand, the demand for agricultural products is fuzzy demand.

[0106] Assumption 3: There is no residual income from dealing with the remaining unsold agricultural products, and there are disposal costs for transporting them to the livestock farm.

[0107] Assumption 4: The transaction cost function between retailers and producers is a twice - continuously differentiable convex function.

[0108] S22. Based on the above - made assumptions, the quality supervision problem of the agricultural product supply chain is defined as follows:

[0109] Define the subscript of the producer as i, i ∈ {1, 2,..., m};

[0110] Define the subscript of the retailer as j, j ∈ {1, 2,..., n};

[0111] Define the upper limit of the agricultural product output of producer i as determined by the planting scale or weather influence factors;

[0112] Define the actual output rate affected by pests during the production process of quality - safe agricultural products as c;

[0113] Define the unit production cost of non - quality - safe agricultural products of producer as c i ;

[0114] Define the unit production cost of quality - safe agricultural products of producer i as c i g ;

[0115] Define the transaction cost borne by producer i when trading with retailer j as

[0116] Define the transaction cost borne by retailer j when trading with producer i as

[0117] Define the sales competition cost of the producer as e i (Y, L×Y g ), which is affected by the output quantities of two types of agricultural products of all producers. Here, the symbol × represents matrix dot - product, and the same applies hereinafter;

[0118] Define the unit disposal cost of the remaining unsold products of producer i as v j r ;

[0119] Define the fuzzy demand of the market for the agricultural products of retailer j as Affected by its own and other retailers' agricultural product prices, the support is The credibility distribution function is

[0120] Define the maximum reward and punishment amount of the government-related department for the agricultural product producers as

[0121] Define the influence factor of pesticide residues on the quality and safety of agricultural products as θ;

[0122] Define the economic loss caused by food safety accidents as T c ;

[0123] Define the influence factor of the agricultural product sampling rate on the detection cost as b;

[0124] Define the agricultural product quality and safety standard as S;

[0125] Define the fixed cost of agricultural product detection as T F ;

[0126] Define the actual output rate as l i ;

[0127] The decision variable of the principal party:

[0128] Define the reward and punishment amount of the regulatory department for the agricultural product producers as β;

[0129] Define the agricultural product sampling rate of the regulatory department as ρ;

[0130] The decision variable of the follower party:

[0131] Define the output of non-quality-safe agricultural products of producer i as Y i ;

[0132] Define the output of quality-safe agricultural products of producer i as Y i g ;

[0133] Define the trading volume of non-quality-safe agricultural products between producer i and retailer j as Q ij ;

[0134] Define the trading volume of quality-safe agricultural products between producer i and retailer j as Q ij g ;

[0135] Define the selling price of the agricultural products of retailer j as P j ;

[0136] Endogenous variables:

[0137] Define the agricultural product transaction price between producer i and retailer j as w ij ;

[0138] Define the purchase quantity of agricultural products by the retailer as a j ,

[0139] S23. Construct the master decision optimization model. As the leader of the Stackelberg game, the regulatory department aims to improve the quality and safety level of agricultural products in the market and reduce safety accidents. By formulating intelligent contracts for the agricultural product supervision mechanism, it guides the production and sales of quality and safety agricultural products. Since food safety accidents will cause economic losses to consumers, the agricultural product market, and even society, the social benefits of relevant government departments are measured by the economic losses avoided by producing quality and safety agricultural products. At the same time, the regulatory department conducts random inspections on agricultural products, incurs inspection costs, and rewards and punishes each producer. Therefore, the constructed master decision optimization model is as follows:

[0140]

[0141] 0 ≤ ρ ≤ 1

[0142] S24. Construct the follower decision optimization model. The follower decision optimization model includes three nodes: the producer optimization model, the retailer optimization model, and the consumer market optimization model of the agricultural product supply chain. Since the costs generated in the transportation link are considered in the follower decision model, they are not considered as model nodes.

[0143] The specific process of constructing the producer optimization model is as follows:

[0144] During the production period, agricultural product producers decide the respective yields of unqualified and qualified agricultural products by adjusting the amount of pesticides used. During the sales period, they decide the quantity of agricultural products traded with retailers and mix and sell the above two types of agricultural products to retailers. At the same time, producers are subject to competition from other producers and need to handle the remaining unsold agricultural products. Therefore, the producer optimization model is:

[0145]

[0146] Among them, formula (2) corresponds to the production quantity upper limit constraint of the producer, and formulas (3) and (4) respectively correspond to the production and sales constraints of the producer for producing and selling unqualified and qualified agricultural products;

[0147] Let the Lagrange multipliers corresponding to the production and sales constraints be λ i , γ i , μ i , all λ i , γ i , μi respectively form m-dimensional column vectors λ, γ, and μ; since the relationship among producers is non-cooperative competition, the optimal behavior of all producers can be equivalently represented as the following variational inequality problem: Determine (Y * , Q * , Y g* , Q g* , λ * , γ * μ * ) ∈ Ω P , such that it satisfies:

[0148]

[0149] Among them,

[0150] The specific process of constructing the retailer's optimization model is as follows:

[0151] The retailer orders the quantity and selling price of agricultural products from agricultural producers during the sales period to meet market demand, and disposes of the remaining unsold agricultural products after the sales period; since the quality and safety level of agricultural products cannot be identified by appearance, and producers will conceal the situation of non-quality and safety agricultural products from retailers to maximize their own interests, the retailer sells the purchased agricultural products as the same kind of agricultural products. Therefore, the retailer's optimization model is as follows:

[0152]

[0153] Among them, formula (6) corresponds to the supply and marketing constraint of the retailer selling agricultural products;

[0154] Let the Lagrange multiplier corresponding to the supply and marketing constraint be ε j , and all ε j form an n-dimensional column vector ε; the optimization model corresponding to the retailer's expected profit is a convex programming, and the relationship among retailers is non-cooperative competition. Therefore, the optimal behavior of all retailers can be equivalently represented as the following variational inequality problem: Determine (Q * , A * , Q g* , ε * ) ∈ Ω R , such that it satisfies:

[0155]

[0156] Among them,

[0157] The specific process of constructing the consumer market optimization model is as follows:

[0158] During the sales period, retailers sell agricultural products to the agricultural product consumption market. Consumers cannot distinguish the quality and safety level of agricultural products. Due to the volatility of market demand, the demand for agricultural products is fuzzy. Therefore, the equilibrium condition of the demand for agricultural products in the consumption market is expressed as:

[0159]

[0160] The equilibrium condition of the entire demand market is equivalently expressed as the following variational inequality problem:

[0161]

[0162] where

[0163] In specific implementation, as a preferred implementation manner of the present invention, the Stackelberg-Nash equilibrium supply chain quality supervision model constructed in step S2 is a bilevel programming (MPEC) model. The upper layer is a nonlinear programming model, and the lower layer is a supply chain equilibrium network.

[0164] In specific implementation, as a preferred implementation manner of the present invention, the specific implementation process of step S3 is as follows:

[0165] S31. Initialize the decision variables of the upper-layer nonlinear programming model: Set the counter to N = 1, the maximum number of iterations to N_Max, the range of the pheromone factor to [1, 4], the heuristic function factor to [3, 4.5], the information evaporation factor to [0.2, 0.5], and the pheromone constant to [10, 1000];

[0166] S32. Construct the solution space: Randomly place ants at different starting points, calculate the next visited position for each ant until an ant has visited all positions; Generate the initial position of the ant colony under the constraint conditions of the upper-layer nonlinear programming model;

[0167] S33. Substitute the reward and punishment amount β of the supervision department and the agricultural product sampling rate ρ as parameters into the variational inequality of the lower-layer supply chain equilibrium network, and use the modified projection algorithm to solve it. Finally, obtain the equilibrium solution of the agricultural product supply chain network and pass it into the lower-layer supply chain equilibrium network for iteration;

[0168] S34. Update the pheromone: Update the pheromone concentration on the path, and at the same time calculate the path lengths passed by each ant, and record the optimal solution of the current iteration;

[0169] S35. Determine whether the maximum number of iterations has been reached. If not, return to step S33; if so, end the program;

[0170] S36. Output result: Select the optimal solution from the ant colony as the optimal result of the upper-layer nonlinear programming model, and the corresponding agricultural product output, trading volume, and price are used as the optimal results of the lower-layer supply chain equilibrium network.

[0171] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements on some or all of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for designing an intelligent contract for quality supervision of the agricultural product supply chain in the context of blockchain, characterized in that, Including: S1. Based on blockchain technology, design an intelligent contract for quality supervision of the agricultural product supply chain. The specific implementation process is as follows: Define the life cycle of the intelligent contract for quality supervision of the agricultural product supply chain in the context of blockchain, and reshape the quality supervision process of the agricultural product supply chain in the context of blockchain; Transform the quality supervision problem of the agricultural product supply chain into a mathematical programming problem with equilibrium constraints, and solve it using the Stackelberg-Nash bi-level game idea; consider the agricultural product supply chain network composed of the upper-level regulatory department, m agricultural product producers at the lower level, and n agricultural product retailers; The regulatory department conducts a Stackelberg game with producers and retailers; the regulatory department is the leader of the Stackelberg game, and the agricultural product supply chain network composed of producers and retailers is the follower of the Stackelberg game. The members of each node in the agricultural product supply chain are in a non-cooperative competitive relationship, and there is a Nash equilibrium; the regulatory department, agricultural product producers, and retailers jointly form the main body of the intelligent contract for quality supervision of the agricultural product supply chain based on Stackelberg-Nash equilibrium; S2. Construct a Stackelberg-Nash equilibrium supply chain quality supervision model, construct a principal decision optimization model, and construct a follower decision optimization model. The follower decision optimization model includes three nodes: the producer optimization model, the retailer optimization model, and the consumer market optimization model of the agricultural product supply chain. Since the cost generated in the transportation link is considered in the follower decision model, it is not considered as a model node; S3. Use a hybrid algorithm combining the modified projection algorithm and the ant colony algorithm to solve the constructed Stackelberg-Nash equilibrium supply chain quality supervision model.

2. The method for designing an intelligent contract for quality supervision of an agricultural product supply chain in the context of a blockchain according to claim 1, wherein The specific implementation process of step S2 is as follows: S21. To simplify the model, make the following assumptions: Assumption 1: The total output of agricultural products is affected by the planting scale and weather factors, and the output of quality and safety agricultural products is also affected by pest factors; Assumption 2: Due to the volatility of market demand, the demand for agricultural products is fuzzy demand; Assumption 3: There is no residual income for dealing with the remaining unsold agricultural products and there is a cleaning and disposal cost for transporting them to the livestock farm; Hypothesis 4: The transaction cost function between retailers and manufacturers is a twice continuously differentiable convex function; S22. Based on the above assumptions, define the quality supervision problem of the agricultural product supply chain as follows: Define the subscript of the producer as i, i ∈ {1, 2,..., m}; Define the subscript of the retailer as j, j ∈ {1, 2,..., n}; Define the upper limit of the agricultural product output of producer i as Determined by the planting scale or weather influencing factors; Define the actual output rate affected by pests during the production process of quality and safety agricultural products as c; Define the unit production cost of non-quality-safe agricultural products of the producer as c i ; Define the unit production cost of quality and safe agricultural products of producer i as c i g ; Define the transaction cost borne by manufacturer i when trading with retailer j as Define the transaction cost borne by retailer j when trading with manufacturer i as Define the sales competition cost of the producer as e i (Y, L×Y g ), which is affected by the output of two types of agricultural products of all producers. Here, the symbol × represents the matrix dot product, and the same applies hereinafter; Define the unit disposal cost of the remaining unsold products of manufacturer i as v j r ; Define the fuzzy demand for agricultural products of retailer j in the market as affected by the prices of agricultural products of itself and other retailers, and the support is The credibility distribution function is Define the maximum reward and punishment amount for government-related departments to agricultural product producers as Define the impact factor of pesticide residues on the quality and safety of agricultural products as θ; Define the economic loss caused by a food safety accident as T c ; Define the impact factor of the sampling rate of agricultural products on the detection cost as b; Define the quality and safety standard of agricultural products as S; Define the fixed cost of agricultural product detection as T F ; Define the actual output rate as l i ; Principal decision variables: Define the reward and punishment amount of the regulatory department for agricultural product producers as β; Define the sampling rate of agricultural products by the regulatory department as ρ; Follower decision variables: Define the output of non-quality-safe agricultural products of producer i as Y i ; Define the output of quality and safe agricultural products of producer i as Y i g ; Define the trading volume of non-quality-safe agricultural products between producer i and retailer j as Q ij ; Define the trading volume of quality and safe agricultural products between producer i and retailer j as Q ij g ; Define the selling price of agricultural products of retailer j as P j ; Endogenous variables: Define the agricultural product trading price between producer i and retailer j as w ij ; Define the purchase quantity of agricultural products by the retailer as a j , S23. Construct a principal decision optimization model as follows: 0 ≤ ρ ≤ 1.

3. The method for designing an intelligent contract for quality supervision of an agricultural product supply chain in the context of a blockchain according to claim 2, wherein The specific process of constructing the producer optimization model is as follows: During the production period, agricultural producers determine the respective yields of substandard and qualified agricultural products by adjusting the amount of pesticides used. During the sales period, they decide on the quantity of agricultural products to trade with retailers and mix and sell these two types of agricultural products to retailers. At the same time, producers are subject to competition from other producers and need to handle the remaining unsold agricultural products. Therefore, the optimization model for producers is as follows: Among them, Equation (2) corresponds to the production upper limit constraint for producers, and Equations (3) and (4) respectively correspond to the production and sales constraints for producers to produce and sell substandard and qualified agricultural products; Let the Lagrange multipliers corresponding to the production and sales constraints be λ i , γ i , μ i respectively. All λ i , γ i , μ i form m-dimensional column vectors λ, γ, and μ respectively. Since the relationship among producers is non-cooperative competition, the optimal behaviors of all producers can be equivalently expressed as the following variational inequality problem: Determine such that it satisfies: Among them, 4. The quality supervision intelligent contract design method for the agricultural product supply chain in the blockchain context according to claim 2, characterized in that, The specific process of constructing the retailer optimization model is as follows: During the sales period, the quantity and selling price of agricultural products ordered by retailers from agricultural producers are used to meet market demand. After the sales period, the remaining unsold agricultural products are handled; Since the quality and safety level of agricultural products cannot be identified by appearance, and producers will conceal the situation of non-quality and safety agricultural products from retailers to maximize their own interests, retailers sell the purchased agricultural products as the same type of agricultural products. Therefore, the optimization model for retailers is as follows: Among them, Equation (6) corresponds to the supply and sales constraint for retailers to sell agricultural products; Let the Lagrange multiplier corresponding to the supply and marketing constraint be ε j , all ε j constitute an n-dimensional column vector ε; the optimization model corresponding to the expected profit of the retailer is a convex programming, and the relationship between retailers is non-cooperative competition. Therefore, the optimal behavior of all retailers can be equivalently expressed as the following variational inequality problem: Determine such that it satisfies: Among them, 5. The quality supervision intelligent contract design method for the agricultural product supply chain in the blockchain context according to claim 2, characterized in that, The specific process of constructing the consumer market optimization model is as follows: During the sales period, retailers sell agricultural products to the agricultural product consumer market. Consumers cannot distinguish the quality and safety level of agricultural products. Due to the volatility of market demand, the demand for agricultural products is fuzzy. Therefore, the equilibrium condition for the consumer market's demand for agricultural products is expressed as: The equilibrium condition of the entire demand market is equivalently expressed as the following variational inequality problem: Among them, 6. The method for designing an intelligent contract for quality supervision of an agricultural product supply chain in the context of a blockchain according to claim 1, wherein The Stackelberg-Nash equilibrium supply chain quality supervision model constructed in step S2 is a two-layer programming MPEC model. The upper layer is a nonlinear programming model, and the lower layer is a supply chain equilibrium network.

7. The method for designing an intelligent contract for quality supervision of an agricultural product supply chain in the context of a blockchain according to claim 1, wherein The specific implementation process of step S3 is as follows: S31. Initialize the decision variables of the upper-layer nonlinear programming model: Set the counter to N = 1, the maximum number of iterations to N_Max, the range of the pheromone factor to [1, 4], the heuristic function factor to [3, 4.5], the information evaporation factor to [0.2, 0.5], and the pheromone constant to [10, 1000]; S32. Construct the solution space: Randomly place ants at different starting points, calculate the next visited position for each ant until an ant has visited all positions; Under the constraint conditions of the upper-layer nonlinear programming model, generate the initial positions of the ant colony; S33. Substitute the reward and punishment amount β of the regulatory department and the agricultural product sampling rate ρ as parameters into the variational inequality of the lower-layer supply chain equilibrium network, and use the modified projection algorithm to solve it. Finally, obtain the equilibrium solution of the agricultural product supply chain network and pass it into the lower-layer supply chain equilibrium network for iteration; S34. Update the pheromone: Update the pheromone concentration on the path, and at the same time calculate the path lengths passed by each ant, and record the optimal solution for the current iteration; S35. Determine whether the maximum number of iterations has been reached. If not, return to step S33; If so, end the program; S36. Output result: Select the optimal solution from the ant colony as the optimal result of the upper-layer nonlinear programming model, and the corresponding agricultural product output, trading volume, and price as the optimal result of the lower-layer supply chain equilibrium network.

Citation Information

Patent Citations

  • Construction method of non-cooperative game model based on smart power grid block chain

    CN115409567A

  • Big data transaction method based on block chain and Stackelberg game theory

    CN115719237A