Agricultural product quality safety tracing method based on agricultural Internet of thingsTechnical Field
The invention relates to the technical field of agricultural product transportation, in particular to an agricultural product quality safety tracing method based on the agricultural Internet of things.
Background
The importance of agricultural product quality safety tracing cannot be ignored, and through detailed recording and tracking, all links from the production place to the dining table of food can be ensured to be under the supervision, so that the food safety risk is effectively reduced. Through a full-chain information traceable mode, the problem of information asymmetry can be effectively solved, and a quality information intercommunication mechanism and a quality safety responsibility potential punishment mechanism of each link are established.
The real-time tracking ensures the safety of agricultural products in the transportation process, can timely discover and adjust vehicles deviating from a normal route, and displays the route of the transportation vehicles from a production place to a sales place to consumers, thereby realizing the transparency and the safety of the whole supply chain.
However, for some agricultural vehicles in the origin of agricultural products, the agricultural vehicles do not have the hardware condition of the GPS, and even if the GPS equipment is equipped, the GPS positioning effect is possibly affected due to the lack of the specialized technology of farmers, so that an agricultural product quality safety tracing method based on the agricultural Internet of things is needed to realize the positioning auxiliary function of the agricultural vehicles in the origin.
Disclosure of Invention
The invention aims to provide an agricultural product quality safety tracing method based on the agricultural Internet of things, which solves the following technical problems:
For some agricultural vehicles in the origin of agricultural products, the hardware condition of the GPS is not provided, and even if the GPS equipment is provided, the GPS positioning effect can be influenced due to lack of professional technology of farmers.
The aim of the invention can be achieved by the following technical scheme:
an agricultural product quality safety tracing method based on the agricultural Internet of things comprises the following steps:
The method comprises the steps of obtaining geographic coordinates of an agricultural product purchasing station, arranging a plurality of stations in a road near the agricultural product purchasing station, recording the geographic coordinates of the stations, and recording the current time, the types and the quantity of agricultural products transported by the agricultural vehicles and the identification information of the agricultural vehicles by station personnel each time an agricultural vehicle with a destination of the agricultural product purchasing station passes through the stations;
The agricultural vehicles arriving at the purchasing station on the same day are marked as C1, C2, cn in turn according to the arrival time, the stations passed by any agricultural vehicle Ci are marked as S1, S2 in turn according to the time sequence, smi, i E [1, n ], n represents the number of agricultural vehicles, mi represents the number of stations passed by any agricultural vehicle Ci, the agricultural vehicle sequence is C axis, the station sequence is S axis, the state when any vehicle passes by any station is represented by state coordinates (Ci, sj), j E [1, mi ],
Generating initial coordinates (C1, S1) according to a first passing site S1 of a first agricultural vehicle C1, marking identification information of the C1 vehicle in the geographic coordinates of the site S1 on a map, setting a generation length m1 -1, generating a path for the S coordinates, automatically adding 1 each time the C coordinates are generated, sequentially generating new state coordinates (C1, sj) after the S address sequence is added, marking the identification information of the C1 vehicle in the geographic coordinates of the site Sj on the map until j=m1, and completing the generation of a transportation path of the C1 agricultural vehicle;
And sequentially collecting the agricultural vehicles Ci according to the agricultural vehicle sequence, generating coordinates (Ci, S1) through a first station S1, and sequentially generating transport paths corresponding to mi -1 times until i=n, wherein the transport paths of all agricultural vehicles on the same day are generated.
As a further scheme of the invention, the identification information of the agricultural vehicle comprises, but is not limited to, the license plate number of the agricultural vehicle, the mobile phone number of the driver and the identification card number.
According to the method, the system and the device, the generated transportation path of any vehicle Ci is obtained, all stations through which the vehicle passes are connected in a map to generate a transportation track, and the transportation track is extended to an agricultural product purchasing station.
As a further solution of the invention, for any vehicle Ci, the arrival time, the type and the number of products transported corresponding to the marker are added to each station to be passed through in the map.
As a further scheme of the invention, each station is provided with a sub-database, the labels of the databases are the geographic coordinates of the station, and when each agricultural vehicle passes through the station, the current time, the types and the number of agricultural products transported by the agricultural vehicle and the identification information of the agricultural vehicle are stored in the sub-databases.
The method comprises the following steps of generating paths of all the arrived agricultural vehicles after the acquisition work of each acquisition station is finished, combining all the sub-databases of the current day into a total database, and generating data based on the total database.
In the generation of the path of any vehicle Ci, when generating a new state coordinate (Ci, sj), acquiring a sub-database corresponding to Sj, and searching corresponding data in the Sj sub-database by taking the identification information of Ci as an index.
The invention has the beneficial effects that:
The invention realizes the positioning auxiliary function of the vehicle by arranging a plurality of stations in the road near the agricultural product purchasing station and recording the geographic coordinates of the stations. The method reduces the technical requirements on the equipment of the vehicle, is simple and easy to implement by a method of recording time and vehicle information by site personnel, does not need to have complex technical knowledge, enables farmers with lower technical level to easily participate in the method, can assist in correcting or verifying GPS data by information recording when the agricultural vehicle passes through the sites because the sites are fixed and the geographic coordinates of the farmers are recorded in the system, improves the overall positioning accuracy, can realize the overall monitoring of agricultural products from the original place to the purchasing station by the site recording mode even if the agricultural vehicle does not have GPS equipment or GPS signals are poor, ensures the continuity and effectiveness of supervision, has lower technical requirements on the vehicle, enables the system to be more robust, can adapt to agricultural product logistics tracking under different technical conditions in different areas, improves the overall applicability of the system, provides a simple mode for connecting modern Internet of things technology for traditional agriculture, is beneficial to gradual conversion and upgrading of the traditional agriculture, and receives convenience and safety guarantee brought by the modern information technology.
Drawings
The invention is further described below with reference to the accompanying drawings.
Fig. 1 is a schematic flow chart of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Referring to fig. 1, the invention discloses an agricultural product quality safety tracing method based on the agricultural internet of things, which comprises the following steps:
The method comprises the steps of obtaining geographic coordinates of an agricultural product purchasing station, arranging a plurality of stations in a road near the agricultural product purchasing station, recording the geographic coordinates of the stations, and recording the current time, the types and the quantity of agricultural products transported by the agricultural vehicles and the identification information of the agricultural vehicles by station personnel each time an agricultural vehicle with a destination of the agricultural product purchasing station passes through the stations;
The agricultural vehicles arriving at the purchasing station on the same day are marked as C1, C2, cn in turn according to the arrival time, the stations passed by any agricultural vehicle Ci are marked as S1, S2 in turn according to the time sequence, smi, i E [1, n ], n represents the number of agricultural vehicles, mi represents the number of stations passed by any agricultural vehicle Ci, the agricultural vehicle sequence is C axis, the station sequence is S axis, the state when any vehicle passes by any station is represented by state coordinates (Ci, sj), j E [1, mi ],
Generating initial coordinates (C1, S1) according to a first passing site S1 of a first agricultural vehicle C1, marking identification information of the C1 vehicle in the geographic coordinates of the site S1 on a map, setting a generation length m1 -1, generating a path for the S coordinates, automatically adding 1 each time the C coordinates are generated, sequentially generating new state coordinates (C1, sj) after the S address sequence is added, marking the identification information of the C1 vehicle in the geographic coordinates of the site Sj on the map until j=m1, and completing the generation of a transportation path of the C1 agricultural vehicle;
And sequentially collecting the agricultural vehicles Ci according to the agricultural vehicle sequence, generating coordinates (Ci, S1) through a first station S1, and sequentially generating transport paths corresponding to mi -1 times until i=n, wherein the transport paths of all agricultural vehicles on the same day are generated.
The method does not necessarily require that each agricultural vehicle is equipped with GPS equipment, but realizes the positioning auxiliary function of the vehicle by arranging a plurality of stations in a road near the agricultural product purchasing station and recording the geographic coordinates of the stations. The system can automatically generate the transportation path of each agricultural vehicle by acquiring the transportation data and the site information of the agricultural vehicle and visually display the transportation path on a map. The monitoring capability of each link in the agricultural product transportation process is greatly improved, and the traceability efficiency and accuracy are improved.
When quality problems occur, the system can quickly locate the source of the problem product and the transportation track thereof, help to quickly recall or take other necessary countermeasures, and reduce loss and risk.
In another preferred embodiment of the present invention, the identification information of the agricultural vehicle includes, but is not limited to, a license plate number of the agricultural vehicle, a mobile phone number of the driver, and an identification card number.
In another preferred embodiment of the present invention, for any vehicle Ci, the transport path it generates is obtained, all stations through which the vehicle passes are linked in a map to generate a transport track, and the transport track is extended to the agricultural product acquisition station.
In another preferred embodiment of the invention, for any vehicle Ci, the arrival time, the type and number of products transported, corresponding to the tag, is added to each station that will be traversed in the map.
Any abnormal situation in the logistics process can be timely found through detailed tracking of the agricultural vehicle transportation path and real-time updating of data, so that corresponding measures are taken to ensure the quality safety of agricultural products.
In another preferred embodiment of the present invention, each station is provided with a sub-database, the tags of the database are the geographical coordinates of the station, and when each agricultural vehicle passes the station, the current time, the type and number of agricultural products transported by the agricultural vehicle and the identification information of the agricultural vehicle are stored in the sub-database.
In another preferred embodiment of the invention, after the acquisition work of the daily acquisition station is finished, route generation is carried out on all the arrived agricultural vehicles, and all the sub-databases of the same day are combined into a total database, and the route generation data is based on the total database.
The method allows key information such as identification information, arrival time, type and quantity of transported products and the like of the agricultural vehicle to be recorded in the sub-database corresponding to each site, and finally combined into a total database. Centralized management and transparent display of such information helps consumers and other stakeholders to understand the origin and circulation process of the agricultural product.
In another preferred embodiment of the present invention, in the path generation of any vehicle Ci, when generating a new state coordinate (Ci, sj), a sub-database corresponding to Sj is acquired, and corresponding data is retrieved in the Sj sub-database with the identification information of Ci as an index.
The collected data can be used for analyzing the circulation mode, the transportation efficiency and the bottleneck problem in the supply chain of agricultural products, so as to guide the optimization decision of agricultural production and logistics and improve the performance of the whole supply chain.
The systematic data acquisition and management are beneficial to ensuring that the agricultural product circulation accords with related laws and regulations and reducing the risk of violations.
Because the information is stored in a database and can be visually presented in the form of a map or the like, producers, consumers, regulatory authorities, and other interested parties can more easily access and share important information.
The foregoing describes one embodiment of the present invention in detail, but the description is only a preferred embodiment of the present invention and should not be construed as limiting the scope of the invention. All equivalent changes and modifications within the scope of the present invention are intended to be covered by the present invention.