A distributed commodity anti-counterfeiting traceability method and system based on an internet of things

CN122840969APending Publication Date: 2026-09-29CHONGQING FIRE RABBIT IOT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610999761.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-07
Publication Date
2026-09-29

AI Technical Summary

Technical Problem

[0002]现有商品防伪溯源系统普遍采用中心化架构,所有验证数据集中存储于单一服务器,该架构存在单点故障风险,一旦中心服务器被攻击或篡改,整个防伪体系将失效

Benefits of technology

[0014]技术效果:本发明采用分布式多节点共识校验架构,避免了中心化系统的单点故障风险,通过节点动态可信度评估、时空特征耦合校验、链式防伪置信度传导和异常风险预判的四维联动验证机制,有效解决了传统防伪系统验证维度单一、易被攻击的核心技术问题,显著提升了商品防伪溯源系统的整体安全性和验证可靠性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122840969A_ABST
    Figure CN122840969A_ABST
Patent Text Reader

Abstract

This invention relates to the field of IoT anti-counterfeiting technology, and discloses a distributed product anti-counterfeiting and traceability method and system based on IoT. The method includes acquiring multi-dimensional node feature data uploaded by distributed IoT nodes, calculating the dynamic credibility of each IoT node, recording timestamp data and geographical location information of product circulation, calculating the spatiotemporal feature coupling degree, performing chain-like anti-counterfeiting confidence fusion calculation, calculating a comprehensive anomaly risk value, and finally performing distributed multi-node consensus verification. This invention effectively solves the technical problems of centralized anti-counterfeiting systems being vulnerable to attacks and having a single verification dimension through a distributed multi-dimensional verification mechanism, thereby improving the reliability and security of product anti-counterfeiting and traceability systems.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of Internet of Things (IoT) anti-counterfeiting technology, and in particular to a distributed product anti-counterfeiting and traceability method and system based on IoT. Background Technology

[0002] Existing anti-counterfeiting and traceability systems generally employ a centralized architecture, with all verification data stored centrally on a single server. This architecture carries a single point of failure risk; if the central server is attacked or tampered with, the entire anti-counterfeiting system will fail. Furthermore, existing anti-counterfeiting verification largely relies on single label ID comparison, making the verification dimension too simplistic and unable to effectively identify advanced anti-counterfeiting attacks such as label duplication and spatiotemporal forgery, thus compromising the reliability of anti-counterfeiting measures. In addition, the trustworthiness of each node in a centralized system cannot be dynamically assessed, making it difficult to promptly identify and isolate forged data uploaded by malicious nodes, resulting in security vulnerabilities in the anti-counterfeiting verification results.

[0003] Therefore, there is an urgent need for a multi-dimensional, interconnected anti-counterfeiting and traceability technology solution under a distributed architecture to solve the inherent security defects of centralized systems. Summary of the Invention

[0004] The purpose of this invention is to overcome the shortcomings of existing technologies and proposes a distributed product anti-counterfeiting and traceability method based on the Internet of Things, comprising: S1: Obtain multi-dimensional node feature data uploaded by distributed IoT nodes; S2: Calculate the dynamic reliability of each IoT node based on the multi-dimensional node feature data; S3: Records the timestamp data and geographical location information of the goods when they pass through each node, and generates the transmission time difference and geographical distance data between adjacent nodes; S4: Calculate the spatiotemporal coupling degree of each flow path based on the transmission time difference and the geographical distance data; S5: Along the product traceability chain, the dynamic credibility and spatiotemporal feature coupling degree of the previous node are fused with the dynamic credibility and spatiotemporal feature coupling degree of the current node to obtain the chain-like anti-counterfeiting confidence degree of the current node. S6: Obtain the deviation of node behavior characteristics and data integrity verification value; S7: Calculate the comprehensive anomaly risk value based on the chain-like anti-counterfeiting confidence level, the behavioral feature deviation degree, and the data integrity verification value; S8: Perform multi-node consensus verification of the dynamic credibility, the spatiotemporal feature coupling degree, the chain-like anti-counterfeiting confidence degree, and the comprehensive anomaly risk value in a distributed network to generate anti-counterfeiting traceability verification results.

[0005] Preferably, the multi-dimensional node feature data includes historical verification success rate, data transmission stability, environmental feature matching degree, and node activity; the calculation of the dynamic credibility of each IoT node based on the multi-dimensional node feature data includes: configuring weight coefficients for the historical verification success rate, the data transmission stability, the environmental feature matching degree, and the node activity; normalizing the weight coefficients; and introducing a time decay coefficient and a normalized value of the node's cumulative running time for calculation.

[0006] Further preferably, the step of calculating the spatiotemporal coupling degree of each flow path based on the transmission time difference and the geographical distance data includes: obtaining the theoretical maximum transmission speed of IoT data; calculating the theoretical transmission time between adjacent nodes based on the geographical distance data and the theoretical maximum transmission speed of IoT data; calculating the absolute value of the difference between the transmission time difference and the theoretical transmission time; and introducing a transmission delay tolerance coefficient for calculation.

[0007] Further preferably, the step of fusing the dynamic credibility and spatiotemporal coupling degree of the preceding node with the dynamic credibility and spatiotemporal coupling degree of the current node along the product traceability chain includes: configuring a chain-like transmission weight coefficient; calculating a first product of the dynamic credibility and spatiotemporal coupling degree of the preceding node; calculating a second product of the dynamic credibility and spatiotemporal coupling degree of the current node; calculating the geometric mean of the dynamic credibility, spatiotemporal coupling degree, and current node dynamic credibility and spatiotemporal coupling degree; and weighting and fusing the first product, the second product, and the geometric mean according to the chain-like transmission weight coefficient.

[0008] More preferably, the step of calculating the comprehensive anomaly risk value based on the chain-based anti-counterfeiting confidence level, the behavioral feature deviation, and the data integrity verification value includes: calculating the average value of the behavioral feature deviation and the data integrity verification value; calculating the anomaly degree coefficient based on the average value; configuring the risk amplification index; and performing the calculation based on the chain-based anti-counterfeiting confidence level, the anomaly degree coefficient, and the risk amplification index.

[0009] Further preferably, the step of performing multi-node consensus verification of the dynamic credibility, the spatiotemporal feature coupling degree, the chain-based anti-counterfeiting confidence degree, and the comprehensive anomaly risk value in the distributed network includes: broadcasting the calculation results to all verification nodes in the distributed network; receiving the verification results returned by each verification node; counting the number of nodes that pass the verification; configuring a consensus threshold; and confirming the validity of the verification result when the number of nodes that pass the verification reaches the consensus threshold.

[0010] Further preferred methods include: hashing and encrypting all data uploaded by nodes; storing the encrypted data in a distributed ledger; extracting verification data from the distributed ledger when a user queries; and outputting a verification report to the user that includes dynamic credibility, spatiotemporal feature coupling degree, chain-based anti-counterfeiting confidence degree, and comprehensive anomaly risk value.

[0011] More preferably, the historical verification success rate is determined based on the ratio of the number of successful verifications in the node's historical verification records to the total number of verifications; the data transmission stability is determined based on the node's data transmission success rate and transmission delay fluctuation coefficient; the environmental feature matching degree is determined based on the degree of matching between the node's current environmental parameters and historical normal environmental parameters; and the node activity is determined based on the node's online duration and data upload frequency.

[0012] A distributed anti-counterfeiting and traceability system based on the Internet of Things (IoT), applying any one of the above-described distributed anti-counterfeiting and traceability methods based on IoT, includes a node credibility assessment module, a spatiotemporal feature coupling verification module, a chain-based anti-counterfeiting confidence calculation module, an anomaly risk comprehensive prediction module, and a distributed consensus verification module. The node credibility assessment module is electrically connected to the chain-based anti-counterfeiting confidence calculation module, and is used to acquire multi-dimensional node feature data uploaded by distributed IoT nodes, and calculate the dynamic credibility of each IoT node based on the multi-dimensional node feature data. The spatiotemporal feature coupling verification module is electrically connected to the chain-based anti-counterfeiting confidence calculation module, and is used to record the timestamp data and geographical location information of the product when it passes through each node, generate transmission time difference and geographical distance data between adjacent nodes, and calculate the dynamic credibility of each IoT node based on the transmission time difference and geographical distance data. The spatiotemporal coupling degree of each flow path; the chain-type anti-counterfeiting confidence calculation module is electrically connected to the abnormal risk comprehensive prediction module, and is used to fuse the dynamic credibility and spatiotemporal coupling degree of the preceding node with the dynamic credibility and spatiotemporal coupling degree of the current node along the product traceability chain to obtain the chain-type anti-counterfeiting confidence degree of the current node; the abnormal risk comprehensive prediction module is electrically connected to the distributed consensus verification module, and is used to obtain the node behavior feature deviation degree and data integrity verification value, and calculate the comprehensive abnormal risk value based on the chain-type anti-counterfeiting confidence degree, the behavior feature deviation degree, and the data integrity verification value; the distributed consensus verification module is used to perform multi-node consensus verification of the dynamic credibility degree, the spatiotemporal coupling degree, the chain-type anti-counterfeiting confidence degree, and the comprehensive abnormal risk value in the distributed network to generate anti-counterfeiting traceability verification results.

[0013] Further preferably, the system also includes a data encryption and storage module and a user query output module. The data encryption and storage module is electrically connected to the node credibility assessment module, the spatiotemporal feature coupling verification module, the chain-based anti-counterfeiting confidence calculation module, and the anomaly risk comprehensive prediction module. It is used to perform hash encryption processing on all data uploaded by the nodes and store the encrypted data in the distributed ledger. The user query output module is electrically connected to the distributed consensus verification module and the data encryption and storage module. It is used to extract verification data from the distributed ledger when a user queries and output a verification report to the user that includes dynamic credibility, spatiotemporal feature coupling degree, chain-based anti-counterfeiting confidence, and comprehensive anomaly risk value.

[0014] Technical Effects: This invention adopts a distributed multi-node consensus verification architecture, avoiding the risk of single-point failure in centralized systems. Through a four-dimensional linkage verification mechanism of node dynamic credibility assessment, spatiotemporal feature coupling verification, chain-like anti-counterfeiting confidence transmission, and anomaly risk prediction, it effectively solves the core technical problems of traditional anti-counterfeiting systems, such as single verification dimensions and susceptibility to attacks, and significantly improves the overall security and verification reliability of the product anti-counterfeiting traceability system. Attached Figure Description

[0015] Figure 1 Flowchart of the distributed anti-counterfeiting and traceability method for goods based on the Internet of Things in this invention; Figure 2 A schematic diagram of the overall architecture of the distributed anti-counterfeiting and traceability system for goods based on the Internet of Things of this invention; Figure 3 This invention provides a schematic diagram of the entire anti-counterfeiting verification process and its sequential interaction. Detailed Implementation

[0016] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0017] Please see Figures 1-3 This invention provides a distributed product anti-counterfeiting and traceability method and system based on the Internet of Things. Existing anti-counterfeiting systems adopt a centralized architecture, which has the risk of single point of failure and a single verification dimension, resulting in insufficient reliability of anti-counterfeiting.

[0018] Acquire multi-dimensional node feature data uploaded by distributed IoT nodes. These distributed IoT nodes are deployed at various stages of the commodity supply chain, including production, warehousing, logistics, and retail nodes. Production nodes are deployed at the end of the production line in the production workshop. After production and packaging, goods pass through these nodes, which automatically read product identification information and record production-related data. Warehousing nodes are deployed at warehouse entrances and exits and on various shelving areas. Goods pass through these nodes when entering and leaving the warehouse, and the nodes record data related to the storage location and duration. Logistics nodes are deployed on transport vehicles and in transit warehouses. Goods pass through these nodes during transportation, and the nodes record the transportation trajectory and related transportation environment data. Retail nodes are deployed in the checkout area of ​​retail stores. Goods pass through these nodes during sales, and the nodes record data related to the sales time and location.

[0019] Each node is configured with a data acquisition unit, a data processing unit, and a communication unit. The data acquisition unit includes a verification record acquisition subunit, a transmission status acquisition subunit, an environmental parameter acquisition subunit, and an online status acquisition subunit. The verification record acquisition subunit records the result of each anti-counterfeiting verification operation performed by the node, including two states: verification successful and verification failed. The transmission status acquisition subunit monitors the status parameters during the node's data transmission process, including whether each data transmission was successful, the data transmission delay, and packet loss. The environmental parameter acquisition subunit collects various parameters of the node's environment, including ambient temperature, ambient humidity, network signal strength, and power supply voltage. The online status acquisition subunit monitors the node's operating status, including whether the node is online, the duration of continuous online operation, and the time interval for data uploads.

[0020] The data processing unit includes a data standardization subunit, a data cleaning subunit, and a feature calculation subunit. The data standardization subunit converts data from different sources into a unified format and unit of measurement, ensuring data consistency for subsequent calculations. The data cleaning subunit performs outlier detection and processing on the raw data, removing outlier data points that significantly deviate from the normal range and using interpolation methods to supplement missing data. The feature calculation subunit calculates various feature indicators based on the cleaned raw data, including historical verification success rate, data transmission stability, environmental feature matching degree, and node activity coefficient.

[0021] The communication unit employs wireless communication, including a WiFi communication module, a Bluetooth communication module, and a mobile communication module. The communication unit establishes a data transmission link between the node and the distributed network, encapsulates preprocessed feature data into standard data frames according to a preset communication protocol, and uploads them to the distributed network through an encrypted channel. The communication unit monitors the data transmission status and automatically executes a retransmission mechanism when a transmission failure occurs, ensuring reliable data transmission.

[0022] The multi-dimensional node feature data reflects the node's operational status and trustworthiness, providing foundational data for subsequent trustworthiness assessment. This multi-dimensional feature data characterizes the node's trustworthiness attributes from multiple perspectives, avoiding the bias inherent in single-dimensional assessments. Historical verification success rate reflects the trustworthiness of the node's historical verification behavior; data transmission stability reflects the reliability of the node's data communication; environmental feature matching degree reflects the normality of the node's operating environment; and node activity reflects the normality of the node's operational status. These four dimensions of feature data complement each other, collectively forming a complete foundation for node trustworthiness assessment.

[0023] The dynamic trustworthiness of each IoT node is calculated based on the multi-dimensional node feature data. The dynamic trustworthiness reflects the node's trustworthiness at the current moment, ranging from 0 to 1. The trustworthiness calculation process combines multi-dimensional feature weighted fusion with a time decay mechanism. Node trustworthiness changes dynamically over time; newly added nodes have lower initial trustworthiness, which gradually increases as node operating time and verification records accumulate. When a node exhibits abnormal behavior, the feature values ​​of the corresponding dimension decrease, leading to a corresponding decrease in node trustworthiness. The dynamic trustworthiness of a node is calculated using the following formula: ; This represents the dynamic trustworthiness of the i-th IoT node, a dimensionless quantity ranging from 0 to 1. A trustworthiness value closer to 1 indicates higher trustworthiness, while a value closer to 0 indicates lower trustworthiness. A trustworthiness value above 0.8 indicates high trustworthiness, between 0.5 and 0.8 indicates medium trustworthiness, and below 0.5 indicates low trustworthiness. The system executes different verification strategies based on the trustworthiness value's range: high-trustworthiness nodes receive higher weighting, low-trustworthiness nodes receive lower weighting, and nodes with trustworthiness below a preset threshold trigger an anomaly warning mechanism.

[0024] The historical verification success rate represents the node's historical verification success rate. It is a dimensionless quantity, ranging from 0 to 1, and is determined by the ratio of the number of successful verifications in the node's historical verification records to the total number of verifications. Each time a node performs an anti-counterfeiting verification operation, the verification record collection subunit records the verification result, calculates the total number of successful verifications since the node joined the network, and divides this total by the total number of verification operations to obtain the historical verification success rate. The historical verification success rate increases when a node successfully verifies multiple times consecutively; it decreases when a node fails verification. The historical verification success rate reflects the overall credibility of a node's historical verification behavior and is a crucial fundamental indicator for evaluating node credibility.

[0025] This represents the stability of node data transmission. It is a dimensionless quantity, ranging from 0 to 1, and is determined based on the node's data transmission success rate and transmission delay fluctuation coefficient. The data transmission success rate is the ratio of the number of successful data transmissions to the total number of transmissions, reflecting the reliability of node data communication. The transmission delay fluctuation coefficient is the ratio of the standard deviation of transmission delay to the average transmission delay, reflecting the stability of node data transmission delay. A higher data transmission success rate and smaller transmission delay fluctuation result in higher data transmission stability; conversely, a lower success rate and larger transmission delay fluctuation result in lower data transmission stability. Data transmission stability reflects the quality of node data communication; nodes with poor communication quality are at risk of data tampering or forgery.

[0026] The environmental feature matching degree represents the node's environmental characteristic matching degree. It is a dimensionless quantity, ranging from 0 to 1, and is determined based on the degree of matching between the node's current environmental parameters and historical normal environmental parameters. Environmental parameters include ambient temperature, ambient humidity, network signal strength, and power supply voltage. Historical environmental parameters of the node under normal operating conditions are collected, establishing the normal value range for each environmental parameter. The cosine similarity between the current environmental parameter vector and the historical normal parameter vector is calculated to obtain the environmental feature matching degree. The closer the current environmental parameters are to the historical normal range, the higher the environmental feature matching degree; the greater the deviation of the current environmental parameters from the historical normal range, the lower the environmental feature matching degree. The environmental feature matching degree reflects whether the node's operating environment is normal; nodes with abnormal operating environments may be at risk of being attacked or tampered with.

[0027] This represents the node activity coefficient, a dimensionless quantity ranging from 0 to 1, determined based on the node's online duration and data upload frequency. Node online duration is the proportion of a node's online time to the total statistical time within the statistical period, reflecting the node's online status. Data upload frequency is the number of times a node uploads data within the statistical period, reflecting the node's data interaction activity level. The longer a node's online time and the more frequent its data uploads, the higher its activity value; conversely, the longer a node's offline time and the sparser its data uploads, the lower its activity value. Node activity reflects whether the node is operating normally; nodes with abnormally low activity may be malfunctioning or maliciously controlled.

[0028] , , , The weight coefficients of each feature term are dimensionless quantities, ranging from 0 to 1, and satisfying the following conditions: Each weight coefficient is configured based on the degree of influence of each feature on credibility in the actual application scenario. Nodes in the production stage can be configured with a higher weight for historical verification success rate, nodes in the logistics stage with a higher weight for data transmission stability, nodes in the warehousing stage with a higher weight for environmental feature matching, and nodes in the retail stage with a higher weight for node activity. The configuration of the weight coefficients reflects the emphasis of credibility assessment at different stages, making the credibility assessment results more consistent with actual application needs.

[0029] This represents the time decay coefficient, a dimensionless quantity ranging from 0.1 to 10, which controls the rate at which trustworthiness increases over time. A larger time decay coefficient results in faster trustworthiness growth, allowing new nodes to quickly establish trust. Conversely, a smaller time decay coefficient results in slower trustworthiness growth, requiring more time for new nodes to establish trust. The time decay coefficient is configured based on the system's trust policy for new nodes. Scenarios with high security requirements use a smaller time decay coefficient, requiring new nodes to undergo sufficient operational verification before acquiring high trustworthiness. Scenarios with moderate security requirements use a larger time decay coefficient, allowing new nodes to acquire trustworthiness more quickly.

[0030] This represents the normalized value of the node's cumulative runtime. It is a dimensionless quantity, ranging from 0 to 1, and is determined by the ratio of the node's actual cumulative runtime to the system's maximum reference runtime. The actual cumulative runtime is the total time the node has been in normal operation since joining the network. The system's maximum reference runtime is the preset reliability establishment reference period, typically set to 30 to 90 days. When the node's cumulative runtime reaches the maximum reference runtime, the normalized value is 1, and the time decay factor reaches its maximum value. The normalized value of the node's cumulative runtime maps nodes with different runtimes to a unified value range, ensuring that the reliability calculation benchmark for all nodes is consistent.

[0031] The numerator of the formula employs a linear weighted summation method, fusing the four core features according to their respective weight coefficients to reflect the different contributions of each dimension to credibility. The linear weighted summation method is computationally simple and has clear physical meaning; the contribution of each feature term to the final credibility is proportional to its corresponding weight coefficient. The configuration of the weight coefficients reflects the emphasis of trust assessment in different application scenarios: historical verification records at production nodes have a significant impact on credibility, corresponding to higher weight coefficients; data transmission status at logistics nodes has a significant impact on credibility, corresponding to higher weight coefficients; the operating environment at warehousing nodes has a significant impact on credibility, corresponding to higher weight coefficients; and the operating status at retail nodes has a significant impact on credibility, corresponding to higher weight coefficients.

[0032] The denominator is the sum of all weight coefficients, which normalizes the weighted result and ensures that the weighted sum always remains within the range of 0 to 1, meeting the reliability range requirements. Regardless of the weight coefficient configuration, the denominator is always the sum of all weight coefficients, and the weighted result divided by the weight sum always remains within the range of 0 to 1. Normalization eliminates the influence of weight coefficient configuration on the numerical range, making reliability results under different weight configurations comparable. When different nodes use different weight configurations, the calculated reliability values ​​can still be directly compared, ensuring the consistency of the reliability assessment system.

[0033] The latter part of the formula introduces an exponential decay function to reflect the objective law of trust accumulation over time. Newly added nodes to the network have low initial trust due to insufficient historical data. As the node's operating time increases and verification records accumulate, the trust value gradually approaches the result of weighted fusion. The choice of the exponential function ensures that the trust growth process is smooth and has an upper limit, avoiding the numerical overflow problem that may occur with linear growth. The exponential function has the characteristics of monotonically increasing and bounded, and the trust gradually approaches its maximum value over time, with the growth rate gradually slowing down, which conforms to the objective law of trust establishment.

[0034] The time decay coefficient controls the rate at which credibility increases. A larger coefficient value results in a faster exponential growth of credibility, while a smaller coefficient value leads to a slower growth of credibility. The configuration of the time decay coefficient reflects the system's security strategy. High-security scenarios require new nodes to undergo thorough verification, thus requiring a smaller decay coefficient; general security scenarios allow new nodes to quickly establish trust, thus requiring a larger decay coefficient. The normalized value of the node's cumulative runtime maps nodes with different runtimes to a unified value range, ensuring a consistent credibility calculation benchmark for all nodes. Nodes with runtimes less than the reference duration have a normalized value less than 1, and their credibility is multiplied by a time decay factor less than 1; nodes with runtimes reaching the reference duration have a normalized value equal to 1, and their credibility reaches its maximum value. All parameters are dimensionless, with uniform dimensions for addition and subtraction operations, and multiplication and division operations conforming to mathematical operation rules, satisfying the principle of dimensional homogeneity.

[0035] The system records the timestamp and geographic location information of each product as it passes through each node, generating transmission time difference and geographic distance data between adjacent nodes. Each time a product passes through a node, the node automatically triggers a data recording operation, reading the current system time as the timestamp and obtaining the current geographic location information through the positioning module. High-precision clock sources are used for timestamp recording to ensure accuracy. The positioning module employs a combination of satellite positioning and base station positioning. Satellite positioning is used in areas with good satellite signals, while base station positioning is used in areas with weak satellite signals, ensuring both positioning success rate and accuracy.

[0036] The timestamp data uses a unified time base to ensure consistency of time data across all nodes. All nodes periodically synchronize with the network time server to correct for deviations in their local clocks, ensuring a unified time base across all nodes. The timestamp data uses Coordinated Universal Time (UTC) as the base, avoiding time inconsistencies caused by time zone differences. The timestamp accuracy reaches the millisecond level, accurately recording the moment a product passes through a node, providing a precise time base for subsequent calculations of transmission time differences.

[0037] The geographic location information includes longitude and latitude coordinates, using the WGS84 coordinate system. The accuracy of the geographic location information reaches the meter level, enabling accurate determination of the node's geographical location. Each node periodically reports its own geographic location information, and the system establishes a node geographic location information database, storing the longitude and latitude coordinates of all nodes. When a product passes through a node, the node associates its own geographic location information with the product flow record, forming spatial trajectory data of the product flow.

[0038] The transmission time difference between adjacent nodes is calculated based on the difference between the timestamp of a product leaving a preceding node and the timestamp of its arrival at the current node. When a product leaves a preceding node, the preceding node records the departure timestamp; when a product arrives at the current node, the current node records the arrival timestamp. The difference between these two timestamps is the transmission time difference between the two nodes. This transmission time difference reflects the actual time it takes for a product to travel from one node to another and is an important parameter for evaluating the spatiotemporal consistency of product flow.

[0039] The geographical distance data between adjacent nodes is calculated using the spherical distance formula based on the geographical coordinates of the preceding and current nodes. The shortest distance between two points on the Earth's surface is the spherical distance, calculated using the semi-versus formula based on the latitude and longitude coordinates of the two points. The spherical distance calculation takes into account the influence of the Earth's curvature, and the result is the actual surface distance between the two points. Geographical distance data reflects the spatial distance between two nodes and is a fundamental parameter for calculating theoretical transmission time.

[0040] The spatiotemporal coupling degree of each flow path is calculated based on the transmission time difference and the geographical distance data. The spatiotemporal coupling degree reflects the consistency between temporal and spatial data during the commodity flow process, and its value ranges from 0 to 1. Commodities flow from one node to another, requiring a certain transportation time, and there is a correlation between transportation time and spatial distance. The smaller the deviation between the actual and theoretical transmission time, the better the consistency of the spatiotemporal data; the larger the deviation, the greater the possibility of anomalies in the spatiotemporal data. The coupling degree calculation is achieved by comparing the relative error between the actual and theoretical transmission times. The spatiotemporal coupling degree is calculated using the following formula: ; This represents the spatiotemporal coupling degree, a dimensionless quantity ranging from 0 to 1. A coupling degree closer to 1 indicates better spatiotemporal data consistency, while a value closer to 0 indicates poorer consistency. A coupling degree of 0.8 or higher indicates high spatiotemporal consistency, 0.5 to 0.8 indicates medium consistency, and a coupling degree below 0.5 indicates low consistency. When the spatiotemporal coupling degree falls below a preset threshold, the system triggers a spatiotemporal anomaly warning, indicating an anomaly in the spatiotemporal data of that flow path.

[0041] This represents the actual data transmission time difference between adjacent nodes, measured in seconds. It is determined by the difference between the timestamp of a product leaving its predecessor node and the timestamp of its arrival at the current node. The actual transmission time difference reflects the actual time it takes for a product to travel from one node to another, including various time consumptions during transportation. It is directly calculated from the timestamp records of the two nodes and is an objective record of the product's flow.

[0042] This represents the straight-line geographical distance between adjacent nodes, measured in meters (length). It is calculated based on the geographical coordinates of the preceding and current nodes. The straight-line geographical distance is the shortest distance between two nodes on the Earth's surface, without considering the twists and turns of actual transportation routes. Geographical distance is calculated using the spherical distance formula based on the latitude and longitude coordinates of the nodes, and is an objective measure of the spatial distance between two nodes.

[0043] This represents the theoretical maximum data transmission speed in the Internet of Things (IoT), measured in meters per second (m / s), and is determined based on the theoretical transmission rate of the IoT communication protocol. Different wireless communication protocols have different theoretical maximum transmission rates; WiFi has a relatively high theoretical maximum transmission rate, Bluetooth has a medium theoretical maximum transmission rate, and mobile communication's theoretical maximum transmission rate varies depending on the network standard. The theoretical maximum data transmission speed in the IoT reflects the limit rate at which data can be transmitted within the network and is a benchmark parameter for calculating theoretical transmission time.

[0044] This represents the transmission delay tolerance coefficient, a dimensionless quantity ranging from 0.1 to 10, adapting to normal transmission fluctuations under different network environments. Normal delay fluctuations exist in network environments; a certain deviation between the actual and theoretical transmission times is normal. The transmission delay tolerance coefficient controls the tolerance range of these normal fluctuations; a larger coefficient allows for a wider tolerance range, and a smaller coefficient allows for a smaller tolerance range. The transmission delay tolerance coefficient is configured based on the actual network environment; a larger tolerance coefficient is configured for scenarios with poor network conditions, and a smaller tolerance coefficient is configured for scenarios with good network conditions.

[0045] The core idea of ​​the formula is to quantify the relative error between the actual transmission time and the theoretical transmission time, and to assess the consistency of the spatiotemporal data of commodity circulation. Divide by The theoretical transmission time is calculated as length divided by length divided by time, and the result is in the dimension of time. This is the difference between the theoretical transmission time and the actual transmission time. The dimensions are kept consistent, satisfying the requirement of dimensional homogeneity. The theoretical transmission time is the ideal shortest time for goods to be transferred from one node to another, without considering various delays in intermediate links. The deviation between the actual transmission time and the theoretical transmission time reflects the degree of anomaly in the spatiotemporal data; the larger the deviation, the more likely there are problems with the spatiotemporal data.

[0046] The numerator uses absolute value calculations to determine the difference between the actual and theoretical transmission times, reflecting the degree of inconsistency in the spatiotemporal data. Absolute value calculations ensure that the difference is always non-negative, preventing positive and negative values ​​from canceling each other out and affecting the calculation results. Whether the actual transmission time is greater or less than the theoretical transmission time, it is reflected as a positive deviation value, and the magnitude of the deviation directly reflects the degree of inconsistency. Absolute value calculations eliminate the influence of the deviation direction, focusing only on the magnitude of the deviation.

[0047] The denominator part adopts Multiply Divide by Plus Combinations, rather than simple ones Theoretical transmission time for short-distance transmission Divide by The value is very small; if we directly use... Using it as the denominator can lead to excessively large fractional values ​​and poor numerical stability. In short-distance scenarios, the theoretical transmission time is very small, and even a small absolute deviation can result in a large relative deviation, easily leading to misjudgments. Therefore, [the following is introduced...] Multiply Divide by After each term, the denominator always remains positive and never too small, ensuring stable calculation results. The combination of denominators ensures consistency in the calculation of relative deviations at different distances, avoiding numerical instability issues in short-distance scenarios.

[0048] Transmission delay tolerance coefficient To adapt to normal transmission fluctuations in different network environments, a larger tolerance coefficient can be configured for scenarios with poor network conditions, while a smaller tolerance coefficient can be configured for scenarios with good network conditions. The transmission delay tolerance coefficient reflects the system's tolerance for normal network fluctuations; a larger coefficient indicates a higher tolerance for delay fluctuations and a lower likelihood of being identified as anomalies. The configuration of the transmission delay tolerance coefficient needs to balance the sensitivity of anomaly detection with the false alarm rate. A coefficient that is too small will lead to an increased false alarm rate, while a coefficient that is too large will lead to a decreased detection sensitivity.

[0049] The fraction represents the relative error of the spatiotemporal data, and the spatiotemporal feature coupling degree is obtained by subtracting this relative error from 1. The relative error is the ratio of the deviation value to the reference value, reflecting the relative magnitude of the deviation. Subtracting the relative error from 1 yields the coupling degree; a higher coupling degree indicates a smaller relative error and better spatiotemporal consistency. The coupling degree ranges from 0 to 1; a coupling degree closer to 1 indicates better spatiotemporal consistency and higher data reliability; a lower coupling degree indicates a greater possibility of spatiotemporal data anomalies. This formula, through dimensionless processing, achieves comparability of spatiotemporal consistency across different distances and transmission speeds. All operations satisfy the principle of dimensional homogeneity; the dimensions of addition and subtraction operations are unified, and the dimensional combination is correct in division operations.

[0050] The chain-based anti-counterfeiting confidence score of the current node is calculated by fusing the dynamic credibility and spatiotemporal coupling degree of the preceding nodes along the product traceability chain. This chain-based anti-counterfeiting confidence score reflects the overall credibility of the product at the current node, with a value ranging from 0 to 1. The product traceability chain contains multiple nodes, each with corresponding credibility and coupling degree. The credibility of the product is a comprehensive reflection of the verification results of all nodes in the entire chain. The verification results of the preceding nodes are relevant to the current node. High credibility and good coupling degree of the preceding node indicate that the product was credible in the preceding circulation process, and the confidence score of the current node increases accordingly. Low credibility or poor coupling degree of the preceding node indicates that there are doubts about the product in the preceding circulation process, and the confidence score of the current node decreases accordingly. The confidence score calculation process uses a dual verification and cross-reinforcement method between preceding and following nodes to achieve the accumulation and transmission of trust values ​​along the traceability chain. The chain-based anti-counterfeiting confidence score is calculated using the following formula:

[0051] This represents the current node's anti-counterfeiting confidence level. It is a dimensionless quantity, ranging from 0 to 1. A confidence level closer to 1 indicates a higher level of product credibility, while a value closer to 0 indicates a greater likelihood of counterfeiting. A confidence level of 0.8 or higher indicates a high level of product credibility, 0.5 to 0.8 indicates a medium level of product credibility, and a confidence level below 0.5 indicates a high risk of counterfeiting. The system provides users with different levels of anti-counterfeiting verification conclusions based on the confidence level: high-confidence products show "verification passed," medium-confidence products show a prompt message, and low-confidence products show a risk warning.

[0052] This represents the dynamic credibility of the preceding node. It is a dimensionless quantity, ranging from 0 to 1, and is calculated based on the multi-dimensional feature data of the preceding node. The preceding node is the node before the current node in the product traceability chain, and the credibility of the preceding node reflects the credibility of the previous node. A high credibility of the preceding node indicates that the verification result of the previous node is highly credible; a low credibility of the preceding node indicates that the verification result of the previous node is low.

[0053] This represents the spatiotemporal coupling degree of the preceding node. It is a dimensionless quantity, ranging from 0 to 1, and is calculated based on the spatiotemporal data of the preceding node and the next preceding node. The spatiotemporal coupling degree of the preceding node reflects the degree of spatiotemporal consistency when the product arrives at the preceding node. A high preceding node coupling degree indicates good spatiotemporal data consistency when the product arrives at the preceding node; a low preceding node coupling degree indicates anomalies in the spatiotemporal data when the product arrives at the preceding node.

[0054] This represents the dynamic credibility of the current node. It is a dimensionless quantity, ranging from 0 to 1, and is calculated based on the multi-dimensional feature data of the current node. The credibility of the current node reflects the credibility level of the node to which the product is currently located. A high credibility of the current node indicates that the verification result of the current node is highly credible; a low credibility of the current node indicates that the verification result of the current node is low.

[0055] This represents the spatiotemporal coupling degree of the current node. It is a dimensionless quantity, ranging from 0 to 1, and is calculated based on the spatiotemporal data of the current node and its predecessor nodes. The spatiotemporal coupling degree of the current node reflects the degree of spatiotemporal consistency of goods flowing from previous nodes to the current node. A high coupling degree indicates good consistency in the spatiotemporal data of goods flowing to the current node; a low coupling degree indicates anomalies in the spatiotemporal data of goods flowing to the current node.

[0056] This represents the chain propagation weighting coefficient, a dimensionless quantity ranging from 0 to 1, which adjusts the relative influence of the preceding and current nodes on the confidence score. The chain propagation weighting coefficient controls the weight of the preceding node's verification result in the current confidence score calculation. A larger weighting coefficient indicates a greater influence of the preceding node and a stronger cumulative effect of historical verification results; conversely, a smaller weighting coefficient indicates a greater influence of the current node and a stronger dominant role of the latest verification result. In scenarios with long traceability chains, a larger weighting of the preceding node can be configured to reflect the cumulative effect of historical verification results; in scenarios with short traceability chains, a larger weighting of the current node can be configured to reflect the dominant role of the latest verification result.

[0057] The first term of the formula is Multiply Multiply This reflects the contribution of the previous node's verification result to the current node's confidence level. The dynamic confidence level of the previous node is multiplied by its spatiotemporal coupling degree to obtain the comprehensive verification result of the previous node. This result is then multiplied by the chain propagation weighting coefficient, reflecting the degree of influence of the previous node on the current node. When both the previous node's confidence level and coupling degree are high, this value is large, indicating a significant positive contribution to the current confidence level; conversely, when the previous node's confidence level or coupling degree is low, this value is small, indicating a smaller positive contribution to the current confidence level.

[0058] The second item is Multiply Multiply This reflects the contribution of the current node's own verification results. The current node's dynamic confidence level is multiplied by its spatiotemporal coupling degree to obtain the current node's comprehensive verification result. This result is then multiplied by the remaining weight coefficient, reflecting the current node's own influence. When both the current node's confidence level and coupling degree are high, this value is large, indicating a significant positive contribution to the current confidence level; conversely, when the current node's confidence level or coupling degree is low, this value is small, indicating a smaller positive contribution to the current confidence level.

[0059] The first two items are weighted averages, through Adjust the influence weight of the preceding node and the current node. The sum of the two weight coefficients is 1 to ensure the rationality of the weighted average. The weight coefficient allocation reflects the relative importance of historical verification results and the latest verification results, and is configured according to the length of the traceability chain and the application scenario. When the traceability chain is long, there are more accumulated historical verification results, so the weight of the preceding node should be appropriately increased; when the traceability chain is short, there are fewer historical verification results, so the weight of the current node should be appropriately increased.

[0060] The third term is the square root of the product of the four parameters, representing the geometric mean. The four parameters are the dynamic credibility of the preceding node, the spatiotemporal coupling degree of the preceding node, the dynamic credibility of the current node, and the spatiotemporal coupling degree of the current node. The geometric mean is obtained by multiplying these four parameters and taking the square root. This term reflects the cross-reinforcement effect of the validation results of the preceding and following nodes. The geometric mean only increases significantly when both the credibility and coupling degree of the preceding and following nodes are at high levels; if any one parameter is low, the geometric mean will be significantly suppressed. This design achieves a nonlinear transmission effect of high reinforcement and low weakening, an effect that simple linear weighting cannot achieve.

[0061] The geometric mean's characteristic lies in the fact that when multiple values ​​are multiplied and the square root is taken, any small value will significantly lower the final result. When all four parameters of the preceding and following nodes are high, the geometric mean approaches the average of the parameters; when any parameter is close to 0, the geometric mean also approaches 0. This property ensures that a high cross-reinforcement term can only be obtained when all nodes in the entire chain are trustworthy and have good spatiotemporal consistency, effectively preventing a problem where a few high-trust nodes mask the problem of other nodes. The geometric mean calculation ensures that this term is always non-negative and that its value range is consistent with the first two terms. The sum of the three terms yields the final chain-based anti-counterfeiting confidence score. All operations satisfy the requirement of dimensional homogeneity.

[0062] Obtain the node behavior characteristic deviation and data integrity verification value. The node behavior characteristic deviation reflects the degree of difference between the node's current behavior pattern and its historical normal behavior pattern, with a value ranging from 0 to 1. Nodes develop relatively stable behavior patterns over long-term operation, including the timing of data uploads, the frequency of verification requests, and the pattern characteristics of data transmission. When node behavior becomes abnormal, the current behavior pattern differs from the historical normal pattern. The deviation is calculated by comparing the differences between the node's current data upload frequency, verification request frequency, and data transmission pattern and historical statistical patterns.

[0063] Establish a database of historical node behavior patterns, and statistically analyze the various behavioral indicators of nodes under normal operating conditions, including the mean and variance of data upload frequency, the mean and variance of verification request frequency, and the characteristic distribution of data transmission patterns. Collect various behavioral indicators of nodes in the current time period, calculate the deviation between the current indicators and historical statistical characteristics, and combine the various deviations to obtain the behavioral characteristic deviation degree. The larger the deviation degree value, the greater the difference between the node's current behavior and the normal behavior pattern, and the higher the probability of abnormal behavior; the smaller the deviation degree value, the closer the node's current behavior is to the normal behavior pattern, and the lower the probability of abnormal behavior.

[0064] The data integrity check value reflects the integrity of the data uploaded by the node, and its value ranges from 0 to 1. Data may be damaged or tampered with during transmission and storage. The data integrity check verifies whether the data remains intact and unaltered. Integrity check is determined by performing a hash check on the data uploaded by the node and comparing the calculated hash value with the hash value attached to the node.

[0065] When a node uploads data, it performs a hash operation on the original data to generate a hash value, which is then uploaded along with the original data. The receiving end performs the same hash operation on the received original data and compares the calculated hash value with the received hash value. If the hash values ​​match, it indicates that the data is intact and has not been tampered with, resulting in a high data integrity check value; if the hash values ​​do not match, it indicates that the data has been corrupted or tampered with during transmission, resulting in a lower data integrity check value. The hash algorithm is one-way and collision-resistant, effectively detecting data integrity.

[0066] A comprehensive anomaly risk value is calculated based on the chain-like anti-counterfeiting confidence level, the behavioral characteristic deviation, and the data integrity verification value. The comprehensive anomaly risk value reflects the degree of counterfeiting risk of the product, ranging from 0 to 1. The anti-counterfeiting confidence level reflects the product's credibility based on node credibility and spatiotemporal consistency; the behavioral characteristic deviation reflects whether node behavior is normal; and the data integrity verification value reflects whether the data is complete and has not been tampered with. These three dimensions of indicators assess the anti-counterfeiting risk of the product from different perspectives, and a comprehensive consideration yields the final risk assessment result. The risk value calculation process uses a non-linear risk amplification method based on the confidence level. The comprehensive anomaly risk prediction is calculated using the following formula:

[0067] This represents the overall anomaly risk value, a dimensionless quantity ranging from 0 to 1. A risk value closer to 1 indicates a higher probability of counterfeit risk, while a value closer to 0 indicates a lower probability. A risk value below 0.2 indicates a low level of risk, a value between 0.2 and 0.5 indicates a medium level of risk, and a value above 0.5 indicates a high risk of counterfeiting. The system implements different risk handling strategies based on the risk value: low-risk products pass verification normally, medium-risk products trigger manual review, and high-risk products are directly identified as having counterfeit risk.

[0068] This represents the chain-like anti-counterfeiting confidence level, a dimensionless quantity ranging from 0 to 1, calculated by integrating the confidence and coupling of preceding and following nodes. Chain-like anti-counterfeiting confidence level is the foundation of risk assessment; the higher the confidence level, the lower the basic risk of the product; conversely, the lower the confidence level, the higher the basic risk of the product.

[0069] This represents the deviation degree of node behavior characteristics. It is a dimensionless quantity, ranging from 0 to 1, and is determined based on the degree of difference between the node's current behavior pattern and its historical normal behavior pattern. The deviation degree reflects whether the node's behavior is abnormal. The higher the deviation degree, the greater the possibility of abnormal node behavior and the higher the corresponding risk; the lower the deviation degree, the more normal the node behavior and the lower the corresponding risk.

[0070] This represents the data integrity check value. It is a dimensionless quantity, ranging from 0 to 1, and is determined based on the hash verification result of the data uploaded by the node. The data integrity check value reflects whether the data is complete and has not been tampered with. The higher the check value, the better the data integrity and the lower the corresponding risk; the lower the check value, the worse the data integrity and the higher the corresponding risk.

[0071] The risk amplification index is a dimensionless quantity ranging from 1 to 3. It achieves non-linear risk amplification through exponential calculation. The risk amplification index controls the sensitivity to anomalies; a larger index means greater sensitivity to anomalies, with even minor anomalies leading to a significant increase in risk. Conversely, a smaller index means less sensitivity to anomalies, requiring more significant anomalies to cause an increase in risk. Scenarios with high security requirements should use a larger risk amplification index to improve anomaly detection sensitivity; scenarios with moderate security requirements should use a smaller risk amplification index to reduce false alarm rates.

[0072] add The average of behavioral deviation and data integrity is calculated by dividing by 2, reflecting the degree of abnormality in the node's operational status. Both the deviation and checksum range from 0 to 1, and the average obtained by adding them together and dividing by 2 also ranges from 0 to 1. The closer the average is to 1, the higher the degree of abnormality in the node's operational status; the closer the average is to 0, the more normal the node's operational status. The averaging method comprehensively considers the impact of both behavioral and data anomalies. An anomaly in either dimension will cause the average to rise; when both dimensions are normal, the average remains at a low level.

[0073] Subtracting this average value from 1 yields the normality coefficient. A higher coefficient indicates a more normal node operation, while a lower coefficient indicates a more abnormal node operation. The normality coefficient ranges from 0 to 1; a coefficient closer to 1 indicates a better node operation, and a coefficient closer to 0 indicates a worse node operation. The normality coefficient directly reflects the current health status of the node.

[0074] Normality coefficient Exponential operations achieve non-linear amplification of risk. The effect of exponential operations is that when a node's operating state exhibits slight anomalies (the normality coefficient is slightly less than 1), the value is significantly reduced after exponential amplification, corresponding to a significant increase in risk. When the operating state is normal, the normality coefficient is close to 1, and exponential operations have no significant impact. Risk Amplification Index The amplification level is controlled; a larger exponent value results in a more pronounced amplification of anomalies, while a smaller exponent value results in a more gradual amplification. Exponential calculations enable sensitive detection of anomalies, allowing even minor anomalies to be detected promptly.

[0075] Chain-based anti-counterfeiting confidence The result of multiplying by the exponent represents the overall normality of the system after considering the node's operational status, based on the current anti-counterfeiting confidence level. Higher confidence levels result in a higher overall normality, and lower confidence levels result in a lower overall normality. When a node's operational status is abnormal, even with a high base confidence level, the overall normality will significantly decrease; when the node's operational status is normal, the overall normality will approach the base confidence level.

[0076] Subtracting this value from 1 yields the comprehensive abnormal risk value. The value ranges from 0 to 1, with a higher risk value indicating a higher probability of counterfeit risk. The comprehensive anomaly risk value considers three dimensions: product anti-counterfeiting confidence, abnormal node behavior, and data integrity, to comprehensively assess the product's counterfeit risk. All parameters in this formula are dimensionless, and addition, subtraction, multiplication, division, and exponentiation operations all satisfy the principle of homogeneity of dimensions.

[0077] The dynamic credibility, spatiotemporal feature coupling degree, chain-like anti-counterfeiting confidence degree, and comprehensive anomaly risk value are verified through multi-node consensus in a distributed network to generate anti-counterfeiting traceability verification results. The distributed network contains multiple independent verification nodes, each performing verification calculations independently. The distributed network adopts a peer-to-peer architecture, where all nodes are equal and there is no central control node. Each verification node independently stores complete verification data and independently performs verification calculations.

[0078] The consensus verification process broadcasts the computation results to all verification nodes. Each verification node, upon receiving the broadcast result, independently performs the same verification computation based on its locally stored original data and compares its local computation result with the broadcast result. Verification nodes that match return a successful verification result, while those that do not match return a failed verification result.

[0079] The system receives verification results from each verification node and counts the number of nodes that pass verification. When the number of nodes that pass verification reaches a consensus threshold, the verification result is considered valid. This consensus threshold is determined based on the total number of verification nodes in the distributed network, typically set to more than half of the nodes. The result verified by a majority of verification nodes is taken as the final verification conclusion. Distributed consensus verification avoids the security risks of single-node verification, ensuring the objectivity and reliability of the verification results. Attacks or tampering with a single node will not affect the overall verification result; only simultaneous attacks on a majority of nodes can tamper with the verification result, significantly increasing the cost and difficulty of attacks.

[0080] The multi-dimensional node feature data includes historical verification success rate, data transmission stability, environmental feature matching degree, and node activity. Weight coefficients are configured for each of these factors. The weight coefficients are configured based on the importance of each feature to the credibility assessment; features with higher importance correspond to larger weight coefficients, and features with lower importance correspond to smaller weight coefficients. The weight coefficients are normalized to ensure that the sum of the weight coefficients is 1. Normalization ensures that the weight configuration does not affect the final credibility value range, guaranteeing the comparability of credibility results under different weight configurations. A time decay coefficient and a normalized value of the node's cumulative running time are introduced for calculation. The time decay coefficient controls the rate at which credibility increases over time, and the normalized value of the node's cumulative running time maps nodes with different running times to a unified interval.

[0081] Obtain the theoretical maximum transmission speed of IoT data. The theoretical maximum transmission speed of IoT data is determined based on the theoretical transmission rate of the adopted wireless communication protocol; different communication protocols correspond to different theoretical maximum transmission speeds. WiFi communication protocols have a relatively high theoretical maximum transmission rate, Bluetooth communication protocols have a medium theoretical maximum transmission rate, and mobile communication protocols have varying theoretical maximum transmission rates depending on the network standard. Calculate the theoretical transmission time between adjacent nodes based on the geographical distance data and the theoretical maximum transmission speed of the IoT data. The theoretical transmission time equals the geographical distance data divided by the theoretical maximum transmission speed. Calculate the absolute value of the difference between the actual transmission time difference and the theoretical transmission time. The absolute value of the difference reflects the degree of deviation between the actual and theoretical transmission times. Introduce a transmission delay tolerance coefficient for calculation. The transmission delay tolerance coefficient adapts to normal transmission fluctuations under different network environments.

[0082] Configure the chain-like transmission weight coefficient. This coefficient adjusts the relative importance of the preceding and current nodes on the confidence score. Calculate the first product of the preceding node's dynamic confidence score and its spatiotemporal coupling degree. This first product reflects the comprehensive verification result of the preceding node. Calculate the second product of the current node's dynamic confidence score and its spatiotemporal coupling degree. This second product reflects the comprehensive verification result of the current node. Calculate the geometric mean of the preceding node's dynamic confidence score, its spatiotemporal coupling degree, the current node's dynamic confidence score, and its spatiotemporal coupling degree. This geometric mean reflects the cross-reinforcement effect of the verification results of the preceding and following nodes. Weight and fuse the first product, the second product, and the geometric mean according to the chain-like transmission weight coefficient. The weighted fusion yields the final chain-like anti-counterfeiting confidence score.

[0083] Calculate the average of the behavioral characteristic deviation and the data integrity verification value. The average reflects the overall degree of abnormality in the node's operating status. Calculate the abnormality coefficient based on the average. The abnormality coefficient equals 1 minus the average, reflecting the normality of the node's operating status. Configure a risk amplification index. The risk amplification index controls the degree of amplification of abnormalities. It is calculated based on the chain-based anti-counterfeiting confidence level, the abnormality coefficient, and the risk amplification index. Calculate the comprehensive abnormal risk value.

[0084] The computation results are broadcast to all verification nodes in the distributed network. Each verification node independently receives the broadcast computation results. Each verification node independently verifies the received computation results and returns its own verification result. The number of nodes that pass verification is counted. The total number of nodes that return a passing verification result is counted. A consensus threshold is configured. The consensus threshold is determined based on the total number of verification nodes in the distributed network, typically set to more than half of the nodes. When the number of nodes that pass verification reaches the consensus threshold, the verification result is considered valid. The result of a majority of verification nodes passing the verification is taken as the final verification conclusion.

[0085] All data uploaded by nodes is hash-encrypted. The hash encryption uses the SHA-256 algorithm, which performs hash operations on all uploaded data to generate a fixed-length hash value. The SHA-256 algorithm has strong collision resistance and one-wayness, effectively protecting data integrity. The encrypted data is then stored in a distributed ledger. The distributed ledger uses blockchain technology, with each node maintaining a complete copy of the ledger, and data writing requires consensus confirmation. Blockchain technology ensures that data cannot be tampered with once written, and all modification operations leave a traceable record. When a user queries, verification data is retrieved from the distributed ledger. When a user initiates a query request, the system reads all verification data for the corresponding product from the distributed ledger. A verification report is output to the user, including dynamic credibility, spatiotemporal feature coupling, chain-based anti-counterfeiting confidence, and a comprehensive anomaly risk value. The verification report presents the verification results in a structured format, providing users with comprehensive anti-counterfeiting information.

[0086] The historical verification success rate is determined based on the ratio of the number of successful verifications in the node's historical verification records to the total number of verifications. Each time a node performs an anti-counterfeiting verification operation, it records the verification result, calculates the number of successful verifications across all historical verification operations, and divides this number by the total number of verifications to obtain the historical verification success rate. The data transmission stability is determined based on the node's data transmission success rate and transmission delay fluctuation coefficient. The data transmission success rate is the ratio of the number of successful data transmissions to the total number of transmissions, and the transmission delay fluctuation coefficient is the ratio of the standard deviation of transmission delay to the average transmission delay. These two factors are weighted and fused to obtain the data transmission stability. The environmental feature matching degree is determined based on the degree of matching between the node's current environmental parameters and historical normal environmental parameters. Environmental parameters include temperature, humidity, and network signal strength. The cosine similarity between the current parameter vector and the historical normal parameter vector is calculated to obtain the environmental feature matching degree. The node activity level is determined based on the node's online duration and data upload frequency. The node's online duration is the proportion of the node's online time to the total time within the statistical period, and the data upload frequency is the number of times the node uploads data within the statistical period. These two factors are weighted and fused to obtain the node activity level.

[0087] The system includes a node credibility assessment module, a spatiotemporal feature coupling verification module, a chain-based anti-counterfeiting confidence calculation module, an anomaly risk comprehensive prediction module, and a distributed consensus verification module. The node credibility assessment module is electrically connected to the chain-based anti-counterfeiting confidence calculation module. The node credibility assessment module acquires multi-dimensional node feature data uploaded by distributed IoT nodes. The node credibility assessment module calculates the dynamic credibility of each IoT node based on the multi-dimensional node feature data. The spatiotemporal feature coupling verification module is electrically connected to the chain-based anti-counterfeiting confidence calculation module. The spatiotemporal feature coupling verification module records the timestamp data and geographical location information of the product when it passes through each node. The spatiotemporal feature coupling verification module generates transmission time difference and geographical distance data between adjacent nodes. The spatiotemporal feature coupling verification module calculates the spatiotemporal feature coupling degree of each flow path based on the transmission time difference and geographical distance data. The chain-based anti-counterfeiting confidence calculation module is electrically connected to the anomaly risk comprehensive prediction module. The chain-based anti-counterfeiting confidence calculation module fuses the dynamic credibility and spatiotemporal feature coupling degree of the preceding node with the dynamic credibility and spatiotemporal feature coupling degree of the current node along the product traceability chain. The chain-based anti-counterfeiting confidence calculation module obtains the chain-based anti-counterfeiting confidence degree of the current node. The anomaly risk comprehensive prediction module is electrically connected to the distributed consensus verification module. The anomaly risk comprehensive prediction module obtains the node behavior feature deviation degree and data integrity verification value. The anomaly risk comprehensive prediction module calculates a comprehensive anomaly risk value based on the chain-based anti-counterfeiting confidence degree, the behavior feature deviation degree, and the data integrity verification value. The distributed consensus verification module performs multi-node consensus verification of the dynamic credibility degree, the spatiotemporal feature coupling degree, the chain-based anti-counterfeiting confidence degree, and the comprehensive anomaly risk value in a distributed network. The distributed consensus verification module generates an anti-counterfeiting traceability verification result.

[0088] It also includes a data encryption and storage module and a user query output module. The data encryption and storage module is electrically connected to the node credibility assessment module, the spatiotemporal feature coupling verification module, the chain-based anti-counterfeiting confidence calculation module, and the anomaly risk comprehensive prediction module. The data encryption and storage module performs hash encryption processing on all data uploaded by nodes. The encrypted data is stored in the distributed ledger. The user query output module is electrically connected to the distributed consensus verification module and the data encryption and storage module. When a user queries, the user query output module extracts verification data from the distributed ledger. The user query output module outputs a verification report to the user, including dynamic credibility, spatiotemporal feature coupling degree, chain-based anti-counterfeiting confidence, and a comprehensive anomaly risk value.

[0089] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention in any other way. Any person skilled in the art may make changes or modifications to the above-disclosed technical content to create equivalent embodiments that can be applied to other fields. However, any simple modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the protection scope of the present invention.

Claims

1. A distributed product anti-counterfeiting and traceability method based on the Internet of Things, characterized in that, include: S1: Obtain multi-dimensional node feature data uploaded by distributed IoT nodes; S2: Calculate the dynamic reliability of each IoT node based on the multi-dimensional node feature data; S3: Records the timestamp data and geographical location information of the goods when they pass through each node, and generates the transmission time difference and geographical distance data between adjacent nodes; S4: Calculate the spatiotemporal coupling degree of each flow path based on the transmission time difference and the geographical distance data; S5: Along the product traceability chain, the dynamic credibility and spatiotemporal feature coupling degree of the previous node are fused with the dynamic credibility and spatiotemporal feature coupling degree of the current node to obtain the chain-like anti-counterfeiting confidence degree of the current node. S6: Obtain the deviation of node behavior characteristics and data integrity verification value; S7: Calculate the comprehensive anomaly risk value based on the chain-like anti-counterfeiting confidence level, the behavioral feature deviation degree, and the data integrity verification value; S8: Perform multi-node consensus verification of the dynamic credibility, the spatiotemporal feature coupling degree, the chain-like anti-counterfeiting confidence degree, and the comprehensive anomaly risk value in a distributed network to generate anti-counterfeiting traceability verification results.

2. The distributed anti-counterfeiting and traceability method for goods based on the Internet of Things according to claim 1, characterized in that, The multi-dimensional node feature data includes historical verification success rate, data transmission stability, environmental feature matching degree, and node activity. The calculation of the dynamic credibility of each IoT node based on the multi-dimensional node feature data includes: configuring weight coefficients for the historical verification success rate, data transmission stability, environmental feature matching degree, and node activity respectively; normalizing the weight coefficients; and introducing a time decay coefficient and a normalized value of the node's cumulative running time for calculation.

3. The distributed anti-counterfeiting and traceability method for goods based on the Internet of Things according to claim 1, characterized in that, The calculation of the spatiotemporal coupling degree of each flow path based on the transmission time difference and the geographical distance data includes: obtaining the theoretical maximum transmission speed of IoT data; calculating the theoretical transmission time between adjacent nodes based on the geographical distance data and the theoretical maximum transmission speed of IoT data; calculating the absolute value of the difference between the transmission time difference and the theoretical transmission time; and introducing a transmission delay tolerance coefficient for calculation.

4. The distributed anti-counterfeiting and traceability method for goods based on the Internet of Things according to claim 1, characterized in that, The process of fusing the dynamic credibility and spatiotemporal coupling degree of the preceding node with the dynamic credibility and spatiotemporal coupling degree of the current node along the product traceability chain includes: configuring chain transmission weight coefficients; calculating the first product of the dynamic credibility and spatiotemporal coupling degree of the preceding node; calculating the second product of the dynamic credibility and spatiotemporal coupling degree of the current node; calculating the geometric mean of the dynamic credibility, spatiotemporal coupling degree, dynamic credibility, and spatiotemporal coupling degree of the preceding node; and weighting and fusing the first product, the second product, and the geometric mean according to the chain transmission weight coefficients.

5. The distributed product anti-counterfeiting and traceability method based on the Internet of Things according to claim 1, characterized in that, The calculation of the comprehensive anomaly risk value based on the chain-based anti-counterfeiting confidence level, the behavioral feature deviation, and the data integrity verification value includes: calculating the average of the behavioral feature deviation and the data integrity verification value; calculating the anomaly degree coefficient based on the average value; configuring the risk amplification index; and performing calculations based on the chain-based anti-counterfeiting confidence level, the anomaly degree coefficient, and the risk amplification index.

6. The distributed product anti-counterfeiting and traceability method based on the Internet of Things according to claim 1, characterized in that, The step of performing multi-node consensus verification of the dynamic credibility, the spatiotemporal feature coupling degree, the chain-based anti-counterfeiting confidence degree, and the comprehensive anomaly risk value in a distributed network includes: broadcasting the calculation results to all verification nodes in the distributed network; receiving the verification results returned by each verification node; counting the number of nodes that pass the verification; configuring a consensus threshold; and confirming the validity of the verification result when the number of nodes that pass the verification reaches the consensus threshold.

7. The distributed commodity anti-counterfeiting and traceability method based on the Internet of Things according to claim 1, characterized in that, It also includes: hashing and encrypting all data uploaded by nodes; storing the encrypted data in a distributed ledger; extracting verification data from the distributed ledger when users query; and outputting a verification report to users that includes dynamic credibility, spatiotemporal feature coupling, chain-based anti-counterfeiting confidence, and comprehensive anomaly risk value.

8. The distributed anti-counterfeiting and traceability method for goods based on the Internet of Things according to claim 2, characterized in that, The historical verification success rate is determined based on the ratio of the number of successful verifications in the node's historical verification records to the total number of verifications; the data transmission stability is determined based on the node's data transmission success rate and transmission delay fluctuation coefficient; the environmental feature matching degree is determined based on the degree of matching between the node's current environmental parameters and historical normal environmental parameters; and the node activity level is determined based on the node's online duration and data upload frequency.

9. A distributed anti-counterfeiting and traceability system for goods based on the Internet of Things, applied to the distributed anti-counterfeiting and traceability method for goods based on the Internet of Things as described in any one of claims 1-8, characterized in that, The system includes a node credibility assessment module, a spatiotemporal feature coupling verification module, a chain-based anti-counterfeiting confidence calculation module, an anomaly risk comprehensive prediction module, and a distributed consensus verification module. The node credibility assessment module is electrically connected to the chain-based anti-counterfeiting confidence calculation module and is used to acquire multi-dimensional node feature data uploaded by distributed IoT nodes, and calculate the dynamic credibility of each IoT node based on the multi-dimensional node feature data. The spatiotemporal feature coupling verification module is electrically connected to the chain-based anti-counterfeiting confidence calculation module and is used to record the timestamp data and geographical location information of the product when it passes through each node, generate transmission time difference and geographical distance data between adjacent nodes, and calculate the dynamic credibility of each IoT node based on the transmission time difference and geographical distance data. The time difference and geographical distance data are used to calculate the spatiotemporal coupling degree of each flow path. The chain-type anti-counterfeiting confidence calculation module is electrically connected to the abnormal risk comprehensive prediction module. It is used to fuse the dynamic credibility and spatiotemporal coupling degree of the previous node with the dynamic credibility and spatiotemporal coupling degree of the current node along the product traceability chain to obtain the chain-type anti-counterfeiting confidence degree of the current node. The abnormal risk comprehensive prediction module is electrically connected to the distributed consensus verification module. It is used to obtain the node behavior feature deviation degree and data integrity verification value, and calculate the comprehensive abnormal risk value based on the chain-type anti-counterfeiting confidence degree, the behavior feature deviation degree, and the data integrity verification value. The distributed consensus verification module is used to perform multi-node consensus verification of the dynamic credibility, the spatiotemporal feature coupling degree, the chain-like anti-counterfeiting confidence degree, and the comprehensive anomaly risk value in a distributed network to generate anti-counterfeiting and traceability verification results.

10. The distributed commodity anti-counterfeiting and traceability system based on the Internet of Things according to claim 9, characterized in that, It also includes a data encryption and storage module and a user query output module. The data encryption and storage module is electrically connected to the node credibility assessment module, the spatiotemporal feature coupling verification module, the chain-based anti-counterfeiting confidence calculation module, and the anomaly risk comprehensive prediction module. It is used to perform hash encryption processing on all data uploaded by the nodes and store the encrypted data in the distributed ledger. The user query output module is electrically connected to the distributed consensus verification module and the data encryption and storage module. It is used to extract verification data from the distributed ledger when the user queries and output a verification report to the user that includes dynamic credibility, spatiotemporal feature coupling degree, chain-based anti-counterfeiting confidence and comprehensive anomaly risk value.