UAV plant protection service method, device and electronic equipment based on smart contract

Through the smart contract and drone plant protection service scheduling model, the unreasonable resource allocation and data security of the agricultural service platform are solved, and the efficient execution of drone plant protection services and contract standardization are realized.

CN117455035BActive Publication Date: 2025-08-19NORTHWEST A & F UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311295539.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2023-06-19
Filing Date
2023-10-08
Publication Date
2025-08-19
Estimated Expiration
2043-10-08

AI Technical Summary

Technical Problem

The agricultural service platform has problems with unreasonable resource allocation, standardized service contracts, service fraud, data security and privacy.

Method used

Through the smart contract-based drone plant protection service method, plant protection order data and land data are collected, the drone plant protection service scheduling model is used to generate the optimal scheduling plan, and smart contracts are deployed on the blockchain to execute drone plant protection services.

Benefits of technology

It realizes reasonable and efficient allocation of resources, solves the trust and fraud problems of order fulfillment, ensures data security and privacy, and standardizes service contracts.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117455035B_ABST
    Figure CN117455035B_ABST
Patent Text Reader

Abstract

This invention discloses a smart contract-based drone plant protection service method, which includes: collecting plant protection order data and acquiring land data and service provider data; inputting this data into a drone plant protection service scheduling model to solve the problem and obtain an optimal drone scheduling plan; this model is an optimization problem model with the drone scheduling plan as the decision-making object and minimizing cost as the optimization objective; based on the optimal drone scheduling plan, a smart contract is deployed on the blockchain for each plant protection order, and the smart contract is executed by the drone to complete the plant protection service. This invention can batch process a large number of dispersed plant protection orders, thereby rationally and efficiently allocating resources. Furthermore, this invention can address trust and fraud issues in order fulfillment, as well as data security and privacy issues, and achieve the standardization of service contracts.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of agricultural service platform operation, and specifically relates to a drone plant protection service method, device and electronic equipment based on smart contracts. Background Art

[0002] With the rapid development of the internet and platform economies, a large number of platform-based agricultural services have emerged. However, the operation and management of these platforms present numerous challenges, such as irrational resource allocation, service contract standardization, service fraud, and data security and privacy issues. Therefore, agricultural service platforms urgently need to address these issues. Summary of the Invention

[0003] In order to solve the above problems existing in the prior art, the present invention provides a drone plant protection service method based on smart contracts.

[0004] The technical problem to be solved by the present invention is achieved through the following technical solutions:

[0005] In a first aspect, the present invention provides a drone plant protection service method based on smart contracts, comprising:

[0006] Collect plant protection order data, and obtain land data and service provider data;

[0007] The land data, the service provider data, and the plant protection order data are input as known parameters into a preset drone plant protection service scheduling model, and then the drone plant protection service scheduling model is solved to obtain an optimal drone scheduling plan. The drone plant protection service scheduling model is an optimization problem model with drone scheduling as the decision object and minimizing cost as the optimization objective. The drone scheduling plan includes: drones assigned to each plant protection order and the plant protection service route of each drone;

[0008] Deploy a smart contract on the blockchain for each plant protection order based on the optimal drone scheduling plan, and coordinate with drones to execute the smart contract to complete the plant protection service using drones;

[0009] Among them, the smart contract is at least used to notify the drone to provide plant protection services in accordance with the plant protection order, record various relevant data of the drone in the process of providing plant protection services, and provide order payment services, order evaluation services and record transaction data after the plant protection is completed.

[0010] Optionally, the cost includes one or more of drone power cost, drone fixed cost, drone waiting cost, and drone delay cost.

[0011] Optionally, the UAV plant protection service scheduling model is:

[0012]

[0013] st constraint 1 to constraint 15;

[0014] Constraint 1 is:

[0015] Constraint 2 is:

[0016] Constraint 3 is:

[0017] Constraint 4 is:

[0018] Constraint 5 is:

[0019]

[0020] Constraint 6 is:

[0021] Constraint 7 is:

[0022] Constraint 8 is:

[0023] Constraint 9 is:

[0024] Constraint 10 is: q i =σl i w i ,i∈N;

[0025] Constraint 11 is:

[0026] Constraint 12 is:

[0027] Constraint 13 is:

[0028] Constraint 14 is: x ijk ∈{0,1},i∈N′,j∈N′,k∈K;

[0029] Constraint 15 is: ik ∈{0,1},i∈N′,k∈K;

[0030] Wherein, f represents the objective function value of the UAV plant protection service scheduling model;

[0031] K represents the set of drones, K = {1, 2, .., r}, r represents the total number of drones;

[0032] N represents the set of plant protection orders, N = {1, 2, .., n}, n represents the total number of plant protection orders;

[0033] N' represents the set of coordinate points in the plant protection area, N' = {0, 1, 2, .., n}, {0} represents the coordinate point of the base station in the plant protection area;

[0034] d ij Represents the distance between plant protection order i and plant protection order j, i∈N′, j∈N′;

[0035] l i represents the length of the farmland in the plant protection order i, i∈N;

[0036] w i represents the width of the farmland in the plant protection order i, i∈N;

[0037] z i represents the pesticide spraying duration of plant protection order i, i∈N;

[0038] q i represents the amount of pesticide spraying required for plant protection order i, i∈N;

[0039] t ik represents the time when UAV k arrives at plant protection order i, i∈N′, k∈K;

[0040] t jk represents the time when UAV k arrives at plant protection order j, i∈N′, k∈K;

[0041] represents the remaining amount of pesticide when UAV k arrives at plant protection order i, i∈N′, k∈K;

[0042] represents the remaining amount of pesticide when UAV k arrives at plant protection order j, j∈N′, k∈K;

[0043] W ijk represents the power consumption of UAV k when flying from plant protection order i to plant protection order j, i∈N′, j∈N′, k∈K;

[0044] ω ik represents the power consumption of UAV k spraying pesticides in plant protection order i, i∈N′, k∈K;

[0045] [ET i ,LT i ] represents the service time window of plant protection order i, ET i is the starting time of the service time window, LT i is the end time of the service time window, i∈N′, k∈K;

[0046] G0 represents the drone’s own weight;

[0047] W0 represents the maximum power of the drone;

[0048] Q0 represents the maximum capacity of the drone's medicine box;

[0049] β represents the time it takes for the drone to turn once when spraying pesticides;

[0050] b represents the spray width of the drone;

[0051] v0 represents the average flight speed of the drone between plant protection orders;

[0052] v1 represents the average flight speed of the drone when spraying pesticides within an order;

[0053] t represents time;

[0054] σ represents the amount of pesticide required per unit of farmland;

[0055] δ represents the cost per unit of power consumed by the UAV;

[0056] θ1 represents the cost per unit of waiting time of the drone;

[0057] θ2 represents the cost per unit delay time of the UAV;

[0058] C represents the fixed cost of using each drone;

[0059] When drone k flies from plant protection order i to plant protection order j, x ijk =1, otherwise x ijk = 0, i∈N′, j∈N′, k∈K;

[0060] When plant protection order i is served by drone k, y ik =1, otherwise y ik = 0, i∈N′, k∈K;

[0061] When plant protection order j is served by drone k, y jk =1, otherwise y jk =0, j∈N′, k∈K.

[0062] Optionally, the collecting of plant protection order data includes:

[0063] Receive sensor monitoring data in the plant protection area;

[0064] Determining whether the plant protection area has plant protection needs based on the sensor monitoring data;

[0065] If there is a need for plant protection, prompt the user whether to generate a plant protection order;

[0066] When the user chooses to generate a plant protection order, the plant protection order data is obtained from the plant protection order.

[0067] Optionally, the collecting of plant protection order data includes:

[0068] Receive plant protection orders directly submitted by users;

[0069] Acquire plant protection order data from the plant protection order.

[0070] Optionally, the smart contract at least includes:

[0071] The first storage module is used to store plant protection order information and drone information serving the order;

[0072] The second storage module is used to store the route information of the UAV from the base station to the farmland location in the plant protection order;

[0073] The third storage module is used to store the time and location information of the drone arriving at the farmland and the amount of pesticide remaining in the pesticide box;

[0074] The first recording module is used to record the time when the drone starts the plant protection service;

[0075] The fourth storage module is used to store route information of the drone when spraying pesticides in the farmland;

[0076] The second recording module is used to record the amount of pesticide remaining in the pesticide tank and the time when the drone ends the plant protection service;

[0077] a payment module, configured to perform billing based on the information recorded by the first storage module, the second storage module, the third storage module, the fourth storage module, the first recording module, and the second recording module; transfer the plant protection amount to the account address of the drone in response to the user's payment operation, and record the time of successful payment;

[0078] The evaluation module is used to respond to the user's order evaluation and store the user's evaluation level, evaluation content and evaluation time for the plant protection order.

[0079] Optionally, the smart contract further includes:

[0080] The first notification module is used to notify the drone that the smart contract has been successfully deployed when the smart contract is successfully deployed;

[0081] The second notification module is used to notify the user that the plant protection order is waiting to be served after the plant protection order is generated;

[0082] The third notification module is used to notify the user that the drone is heading to the farmland location specified in the plant protection order before the drone departs to perform plant protection services;

[0083] a fourth notification module, configured to notify the user that the drone has arrived at the farmland location in the plant protection order when the drone arrives at the farmland location in the plant protection order;

[0084] a fifth notification module, for notifying the user that the drone is spraying pesticides when the drone is spraying pesticides;

[0085] The sixth notification module is used to notify the user that the plant protection service has been completed after the drone completes the plant protection service and prompt the user to pay the plant protection fee;

[0086] The seventh notification module is used to notify the drone user that the order payment has been completed after the user completes the order payment;

[0087] The eighth notification module is used to notify the drone user that the order evaluation has been completed after the user completes the order evaluation.

[0088] Optionally, the method is applied to an agricultural service platform.

[0089] In a second aspect, the present invention provides a drone plant protection service device based on a smart contract, comprising:

[0090] The order collection and data acquisition module is used to collect plant protection order data and obtain land data and service provider data;

[0091] A drone scheduling module is configured to input the land data, the service provider data, and the plant protection order data as known parameters into a preset drone plant protection service scheduling model, and solve the drone plant protection service scheduling model to obtain an optimal drone scheduling plan. The drone plant protection service scheduling model is an optimization problem model with drone scheduling as the decision-making object and minimizing drone usage costs as the optimization goal. The drone scheduling plan includes: drones assigned to each plant protection order and the plant protection service route of each drone;

[0092] A plant protection service module, configured to create and deploy a smart contract on the blockchain for each plant protection order based on the optimal drone scheduling plan, and to coordinate with the drone to execute the smart contract to complete the plant protection service via the drone;

[0093] Among them, the smart contract is at least used to notify the drone to provide plant protection services in accordance with the plant protection order, record various relevant data of the drone in the process of providing plant protection services, and provide order payment services, order evaluation services and record transaction data after the plant protection is completed.

[0094] In a third aspect, the present invention provides an electronic device, characterized in that it includes: a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus;

[0095] Memory for storing computer programs;

[0096] The processor is configured to implement any of the above-mentioned smart contract-based drone plant protection service methods when executing a computer program stored in the memory.

[0097] The smart contract-based drone plant protection service operation method provided by this invention collects plant protection order data and obtains land data and service provider data. These data, land data, and service provider data are then input into a drone plant protection service scheduling model to solve for an optimal drone scheduling plan. This optimal drone scheduling plan then allocates drones to each plant protection order and determines each drone's plant protection service route. For each plant protection order, a smart contract is deployed and executed on the blockchain to perform the plant protection service. This drone plant protection service scheduling model can batch process a large number of dispersed plant protection orders, enabling rational and efficient resource allocation. Furthermore, because the execution of plant protection orders is based on smart contracts on the blockchain, it addresses trust and fraud issues in order fulfillment, as well as data security and privacy concerns, and standardizes service contracts. BRIEF DESCRIPTION OF THE DRAWINGS

[0098] Figure 1 The present invention provides a UAV plant protection service framework based on a smart contract UAV plant protection service method.

[0099] Figure 2 This is a flow chart of a smart contract-based drone plant protection service method provided by an embodiment of the present invention;

[0100] Figure 3 The diagram in Figure 1 shows an example of creating, deploying, and executing smart contracts for four orders simultaneously.

[0101] Figure 4 The execution process of the smart contract in the embodiment of the present invention is shown in FIG;

[0102] Figure 5 ] shows the service routes of each drone in a drone scheduling plan generated for a group of plant protection orders according to an embodiment of the present invention;

[0103] Figure 6(a) to Figure 6(h) The implementation is shown in Figure 5 The execution process of the smart contract recorded in the background when the drone scheduling plan is shown;

[0104] Figure 7This is a schematic diagram of the structure of a smart contract-based drone plant protection service device provided by an embodiment of the invention;

[0105] Figure 8 It is a structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0106] The present invention will be further described in detail below with reference to specific examples, but the embodiments of the present invention are not limited thereto.

[0107] To address the numerous issues with existing agricultural service platforms, embodiments of the present invention provide a drone plant protection service method based on smart contracts, which can be applied to agricultural service platforms. In practical applications, the agricultural service platform can be installed on electronic devices, such as desktop computers, portable computers, smart mobile terminals, and servers. These devices are not limited to any other device. Any electronic device capable of installing the agricultural service platform and executing the drone plant protection service method provided by embodiments of the present invention falls within the scope of protection of this invention.

[0108] Figure 1 The figure shows the drone plant protection service framework in an embodiment of the present invention, in which the agricultural service platform, farmers, and drones can all act as blockchain nodes to read and write data stored on the blockchain, thereby fulfilling their respective obligations in the blockchain environment and realizing the standardization of service contracts.

[0109] based on Figure 1 The service architecture shown is shown in Figure 2 As shown, the smart contract-based drone plant protection service method provided by an embodiment of the present invention includes the following steps:

[0110] S10: Collect plant protection order data, and obtain land data and service provider data.

[0111] The agricultural service platform can collect plant protection orders through monitoring by IoT sensors and analysis by edge cloud servers, or through farmers' own decision-making.

[0112] Exemplarily, in one implementation, step S10 may include:

[0113] (1) Receive sensor monitoring data in the plant protection area;

[0114] (2) determining whether the plant protection area has a plant protection need based on the sensor monitoring data;

[0115] (3) If there is a need for plant protection, prompt the user whether to generate a plant protection order;

[0116] (4) When the user chooses to generate a plant protection order, the plant protection order data is obtained from the plant protection order.

[0117] In another implementation, step S10 may include:

[0118] (1) Receive plant protection orders directly submitted by users;

[0119] (2) Obtaining plant protection order data from the plant protection order.

[0120] Of course, both of the above two methods of collecting plant protection order data can be used in the platform.

[0121] In practice, during the growth of crops, Figure 1 As shown in , the agricultural service platform can monitor and record crop growth conditions and environmental changes, such as pests and diseases, soil temperature and humidity, and carbon dioxide concentration, in real time through various sensors installed on scattered fields. This sensor data is then transmitted in real time to the platform's edge cloud server and judged based on pre-stored judgment logic to determine whether the crops require further care. The judgment results are then notified to users through the agricultural service platform, who then decide whether to submit plant protection service requests based on the analysis results. The judgment logic can be set under the guidance of agricultural expert knowledge. In addition, users can also submit plant protection service requests directly to the platform based on their own judgment and decision-making, regardless of or in the absence of analysis results.

[0122] An agricultural service platform can be a comprehensive platform, encompassing a variety of users, including merchants and consumers. Farmers can upload land data to the platform, while service providers can upload service provider data. Land data can include the length, width, and location of farmland requiring plant protection. Service provider data can include the number and specifications of drones owned by each service provider, as well as details of the orders each service provider has received.

[0123] S20: Input the land data, service provider data, and plant protection order data as known parameters into a preset drone plant protection service scheduling model, and then solve the drone plant protection service scheduling model to obtain an optimal drone scheduling plan.

[0124] The drone plant protection service scheduling model is an optimization problem model, such as a mixed-integer linear programming model, that uses drone scheduling as the decision-making object and minimizes the cost of drone use as the optimization goal. The drone scheduling plan includes the drones assigned to each plant protection order and the plant protection service route of each drone.

[0125] It's understandable that step S20 aims to utilize operational optimization methods, supported by data from both service demanders and service providers, to generate an optimal scheduling plan for the collected orders. Therefore, this step addresses the optimization problem of drone-based crop protection services. Key decisions include assigning orders to drones and planning each drone's service route.

[0126] Specifically, within a scheduling cycle, there are several plant protection orders that require drone spraying within their service time window, and there are several powerful drones that can provide drone plant protection services. The decision-making goal is to assign a suitable drone to each order and plan the drone's service route to minimize the cost of the drone plant protection service provider, which can include one or more of the drone's power cost, drone fixed cost, drone waiting cost, and drone delay cost.

[0127] It is understandable that in practice, different service providers may be concerned about different costs. For example, some service providers do not care about drone delay costs and drone waiting costs; accordingly, the drone plant protection service scheduling model used by such service providers does not need to consider drone delay costs and drone waiting costs. Some service providers may obtain drones through secondment, which means that such service providers may not care about drone fixed costs; accordingly, the drone plant protection service scheduling model used by such service providers does not need to consider drone fixed costs. Therefore, there can be multiple drone plant protection service scheduling models used in step S20. The following example illustrates the drone plant protection service scheduling model.

[0128] In one embodiment, the UAV plant protection service scheduling model may be:

[0129]

[0130] st constraint 1 to constraint 15;

[0131] Constraint 1 is:

[0132] Constraint 2 is:

[0133] Constraint 3 is:

[0134] Constraint 4 is:

[0135] Constraint 5 is:

[0136]

[0137] Constraint 6 is:

[0138] Constraint 7 is:

[0139] Constraint 8 is:

[0140] Constraint 9 is:

[0141] Constraint 10 is: q i =σl i w i ,i∈N;

[0142] Constraint 11 is:

[0143] Constraint 12 is:

[0144] Constraint 13 is:

[0145] Constraint 14 is: x ijk ∈{0,1},i∈N′,j∈N′,k∈K;

[0146] Constraint 15 is: ik ∈{0,1},i∈N′,k∈K;

[0147] Wherein, f represents the objective function value of the UAV plant protection service scheduling model;

[0148] K represents the set of drones, K = {1, 2, .., r}, r represents the total number of drones;

[0149] N represents the set of plant protection orders, N = {1, 2, .., n}, n represents the total number of plant protection orders;

[0150] N' represents the set of coordinate points in the plant protection area, N' = {0, 1, 2, .., n}, {0} represents the coordinate point of the base station in the plant protection area;

[0151] d ij Represents the distance between plant protection order i and plant protection order j, i∈N′, j∈N′;

[0152] l i represents the length of the farmland in the plant protection order i, i∈N;

[0153] w i represents the width of the farmland in the plant protection order i, i∈N;

[0154] z irepresents the pesticide spraying duration of plant protection order i, i∈N;

[0155] q i represents the amount of pesticide spraying required for plant protection order i, i∈N;

[0156] t ik represents the time when UAV k arrives at plant protection order i, i∈N′, k∈K;

[0157] t jk represents the time when UAV k arrives at plant protection order j, i∈N′, k∈K;

[0158] represents the remaining amount of pesticide when UAV k arrives at plant protection order i, i∈N′, k∈K;

[0159] represents the remaining amount of pesticide when UAV k arrives at plant protection order j, j∈N′, k∈K;

[0160] W ijk represents the power consumption of UAV k when flying from plant protection order i to plant protection order j, i∈N′, j∈N′, k∈K;

[0161] ω ik represents the power consumption of UAV k spraying pesticides in plant protection order i, i∈N′, k∈K;

[0162] [ET i ,LT i ] represents the service time window of plant protection order i, ET i is the starting time of the service time window, LT i is the end time of the service time window, i∈N′, k∈K;

[0163] G0 represents the drone’s own weight;

[0164] W0 represents the maximum power of the drone;

[0165] Q0 represents the maximum capacity of the drone's medicine box;

[0166] β represents the time it takes for the drone to turn once when spraying pesticides;

[0167] b represents the spray width of the drone;

[0168] v0 represents the average flight speed of the drone between plant protection orders;

[0169] v1 represents the average flight speed of the drone when spraying pesticides within an order;

[0170] t represents time;

[0171] σ represents the amount of pesticide required per unit of farmland;

[0172] δ represents the cost per unit of power consumed by the UAV;

[0173] θ1 represents the cost per unit of waiting time of the drone;

[0174] θ2 represents the cost per unit delay time of the UAV;

[0175] C represents the fixed cost of using each drone;

[0176] When drone k flies from plant protection order i to plant protection order j, x ijk =1, otherwise x ijk = 0, i∈N′, j∈N′, k∈K;

[0177] When plant protection order i is served by drone k, y ik =1, otherwise y ik = 0, i∈N′, k∈K;

[0178] When plant protection order j is served by drone k, y jk =1, otherwise y jk =0, j∈N′, k∈K.

[0179] In the above-mentioned drone plant protection service scheduling model, the objective function is defined as the total scheduling cost of completing all plant protection orders, which includes four parts of costs: the cost of electricity consumed by the drone to complete all orders, the fixed cost of activating the drone, the waiting cost of the drone, and the delay cost of the drone.

[0180] Among the above constraints, constraint 1 limits the number of available drones; constraint 2 states that each drone can be used at most once; constraint 3 states that each order must be serviced exactly once by a drone; and constraint 4 states the time required for a drone to service an order. Constraints 5 and 6 represent the power consumption of drones flying between and within orders, respectively; constraint 7 states that the power consumption of each drone should not exceed the maximum power; constraint 8 states that the spraying volume of each drone should not exceed the maximum payload; constraints 9 to 13 represent the relationship between the variables; and constraints 14 to 15 define the decision variable x. ijk and y jk domain.

[0181] In one embodiment, if the service provider of the plant protection order does not care about the drone delay cost and the drone waiting cost, the drone plant protection service scheduling model used in step S20 can be:

[0182]

[0183] Accordingly, the UAV plant protection service scheduling model needs to meet the above constraints 1 to 15.

[0184] In one embodiment, if the service provider of the plant protection order does not care about the fixed cost of the drone, the drone plant protection service scheduling model used in step S20 may be:

[0185]

[0186] Accordingly, the UAV plant protection service scheduling model needs to meet the above constraints 1 to 15.

[0187] In one embodiment, if the service provider of the plant protection order does not care about the power cost of the drone, the drone plant protection service scheduling model used in step S20 may be:

[0188]

[0189] Accordingly, at this time, the UAV plant protection service scheduling model needs to meet the above constraints 1 to 4, constraints 8 to 10, and constraints 12 to 15.

[0190] In one embodiment, if the service provider of the plant protection order does not care about the waiting cost of the drone, the drone plant protection service scheduling model used in step S20 can be:

[0191]

[0192] Accordingly, the UAV plant protection service scheduling model needs to meet the above constraints 1 to 15.

[0193] The above lists several different drone plant protection service scheduling models. In practice, corresponding drone plant protection service scheduling models can be constructed based on the costs that the service provider is concerned about. The examples are not listed here.

[0194] In addition, based on the first drone plant protection service scheduling model mentioned above that comprehensively considers the four costs, different types of costs can be multiplied by corresponding importance factors in the drone plant protection service scheduling model, so as to configure the importance factors of each cost according to the needs of different service providers, thereby flexibly selecting a suitable drone plant protection service scheduling model.

[0195] In step S20, the UAV plant protection service scheduling model can be solved using an operations research model solver or other heuristic solving algorithms. After the solution result is obtained, the UAV plant protection service scheduling model is solved according to the solution result {x ijk ,y jk y in} jkThe result of which drone serves each plant protection order can be determined based on the x ijk The plant protection service routes of each UAV can be determined as Routes = {R1, R2, ..., R r}.

[0196] In practical applications, such as Figure 1 As shown in , the agricultural service platform can be supported by a cloud server, that is, the drone plant protection service scheduling model and its solution algorithm can be stored in the cloud server, which is convenient for the agricultural service platform to call. This can reduce the complexity of the agricultural service platform, and the cloud server has strong computing power, which can also improve the computing speed of solving the drone scheduling plan.

[0197] S30: Based on the optimal drone scheduling plan, a smart contract is deployed on the blockchain for each plant protection order, and the drone is used to execute the smart contract to complete the plant protection service.

[0198] Among them, the above-mentioned smart contract is at least used to notify the drone to provide plant protection services in accordance with the plant protection order, record various relevant data of the drone in the process of providing plant protection services, and provide order payment services, order evaluation services and record transaction data after the plant protection is completed.

[0199] For details, see Figure 3 As shown, based on the collected plant protection order set N = {1, 2, .., n}, the agricultural service platform creates an independent smart contract for each plant protection order, and the smart contract account address of each plant protection order is unique.

[0200] It is understandable that blockchain-enabled smart contracts, supported by IoT technology, offer a new approach to addressing the aforementioned issues. On the one hand, IoT sensor technology can sense and record various data during the service process, visualizing the service process and results. On the other hand, blockchain technology's traceability, transparency, and immutability help prevent information asymmetry and fraud, addressing information security and privacy concerns. Therefore, step S30 primarily addresses fraud and trust in the agricultural service platform's ability to fulfill orders.

[0201] Specifically, within the Ethereum environment, the platform creates and deploys smart contracts for each order based on the drone dispatch plan. Each smart contract notifies the corresponding drone to provide plant protection services according to the contract terms of the plant protection order, and blockchain technology provides a secure transaction environment for contract execution. During the execution of the smart contract to provide plant protection services, sensors installed on the drone (such as position sensors, temperature sensors, and pressure sensors) monitor the drone's route and weight changes in real time, which are uploaded to the blockchain via the network and recorded in the smart contract. The monitored data is also sent to the cloud server for further analysis, and the agricultural service platform visualizes the service process. Finally, upon receiving notification of the completion of the plant protection service, the user will immediately pay the plant protection fee and evaluate the service process.

[0202] The following is a specific example of smart contract.

[0203] Exemplarily, a smart contract may include at least:

[0204] The first storage module is used to store plant protection order information and drone information serving the order; specifically, the agricultural service platform stores the plant protection order information and drone information serving the order in the smart contract by calling the first acquisition and recording module.

[0205] The second storage module is used to store the route information of the drone from the base station to the farmland location in the plant protection order; specifically, the drone stores the route information from the base station to the farmland location in the plant protection order detected by its position sensor in the smart contract by calling the second storage module.

[0206] The third storage module is used to store the time and location information of the drone's arrival at the farmland and the amount of pesticide remaining in the medicine box. Specifically, the drone stores the time and location information of its arrival at the farmland and the amount of pesticide remaining in the medicine box in the smart contract by calling the third storage module.

[0207] The first recording module is used to record the time when the drone starts the plant protection service; specifically, the drone stores the time when it starts the plant protection service in the smart contract by calling the first recording module.

[0208] The fourth storage module is used to store the route information of the drone when spraying pesticides in the farmland. Specifically, the drone stores the route information of the drone when spraying pesticides in the farmland in the smart contract by calling the fourth storage module.

[0209] The second recording module is used to record the remaining amount of pesticide in the medicine box and the time when the drone ends the plant protection service; specifically, the drone calls the second recording module to record the remaining amount of pesticide in the medicine box and the time when it ends the plant protection service in the smart contract.

[0210] The payment module is configured to perform billing based on the information recorded by the first storage module, the second storage module, the third storage module, the fourth storage module, the first recording module, and the second recording module; in response to a user's payment operation, the payment amount for the plant protection service is transferred to the drone's account address and the time of successful payment is recorded; specifically, the farmer invokes the payment module through the agricultural service platform to perform billing and accounting. After the calculation result is obtained, the user performs a payment operation through the agricultural service platform, which transfers the user's paid plant protection amount to the drone's account address and records the time and successful payment operation in the smart contract. The specific billing method is specified by the service provider and is not required by the present invention.

[0211] The evaluation module is used to respond to the user's order evaluation and store the user's evaluation level, evaluation content and evaluation time of the plant protection order; specifically, the farmer uploads the evaluation level, evaluation content and evaluation time of the plant protection order through the agricultural service platform by calling the evaluation module, so that the agricultural service platform records the user's evaluation level, evaluation content and evaluation time of the plant protection order in the smart contract.

[0212] In actual applications, the first storage module to the fourth storage module, the first recording module to the second recording module, the payment module and the evaluation module are all defined in the smart contract in the form of functions. Figure 3 As shown in the figure, the first storage module is defined as a deploy() function; the second storage module is defined as a heading() function; the third storage module is defined as a droneArrived() function; the first recording module is defined as a switchOn() function; the fourth storage module is defined as a spraying() function; the second recording module is defined as a switchOff() function; the payment module is defined as a pay() function; and the evaluation module is defined as an assessment() function.

[0213] Figure 3 In the data, Demander refers to the person who needs plant protection services, which is usually a farmer in practice; Server refers to the service provider, which is actually the service provider's drone; History is the order history from the drone's perspective, which records the GPS (Global Positioning System) coordinates of the base stations within the drone's communication range and the GPS coordinates of each order in the drone's plant protection service route.

[0214] In addition, the above-mentioned smart contract may also include:

[0215] The first notification module is used to notify the drone that the smart contract has been successfully deployed when the smart contract is successfully deployed; specifically, the agricultural service platform notifies the drone that the smart contract has been successfully deployed by calling the first notification module.

[0216] The second notification module is used to notify the user that the plant protection order is waiting to be serviced after the plant protection order is generated; specifically, the agricultural service platform notifies the user that the plant protection order is waiting to be serviced by calling the second notification module.

[0217] The third notification module is used to notify the user that the drone is heading to the farmland location in the plant protection order before the drone sets out to perform plant protection services; specifically, the agricultural service platform calls the third notification module to notify the user that the drone is currently heading to the farmland location in the plant protection order.

[0218] The fourth notification module is used to notify the user that the drone has arrived at the farmland location in the plant protection order when the drone arrives at the farmland location in the plant protection order; specifically, the agricultural service platform notifies the user that the drone has arrived at the farmland location in the plant protection order by calling the fourth notification module.

[0219] The fifth notification module is used to notify the user that the drone is spraying pesticides when the drone is spraying pesticides; specifically, the agricultural service platform notifies the user that the drone is spraying pesticides by calling the fifth notification module.

[0220] The sixth notification module is used to notify the user that the plant protection service has been completed after the drone completes the plant protection service, and prompt the user to pay the plant protection amount; specifically, the agricultural service platform calls the sixth notification module to notify the user that the plant protection service has been completed and prompt the user to pay the plant protection amount.

[0221] The seventh notification module is used to notify the drone user that the order payment has been completed after the user completes the order payment; specifically, the agricultural service platform notifies the drone user that the order payment has been completed by calling the seventh notification module.

[0222] The eighth notification module is used to notify the drone user that the order evaluation has been completed after the user completes the order evaluation; specifically, the agricultural service platform calls the eighth notification module to notify the drone user that the order evaluation has been completed, the current order is completed, and the user can continue to the next order or return.

[0223] In actual applications, the first to eighth notification modules are defined in the smart contract in the form of events. Figure 4As shown in the figure, the first notification module is defined as a 'DeploySuccessful' event; the second notification module is defined as a 'WaitingMsg' event; the third notification module is defined as a 'HeadingMsg' event; the fourth notification module is defined as an 'ArrivedMsg' event; the fifth notification module is defined as a 'SprayingMsg' event; the sixth notification module is defined as a 'PayMoneyMsg' event; the seventh notification module is defined as a 'PaySuccessfulMsg' event; and the eighth notification module is defined as an 'AssessmentMsg' event.

[0224] In practical applications, when creating a smart contract, the agricultural service platform can first declare global variables to store plant protection order information, drone information, and plant protection service process data. Specifically, the following global variables are declared to store plant protection order information: order ID, user account address farmerAddress, farmland location fieldLocation, farmland area area, service time window timeWindow, and required dosage dosage dosageRequired. Global variables are declared to store drone information: drone ID and account address droneAddress. Global variables are declared to store plant protection service process data: drone route gpsSensor, dosage change pressureSensor, spraying route sprayingGPS, plant protection amount money, evaluation level satisfactionLevel, evaluation content satisfactionMessage, drone arrival time actualArrivedTime, drone service start time actualStartTime, drone service end time actualEndTime, payment time payTime, evaluation time assessmentTime, and order status OrderState (waiting, heading, arrived, spraying, sprayed, completed, assessed).

[0225] Furthermore, when creating smart contracts, the agricultural service platform can define logic testers and events to ensure smooth order fulfillment. Here, logic testers are defined as logical test conditions before certain methods or functions are successfully called. For example, you can define an 'onlyDrone' logic tester to ensure that certain methods can only be called by the drone servicing the order; an 'onlyFarmer' logic tester to ensure that certain methods can only be called by the user of the order; and a 'costs' logic tester to ensure that the amount paid by the user is equal to the plant protection fee. The purpose of defining events is to notify relevant participants when certain methods or functions are successfully called. It can be understood that the events mentioned here are the notification modules mentioned above.

[0226] It will be understood that the above specific code implementation of the smart contract is merely an example and does not constitute a limitation of the embodiments of the present invention.

[0227] After the agricultural service platform deploys the smart contract on the blockchain, it cooperates with drones to execute the smart contract, thereby using drones to complete plant protection services.

[0228] For details, see Figure 4 The agricultural service platform obtains the drone service routes Routes={R1, R2, ..., R r}, calling the deploy() function in each smart contract to deploy the corresponding plant protection order. It then stores the order data (order number, service time window, pesticide dosage, user account address, etc.), land data (such as the farmland location), and service provider data (such as the drone number and account address) in corresponding variables. Finally, the deploy() function changes the contract's state to OrderState = waiting, notifying the drone of the successful deployment of the contract using the 'DeploySuccessful' event and the user of the 'WaitingMsg' event that the order is waiting to be serviced.

[0229] Then, the process of drone performing plant protection services is as follows:

[0230] Drones go to farmland: When the drone serving the plant protection order receives the 'DeploySuccessful' event notification, the drone will follow Routes = {R1, R2, ..., R rThe drone departs from the platform's base station and heads for the farmland specified in the order. During this process, the drone's location sensor monitors its position in real time, and the drone calls the heading() function in the smart contract. After passing the 'onlyDrone' logic test, the heading() function records the location information in the contract's gpsSensor variable, changes the contract's state to OrderState = heading, and notifies the user via the 'HeadingMsg' event that the drone is heading for the farmland specified in the order.

[0231] Drone Arrival: When the drone reaches the designated farmland, it calls the droneArrived() function in the smart contract. After passing the 'onlyDrone' logic test, the droneArrived() function records the drone's current location, the remaining pesticide level in the tank, and the drone's arrival time in the contract's gpsSensor, pressureSensor, and actualArrivedTime variables, respectively. It then changes the contract's state to OrderState = arrived and notifies the user of the arrival of the drone using the 'ArrivedMsg' event.

[0232] The drone begins its plant protection service: When the drone opens the nozzle on its pesticide sprayer to begin its plant protection service, it calls the switchOn() function in the smart contract. After passing the 'onlyDrone' logic test, the switchOn() function records the time the drone started plant protection in the contract variable actualStartTime, changes the contract state to OrderState = spraying, and notifies the user of the "drone is spraying pesticide" event using the 'SprayingMsg' event.

[0233] A drone is performing crop protection: As the drone flies over farmland and sprays pesticides to provide crop protection services, its onboard location sensors monitor its location in real time. The drone then calls the spraying() function in the smart contract. After passing the 'onlyDrone' logic test, the spraying() function records the location information in the contract variable sprayingGPS and notifies the user of the "drone is spraying pesticides" event using the 'SprayingMsg' event.

[0234] Drone terminates plant protection service: When a drone closes its pesticide sprayer nozzle to end the service, it calls the switchOff() function in the smart contract. After passing the 'onlyDrone' logic test, the switchOff() function records the remaining pesticide level and time in the contract's pressureSensor and actualEndTime fields. It then changes the contract's state to OrderState = sprayed and notifies the user via the 'PayMoneyMsg' event, stating that the plant protection service has been completed. Please pay the amount.

[0235] The user pays the plant protection amount: When the user of this plant protection order receives the 'PayMoneyMsg' event notification, they call the pay() function in the smart contract through the agricultural service platform to pay the plant protection amount. After passing the 'onlyFarmer' and 'costs' logic tests, the pay() function transfers the plant protection amount to the corresponding drone's account address, records the payment time in the variable payTime, changes the contract state to OrderState = completed, and notifies the drone of the "user has completed the plant protection payment" using the 'PaySuccessfulMsg' event.

[0236] User evaluation of plant protection services: After the user completes the plant protection payment, they will call the assessment() function in the smart contract through the agricultural service platform to evaluate the plant protection service. After passing the 'onlyFarmer' logic test, the function will record the user's satisfaction, evaluation content, and evaluation time in the contract variables satisfactionLevel, satisfactionMessage, and assessmentTime, respectively. It will also change the contract state to OrderState = assessed and notify the drone through the 'AssessmentMsg' event that the user has completed the plant protection service evaluation.

[0237] In the smart contract-based drone plant protection service method provided in an embodiment of the present invention, plant protection order data is collected, and land data and service provider data are obtained. These data are then input into a drone plant protection service scheduling model to solve for an optimal drone scheduling plan. The optimal drone scheduling plan then allocates drones to each plant protection order and determines the drone plant protection service route for each order. A smart contract is then deployed and executed on the blockchain for each plant protection order to perform the plant protection service. This drone plant protection service scheduling model can batch process a large number of dispersed plant protection orders, thereby enabling rational and efficient resource allocation. Furthermore, since the execution of plant protection orders is based on smart contracts on the blockchain, it addresses trust and fraud issues in order fulfillment, as well as data security and privacy concerns, and standardizes service contracts.

[0238] The following further describes the embodiments of the present invention with reference to specific examples.

[0239] Collecting plant protection order data:

[0240] During a certain scheduling cycle, the agricultural service platform collected a total of 10 plant protection orders. Each order information includes: order number, farmland location, farmland length, farmland width, service time window and farmer account address. Figure 5 The plant protection order for the farmland with sequence number 6 has a farmland location of (175, 220), a farmland length of 30, a farmland width of 10, a service time window of [0.40, 1.50], and a farmer account address of '0xf2ffA8Ffe24DA9636FB1280661c672dbe3c8CdE4'.

[0241] Generate a drone scheduling plan:

[0242] The agricultural service platform uses the UAV plant protection service scheduling model to solve the order allocation and service route results. Figure 5 As shown in the figure, the service route of drone 1 is R1 = [0, 3, 7, 1, 0]; the service route of drone 2 is R2 = [0, 4, 5, 10, 6, 0]; and the service route of drone 3 is R3 = [0, 9, 8, 2, 0]. Among them, the serial numbers 1 to 10 are the serial numbers of the plant protection orders. Figure 5 The partially enlarged image in the figure shows the flight trajectory of the drone when spraying pesticides in the farmland numbered 3.

[0243] Create and deploy a smart contract:

[0244] In the Ethereum environment, the result of the agricultural service platform creating a smart contract for plant protection order 6 is shown in Figure 6(a). Among them, '0xacF25dA4BF9913eFfF793a721965c2BbdF5920d6' is the account address of the agricultural service platform, and '0x79ed4069b734eEaE29f3De0BFa5bd1f5921Ea0d1' is the service provider account address of the smart contract.

[0245] After the smart contract is created, the agricultural service platform calls the deploy() function based on the order allocation and service route results. It stores the plant protection order information for Order 6 and the drone information that will service it in the corresponding variables and updates the order's status to OrderState = waiting. Finally, the function uses the 'DeploySuccessful' event to notify the drone that the contract has been successfully deployed and the 'WaitingMsg' event to notify the farmer that the order is waiting to be serviced. The result of a successful deploy() function call is shown in Figure 6(b).

[0246] Executing smart contracts:

[0247] As the drone travels to the farmland in Order 6, its position sensor monitors its location in real time. The drone then calls the heading() function in the smart contract. After passing the 'onlyDrone' logic test, the function records the drone's route in the gpsSensor variable, updates the order's status to OrderState = heading, and uses the 'HeadingMsg' event to notify the farmer that the drone is en route to the farmland in this order. The result of a successful heading() function call is shown in Figure 6(c).

[0248] Among them, '0x22b04c01211b3c1EC1a1Df404DffEe05F4B8dF3A' is the drone account address that serves this plant protection order.

[0249] Drones reach farmland:

[0250] When the drone arrives at the farmland specified in Order 6, the droneArrived() function in the smart contract is called. After passing the 'onlyDrone' logic test, the function records the drone's location and the remaining pesticide amount in the tank in the gpsSensor and pressureSensor variables, respectively. It also records the drone's arrival time (actualArrivedTime) and updates the order status to OrderState = arrived. Finally, the function uses the 'ArrivedMsg' event to notify the farmer that the drone has arrived at the farmland specified in this order. The result of a successful droneArrived() function call is shown in Figure 6(d).

[0251] Drones begin plant protection services:

[0252] When the drone opens its sprayer nozzle to begin its crop protection service, the switchOn() function in the smart contract is called. After passing the 'onlyDrone' logic test, the function updates the order status to OrderState = spraying and records the time the drone started service in the variable actualStartTime. Finally, the function uses the 'SprayingMsg' event to notify the farmer that the drone is spraying pesticides.

[0253] Drones are being used for plant protection:

[0254] As the drone provides plant protection for Order 6, its location sensors monitor its position in real time and call the spraying() function in the smart contract. After passing the 'onlyDrone' logic test, the function records its flight trajectory in the sprayingGPS variable and uses the 'SprayingMsg' event to notify the farmer that the drone is spraying pesticides. The result of a successful call to the spraying() function is shown in Figure 6(e).

[0255] Drones end plant protection services:

[0256] When the drone closes the sprayer nozzle to end the plant protection service, the switchOff() function in the smart contract is called. After passing the 'onlyDrone' logic test, the function records the remaining pesticide amount in the tank in the variable pressureSensor, updates the order status to OrderState = sprayed, and records the actualEndTime when the drone ended the service. Finally, the function uses the 'PayMoneyMsg' event to notify the farmer that the plant protection service has been completed. Please pay the amount. The result of a successful switchOff() call is shown in Figure 6(f).

[0257] Amount of plant protection paid by farmers:

[0258] Upon receiving the 'PayMoneyMsg' event notification, the farmer calls the pay() function in the smart contract through the agricultural service platform. After passing the 'onlyFarmer' and 'costs' logic tests, the function transfers the plant protection payment to the drone's account address, records the successful payment time (payTime), and updates the order status to OrderState = completed. Finally, the function uses the 'PaySuccessfulMsg' event to notify the drone that the farmer has completed the plant protection payment. The result of a successful pay() function call is shown in Figure 6(g), where '0xf2ffA8Ffe24DA9636FB1280661c672dbe3c8CdE4' is the farmer's account address for this order.

[0259] Farmers' evaluation of plant protection services:

[0260] After completing the plant protection payment, the farmer calls the assessment() function in the smart contract through the agricultural service platform. After passing the 'onlyFarmer' logic test, the function records the evaluation level and content in the variables satisfactionLevel and assessmentMessage, respectively, and updates the order status to OrderState = accessed. Finally, the function uses the 'AssessmentMsg' event to notify the drone that the farmer has completed the plant protection service evaluation. The result of a successful assessment() function call is shown in Figure 6(h).

[0261] In summary, the embodiments of this invention, powered by IoT technology, have developed a new framework and operational method for drone-based crop protection services based on smart contracts. This framework and operational method leverage operations research methods to solve the multi-order service optimization problem within an agricultural service platform. They also utilize smart contract technology to address fraud and trust issues associated with order fulfillment, as well as data security and privacy concerns. Ultimately, this maximizes the economic benefits of service providers and ensures secure and trustworthy transactions between service users and service providers.

[0262] Corresponding to the above-mentioned UAV plant protection service method based on smart contract, the embodiment of the present invention also provides a UAV plant protection service device based on smart contract, such as Figure 7 As shown, the device includes: an order collection and data acquisition module 701, a drone scheduling module 702 and a plant protection service module 703.

[0263] The order collection and data acquisition module 701 is used to collect plant protection order data and obtain land data and service provider data;

[0264] The drone scheduling module 702 is configured to input land data, service provider data, and plant protection order data as known parameters into a preset drone plant protection service scheduling model, and solve the drone plant protection service scheduling model to obtain an optimal drone scheduling plan. The drone plant protection service scheduling model is an optimization problem model with drone scheduling as the decision-making object and minimizing drone usage costs as the optimization goal. The drone scheduling plan includes the drones assigned to each plant protection order and the plant protection service route of each drone.

[0265] The plant protection service module 703 is used to create and deploy a smart contract on the blockchain for each plant protection order based on the optimal drone scheduling plan, and cooperate with the drone to execute the smart contract to complete the plant protection service via the drone;

[0266] Among them, smart contracts are at least used to notify drones to provide plant protection services in accordance with plant protection orders, record various relevant data of drones in the process of providing plant protection services, and provide order payment services, order evaluation services and record transaction data after the plant protection is completed.

[0267] The embodiment of the present invention further provides an electronic device, such as Figure 8 As shown, the electronic device includes a processor 801, a communication interface 802, a memory 803 and a communication bus 804, wherein the processor 801, the communication interface 802, and the memory 803 communicate with each other through the communication bus 804; the memory 803 is used to store computer programs; the processor 801 is used to implement the method steps described in any of the above-mentioned smart contract-based drone plant protection service methods when executing the computer program stored in the memory 803.

[0268] It should be noted that, for the device / electronic device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0269] It should be noted that the terms "first," "second," and the like are used to distinguish similar objects and are not necessarily used to describe a specific order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure.

[0270] Although the present application is described herein in conjunction with various embodiments, in the process of implementing the claimed application, those skilled in the art may understand and implement other variations of the disclosed embodiments by viewing the drawings and the disclosed content. In the description of the present invention, the word "comprising" does not exclude other components or steps, "one" or "a" does not exclude multiple situations, and "multiple" means two or more, unless otherwise clearly and specifically limited. In addition, certain measures are recorded in different embodiments, but this does not mean that these measures cannot be combined to produce good results.

[0271] The above is a further detailed description of the present invention in conjunction with specific preferred embodiments, and the specific implementation of the present invention should not be considered to be limited to these descriptions. For those skilled in the art of the present invention, without departing from the concept of the present invention, several simple deductions or substitutions can be made, which should be considered to fall within the scope of protection of the present invention.

Claims

1. A drone plant protection service method based on smart contracts, characterized in that: include: Collect plant protection order data, and obtain land data and service provider data; The land data, the service provider data, and the plant protection order data are input as known parameters into a preset drone plant protection service scheduling model, and then the drone plant protection service scheduling model is solved to obtain an optimal drone scheduling plan. The drone plant protection service scheduling model is an optimization problem model with drone scheduling as the decision object and minimizing cost as the optimization objective. The drone scheduling plan includes: drones assigned to each plant protection order and the plant protection service route of each drone; Deploy a smart contract on the blockchain for each plant protection order based on the optimal drone scheduling plan, and coordinate with drones to execute the smart contract to complete the plant protection service using drones; The smart contract is at least used to notify the drone to provide plant protection services according to the plant protection order, record various relevant data during the process of the drone providing plant protection services, and provide order payment services, order evaluation services and record transaction data after the plant protection is completed; The UAV plant protection service scheduling model is: ; s. t. Constraints 1 to 15; Constraint 1 is: ; Constraint 2 is: ; Constraint 3 is: ; Constraint 4 is: ; Constraint 5 is: ; Constraint 6 is: ; Constraint 7 is: ; Constraint 8 is: ; Constraint 9 is: ; Constraint 10 is: ; Constraint 11 is: ; Constraint 12 is: ; Constraint 13 is: ; Constraint 14 is: ; Constraint 15 is: ; in, represents the objective function value of the UAV plant protection service scheduling model; K represents a collection of drones, K ={1,2,.., r }, r Indicates the total number of drones; N Represents a collection of plant protection orders. N ={1,2,.., n }, n Indicates the total number of plant protection orders; N' A set of coordinate points representing the plant protection area, N' ={0,1,2,.., n }, {0} represents the coordinate point of the base station in the plant protection area; d ij Indicates plant protection order i Plant protection orders j The distance between ; l i Indicates plant protection order i The length of the farmland, ; w i Indicates plant protection order i The width of the farmland, ; z i Indicates plant protection order i The duration of pesticide spraying, ; q i Indicates plant protection order i The amount of pesticide spraying required, ; t ik Indicates drone k Arrival of plant protection orders i The moment of time, ; t jk Indicates drone k Arrival of plant protection orders j The moment of time, ; Indicates drone k Arrival of plant protection orders i The amount of pesticide remaining at , ; Indicates drone k Arrival of plant protection orders j The amount of pesticide remaining at , ; Indicates drone k From plant protection orders i Fly to plant protection orders j Power consumption, , , ; Indicates drone k In plant protection orders i Power consumption for spraying pesticides, ; Indicates plant protection order i The service time window, is the starting time of the service time window, is the end time of the service time window, ; G 0 means the drone’s own weight; W 0 indicates the maximum power of the drone; Q 0 indicates the maximum capacity of the drone's medicine box; Indicates the time it takes for the drone to turn once when spraying pesticides; Indicates the spray width of the drone; Indicates the average flight speed of the drone between plant protection orders; Indicates the average flight speed of the drone when spraying pesticides within an order; Indicates time; Indicates the amount of pesticide required per unit of farmland; represents the cost per unit of power consumed by the drone; represents the cost per unit of waiting time of the drone; represents the cost per unit of delay time of the drone; represents the fixed cost of using each drone; drones k From plant protection orders i Fly to plant protection orders j hour, x ijk =1, otherwise x ijk =0, ; Plant protection orders i By drone k When serving, y ik =1, otherwise y ik =0, ; Plant protection orders j By drone k When serving, y jk =1, otherwise y jk =0, .

2. The smart contract-based UAV plant protection service method according to claim 1, characterized in that: The collection of plant protection order data includes: Receive sensor monitoring data in the plant protection area; Determining whether the plant protection area has plant protection needs based on the sensor monitoring data; If there is a need for plant protection, prompt the user whether to generate a plant protection order; When the user chooses to generate a plant protection order, the plant protection order data is obtained from the plant protection order.

3. The smart contract-based UAV plant protection service method according to claim 1, characterized in that: The collection of plant protection order data includes: Receive plant protection orders directly submitted by users; Acquire plant protection order data from the plant protection order.

4. The smart contract-based UAV plant protection service method according to claim 1, characterized in that: The smart contract at least includes: The first storage module is used to store plant protection order information and drone information serving the order; The second storage module is used to store the route information of the UAV from the base station to the farmland location in the plant protection order; The third storage module is used to store the time and location information of the drone arriving at the farmland and the amount of pesticide remaining in the pesticide box; The first recording module is used to record the time when the drone starts the plant protection service; The fourth storage module is used to store route information of the drone when spraying pesticides in the farmland; The second recording module is used to record the amount of pesticide remaining in the pesticide tank and the time when the drone ends the plant protection service; a payment module, configured to perform billing based on the information recorded by the first storage module, the second storage module, the third storage module, the fourth storage module, the first recording module, and the second recording module; transfer the plant protection amount to the account address of the drone in response to the user's payment operation, and record the time of successful payment; The evaluation module is used to respond to the user's order evaluation and store the user's evaluation level, evaluation content and evaluation time for the plant protection order.

5. The smart contract-based UAV plant protection service method according to claim 4, characterized in that: The smart contract also includes: The first notification module is used to notify the drone that the smart contract has been successfully deployed when the smart contract is successfully deployed; The second notification module is used to notify the user that the plant protection order is waiting to be served after the plant protection order is generated; The third notification module is used to notify the user that the drone is heading to the farmland location specified in the plant protection order before the drone departs to perform plant protection services; a fourth notification module, configured to notify the user that the drone has arrived at the farmland location in the plant protection order when the drone arrives at the farmland location in the plant protection order; a fifth notification module, for notifying the user that the drone is spraying pesticides when the drone is spraying pesticides; The sixth notification module is used to notify the user that the plant protection service has been completed after the drone completes the plant protection service and prompt the user to pay the plant protection fee; The seventh notification module is used to notify the drone user that the order payment has been completed after the user completes the order payment; The eighth notification module is used to notify the drone user that the order evaluation has been completed after the user completes the order evaluation.

6. The smart contract-based UAV plant protection service method according to any one of claims 1 to 5, characterized in that: Applied to agricultural service platform.

7. A UAV plant protection service device based on smart contracts, characterized in that: include: The order collection and data acquisition module is used to collect plant protection order data and obtain land data and service provider data; A drone scheduling module is configured to input the land data, the service provider data, and the plant protection order data as known parameters into a preset drone plant protection service scheduling model, and solve the drone plant protection service scheduling model to obtain an optimal drone scheduling plan. The drone plant protection service scheduling model is an optimization problem model with drone scheduling as the decision-making object and minimizing drone usage costs as the optimization goal. The drone scheduling plan includes: drones assigned to each plant protection order and the plant protection service route of each drone; A plant protection service module, configured to create and deploy a smart contract on the blockchain for each plant protection order based on the optimal drone scheduling plan, and to coordinate with the drone to execute the smart contract to complete the plant protection service via the drone; The smart contract is at least used to notify the drone to provide plant protection services according to the plant protection order, record various relevant data during the process of the drone providing plant protection services, and provide order payment services, order evaluation services and record transaction data after the plant protection is completed; The UAV plant protection service scheduling model is: ; s. t. Constraints 1 to 15; Constraint 1 is: ; Constraint 2 is: ; Constraint 3 is: ; Constraint 4 is: ; Constraint 5 is: ; Constraint 6 is: ; Constraint 7 is: ; Constraint 8 is: ; Constraint 9 is: ; Constraint 10 is: ; Constraint 11 is: ; Constraint 12 is: ; Constraint 13 is: ; Constraint 14 is: ; Constraint 15 is: ; in, represents the objective function value of the UAV plant protection service scheduling model; K represents a collection of drones, K ={1,2,.., r }, r Indicates the total number of drones; N Represents a collection of plant protection orders. N ={1,2,.., n }, n Indicates the total number of plant protection orders; N' A set of coordinate points representing the plant protection area, N' ={0,1,2,.., n }, {0} represents the coordinate point of the base station in the plant protection area; d ij Indicates plant protection order i Plant protection orders j The distance between ; l i Indicates plant protection order i The length of the farmland, ; w i Indicates plant protection order i The width of the farmland, ; z i Indicates plant protection order i The duration of pesticide spraying, ; q i Indicates plant protection order i The amount of pesticide spraying required, ; t ik Indicates drone k Arrival of plant protection orders i The moment of time, ; t jk Indicates drone k Arrival of plant protection orders j The moment of time, ; Indicates drone k Arrival of plant protection orders i The amount of pesticide remaining at , ; Indicates drone k Arrival of plant protection orders j The amount of pesticide remaining at , ; Indicates drone k From plant protection orders i Fly to plant protection orders j Power consumption, , , ; Indicates drone k In plant protection orders i Power consumption for spraying pesticides, ; Indicates plant protection order i The service time window, is the starting time of the service time window, is the end time of the service time window, ; G 0 means the drone’s own weight; W 0 indicates the maximum power of the drone; Q 0 indicates the maximum capacity of the drone's medicine box; Indicates the time it takes for the drone to turn once when spraying pesticides; Indicates the spray width of the drone; Indicates the average flight speed of the drone between plant protection orders; Indicates the average flight speed of the drone when spraying pesticides within an order; Indicates time; Indicates the amount of pesticide required per unit of farmland; represents the cost per unit of power consumed by the drone; represents the cost per unit of waiting time of the drone; represents the cost per unit of delay time of the drone; represents the fixed cost of using each drone; drones k From plant protection orders i Fly to plant protection orders j hour, x ijk =1, otherwise x ijk =0, ; Plant protection orders i By drone k When serving, y ik =1, otherwise y ik =0, ; Plant protection orders j By drone k When serving, y jk =1, otherwise y jk =0, .

8. An electronic device, characterized in that: include: A processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus; Memory for storing computer programs; The processor is configured to implement the smart contract-based drone plant protection service method according to any one of claims 1 to 6 when executing the computer program stored in the memory.

Citation Information

Patent Citations

  • Urban shared unmanned aerial vehicle intelligent management system based on block chain technology

    CN113284370A

  • Plant protection unmanned aerial vehicle dynamic scheduling method based on column-dimension simulated annealing algorithm

    CN116050779A