A method and system for verifying the anti-counterfeiting code of smart devices
By constructing a unique identity feature model for smart devices and generating dynamic anti-counterfeiting codes, combined with time and random factors, the problem of codes being easily copied and counterfeited is solved, achieving high-security and high-reliability anti-counterfeiting queries, and adapting to smart device verification in complex environments.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- XIAMEN QIXINMI TECHNOLOGY CO LTD
- Filing Date
- 2026-03-05
- Publication Date
- 2026-06-30
AI Technical Summary
Existing smart device coding anti-counterfeiting query systems lack a strong binding mechanism between the code and the device entity, making static codes easy to copy and counterfeit. They also lack comprehensive analysis of query behavior and device operating characteristics, resulting in limited credibility of anti-counterfeiting query results and making it difficult to meet the high security and high reliability verification requirements in complex circulation environments.
By collecting hardware and operational characteristic parameters of the device, a unique identity feature model is constructed, generating a dynamic anti-counterfeiting code that is strongly bound to the device entity. Combined with time factors and random disturbance factors, the code's legality and device consistency are verified, and multi-dimensional query behavior analysis is performed to dynamically generate anti-counterfeiting judgment results.
It effectively prevents anti-counterfeiting codes from being copied and counterfeited, improves the security and unpredictability of codes, enhances the intelligence and credibility of anti-counterfeiting queries, and adapts to high-security and high-reliability verification in complex circulation environments.
Smart Images

Figure CN122309815A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of code-based anti-counterfeiting query technology, and in particular to a code-based anti-counterfeiting query method and system for smart devices. Background Technology
[0002] With the rapid development of IoT, AI and smart manufacturing technologies, the number and types of smart devices such as smart home appliances, wearable devices, industrial smart terminals and vehicle equipment are constantly increasing in production, distribution and use. In order to ensure the product quality, safety and brand credibility of smart devices and prevent counterfeit and shoddy products from entering the market, code-based anti-counterfeiting query technology is widely used in the field of smart devices. In existing technologies, anti-counterfeiting query systems for smart devices typically use QR codes, barcodes, or serial number labels on the outside of the device and establish a correspondence between the codes and product information in a backend database. Users can scan the codes to initiate a query request to the server to obtain the authenticity or basic information of the device. This type of technology reduces the cost of manual identification to some extent and improves the convenience of anti-counterfeiting queries. However, with the continuous evolution of counterfeiting techniques and network attack methods, existing anti-counterfeiting query systems have gradually exposed problems such as insufficient security and limited intelligence, as follows: Most existing anti-counterfeiting codes are statically generated, and there is a lack of a strong binding mechanism between the code and the smart device entity. Once the code is copied or counterfeited, it can be illegally used on counterfeit devices, making it difficult to fundamentally distinguish between "genuine code and fake device". Most existing anti-counterfeiting query systems only provide static authenticity judgment results and lack the ability to comprehensively analyze information such as query behavior, query frequency and query spatial distribution, making it difficult to identify abnormal query behavior or potential counterfeiting risks in a timely manner. Some existing systems fail to effectively combine device operating characteristics, query terminal information and historical data during the anti-counterfeiting query process, resulting in limited credibility of anti-counterfeiting query results and making it difficult to meet the needs of smart devices for high security and high reliability anti-counterfeiting verification in complex circulation environments. Based on the above, this application proposes a coding anti-counterfeiting query method and system for smart devices. Summary of the Invention
[0003] Based on the technical problems existing in the background technology, the present invention proposes a coding anti-counterfeiting query method and query system for smart devices.
[0004] The present invention proposes a coding anti-counterfeiting query method for smart devices, comprising the following steps: S1: Device Unique Identification Feature Collection and Modeling: When a smart device leaves the factory or is first activated, at least one hardware feature parameter and operational feature parameter of the device are collected, and a device unique identification feature model is constructed to serve as the identity benchmark of the device entity. S2: Dynamic anti-counterfeiting code generation and binding: Based on the device's unique identity feature model, time factor and random disturbance factor, a dynamic anti-counterfeiting code corresponding to the smart device is generated, and the dynamic anti-counterfeiting code is bound and stored with the device identity feature model; S3: Anti-counterfeiting query request reception: When a user initiates an anti-counterfeiting query operation through a terminal device, an anti-counterfeiting query request containing the anti-counterfeiting code, query time, query terminal identifier, and query location information is received. S4: Verification of code legality and device consistency: Based on the anti-counterfeiting code, the legality is verified in the background system, and the device identity feature model corresponding to the anti-counterfeiting code is further verified to match the device feature information obtained during the query process; S5: Multidimensional analysis of query behavior: Comprehensive analysis of the historical query count, query time interval, query geographical distribution and query terminal characteristics of anti-counterfeiting query requests to form a query behavior feature vector; S6: Dynamic Anti-counterfeiting Judgment and Result Feedback: Based on the code legality verification result, device consistency verification result, and query behavior feature vector, the anti-counterfeiting judgment result is dynamically generated and the anti-counterfeiting query information is fed back to the query terminal.
[0005] Preferably, the specific logical steps of S1 are as follows: S101: Collect at least one unalterable or difficult-to-forge hardware feature parameter through the security module of the smart device. The hardware feature parameter includes, but is not limited to, the chip's unique identifier ID, processor serial number, memory physical address, RF module fingerprint parameters, and security chip key digest, and construct a hardware feature vector based on the hardware feature parameter. ,in, This represents the i-th hardware feature parameter, where i is the number of hardware feature parameters; S102: Under stable operating conditions, collect the device's operating characteristic parameters, including startup timing characteristics, power consumption waveform characteristics, clock drift characteristics, and sensor reference response characteristics, and construct an operating characteristic vector: ,in, This represents the j-th runtime feature parameter, where j is the number of runtime feature parameters; S103: Normalize the hardware feature vector H and the runtime feature vector R respectively to eliminate dimensional differences, and calculate the stability coefficient of each feature parameter based on the results of multiple samplings. Filter to meet the stability threshold Feature parameters ≤δ are involved in modeling; S104: Filter the hardware feature vectors With running feature vector The devices are then fused according to weights to construct a unique device identification feature model: I = α· +β· , where α and β are feature fusion weights, and satisfy α+β=1; S105: Perform a digest operation on the device unique identity feature model I to generate the device identity feature fingerprint IDdev, whose calculation formula is: IDdev = Hash( ); Salt is a random perturbation factor used to enhance the irreversibility and collision resistance of identity fingerprints, while IDdev serves as the unique identity benchmark for device entities.
[0006] Preferably, the specific logical steps of S2 are as follows: S201: Read the device identity feature fingerprint IDdev generated in S05 from the device's secure storage area, and use it as the core input parameter for generating the dynamic anti-counterfeiting code; S202: Obtain the current system timestamp T, and discretize the timestamp according to the preset time window function to generate a time factor. Its mathematical expression is ,in This indicates the floor function. This represents the time factor corresponding to the k-th time window; S203: Generating random perturbation factors based on a secure random number generator This is used to enhance the unpredictability of dynamic anti-counterfeiting codes. ,in ( ) represents a discrete uniform distribution, where n is the bit length of the random perturbation factor; S204: Combine device identity features (fingerprint IDdev) and time factor. and random disturbance factor The code is then combined and a dynamic anti-counterfeiting code is generated using a one-way encryption mapping function. The formula used is: ,in ( () is a one-way cryptographic mapping function or a cryptographically secure hash function. Indicates concatenation operation; S205: Dynamic anti-counterfeiting code The validity period is set, and the validity of the encoding is determined based on the current time. The determination function is as follows: ,in This indicates that the encoding is valid. This indicates that the encoding is invalid; S206: Generate dynamic anti-counterfeiting code Corresponding device identity feature fingerprint IDdev and time factor Bind storage to form a mapping relationship The binding relationship is stored in the background anti-counterfeiting database or distributed trusted storage for subsequent anti-counterfeiting queries and consistency verification.
[0007] Preferably, the specific logical steps of S3 are as follows: S301: Users scan or input the anti-counterfeiting code of smart devices through the query terminal to trigger the anti-counterfeiting query operation; S302: When a query request is triggered, the following query elements are collected synchronously: anti-counterfeiting code. Query timestamp Query terminal identifier Query location information The query request vector is then sent to the backend anti-counterfeiting query system.
[0008] Preferably, the specific logical steps of S4 are as follows: S401: Retrieve anti-counterfeiting codes from the anti-counterfeiting code database Determine if it exists ,in This represents the set of registered anti-counterfeiting codes; S402: Combining the time factor in S204 Determine if the anti-counterfeiting code is within the valid time window: ; S403: Where permitted, extract the device operation feature vector from the queried device or the device under test: ; S404: Query the feature vector of the device on the query side. The device identity feature model I, which is bound to the code, uses the Euclidean distance algorithm to calculate similarity. The formula used is: ,in This is the reference operating feature vector during device registration; S405: Perform consistency determination on the calculated similarity D, using the following formula: ,in This is the device consistency threshold.
[0009] Preferably, the specific logical steps of S5 are as follows: S501: Statistical Anti-counterfeiting Code Cumulative number of queries within the historical time window: ,in ( ) is an indicator function; S502: Calculate the time interval sequence between two consecutive queries. ; S503: Spatial discretization of the query location information to form a query geographic distribution vector. ,in This represents the query frequency within the p-th geographic region; S504: Count the number of different terminal identifiers : S505: Query and construct behavioral feature vectors. , where B represents the query behavior feature vector.
[0010] Preferably, the specific logical steps of S6 are as follows: S601: Based on the encoding validity verification result Timeliness of results Equipment consistency results and query behavior feature vector Construct a comprehensive anti-counterfeiting scoring function: ; in , For query behavior risk assessment functions; S602: Determine the anti-counterfeiting result: ,in , The threshold for anti-counterfeiting determination; S603: Return the anti-counterfeiting judgment result R and the corresponding query prompt information to the query terminal.
[0011] This invention also proposes a coding anti-counterfeiting query system for smart devices, including a device feature acquisition module, a dynamic coding generation module, a query request receiving module, a coding and device consistency verification module, a query behavior analysis module, and an anti-counterfeiting judgment and feedback module; The device feature acquisition module is used to collect hardware feature parameters and operational feature parameters of smart devices, and generate a unique device identity feature model; The dynamic coding generation module is used to generate dynamic anti-counterfeiting codes based on device identity feature models, time factors, and random factors, and to bind the codes to the devices. The query request receiving module is used to receive anti-counterfeiting query requests initiated by user terminals; The code and device consistency verification module is used to verify the legality of the anti-counterfeiting code and the consistency between the code and the device entity. The query behavior analysis module is used to perform multi-dimensional behavior analysis on anti-counterfeiting query requests and identify abnormal query patterns. The anti-counterfeiting judgment and feedback module is used to generate anti-counterfeiting judgment information based on the verification results and query behavior analysis results, and to feed the results back to the user terminal.
[0012] Compared with existing technologies, the beneficial effects of this invention are: By collecting and integrating the hardware and operational feature parameters of smart devices, a unique identification feature model for the device is constructed. Based on this model, a dynamic anti-counterfeiting code is generated. This ensures that the anti-counterfeiting code is no longer solely dependent on external labels, but rather forms a strong binding relationship with the intrinsic features of the device entity. This fundamentally reduces the risk of the anti-counterfeiting code being copied, counterfeited, and reused on different devices, effectively avoiding the problem of "genuine code, fake device". By introducing time factors and random disturbance factors into the anti-counterfeiting code generation process, the anti-counterfeiting code changes dynamically over time, possessing time-varying and unpredictable characteristics. Even if the anti-counterfeiting code is intercepted within a certain time window, it is difficult to reuse it in other time periods, significantly improving the system's ability to protect against security threats such as copy attacks and replay attacks. By comprehensively analyzing multi-dimensional information such as the historical number of queries, query time intervals, query geographical distribution, and query terminal characteristics of anti-counterfeiting query requests, a query behavior feature vector is constructed. Combined with the coding legality verification results and device consistency verification results, dynamic anti-counterfeiting judgment is performed, which can effectively identify abnormal query behavior and potential counterfeiting risks, and improve the intelligence level and credibility of anti-counterfeiting query results.
[0013] This invention collects and integrates the hardware and operational characteristics of smart devices to construct a unique device identity model. Based on this model, it generates a dynamic anti-counterfeiting code strongly bound to the device entity, effectively preventing the problem of the anti-counterfeiting code being copied, counterfeited, and reused on different devices. Simultaneously, by introducing time and random disturbance factors, the anti-counterfeiting code acquires time-varying and unpredictable characteristics, significantly improving the security and anti-attack capabilities of the anti-counterfeiting system. Furthermore, by combining comprehensive analysis of anti-counterfeiting query behavior across multiple dimensions such as query frequency, time distribution, geographical location, and terminal characteristics, dynamic anti-counterfeiting judgment and anomaly identification are achieved, thereby improving the credibility and intelligence level of the anti-counterfeiting query results. This enables the system to adapt to the application requirements of high-security and high-reliability anti-counterfeiting verification for smart devices in complex circulation environments. Attached Figure Description
[0014] Figure 1 This is a flowchart of a coding anti-counterfeiting query method for smart devices proposed in this invention; Figure 2 This is a block diagram of a coding anti-counterfeiting query system for intelligent devices proposed in this invention. Detailed Implementation
[0015] The present invention will be further explained below with reference to specific embodiments. Example
[0016] Reference Figure 1 This embodiment proposes a coding anti-counterfeiting query method for smart devices, including the following steps: S1: Device Unique Identification Feature Collection and Modeling: When a smart device leaves the factory or is first activated, at least one hardware feature parameter and operational feature parameter of the device are collected, and a device unique identification feature model is constructed to serve as the identity benchmark of the device entity. The specific logical steps are as follows: S101: Collect at least one unalterable or difficult-to-forge hardware feature parameter through the security module of the smart device. The hardware feature parameter includes, but is not limited to, the chip's unique identifier ID, processor serial number, memory physical address, RF module fingerprint parameters, and security chip key digest, and construct a hardware feature vector based on the hardware feature parameter. ,in, This represents the i-th hardware feature parameter, where i is the number of hardware feature parameters; S102: Under stable operating conditions, collect the device's operating characteristic parameters, including startup timing characteristics, power consumption waveform characteristics, clock drift characteristics, and sensor reference response characteristics, and construct an operating characteristic vector: ,in, This represents the j-th runtime feature parameter, where j is the number of runtime feature parameters; S103: Normalize the hardware feature vector H and the runtime feature vector R respectively to eliminate dimensional differences, and calculate the stability coefficient of each feature parameter based on the results of multiple samplings. Filter to meet the stability threshold Feature parameters ≤δ are involved in modeling; S104: Filter the hardware feature vectors With running feature vector The devices are then fused according to weights to construct a unique device identification feature model: I = α· +β· , where α and β are feature fusion weights, and satisfy α+β=1; S105: Perform a digest operation on the device unique identity feature model I to generate the device identity feature fingerprint IDdev, whose calculation formula is: IDdev = Hash( ); Salt is a random perturbation factor used to enhance the irreversibility and collision resistance of the identity fingerprint, and IDdev serves as the unique identity benchmark for the device entity. S2: Dynamic anti-counterfeiting code generation and binding: Based on the device's unique identity feature model, time factor and random disturbance factor, a dynamic anti-counterfeiting code corresponding to the smart device is generated, and the dynamic anti-counterfeiting code is bound and stored with the device identity feature model; The specific logical steps are as follows: S201: Read the device identity feature fingerprint IDdev generated in S05 from the device's secure storage area, and use it as the core input parameter for generating the dynamic anti-counterfeiting code; S202: Obtain the current system timestamp T, and discretize the timestamp according to the preset time window function to generate a time factor. Its mathematical expression is ,in This indicates the floor function. This represents the time factor corresponding to the k-th time window; S203: Generating random perturbation factors based on a secure random number generator This is used to enhance the unpredictability of dynamic anti-counterfeiting codes. ,in ( ) represents a discrete uniform distribution, where n is the bit length of the random perturbation factor; S204: Combine device identity features (fingerprint IDdev) and time factor. and random disturbance factor The code is then combined and a dynamic anti-counterfeiting code is generated using a one-way encryption mapping function. The formula used is: ,in ( () is a one-way cryptographic mapping function or a cryptographically secure hash function. Indicates concatenation operation; S205: Dynamic anti-counterfeiting code The validity period is set, and the validity of the encoding is determined based on the current time. The determination function is as follows: ,in This indicates that the encoding is valid. This indicates that the encoding is invalid; S206: Generate dynamic anti-counterfeiting code Corresponding device identity feature fingerprint IDdev and time factor Bind storage to form a mapping relationship The binding relationship is stored in the background anti-counterfeiting database or distributed trusted storage for subsequent anti-counterfeiting queries and consistency verification. S3: Anti-counterfeiting query request reception: When a user initiates an anti-counterfeiting query operation through a terminal device, an anti-counterfeiting query request containing the anti-counterfeiting code, query time, query terminal identifier, and query location information is received. The specific logical steps are as follows: S301: Users scan or input the anti-counterfeiting code of smart devices through the query terminal to trigger the anti-counterfeiting query operation; S302: When a query request is triggered, the following query elements are collected synchronously: anti-counterfeiting code. Query timestamp Query terminal identifier Query location information The query request vector is then sent to the backend anti-counterfeiting query system. S4: Verification of code legality and device consistency: Based on the anti-counterfeiting code, the legality is verified in the background system, and the device identity feature model corresponding to the anti-counterfeiting code is further verified to match the device feature information obtained during the query process; The specific logical steps are as follows: S401: Retrieve anti-counterfeiting codes from the anti-counterfeiting code database Determine if it exists ,in This represents the set of registered anti-counterfeiting codes; S402: Combining the time factor in S204 Determine if the anti-counterfeiting code is within the valid time window: ; S403: Where permitted, extract the device operation feature vector from the queried device or the device under test: ; S404: Query the feature vector of the device on the query side. The device identity feature model I, which is bound to the code, uses the Euclidean distance algorithm to calculate similarity. The formula used is: ,in This is the reference operating feature vector during device registration; S405: Perform consistency determination on the calculated similarity D, using the following formula: ,in This is the device consistency threshold; S5: Multidimensional analysis of query behavior: Comprehensive analysis of the historical query count, query time interval, query geographical distribution and query terminal characteristics of anti-counterfeiting query requests to form a query behavior feature vector; The specific logical steps are as follows: S501: Statistical Anti-counterfeiting Code Cumulative number of queries within the historical time window: ,in ( ) is an indicator function; S502: Calculate the time interval sequence between two consecutive queries. ; S503: Spatial discretization of the query location information to form a query geographic distribution vector. ,in This represents the query frequency within the p-th geographic region; S504: Count the number of different terminal identifiers : S505: Query and construct behavioral feature vectors. , where B represents the query behavior feature vector; S6: Dynamic anti-counterfeiting judgment and result feedback: Based on the code legality verification result, device consistency verification result and query behavior feature vector, the anti-counterfeiting judgment result is dynamically generated and the anti-counterfeiting query information is fed back to the query terminal; The specific logical steps are as follows: S601: Based on the encoding validity verification result Timeliness of results Equipment consistency results and query behavior feature vector Construct a comprehensive anti-counterfeiting scoring function: ; in , For query behavior risk assessment functions; S602: Determine the anti-counterfeiting result: ,in , The threshold for anti-counterfeiting determination; S603: Return the anti-counterfeiting judgment result R and the corresponding query prompt information to the query terminal.
[0017] Reference Figure 2 This embodiment proposes a coding anti-counterfeiting query system for smart devices, including a device feature acquisition module, a dynamic coding generation module, a query request receiving module, a coding and device consistency verification module, a query behavior analysis module, and an anti-counterfeiting judgment and feedback module; The device feature acquisition module is used to collect hardware feature parameters and operational feature parameters of smart devices, and generate a unique device identification feature model; The dynamic encoding generation module is used to generate dynamic anti-counterfeiting codes based on device identity feature models, time factors, and random factors, and to bind the codes to the devices. The query request receiving module is used to receive anti-counterfeiting query requests initiated by user terminals; The code and device consistency verification module is used to verify the legality of the anti-counterfeiting code and the consistency between the code and the device entity; The query behavior analysis module is used to perform multi-dimensional behavior analysis on anti-counterfeiting query requests and identify abnormal query patterns. The anti-counterfeiting judgment and feedback module is used to generate anti-counterfeiting judgment information based on the verification results and query behavior analysis results, and to feed the results back to the user terminal; This embodiment collects and integrates the hardware and operational characteristics of smart devices to construct a unique device identity feature model. Based on this model, it generates a dynamic anti-counterfeiting code strongly bound to the device entity, effectively preventing the problem of the anti-counterfeiting code being copied, counterfeited, and reused on different devices. Simultaneously, by introducing time and random disturbance factors, the anti-counterfeiting code becomes time-varying and unpredictable, significantly improving the security and anti-attack capabilities of the anti-counterfeiting system. Furthermore, by combining comprehensive analysis of anti-counterfeiting query behavior across multiple dimensions such as query frequency, time distribution, geographical location, and terminal characteristics, dynamic anti-counterfeiting judgment and anomaly identification are achieved, thereby improving the credibility and intelligence level of the anti-counterfeiting query results. This enables the system to adapt to the application requirements of high-security and high-reliability anti-counterfeiting verification for smart devices in complex circulation environments.
[0018] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A method for encoding anti-counterfeiting verification of intelligent devices, characterized in that, Includes the following steps: S1: Device Unique Identification Feature Collection and Modeling: When a smart device leaves the factory or is first activated, at least one hardware feature parameter and operational feature parameter of the device are collected, and a device unique identification feature model is constructed to serve as the identity benchmark of the device entity. S2: Dynamic anti-counterfeiting code generation and binding: Based on the device's unique identity feature model, time factor and random disturbance factor, a dynamic anti-counterfeiting code corresponding to the smart device is generated, and the dynamic anti-counterfeiting code is bound and stored with the device identity feature model; S3: Anti-counterfeiting query request reception: When a user initiates an anti-counterfeiting query operation through a terminal device, an anti-counterfeiting query request containing the anti-counterfeiting code, query time, query terminal identifier, and query location information is received. S4: Verification of code legality and device consistency: Based on the anti-counterfeiting code, the legality is verified in the background system, and the device identity feature model corresponding to the anti-counterfeiting code is further verified to match the device feature information obtained during the query process; S5: Multidimensional analysis of query behavior: Comprehensive analysis of the historical query count, query time interval, query geographical distribution and query terminal characteristics of anti-counterfeiting query requests to form a query behavior feature vector; S6: Dynamic Anti-counterfeiting Judgment and Result Feedback: Based on the code legality verification result, device consistency verification result, and query behavior feature vector, the anti-counterfeiting judgment result is dynamically generated and the anti-counterfeiting query information is fed back to the query terminal.
2. The coding anti-counterfeiting query method for intelligent devices according to claim 1, characterized in that, The specific logical steps of S1 are as follows: S101: Collect at least one unalterable or difficult-to-forge hardware feature parameter through the security module of the smart device. The hardware feature parameter includes, but is not limited to, the chip's unique identifier ID, processor serial number, memory physical address, RF module fingerprint parameters, and security chip key digest, and construct a hardware feature vector based on the hardware feature parameter. ,in, This represents the i-th hardware feature parameter, where i is the number of hardware feature parameters; S102: Under stable operating conditions, collect the device's operating characteristic parameters, including startup timing characteristics, power consumption waveform characteristics, clock drift characteristics, and sensor reference response characteristics, and construct an operating characteristic vector: ,in, This represents the j-th runtime feature parameter, where j is the number of runtime feature parameters; S103: Normalize the hardware feature vector H and the runtime feature vector R respectively to eliminate dimensional differences, and calculate the stability coefficient of each feature parameter based on multiple sampling results, and screen those that meet the stability threshold. Feature parameters ≤δ are involved in modeling; S104: The selected hardware feature vectors and operational feature vectors are fused according to weights to construct a unique device identity feature model: I = α· +β· , where α and β are feature fusion weights, and satisfy α+β=1; S105: Perform a digest operation on the device unique identity feature model I to generate the device identity feature fingerprint IDdev, the calculation formula of which is: IDdev = Hash(); Salt is a random perturbation factor used to enhance the irreversibility and collision resistance of identity fingerprints, while IDdev serves as the unique identity benchmark for device entities.
3. The coding anti-counterfeiting query method for intelligent devices according to claim 1, characterized in that, The specific logical steps of S2 are as follows: S201: Read the device identity feature fingerprint IDdev generated in S05 from the device's secure storage area, and use it as the core input parameter for generating the dynamic anti-counterfeiting code; S202: Obtain the current system timestamp T, and discretize the timestamp according to the preset time window function to generate a time factor. Its mathematical expression is ,in This indicates the floor function. This represents the time factor corresponding to the k-th time window; S203: Generating random perturbation factors based on a secure random number generator This is used to enhance the unpredictability of dynamic anti-counterfeiting codes. ,in ( ) represents a discrete uniform distribution, where n is the bit length of the random perturbation factor; S204: Combine device identity features (fingerprint IDdev) and time factor. and random disturbance factor The code is then combined and a dynamic anti-counterfeiting code is generated using a one-way encryption mapping function. The formula used is: ,in ( () is a one-way cryptographic mapping function or a cryptographically secure hash function. Indicates concatenation operation; S205: Dynamic anti-counterfeiting code The validity period is set, and the validity of the encoding is determined based on the current time. The determination function is as follows: ,in This indicates that the encoding is valid. This indicates that the encoding is invalid; S206: Generate dynamic anti-counterfeiting code Corresponding device identity feature fingerprint IDdev and time factor Bind storage to form a mapping relationship The binding relationship is stored in the background anti-counterfeiting database or distributed trusted storage for subsequent anti-counterfeiting queries and consistency verification.
4. The coding anti-counterfeiting query method for intelligent devices according to claim 1, characterized in that, The specific logical steps of S3 are as follows: S301: Users scan or input the anti-counterfeiting code of smart devices through the query terminal to trigger the anti-counterfeiting query operation; S302: When a query request is triggered, the following query elements are collected synchronously: anti-counterfeiting code. Query timestamp Query terminal identifier Query location information The query request vector is then sent to the backend anti-counterfeiting query system.
5. The coding anti-counterfeiting query method for intelligent devices according to claim 3, characterized in that, The specific logical steps of S4 are as follows: S401: Retrieve anti-counterfeiting codes from the anti-counterfeiting code database Determine if it exists ,in This represents the set of registered anti-counterfeiting codes; S402: Combining the time factor in S204 Determine if the anti-counterfeiting code is within the valid time window: ; S403: Where permitted, extract the device operation feature vector from the queried device or the device under test: ; S404: Query the feature vector of the device on the query side. The device identity feature model I, which is bound to the code, uses the Euclidean distance algorithm to calculate similarity. The formula used is: ,in This is the reference operating feature vector during device registration; S405: Perform consistency determination on the calculated similarity D, using the following formula: ,in This is the device consistency threshold.
6. The coding anti-counterfeiting query method for intelligent devices according to claim 1, characterized in that, The specific logical steps of S5 are as follows: S501: Statistical Anti-counterfeiting Code Cumulative number of queries within the historical time window: ,in ( ) is an indicator function; S502: Calculate the time interval sequence between two consecutive queries. ; S503: Spatial discretization of the query location information to form a query geographic distribution vector. ,in This represents the query frequency within the p-th geographic region; S504: Count the number of different terminal identifiers : S505: Query and construct behavioral feature vectors. , where B represents the query behavior feature vector.
7. The coding anti-counterfeiting query method for intelligent devices according to claim 1, characterized in that, The specific logical steps of S6 are as follows: S601: Based on the encoding validity verification result Timeliness of results Equipment consistency results and query behavior feature vector Construct a comprehensive anti-counterfeiting scoring function: ; in , For query behavior risk assessment functions; S602: Determine the anti-counterfeiting result: ,in , The threshold for anti-counterfeiting determination; S603: Return the anti-counterfeiting judgment result R and the corresponding query prompt information to the query terminal.
8. A coding anti-counterfeiting query system for intelligent devices, used to implement the method described in any one of claims 1-7, characterized in that, It includes a device feature acquisition module, a dynamic code generation module, a query request receiving module, a code and device consistency verification module, a query behavior analysis module, and an anti-counterfeiting judgment and feedback module; The device feature acquisition module is used to collect hardware feature parameters and operational feature parameters of smart devices, and generate a unique device identity feature model; The dynamic coding generation module is used to generate dynamic anti-counterfeiting codes based on device identity feature models, time factors, and random factors, and to bind the codes to the devices. The query request receiving module is used to receive anti-counterfeiting query requests initiated by user terminals; The code and device consistency verification module is used to verify the legality of the anti-counterfeiting code and the consistency between the code and the device entity. The query behavior analysis module is used to perform multi-dimensional behavior analysis on anti-counterfeiting query requests and identify abnormal query patterns. The anti-counterfeiting judgment and feedback module is used to generate anti-counterfeiting judgment information based on the verification results and query behavior analysis results, and to feed the results back to the user terminal.