Method for preventing and tracing epimedium based on coupling of DNA fingerprint and block chain

By coupling DNA fingerprints with blockchain, a fingerprint file for Epimedium is generated and stored on the blockchain. Combined with an intelligent decision-making model, the problem of linking identity verification and transaction decision-making in the anti-counterfeiting and traceability of Epimedium is solved, realizing full-process anti-counterfeiting and traceability and intelligent price adjustment, thereby improving the credibility of traceability and market trust.

CN121032527BActive Publication Date: 2026-01-23SHAANXI SCI TECH UNIV +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511548757.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-28
Publication Date
2026-01-23
Estimated Expiration
2045-10-28

AI Technical Summary

Technical Problem

Existing methods for preventing counterfeiting and tracing epimedium lack deep integration of DNA fingerprinting and blockchain, making it impossible to establish a direct link between identity verification and transaction decisions. This makes it difficult to achieve closed-loop control of supply chain risks, especially in batch-level contract pricing and credit evaluation, where there is a lack of effective mechanisms.

Method used

By generating Epimedium DNA fingerprint codes and binding them with metadata to form fingerprint profiles, constructing Merkle trees and storing them on the blockchain, and combining contract version records and intelligent decision-making models, dynamic judgments on identity authenticity and price adjustments can be achieved.

Benefits of technology

It has achieved full-process anti-counterfeiting and reliable traceability of Epimedium medicinal materials from source to circulation, ensuring the biological uniqueness of the medicinal material and the intelligence of transaction decisions, improving the anti-counterfeiting effect and traceability credibility, and realizing dynamic adaptation of price adjustments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121032527B_ABST
    Figure CN121032527B_ABST
Patent Text Reader

Abstract

The application discloses a DNA fingerprint and blockchain coupling icariin anti-counterfeiting traceability method, and relates to the technical field of anti-counterfeiting traceability; the method comprises the following steps: treating icariin raw materials to generate a DNA fingerprint code, and binding the DNA fingerprint code with a metadata set to form a fingerprint file; constructing a Merkle tree based on the fingerprint file, generating a root hash, and storing the root hash in a chain to form a storage record; modeling and version management of preset contract control parameters, and storing the contract control parameters in a chain to form a contract version record; performing hash calculation on target batch icariin to generate a leaf hash, and comparing the leaf hash with the storage record to complete authenticity diagnosis; performing comprehensive diagnosis on the basis of quality and stability parameters to obtain a diagnosis result set; generating a decision conclusion based on the authenticity diagnosis, the contract version and the diagnosis result set; the application realizes icariin authenticity verification and quality diagnosis by combining DNA fingerprint traceability with blockchain storage and smart contract comparison, and improves traceability credibility and decision intelligence level.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of anti-counterfeiting traceability, more specifically, the present application relates to an anti-counterfeiting traceability method for epimedium based on DNA fingerprint and blockchain coupling. BACKGROUND

[0002] As a traditional Chinese medicinal material with important medicinal value, the demand for Epimedium is growing in clinical application and market circulation. In order to ensure the authenticity and reliability of Epimedium medicinal materials, modern detection and information technology means are gradually introduced into the industry. For example, DNA fingerprint technology in the field of molecular biology is used for the identification of the authenticity of medicinal materials, and its accuracy and stability can better distinguish medicinal materials of different sources. At the same time, the development of information technology promotes the transparent management of the supply chain, and the decentralized technology such as blockchain is applied to the traceability link of Chinese medicinal materials, thereby improving the anti-counterfeiting traceability ability of medicinal materials to a certain extent.

[0003] However, the existing technology still has limitations in the application process. Specifically, the traditional anti-counterfeiting method of Epimedium mostly stays in a single dimension, such as relying only on DNA detection or blockchain records, lacking deep coupling and collaborative application between the two, resulting in the inability to establish a direct link between Epimedium identity identification and transaction decision-making; in addition, the existing traceability system is mostly limited to information evidence, lacking dynamic decision-making ability combined with diagnostic results and contract mechanism, making it difficult to further implement specific decisions after confirming the authenticity of Chinese medicinal materials, and unable to close-loop control the risks in the supply chain. Especially when it comes to batch-level contract pricing, reputation evaluation and anti-counterfeiting result linkage, the existing technology often lacks effective mechanism support, resulting in a disconnect between medicinal material anti-counterfeiting and transaction decision-making, affecting the practicality and integrity of the Epimedium anti-counterfeiting traceability system.

[0004] In view of this, the present application proposes an anti-counterfeiting traceability method for Epimedium based on DNA fingerprint and blockchain coupling to solve the above problems. SUMMARY

[0005] In order to overcome the above-mentioned defects of the prior art and achieve the above-mentioned purposes, the present application provides the following technical scheme: an anti-counterfeiting traceability method for Epimedium based on DNA fingerprint and blockchain coupling, comprising:

[0006] The Epimedium raw materials are pre-sampled, nucleic acid is extracted, the barcode region is amplified and sequenced, sequence quality control and hash processing are performed, the Epimedium DNA fingerprint code is generated, and the Epimedium fingerprint file is formed by binding the Epimedium DNA fingerprint code with the collected Epimedium metadata set;

[0007] The Epimedium fingerprint file is subjected to block hash operation and a Merkle tree is constructed, and the corresponding Merkle tree root hash is generated; the Merkle tree root hash and the index information corresponding to the Epimedium fingerprint file are written into the blockchain distributed ledger to form the Epimedium evidence record;

[0008] modeling, versioning and on-chain publishing of a pre-set contract control parameter set, forming a contract version record set;

[0009] standardizing and hashing the target batch of Epimedium, obtaining a target leaf hash, and combining the Epimedium storage record to compare and diagnose the target batch of Epimedium, obtaining an identity authenticity diagnosis result;

[0010] Based on the active ingredient index, cold chain temperature control parameter and batch qualified rate of the target batch of Epimedium, combined with the contract version record set, comprehensive comparison and diagnosis are carried out to obtain a diagnosis result set;

[0011] The identity authenticity diagnosis result, the contract version record matched with the target batch of Epimedium and the diagnosis result set are input into an Epimedium intelligent decision model to generate a decision conclusion; The decision conclusion includes receiving, pricing or rejecting.

[0012] Further, when the decision conclusion is pricing, the reputation score corresponding to the supplier is obtained, and the reputation score is normalized to a reputation score weight coefficient;

[0013] The price fluctuation ratio in the contract version record matched with the target batch of Epimedium is obtained, and weighted operation is performed with the reputation score weight coefficient to obtain an Epimedium pricing coefficient;

[0014] Based on the Epimedium contract benchmark price and the Epimedium pricing coefficient, the final pricing result of the target batch of Epimedium is calculated.

[0015] Further, the method for obtaining the diagnosis result set comprises:

[0016] According to the target Epimedium batch number, the corresponding contract version record is retrieved from the contract version record set, and the Epimedium active ingredient interval, cold chain temperature control parameter and batch qualified rate threshold are extracted;

[0017] Interval determination is performed on the Epimedium active ingredient and the Epimedium active ingredient interval to obtain an Epimedium active ingredient diagnosis result, and the active ingredient out-of-limit direction and active ingredient deviation amplitude are recorded;

[0018] The real-time cold chain temperature control parameter is compared with the cold chain temperature control parameter in the contract version record, the cumulative out-of-limit time in unit time is counted and the out-of-limit time ratio is calculated, and the cold chain temperature control parameter diagnosis result is determined according to the out-of-limit time ratio and the pre-set out-of-limit time ratio threshold;

[0019] The batch qualified rate is compared with the batch qualified rate threshold to obtain a qualified rate diagnosis result;

[0020] The diagnosis result set is constructed from the diagnosis result of the active ingredient of Epimedium, the exceeding direction of the active ingredient, the deviation amplitude of the active ingredient, the diagnosis result of the cold chain temperature control parameter, and the diagnosis result of the qualified rate.

[0021] Further, the method for obtaining the identity authenticity diagnosis result comprises:

[0022] Obtaining a target Epimedium DNA fingerprint code of the target batch of Epimedium after treatment;

[0023] According to the leaf coding rule, the target Epimedium DNA fingerprint code is standardized, and a target leaf hash is obtained by executing a secure hash algorithm;

[0024] Reading a target Merkle tree root hash corresponding to the target batch of Epimedium from the Epimedium storage record, denoted as a target Merkle tree root hash, and obtaining verification path index information corresponding to the target Merkle tree root hash;

[0025] According to the verification path index information, a target minimum verification path corresponding to the target leaf hash is located and called from an off-chain archive storage;

[0026] A bottom-up layer-by-layer positioning and back calculation algorithm is used on the target minimum verification path, only the brother nodes and parent nodes related to the target leaf hash are accessed, and a back calculation root hash is obtained by executing a secure hash operation;

[0027] Judging whether the back calculation root hash is the same as the target Merkle tree root hash, if the result is the same, the identity authenticity diagnosis result of the target batch of Epimedium is that the anti-counterfeiting authentication is passed; if the result is not the same, the identity authenticity diagnosis result of the target batch of Epimedium is that the anti-counterfeiting authentication is not passed.

[0028] Further, the method for obtaining the contract version record set comprises:

[0029] A contract control parameter set is preset; the contract control parameter set comprises an Epimedium active ingredient interval, a cold chain temperature control parameter, an in-batch qualified rate threshold, a price floating ratio, a credit score rule, a parameter effective time, an applicable batch range, and a parameter priority;

[0030] According to the parameter legality verification rule, the contract control parameter set is verified;

[0031] After verification, according to the parameter coding rule, each parameter is standardized to obtain a standardized parameter; and a secure hash algorithm is executed on the standardized parameter to obtain a parameter hash value;

[0032] The parameter hash value is combined with the parameter effective time, the applicable batch range, and the parameter priority to generate a contract version number;

[0033] The parameter hash value, contract version number, parameter effective time and applicable batch range are written into the blockchain distributed ledger, published on the chain and audited, forming a set of contract version records.

[0034] Furthermore, the method for obtaining the Merkle root hash includes:

[0035] The epimedium fingerprint file is divided into R data blocks according to a preset block size; a secure hash algorithm is executed on each data block to obtain the corresponding file data hash value, and each file data hash value corresponds to a Merkle tree node, forming R Merkle tree nodes;

[0036] Calculate the number of Merkle tree levels T according to the hierarchical derivation rules;

[0037] Construct a Merkle tree based on R Merkle tree nodes and T Merkle tree levels;

[0038] The hash value of the parent node corresponding to the Tth level of the Merkle tree is determined as the Merkle tree root hash.

[0039] Furthermore, the method for calculating the number of levels in the Merkle tree includes:

[0040] S100: Number of Merkle tree levels The initial value is 1; the Merkle tree is set to the first... Number of Merkle tree nodes in a layer Initialize to R;

[0041] S101: Will Divide by 2 and round up to obtain the Merkle tree. Number of Merkle tree nodes in a layer ;

[0042] S102: If If it is 1, then Let T be the level number of the Merkle tree, and then end the current process; if If it is not 1, then let Return to S101 for execution.

[0043] Furthermore, methods for constructing a Merkle tree based on R Merkle tree nodes and the Merkle tree level T include:

[0044] S200: Let the initial value of t be 1, and the range of t is from 1 to T-1. t is the loop variable;

[0045] S201: Add the Merkle tree node at level t to the Merkle tree node sequence at level t; denoted as the number of Merkle tree nodes in the Merkle tree node sequence at level t. ;like It is an odd number and If t = 1, self-replicate the last node of the t-layer Merkle tree node sequence and append it to the t-layer Merkle tree node sequence; initialize the t+1-layer Merkle tree node sequence as empty;

[0046] S202: Take out two adjacent Merkle tree nodes in sequence from the t-layer Merkle tree node sequence as a Merkle tree node combination, execute a secure hash algorithm on the result of the connected archive data hash values of the Merkle tree node combination to obtain a parent node hash of the Merkle tree node combination, append the parent node hash to the t+1-layer Merkle tree node sequence, and remove the Merkle tree node combination from the t-layer Merkle tree node sequence;

[0047] If the t-layer Merkle tree node sequence is not empty, continue to execute S202; if the t-layer Merkle tree node sequence is empty, execute S203;

[0048] S203: Let t = t + 1; if t ≤ T-1, return to S201 for execution; if t > T-1, obtain the Merkle tree and end the process.

[0049] Further, the method for obtaining the Epimedium fingerprint file comprises:

[0050] For each batch of Epimedium raw materials, sample the Epimedium raw materials according to a preset sampling interval and a preset sampling quantity to obtain Epimedium raw material samples;

[0051] According to a preset sample integrity threshold and a water upper limit threshold, perform appearance and moisture pre-inspection on the Epimedium raw material samples, eliminate unqualified Epimedium raw material samples, and obtain a set of Epimedium raw material samples to be processed;

[0052] Perform nucleic acid extraction operation on the set of Epimedium raw material samples to be processed to obtain Epimedium nucleic acid solution;

[0053] Based on a polymerase chain reaction amplification scheme, perform barcode region sequence acquisition processing on the Epimedium nucleic acid solution to obtain Epimedium initial sequence data;

[0054] Perform quality control and standardization on the Epimedium initial sequence data to obtain Epimedium standardized sequence;

[0055] Convert the Epimedium standardized sequence into Epimedium sequence code; perform a secure hash algorithm on the Epimedium sequence code to obtain a corresponding Epimedium DNA fingerprint code;

[0056] Bind the collected Epimedium associated metadata set and the Epimedium DNA fingerprint code to obtain an Epimedium fingerprint file; the Epimedium associated metadata set comprises batch number, sampling number, plot number, geographic coordinates, sampling time, operator number, sequencing platform type, and sequence quality control parameters.

[0057] Further, the method for obtaining the initial sequence data of Epimedium includes:

[0058] The nucleic acid solution of Epimedium is mixed with preset amplification primers, reaction buffer, deoxyribonucleotide triphosphates and polymerase to form an amplification reaction system; a denaturation step, an annealing step and an extension step are sequentially and cyclically performed according to a preset amplification cycle number to obtain an amplification product containing a target barcode region fragment;

[0059] The qualified amplification product is subjected to linker connection, purification and quantitative treatment to construct a sequencing library;

[0060] According to preset sequencing length and sequencing depth target values, the sequencing library is sequenced by using a high-throughput sequencing platform to obtain the initial sequence data of Epimedium.

[0061] Compared with the prior art, the method for Epimedium anti-counterfeiting and traceability based on coupling of DNA fingerprint and block chain has the following technical effects and advantages:

[0062] The method realizes anti-counterfeiting and credible traceability of Epimedium from the source to the circulation link, ensures the biological uniqueness of the Epimedium variety through DNA fingerprint identification, realizes a multi-node tamper-proof traceability chain by combining the block chain technology, and effectively solves the problems of easy counterfeiting of traditional anti-counterfeiting labels and insufficient information storage credibility. Meanwhile, the application further introduces an identity authenticity diagnosis, a contract version record and a comprehensive processing mechanism of a diagnosis result set on the basis of traceability, and dynamically judges the reception, pricing or rejection of batches of medicinal materials by using an intelligent decision model, so as to realize the deep integration of anti-counterfeiting and traceability and commercial decision-making.

[0063] The method ensures high precision and high credibility of Epimedium identity authentication through the dual coupling of DNA fingerprint and block chain, and significantly improves the anti-counterfeiting effect. Secondly, by introducing the identity authenticity diagnosis result, the contract version record matched with the target batch of Epimedium and the diagnosis result set, and combining the Epimedium intelligent decision model, an intelligent price adjustment mechanism based on quality and reputation is realized, breaking through the limitations of traditional single detection result decision-making. Further, in the pricing scenario, the application constructs a pricing coefficient by using the price floating ratio in the contract version record and the supplier reputation score to control the direction and amplitude of price increase or decrease, realizing dynamic adaptation of price adjustment.

[0064] In summary, the technical scheme of the application takes into account the authenticity of Epimedium anti-counterfeiting and the credibility of traceability, realizes Epimedium authenticity verification and quality diagnosis under the premise of ensuring controllable Epimedium quality, guarantees Epimedium quality and supply chain transparency, improves traceability credibility and decision-making intelligence level, and improves the trust and management efficiency of the market for Epimedium products. BRIEF DESCRIPTION OF DRAWINGS

[0065] Figure 1 Fig. 1 is a schematic diagram of a DNA fingerprint and blockchain coupled icarii pseudo-fructus corni anti-counterfeiting traceability system according to an embodiment of the present application;

[0066] Figure 2 Fig. 2 is a flowchart of a DNA fingerprint and blockchain coupled icarii pseudo-fructus corni anti-counterfeiting traceability method according to an embodiment of the present application;

[0067] Figure 3 Fig. 3 is a flowchart of a method for obtaining a diagnosis result set according to an embodiment of the present application;

[0068] Figure 4 Fig. 4 is a flowchart of a method for obtaining an identity authenticity diagnosis result according to an embodiment of the present application;

[0069] Figure 5 Fig. 5 is a flowchart of a method for obtaining an icarii pseudo-fructus corni fingerprint file according to an embodiment of the present application. DETAILED DESCRIPTION

[0070] The technical solutions in the embodiments of the present application will be described in detail, clearly and completely below with reference to the drawings in the embodiments of the present application. It should be particularly noted that the specific embodiments described below are only used to better illustrate and describe the technical solutions of the present application, and are intended to enable those skilled in the art to better understand and implement the present application, and should not be understood as limiting the scope of protection of the present application. Without departing from the spirit and essence of the present application, those skilled in the art can modify, adjust or equivalently replace them according to the content disclosed in the present application, and these should be regarded as the protection scope of the present application.

[0071] Embodiment 1:

[0072] Referring to Fig. 1, the embodiment discloses a DNA fingerprint and blockchain coupled icarii pseudo-fructus corni anti-counterfeiting traceability system, which comprises a genetic fingerprint filing module, a Merkel storage module, an intelligent contract setting module, an identity authenticity diagnosis module, a batch quality diagnosis module and an intelligent decision module. Each module is connected by wire and / or wireless connection to realize data transmission. Figure 1 The genetic fingerprint filing module is used to pre-sample icarii pseudo-fructus corni raw materials, extract nucleic acids, amplify and sequence barcode regions, perform sequence quality control and hash processing, generate icarii pseudo-fructus corni DNA fingerprint codes and bind them with a collected icarii pseudo-fructus corni metadata set to form an icarii pseudo-fructus corni fingerprint file.

[0073] As shown in Fig. 5, the method for obtaining the icarii pseudo-fructus corni fingerprint file comprises the following steps:

[0074] Figure 5

[0075] ​​A sampling task is assigned to each batch of Epimedium raw materials at the planting base or processing workshop, and the Epimedium raw materials are sampled according to a preset sampling interval and a preset sampling quantity to obtain Epimedium raw material samples; for example, in the planting base scenario, the sampling interval is set to 10 meters, and the sampling quantity is set to 20.

[0076] The Epimedium raw material samples are subjected to appearance and moisture pre-inspection according to a preset sample integrity threshold and a moisture upper threshold, and unqualified Epimedium raw material samples are removed to obtain a set of Epimedium raw material samples to be processed;

[0077] The set of Epimedium raw material samples to be processed is subjected to nucleic acid extraction operation to obtain Epimedium nucleic acid solution;

[0078] The Epimedium nucleic acid solution is subjected to barcode region sequence acquisition processing based on a polymerase chain reaction amplification scheme to obtain Epimedium initial sequence data;

[0079] It should be noted that in the technical solution of the present application, the polymerase chain reaction amplification scheme, i.e. the PCR amplification scheme, refers to a scheme for specific amplification of target DNA sequences by polymerase chain reaction technology. The polymerase chain reaction amplification scheme is mainly used to increase the replication number of target DNA sequences, so that low-concentration sample DNA can be effectively detected and analyzed in a laboratory environment, including denaturation, annealing and extension steps.

[0080] The Epimedium initial sequence data is subjected to quality control and standardization to obtain Epimedium standardized sequence;

[0081] The Epimedium standardized sequence is converted into Epimedium sequence code; a secure hash algorithm is performed on the Epimedium sequence code to obtain a corresponding Epimedium DNA fingerprint code;

[0082] The collected Epimedium associated metadata set is bound with the Epimedium DNA fingerprint code to obtain an Epimedium fingerprint file; the Epimedium associated metadata set includes batch number, sampling number, plot number, geographic coordinates, sampling time, operator number, sequencing platform type and sequence quality control parameters.

[0083] The method for obtaining the set of Epimedium raw material samples to be processed includes:

[0084] For the collected Epimedium raw material samples, appearance inspection is performed based on a preset sample integrity threshold, and the Epimedium raw material samples are compared with the sample integrity threshold; the sample integrity threshold includes a broken area proportion threshold, a leaf loss area proportion threshold and a mold spot area proportion threshold; the sample integrity threshold is used to represent the degree of perfection of the sample in terms of morphology, structure and surface state;

[0085] If the proportion of the broken area of the Epimedium sagittatum raw material sample is greater than the proportion threshold of the broken area, or the proportion of the missing area of the leaf blade is greater than the proportion threshold of the missing area of the leaf blade, or the proportion of the mold spot area is greater than the proportion threshold of the mold spot area, it is determined that the appearance of the Epimedium sagittatum raw material sample is unqualified.

[0086] The moisture content of the sample is detected based on a preset upper limit threshold of moisture, which is used to define the maximum acceptable moisture content of the Epimedium sagittatum raw material during storage and transportation and detection. If the detected moisture content of the Epimedium sagittatum raw material sample is greater than the upper limit threshold of moisture, it is determined that the moisture content of the Epimedium sagittatum raw material sample is unqualified.

[0087] The Epimedium sagittatum raw material samples that are not labeled as unqualified in appearance or unqualified in moisture content are constructed into a set of Epimedium sagittatum raw material samples to be processed.

[0088] For example, in this application, for fresh Epimedium sagittatum, the proportion threshold of the broken area is set to 10%, the proportion threshold of the missing area of the leaf blade is set to 8%, the proportion threshold of the mold spot area is set to 1%, and the upper limit threshold of moisture is set to 72%. For dried Epimedium sagittatum, the proportion threshold of the broken area is set to 8%, the proportion threshold of the missing area of the leaf blade is set to 5%, the proportion threshold of the mold spot area is set to 0.2%, and the upper limit threshold of moisture is set to 12%.

[0089] The method for obtaining the initial sequence data of Epimedium sagittatum includes:

[0090] The nucleic acid solution of Epimedium sagittatum is mixed with a preset amplification primer, a reaction buffer, deoxyribonucleotide triphosphates, and a polymerase to form an amplification reaction system. The denaturation step, the annealing step, and the extension step are sequentially and cyclically performed according to a set amplification cycle number to obtain an amplification product containing a target barcode region fragment. The denaturation step refers to the separation of double-stranded DNA at a denaturation temperature, the annealing step refers to the specific binding of the primer to the target barcode region sequence at an annealing temperature, and the extension step refers to the synthesis of a complementary strand by a polymerase along the template strand at an extension temperature.

[0091] The detection-qualified amplification product is subjected to linker ligation, purification, and quantitative processing to construct a sequencing library.

[0092] According to a preset target value of sequencing length and a target value of sequencing depth, the sequencing library is sequenced using a high-throughput sequencing platform to obtain the initial sequence data of Epimedium sagittatum. The target value of sequencing length is a professional term in the field of sequencing, referring to the number of bases read continuously in one sequencing reaction, such as 150 bp or 250 bp.

[0093] Exemplarily, in the preferred embodiment of the present application, the amplification reaction system can be configured in a total volume of 20 microliters, including: 2 microliters of 10x reaction buffer, the components of which are Tris-HCl (pH 8.3, concentration 100 millimoles per liter), KCl (concentration 500 millimoles per liter), MgCl2(concentration 15 millimoles per liter), and "10x" indicates that the concentration of the buffer is 10 times the working concentration; 0.4 microliters of deoxyribonucleotide triphosphate mixture, i.e., the stock solution concentration is 10 millimoles per liter, and dATP, dTTP, dGTP, and dCTP are mixed in equal molar proportions, with a final concentration of 0.2 millimoles per liter; 0.4 microliters of upstream primer, i.e., a concentration of 10 micromoles per liter, a length of 18-25 bases, a GC content of 40%-60%, and specific binding to the target barcode region; 0.4 microliters of downstream primer, i.e., the same concentration and design principles as the upstream primer; 0.2 microliters of polymerase, i.e., a high-temperature-resistant DNA polymerase with an enzyme activity of 5 U / microliter, and the amount added is 0.5-1 U; 1 microliter of template DNA, i.e., an Epimedium nucleic acid solution; and the rest is supplemented with 15.6 microliters of nuclease-free water.

[0094] The amplification reaction is performed according to the preset amplification cycle parameters: initially, denaturation at 95°C for 3 minutes; after entering the cycle stage, each cycle includes denaturation at 95°C for 30 seconds, annealing at 55-60°C for 30 seconds, and extension at 72°C for 30-60 seconds, for a total of 30-35 cycles; and finally, terminal extension at 72°C for 5 minutes. After the amplification is completed, the product is subjected to quality detection, and the detection method can be: whether the target barcode region fragment is within the expected length range and has no significant non-specific bands is detected by agarose gel electrophoresis, and the expected length range is, for example, 250-300 base pairs; and the qualified amplification product is subjected to the library construction step.

[0095] The library construction includes connecting sequencing adapters to both ends of the amplification product, removing primers and small molecule impurities by magnetic bead purification, and quantifying by fluorescence quantification or microspectrophotometry to ensure that the library concentration and fragment distribution meet the sequencing requirements. The preset parameters in the sequencing stage include a sequencing length target value and a sequencing depth target value, the sequencing length target value can be set to 250 base pairs or 300 base pairs to ensure coverage of the complete barcode region sequence; and the sequencing depth target value can be set to 100x-500x to ensure sufficient coverage for each site for high-confidence sequence analysis. High-throughput sequencing platforms are used to perform sequencing according to the above parameters to obtain Epimedium initial sequence data containing target barcode region sequence information, which is used for subsequent quality control, fingerprint generation, and traceability comparison; the high-throughput sequencing platform is, for example, an Illumina or MGISEQ series platform.

[0096] It should be noted that the 100x~500x is used to represent the sequencing depth range of high-throughput sequencing. Specifically, the average number of times that the same target sequence is read during sequencing is between 100 and 500. The deeper the sequencing depth, the higher the coverage and accuracy of the obtained sequence, which can effectively reduce the influence of random sequencing errors or noise data on the results. For example, when the sequencing depth is 100x, it means that a certain target base is detected an average of 100 times; when the sequencing depth reaches 500x, it means that the base is detected an average of 500 times.

[0097] The method for obtaining the Epimedium standard sequence comprises:

[0098] For the obtained Epimedium initial sequence data, the quality of the Epimedium initial sequence data is screened based on a preset base quality value threshold, and sequence fragments with an average base quality value lower than the preset base quality value threshold are removed; the Epimedium standard sequence is filtered in length according to a minimum read length threshold, and sequence fragments shorter than the minimum read length threshold are removed; the effective sequence passing the screening is subjected to direction correction and barcode region positioning processing to ensure that the sequence starting position is consistent with the target segment; and finally, the redundant sequence is subjected to clustering and consistency correction to generate the Epimedium standard sequence.

[0099] It should be noted that the base quality value threshold is set by using the Phred quality score system. The Phred quality score is used to represent the correctness of base sequencing. When the base quality value is Q20, it means that the sequencing error rate of the base is 1%, and the corresponding accuracy is 99%; when the base quality value is Q30, it means that the sequencing error rate of the base is 0.1%, and the corresponding accuracy is 99.9%. In the present application, the base quality value threshold can be set to Q20 or Q30 according to the application scenario, and when the base quality value is lower than the base quality value threshold, the base is determined to be unqualified and is removed, thereby ensuring the reliability of the sequence in sequencing accuracy in subsequent processing. The value range of the minimum read length threshold can be set to [50bp, 150bp], and in the present application, the minimum read length threshold can be set to 100bp, and bp is base pair, which is a unit for measuring the length of DNA or RNA fragments.

[0100] The method for obtaining the Epimedium DNA fingerprint code comprises:

[0101] The grouping length is set to 512 bits, and the length additional bit is 64 bits;

[0102] A bit of "1" is appended at the end of the Epimedium sequence code, followed by W bits of "0" bits, so that the total length of the Epimedium sequence code modulo 512 is equal to 448, and E 512-bit groups are obtained;

[0103] It should be noted that W refers to the number of 0 bits that need to be supplemented after the addition of the "1" bit, W is not a fixed number, but is determined by the message length of the Epimedium sequence code, and its function is to make the total length of the Epimedium sequence code modulo 512 equal to 448.

[0104] For example, the length of the Epimedium sequence code is 440 bits, and after adding the "1" bit, the length is 441 bits. In order to make the total length modulo 512 equal to 448, 7 "0" bits need to be supplemented, so the value of W at this time is 7.

[0105] The message expansion, logical operation and compression function iteration are sequentially performed on each 512-bit group, and each 512-bit group triggers an iteration operation; specifically, when processing the first 512-bit group, the message expansion operation is first performed on the group, and then the expansion result and the current internal state are jointly input into the compression function to obtain the updated internal state after logical operation and cyclic shift processing; when processing the second 512-bit group, the internal state calculated after the first 512-bit group is taken as the new input, and the same compression function iteration is performed on the second group, and the updated internal state of the second 512-bit group is output. This process is performed in an iterative manner, and each 512-bit group takes the internal state processed by the previous 512-bit group as the input basis, until the operation on the last group is completed.

[0106] When the E 512-bit groups are processed, the final 256-bit internal state is obtained as the hash result, and is encoded into a 64-bit lowercase hexadecimal string according to the output format type to obtain the corresponding Epimedium DNA fingerprint code.

[0107] It should be noted that in the process of executing the secure hash algorithm, each 512-bit group is generated after inputting a series of operation sub-blocks through message expansion, and is input into the compression function together with the current internal state for processing. The compression function includes logical operation, cyclic shift and addition operation on the operation sub-block and the internal state, etc., for continuously updating the internal state. Those skilled in the art can know the specific execution mode of such compression function, and the operation steps have been clearly specified in the secure hash algorithm standard, so it will not be repeated here.

[0108] The Merkle evidence module is used to perform block hash operation on the Epimedium fingerprint file and construct a Merkle tree to generate a corresponding Merkle tree root hash; the Merkle tree root hash and the index information corresponding to the Epimedium fingerprint file are written into the blockchain distributed ledger to form an Epimedium evidence record. The index information corresponding to the Epimedium fingerprint file includes the evidence time, the version number and the evidence node identifier.

[0109] The method for obtaining the Merkle tree root hash comprises:

[0110] The Epimedium fingerprint file is cut into R data blocks according to a preset block size; a secure hash algorithm is performed on each data block to obtain a corresponding file data hash value, each file data hash value corresponding to a Merkle tree node, thereby forming R Merkle tree nodes;

[0111] The number of Merkle tree levels T is calculated according to a level derivation rule;

[0112] The Merkle tree is constructed based on the R Merkle tree nodes and the number of Merkle tree levels T;

[0113] The parent node hash value corresponding to the Tth level of the Merkle tree is determined as the Merkle tree root hash.

[0114] The method for calculating the number of Merkle tree levels comprises:

[0115] S100: the initial value of the number of Merkle tree levels T is set to 1; the number of Merkle tree nodes in the Tth level of the Merkle tree is initialized to R;

[0116] S101: divides R by 2 and rounds up to obtain the number of Merkle tree nodes in the Tth level of the Merkle tree;

[0117] S102: if R is 1, T is the number of Merkle tree levels, and the number of Merkle tree levels is recorded as T, and the current process is ended; if R is not 1, R is set to R / 2, and S101 is returned.

[0118] The method for constructing the Merkle tree based on the R Merkle tree nodes and the number of Merkle tree levels T comprises:

[0119] S200: the initial value of t is set to 1, and t ranges from 1 to T-1, t being a loop variable;

[0120] S201: the tth level of the Merkle tree is added to the tth level of the Merkle tree node sequence; the number of Merkle tree nodes in the tth level of the Merkle tree node sequence is recorded as R t; if R t is odd and R t>1, the last node in the tth level of the Merkle tree node sequence is copied and appended to the tth level of the Merkle tree node sequence to make the number of nodes even; the t+1th level of the Merkle tree node sequence is initialized as empty; ​​​​​​​​​​​​​

[0121] S202: Take out two adjacent Merkle tree nodes in sequence from the t-th layer Merkle tree node sequence as a Merkle tree node combination, execute a secure hash algorithm on the result formed by connecting the archive data hash values of the Merkle tree node combination, obtain a parent node hash of the Merkle tree node combination, append the parent node hash to the t+1-th layer Merkle tree node sequence, and remove the Merkle tree node combination from the t-th layer Merkle tree node sequence;

[0122] If the t-th layer Merkle tree node sequence is not empty, continue to execute S202; if the t-th layer Merkle tree node sequence is empty, execute S203;

[0123] S203: Let t = t + 1; if t ≤ T-1, return to S201 for execution; if t > T-1, obtain the Merkle tree, and end the process.

[0124] It should be noted that in the present embodiment, a secure hash algorithm is executed on the Epimedium sequence code to obtain a corresponding Epimedium DNA fingerprint code for uniquely identifying the genetic sequence. In constructing the Merkle tree, the Epimedium fingerprint archive is divided into data blocks according to the blocking rule, and only the data blocks are executed with the secure hash algorithm to obtain the archive data hash value. Then, adjacent two archive data hash values are connected and hashed to obtain the parent node hash, until a single root hash is obtained. To avoid confusion of terms, the former is referred to as the Epimedium DNA fingerprint code, and the latter is referred to as the node hash. The node hash includes the archive data hash value, the parent node hash, and the Merkle tree root hash. The algorithms of the two are the same, but the input objects and purposes are different: the sequence fingerprint code is used for sequence-level identity identification; the node hash is used for archive-level integrity evidence and minimal verification.

[0125] The Merkle tree contains verification path index information, which is used to locate and call the minimum verification path from the leaf to the root of a certain leaf without disclosing the complete Epimedium fingerprint archive content. In the process of blocking and hashing the Epimedium fingerprint archive and constructing the Merkle tree, the path node information from each leaf to the root is generated and recorded layer by layer, and the leaf refers to the target batch of Epimedium DNA fingerprint codes.

[0126] It needs to be further explained that in the present application, the Epimedium fingerprint file is subjected to block hashing and a Merkle tree is constructed to generate a Merkle tree root hash, and the Merkle tree root hash and the index information corresponding to the Epimedium fingerprint file are written into the blockchain distributed ledger, aiming to realize the integrity proof and time right of the Epimedium fingerprint file content in a lightweight and privacy-minimized manner. Among them, the Merkle tree root hash is a global summary of the full content of the Epimedium fingerprint file, which has one-way irreversibility and strong collision resistance, and any bit-level modification will cause the root hash to change; the index information corresponding to the Epimedium fingerprint file is used to establish the time sequence, version evolution and node responsibility, so as to form an unalterable, traceable and auditable evidence record on the chain.

[0127] The technical effects of the Epimedium evidence record are that the Epimedium fingerprint file is saved off-chain, only the root hash and index information are on-chain, which reduces the on-chain storage overhead and avoids the leakage of sensitive data, and at the same time, the minimum verification path is used to complete the rapid verification without disclosing the entire content, meeting the instant verification needs in circulation, sampling and arbitration; in addition, the binding of the root hash and the version number ensures the continuous traceability in the scene of batch splitting, merging or reprocessing, any historical version can be uniquely located on the chain and correspond to the off-chain file body one by one, preventing post-factum tampering and denial, and improving the credibility and operation efficiency of Epimedium raw materials in the whole process of procurement, supervision and accountability.

[0128] The smart contract setting module is used for modeling, versioning and on-chain publishing of a pre-set contract control parameter set, forming a contract version record set.

[0129] The method for obtaining the contract version record set comprises:

[0130] The contract control parameter set is pre-set; the contract control parameter set comprises Epimedium active ingredient intervals, cold chain temperature control parameters, in-batch qualified rate thresholds, price fluctuation ratios, reputation score rules, parameter effective times, applicable batch ranges and parameter priorities;

[0131] The contract control parameter set is verified according to a parameter legality verification rule; the parameter legality verification rule comprises range verification, upper and lower limit relationship verification, interval overlap conflict verification, unit consistency verification and cross-parameter coupling relationship verification;

[0132] After verification, each parameter is standardized according to a parameter coding rule to obtain a standardized parameter; a security hash algorithm is performed on the standardized parameter to obtain a parameter hash value; the parameter coding rule comprises field sorting, unit conversion and precision unification, empty field removal and default value padding;

[0133] The parameter hash value is combined with a parameter effective time, a batch range of application, and a parameter priority to generate a contract version number;

[0134] The parameter hash value, the contract version number, the parameter effective time, and the batch range of application are written into a blockchain distributed ledger for on-chain publishing and audit trace, forming a contract version record set. The contract version record in the contract version record set automatically turns into an effective state after reaching the corresponding parameter effective time.

[0135] For example, in the preferred embodiment of the present application, the data of the contract control parameter set is as follows:

[0136] The active ingredient interval of Epimedium can be set to a total flavonoid content in the range of 0.8% to 1.2% and including 0.8% and 1.2% to ensure the consistency of the quality of medicinal materials; the cold chain temperature control parameter is the temperature and humidity in the transportation and storage process, the temperature is set to 2°C to 8°C and including 2°C and 8°C, and the humidity is set to 40% to 60% and including 40% and 60%, to ensure that the activity of medicinal materials is not lost due to environmental fluctuations; the batch pass rate threshold is set to no less than 95%, that is, the pass rate of each batch of inspection samples should reach more than 95% to be circulated; the price floating ratio is set to no more than ±10% to respond to market supply and demand changes while avoiding abnormal speculation; the credit score rule can be set to comprehensively consider historical delivery punctuality rate, complaint rate, and blockchain record integrity to calculate a credit score of 0 to 100 points, including 0 and 100; the parameter effective time is set to 2025-01-01 0:00, for example; the batch range of application is set to batch number interval [20250001, 20250099], for example; and the parameter priority is set to “2”, and the smaller the parameter priority, the higher the priority.

[0137] It should be noted that the pre-set contract control parameter set is modeled, versioned, and published on the chain to form a contract version record set. In the present application, through the modeling of the contract control parameter set, the active ingredients, cold chain temperature control, price fluctuation, and credit score involved in the Epimedium transaction and flow process can be structured and expressed, avoiding business conflicts caused by inconsistent parameter definitions. Secondly, through parameter legality verification and standardized processing, the consistency of all parameters in units, intervals, and logical relationships can be ensured, avoiding parameter conflicts and deviation problems in cross-link applications. In addition, through version management, each parameter adjustment forms an independent contract version number, which is recorded and traced in the blockchain, ensuring the traceability of historical parameters and current parameters, thereby improving the transparency of regulatory audits. After the contract version record set is published on the chain, it can be ensured that it automatically turns into an effective state when it reaches the effective time, realizing the intelligent and automatic effect of parameter adjustment.

[0138] In summary, the present application significantly improves the standardization, traceability and credibility of the whole chain management of Epimedium by modeling, versioning and publishing the contract control parameter set, laying a technical foundation for realizing business compliance and intelligentizing the flow process.

[0139] The identity authenticity diagnosis module is configured to perform standardization and hash processing on the target batch of Epimedium to obtain a target leaf hash, and perform comparison and diagnosis on the target batch of Epimedium in combination with the Epimedium storage record to obtain an identity authenticity diagnosis result.

[0140] As shown in Figure 4 The method for obtaining the identity authenticity diagnosis result comprises the following steps:

[0141] obtaining a target Epimedium DNA fingerprint code obtained after processing of the target batch of Epimedium;

[0142] performing standardization processing on the target Epimedium DNA fingerprint code according to a leaf coding rule, and performing a secure hash algorithm to obtain a target leaf hash;

[0143] It should be noted that the method for performing standardization processing on the target Epimedium DNA fingerprint code according to the leaf coding rule specifically comprises the following steps: segmenting a binary sequence of the target Epimedium DNA fingerprint code according to a unified coding length, for example, setting the coding length to 256 bits, performing zero padding processing on the part that is less than the coding length to ensure that the input lengths of all leaf nodes are consistent; performing deduplication and merging on redundant or repeated segments to ensure the uniqueness and simplicity of the coding sequence; in numerical processing, uniformly converting the target Epimedium DNA fingerprint codes generated by different source systems into a standard numerical format to eliminate the inconsistency caused by coding mode differences; at the same time, default value padding and marking are performed on abnormal characters or missing sites to maintain the sequence integrity in subsequent calculations.

[0144] Through the above standardization steps, it can be ensured that the generation process of the target leaf hash has a unified input standard and stable repeatability, thereby providing a reliable data basis for subsequent hash operation and Merkle tree construction.

[0145] reading a Merkle tree root hash corresponding to the target batch of Epimedium from the Epimedium storage record, denoted as a target Merkle tree root hash, and obtaining verification path index information corresponding to the target Merkle tree root hash;

[0146] According to the verification path index information, a target minimum verification path corresponding to the target leaf hash is located and called from an off-chain archive storage;

[0147] It should be noted that the target minimum verification path refers to determining the shortest path from the target leaf node to the root node of the Merkle tree through the Merkle tree structure. Specifically, the target minimum verification path includes the connection path between the target leaf node and the sibling nodes and parent nodes of the target leaf node, which are connected through hash values to form a tree structure. In practical applications, the role of the target minimum verification path is to quickly verify whether the identity information of the target batch matches the Merkle tree root hash stored on the blockchain by accessing these key nodes. Due to the structural characteristics of the Merkle tree, this verification process is efficient and secure, requiring only the minimum amount of node data to complete the verification without traversing the entire tree structure. This method greatly improves the efficiency of data verification and ensures the immutability and credibility of data on the blockchain. Therefore, the target minimum verification path plays a key role in ensuring data integrity, accuracy, and anti-counterfeiting traceability in the present application.

[0148] The target minimum verification path adopts a bottom-up layer-by-layer positioning and back calculation algorithm, only accesses the sibling nodes and parent nodes related to the target leaf hash, and performs a secure hash operation to obtain a back calculation root hash;

[0149] It is judged whether the back calculation root hash is the same as the target Merkle tree root hash. If the result of the judgment is the same, the authenticity diagnosis result of the target batch of Herba Epimedii is that the anti-counterfeiting authentication is passed. If the result of the judgment is not the same, the authenticity diagnosis result of the target batch of Herba Epimedii is that the anti-counterfeiting authentication is not passed.

[0150] It should be noted that by standardizing and hashing the target batch of Herba Epimedii and combining the identity authenticity diagnosis with the record storage, the efficiency and accuracy of retrieval and verification can be significantly improved. Specifically, standardization and hashing mapping complex batch data to target leaf hash enables subsequent comparison to be performed in a unified data format, avoiding errors caused by manual discrimination or inconsistent formats. In addition, matching and diagnosing the target leaf hash with the Herba Epimedii record storage can quickly determine whether the target batch is consistent with the original record information, thereby realizing the automated discrimination of the authenticity of Herba Epimedii. The present application not only reduces manual intervention, improves the objectivity and tamper resistance of the verification process, but also maintains high processing efficiency in large-scale batch data scenarios, providing reliable technical support for the authenticity traceability and quality assurance of Herba Epimedii traditional Chinese medicine.

[0151] The batch quality diagnosis module performs comprehensive comparison and diagnosis based on the active ingredient indicators, cold chain temperature control parameters, and in-batch qualification rate of the target batch of Herba Epimedii, and combines the contract version record set to obtain a diagnosis result set.

[0152] As shown in Figure 3 the method for obtaining the diagnosis result set comprises:

[0153] According to the batch number of the target batch of Epimedium, the corresponding contract version record is retrieved from the contract version record set; the active ingredient interval of Epimedium, the cold chain temperature control parameter and the in-batch qualified rate threshold value are obtained from the contract version record;

[0154] It is judged whether the active ingredient of Epimedium is located in the active ingredient interval of Epimedium. If the result is yes, the active ingredient diagnosis result of Epimedium is qualified. If the result is no, the active ingredient diagnosis result of Epimedium is unqualified. The active ingredient deviation amplitude and the active ingredient out-of-limit direction are recorded.

[0155] The active ingredient out-of-limit direction includes exceeding the upper limit of the active ingredient and being lower than the lower limit of the active ingredient. Exceeding the upper limit of the active ingredient indicates that the active ingredient content of Epimedium is too high, which has exceeded the upper limit requirement of the quality standard or the pharmacopoeia, thereby causing excessive drug efficacy, increased side effects, or not meeting the requirements of the prescription process. Being lower than the lower limit of the active ingredient indicates that the active ingredient content of Epimedium is insufficient, which has not reached the lower limit requirement of the quality standard or the pharmacopoeia, thereby causing insufficient drug efficacy, decreased clinical efficacy, or even making the Epimedium product not have the expected function.

[0156] If the out-of-limit direction is exceeding the upper limit of the active ingredient, the active ingredient deviation amplitude is the active ingredient of the target batch of Epimedium minus the upper limit value of the active ingredient interval. If the out-of-limit direction is lower than the lower limit of the active ingredient, the active ingredient deviation amplitude is the lower limit value of the active ingredient interval minus the active ingredient of the target batch of Epimedium. The active ingredient deviation amplitude reflects the unqualified degree.

[0157] The real-time cold chain temperature control parameter is compared with the cold chain temperature control parameter in the contract version record. The cumulative out-of-limit time in a unit time is counted, and the out-of-limit time proportion is calculated. It is judged whether the out-of-limit time proportion exceeds the preset out-of-limit time proportion threshold value. If it exceeds, the cold chain temperature control parameter diagnosis result is determined to be abnormal. If it does not exceed, the cold chain temperature control parameter diagnosis result is determined to be normal.

[0158] It is judged whether the in-batch qualified rate exceeds the in-batch qualified rate threshold value. If it exceeds, the qualified rate diagnosis result is qualified. If it does not exceed, the qualified rate diagnosis result is unqualified.

[0159] The active ingredient diagnosis result of Epimedium, the active ingredient out-of-limit direction, the active ingredient deviation amplitude, the cold chain temperature control parameter diagnosis result and the qualified rate diagnosis result are constructed into a diagnosis result set.

[0160] The intelligent decision module inputs the identity authenticity diagnosis result, the contract version record matched with the target batch of Epimedium and the diagnosis result set into an Epimedium intelligent decision model to generate a decision conclusion; the decision conclusion includes receiving, pricing or rejecting.

[0161] The training method of the Epimedium intelligent decision model comprises:

[0162] An Epimedium intelligent decision dataset is constructed in advance, the Epimedium intelligent decision dataset comprising JC group Epimedium intelligent decision data and decision conclusions corresponding to the JC group Epimedium intelligent decision data, JC being a positive integer; the Epimedium intelligent decision data comprises an identity authenticity diagnosis result, a contract version record and a diagnosis result set; the Epimedium intelligent decision dataset is divided into a training set and a validation set, the training set being used for parameter learning of the Epimedium intelligent decision model and the validation set being used for real-time monitoring of the generalization performance and overfitting degree of the Epimedium intelligent decision model;

[0163] A deep neural network with a multilayer perceptron as the core is used as the Epimedium intelligent decision model, the Epimedium intelligent decision data is input into the deep neural network after being standardized and vectorized, the deep neural network comprises an input layer, hidden layers and an output layer; each hidden layer uses a nonlinear activation function to extract features, the output layer uses a Softmax activation function to obtain a probability distribution corresponding to each decision conclusion, and finally the decision conclusion corresponding to the maximum probability is taken as the prediction result of the Epimedium intelligent decision model; in the training process, a cross-entropy loss function is used as the optimization objective, a gradient descent type optimization algorithm is used to update the network weights, and an early stopping strategy is set: when the prediction accuracy on the validation set reaches or exceeds a prediction accuracy threshold, it is determined that the Epimedium intelligent decision model has converged and the training is terminated. Exemplarily, the prediction accuracy threshold can be set to 95% in the present application.

[0164] When the decision conclusion is pricing, a reputation score corresponding to the supplier is obtained, and the reputation score is normalized into a reputation score weight coefficient;

[0165] A price fluctuation ratio in the contract version record matched with the target batch of Epimedium is obtained, and weighted operation is performed with the reputation score weight coefficient to obtain an Epimedium pricing coefficient;

[0166] Based on the Epimedium contract benchmark price and the Epimedium pricing coefficient, a final pricing result of the target batch of Epimedium is calculated.

[0167] The calculation method of the Epimedium pricing coefficient comprises:

[0168] ;

[0169] wherein, is the Epimedium pricing coefficient, is a price floating ratio, is a reputation score weight coefficient, and the value range of the reputation score weight coefficient is [0, 1], is a weight factor of the price floating ratio, is a weight factor of the reputation score weight coefficient, and satisfies . For example, in the present application, the value of the price floating ratio can be set to 0.6, and the value of the reputation score weight coefficient can be set to 0.4.

[0170] The calculation method of the final price adjustment result comprises:

[0171] ;

[0172] wherein, is a final price adjustment result, is a herba epimedii contract benchmark price.

[0173] It should be noted that the present application realizes dynamic adjustment of the supply price by introducing a double-factor regulation mechanism of the price floating ratio and the reputation score on the basis of the herba epimedii contract benchmark price. Specifically, the price floating ratio is used to reflect the fluctuation trend of the price due to market factors. When the price floating ratio is positive, the system automatically guides the price to increase, and when the price floating ratio is negative, the system automatically guides the price to decrease. At the same time, in combination with the supplier reputation score parameter, a supplier with a high reputation score can offset part of the decrease and obtain reasonable increase space, while a supplier with a low reputation score will be further limited in the increase or the decrease. Through this mechanism, the price adjustment direction and amplitude are no longer dependent on artificial judgment, but are automatically calculated by a formulaic model, ensuring the objectivity and consistency of the price adjustment process. On the one hand, it can effectively avoid irrational price adjustment based on market fluctuations and protect the cost control of the purchaser; on the other hand, it can give differentiated incentives to suppliers according to the reputation level, so as to promote the suppliers to maintain good performance, thereby forming a double improvement of price fairness and supply stability. The present application organically integrates the price floating parameter and the reputation score parameter, and constructs a dynamic price adjustment model with flexibility and constraint, which has obvious technical progressiveness and application value.

[0174] Embodiment 2:

[0175] Referring to FIG. 1, the present embodiment provides a herba epimedii anti-counterfeiting traceability method based on DNA fingerprint and block chain coupling, which comprises the following steps: Figure 2

[0176] The herba epimedii raw material is pre-sampled, nucleic acid is extracted, the barcode region is amplified and sequenced, sequence quality control and hash processing are performed, the herba epimedii DNA fingerprint code is generated, and is bound with the collected herba epimedii metadata set to form a herba epimedii fingerprint file; ​​​

[0177] The Epimedium fingerprint file is subjected to block hash operation and a Merkle tree is constructed to generate a corresponding Merkle tree root hash; the Merkle tree root hash and index information corresponding to the Epimedium fingerprint file are written into a blockchain distributed ledger to form an Epimedium storage record;

[0178] The pre-set contract control parameter set is modeled, versioned and chain-published to form a contract version record set;

[0179] The target batch of Epimedium is standardized and hashed to obtain a target leaf hash, and the target batch of Epimedium is compared and diagnosed in combination with the Epimedium storage record to obtain an identity authenticity diagnosis result;

[0180] Based on the active ingredient index, cold chain temperature control parameter and in-batch qualified rate of the target batch of Epimedium, the contract version record set is comprehensively compared and diagnosed to obtain a diagnosis result set;

[0181] The identity authenticity diagnosis result, the contract version record matched with the target batch of Epimedium and the diagnosis result set are input into an Epimedium intelligent decision model to generate a decision conclusion; the decision conclusion includes receiving, pricing or rejecting.

[0182] The above is only a specific embodiment of the present application, but the protection scope of the present application is not limited thereto, any person skilled in the art can easily think of changes or replacements within the technical range disclosed by the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

[0183] Finally: the above is only a preferred embodiment of the present application and is not used to limit the present application, any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application should be included within the protection scope of the present application.

Claims

1. A method for anti-counterfeiting and traceability of Epimedium based on DNA fingerprinting and blockchain coupling, characterized in that, include: Pre-sample the Epimedium raw material; extract nucleic acid from the Epimedium raw material samples that passed the appearance and moisture content pre-screening to obtain Epimedium nucleic acid solution; The Epimedium nucleic acid solution was mixed with pre-set amplification primers, reaction buffer, deoxynucleoside triphosphate, and polymerase to form an amplification reaction system. Denaturation, annealing, and extension steps were sequentially executed according to the set number of amplification cycles to obtain amplification products containing the target barcode region fragment. The qualified amplification products were then ligated with adapters, purified, and quantified to construct a sequencing library. Based on the pre-set sequencing length and depth targets, the sequencing library was sequenced using a high-throughput sequencing platform to obtain the initial Epimedium sequence data. The initial Epimedium sequence undergoes quality control and standardization to obtain a standardized Epimedium sequence. This standardized sequence is then converted into an Epimedium sequence code. A secure hash algorithm is applied to the Epimedium sequence code to obtain the corresponding Epimedium DNA fingerprint. The Epimedium DNA fingerprint is then bound to an Epimedium-associated metadata set to form an Epimedium fingerprint profile. This Epimedium-associated metadata set includes batch number, sampling number, plot number, geographic coordinates, sampling time, operator number, sequencing platform type, and sequence quality control parameters. Perform block hashing on the Epimedium fingerprint file and construct a Merkle tree to generate the corresponding Merkle tree root hash; write the Merkle tree root hash and the index information corresponding to the Epimedium fingerprint file into the blockchain distributed ledger to form an Epimedium evidence record. A pre-defined set of contract control parameters is established, including the active ingredient range of Epimedium, cold chain temperature control parameters, batch pass rate threshold, price fluctuation ratio, reputation scoring rules, parameter effective time, applicable batch range, and parameter priority. The contract control parameter set is verified according to parameter legality verification rules. After verification, each parameter is standardized according to parameter coding rules to obtain standardized parameters. A secure hash algorithm is executed on the standardized parameters to obtain parameter hash values. The parameter hash values ​​are combined with the parameter effective time, applicable batch range, and parameter priority to generate a contract version number. The parameter hash values, contract version number, parameter effective time, and applicable batch range are written into the blockchain distributed ledger for on-chain publication and auditing, forming a contract version record set. The target Epimedium DNA fingerprint of the target batch is normalized and hashed to obtain the target leaf hash. The target Epimedium is then compared and diagnosed in conjunction with the Epimedium storage record to obtain the identity authenticity diagnosis result. Methods for obtaining identity verification results include: Obtain the target Epimedium DNA fingerprint code after processing the target batch of Epimedium; The target Epimedium DNA fingerprint code is normalized according to the leaf coding rules, and a secure hash algorithm is applied to the normalized target Epimedium DNA fingerprint code to obtain the target leaf hash. The method for normalizing the target Epimedium DNA fingerprint code according to the leaf coding rules includes: segmenting the binary sequence of the target Epimedium DNA fingerprint code according to a uniform coding length, and performing zero-padding on the parts that are insufficient in coding length; deduplicating and merging redundant or repeated segments; and uniformly converting the target Epimedium DNA fingerprint codes generated by different source systems into a standard numerical format. Read the Merkel root hash corresponding to the target batch of Epimedium from the Epimedium evidence record, denoted as the target Merkel root hash, and obtain the verification path index information corresponding to the target Merkel root hash; Based on the verification path index information, the target minimum verification path corresponding to the target leaf hash is located and retrieved from the off-chain archive storage; the target minimum verification path refers to the shortest path from the target leaf node to the root node of the Merkle tree determined by the Merkle tree structure. The minimum verification path for the target adopts a bottom-up, layer-by-layer positioning and back-calculation algorithm, which only visits the sibling nodes and parent nodes related to the target leaf hash and performs a secure hash operation to obtain the back-calculation root hash. Determine whether the back-calculation root hash is the same as the target Merkle tree root hash. If the result is the same, the authenticity diagnosis result of the target batch of Epimedium is that the anti-counterfeiting authentication has passed; if the result is different, the authenticity diagnosis result of the target batch of Epimedium is that the anti-counterfeiting authentication has failed. Based on the active ingredient indicators, cold chain temperature control parameters, and batch pass rate of the target batch of Epimedium, a comprehensive comparative diagnosis is performed using a set of contract version records to obtain a set of diagnostic results. The method for obtaining the set of diagnostic results includes: Based on the target Epimedium batch number, the corresponding contract version record is retrieved from the contract version record set, and the active ingredient range, cold chain temperature control parameters and batch pass rate threshold of Epimedium are extracted. The active ingredients of Epimedium are determined by classifying them into ranges to obtain diagnostic results. The direction of exceeding the limit and the deviation range of the active ingredients are recorded. The direction of exceeding the limit includes exceeding the upper limit and falling below the lower limit. If the direction of exceeding the limit is exceeding the upper limit, the deviation range of the active ingredients is the active ingredient of the target batch of Epimedium minus the upper limit of the active ingredient range. If the direction of exceeding the limit is falling below the lower limit, the deviation range of the active ingredients is the lower limit of the active ingredient range minus the active ingredient of the target batch of Epimedium. Compare the real-time cold chain temperature control parameters with the cold chain temperature control parameters in the contract version record, calculate the cumulative over-limit time per unit time and calculate the over-limit time ratio, and determine the cold chain temperature control parameter diagnosis result based on the over-limit time ratio and the preset over-limit time ratio threshold. The batch pass rate is compared with the batch pass rate threshold to obtain the pass rate diagnosis result. The diagnostic results of active ingredients of Epimedium, the direction of exceeding the limit of active ingredients, the deviation of active ingredients, the diagnostic results of cold chain temperature control parameters, and the qualification rate are constructed into a set of diagnostic results. The identification results, contract version records, and diagnosis result set of the target batch of Epimedium are input into the Epimedium intelligent decision-making model to generate a decision conclusion; the decision conclusion includes acceptance, price adjustment, or rejection.

2. The method for anti-counterfeiting and traceability of Epimedium based on DNA fingerprinting and blockchain coupling according to claim 1, characterized in that, When the decision is to adjust the price, the supplier’s credit score is obtained and the credit score is normalized into a credit score weighting coefficient. Obtain the price fluctuation ratio from the contract version record that matches the target batch of Epimedium, and perform a weighted calculation with the reputation score weight coefficient to obtain the Epimedium price adjustment coefficient; Based on the contract benchmark price of Epimedium and the price adjustment coefficient of Epimedium, the final price adjustment result of the target batch of Epimedium is calculated.

3. The method for anti-counterfeiting and traceability of Epimedium based on DNA fingerprinting and blockchain coupling according to claim 1, characterized in that, The method for obtaining the Merkle root hash includes: The epimedium fingerprint file is divided into R data blocks according to a preset block size; a secure hash algorithm is executed on each data block to obtain the corresponding file data hash value, and each file data hash value corresponds to a Merkle tree node, forming R Merkle tree nodes; Calculate the number of Merkle tree levels T according to the hierarchical derivation rules; Construct a Merkle tree based on R Merkle tree nodes and T Merkle tree levels; The hash value of the parent node corresponding to the Tth level of the Merkle tree is determined as the Merkle tree root hash.

4. The method for anti-counterfeiting and traceability of Epimedium based on DNA fingerprinting and blockchain coupling according to claim 3, characterized in that, The method for calculating the number of levels in the Merkle tree includes: S100: Let the Merkle tree level number be... The initial value is 1; the Merkle tree is set to the first... Number of Merkle tree nodes in a layer Initialize to R; S101: Will Divide by 2 and round up to obtain the Merkle tree. Number of Merkle tree nodes in a layer ; S102: If If it is 1, then Let T be the level number of the Merkle tree, and then end the current process; if If it is not 1, then let Return to S101 for execution.

5. The method for anti-counterfeiting and traceability of Epimedium based on DNA fingerprinting and blockchain coupling according to claim 3, characterized in that, Methods for constructing a Merkle tree based on R Merkle tree nodes and T Merkle tree levels include: S200: Let the initial value of t be 1, and the range of t is from 1 to T-1. t is the loop variable; S201: Add the Merkle tree node at level t to the Merkle tree node sequence at level t; denoted as the number of Merkle tree nodes in the Merkle tree node sequence at level t. ;like odd number and If the value is greater than 1, then perform self-copying on the last node of the Merkle tree node sequence at level t and append it to the Merkle tree node sequence at level t; initialize the Merkle tree node sequence at level t+1 to be empty; S202: Take two adjacent Merkle tree nodes in sequence from the Merkle tree node sequence at level t to form a Merkle tree node combination. Perform a secure hash algorithm on the result formed by connecting the file data hash values ​​of the Merkle tree node combination to obtain the parent node hash of the Merkle tree node combination. Append the parent node hash to the Merkle tree node sequence at level t+1. Remove the Merkle tree node combination from the Merkle tree node sequence at level t. If the Merkle tree node sequence at level t is not empty, then continue to execute S202; if the Merkle tree node sequence at level t is empty, then execute S203. S203: Let t = t + 1; if t ≤ T - 1, then return to S201 to execute; if t > T - 1, then obtain the Merkle tree and end the process.

6. The method for anti-counterfeiting and traceability of Epimedium based on DNA fingerprinting and blockchain coupling according to claim 1, characterized in that, Methods for pre-sampling of Epimedium raw materials include: For each batch of Epimedium raw materials, a sampling task is issued, and the Epimedium raw materials are sampled according to the preset sampling interval and preset sampling quantity to obtain Epimedium raw material samples; Methods for preliminary screening based on appearance and moisture content include: Based on the preset sample integrity threshold and moisture limit threshold, the appearance and moisture content of the Epimedium raw material samples are pre-inspected, and unqualified Epimedium raw material samples are removed to obtain a set of Epimedium raw material samples to be processed.

Citation Information

Patent Citations

  • Artwork circulation method and device, electronic equipment and storage medium

    CN115187243A

  • Drug tracing system and method based on block chain

    CN116385023A