Tracing method and system based on block chain
By obtaining and analyzing the characteristic data of the entire product production process and adjusting parameter values to meet the accuracy of the chain, the corresponding problem of product attributes and chain information in blockchain traceability is solved, and efficient traceability and data accuracy are achieved.
Patent Information
- Application Number
- CN202411151854.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-21
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2044-08-21
AI Technical Summary
In the existing blockchain traceability method, traceability query is only conducted through external information such as product electronic tags, and the unique correspondence and traceability between the product's own attributes and the chained information cannot be guaranteed.
By obtaining the characteristic data of the entire product production process, analyzing and configuring the initial collection accuracy of the changing characteristic data, adjusting the parameter value to meet the chaining accuracy, and blockchain-blocking is carried out according to the preset production cycle to ensure the parameters of the product's changing characteristic data Value traceability.
It realizes the unique correspondence of product information on the chain, reduces data length, improves traceability efficiency, and ensures the accuracy and credibility of product information.
Smart Images

Figure CN119130488A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of information traceability, and in particular to a blockchain-based traceability method and system. Background Art
[0002] Blockchain traceability is a method of tracking and verifying goods throughout the entire process using blockchain technology. The main advantages of blockchain traceability are that its data cannot be tampered with, is traceable, decentralized, and has distributed accounting features. These features enable blockchain technology to ensure the authenticity and credibility of information, improve traceability efficiency, and protect the rights and interests of consumers.
[0003] In the prior art, when blockchain technology is used to trace the information on the blockchain based on product information, since the traceability query is only performed by using external information such as product electronic tags, it is easy to lead to the situation that although the correspondence between product labels and chain information can be achieved, the product itself may not correspond to the chain information, and thus the unique correspondence and traceability between the product's own attributes and the chain information cannot be guaranteed. Summary of the invention
[0004] In view of the shortcomings of the prior art mentioned above, the purpose of the present invention is to provide a traceability method and system based on blockchain, which is used to solve the problem that when using blockchain technology to trace the information on the blockchain based on product information, since the traceability query is only performed by using external information such as product electronic tags, it is easy to lead to the situation that although the correspondence between the product label and the information on the chain can be achieved, the product itself may not correspond to the information on the chain, and thus the unique correspondence and traceability between the product itself and the information on the chain cannot be guaranteed through the attributes of the product itself.
[0005] To achieve the above purpose and other related purposes, the present invention provides a traceability method based on blockchain, comprising the following steps: chain processing process: obtaining various types of feature data of products in the entire process of product production, and obtaining the change feature data in various types of feature data according to the parameter changes of the feature data; configuring the initial collection accuracy of the change feature data, and collecting the parameter values of the change feature data within a preset production cycle; analyzing the chain accuracy of the parameter values of all the change feature data within the preset production cycle that are allowed to change; controlling the parameter values of the change feature data with the initial collection accuracy to be adjusted to the chain parameter values corresponding to the chain accuracy, and chaining the chain parameter values to the blockchain according to the preset production cycle to obtain the blockchain chain information;
[0006] Traceability processing: Collect the traceability parameter values of the product’s corresponding change characteristic data and the corresponding preset production cycle, and trace the corresponding product’s on-chain information from the blockchain on-chain information.
[0007] In one embodiment of the present invention, various characteristic data of the product in the whole production process are obtained, including: obtaining a data set S of the whole production process of the product all According to the data classification attributes, filter out the data in the data set that belongs to the product's own characteristics as feature data S t .
[0008] In one embodiment of the present invention, according to the parameter change of the characteristic data, the changed characteristic data in each type of characteristic data is obtained, including: searching for each type of characteristic data S t The corresponding parameter value A i , set the parameter value A of each type i Each precision digit x is compared one by one, and the characteristic data S composed of different precision digits x is obtained. t As the change characteristic data S g .
[0009] In one embodiment of the present invention, each parameter value A of each type i Each precision digit x is compared one by one, and the characteristic data S composed of different precision digits x is obtained. t As the change characteristic data S g , including: judging whether the initial acquisition accuracy J is achieved max The parameter values A i Does each precision digit x in the same item have exactly the same items? If so, change the parameter value A i The corresponding feature data S t As fixed feature data S r If it does not exist, then the parameter value A i The corresponding feature data S t As the change characteristic data S g , where x represents the parameter value A i The number of digits distributed according to natural numbers from left to right, and x∈[1,2,…,J max ].
[0010] In one embodiment of the present invention, the initial acquisition accuracy of the change characteristic data is configured, and the parameter values of the change characteristic data within a preset production cycle are acquired, including: max , set the preset production cycle t n The change characteristic data S g The parameter value A i The number of digits of precision x from left to right is adjusted to the initial acquisition precision J max , and according to the initial acquisition accuracy J max Acquisition parameter value A i .
[0011] In one embodiment of the present invention, the chain accuracy of the parameter values of all the changing characteristic data within the preset production cycle is analyzed, including: determining the chain accuracy of the parameter values of all the changing characteristic data within the preset production cycle t n The previous parameter value A is within the preset precision x. i-1 The value a of each precision digit x from left to right i-1 Is it consistent with the next parameter value A i The value a of each precision digit x from left to right i are the same, if there is a value a with at least one precision digit x (x,i-1) and the value a (x,i) If they are not the same, the control continues to obtain the preset production cycle t n The next parameter value A i+1 , if the value a of each precision digit x i-1 and the value a i are the same, the control resets the previous parameter value A i-1 and the next parameter value A i The comparison precision bits are compared and the chain precision is updated.
[0012] In one embodiment of the present invention, the control resets the last parameter value A i-1 and the next parameter value A i The comparison precision is compared and the chain precision is updated, including: controlling the current precision digit to increase by 1, obtaining the precision digit x+1, and updating the previous parameter value A i-1 The value a of the x+1th precision digit (x+1,i-1) With the next parameter value A i The value a of the x+1th precision digit (x+1,i) Compare until the number of self-increment is y i When the previous parameter value A i-1 The x+y i The precision value a (x+y,i-1) With the next parameter value A i The x+y i The precision value a (x+y,i) If they are not the same, update the output increment times y i The corresponding single chain accuracy is x+y i , where (x+y i )≤J max , J max is the initial acquisition accuracy; according to the preset production cycle t n The single chain accuracy x+y obtained by each update i , get the preset production cycle t n Winding accuracy within x all =x+∑y i, where i is the preset production cycle t n Parameter value A collected within i The number of times.
[0013] In one embodiment of the present invention, the parameter value of the change characteristic data of the initial acquisition accuracy is controlled to be adjusted to the on-chain parameter value corresponding to the on-chain accuracy, and the on-chain parameter value is on-chained according to the preset production cycle to obtain the blockchain on-chain information, including: all =x+∑y i , for the preset production cycle t n The parameter values in A i From left to right, the precision is the preset production cycle t n Winding accuracy within x all =x+∑y i Update the data to get the uplink parameter value A Si , and the uplink parameter value A Si and preset production cycle t n Build A Si -t n The corresponding relationship is uploaded to the blockchain, and the preset production cycle t n The whole process data of product production in A Si -t n Establish association and obtain information on the blockchain.
[0014] In one embodiment of the present invention, the traceability parameter values of the change characteristic data corresponding to the product and the corresponding preset production cycle are collected, and the corresponding product information is obtained from the blockchain information, including: according to the preset production cycle t n , find the corresponding uplink parameter value A Si In the preset production cycle t n Winding accuracy within x all =x+∑y i , determine the traceability parameter value A SY The number of digits of precision x from left to right SY Is it less than the preset production cycle t? n Winding accuracy within x all =x+∑y i , if x SY <x all , then the number of digits of output precision x is controlled SY Substandard alarm signal, if x SY ≥x all , then the traceability parameter value A SY The number of digits of precision x from left to right SY Adjust to the preset production cycle t n Winding accuracy within x all .
[0015] The present invention also provides a traceability system based on blockchain, including: a feature selection unit, the feature selection unit obtains various feature data of a product in the entire production process of the product, and obtains the change feature data in various feature data according to the parameter change of the feature data; a data collection unit, the data collection unit configures the initial collection accuracy of the change feature data, and collects the parameter values of the change feature data within a preset production cycle; an on-chain analysis unit, the on-chain analysis unit analyzes the on-chain accuracy of the parameter values of all change feature data within the preset production cycle that are allowed to change; an on-chain control unit, the on-chain control unit controls the parameter values of the change feature data of the initial collection accuracy to be adjusted to the on-chain parameter values corresponding to the on-chain accuracy, and performs blockchain on-chain on-chain on-chain on-chain on-chain on-chain according to the preset production cycle to obtain blockchain on-chain information; and a traceability query unit, the traceability query unit collects the traceability parameter values of the change feature data corresponding to the product and the corresponding preset production cycle, and traces the on-chain information of the corresponding product from the blockchain on-chain information.
[0016] As mentioned above, a traceability method and system based on blockchain of the present invention has the following beneficial effects: by obtaining the change characteristic data based on the product itself in the whole process of product production data, the parameter value of the change characteristic data can be used as the basis for the traceability of the product chain information. Moreover, after collecting the parameter values of the change characteristic data that meet the maximum acquisition accuracy, the chain accuracy that can meet the parameter values is different when the parameter values are different is determined by analysis, that is, the minimum chain accuracy when the parameter values are different. And according to the chain accuracy control, the parameter value of the change characteristic data corresponding to the chain accuracy is controlled to be chained, which can reduce the data length of the product change characteristic data when it is chained and improve the purpose of chaining efficiency of the data under the premise of ensuring the traceability of the parameter value of the product change characteristic data. Moreover, after the parameter value of the product change characteristic data and the corresponding preset production cycle are chained, it is convenient for the user to obtain the unique chain data corresponding to it safely and accurately according to the preset production cycle obtained by the product label and the parameter value of the change characteristic data of the product itself, so as to ensure the correspondence between the product's own parameters and the chain data information in the product information traceability process. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 The figure is a flow chart of the traceability method of the present invention.
[0018] Figure 2 This is an architecture diagram of the traceability system of the present invention. DETAILED DESCRIPTION
[0019] See also Figure 1 The present invention provides a blockchain-based traceability method, comprising the following steps:
[0020] On-chain processing: obtain various characteristic data of the product in the whole process of product production, and obtain the change characteristic data in various characteristic data according to the parameter changes of the characteristic data; configure the initial collection accuracy of the change characteristic data, and collect the parameter values of the change characteristic data within the preset production cycle; analyze the on-chain accuracy allowed for the parameter values of all the change characteristic data within the preset production cycle; control the parameter values of the change characteristic data with the initial collection accuracy to be adjusted to the on-chain parameter values corresponding to the on-chain accuracy, and on-chain the on-chain parameter values according to the preset production cycle to obtain the on-chain information;
[0021] Traceability processing: Collect the traceability parameter values of the product’s corresponding change characteristic data and the corresponding preset production cycle, and trace the corresponding product’s on-chain information from the blockchain on-chain information.
[0022] It is not difficult to find from the above content that in the process of blockchain chaining and tracing the information of the entire process of product production, there are two parts: chain processing process and traceability processing process. Specifically, in the chain processing process, the various characteristic data of the product in the entire process of product production obtained are historical characteristic data in the past, and each characteristic data has parameter value information when it is obtained. Then, it can be realized that according to the parameter change of the characteristic data, the type of characteristic data with constantly changing parameter values of the characteristic data can be determined, and this type of characteristic data can be used as changing characteristic data. Because there may be more than one type of characteristic data in which the parameter values are all different, it is possible to obtain the characteristic data of all the different parameter values, and select one from them as the changing characteristic data, or it is also possible to use the characteristic data of all the different parameter values as the changing characteristic data. For example, in the packaging production process of agricultural products, after the weight and shape of the product itself are measured according to a certain initial collection accuracy, the weight parameter value and the shape parameter value are different, so they can both be used as changing characteristic data. After determining the change characteristic data, the initial acquisition accuracy when the parameter values are different is met by configuring the change characteristic data, and all parameter values are controlled to be acquired according to the initial acquisition accuracy within the preset production cycle. Under normal circumstances, the initial parameter accuracy can be the maximum parameter accuracy that can be measured by the corresponding measuring equipment in the entire process of product production. After obtaining the parameter values of all the change characteristic data within the preset production cycle, the chain accuracy when all the parameter values within the preset production cycle are different is met. And according to the chain accuracy, after the parameter values of each change characteristic data are collected, the parameter values are processed with the unified accuracy according to the chain accuracy, so that each parameter value remains different and is calibrated and chained together with the corresponding preset production cycle, and the product production process information is stored together with the parameter values of the change characteristic data of the preset production cycle and the corresponding chain progress. In the traceability processing process, by inputting the traceability parameter value of the product and the corresponding preset production cycle into the system, the unique chain information corresponding to the traceability parameter value will be quickly retrieved according to the input preset production cycle. Through the above method, the uniqueness of the traceability parameter value of each product on the chain can be guaranteed during traceability, so that the authenticity of each product on the chain and the unique correspondence of the blockchain information can be ensured based on the unique traceability parameter value.
[0023] Among them, obtaining various characteristic data of products in the whole process of product production includes: obtaining the data set S of the whole process of product production all According to the data classification attributes, filter out the data in the data set that belongs to the product's own characteristics as feature data S t .
[0024] In one embodiment of the present invention, when obtaining various types of feature data S tThe characteristic data of the product is the data of the product's own attributes. This data can be obtained from the data set S of the entire production process of the product. all , according to the data set S all The different classification attributes in the query are selected. For example, in the packaging production process of agricultural products such as apples, the shape of the packaging box, the packaging method, etc. can be used as the production process data of the product. The parameters such as the size of the packaging box, the shape of the apple, and the weight of the apple are selected as data obtained based on the characteristics of the product itself, so they can be used as the data set S all The characteristic data S in t .
[0025] Specifically, according to the parameter change of the characteristic data, the changed characteristic data in each type of characteristic data is obtained, including: searching for each type of characteristic data S t The corresponding parameter value A i , set the parameter value A of each type i Each precision digit x is compared one by one, and the characteristic data S composed of different precision digits x is obtained. t As the change characteristic data S g .
[0026] In one embodiment of the present invention, when determining the change characteristic data in the characteristic data, by t Parameter value A i And all parameter values under each type A i Compare and determine the value of each parameter A i Are they all different? If so, the control sets each parameter value A i The corresponding feature data S is different t As the change characteristic data S g .
[0027] Preferably, each parameter value A of each type i Each precision digit x is compared one by one, and the characteristic data S composed of different precision digits x is obtained. t As the change characteristic data S g , including: judging whether the initial acquisition accuracy J is achieved max The parameter values A i Does each precision digit x in the same item have exactly the same items? If so, change the parameter value A i The corresponding feature data S t As fixed feature data S r If it does not exist, then the parameter value A i The corresponding feature data S t As the change characteristic data S g, where x represents the parameter value A i The number of digits distributed according to natural numbers from left to right, and x∈[1,2,...,J max ].
[0028] In one embodiment of the present invention, when each parameter value A is i When comparing each precision digit x, it is determined that the initial acquisition accuracy J is reached. max The parameter values A i Does the precision value under each precision digit x have the same situation? If there is a completely identical situation, it means that the parameter value A i The corresponding feature data S t It cannot be used as a basis for achieving unique traceability after blockchain is uploaded. If at least one of the x-th precision digits has different precision values, the parameter value A can be i The corresponding feature data S t As the change characteristic data S g When making a judgment, the number of digits of precision x needs to satisfy x∈[1,2,...,J max ], thereby ensuring that the number of digits of precision x does not exceed the initial acquisition precision J max . And the initial acquisition accuracy J max It can also be understood as the maximum acquisition accuracy.
[0029] Further, configuring the initial acquisition accuracy of the change characteristic data, and acquiring the parameter values of the change characteristic data within the preset production cycle, includes: according to the initial acquisition accuracy J max , set the preset production cycle t n The change characteristic data S g The parameter value A i The number of digits of precision x from left to right is adjusted to the initial acquisition precision J max , and according to the initial acquisition accuracy J max Acquisition parameter value A i .
[0030] In one embodiment of the present invention, in the process of obtaining the change characteristic data and collecting the parameter values of the change characteristic data, by using the initial collection accuracy J max As the preset production cycle t n The change characteristic data S g The parameter value A i The number of digits of precision x from left to right can guarantee the maximum accuracy of each change feature data S g The parameter value A i The uniqueness of . Then further determine the data S that can just meet the requirements of each change feature data g The parameter value A iThe unique chain accuracy corresponds to the data S that can just meet the requirements of each change feature data. g The parameter value A i Minimum value for uniqueness.
[0031] Further, the chain accuracy of the parameter values of all the changing characteristic data within the preset production cycle is analyzed, including: determining the chain accuracy within the preset production cycle t n The previous parameter value A is within the preset precision x. i-1 The value a of each precision digit x from left to right i-1 Is it consistent with the next parameter value A i The value a of each precision digit x from left to right i are the same, if there is a value a with at least one precision digit x (x,i-1) and the value a (x,i) If they are not the same, the control continues to obtain the preset production cycle t n The next parameter value A i+1 , if the value a of each precision digit x i-1 and the value a i are the same, the control resets the previous parameter value A i-1 and the next parameter value A i The comparison precision bits are compared and the chain precision is updated.
[0032] In one embodiment of the present invention, it is determined that each change characteristic data S g The parameter value A i The minimum value of uniqueness, that is, when determining the winding accuracy, is determined by the preset production cycle t n In the preset precision x, determine the previous parameter value A i-1 The value a of each precision digit x from left to right i-1 Is it consistent with the next parameter value A i The value a of each precision digit x from left to right i That is to say, when changing the characteristic data S g The parameter value A i When collecting, at the preset precision x, the previous parameter value A i-1 The value a of each precision digit x from left to right i-1 With the next parameter value A i The value a of each precision digit x from left to right i If at least one of the two values is different, it means that the parameter value A can be achieved through the current precision x. i-1 and parameter value A iOtherwise, the two cannot be distinguished, and a new comparison precision bit needs to be set for comparison. Only when at least one value of the two is different can the current precision bit x realize the parameter value A. i-1 and parameter value A i , and then update the corresponding uplink accuracy of the output.
[0033] Specifically, the control resets the previous parameter value A i-1 and the next parameter value A i The comparison precision is compared and the chain precision is updated, including: controlling the current precision digit to increase by 1, obtaining the precision digit x+1, and updating the previous parameter value A i-1 The value a of the x+1th precision digit (x+1,i-1) With the next parameter value A i The value a of the x+1th precision digit (x+1,i) Compare until the number of self-increment is y i When the previous parameter value A i-1 The x+y i The precision value a (x+y,i-1) With the next parameter value A i The x+y i The precision value a (x+y,i) If they are not the same, update the output increment times y i The corresponding single chain accuracy is x+y i , where (x+y i )≤J max , J max is the initial acquisition accuracy; according to the preset production cycle t n The single chain accuracy x+y obtained by each update i , get the preset production cycle t n Winding accuracy within x all =x+Σy i , where i is the preset production cycle t n Parameter value A collected within i The number of times.
[0034] In one embodiment of the present invention, when the previous parameter value A i-1 and the next parameter value A i In the process of resetting the comparison precision, the number of precision bits is incremented. Specifically, the original number of precision bits x is incremented by 1, that is, x+1. Then, at the precision bit x+1, the parameter value A is i-1 The value a of the x+1th precision digit (x+1,i-1) With parameter value A i The value a of the x+1th precision digit (x+1,i)Compare and determine whether the two are the same. If they are not the same, directly output x+1 as the single chain precision corresponding to the self-increment of 1. If the number of self-increments required is y i , in order to satisfy the previous parameter value A i-1 The x+y i The precision value a (x+y,i-1) With the next parameter value A i The x+y i The precision value a (x+y,i) If they are not the same, then add x+y i As a self-increasing i times the corresponding single winding accuracy. And according to the entire preset production cycle t n The chain accuracy increase value y for each update i , and then get the preset production cycle t n Winding accuracy within x all =x+∑y i . Through this winding accuracy x all =x+∑y i , the number of bits of precision of all parameter values can be further adjusted, thereby ensuring that each parameter value is different, while also reducing the data length when the parameter value is uploaded to the chain.
[0035] The present invention also provides a preferred embodiment. When collecting the weight information of apples as the variable characteristic data in the production process of agricultural product packaging, the weight of the previous apple A is 195.022g, and the weight of the next apple B is also 195.022g. At this time, one more precision bit can be added to the right, that is, if the value corresponding to the next precision bit of apple A is 2, and the value corresponding to the next precision bit of apple B is 3, it indicates that the two are different, and the original 6-bit precision bit can be directly increased by 1. If one bit is increased, the value corresponding to the next precision bit of apple A is 2, and the value corresponding to the next precision bit of apple B is also 2, then one bit is increased again until the value corresponding to the next precision bit of apple A is different from the value corresponding to the next precision bit of apple B. Finally, the final precision bit when they are different is output as the single chain accuracy when comparing apple A and apple B. If the chain accuracy within the preset period of the entire chain is obtained, it is also necessary to compare the weight information of all apples collected within the preset period to obtain the final total chain accuracy.
[0036] Further, the parameter value of the characteristic data of the change of the initial acquisition accuracy is controlled to be adjusted to the parameter value of the chain corresponding to the chain accuracy, and the chain parameter value is chained to the blockchain according to the preset production cycle to obtain the blockchain chain information, including: according to the obtained chain accuracy x all =x+∑y i , for the preset production cycle t nThe parameter values in A i From left to right, the precision is the preset production cycle t n Winding accuracy within x all =x+Σy i Update the data to get the uplink parameter value A Si , and the uplink parameter value A Si and preset production cycle t n Build A Si -t n The corresponding relationship is uploaded to the blockchain, and the preset production cycle t n The whole process data of product production in A Si -t n Establish association and obtain information on the blockchain.
[0037] In one embodiment of the present invention, when determining the preset production cycle t n Winding accuracy within x all =x+Σy i Finally, in order to ensure the preset production cycle t n The parameter values in A i The difference in the preset production cycle t n The parameter values in A i From left to right, the precision is the preset production cycle t n Winding accuracy within x all =x+Σy i And after the update, the uplink parameter value A can be obtained Si , using the uplink parameter value A Si Combined with the preset production cycle t n Build A Si -t n The corresponding relationship can be established by establishing A Si -t n The corresponding relationship is used as the unique reference for the corresponding product self-test. It ensures that the actual parameter value based on the user's product change characteristic data is further determined in the corresponding preset production cycle t n Whether there is corresponding blockchain information in the system ensures the unique traceability of product data based on the parameter values of the changing characteristic data.
[0038] Furthermore, the traceability parameter values of the change characteristic data corresponding to the product and the corresponding preset production cycle are collected, and the corresponding product information is obtained from the blockchain information, including: according to the preset production cycle t n , find the corresponding uplink parameter value A Si In the preset production cycle t n Winding accuracy within x all=x+Σy i , determine the traceability parameter value A SY The number of digits of precision x from left to right SY Is it less than the preset production cycle t? n Winding accuracy within x all =x+Σy i , if x SY <x lla , then the number of digits of output precision x is controlled SY Substandard alarm signal, if x SY ≥x all , then the traceability parameter value A SY The number of digits of precision x from left to right SY Adjust to the preset production cycle t n Winding accuracy within x all .
[0039] In one embodiment of the present invention, in the process of tracing the source of the product according to the traceability parameter value of the product change characteristic data, the preset production cycle t indicated on the product label is used. n And the traceability parameter value A of the product’s own change characteristic data SY , further determine the traceability parameter value A SY The number of digits of precision x from left to right SY Is it less than the preset production cycle t? n Winding accuracy within x all =x+Σy i When x SY <x all When , it indicates that the current traceability parameter value A SY The number of digits of precision x SY It is not enough to confirm the product's chain information. SY ≥x all , it means that the current traceability parameter value A can be used SY The number of digits of precision x SY Determine the information on the chain. Before tracing the source, the traceability parameter value A SY The corresponding number of digits of precision x SY Adjusted to winding accuracy x all , so as to directly calculate the winding accuracy x all Trace back the corresponding on-chain information.
[0040] like Figure 2As shown, the present invention also provides a traceability system based on blockchain, including: a feature selection unit, the feature selection unit obtains various feature data of a product in the entire production process of the product, and obtains the change feature data in various feature data according to the parameter change of the feature data; a data collection unit, the data collection unit configures the initial collection accuracy of the change feature data, and collects the parameter value of the change feature data within a preset production cycle; an on-chain analysis unit, the on-chain analysis unit analyzes the on-chain accuracy of the parameter value of all change feature data within the preset production cycle that is allowed to change; an on-chain control unit, the on-chain control unit controls the parameter value of the change feature data of the initial collection accuracy to be adjusted to the on-chain parameter value corresponding to the on-chain accuracy, and performs blockchain on-chain on-chain on-chain on-chain on-chain on-chain on-chain on-chain according to the preset production cycle to obtain blockchain on-chain information; and a traceability query unit, the traceability query unit collects the traceability parameter value of the change feature data corresponding to the product and the corresponding preset production cycle, and traces the source from the blockchain on-chain information to obtain each on-chain information of the corresponding product.
[0041] In summary, the present invention can realize the parameter value of the change characteristic data as the basis for product chain information traceability by acquiring the change characteristic data based on the product itself in the whole process of product production data. Moreover, after collecting the parameter values of the change characteristic data that meet the maximum acquisition accuracy, the chain accuracy that can meet the parameter values is different when the parameter values are not the same is determined by analysis, that is, the minimum chain accuracy when the parameter values are not the same. And according to the chain accuracy control, the parameter value of the change characteristic data corresponding to the chain accuracy is controlled to be chained, which can reduce the data length of the product change characteristic data when it is chained and improve the purpose of data chaining efficiency under the premise of ensuring the traceability of the parameter value of the product change characteristic data. Moreover, after the parameter value of the product change characteristic data and the corresponding preset production cycle are chained, it is convenient for the user to obtain the unique chain data corresponding to it safely and accurately according to the preset production cycle obtained by the product label and the parameter value of the change characteristic data of the product itself, and ensure the correspondence between the product's own parameters and the chain data information in the product information traceability process. Therefore, the present invention effectively overcomes the various shortcomings in the prior art and has a high industrial utilization value.
[0042] The above embodiments are merely illustrative of the principles and effects of the present invention, and are not intended to limit the present invention. Anyone familiar with the art may modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by a person of ordinary skill in the art without departing from the spirit and technical concept disclosed by the present invention shall still be covered by the claims of the present invention.
Claims
1. A blockchain-based traceability method, It is characterized in that The steps include: On-chain processing: Acquire various characteristic data of the product in the whole production process, and obtain the change characteristic data in various characteristic data according to the parameter change of the characteristic data; Configuring the initial acquisition accuracy of the change characteristic data, and acquiring parameter values of the change characteristic data within a preset production cycle; Analyze the chain accuracy of the parameter values of all the changing characteristic data within the preset production cycle; Controlling to adjust the parameter value of the change characteristic data of the initial acquisition accuracy to the on-chain parameter value corresponding to the on-chain accuracy, and performing the on-chain parameter value on the blockchain according to the preset production cycle to obtain the blockchain on-chain information; Traceability process: Collect the traceability parameter values of the change characteristic data corresponding to the product and the corresponding preset production cycle, and trace the on-chain information of the corresponding product from the on-chain information on the blockchain.
2. According to the blockchain-based traceability method of claim 1, Features: Obtain various characteristic data of products throughout the entire production process, including: Get the dataset S of the entire production process all According to the data classification attributes, the filtered data belonging to the product characteristics in the data set are filtered out as the feature data S t .
3. According to the blockchain-based traceability method of claim 1, Features: According to the parameter changes of the characteristic data, the change characteristic data in various characteristic data are obtained, including: Find all types of characteristic data S t The corresponding parameter value A i , each type of parameter value A i Each precision digit x is compared one by one, and the characteristic data S composed of different precision digits x is obtained. t As the change characteristic data S g .
4. According to the blockchain-based traceability method of claim 3, Features: Set each parameter value of each type A i Each precision digit x is compared one by one, and the characteristic data S composed of different precision digits x is obtained. t As the change characteristic data S g ,include: Determine whether the initial acquisition accuracy has been reached max The parameter values A i Whether there are exactly the same items in the precision digits x in the , if so, then the parameter value A i The corresponding characteristic data S t As fixed feature data S r , if it does not exist, then the parameter value A i The corresponding characteristic data S t As the change characteristic data S g , where x represents the parameter value A i The number of digits distributed according to natural numbers from left to right, and x∈[1,2,...,J max ].
5. According to the blockchain-based traceability method of claim 1, Features: Configuring the initial acquisition accuracy of the change characteristic data and acquiring parameter values of the change characteristic data within a preset production cycle includes: According to the initial acquisition accuracy J max , set the preset production cycle t n The change characteristic data S g The parameter value A i The number of digits of precision x from left to right is adjusted to the initial acquisition precision J max , and according to the initial acquisition accuracy J max Collect the parameter value A i .
6. According to the blockchain-based traceability method of claim 1, Features: Analyzing the chain accuracy of the parameter values of all the changing characteristic data within the preset production cycle to allow the changes, including: Determine the preset production cycle t n The previous parameter value A is within the preset precision x. i-1 The value a of each precision digit x from left to right i-1 Is it consistent with the next parameter value A i The value a of each precision digit x from left to right i are the same, if there is a value a with at least one precision digit x (x,i-1) and the value a (x,i) If they are not the same, the control continues to obtain the preset production cycle t n The next parameter value A i+1 , if the value a of each precision digit x i-1 and the value a i are the same, the control resets the previous parameter value A i-1 and the next parameter value A i The comparison precision bits are compared and the upper chain precision is updated.
7. According to the blockchain-based traceability method of claim 6, Features: Control resets the last parameter value A i-1 and the next parameter value A i The comparison precision bits are compared and the upper chain precision is updated, including: The control increments the current precision by 1, and the precision is x+1, and the previous parameter value A is i-1 The value a of the x+1th precision digit (x+1,i-1) With the next parameter value A i The value a of the x+1th precision digit (x+1,i) Compare until the number of self-increment is y i When the previous parameter value A i-1 The x+y i The precision value a (x+y,i-1) With the next parameter value A i The x+y i The value of the precision digit a (x+y,i) If they are not the same, update the output increment times y i The corresponding single chain accuracy is x+y i , where (x+y i )≤J max , J max is the initial acquisition accuracy; According to the preset production cycle t n The single chain accuracy x+y obtained by each update i , get the preset production cycle t n Winding accuracy within x all =x+∑y i , where i is the preset production cycle t n Parameter value A collected within i The number of times.
8. According to the blockchain-based traceability method of claim 7, Features: Controlling to adjust the parameter value of the change characteristic data of the initial acquisition accuracy to the on-chain parameter value corresponding to the on-chain accuracy, and performing the on-chain parameter value on the blockchain according to the preset production cycle to obtain the blockchain on-chain information, including: According to the obtained winding accuracy x all =x+∑y i , for the preset production cycle t n The parameter values in A i From left to right, the precision is the preset production cycle t n Winding accuracy within x all =x+∑y i The data is updated to obtain the uplink parameter value A Si , and the uplink parameter value A Si and the preset production cycle t n Build A Si -t n The corresponding relationship is put on the blockchain, and the preset production cycle t n The whole process data of product production in A Si -t n Establish an association and obtain the blockchain information.
9. According to the blockchain-based traceability method of claim 8, Features: Collect the traceability parameter values of the change characteristic data corresponding to the product and the corresponding preset production cycle, and trace the blockchain information of the corresponding product from the blockchain information, including: According to the preset production cycle t n , find the corresponding uplink parameter value A Si In the preset production cycle t n Winding accuracy within x all =x+∑y i , determine the traceability parameter value A SY The number of digits of precision x from left to right SY Is it less than the preset production cycle t? n Winding accuracy within x all =x+∑y i , if x SY <x lla , then the number of digits of output precision x is controlled SY Substandard alarm signal, if x SY ≥x all , then the traceability parameter value A SY The number of digits of precision x from left to right SY Adjust to the preset production cycle t n Winding accuracy within x all .
10. A traceability system based on blockchain, It is characterized in that include: A feature selection unit, wherein the feature selection unit obtains various feature data of the product in the entire production process of the product, and obtains change feature data in various feature data according to parameter changes of the feature data; A data collection unit, wherein the data collection unit configures an initial collection accuracy of the change characteristic data and collects parameter values of the change characteristic data within a preset production cycle; An uplink analysis unit, the uplink analysis unit analyzing the uplink accuracy of the parameter values of all the changed characteristic data allowed to change within the preset production cycle; An on-chain control unit, wherein the on-chain control unit controls the parameter value of the change characteristic data of the initial acquisition accuracy to be adjusted to an on-chain parameter value corresponding to the on-chain accuracy, and performs blockchain on-chain on the blockchain of the on-chain parameter value according to the preset production cycle to obtain blockchain on-chain information; as well as The traceability query unit collects the traceability parameter values of the change characteristic data corresponding to the product and the corresponding preset production cycle, and traces the on-chain information of the corresponding product from the on-chain information of the blockchain.
Citation Information
Patent Citations
Fruit and vegetable agricultural product tracing method, device and system based on block chain and storage medium
CN111369267A
Annuity data tail difference processing method and device and electronic equipment
CN114066644A
Product full life cycle data tracing platform
CN114386986A
Agricultural product producing area tracing method and system based on big data
CN116883026A
Method and apparatus for managing information about measurement device
US20210216651A1
Cited By
Production process traceability method of hub type transmission device
CN120013702A
Cable material full life cycle traceability management method and system based on block chain
CN121258548A
Blockchain-based cable material full-life-cycle traceability management method and system
CN121258548B
Method for friction plate online quality inspection and continuous production linkage
CN122924033A
