Logistics order management system based on block chain

文档序号:8850 发布日期:2021-09-17 浏览:41次 中文

1. A logistics order management system based on a block chain is characterized in that: the management system comprises an order information receiving module, an order processing condition management module, a fruit planting condition management module and an order distribution module, wherein the order information receiving module is used for receiving and processing information data of an order to be distributed, the order processing condition management module is used for acquiring order processing conditions of each farmer node and uploading the order processing conditions to a block chain at intervals of a preset time period, the fruit planting condition management module is used for acquiring fruit images of each farmer planting area and uploading the fruit images to corresponding farmer nodes of the block chain and counting fruit distribution conditions of each farmer according to the fruit images of the planting areas, and the order distribution module distributes the order to be distributed to the best farmer according to the information data, the order processing conditions and the fruit distribution conditions of the order to be distributed;

the management method of the logistics order management system comprises the following steps:

step S1: receiving information data of an order to be distributed, wherein the order information data comprises a destination and a fruit preset amount;

step S2: each farmer uploads order processing conditions to a block chain every other preset time period;

step S3: collecting fruit images of each farmer planting area, uploading the fruit images to corresponding nodes of the block chain, and counting the distribution condition of fruits of each farmer according to the fruit images of the planting areas;

step S4: distributing the order to be distributed to the optimal farmer according to the information data, the order processing condition and the fruit distribution condition of the order to be distributed;

the step S3 includes:

collecting fruit images of each farmer planting area, and uploading the fruit images to corresponding farmer nodes on the block chain;

extracting the area size of the fruit and the color distribution of the fruit surface from the fruit image,

if the area of a certain fruit is less than or equal to the fruit area threshold value, judging the fruit to be a growing fruit;

if the fruit area size is larger than the fruit area threshold value, acquiring the ripening percentage according to the color distribution of the fruit surface, wherein the ripening percentage is the percentage of the area region of the first color on the fruit surface in the whole fruit surface area region, the first color is the color of the fruit after ripening,

if the percentage of ripeness of a certain fruit is less than or equal to the percentage of ripeness threshold value, the certain fruit is judged to be a fruit to be ripened, and if the percentage of ripeness of the certain fruit is less than or equal to the percentage of ripeness threshold value, the certain fruit is judged to be a ripened fruit;

and (4) counting the growing fruit quantity Zs, the fruit quantity Zd to be matured and the matured fruit quantity Zc of each farmer planting area.

Background

Rural logistics is a concept relative to urban logistics, and refers to a general term for transportation, handling, loading and unloading, packaging, processing, warehousing and all related activities for production, life and other economic activities of rural residents. With the rapid development of traffic and logistics, rural logistics are also rapidly developed. The development of rural logistics is convenient for selling agricultural products in rural areas, and is beneficial to the circulation of the agricultural products. In order to improve the sales level of agricultural products, farmers often cooperate to sell planted agricultural products together. However, in the prior art, when the orders are distributed, the orders are not distributed reasonably.

Disclosure of Invention

The invention aims to provide a logistics order management system and method based on a block chain, so as to solve the problems in the prior art.

In order to achieve the purpose, the invention provides the following technical scheme:

a logistics order management system based on a block chain comprises an order information receiving module, an order processing condition management module, a fruit planting condition management module and an order distribution module, the order information receiving module is used for receiving and processing information data of an order to be distributed, the order processing condition management module is used for acquiring the order processing condition of each farmer node, and uploading the order processing condition to a block chain every a preset time period, wherein the fruit planting condition management module is used for collecting fruit images of each farmer planting area and uploading the fruit images to corresponding farmer nodes of the block chain, and counting the fruit distribution condition of each farmer according to the fruit image of the planting area, and distributing the order to be distributed to the optimal farmer by the order distribution module according to the information data of the order to be distributed, the order processing condition and the fruit distribution condition.

Preferably, the fruit planting condition management module comprises an image acquisition module, an image uploading module, a fruit type judging module and a fruit quantity counting module, wherein the image acquisition module is used for acquiring fruit images of each farmer planting area, the image uploading module is used for uploading the fruit images of each farmer planting area to each farmer node on a block chain, the fruit type judging module is used for judging the type of the fruit according to the acquired fruit images, and the fruit quantity counting module is used for counting the quantity of the fruit of each type in the planting area of each farmer.

Preferably, the fruit type judging module comprises an image extracting module, an area comparing module and a color comparing module, wherein the image extracting module is used for extracting the area size of the fruit and the color distribution of the surface of the fruit from the fruit image, the area comparing module is used for comparing the area size of the fruit with a fruit area threshold value and judging whether the fruit is a growing fruit or not according to the comparison result, and the color comparing module is used for comparing the color area of the surface of the fruit and judging whether the fruit is a fruit to be ripe or a ripe fruit.

Preferably, the order information receiving module comprises a data acquisition module, a logistics day number estimation module and a fruit type distribution module, the data acquisition module acquires a destination and a fruit preset amount in the order to be distributed, the logistics day number estimation module acquires delivery of fruits from the place where the farmer plants according to historical logistics records, the estimated logistics days required for the fruits to reach the destination, and the fruit type distribution module distributes the fruits to be matured or matured fruits to the order to be distributed according to the size relation between the logistics estimated days and the logistics day number threshold value.

Preferably, the order processing condition management module comprises an order number counting module and an unprocessed order fruit allocation quantity counting module, wherein the order number counting module is used for counting the number of processed orders and the number of unprocessed orders of each farmer, and the unprocessed order fruit allocation quantity counting module is used for counting the allocation quantity of fruits to be ripe and the allocation quantity of ripe fruits in the fruit preset quantity in unprocessed orders; the order distribution module comprises a distribution index calculation module and a distribution index sorting module, the distribution index calculation module calculates distribution indexes according to data counted by the order number counting module, the unprocessed order fruit distribution quantity counting module and the fruit quantity counting module, the distribution index sorting module sorts the distribution indexes from large to small, the first farmer is selected as the best farmer, and the order to be distributed is distributed to the best farmer.

A logistics order management method based on a block chain comprises the following steps:

step S1: receiving information data of an order to be distributed, wherein the order information data comprises a destination and a fruit preset amount;

step S2: each farmer uploads order processing conditions to a block chain every other preset time period;

step S3: collecting fruit images of each farmer planting area, uploading the fruit images to corresponding nodes of the block chain, and counting the distribution condition of fruits of each farmer according to the fruit images of the planting areas;

step S4: and distributing the order to be distributed to the optimal farmer according to the information data, the order processing condition and the fruit distribution condition of the order to be distributed.

Preferably, the step S3 includes:

collecting fruit images of each farmer planting area, and uploading the fruit images to corresponding farmer nodes on the block chain;

extracting the area size of the fruit and the color distribution of the fruit surface from the fruit image,

if the area of a certain fruit is less than or equal to the fruit area threshold value, judging the fruit to be a growing fruit;

if the fruit area size is larger than the fruit area threshold value, acquiring the ripening percentage according to the color distribution of the fruit surface, wherein the ripening percentage is the percentage of the area region of the first color on the fruit surface in the whole fruit surface area region, the first color is the color of the fruit after ripening,

if the percentage of ripeness of a certain fruit is less than or equal to the percentage of ripeness threshold value, the certain fruit is judged to be a fruit to be ripened, and if the percentage of ripeness of the certain fruit is less than or equal to the percentage of ripeness threshold value, the certain fruit is judged to be a ripened fruit;

and (4) counting the growing fruit quantity Zs, the fruit quantity Zd to be matured and the matured fruit quantity Zc of each farmer planting area.

Preferably, the step S1 further includes:

obtaining estimated logistics days required by fruits for delivering from the place where the farmer plants to the destination according to historical logistics records, if the estimated logistics days are smaller than a logistics days threshold value, allocating the ripe fruits to the order to be allocated, and if the logistics days are larger than or equal to the logistics days threshold value, allocating the ripe fruits to the order to be allocated.

Preferably, the step S2 further includes:

the order processing situation comprises a processed order situation and an unprocessed order situation, the processed order situation comprises the processed order number Dy of each farmer, and the unprocessed order situation comprises the unprocessed order number Dw, the allocation quantity Yd of fruits to be ripe and the allocation quantity Yc of ripe fruits in the fruit preset quantity in the unprocessed order.

Preferably, the step S4 includes:

step S41: calculating distribution index of each farmer

U=0.3*Dy/(Dy+Dw)+0.4*P/[Zs+(Zd-Yd)+(Zc-Yc)]+0.3*[Zs+(Zd-Yd)+(Zc-Yc)]/Za,

Wherein the content of the first and second substances,i represents the ith farmer, n represents the number of the farmers,

p = Zd-Yd when allocating ripe fruit to the to-be-allocated order, P = Zc-Yc when allocating ripe fruit to the to-be-allocated order,

step S42: and sorting the distribution indexes in a descending order, selecting the first farmer as the best farmer, and distributing the order to be distributed to the best farmer.

Compared with the prior art, the invention has the beneficial effects that: according to the method and the device, the fruit type distribution condition of the farmer planting area is acquired by acquiring the fruit image of each farmer planting area, the order is distributed according to the fruit type distribution condition of each farmer planting area and the order processing condition of each farmer, the randomness of the order distribution is reduced, and the fairness and reasonability of the order distribution are promoted.

Drawings

FIG. 1 is a block chain-based logistics order management system;

fig. 2 is a flow chart illustrating a block chain-based logistics order management method according to the present invention.

Detailed Description

The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.

Referring to fig. 1-2, in an embodiment of the present invention, a logistics order management system based on block chains, the management system comprises an order information receiving module, an order processing condition management module, a fruit planting condition management module and an order distribution module, the order information receiving module is used for receiving and processing information data of an order to be distributed, the order processing condition management module is used for acquiring the order processing condition of each farmer node, and uploading the order processing condition to a block chain every a preset time period, wherein the fruit planting condition management module is used for collecting fruit images of each farmer planting area and uploading the fruit images to corresponding farmer nodes of the block chain, and counting the fruit distribution condition of each farmer according to the fruit image of the planting area, and distributing the order to be distributed to the optimal farmer by the order distribution module according to the information data of the order to be distributed, the order processing condition and the fruit distribution condition.

The fruit planting condition management module comprises an image acquisition module, an image uploading module, a fruit type judging module and a fruit quantity counting module, wherein the image acquisition module is used for acquiring fruit images of each farmer planting area, the image uploading module is used for uploading the fruit images of each farmer planting area to each farmer node on a block chain, the fruit type judging module is used for judging the type of fruits according to the acquired fruit images, and the fruit quantity counting module is used for counting the quantity of the fruits of each type in the planting area of each farmer.

The fruit type judging module comprises an image extracting module, an area comparing module and a color comparing module, wherein the image extracting module is used for extracting the area size of the fruit and the color distribution of the surface of the fruit from the fruit image, the area comparing module is used for comparing the area size of the fruit with a fruit area threshold value and judging whether the fruit is a growing fruit or not according to the comparison result, and the color comparing module is used for comparing the color area of the surface of the fruit and judging whether the fruit is a fruit to be ripe or a ripe fruit.

The order information receiving module comprises a data acquisition module, a logistics day number estimation module and a fruit type distribution module, the data acquisition module acquires a destination and a fruit preset amount in an order to be distributed, the logistics day number estimation module acquires delivery of fruits from a place where a farmer planting area is located according to historical logistics records and estimates the logistics days required for reaching the destination, and the fruit type distribution module distributes the fruits to be matured or matured fruits to the order to be distributed according to the size relation between the logistics estimation days and a logistics day number threshold value.

The order processing condition management module comprises an order number counting module and an unprocessed order fruit allocation quantity counting module, wherein the order number counting module is used for counting the number of processed orders and the number of unprocessed orders of each farmer, and the unprocessed order fruit allocation quantity counting module is used for counting the allocation quantity of fruits to be ripe and the allocation quantity of ripe fruits in the fruit preset quantity in unprocessed orders; the order distribution module comprises a distribution index calculation module and a distribution index sorting module, the distribution index calculation module calculates distribution indexes according to data counted by the order number counting module, the unprocessed order fruit distribution quantity counting module and the fruit quantity counting module, the distribution index sorting module sorts the distribution indexes from large to small, the first farmer is selected as the best farmer, and the order to be distributed is distributed to the best farmer.

A logistics order management method based on a block chain comprises the following steps:

step S1: receiving information data of an order to be distributed, the order information data including a destination and a predetermined amount of fruit,

acquiring estimated logistics days required for delivering fruits from the place where the farmer plants and arriving at the destination according to historical logistics records, if the estimated logistics days are less than a logistics days threshold value, allocating ripe fruits to the order to be allocated, and if the logistics days are more than or equal to the logistics days threshold value, allocating the ripe fruits to the order to be allocated; the agricultural products such as bananas, tomatoes and papayas are picked before ripening and can be ripened after being placed for several days, so when the days required by logistics are long, fruits to be ripened should be distributed to prevent the fruits from being damaged in the transportation process, meanwhile, the fruits to be ripened slowly in the transportation process improve the fruit planting management benefits, when the days required by logistics are short, the ripened fruits should be distributed, so that the days required by logistics are short, the fruits are not easy to damage, and on the other hand, a client can conveniently receive the fruits and can enjoy the fruits;

step S2: each farmer uploads the order processing conditions to the block chain every other preset time period: the order processing situation comprises a processed order situation and an unprocessed order situation, the processed order situation comprises a processed order number Dy of each farmer, and the unprocessed order situation comprises an unprocessed order number Dw, and an allocation quantity Yd of fruits to be ripe and an allocation quantity Yc of ripe fruits in a preset quantity of fruits in an unprocessed order;

step S3: collecting fruit images of each farmer planting area, uploading the fruit images to corresponding nodes of the block chain, and counting the distribution condition of fruits of each farmer according to the fruit images of the planting areas

Collecting fruit images of each farmer planting area, and uploading the fruit images to corresponding farmer nodes on the block chain;

extracting the area size of the fruit and the color distribution of the fruit surface from the fruit image,

if the area of a certain fruit is less than or equal to the fruit area threshold value, judging the fruit to be a growing fruit;

if the fruit area size is larger than the fruit area threshold value, acquiring the ripening percentage according to the color distribution of the fruit surface, wherein the ripening percentage is the percentage of the area region of the first color on the fruit surface in the whole fruit surface area region, the first color is the color of the fruit after ripening,

if the percentage of ripeness of a certain fruit is less than or equal to the percentage of ripeness threshold value, the certain fruit is judged to be a fruit to be ripened, and if the percentage of ripeness of the certain fruit is less than or equal to the percentage of ripeness threshold value, the certain fruit is judged to be a ripened fruit;

counting the growing fruit quantity Zs, the fruit quantity Zd to be mature and the mature fruit quantity Zc of each farmer planting area;

step S4: distributing the order to be distributed to the optimal farmer according to the information data, the order processing condition and the fruit distribution condition of the order to be distributed:

step S41: calculating distribution index of each farmer

U=0.3*Dy/(Dy+Dw)+0.4*P/[Zs+(Zd-Yd)+(Zc-Yc)]+0.3*[Zs+(Zd-Yd)+(Zc-Yc)]a/Za, wherein,i represents the ith farmer, n represents the number of the farmer, ZsiRepresents the amount of fruit grown in the planting area of the ith farmer, ZdiRepresents the amount of fruit to be matured in the planting area of the ith farmer, ZciShows the mature fruit quantity, Yd, of the planting area of the ith farmeriDenotes the allocated quantity of fruit to be ripened, Yc, of the predetermined quantity of fruit in the unprocessed order of the ith farmeriIndicating the allocated amount of ripe fruit in the predetermined amount of fruit in the unprocessed order of the ith farmer,

p = Zd-Yd when allocating ripe fruit to the to-be-allocated order, P = Zc-Yc when allocating ripe fruit to the to-be-allocated order,

step S42: and sorting the distribution indexes in a descending order, selecting the first farmer as the best farmer, and distributing the order to be distributed to the best farmer. When the orders are distributed, the processing condition of the orders distributed by the farmers and the condition of fruits planted by the farmers are comprehensively considered, so that the overstocked orders which are not processed by the farmers can be prevented, the overstocked agricultural products of a certain farmer can be prevented, and the distribution of the orders is more fair.

It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned.

完整详细技术资料下载
上一篇:石墨接头机器人自动装卡簧、装栓机
下一篇:一种唑螨酯与农药混用药效评估方法及系统

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!