Livestock breeding tracing method based on block chain

文档序号:946296 发布日期:2020-10-30 浏览:13次 中文

阅读说明:本技术 一种基于区块链的家畜养殖溯源方法 (Livestock breeding tracing method based on block chain ) 是由 李建才 于 2020-07-15 设计创作,主要内容包括:本发明提供一种基于区块链的家畜养殖溯源方法,包括以下步骤:S1,将防伪二维码的图像照片上传区块链服务器,并为各个防伪二维码建立唯一编码;S2,初始用户向所述区块链服务器提出申请请求,所述区块链服务器向初始用户下发账户及登录密码,并将所对应防伪二维码下发初始用户对家畜进行一对一的挂牌;S3,初始用户使用具有GPS功能的扫码器定时读取所述防伪二维码从而访问所述区块链服务器,所述区块链服务器向所述扫码器请求登录信息及GPS信息;S4,所述区块链服务器获取所述登录信息及所述GPS信息后将所述GPS信息及初始用户的写入信息存储至所述区块链服务器中。(The invention provides a livestock breeding tracing method based on a block chain, which comprises the following steps: s1, uploading the image photos of the anti-counterfeiting two-dimensional codes to a blockchain server, and establishing unique codes for the anti-counterfeiting two-dimensional codes; s2, the initial user sends an application request to the blockchain server, the blockchain server issues an account and a login password to the initial user, and issues the corresponding anti-counterfeiting two-dimensional code to the initial user to carry out one-to-one listing on livestock; s3, the initial user uses a code scanner with a GPS function to read the anti-counterfeiting two-dimensional code regularly so as to access the block chain server, and the block chain server requests login information and GPS information from the code scanner; and S4, the block chain server acquires the login information and the GPS information and then stores the GPS information and the write-in information of the initial user into the block chain server.)

1. A livestock breeding tracing method based on a block chain is characterized by comprising the following steps:

S1, uploading the image photos of the anti-counterfeiting two-dimensional codes to a blockchain server, and establishing unique codes for the anti-counterfeiting two-dimensional codes;

s2, the initial user sends an application request to the blockchain server, the blockchain server issues an account and a login password to the initial user, and issues the corresponding anti-counterfeiting two-dimensional code to the initial user to carry out one-to-one listing on livestock;

s3, the initial user uses a code scanner with a GPS function to read the anti-counterfeiting two-dimensional code regularly so as to access the block chain server, and the block chain server requests login information and GPS information from the code scanner;

and S4, the block chain server acquires the login information and the GPS information and then stores the GPS information and the write-in information of the initial user into the block chain server.

2. The blockchain-based livestock breeding traceability method of claim 1, wherein the step S4 further comprises:

and S41, the block chain server converts the GPS information into geographical position information, and then stores the geographical position information into the block chain server.

3. The blockchain-based livestock breeding traceability method of claim 1, wherein the written information comprises livestock species, growth conditions and tradable status.

4. The blockchain-based livestock breeding traceability method according to claim 3, wherein after the step S4, further comprising:

and S5, the block chain server further updates the tradable state of the livestock according to the written information of the user.

5. The blockchain-based livestock breeding traceability method according to claim 4, further comprising in step S5:

s51, the block chain server further constructs a visual map, and updates the position information and the tradable state of the livestock on the visual map according to the geographical position information.

6. The livestock breeding tracing method based on the block chain as claimed in claim 1, wherein the anti-counterfeiting two-dimensional code comprises a printing layer (10), an anti-counterfeiting ink (11) printed on the surface of the printing layer (10), and a protective layer (12) covered on the surface of the anti-counterfeiting ink (11), wherein the periphery of the image-finding pattern of the anti-counterfeiting ink (11) has micron-scale random anti-counterfeiting ripples (111).

Technical Field

The invention relates to a tracing method based on a GPS signal, in particular to a livestock breeding tracing method based on a block chain and the GPS signal.

Background

The livestock product is an important component of human food, and the quality safety and health of the livestock product are not only related to the personal health, but also related to the stability of the society.

The existing livestock product traceability generally stores information of a livestock breeding process directly into a storage unit, a data verification link does not exist in the whole process, the risk that data in the storage unit is tampered exists, and the reliability of a final traceability result is influenced.

Disclosure of Invention

The invention provides a livestock breeding traceability method based on a block chain, which can effectively solve the problems.

The invention is realized by the following steps:

a livestock breeding tracing method based on a block chain comprises the following steps:

s1, uploading the image photos of the anti-counterfeiting two-dimensional codes to a blockchain server, and establishing unique codes for the anti-counterfeiting two-dimensional codes;

s2, the initial user sends an application request to the blockchain server, the blockchain server issues an account and a login password to the initial user, and issues the corresponding anti-counterfeiting two-dimensional code to the initial user to carry out one-to-one listing on livestock;

s3, the initial user uses a code scanner with a GPS function to read the anti-counterfeiting two-dimensional code regularly so as to access the block chain server, and the block chain server requests login information and GPS information from the code scanner;

and S4, the block chain server acquires the login information and the GPS information and then stores the GPS information and the write-in information of the initial user into the block chain server.

The invention has the beneficial effects that: by using the anti-counterfeiting two-dimensional code, the anti-counterfeiting two-dimensional code has uniqueness and is difficult to copy, so that the two-dimensional code can be prevented from being copied fundamentally. In addition, the anti-counterfeiting two-dimensional code is uploaded to the block chain server, the unique code is established, and the anti-counterfeiting two-dimensional code is read regularly through the code scanner with the GPS function, so that the GPS data is difficult to be changed, the instant position information of the livestock can be stored in the block chain server in a block chain mode, and the data is further prevented from being changed; and finally, the reliability of the tracing result is improved.

Drawings

Fig. 1 is a flowchart of a method for tracing livestock breeding based on a blockchain according to an embodiment of the present invention.

Fig. 2 is a schematic structural diagram of an anti-counterfeiting two-dimensional code in the livestock breeding traceability method based on the block chain provided by the embodiment of the invention.

Detailed Description

In order to make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be described clearly and completely with reference to the accompanying drawings of the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be obtained by a person skilled in the art without any inventive step based on the embodiments of the present invention, are within the scope of the present invention. Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be obtained by a person skilled in the art without any inventive step based on the embodiments of the present invention, are within the scope of the present invention.

In the description of the present invention, the terms "first" and "second" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implying any number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature.

Referring to fig. 1, an embodiment of the present invention provides a livestock breeding tracing method based on a blockchain, including the following steps:

s1, uploading the image photos of the anti-counterfeiting two-dimensional codes to a blockchain server, and establishing unique codes for the anti-counterfeiting two-dimensional codes;

s2, the initial user sends an application request to the blockchain server, the blockchain server issues an account and a login password to the initial user, and issues the corresponding anti-counterfeiting two-dimensional code to the initial user to carry out one-to-one listing on livestock;

s3, the initial user uses a code scanner with a GPS function to read the anti-counterfeiting two-dimensional code regularly so as to access the block chain server, and the block chain server requests login information and GPS information from the code scanner;

and S4, the block chain server acquires the login information and the GPS information and then stores the GPS information and the write-in information of the initial user into the block chain server.

In step S1, referring to fig. 2, the anti-counterfeit two-dimensional code includes a printing layer (10), an anti-counterfeit ink (11) printed on the surface of the printing layer (10), and a protective layer (12) covering the surface of the anti-counterfeit ink (11), wherein the periphery of the image-seeking pattern of the anti-counterfeit ink (11) has micron-sized random anti-counterfeit ripples (111). The height of the micron-sized random anti-counterfeiting corrugation (111) is 100-500 microns, and the distance is 3-8 mm. The micron-sized random anti-counterfeiting corrugation (111) can be obtained by processing the periphery of the image-searching pattern of the anti-counterfeiting ink (11) through ultrasonic waves in the curing process of the anti-counterfeiting ink (11).

Specifically, the method comprises the following steps:

s11, adopting a jet printing machine to jet print random ultraviolet light curing ink codes on the printing layer (10);

s12, processing the periphery of the figure-seeking pattern of the ultraviolet light curing ink code by using ultrasonic waves, and enabling the periphery of the figure-seeking pattern of the ultraviolet light curing ink code to generate micron-scale random anti-counterfeiting ripples (111);

s13, curing the ultraviolet curing ink code by using ultraviolet rays;

and S14, finally, covering a transparent protective layer (12) on the ultraviolet light curing ink codes.

As a further improvement, a label can be further attached to the protective layer (12) to prevent the two-dimensional code from being disordered.

The reason that the periphery of the image searching pattern coded by the ultraviolet light curing ink is only treated by ultrasonic waves is that the image searching pattern is generally large in size, and micron-sized random anti-counterfeiting ripples (111) are formed on the periphery of the image searching pattern, so that the use of the image searching pattern cannot be influenced. In addition, the processing range and the processing area of the ultrasonic wave are relatively controllable. In one embodiment, only one of the viewfinder graphic perimeters is treated with ultrasound. The frequency of the ultrasonic wave is not limited, and in another embodiment, the frequency of the ultrasonic wave is 40 KHz. It can be understood that the random anti-counterfeiting ripples (111) with the interval of micron order can be obtained through the control of the frequency of the ultrasonic wave, and the interval of the random anti-counterfeiting ripples (111) of micron order is positively correlated with the frequency of the ultrasonic wave. In order to obtain the random anti-counterfeiting ripples (111) with the interval of micron order, preferably, the frequency of the ultrasonic wave is 30 KHz-50 KHz.

And after the anti-counterfeiting two-dimensional code is prepared, further acquiring an image photo of the anti-counterfeiting two-dimensional code through a high-definition camera, uploading the image photo to a block chain server, and establishing a unique code for each anti-counterfeiting two-dimensional code.

When the two-dimensional code is copied, because the micron-sized random anti-counterfeiting ripple (111) at the periphery of the image-searching graph cannot be copied by the existing printer or copying equipment, the image of the anti-counterfeiting two-dimensional code stored in the block chain can be called for comparison, and the method specifically comprises the following steps:

And acquiring a simulated two-dimensional code image by using a high-definition camera, and comparing the simulated two-dimensional code image with the anti-counterfeiting two-dimensional code image stored in the block chain server, so as to identify the authenticity of the two-dimensional code.

In step S2, the initial user may make an application request to the blockchain server, and the blockchain server issues an account and a login password to the initial user. The application request comprises information (name, address, contact information and the like) of an initial user, the number of the applied anti-counterfeiting two-dimensional codes and the like. And the block chain server issues the number of the anti-counterfeiting two-dimensional codes of the corresponding number in the block chain to the account according to the number of the applied anti-counterfeiting two-dimensional codes, and distributes the physical anti-counterfeiting two-dimensional codes to the hands of the initial user. The initial user can carry out one-to-one listing on the livestock after receiving the physical anti-counterfeiting two-dimensional code.

In step S3, the initial user can use a scanner with GPS function to periodically read the anti-counterfeit two-dimensional code to access the block chain server during the raising process. And the initial user logs in through the account and the login password, and at the moment, the block chain corresponding to the code scanning sends a request for requesting the GPS information to the code scanner. It is possible that in this process, the initial user must default to the state in which the GPS information of his own scanner is accessible. The code scanner may be a mobile phone or other intelligent device, etc. When the anti-counterfeiting two-dimensional code is in a login state, different anti-counterfeiting two-dimensional codes can be continuously scanned, and therefore position information of different anti-counterfeiting two-dimensional codes can be updated.

In other embodiments, step S3 may be equivalently replaced with step S3'.

S3', the initial user logs in the block chain server by using a code scanner with a GPS function, then the anti-counterfeiting two-dimensional code is read by using the code scanner at regular time, and the block chain server requests GPS information from the code scanner.

In step S4, the written information includes the livestock type, growth status, and tradable status.

In other embodiments, the step S4 may further include:

and S41, the block chain server converts the GPS information into geographical position information, and then stores the geographical position information into the block chain server.

As a further improvement, after step S4, the method further includes:

and S5, the block chain server further updates the tradable state of the livestock according to the written information of the user.

As a further improvement, the step S5 further includes:

s51, the block chain server further constructs a visual map, and updates the position information and the tradable state of the livestock on the visual map according to the geographical position information.

Specifically, generally, the application of the initial user is applied in a farm unit, and therefore the blockchain server can count the cultivation number, variety and tradable state of different initial users and update the cultivation number, variety and tradable state on the visual map in real time, so that the client can conveniently trade.

In step S5, when livestock are traded, the initial user may set the blockchain of the corresponding livestock to a scannable code written state. The state of writing the scannable code is relative to the state that the initial user needs an account number and a password to write the code, and the state of writing the scannable code does not need an account. And only the purchaser needs to access the block chain server by reading the anti-counterfeiting two-dimensional code through a second code scanner with a GPS function, and the block chain server requests GPS information from the second code scanner and writes the GPS information into the corresponding block chain. Because the livestock is in the circulation process, the purchaser generally scans the two-dimensional code of the livestock to obtain the actual information of the livestock, and therefore tracking of the livestock in the cultivation and circulation process can be finally achieved.

The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

8页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种基于GNSS的坡体位移监测装置

网友询问留言

已有0条留言

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

精彩留言,会给你点赞!

技术分类