Search

CN-121998670-A - Portable agricultural product quality tracing method and system based on block chain

CN121998670ACN 121998670 ACN121998670 ACN 121998670ACN-121998670-A

Abstract

The invention relates to the technical field of blockchain application and discloses a portable agricultural product quality tracing method and system based on a blockchain, wherein the method comprises the steps of collecting and storing multi-source heterogeneous original data streams of all links of a supply chain to obtain an initial information set; analyzing source identification and time stamp of each data item in the initial information set, classifying the data items into primary credible items and potential conflict items according to preset multiparty participation standards, acquiring associated logistics and processing records aiming at the potential conflict items, outputting conflict rating indexes, calculating trust scores of each data item according to the conflict rating indexes and the primary credible items to obtain comprehensive trust values, extracting items higher than a preset trust threshold value to generate a unified quality tracing abstract, inputting matching abstract content according to consumer query, outputting related tracing reports, dynamically updating the trust scores through backtracking verification and difference analysis, and outputting continuously optimized tracing results. The method can realize the accurate integration of the multi-source heterogeneous data.

Inventors

  • SU LI
  • BAO ZIWEI
  • BI XIAOLEI

Assignees

  • 苏州诚检生物科技有限公司

Dates

Publication Date
20260508
Application Date
20260410

Claims (9)

  1. 1. The portable agricultural product quality tracing method based on the blockchain is characterized by comprising the following steps of: collecting multi-source heterogeneous original data streams of all links of a supply chain, and storing the multi-source heterogeneous original data streams to obtain an initial information set; Analyzing source identifiers and time stamps of all data items in the initial information set, determining the data items as primary trusted items if the source identifiers are matched with preset multiparty participation standards, and marking the data items as potential conflict items if the source identifiers are not matched with the preset multiparty participation standards to obtain classified data sets; aiming at the potential conflict items in the classified data sets, acquiring associated logistics and processing records, and outputting a conflict rating index if the time stamp sequence is continuous and the batch codes are not repeated by comparing the time stamp sequence with the batch codes; Classifying and processing the conflict rating index and the preliminary trusted item, calculating the trust score of each data item according to the conflict rating index and the preliminary trusted item, and fusing the trust scores to obtain a comprehensive trust value; extracting an item higher than a preset trust threshold from the comprehensive trust value, and integrating key fields in the item to obtain a unified quality traceability abstract; Aiming at the unified quality traceability abstract, acquiring consumer query input, matching query keywords with abstract fields, judging relevant traceability information if the matching degree exceeds a preset matching degree threshold value, and acquiring a final output report; and backtracking to the initial information set according to the related traceability information in the final output report, calculating attribute value difference characteristics of the related traceability information and the initial information set, and updating the trust score if the difference characteristics exceed a preset tolerance range to obtain an optimized traceability result.
  2. 2. The portable agricultural product quality tracing method based on blockchain of claim 1, wherein said collecting the multi-source heterogeneous raw data stream of each link of the supply chain, storing the multi-source heterogeneous raw data stream, obtaining an initial information set, comprises: Acquiring a multi-source heterogeneous original data stream collected by each node of a portable agricultural product supply chain, wherein the multi-source heterogeneous original data stream comprises production batches and logistics track records; analyzing the multi-source heterogeneous original data stream, extracting service characteristics and assembling the service characteristics into a data entity to be uplinked, wherein the data entity to be uplinked is in a standardized format, and calculating the data entity to be uplinked to generate an encryption abstract value, wherein the encryption abstract value carries a generation timestamp; And storing the encrypted digest value into a blockchain network and linking the encrypted digest value to a main chain to obtain an initial information set with non-tamper property.
  3. 3. The portable agricultural product quality tracing method based on blockchain of claim 1, wherein said parsing the source identifier and the timestamp of each data item in the initial information set, if the source identifier matches a preset multiparty participation criterion, determining to be a preliminary trusted item, if not, marking to be a potential conflict item, and obtaining the classified data set includes: analyzing a source identifier and a time stamp in the initial information set, verifying the node identity corresponding to the source identifier by using a digital signature, and constructing a time sequence data stream to be verified; carrying out full network verification on the time sequence data stream to be verified by adopting a practical Bayesian fault-tolerant consensus algorithm to obtain candidate data items; and if the source identification of the candidate data item is matched with a preset multiparty participation standard, establishing the candidate data item as a preliminary trusted item, otherwise, marking the candidate data item as a potential conflict item, and obtaining the classified data set.
  4. 4. The blockchain-based portable agricultural product quality traceability method of claim 1, wherein the obtaining the associated logistics and tooling records for the potentially conflicting items in the categorized dataset, by comparing time stamps and lot codes, outputting a conflict rating index if the time stamp sequence is continuous and the lot codes are not repeated, comprises: analyzing the traceability index key of the potential conflict item, retrieving the logistics and processing records mapped by the traceability index key, and generating a traceability associated data set; extracting time stamp metadata and batch code fields of the tracing association data set, and constructing a time stamp sequence according to the time stamp metadata; Measuring and calculating the time difference value of adjacent nodes of the time stamp sequence, and judging that the time stamp sequence has time sequence continuity if the time difference value is smaller than a preset interval difference value; Comparing the batch code fields aiming at the tracing associated data set with time sequence continuity, outputting a conflict rating index with low conflict level if the batch code fields have no repetition, and outputting a conflict rating index with high conflict level if the batch code fields have repetition.
  5. 5. The blockchain-based portable agricultural product quality traceability method according to claim 1, wherein the classifying processes the conflict rating index and the preliminary trusted entry, calculates a trust score of each data entry according to the conflict rating index and the preliminary trusted entry, fuses the trust scores, and obtains a comprehensive trust value, and comprises: acquiring the conflict rating index and the preliminary trusted item, and splicing the conflict rating index and the associated historical credit data into a joint feature vector; Inputting the joint feature vector into a random forest classifier, analyzing and classifying output to generate a trust probability distribution, and converting the trust probability distribution into trust scores; calculating a dynamic weight coefficient according to the degree of dispersion of the trust score and the conflict rating index; and carrying out weighted average fusion on the trust scores by using the dynamic weight coefficients, and outputting a comprehensive trust degree value obtained by fusion calculation.
  6. 6. The portable agricultural product quality tracing method based on blockchain according to claim 2, wherein said extracting an entry higher than a preset trust threshold from the integrated trust value, integrating key fields in the entry, and obtaining a unified quality tracing abstract, comprises: Acquiring a comprehensive trust value of a data item to be processed, comparing the comprehensive trust value with a preset trust threshold, and extracting a production batch record corresponding to the trust threshold; searching an unstructured detection report according to the production batch record, extracting an organic standard compliance description field, and converting the organic standard compliance description field into a compliance feature vector; Processing the compliance feature vector and pesticide residue detection data by adopting a multidimensional data aggregation algorithm to obtain a consensus compliance attribute set; splicing the consensus attribute set and logistics node information into a time sequence associated data chain; And inputting the time sequence associated data chain into a summary generation model for semantic aggregation, and outputting a unified quality traceability summary reflecting the safety state of the whole life cycle of the agricultural product.
  7. 7. The portable agricultural product quality tracing method based on blockchain according to claim 1, wherein the obtaining consumer query input for the unified quality tracing abstract, matching query keywords with abstract fields, if the matching degree exceeds a preset matching degree threshold, judging as related tracing information, and obtaining a final output report comprises: acquiring unified quality traceability abstracts, analyzing key safety indexes, and converting the unified quality traceability abstracts into a structured semantic index library; receiving a consumer query input, mapping the query input into a query intent vector; Calculating the weighted matching degree between the query intention vector and the abstract field characteristics obtained from the semantic index library; If the weighted matching degree is larger than a preset matching degree threshold, judging that the current item is related traceability information, and extracting a related traceability information set; And fusing the association traceability information set with the key safety indexes to obtain a final output report.
  8. 8. The portable agricultural product quality tracing method based on blockchain of claim 1, wherein said tracing back to said initial information set according to said related tracing back information in said final output report, calculating a difference characteristic of attribute values of said related tracing back information and said initial information set, and if said difference characteristic exceeds a preset tolerance range, updating said trust score to obtain an optimized tracing back result, comprising: acquiring traceability information in a final output report, analyzing a traceability node identifier, and reversely retrieving a corresponding initial information set according to the traceability node identifier; calculating attribute value difference characteristics between the traceability information and the initial information set, and locking a verification path generating new conflict if the difference characteristics exceed a preset tolerance range; Weighting and attenuating the current trust score bound with the verification path according to the difference characteristics to obtain updated trust score; and reconstructing a tracing chain based on the updated trust score, and outputting an optimized tracing result which is corrected and eliminates new conflicts.
  9. 9. Portable agricultural product quality traceability system based on blockchain, characterized by comprising: the data acquisition and storage module is used for acquiring multi-source heterogeneous original data streams of all links of a supply chain and storing the multi-source heterogeneous original data streams to obtain an initial information set; The data classification module is used for analyzing the source identification and the time stamp of each data item in the initial information set, determining the data item as a preliminary trusted item if the source identification is matched with a preset multiparty participation standard, and marking the data item as a potential conflict item if the source identification is not matched with the preset multiparty participation standard, so as to obtain a classified data set; The conflict rating module is used for acquiring associated logistics and processing records aiming at the potential conflict items in the classified data sets, comparing time stamps with batch codes, and outputting a conflict rating index if the time stamp sequences are continuous and the batch codes are not repeated; The trust degree calculation module is used for classifying and processing the conflict rating index and the preliminary trusted item, calculating the trust score of each data item according to the conflict rating index and the preliminary trusted item, and fusing the trust scores to obtain a comprehensive trust degree value; the traceability abstract generation module is used for extracting an item higher than a preset credibility threshold value from the comprehensive credibility value, integrating key fields in the item and obtaining a unified quality traceability abstract; The report generation module is used for acquiring consumer query input aiming at the unified quality traceability abstract, matching query keywords with abstract fields, judging relevant traceability information if the matching degree exceeds a preset matching degree threshold value, and acquiring a final output report; And the tracing result optimizing module is used for tracing back to the initial information set according to the related tracing information in the final output report, calculating attribute value difference characteristics of the related tracing information and the initial information set, and updating the trust score if the difference characteristics exceed a preset tolerance range to obtain an optimized tracing result.

Description

Portable agricultural product quality tracing method and system based on block chain Technical Field The invention relates to the technical field of blockchain application, in particular to a portable agricultural product quality tracing method and system based on blockchains. Background At present, an agricultural product supply chain relates to a plurality of links such as planting, processing, logistics, sales and the like, a plurality of parties participate in to cause data source dispersion and format isomerism, consumers and supervision parties are difficult to comprehensively master real information of products, and agricultural product quality tracing becomes a key requirement for guaranteeing food safety and industry trust. In the prior art, agricultural product tracing is performed by storing information in a centralized database, and acquiring production and logistics data through manual input or a single terminal, so as to form a tracing chain. The method is characterized in that a part of scheme is introduced into a simple data encryption means, but the core trust problem is not solved, the data still has risks of being tampered and deleted, the other technology relies on a blockchain to realize data storage, but lacks conflict resolution capability, when information provided by multiple parties in a supply chain is contradictory (such as planting records display organic plants and logistics records but prompt batch mixing), the credibility of the information cannot be judged through blockchain data, meanwhile, the existing blockchain-based tracing multi-stay on a data uplink layer, a trust quantization system of a data item level is not established, and a consumer and a supervision party can only check original data, are difficult to quickly identify high-credibility information and still cannot accurately evaluate the quality of agricultural products. The problem of low integration accuracy of multi-source heterogeneous data exists in the prior art. Disclosure of Invention The invention provides a portable agricultural product quality tracing method and system based on a blockchain, which are used for solving the problem of low accuracy of multi-source heterogeneous data integration. In order to solve the technical problems, the invention provides a portable agricultural product quality tracing method based on a blockchain, which comprises the following steps: collecting multi-source heterogeneous original data streams of all links of a supply chain, and storing the multi-source heterogeneous original data streams to obtain an initial information set; Analyzing source identifiers and time stamps of all data items in the initial information set, determining the data items as primary trusted items if the source identifiers are matched with preset multiparty participation standards, and marking the data items as potential conflict items if the source identifiers are not matched with the preset multiparty participation standards to obtain classified data sets; aiming at the potential conflict items in the classified data sets, acquiring associated logistics and processing records, and outputting a conflict rating index if the time stamp sequence is continuous and the batch codes are not repeated by comparing the time stamp sequence with the batch codes; Classifying and processing the conflict rating index and the preliminary trusted item, calculating the trust score of each data item according to the conflict rating index and the preliminary trusted item, and fusing the trust scores to obtain a comprehensive trust value; extracting an item higher than a preset trust threshold from the comprehensive trust value, and integrating key fields in the item to obtain a unified quality traceability abstract; Aiming at the unified quality traceability abstract, acquiring consumer query input, matching query keywords with abstract fields, judging relevant traceability information if the matching degree exceeds a preset matching degree threshold value, and acquiring a final output report; and backtracking to the initial information set according to the related traceability information in the final output report, calculating attribute value difference characteristics of the related traceability information and the initial information set, and updating the trust score if the difference characteristics exceed a preset tolerance range to obtain an optimized traceability result. In a second aspect, the present invention provides a blockchain-based portable agricultural product quality traceability system, comprising: the data acquisition and storage module is used for acquiring multi-source heterogeneous original data streams of all links of a supply chain and storing the multi-source heterogeneous original data streams to obtain an initial information set; The data classification module is used for analyzing the source identification and the time stamp of each data item in the initial information set, determinin