Intelligent contract design method for quality supervision of agricultural product supply chain under block chain background
By adopting Stackelberg-Nash two-layer game design smart contracts in the context of blockchain, combining the revised projection algorithm and ant colony algorithm, the problems of low trust and insufficient quality supervision in the agricultural product supply chain are solved, and the quality of the agricultural product supply chain is achieved. Improve supervision and balance of interests.
Patent Information
- Application Number
- CN202411235179.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-04
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2044-09-04
AI Technical Summary
There are problems in the agricultural product supply chain with low trust, difficult quality monitoring, insufficient quality supervision and imperfect technology, resulting in problems such as doping unqualified agricultural products, rising prices and data fraud.
In the context of blockchain, Stackelberg-Nash two-layer game design smart contracts are used to build a blockchain-based agricultural product supply chain quality supervision model, combining the revised projection algorithm and ant colony algorithm, to optimize regulatory departments, manufacturers and retailers by building a blockchain-based agricultural product supply chain quality supervision model, combining the correction projection algorithm and the ant colony algorithm, to optimize regulatory departments, manufacturers and retailers The game relationship between them achieves balance of interests and quality supervision.
The quality supervision efforts in the agricultural product supply chain have been improved, the output and sales of unqualified agricultural products have been reduced, reasonable price strategies have been given, and the governance mechanism has been dynamically adjusted to ensure the balance of interests of multiple nodes.
Smart Images

Figure CN119129824A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical fields of agricultural product supply chain industry and regulatory industry, and more specifically, to a method for designing a quality supervision smart contract for an agricultural product supply chain under the background of blockchain. Background Art
[0002] Quality supervision of the agricultural product supply chain is closely related to food safety issues. 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, and product transportation) that affect the quality of the final product. Current problems with quality supervision of the agricultural product supply chain: The operation of the agricultural product supply chain is complex, with multiple games between its nodes, low mutual trust, difficult quality monitoring, insufficient quality supervision, and imperfect supervision measures and technologies. "Core enterprises are in an absolutely dominant position in the agricultural product supply chain," resulting in problems such as adulteration of substandard agricultural products, raising agricultural product prices, and data falsification. Summary of the invention
[0003] According to the above-mentioned technical problem of how to design smart contracts using Stackelberg-Nash two-layer game under the background of blockchain, a method for designing smart contracts for quality supervision of agricultural product supply chains 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 regulatory authorities and producers, sellers, and consumer markets, coordinates the balance between them to the greatest extent, and achieves the balance of interests of multiple nodes. The present invention can assist relevant agricultural product supply chain regulatory authorities in formulating reward and punishment strategies, giving reasonable prices, and reducing the output and sales of substandard agricultural products.
[0004] The technical means adopted by the present invention are as follows:
[0005] A method for designing smart contracts for quality supervision of agricultural product supply chains under the blockchain background, including:
[0006] S1. Design smart contracts for agricultural product supply chain quality supervision based on blockchain technology;
[0007] S2. Construct a Stackelberg-Nash equilibrium supply chain quality supervision model;
[0008] S3. A hybrid algorithm combining the modified projection algorithm and the ant colony algorithm is used to solve the constructed Stackelberg-Nash equilibrium supply chain quality supervision model.
[0009] Furthermore, the specific implementation process of step S1 is as follows:
[0010] S11. Define the smart contract lifecycle for agricultural product supply chain quality supervision under the blockchain background, and reshape the agricultural product supply chain quality supervision process under the blockchain background;
[0011] S12. Transform the quality supervision problem of agricultural product supply chain into a mathematical programming problem with equilibrium constraints and solve it using the Stackelberg-Nash two-level game theory; consider the agricultural product supply chain network consisting of the upper-level regulatory department, m agricultural product producers and n agricultural product retailers at the lower level;
[0012] S13. The regulatory authorities engage in Stackelberg game with producers and retailers. The regulatory authorities are the leaders 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 of the agricultural product supply chain are in a non-cooperative competitive relationship, and there is a Nash equilibrium. The regulatory authorities, agricultural product producers, and retailers jointly form the main body of the smart contract for agricultural product supply chain quality supervision based on Stackelberg-Nash equilibrium.
[0013] Furthermore, the specific implementation process of step S2 is as follows:
[0014] S21. In order to simplify the model, the following assumptions are made:
[0015] Assumption 1: The total output of agricultural products will be affected by the scale of planting and weather factors, and the output of quality and safety agricultural products will also be affected by pest factors;
[0016] Hypothesis 2: Due to the volatility of market demand, the demand for agricultural products is fuzzy;
[0017] Assumption 3: There is no residual income from the disposal of the remaining unsold agricultural products and there is a cost of transportation to the livestock farm;
[0018] Assumption 4: Transaction cost function between retailers and producers is a twice continuously differentiable convex function;
[0019] S22. Based on the above assumptions, the problem of coordinated monitoring between drones and loading ships is defined as follows:
[0020] Define the manufacturer index as i, i∈{1,2,...,m};
[0021] Define the retailer index as j, j∈{1,2,...,n};
[0022] Define the upper limit of agricultural product output of producer i as Determined by the scale of planting or weather factors;
[0023] Define the actual output rate of quality and safety agricultural products affected by pests during production as c;
[0024] Define the unit production cost of non-quality and safety agricultural products of the producer as c i ;
[0025] Define the unit production cost of quality and safety agricultural products of 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 that retailer j bears when trading with producer i as
[0028] Define the manufacturer's sales competition cost 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 processing cost of the remaining unsold products of producer i as v j r ;
[0030] Define the market fuzzy demand for agricultural products of retailer j as Affected by its own and other retailers’ agricultural product prices, the support is The credibility distribution function is
[0031] Define the maximum amount of rewards and penalties that relevant government departments can impose on agricultural product producers as
[0032] The impact factor of pesticide residues on agricultural product quality and safety is defined as θ;
[0033] The economic loss caused by food safety accidents is defined as T c ;
[0034] Define the factor affecting the inspection cost of agricultural product sampling rate as b;
[0035] Define the agricultural product quality and safety standard as S;
[0036] Define the fixed cost of agricultural product testing as T F ;
[0037] Define the actual output rate as l i ;
[0038] Main decision variables:
[0039] Define the amount of rewards and penalties that regulatory authorities impose on agricultural product producers as β;
[0040] Define the agricultural product sampling rate of the regulatory department as ρ;
[0041] From the decision variables:
[0042] Define the output of non-quality and safety agricultural products of producer i as Y i ;
[0043] Define the quality and safety agricultural product output of producer i as Y i g ;
[0044] Define the transaction volume of non-quality and safety agricultural products between producer i and retailer j as Q ij ;
[0045] Define the transaction volume of quality and safety agricultural products between producer i and retailer j as Q ij g ;
[0046] Define the sales price of agricultural products of retailer j as P j ;
[0047] Endogenous variables:
[0048] Define the agricultural product transaction price between producer i and retailer j as w ij ;
[0049] Define the retailer's agricultural product purchase volume as a j ,
[0050] S23. Construct the decision optimization model of the main party as follows:
[0051]
[0052] 0≤ρ≤1
[0053] S24. Construct a slave decision optimization model. The slave decision optimization model includes three nodes: producer optimization model, retailer optimization model, and consumer market optimization model of the agricultural product supply chain. Since the costs incurred in the transportation link are taken into account in the slave decision model, they are not considered as model nodes.
[0054] Furthermore, the specific process of constructing the manufacturer optimization model is as follows:
[0055] During the production period, agricultural product producers determine the output of unqualified and qualified agricultural products by adjusting the amount of pesticides used. During the sales period, they decide the amount of agricultural products to be traded with retailers and sell the above two types of agricultural products to retailers in a mixed manner. At the same time, producers are subject to competition from other producers and have to deal with the remaining unsold agricultural products. Therefore, the optimization model of producers is:
[0056]
[0057]
[0058] Among them, formula (2) corresponds to the upper limit constraint of the producer's output, formula (3) and formula (4) correspond to the production and marketing constraints of the producer's production and marketing of unqualified agricultural products and qualified agricultural products respectively;
[0059] Assume that the Lagrange multipliers corresponding to the production and sales constraints are λ i , γ i , μ i , all λ i , γ i , μ i They respectively constitute m-dimensional column vectors λ, γ, μ; the producers are in a non-cooperative competitive relationship, so the optimal behavior of all producers can be equivalently expressed as the following variational inequality problem: Determine (Y * ,Q * ,Y g* ,Q g* ,λ * ,γ * μ * )∈Ω P , so that it satisfies:
[0060]
[0061] in,
[0062] Furthermore, the specific process of constructing the retailer optimization model is as follows:
[0063] During the sales period, retailers order the quantity and price of agricultural products from agricultural product producers to meet market demand, and deal with 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 safe agricultural products from retailers in order to maximize their own interests, retailers will sell the purchased agricultural products as similar agricultural products. Therefore, the optimization model of retailers is as follows:
[0064]
[0065] Among them, formula (6) corresponds to the supply and marketing constraints of retailers selling agricultural products;
[0066] Assume that the Lagrange multiplier corresponding to the supply and marketing constraint is ε j , all ε j The optimal model corresponding to the expected profit of retailers is convex programming, and the retailers are in a non-cooperative competitive relationship. Therefore, the optimal behavior of all retailers can be equivalently expressed as the following variational inequality problem: Determine (Q * ,A * ,Q g* ,ε * )∈Ω R , so that it satisfies:
[0067]
[0068] in,
[0069] Furthermore, the specific process of constructing the consumer market optimization model 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 ambiguous. In this regard, the equilibrium condition of the consumer market's demand for agricultural products is expressed as:
[0071]
[0072] The equilibrium condition of the entire demand market is equivalently expressed as the following variational inequality problem:
[0073]
[0074] in,
[0075] Furthermore, the Stackelberg-Nash equilibrium supply chain quality supervision model constructed in step S2 is a two-level programming (MPEC) model, the upper level is a nonlinear programming model, and the lower level 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 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 volatility factor to [0.2, 0.5], and the pheromone constant to [10,1000];
[0078] S32, construct 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 constraints of the upper nonlinear programming model;
[0079] S33, the reward and punishment amount β of the regulatory department and the agricultural product sampling rate ρ are substituted as parameters into the variational inequality of the lower supply chain equilibrium network, and the modified projection algorithm is used to solve it. Finally, the equilibrium solution of the agricultural product supply chain network is obtained and passed to the lower supply chain equilibrium network for iteration;
[0080] S34, update pheromone: update the pheromone concentration on the path, calculate the length of the path passed by each ant, and record the optimal solution of the current iteration number;
[0081] S35, determine whether the maximum number of iterations has been reached, if not, return to step S33; if yes, end the program;
[0082] S36. Output results: Select the optimal solution from the ant colony as the optimal result of the upper-level nonlinear programming model, and its corresponding agricultural product output, transaction volume and price as the optimal result of the lower-level supply chain equilibrium network.
[0083] Compared with the prior art, the present invention has the following advantages:
[0084] 1. The method for designing a smart contract for quality supervision of the agricultural product supply chain under the blockchain background provided by the present invention defines the life cycle of the smart contract for quality supervision of the agricultural product supply chain, reshapes the process of smart contract supervision of the quality of the agricultural product supply chain, and designs a smart contract for quality supervision of the agricultural product supply chain.
[0085] 2. The method for designing smart contracts for quality supervision of agricultural product supply chains under the blockchain background provided by the present invention designs a two-layer model of smart contracts for quality supervision of agricultural products based on Stackelberg-Nash two-layer game. By solving the smart contract model, the optimal solution for the selling price of agricultural products in the quality supervision of agricultural product supply chains is given; the optimal strategy for sampling rate and reward and punishment intensity; the interest balance strategy among the regulatory authorities, manufacturers, sellers, and consumer markets, and the dynamic adjustment of the governance mechanism.
[0086] 3. The quality supervision smart contract design method for the agricultural product supply chain under the blockchain background provided by the present invention uses variational inequalities combined with ant colony algorithm to solve the Stackelberg-Nash game equilibrium problem.
[0087] Based on the above reasons, the present invention can be widely promoted in the agricultural product supply chain industry and the regulatory industry. BRIEF DESCRIPTION OF THE DRAWINGS
[0088] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0089] Figure 1 The figure is a flow chart of the method of the present invention.
[0090] Figure 2 A schematic diagram of the life cycle of a supply chain quality supervision smart contract under the blockchain background provided by an embodiment of the present invention.
[0091] Figure 3 This is a schematic diagram of the relationship between the main bodies of agricultural product supply chain quality supervision based on the Stackelberg-Nash game of the present invention. DETAILED DESCRIPTION
[0092] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0093] It should be noted that the terms "first", "second", etc. in the specification 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 the data used in this way can be interchanged where appropriate, 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 "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0094] like Figure 1 As shown, the present invention provides a method for designing a quality supervision smart contract for an agricultural product supply chain under the blockchain background, including:
[0095] S1. Design smart contracts for agricultural product supply chain quality supervision based on blockchain technology;
[0096] S2. Construct a Stackelberg-Nash equilibrium supply chain quality supervision model;
[0097] S3. A hybrid algorithm combining the modified projection algorithm and the ant colony algorithm is used 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 issues have received widespread 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 role of supervision. Therefore, in this embodiment, an agricultural product supply chain quality supervision smart contract based on blockchain technology is designed. The contract content is formulated based on the Stackelberg-Nash two-layer game, and the game relationship between the regulatory authorities and manufacturers, sellers, and consumer markets is analyzed to coordinate the balance between them to the greatest extent, and achieve the balance of interests of multiple nodes. In specific implementation, as a preferred embodiment of the present invention, step S1 is based on blockchain technology to design a smart contract for agricultural product supply chain quality supervision. The specific implementation process is as follows:
[0099] S11, such as Figure 2 As shown in the figure, the smart contract life cycle of agricultural product supply chain quality supervision under the blockchain background is defined, which reshapes the agricultural product supply chain quality supervision process under the blockchain background;
[0100] S12. The quality supervision problem of agricultural product supply chain is transformed into a mathematical programming problem with equilibrium constraints, and solved using the Stackelberg-Nash two-level game idea; consider the agricultural product supply chain network consisting of the upper-level regulatory department, the lower-level m agricultural product producers and n agricultural product retailers; Figure 3 As shown,
[0101] S13. The regulatory authorities engage in Stackelberg game with producers and retailers. The regulatory authorities are the leaders of the Stackelberg game, and the agricultural product supply chain network composed of producers and retailers is the follower of the Stackelberg game. There is a non-cooperative competitive relationship between the members of each node of the agricultural product supply chain, and there is a Nash equilibrium. The regulatory authorities influence the production and marketing decisions of the members of the agricultural product network nodes by formulating reasonable supply chain quality supervision smart contracts. Therefore, the regulatory authorities, agricultural product producers, and retailers jointly constitute the main body of the agricultural product supply chain quality supervision smart contract based on the Stackelberg-Nash equilibrium.
[0102] In specific implementation, as a preferred embodiment of the present invention, the specific implementation process of step S2 is as follows:
[0103] S21. In order to simplify the model, the following assumptions are made:
[0104] Assumption 1: The total output of agricultural products will be affected by the scale of planting and weather factors, and the output of quality and safety agricultural products will also be affected by pest factors;
[0105] Hypothesis 2: Due to the volatility of market demand, the demand for agricultural products is fuzzy;
[0106] Assumption 3: There is no residual income from the disposal of the remaining unsold agricultural products and there is a cost of transportation to the livestock farm;
[0107] Assumption 4: Transaction cost function between retailers and producers is a twice continuously differentiable convex function;
[0108] S22. Based on the above assumptions, the problem of coordinated monitoring between drones and loading ships is defined as follows:
[0109] Define the manufacturer index as i, i∈{1,2,...,m};
[0110] Define the retailer index as j, j∈{1,2,...,n};
[0111] Define the upper limit of agricultural product output of producer i as Determined by the scale of planting or weather factors;
[0112] Define the actual output rate of quality and safety agricultural products affected by pests during production as c;
[0113] Define the unit production cost of non-quality and safety agricultural products of the producer as c i ;
[0114] Define the unit production cost of quality and safety 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 that retailer j bears when trading with producer i as
[0117] Define the manufacturer's sales competition cost 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;
[0118] Define the unit processing cost of the remaining unsold products of producer i as v j r ;
[0119] Define the market fuzzy demand for 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 amount of rewards and penalties that relevant government departments can impose on agricultural product producers as
[0121] The impact factor of pesticide residues on agricultural product quality and safety is defined as θ;
[0122] The economic loss caused by food safety accidents is defined as T c ;
[0123] Define the factor affecting the inspection cost of agricultural product sampling rate as b;
[0124] Define the agricultural product quality and safety standard as S;
[0125] Define the fixed cost of agricultural product testing as T F ;
[0126] Define the actual output rate as l i ;
[0127] Main decision variables:
[0128] Define the amount of rewards and penalties that regulatory authorities impose on agricultural product producers as β;
[0129] Define the agricultural product sampling rate of the regulatory department as ρ;
[0130] From the decision variables:
[0131] Define the output of non-quality and safety agricultural products of producer i as Y i ;
[0132] Define the quality and safety agricultural product output of producer i as Y i g ;
[0133] Define the transaction volume of non-quality and safety agricultural products between producer i and retailer j as Q ij ;
[0134] Define the transaction volume of quality and safety agricultural products between producer i and retailer j as Q ij g ;
[0135] Define the sales price of 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 retailer's agricultural product purchase volume as a j ,
[0139] S23. Construct a decision-making optimization model for the main party. As the leader of the Stackelberg game, the regulatory authorities, in order to improve the quality and safety level of agricultural products in the market and reduce safety accidents, guide the production and sale of quality and safe agricultural products by formulating smart contracts for agricultural product regulatory mechanisms. Since food safety accidents will cause economic losses to consumers, agricultural product markets and even society, the social benefits of relevant government departments are measured by the economic losses avoided by producing quality and safe agricultural products. At the same time, the regulatory authorities conduct random inspections of agricultural products, spend testing costs, and reward and punish each producer. Therefore, the main party decision optimization model constructed is as follows:
[0140]
[0141]
[0142] 0≤ρ≤1
[0143] S24. Construct a slave decision optimization model. The slave decision optimization model includes three nodes: producer optimization model, retailer optimization model, and consumer market optimization model of the agricultural product supply chain. Since the costs incurred in the transportation link are taken into account in the slave decision model, they are not considered as model nodes.
[0144] The specific process of constructing the manufacturer optimization model is as follows:
[0145] During the production period, agricultural product producers determine the output of unqualified and qualified agricultural products by adjusting the amount of pesticides used. During the sales period, they decide the amount of agricultural products to be traded with retailers and sell the above two types of agricultural products to retailers in a mixed manner. At the same time, producers are subject to competition from other producers and have to deal with the remaining unsold agricultural products. Therefore, the producer's optimization model is:
[0146]
[0147] Among them, formula (2) corresponds to the upper limit constraint of the producer's output, formula (3) and formula (4) correspond to the production and marketing constraints of the producer's production and marketing of unqualified agricultural products and qualified agricultural products respectively;
[0148] Assume that the Lagrange multipliers corresponding to the production and sales constraints are λ i , γ i , μ i, all λ i , γ i , μ i They respectively constitute m-dimensional column vectors λ, γ, μ; the producers are in a non-cooperative competitive relationship, so the optimal behavior of all producers can be equivalently expressed as the following variational inequality problem: Determine (Y * ,Q * ,Y g* ,Q g* ,λ * ,γ * μ * )∈Ω P , so that it satisfies:
[0149]
[0150] in,
[0151] The specific process of constructing the retailer optimization model is as follows:
[0152] During the sales period, retailers order the quantity and price of agricultural products from agricultural product producers to meet market demand, and deal with 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 safe agricultural products from retailers in order to maximize their own interests, retailers will sell the purchased agricultural products as similar agricultural products. Therefore, the optimization model of retailers is as follows:
[0153]
[0154] Among them, formula (6) corresponds to the supply and marketing constraints of retailers selling agricultural products;
[0155] Assume that the Lagrange multiplier corresponding to the supply and marketing constraint is ε j , all ε j The optimal model corresponding to the expected profit of retailers is convex programming, and the retailers are in a non-cooperative competitive relationship. Therefore, the optimal behavior of all retailers can be equivalently expressed as the following variational inequality problem: Determine To satisfy:
[0156]
[0157] in,
[0158] The specific process of constructing the consumer market optimization model is as follows:
[0159] 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 ambiguous. In this regard, the equilibrium condition of the consumer market's demand for agricultural products is expressed as:
[0160]
[0161] The equilibrium condition of the entire demand market is equivalently expressed as the following variational inequality problem:
[0162]
[0163] in,
[0164] In specific implementation, as a preferred embodiment of the present invention, the Stackelberg-Nash equilibrium supply chain quality supervision model constructed in step S2 is a two-level programming (MPEC) model, the upper layer is a nonlinear programming model, and the lower layer is a supply chain equilibrium network.
[0165] In specific implementation, as a preferred embodiment of the present invention, the specific implementation process of step S3 is as follows:
[0166] S31, initialize the decision variables of the upper 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 volatility factor to [0.2, 0.5], and the pheromone constant to [10,1000];
[0167] S32, construct 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 constraints of the upper nonlinear programming model;
[0168] S33, the reward and punishment amount β of the regulatory department and the agricultural product sampling rate ρ are substituted as parameters into the variational inequality of the lower supply chain equilibrium network, and the modified projection algorithm is used to solve it. Finally, the equilibrium solution of the agricultural product supply chain network is obtained and passed to the lower supply chain equilibrium network for iteration;
[0169] S34, update pheromone: update the pheromone concentration on the path, calculate the length of the path passed by each ant, and record the optimal solution of the current iteration number;
[0170] S35, determine whether the maximum number of iterations has been reached, if not, return to step S33; if yes, end the program;
[0171] S36. Output results: Select the optimal solution from the ant colony as the optimal result of the upper-level nonlinear programming model, and its corresponding agricultural product output, transaction volume and price as the optimal result of the lower-level supply chain equilibrium network.
[0172] 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 it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, 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 smart contracts for quality supervision of agricultural product supply chains under the blockchain background, characterized in that: include: S1. Design smart contracts for agricultural product supply chain quality supervision based on blockchain technology; S2. Construct a Stackelberg-Nash equilibrium supply chain quality supervision model; S3. A hybrid algorithm combining the modified projection algorithm and the ant colony algorithm is used to solve the constructed Stackelberg-Nash equilibrium supply chain quality supervision model.
2. The method for designing a quality supervision smart contract for the agricultural product supply chain under the blockchain background according to claim 1 is characterized in that: The specific implementation process of step S1 is as follows: S11. Define the smart contract lifecycle for agricultural product supply chain quality supervision under the blockchain background, and reshape the agricultural product supply chain quality supervision process under the blockchain background; S12. Transform the quality supervision problem of agricultural product supply chain into a mathematical programming problem with equilibrium constraints and solve it using the Stackelberg-Nash two-level game theory; consider the agricultural product supply chain network consisting of the upper-level regulatory department, m agricultural product producers and n agricultural product retailers at the lower level; S13. The regulatory authorities engage in Stackelberg game with producers and retailers. The regulatory authorities are the leaders 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 of the agricultural product supply chain are in a non-cooperative competitive relationship, and there is a Nash equilibrium. The regulatory authorities, agricultural product producers, and retailers jointly form the main body of the smart contract for agricultural product supply chain quality supervision based on Stackelberg-Nash equilibrium.
3. The method for designing a quality supervision smart contract for the agricultural product supply chain under the blockchain background according to claim 1 is characterized in that: The specific implementation process of step S2 is as follows: S21. In order to simplify the model, the following assumptions are made: Assumption 1: The total output of agricultural products will be affected by the scale of planting and weather factors, and the output of quality and safety agricultural products will also be affected by pest factors; Hypothesis 2: Due to the volatility of market demand, the demand for agricultural products is fuzzy; Assumption 3: There is no residual income from the disposal of the remaining unsold agricultural products and there is a cost of transportation to the livestock farm; Assumption 4: Transaction cost function between retailers and producers is a twice continuously differentiable convex function; S22. Based on the above assumptions, the problem of coordinated monitoring between drones and loading ships is defined as follows: Define the manufacturer index as i, i∈{1,2,...,m}; Define the retailer index as j, j∈{1,2,...,n}; Define the upper limit of agricultural product output of producer i as Determined by the scale of planting or weather factors; Define the actual output rate of quality and safety agricultural products affected by pests during production as c; Define the unit production cost of non-quality and safety agricultural products of the producer as c i ; Define the unit production cost of quality and safety agricultural products of producer i as c i g ; Define the transaction cost borne by producer i when trading with retailer j as Define the transaction cost that retailer j bears when trading with producer i as Define the manufacturer's sales competition cost 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; Define the unit processing cost of the remaining unsold products of producer i as v j r ; Define the market fuzzy demand for agricultural products of retailer j as Affected by its own and other retailers’ agricultural product prices, the support is The credibility distribution function is Define the maximum amount of rewards and penalties that relevant government departments can impose on agricultural product producers as The impact factor of pesticide residues on agricultural product quality and safety is defined as θ; The economic loss caused by food safety accidents is defined as T c ; Define the factor affecting the inspection cost of agricultural product sampling rate as b; Define the agricultural product quality and safety standard as S; Define the fixed cost of agricultural product testing as T F ; Define the actual output rate as l i ; Main decision variables: Define the amount of rewards and penalties that regulatory authorities impose on agricultural product producers as β; Define the agricultural product sampling rate of the regulatory department as ρ; From the decision variables: Define the output of non-quality and safety agricultural products of producer i as Y i ; Define the quality and safety agricultural product output of producer i as Y i g ; Define the transaction volume of non-quality and safety agricultural products between producer i and retailer j as Q ij ; Define the transaction volume of quality and safety agricultural products between producer i and retailer j as Q ij g ; Define the sales price of agricultural products of retailer j as P j ; Endogenous variables: Define the agricultural product transaction price between producer i and retailer j as w ij ; Define the retailer's agricultural product purchase volume as a j , S23. Construct the decision optimization model of the main party as follows: 0≤ρ≤1 S24. Construct a slave decision optimization model. The slave decision optimization model includes three nodes: producer optimization model, retailer optimization model, and consumer market optimization model of the agricultural product supply chain. Since the costs incurred in the transportation link are taken into account in the slave decision model, they are not considered as model nodes.
4. The method for designing a quality supervision smart contract for the agricultural product supply chain under the blockchain background according to claim 3 is characterized in that: The specific process of constructing the manufacturer optimization model is as follows: During the production period, agricultural product producers determine the output of unqualified and qualified agricultural products by adjusting the amount of pesticides used. During the sales period, they decide the amount of agricultural products to be traded with retailers and sell the above two types of agricultural products to retailers in a mixed manner. At the same time, producers are subject to competition from other producers and have to deal with the remaining unsold agricultural products. Therefore, the producer's optimization model is: Among them, formula (2) corresponds to the upper limit constraint of the producer's output, formula (3) and formula (4) correspond to the production and marketing constraints of the producer's production and marketing of unqualified agricultural products and qualified agricultural products respectively; Assume that the Lagrange multipliers corresponding to the production and sales constraints are λ i , γ i , μ i , all λ i , γ i , μ i They respectively constitute m-dimensional column vectors λ, γ, μ; the producers are in a non-cooperative competitive relationship, so the optimal behavior of all producers can be equivalently expressed as the following variational inequality problem: Determine (Y * ,Q * ,Y g* ,Q g* ,λ * ,γ * μ * )∈Ω P , so that it satisfies: in, 5. The method for designing a quality supervision smart contract for the agricultural product supply chain under the blockchain background according to claim 3 is characterized in that: The specific process of constructing the retailer optimization model is as follows: During the sales period, retailers order the quantity and price of agricultural products from agricultural product producers to meet market demand, and deal with 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 safe agricultural products from retailers in order to maximize their own interests, retailers will sell the purchased agricultural products as similar agricultural products. Therefore, the optimization model of retailers is as follows: Among them, formula (6) corresponds to the supply and marketing constraints of retailers selling agricultural products; Assume that the Lagrange multiplier corresponding to the supply and marketing constraint is ε j , all ε j The optimal model corresponding to the expected profit of retailers is convex programming, and the retailers are in a non-cooperative competitive relationship. Therefore, the optimal behavior of all retailers can be equivalently expressed as the following variational inequality problem: Determine (Q * ,A * ,Q g* ,ε * )∈Ω R , so that it satisfies: in, 6. The method for designing a quality supervision smart contract for the agricultural product supply chain under the blockchain background according to claim 3 is 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 ambiguous. In this regard, the equilibrium condition of 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: in, 7. The method for designing a quality supervision smart contract for an agricultural product supply chain under the blockchain background according to claim 1 is characterized in that: The Stackelberg-Nash equilibrium supply chain quality supervision model constructed in step S2 is a two-level programming (MPEC) model, the upper level is a nonlinear programming model, and the lower level is a supply chain equilibrium network.
8. The method for designing a quality supervision smart contract for an agricultural product supply chain under the blockchain background according to claim 1 is characterized in that: The specific implementation process of step S3 is as follows: S31, initialize the decision variables of the upper 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 volatility factor to [0.2, 0.5], and the pheromone constant to [10,1000]; S32, construct 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 constraints of the upper nonlinear programming model; S33, the reward and punishment amount β of the regulatory department and the agricultural product sampling rate ρ are substituted as parameters into the variational inequality of the lower supply chain equilibrium network, and the modified projection algorithm is used to solve it. Finally, the equilibrium solution of the agricultural product supply chain network is obtained and passed to the lower supply chain equilibrium network for iteration; S34, update pheromone: update the pheromone concentration on the path, calculate the length of the path passed by each ant, and record the optimal solution of the current iteration number; S35, determine whether the maximum number of iterations has been reached, if not, return to step S33; If yes, then end the program; S36. Output results: Select the optimal solution from the ant colony as the optimal result of the upper-level nonlinear programming model, and its corresponding agricultural product output, transaction volume and price as the optimal result of the lower-level 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
Integrated energy system internal multi-subject transaction method and application thereof
CN115965469A
