A publication anti-counterfeiting and traceability management system and method

By employing a two-level risk assessment mechanism and generative adversarial network training, the problem of existing systems being unable to distinguish between legitimate and pirated QR code scanning behaviors has been solved. This enables high-precision QR code scanning behavior identification and full-process traceability management, adapting to the evolution of new counterfeiting methods.

CN122492233APending Publication Date: 2026-07-31ZHENGZHOU UNIVERSITY PRESS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ZHENGZHOU UNIVERSITY PRESS CO LTD
Filing Date
2026-04-29
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

Existing anti-counterfeiting and traceability systems for publications cannot effectively distinguish between legitimate readers' normal scanning behavior and pirates' malicious bulk verification behavior, resulting in persistent QR code cloning attacks and failing to fundamentally solve the problem of publication piracy.

Method used

A two-level risk assessment mechanism is adopted. By analyzing historical scanning records and shaking data sequences collected by gyroscope sensors, and combining them with generative adversarial networks for offline training, the classification ability of the discriminator model is optimized, and the threshold parameters and judgment rules of risk triggering conditions are updated to achieve accurate identification and continuous adaptation of scanning behavior.

Benefits of technology

It achieves high-precision identification of QR code scanning behavior, avoids resource waste, can continuously cope with the iterative upgrades of AI counterfeiting technology, and provides full-process traceability management to accurately locate areas with high incidence of piracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122492233A_ABST
    Figure CN122492233A_ABST
Patent Text Reader

Abstract

This invention relates to the field of anti-counterfeiting technology for publications, and more particularly to an anti-counterfeiting traceability management system and method for publications, comprising: a data acquisition module acquiring QR code request data; a first-level risk assessment module determining whether the first-level risk triggering conditions are met based on historical QR code scanning records; a first-level result processing module initiating liveness detection to collect shaking data when the conditions are met; a liveness data analysis module calculating the variance and peak distribution pattern of the shaking data; a second-level risk assessment module determining whether the second-level risk triggering conditions are met based on the variance and peak distribution pattern; a second-level result processing module storing high-risk samples in an abnormal sample database; a model evolution module using a generative adversarial network for offline training and updating the judgment rules; and a rule deployment module deploying the updated rules to an online system. This invention effectively identifies QR code cloning attacks through hierarchical risk prevention and control and model self-evolution.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of anti-counterfeiting technology for publications, and in particular to an anti-counterfeiting traceability management system and method for publications. Background Technology

[0002] With the rapid development of printing and digital reproduction technologies, the problem of publication piracy has become increasingly serious. Pirates can quickly and mass-produce genuine books using high-definition scanning and digital reprinting, and then flood the market at low cost, severely damaging the rights and interests of publishing houses, authors, and legitimate distributors. Traditional anti-counterfeiting measures for publications mainly rely on physical anti-counterfeiting labels and unique QR code technology, allowing readers to verify authenticity and manage traceability through scanning the codes. However, with the continuous upgrading of piracy techniques, these traditional anti-counterfeiting methods face new challenges.

[0003] Existing one-item-one-code anti-counterfeiting and traceability systems suffer from a core technical problem in practical applications: they cannot effectively distinguish between legitimate readers' normal scanning behavior and malicious mass verification by pirates, leading to persistent QR code cloning attacks. Specifically, pirates only need to purchase a legitimate book, obtain its genuine QR code, and then mass-copy the QR code and print it on pirated books. When a reader scans the QR code on a pirated book, the system can only recognize that the QR code is valid, but cannot determine whether the scan is of a legitimate or pirated book, nor can it identify that the QR code is being verified thousands of times. This limitation of the static verification mechanism renders one-item-one-code anti-counterfeiting technology ineffective against QR code cloning attacks, failing to fundamentally solve the problem of publication piracy. Summary of the Invention

[0004] To overcome the above shortcomings, this invention provides a publication anti-counterfeiting and traceability management system and method, aiming to improve the problem that existing publication anti-counterfeiting and traceability systems cannot effectively distinguish between legitimate readers' normal scanning behavior and pirates' malicious batch verification behavior, resulting in the persistent problem of QR code cloning attacks.

[0005] In a first aspect, the present invention provides the following technical solution: a publication anti-counterfeiting and traceability management system, comprising the following modules:

[0006] The data acquisition module is used to respond to the user terminal's scanning operation of the anti-counterfeiting label on the publication and acquire the scanning request data, which includes the anti-counterfeiting label code, the scanning timestamp, the terminal device fingerprint, and the city-level geographical location information of the scanning location.

[0007] The first-level risk assessment module is used to query a preset scanning log database based on the anti-counterfeiting label code, obtain the historical scanning records of the anti-counterfeiting label code within a preset historical time period, and determine whether the current scanning meets the first-level risk triggering conditions based on the number of historical device fingerprints and the historical scanning timestamp in the historical scanning records.

[0008] The first-level result processing module is used to send an instruction to start liveness detection to the user terminal if the first-level risk triggering condition is met, and to receive the shaking data sequence collected by the gyroscope sensor returned by the user terminal; otherwise, it returns a verification pass result to the user terminal.

[0009] The live data analysis module is used to perform statistical feature analysis on the shaking data sequence and calculate the variance and peak distribution pattern of the shaking data sequence.

[0010] The second-level risk assessment module is used to determine whether the current scan meets the second-level risk triggering conditions based on the variance value and peak distribution pattern.

[0011] The second-level result processing module is used to mark the current scan record as a high-risk sample if the second-level risk triggering condition is met, and to associate and store the anti-counterfeiting mark code, scan timestamp, terminal device fingerprint, city-level geographical location information and shaking data sequence into the abnormal sample database; otherwise, it removes the first-level risk mark and returns the verification result to the user terminal.

[0012] The model evolution module is used to call high-risk sample data accumulated in the abnormal sample library based on a preset period, use a generative adversarial network for offline training, and update the threshold parameters of the first-level risk triggering condition and the judgment rules of the second-level risk triggering condition.

[0013] The rule deployment module is used to deploy the updated threshold parameters and judgment rules to the online anti-counterfeiting and traceability system for subsequent scanning request processing.

[0014] Preferably, the data acquisition module is specifically configured as follows:

[0015] The user terminal scans the anti-counterfeiting label on the publication using its built-in camera, and parses the anti-counterfeiting label to obtain the anti-counterfeiting label code;

[0016] In response to the scanning operation, the user terminal automatically reads the current system time and generates a scanning timestamp.

[0017] The user terminal calls the device identifier interface provided by the operating system to obtain the terminal device fingerprint that has been hashed and encrypted.

[0018] User terminals obtain their current city-level geographic location information based on network location services;

[0019] The user terminal encapsulates the anti-counterfeiting label code, scanning timestamp, terminal device fingerprint, and city-level geographic location information into scanning request data, and sends it to the anti-counterfeiting traceability management platform via the network.

[0020] Preferably, the first-level risk assessment module is specifically configured as follows:

[0021] Based on the anti-counterfeiting mark code, all historical scanning records within a preset historical time period are retrieved from the scanning log database.

[0022] Extract all historical device fingerprints associated with the anti-counterfeiting mark code from the historical scanning records, and count the number of fingerprints from different historical devices as the first count value;

[0023] Extract all historical scanning timestamps from the historical scanning records, and count the total number of historical scans associated with the anti-counterfeiting mark code within the preset historical time period as a second count value;

[0024] The first count value is compared with a preset first threshold, and the second count value is compared with a preset second threshold;

[0025] If the first count value is greater than the first threshold, or the second count value is greater than the second threshold, then the current scan is determined to meet the first-level risk triggering condition.

[0026] Preferably, the first-level result processing module is specifically configured as follows:

[0027] If the current scan meets the first-level risk triggering condition, the anti-counterfeiting and traceability management platform generates a liveness detection command and sends the command to the user terminal.

[0028] In response to the activation liveness detection command, the user terminal calls the built-in gyroscope sensor to collect the three-axis angular velocity data generated by the user shaking the terminal device within a preset time period in real time, and generates a shaking data sequence.

[0029] The user terminal encapsulates the shaking data sequence and sends it to the anti-counterfeiting and traceability management platform via the network;

[0030] The anti-counterfeiting and traceability management platform receives and stores the shaking data sequence for subsequent analysis and processing;

[0031] If the current scan does not meet the first-level risk triggering condition, the anti-counterfeiting and traceability management platform will directly generate a verification pass result and return the verification pass result to the user terminal for display.

[0032] Preferably, the live data analysis module is specifically configured as follows:

[0033] The anti-counterfeiting and traceability management platform receives and parses the shaking data sequence, and extracts the triaxial angular velocity values ​​at consecutive time points contained in the shaking data sequence;

[0034] Based on the three-axis angular velocity values, the resultant angular velocity value at each time point is calculated to generate a one-dimensional sway amplitude sequence;

[0035] Statistical calculations are performed on the one-dimensional sway amplitude sequence to determine the degree of deviation between all sway amplitude values ​​and the sequence mean, and a variance value is generated.

[0036] Peak detection is performed on the one-dimensional sway amplitude sequence to identify the location of local maxima in the sequence, and the time interval between adjacent peaks is statistically analyzed to generate a peak distribution pattern.

[0037] Preferably, the second-level risk assessment module is specifically configured as follows:

[0038] The variance value is compared with a preset third threshold.

[0039] Analyze the peak distribution pattern to determine whether the time interval between adjacent peaks exhibits a periodic repetition characteristic;

[0040] If the variance value is lower than the third threshold and the time interval between adjacent peaks shows a periodic repetition characteristic, then the current scan is determined to meet the second-level risk triggering condition and is identified as a high-risk scan behavior.

[0041] If the variance value is not lower than the third threshold, or the time interval between adjacent peaks does not exhibit periodic repetition, then the current scan does not meet the second-level risk triggering condition and is identified as normal manual scan behavior.

[0042] Preferably, the second-level result processing module is specifically configured as follows:

[0043] If the current scan meets the second-level risk triggering condition, the anti-counterfeiting and traceability management platform adds a high-risk label to the current scan record and generates high-risk sample data.

[0044] The high-risk sample data is associated and bound with the anti-counterfeiting label code, scanning timestamp, terminal device fingerprint, city-level geographic location information and shaking data sequence to form a complete abnormal sample record;

[0045] The abnormal sample records are persistently stored in a preset abnormal sample database, and the risk level field of the current scan record in the scan log database is updated synchronously.

[0046] If the current scan does not meet the second-level risk triggering conditions, the anti-counterfeiting traceability management platform will query and locate the first-level risk marker record corresponding to the current scan in the scan log database;

[0047] Clear the first-level risk marker record and remove the risk marker status from the current scan.

[0048] The anti-counterfeiting and traceability management platform generates a verification result and returns the verification result to the user terminal for display.

[0049] Preferably, the model evolution module is specifically configured as follows:

[0050] When the preset time period arrives, an offline training task is triggered to read all high-risk sample data accumulated in the previous period from the abnormal sample library in batches.

[0051] The swaying data sequence in the high-risk sample data is used as a real positive sample and input into the discriminator model in the generative adversarial network.

[0052] Simulated shaking data is randomly generated by the generator model in the generative adversarial network and input as a fake negative sample into the discriminator model.

[0053] The discriminator model is instructed to perform binary classification on the real positive samples and the fake negative samples, and the loss function is calculated based on the classification results. The network parameters of the generator model and the discriminator model are alternately optimized through the backpropagation algorithm until the discriminator model can no longer distinguish between real positive samples and fake negative samples, thus completing the model training.

[0054] The internal feature weights for classifying and judging the shaking data sequence are extracted from the trained discriminator model. Based on the internal feature weights, the third threshold of the variance value and the periodic judgment parameters of the peak distribution pattern in the second-level risk triggering condition are recalculated.

[0055] The distribution range of the first and second count values ​​in the high-risk sample data is statistically analyzed. Based on the distribution range, the time length of the preset historical time period, the first threshold and the second threshold in the first-level risk triggering condition are recalculated to generate updated threshold parameters and judgment rules.

[0056] Preferably, the rule deployment module is specifically configured as follows:

[0057] Package the updated threshold parameters and decision rules generated during offline training into a configuration file or rule set;

[0058] The configuration file or rule set is pushed to the rule engine of the online anti-counterfeiting and traceability system to replace the original threshold parameters and judgment rules.

[0059] The online anti-counterfeiting and traceability system loads the updated threshold parameters and judgment rules, and applies them to the first-level risk triggering condition judgment and the second-level risk triggering condition judgment of the subsequently received QR code scanning request data;

[0060] Record the timestamp and version number of this deployment, and update the rule version information of the online anti-counterfeiting and traceability system for future traceability and rollback.

[0061] Secondly, the present invention provides the following technical solution: a method for anti-counterfeiting and traceability management of publications, the method comprising:

[0062] In response to a user terminal's scanning operation of the anti-counterfeiting label on a publication, the system obtains scanning request data, which includes the anti-counterfeiting label code, scanning timestamp, terminal device fingerprint, and city-level geographic location information of the scanning location.

[0063] Based on the anti-counterfeiting label code, query the preset scanning log database to obtain the historical scanning records of the anti-counterfeiting label code within a preset historical time period. Based on the number of historical device fingerprints and the historical scanning timestamp in the historical scanning records, determine whether the current scanning meets the first-level risk triggering condition.

[0064] If the first-level risk triggering condition is met, a command to start liveness detection is sent to the user terminal, and the shaking data sequence collected by the gyroscope sensor is received from the user terminal. Otherwise, a verification pass result is returned to the user terminal.

[0065] Statistical feature analysis is performed on the shaking data sequence to calculate the variance and peak distribution pattern of the shaking data sequence;

[0066] Based on the variance and peak distribution patterns, determine whether the current scan meets the second-level risk triggering conditions;

[0067] If the second-level risk triggering condition is met, the current scanning record will be marked as a high-risk sample, and the anti-counterfeiting mark code, scanning timestamp, terminal device fingerprint, city-level geographic location information and shaking data sequence will be associated and stored in the abnormal sample database. Otherwise, the first-level risk mark will be removed, and the verification result will be returned to the user terminal.

[0068] Based on a preset period, high-risk sample data accumulated in the abnormal sample library is called, and a generative adversarial network is used for offline training to update the threshold parameters of the first-level risk triggering condition and the judgment rules of the second-level risk triggering condition.

[0069] The updated threshold parameters and judgment rules will be deployed to the online anti-counterfeiting and traceability system for subsequent scanning request processing.

[0070] The present invention has the following beneficial effects:

[0071] 1. This invention employs a two-tiered risk assessment mechanism. At the first tier, based on the number of device fingerprints and scanning frequency in historical scanning records, it identifies in real-time abnormal behavior where the same QR code is scanned multiple times by multiple devices within a short period, accurately capturing typical characteristics of cloning attacks from a behavioral perspective. At the second tier, it collects shaking data sequences using a gyroscope sensor and performs statistical analysis. Utilizing the fundamental differences in variance and peak value distribution between natural hand tremors and automated machine scanning, it further verifies the authenticity of the scanning behavior. This tiered prevention and control design ensures high-precision identification while avoiding the resource waste caused by performing deep computation on every request.

[0072] 2. In this invention, the shaking data sequences identified as high-risk samples at the second level are stored in an abnormal sample database. A generative adversarial network (GAN) is periodically invoked for offline training. The generator simulates counterfeit shaking data against real high-risk samples to perform adversarial learning, continuously optimizing the discriminator model's classification ability. Based on the training results, the threshold parameters of the two-level risk assessment rules are automatically updated. This mechanism enables the anti-counterfeiting system to continuously adapt to the evolution of new counterfeiting methods without frequent manual rule adjustments, effectively responding to the iterative upgrades of AI counterfeiting technology.

[0073] 3. In this invention, the timestamp, device fingerprint, geographic location information, and shaking data sequence of each scanning request are associated and stored to form a complete scanning behavior archive. When a certain anti-counterfeiting code is determined to be high-risk, the system can trace all scanning records of that code through the abnormal sample database, reverse analyze the spatiotemporal distribution pattern of piracy, and provide data support for publishing institutions to accurately locate high-incidence areas of piracy and take targeted measures to combat them, realizing the transformation from single anti-counterfeiting verification to full-process traceability management. Attached Figure Description

[0074] Figure 1 This is a schematic diagram of the architecture of a publication anti-counterfeiting and traceability management system proposed in this invention;

[0075] Figure 2 This is a flowchart illustrating a publication anti-counterfeiting and traceability management method proposed in this invention. Detailed Implementation

[0076] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0077] Example 1:

[0078] In a first embodiment of the present invention, the present invention provides a publication anti-counterfeiting and traceability management system, such as... Figure 1 As shown, it includes the following modules:

[0079] The data acquisition module is used to respond to the user terminal's scanning operation of the anti-counterfeiting label on the publication and acquire the scanning request data, which includes the anti-counterfeiting label code, the scanning timestamp, the terminal device fingerprint, and the city-level geographical location information of the scanning location.

[0080] Furthermore, the data acquisition module is specifically configured as follows:

[0081] The user terminal scans the anti-counterfeiting label on the publication using its built-in camera, and then analyzes the anti-counterfeiting label to obtain the anti-counterfeiting label code.

[0082] In response to the scanning operation, the user terminal automatically reads the current system time and generates a scanning timestamp.

[0083] The user terminal calls the device identifier interface provided by the operating system to obtain the terminal device fingerprint that has been hashed and encrypted.

[0084] User terminals obtain their current city-level geographic location information based on network location services;

[0085] The user terminal encapsulates the anti-counterfeiting label code, scanning timestamp, terminal device fingerprint, and city-level geographic location information into scanning request data, and sends it to the anti-counterfeiting traceability management platform via the network.

[0086] Specifically, the data acquisition module is configured to acquire scan request data in response to the user terminal's scanning operation of the anti-counterfeiting label on the publication. The scan request data includes the anti-counterfeiting label code, the scan timestamp, the terminal device fingerprint, and the city-level geographic location information of the scan location.

[0087] Specifically, the user terminal is a smartphone with a WeChat mini-program or Alipay mini-program installed. The user scans the anti-counterfeiting label printed on the cover or back cover of the publication using the built-in camera of the user terminal. The anti-counterfeiting label is a QR code or barcode. The user terminal calls the scanning interface provided by the WeChat mini-program or Alipay mini-program to decode the scanned image and obtain the anti-counterfeiting label code. The anti-counterfeiting label code is a globally unique identifier, corresponding to a unique code for each publication. In response to the scanning operation, the user terminal calls the system time reading interface provided by the operating system to obtain the current system time, formats it into a standard time string, and generates a scan timestamp. The scan timestamp is accurate to the second.

[0088] The user terminal calls the device identifier acquisition interface provided by the WeChat Mini Program or Alipay Mini Program to obtain the terminal's device identifier. The device identifier is the WeChat OpenID, Alipay UserID, or device IMEI number. To prevent user privacy leakage, the user terminal performs hash encryption processing on the obtained device identifier, using MD5 or SHA-256 algorithms to salt the device identifier and calculate the hash value, generating an irreversible terminal device fingerprint. The user terminal calls the location service interface provided by the WeChat Mini Program or Alipay Mini Program to obtain the current geographical location information based on the network location service. The raw data returned by the location service interface includes longitude and latitude coordinates. The user terminal performs reverse geocoding parsing on the longitude and latitude coordinates, converting them into corresponding city-level geographical location information. The city-level geographical location information specifically includes the names of provincial-level administrative regions and prefecture-level administrative regions. The user terminal encapsulates the anti-counterfeiting label code, scanning timestamp, terminal device fingerprint, and city-level geographical location information into JSON format scanning request data. The user terminal sends the scanning request data to the anti-counterfeiting traceability management platform via HTTPS protocol. The anti-counterfeiting and traceability management platform receives and parses the scanning request data, and stores the parsed anti-counterfeiting mark code, scanning timestamp, terminal device fingerprint, and city-level geographical location information into the scanning log database for subsequent modules to call.

[0089] The first-level risk assessment module is used to query a preset scanning log database based on the anti-counterfeiting label code, obtain the historical scanning records of the anti-counterfeiting label code within a preset historical time period, and determine whether the current scanning meets the first-level risk triggering conditions based on the number of historical device fingerprints and the historical scanning timestamp in the historical scanning records.

[0090] Furthermore, the specific configuration of the first-level risk assessment module is as follows:

[0091] Based on the anti-counterfeiting mark code, all historical scanning records within a preset historical time period are retrieved from the scanning log database;

[0092] Extract all historical device fingerprints associated with the anti-counterfeiting label code from historical scanning records, and count the number of fingerprints from different historical devices as the first count value;

[0093] Extract all historical scanning timestamps from historical scanning records, and count the total number of historical scans associated with anti-counterfeiting code within a preset historical time period as a second count value;

[0094] The first count value is compared with a preset first threshold, and the second count value is compared with a preset second threshold;

[0095] If the first count value is greater than the first threshold, or the second count value is greater than the second threshold, then the current scan is determined to meet the first-level risk triggering condition.

[0096] Specifically, the first-level risk assessment module is configured to query a preset scanning log database based on the anti-counterfeiting label code, obtain historical scanning records of the anti-counterfeiting label code within a preset historical time period, and determine whether the current scanning meets the first-level risk triggering conditions based on the number of historical device fingerprints and the historical scanning timestamp in the historical scanning records.

[0097] Specifically, the anti-counterfeiting and traceability management platform extracts the anti-counterfeiting identifier code from the barcode scanning request data, denoted as Code. The platform also obtains the current system time, denoted as Time. Set a preset historical time period length, denoted as Δt, where Δt ranges from 1 hour to 24 hours. The anti-counterfeiting and traceability management platform uses the anti-counterfeiting identifier code (Code) as the primary key and the current time as the secondary key. Based on this, a time query range is constructed by tracing back a preset historical time period length Δt. The anti-counterfeiting and traceability management platform sends a query request to the barcode scanning log database.

[0098] The anti-counterfeiting and traceability management platform receives a query result set from the barcode scanning log database. This result set contains all historical barcode scanning records associated with the anti-counterfeiting identifier within a preset historical time period. Each historical barcode scanning record includes at least two fields: the historical device fingerprint and the historical scanning timestamp. The anti-counterfeiting and traceability management platform extracts all historical device fingerprint field values ​​from the query result set to construct a device fingerprint set. The device fingerprint set F is deduplicated, and the number of different historical device fingerprints is counted to generate a first count value. First count value The calculation formula is: ,in, The cardinality of a set is the number of unique elements in the set.

[0099] The anti-counterfeiting and traceability management platform extracts all historical scan timestamp field values ​​from the query results set and constructs a timestamp list. Count the total number of timestamps in the timestamp list and generate a second count value. Second count value The calculation formula is: Where m is the total number of historical QR code scanning records in the query result set.

[0100] The anti-counterfeiting and traceability management platform has a preset first threshold. Second threshold First threshold The value range is 3 to 10, the second threshold The value ranges from 5 to 20. The anti-counterfeiting and traceability management platform will use the first count value. With the first threshold Compare and use the second count value With the second threshold Perform a comparison. If... > or > If the anti-counterfeiting and traceability management platform determines that the current scan meets the first-level risk triggering conditions, it generates a first-level risk triggering identifier and stores it in association with the current scan request. ≤ and ≤ If the anti-counterfeiting and traceability management platform determines that the current scan does not meet the first-level risk triggering conditions, it will not generate a first-level risk triggering identifier.

[0101] The first-level result processing module is used to send a command to start liveness detection to the user terminal if the first-level risk triggering conditions are met, and to receive the shaking data sequence collected by the gyroscope sensor returned by the user terminal. If not, it returns a verification pass result to the user terminal.

[0102] Furthermore, the first-level result processing module is specifically configured as follows:

[0103] If the current scan meets the first-level risk triggering conditions, the anti-counterfeiting and traceability management platform generates a liveness detection command and sends the command to the user terminal.

[0104] In response to the liveness detection command, the user terminal calls the built-in gyroscope sensor to collect the three-axis angular velocity data generated by the user shaking the terminal device within a preset time period in real time, and generates a shaking data sequence.

[0105] The user terminal encapsulates the shaking data sequence and sends it to the anti-counterfeiting and traceability management platform via the network;

[0106] The anti-counterfeiting and traceability management platform receives and stores the shaking data sequence for subsequent analysis and processing;

[0107] If the current scan does not meet the first-level risk triggering conditions, the anti-counterfeiting and traceability management platform will directly generate a verification result and return the verification result to the user's terminal for display.

[0108] Specifically, the first-level result processing module is configured to send a command to start liveness detection to the user terminal if the first-level risk triggering condition is met, and receive the shaking data sequence collected by the gyroscope sensor returned by the user terminal; if the first-level risk triggering condition is not met, it returns a verification pass result to the user terminal.

[0109] Specifically, the anti-counterfeiting and traceability management platform obtains the first-level risk trigger identifier generated by the first-level risk assessment module. If the first-level risk trigger identifier exists, it indicates that the current scan meets the first-level risk trigger condition, and the anti-counterfeiting and traceability management platform executes the liveness detection process. The anti-counterfeiting and traceability management platform generates a start liveness detection command, which is a JSON format data packet containing a command type field and a parameter configuration field. The command type field has the value "start_liveness_detection", and the parameter configuration field includes a preset collection duration parameter. , The value range is from 2 seconds to 5 seconds. The anti-counterfeiting and traceability management platform sends the liveness detection start command to the user terminal via HTTPS protocol.

[0110] The user terminal receives the command to start liveness detection and parses the preset acquisition duration parameter in the command. The user terminal calls the gyroscope sensor API interface provided by the operating system to activate the built-in gyroscope sensor. The gyroscope sensor operates at a preset sampling frequency. Collect data, The value range is 50Hz to 100Hz, meaning it collects 50 to 100 data points per second. The gyroscope sensor operates for a preset data acquisition time. The system continuously acquires data to generate a triaxial angular velocity data sequence. The triaxial angular velocity data includes angular velocity components related to rotation around the X-axis. Angular velocity component of rotation about the Y-axis Angular velocity component of rotation about the Z-axis Each sampling time point The corresponding three-axis angular velocity data constitute a three-dimensional vector. The shaking data sequence S is represented as:

[0111] ;

[0112] Where n is the total number of sampling points, .

[0113] The user terminal encapsulates the collected shaking data sequence S into a JSON-formatted data packet. Here, t represents the offset relative to the start time of data collection, in seconds; x, y, and z are the three-axis angular velocity components at the corresponding time points, in radians per second. The user terminal sends the shaking data sequence to the anti-counterfeiting and traceability management platform via HTTPS. The platform receives the shaking data sequence, parses it, and extracts the bookCode and gyroData fields. The platform then associates the shaking data sequence with the anti-counterfeiting identifier code of the current scanning request and stores it in a temporary data cache for subsequent use by the liveness data analysis module.

[0114] If the Level 1 risk trigger identifier does not exist, it means that the current scan does not meet the Level 1 risk trigger condition, and the anti-counterfeiting and traceability management platform executes the normal release process. The anti-counterfeiting and traceability management platform generates a verification pass result, which is a JSON format data packet containing a result status field and a prompt message field. The result status field value is "success", and the prompt message field value is "Genuine product verification passed". The anti-counterfeiting and traceability management platform returns the verification pass result to the user terminal via the HTTPS protocol. The user terminal receives the verification pass result and displays the genuine product verification pass message on the interface.

[0115] The live data analysis module is used to perform statistical characteristic analysis on the shaking data sequence, and to calculate the variance and peak distribution pattern of the shaking data sequence.

[0116] Furthermore, the specific configuration of the live data analysis module is as follows:

[0117] The anti-counterfeiting and traceability management platform receives and parses the shaking data sequence, and extracts the triaxial angular velocity values ​​at continuous time points contained in the shaking data sequence;

[0118] Based on the three-axis angular velocity values, the resultant angular velocity value at each time point is calculated to generate a one-dimensional sway amplitude sequence;

[0119] Perform statistical calculations on the one-dimensional sway amplitude sequence to determine the degree of deviation between all sway amplitude values ​​and the sequence mean, and generate the variance value;

[0120] Peak detection is performed on a one-dimensional sway amplitude sequence to identify the location of local maxima in the sequence, and the time interval between adjacent peaks is statistically analyzed to generate peak distribution patterns.

[0121] Specifically, the live data analysis module is configured to perform statistical feature analysis on the shaking data sequence, and calculate the variance and peak distribution pattern of the shaking data sequence.

[0122] Specifically, the anti-counterfeiting and traceability management platform reads the shaking data sequence S associated with the current anti-counterfeiting identifier code from the temporary data cache. The shaking data sequence S contains triaxial angular velocity data at n sampling time points, each sampling time point The corresponding data is ( The value of i ranges from 1 to n. The anti-counterfeiting and traceability management platform calculates the combined angular velocity from the triaxial angular velocity data at each sampling time point, generating a one-dimensional sway amplitude sequence A. The combined angular velocity value... The calculation formula is:

[0123] ;

[0124] in, The angular velocity component of the rotation about the X-axis. The angular velocity component of the rotation about the Y-axis. Let A be the angular velocity component of the rotation about the Z-axis, with units of radians per second. Through the above calculations, the one-dimensional sway amplitude sequence A is obtained. .

[0125] The anti-counterfeiting and traceability management platform performs statistical calculations on the one-dimensional sway amplitude sequence A, calculates the deviation between all sway amplitude values ​​and the sequence mean, and generates a variance value. The specific calculation process includes: first, calculating the arithmetic mean μ of the one-dimensional sway amplitude sequence A, using the following formula:

[0126] ;

[0127] Where n is the total number of sampling points, Let be the resultant angular velocity value of the i-th sampling point. Then calculate the resultant angular velocity value and the mean value for each sampling point. The squared deviations are summed and then divided by the number of sampling points n to obtain the variance. The calculation formula is:

[0128] ;

[0129] The anti-counterfeiting and traceability management platform performs peak detection on a one-dimensional sway amplitude sequence A to identify the locations of local maxima in the sequence. Peak detection employs a sliding window comparison method, comparing each point in the sequence... If both of the following conditions are met simultaneously, then the point is determined to be a peak point:

[0130] Condition one: and That is, the value at this point is greater than the values ​​of its immediate and adjacent points; Condition 2: .in The preset peak amplitude threshold is used to filter out noise interference. The value of ε ranges from 0.1 radians per second to 0.5 radians per second.

[0131] The anti-counterfeiting and traceability management platform records the positions of all peak points that meet the conditions on their corresponding time axes, generating a peak position sequence. Where k is the total number of detected peak points, each This represents the sampling time index corresponding to the j-th peak point.

[0132] The anti-counterfeiting and traceability management platform calculates the time interval between adjacent peaks based on the peak position sequence P. For two adjacent peak points... and The time interval Δ The calculation formula is:

[0133] ;

[0134] in, This is the sampling time interval, in seconds. , This refers to the sampling frequency of the gyroscope sensor. The anti-counterfeiting and traceability management platform counts the time intervals between all adjacent peak values, generating a peak interval sequence. The peak interval sequence is used as the peak distribution pattern. The anti-counterfeiting and traceability management platform will calculate the variance value. The peak interval sequence ΔT is associated with the current anti-counterfeiting mark code and stored for use by the second-level risk assessment module.

[0135] The second-level risk assessment module is used to determine whether the current scan meets the second-level risk triggering conditions based on the variance value and peak distribution pattern.

[0136] Furthermore, the specific configuration of the second-level risk assessment module is as follows:

[0137] The variance value is compared with a preset third threshold.

[0138] Analyze the peak distribution pattern to determine whether the time interval between adjacent peaks exhibits a periodic repetition characteristic;

[0139] If the variance value is lower than the third threshold and the time interval between adjacent peaks shows a periodic repetition characteristic, then the current scan is determined to meet the second-level risk triggering condition and is identified as a high-risk scan behavior.

[0140] If the variance value is not lower than the third threshold, or the time interval between adjacent peaks does not show periodic repetition, then the current scan does not meet the second-level risk triggering condition and is identified as normal manual scan behavior.

[0141] Specifically, the second-level risk assessment module is configured to determine whether the current scan meets the second-level risk triggering conditions based on variance and peak distribution patterns.

[0142] Specifically, the anti-counterfeiting and traceability management platform obtains the variance value associated with the current anti-counterfeiting label code from the liveness data analysis module. and peak interval sequence Where k is the total number of peak points and k-1 is the number of peak intervals. The anti-counterfeiting and traceability management platform has a preset third threshold. The third threshold The value ranges from 0.5 to 2.0. The anti-counterfeiting and traceability management platform will use the variance value. With the third threshold The comparison is performed to generate variance comparison results. The anti-counterfeiting and traceability management platform analyzes the peak interval sequence. Periodicity analysis is performed to determine whether the time intervals between adjacent peaks exhibit periodic repetition. The periodicity analysis uses the coefficient of variation method, and the specific calculation process is as follows:

[0143] First, calculate the arithmetic mean of the peak interval sequence ΔT. The calculation formula is:

[0144] ;

[0145] Where k-1 is the number of peak intervals, This represents the j-th peak interval.

[0146] Then calculate the standard deviation of the peak interval sequence ΔT. The calculation formula is:

[0147] ;

[0148] Next, the coefficient of variation (CV) of the peak-interval sequence ΔT is calculated using the following formula:

[0149] ;

[0150] The coefficient of variation (CV) is used to measure the dispersion of the peak interval sequence. The smaller the CV value, the more stable the peak interval and the more obvious the periodicity.

[0151] The anti-counterfeiting and traceability management platform has preset periodic judgment thresholds. , The value range is from 0.1 to 0.3. If CV < If the peak interval sequence exhibits periodic repetition, then it is determined that the CV ≥ If the peak interval sequence does not exhibit periodic repetition, then the anti-counterfeiting and traceability management platform performs a second-level risk assessment based on the variance comparison results and periodic analysis results. If... < And CV < If the variance value is lower than the third threshold and the peak interval shows a periodic repetition characteristic, the anti-counterfeiting and traceability management platform determines that the current scan meets the second-level risk triggering conditions, identifies it as a high-risk scan behavior, and generates a second-level risk triggering identifier.

[0152] like ≥ or CV≥ If the variance value is not lower than the third threshold or the peak interval does not exhibit periodic repetition, the anti-counterfeiting and traceability management platform determines that the current scan does not meet the second-level risk triggering conditions and classifies it as normal manual scanning behavior, and does not generate a second-level risk triggering identifier. The anti-counterfeiting and traceability management platform associates and stores the second-level risk triggering identifier with the current scan request for use by the second-level result processing module.

[0153] The second-level result processing module is used to mark the current scan record as a high-risk sample if the second-level risk triggering conditions are met, and to associate and store the anti-counterfeiting mark code, scan timestamp, terminal device fingerprint, city-level geographical location information and shaking data sequence into the abnormal sample database. If not, the first-level risk mark is removed and the verification result is returned to the user terminal.

[0154] Furthermore, the second-level result processing module is specifically configured as follows:

[0155] If the current scan meets the second-level risk triggering conditions, the anti-counterfeiting and traceability management platform will add a high-risk label to the current scan record and generate high-risk sample data.

[0156] High-risk sample data is associated and bound with anti-counterfeiting label codes, scanning timestamps, terminal device fingerprints, city-level geographic location information, and shaking data sequences to form a complete record of abnormal samples;

[0157] The abnormal sample records are persistently stored in the preset abnormal sample library, and the risk level field of the current scan record in the scan log database is updated synchronously.

[0158] If the current scan does not meet the second-level risk triggering conditions, the anti-counterfeiting and traceability management platform will query and locate the first-level risk marker record corresponding to the current scan in the scan log database;

[0159] Clear the first-level risk marker record and remove the risk marker status from the current scan;

[0160] The anti-counterfeiting and traceability management platform generates a verification result and returns it to the user's terminal for display.

[0161] Specifically, the second-level result processing module is configured to mark the current scan record as a high-risk sample if the second-level risk triggering conditions are met, and to associate and store the anti-counterfeiting mark code, scan timestamp, terminal device fingerprint, city-level geographic location information, and shaking data sequence into the abnormal sample database; if the second-level risk triggering conditions are not met, the first-level risk mark is removed, and a verification pass result is returned to the user terminal.

[0162] Specifically, the anti-counterfeiting and traceability management platform obtains the second-level risk trigger identifier generated by the second-level risk assessment module. If the second-level risk trigger identifier exists, it indicates that the current scan meets the second-level risk trigger condition, and the anti-counterfeiting and traceability management platform executes the high-risk sample entry process. The anti-counterfeiting and traceability management platform adds a high-risk tag to the current scan record, with the value of the high-risk tag being "high_risk". The anti-counterfeiting and traceability management platform obtains the anti-counterfeiting identifier code (Code) and the scan timestamp of the current scan request from the data acquisition module. fingerprint of terminal device City-level geographic location information The system retrieves the shaking data sequence S associated with the current anti-counterfeiting label code from the temporary data cache. The anti-counterfeiting traceability management platform then associates and binds this data to construct a high-risk sample data object H. Here, recordId is a unique identifier for the high-risk sample record, generated by combining a timestamp and a sequence number.

[0163] The anti-counterfeiting and traceability management platform persistently stores high-risk sample data object H in a pre-defined abnormal sample database. This abnormal sample database is a separate database or table specifically designed to store sample data identified as high-risk scanning behavior. The platform synchronously updates the risk level field of the current scanning record in the scanning log database, setting its value to "high_risk" to maintain consistency with the records in the abnormal sample database.

[0164] If the Level 2 risk trigger identifier does not exist, it means that the current scan does not meet the Level 2 risk trigger conditions, and the anti-counterfeiting traceability management platform will execute the normal release and marker removal process. The anti-counterfeiting traceability management platform queries the scan log database to locate the current anti-counterfeiting identifier code and scan timestamp. The corresponding Level 1 risk marker record. The Level 1 risk marker record is a temporary marker created in the barcode scanning log database when the Level 1 risk assessment module generates the Level 1 risk trigger identifier. The anti-counterfeiting and traceability management platform performs a database update operation, clearing the Level 1 risk marker record, setting the corresponding risk marker field value to NULL or an empty value, and removing the risk marker status from the currently scanned barcode.

[0165] The anti-counterfeiting and traceability management platform generates a verification result, which is a JSON-formatted data packet containing a result status field and a notification field. The result status field has a value of "success," and the notification field has a value of "Genuine product verification passed." The anti-counterfeiting and traceability management platform returns the verification result to the user terminal via the HTTPS protocol. Upon receiving the verification result, the user terminal displays a notification message indicating that the product has been verified as genuine, and can also display content related to genuine rights, such as e-book gift links and author messages, depending on the configuration.

[0166] The model evolution module is used to call high-risk sample data accumulated in the abnormal sample library based on a preset period, use generative adversarial networks for offline training, and update the threshold parameters of the first-level risk triggering conditions and the judgment rules of the second-level risk triggering conditions.

[0167] Furthermore, the specific configuration of the model evolution module is as follows:

[0168] When the preset time period arrives, the offline training task is triggered to read all high-risk sample data accumulated in the previous period from the abnormal sample library in batches.

[0169] The swaying data sequence in the high-risk sample data is used as a real positive sample input into the discriminator model in the generative adversarial network;

[0170] Simulated shaking data is randomly generated by the generator model in the generative adversarial network and used as fake negative samples to be input into the discriminator model.

[0171] The discriminator model is instructed to perform binary classification of real positive samples and fake negative samples, and the loss function is calculated based on the classification results. The network parameters of the generator model and the discriminator model are alternately optimized through the backpropagation algorithm until the discriminator model can no longer distinguish between real positive samples and fake negative samples, thus completing the model training.

[0172] The internal feature weights for classifying and judging the shaking data sequence are extracted from the trained discriminator model. Based on the internal feature weights, the third threshold of the variance value and the periodic judgment parameters of the peak distribution pattern are recalculated for the second-level risk triggering conditions.

[0173] The distribution range of the first and second count values ​​in the high-risk sample data is statistically analyzed. Based on the distribution range, the time length of the preset historical time period, the first threshold and the second threshold in the first-level risk triggering condition are recalculated to generate updated threshold parameters and judgment rules.

[0174] Specifically, the model evolution module is configured to call high-risk sample data accumulated in the abnormal sample library based on a preset period, use generative adversarial networks for offline training, and update the threshold parameters of the first-level risk triggering conditions and the judgment rules of the second-level risk triggering conditions.

[0175] Specifically, the anti-counterfeiting and traceability management platform has preset time period parameters. , The value range is 7 to 30 days. When the system time reaches the preset time period node, the anti-counterfeiting and traceability management platform automatically triggers the offline training task. The anti-counterfeiting and traceability management platform sends a query request to the abnormal sample database to batch read all high-risk sample data accumulated in the previous time period. High-risk sample data includes the shaking data sequence in the high-risk sample records. First count value Second count value The platform also includes the anti-counterfeiting label code and scanning timestamp corresponding to each sample. The anti-counterfeiting traceability management platform constructs a generative adversarial network (GAN) model, which consists of a generator model G and a discriminator model D. The generator model G is a deep neural network; its input is a random noise vector z, and its output is a simulated shaking data sequence. The discriminator model D is a deep neural network. The input is a shaking data sequence, and the output is the probability value of the sequence being a real sample, with a value ranging from 0 to 1.

[0176] The anti-counterfeiting and traceability management platform extracts all shaking data sequences from high-risk sample data to construct a real positive sample set. Where m is the total number of high-risk samples. The true positive sample set... As positive training samples for the discriminator model D, the anti-counterfeiting and traceability management platform executes the generative adversarial network training process, which includes the following steps: First, the generator model G samples noise vector z ~ N(0,1) from the random noise space and generates a simulated shaking data sequence through forward propagation. =G(z), which simulates the shaking data sequence. As a fake negative sample; the second step is to use the real positive sample. l and fake negative samples The mixed input is fed into the discriminator model D. Discriminator model D classifies each input sample and outputs the probability D(S) that the sample is a true sample. The loss function of discriminator model D is... The calculation formula is:

[0177] ;

[0178] in, This represents the expectation of the true positive sample set. This represents calculating the expectation over the set of fake negative samples. The third step is the loss function of the generator model G. The calculation formula is:

[0179] ;

[0180] The fourth step involves alternately updating the network parameters of the generator model G and the discriminator model D using the backpropagation algorithm and the Adam optimizer. The parameters of the discriminator model D are fixed, and the network is minimized. Update the parameters of the generator model G; fix the parameters of the generator model G and minimize... Update the parameters of the discriminator model D. Repeat the above steps for iterative training until the discriminator model D can no longer distinguish between real positive samples and fake negative samples, i.e., D( l)≈0.5 and D( The value is approximately 0.5, indicating that model training is complete.

[0181] After training, the anti-counterfeiting and traceability management platform extracts internal feature weights for classifying and judging the shaking data sequence from the trained discriminator model D. Specifically, it extracts the weight matrix W between the last hidden layer and the output layer of discriminator model D, calculates the contribution of each feature dimension in the weight matrix W, and recalculates the judgment parameters for the second-level risk triggering condition based on the contribution. The anti-counterfeiting and traceability management platform recalculates the third threshold based on the internal feature weights. The calculation formula is:

[0182] ;

[0183] in, Let W be the mean of the weight matrix. Let W be the standard deviation of the weight matrix W, and α be the adjustment coefficient, ranging from 1.0 to 2.0.

[0184] The anti-counterfeiting and traceability management platform recalculates the periodic judgment threshold based on internal feature weights. The calculation formula is:

[0185] ;

[0186] Where β is the scaling factor, and its value ranges from 0.1 to 0.3.

[0187] The anti-counterfeiting and traceability management platform counts the first value in high-risk sample data. The distribution range is determined, and the percentile of the first count value is calculated. A percentile threshold is set. The value ranges from 80% to 95%. Calculation of Percentile as the first threshold The calculation formula is:

[0188] ;

[0189] The anti-counterfeiting and traceability management platform counts the second count value in high-risk sample data. Given the distribution range, calculate the percentile of the second count value. Set a percentile threshold. The value ranges from 80% to 95%. Calculation of Percentile as the second threshold The calculation formula is:

[0190] ;

[0191] The anti-counterfeiting and traceability management platform statistically analyzes the distribution of time intervals between two consecutive scans in high-risk sample data and calculates the percentiles of these time intervals. A percentile threshold is then set. The value ranges from 80% to 95%, and the calculation time interval is... Percentiles as a new length for a preset historical time period The calculation formula is:

[0192] ;

[0193] The anti-counterfeiting and traceability management platform will update the threshold parameters. , , , , The corresponding judgment rules are packaged to generate updated threshold parameters and judgment rule sets for the rule deployment module to call.

[0194] The rule deployment module is used to deploy the updated threshold parameters and judgment rules to the online anti-counterfeiting and traceability system for subsequent scanning request processing.

[0195] Furthermore, the specific configuration of the rule deployment module is as follows:

[0196] Package the updated threshold parameters and decision rules generated during offline training into a configuration file or rule set;

[0197] Push the configuration file or rule set to the rule engine of the online anti-counterfeiting and traceability system to replace the original threshold parameters and judgment rules;

[0198] The online anti-counterfeiting and traceability system loads the updated threshold parameters and judgment rules, and applies them to the first-level risk trigger condition judgment and the second-level risk trigger condition judgment of the subsequently received scan request data;

[0199] Record the timestamp and version number of this deployment, and update the rule version information of the online anti-counterfeiting and traceability system for future traceability and rollback.

[0200] Specifically, the rule deployment module is configured to deploy the updated threshold parameters and judgment rules to the online anti-counterfeiting and traceability system for subsequent QR code scanning request processing.

[0201] Specifically, the anti-counterfeiting and traceability management platform obtains updated threshold parameters and judgment rule sets from the model evolution module. The updated threshold parameters and judgment rule sets include the new preset historical time period length for the first-level risk triggering conditions. New first threshold New second threshold And a new third threshold for triggering level two risks. New periodicity determination threshold The anti-counterfeiting and traceability management platform formats the updated threshold parameters and judgment rule sets to generate configuration files or rule sets. The configuration files are in JSON or YAML format for easy parsing and loading.

[0202] The anti-counterfeiting and traceability management platform pushes the generated configuration file or rule set to the rule engine of the online anti-counterfeiting and traceability system. The push process is implemented through internal API calls; the anti-counterfeiting and traceability management platform sends an HTTP POST request to the rule engine, with the request body containing the configuration file content. After receiving the configuration file, the rule engine performs pre-loading validation operations, including format validation and value range validation, to ensure the integrity and correctness of the configuration file. Once validation passes, the rule engine loads the new threshold parameters and judgment rules from the configuration file into memory, replacing the original threshold parameters and judgment rules. The rule engine supports a hot-reload mechanism, taking effect without restarting the service, ensuring the continuous availability of the online anti-counterfeiting and traceability system.

[0203] The rules engine applies the updated threshold parameters and judgment rules to all subsequent received QR code scanning requests. Specifically, for a newly received QR code scanning request, the first-level risk judgment module calls the newly preset historical time period length loaded in the rules engine. New first threshold New second threshold The first-level risk trigger condition is determined; the second-level risk assessment module calls the new third threshold loaded in the rule engine. New periodicity determination threshold The second-level risk trigger condition judgment is performed. The anti-counterfeiting and traceability management platform records relevant information for this deployment, including the deployment timestamp and rule version number. The deployment timestamp is accurate to the second, and the rule version number adopts a semantic version number format, such as "2.0.0". The anti-counterfeiting and traceability management platform stores the deployment timestamp and rule version number in the rule version management table. The anti-counterfeiting and traceability management platform synchronously updates the current rule version information of the online anti-counterfeiting and traceability system, updating the rule version field in the system status to the new version number.

[0204] The anti-counterfeiting and traceability management platform retains configuration files from historical versions for future tracing and rollback. When a rollback to a historical version is required, the platform reads the configuration file content of the specified historical version from the rule version management table, re-pushes it to the rule engine, and executes the same deployment process as described above.

[0205] Example 2:

[0206] In the field of anti-counterfeiting and traceability management of publications, existing technical solutions mainly combine physical anti-counterfeiting labels with one-item-one-code QR codes. This involves printing uniquely coded anti-counterfeiting labels on publications and establishing a corresponding anti-counterfeiting query database. Readers can verify the authenticity of purchased publications by scanning the QR code. However, this traditional anti-counterfeiting and traceability method has the following technical problems: Because the anti-counterfeiting verification mechanism only verifies the validity of the QR code itself, when a pirate purchases a genuine publication and copies its real QR code, then prints the same QR code on pirated publications in bulk, when a reader scans the QR code on a pirated book, the anti-counterfeiting system can only identify that the QR code exists in the database, but cannot distinguish whether the current scan corresponds to a genuine or pirated publication, nor can it identify cloning attacks where the same QR code is repeatedly scanned by a large number of different terminal devices. This makes it difficult for one-item-one-code anti-counterfeiting technology to effectively curb publication piracy in practical applications. To solve the above problems, this invention provides a method for anti-counterfeiting and traceability management of publications, the structure of which is as follows: Figure 2 As shown. The specific implementation process of this method is as follows:

[0207] In response to the user terminal's scanning operation of the anti-counterfeiting label on the publication, the scanning request data is obtained, which includes the anti-counterfeiting label code, the scanning timestamp, the terminal device fingerprint, and the city-level geographic location information of the scanning location.

[0208] Based on the anti-counterfeiting label code, query the preset scanning log database to obtain the historical scanning records of the anti-counterfeiting label code within the preset historical time period. Based on the number of historical device fingerprints and the historical scanning timestamp in the historical scanning records, determine whether the current scanning meets the first-level risk triggering conditions.

[0209] If the first-level risk trigger condition is met, a command to start liveness detection is sent to the user terminal, and the shaking data sequence collected by the gyroscope sensor is received from the user terminal. Otherwise, a verification pass result is returned to the user terminal.

[0210] Perform statistical characteristic analysis on the swaying data sequence to calculate the variance and peak distribution pattern of the swaying data sequence;

[0211] Based on the variance and peak distribution patterns, determine whether the current scan meets the second-level risk triggering conditions;

[0212] If the second-level risk triggering condition is met, the current scan record will be marked as a high-risk sample, and the anti-counterfeiting mark code, scan timestamp, terminal device fingerprint, city-level geographic location information and shaking data sequence will be associated and stored in the abnormal sample database. Otherwise, the first-level risk mark will be removed, and the verification result will be returned to the user terminal.

[0213] Based on a preset period, high-risk sample data accumulated in the abnormal sample library is called, and a generative adversarial network is used for offline training to update the threshold parameters of the first-level risk triggering condition and the judgment rules of the second-level risk triggering condition.

[0214] The updated threshold parameters and judgment rules will be deployed to the online anti-counterfeiting and traceability system for subsequent scanning request processing.

[0215] Specifically, when the first-level risk assessment module determines that the current scan meets the first-level risk triggering condition, the anti-counterfeiting and traceability management platform sends a liveness detection command to the user terminal. The user terminal responds by calling its built-in gyroscope sensor to collect the three-axis angular velocity data generated by the user shaking the device within a preset time period and generates a shaking data sequence, which is then returned to the anti-counterfeiting and traceability management platform. The platform performs statistical feature analysis on the received shaking data sequence, generating a one-dimensional shaking amplitude sequence by calculating the resultant angular velocity value of the three-axis angular velocities at each time point. It then calculates the variance of this sequence to measure the dispersion of the shaking amplitude and identifies the location of local maxima in the sequence through peak detection, statistically analyzing the time interval between adjacent peaks to generate a peak distribution pattern. The second-level risk assessment module makes a judgment based on the calculated variance and peak distribution pattern. If the variance is lower than a preset third threshold and the peak intervals exhibit periodic repetition, the current scan is determined to meet the second-level risk triggering condition and is identified as a high-risk scanning behavior.

[0216] If the second-level risk triggering condition is met, the second-level result processing module marks the current scan record as a high-risk sample and stores the anti-counterfeiting mark code, scan timestamp, terminal device fingerprint, city-level geographic location information, and shaking data sequence in the abnormal sample library. If the second-level risk triggering condition is not met, the first-level risk mark is removed and the verification result is returned to the user terminal. The model evolution module reads the accumulated high-risk sample data from the abnormal sample library in batches according to a preset period, uses the shaking data sequence as a real positive sample as input to the discriminator model of the generative adversarial network, and randomly generates simulated shaking data as a fake negative sample through the generator model. Adversarial training is carried out by alternately optimizing the network parameters of the generator and the discriminator until the discriminator can no longer distinguish between real samples and fake samples. After training is completed, the internal feature weights are extracted from the discriminator model to recalculate the third threshold and periodic judgment parameters of the second-level risk triggering condition, and the distribution range of the first count value and the second count value in the high-risk sample data is statistically analyzed to recalculate the preset historical time period length, the first threshold and the second threshold of the first-level risk triggering condition, and generate updated threshold parameters and judgment rules.

[0217] The rule deployment module packages the updated threshold parameters and judgment rules into a configuration file and pushes it to the rule engine of the online anti-counterfeiting and traceability system. This replaces the original rules and loads them to apply the first and second level risk triggering conditions to subsequent scanning requests. At the same time, it records the timestamp and version number of this deployment for traceability and rollback.

[0218] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A publication anti-counterfeiting and traceability management system, characterized in that, Includes the following modules: The data acquisition module is used to respond to the user terminal's scanning operation of the anti-counterfeiting label on the publication and acquire the scanning request data, which includes the anti-counterfeiting label code, the scanning timestamp, the terminal device fingerprint, and the city-level geographical location information of the scanning location. The first-level risk assessment module is used to query a preset scanning log database based on the anti-counterfeiting label code, obtain the historical scanning records of the anti-counterfeiting label code within a preset historical time period, and determine whether the current scanning meets the first-level risk triggering conditions based on the number of historical device fingerprints and the historical scanning timestamp in the historical scanning records. The first-level result processing module is used to send an instruction to start liveness detection to the user terminal if the first-level risk triggering condition is met, and to receive the shaking data sequence collected by the gyroscope sensor returned by the user terminal; otherwise, it returns a verification pass result to the user terminal. The live data analysis module is used to perform statistical feature analysis on the shaking data sequence and calculate the variance and peak distribution pattern of the shaking data sequence. The second-level risk assessment module is used to determine whether the current scan meets the second-level risk triggering conditions based on the variance value and peak distribution pattern. The second-level result processing module is used to mark the current scan record as a high-risk sample if the second-level risk triggering condition is met, and to associate and store the anti-counterfeiting mark code, scan timestamp, terminal device fingerprint, city-level geographical location information and shaking data sequence into the abnormal sample database; otherwise, it removes the first-level risk mark and returns the verification result to the user terminal. The model evolution module is used to call high-risk sample data accumulated in the abnormal sample library based on a preset period, use a generative adversarial network for offline training, and update the threshold parameters of the first-level risk triggering condition and the judgment rules of the second-level risk triggering condition. The rule deployment module is used to deploy the updated threshold parameters and judgment rules to the online anti-counterfeiting and traceability system for subsequent scanning request processing.

2. The publication anti-counterfeiting and traceability management system according to claim 1, characterized in that, The data acquisition module is specifically configured as follows: The user terminal scans the anti-counterfeiting label on the publication using its built-in camera, and parses the anti-counterfeiting label to obtain the anti-counterfeiting label code; In response to the scanning operation, the user terminal automatically reads the current system time and generates a scanning timestamp. The user terminal calls the device identifier interface provided by the operating system to obtain the terminal device fingerprint that has been hashed and encrypted. User terminals obtain their current city-level geographic location information based on network location services; The user terminal encapsulates the anti-counterfeiting label code, scanning timestamp, terminal device fingerprint, and city-level geographic location information into scanning request data, and sends it to the anti-counterfeiting traceability management platform via the network.

3. The publication anti-counterfeiting and traceability management system according to claim 2, characterized in that, The first-level risk assessment module is specifically configured as follows: Based on the anti-counterfeiting mark code, all historical scanning records within a preset historical time period are retrieved from the scanning log database. Extract all historical device fingerprints associated with the anti-counterfeiting mark code from the historical scanning records, and count the number of fingerprints from different historical devices as the first count value; Extract all historical scanning timestamps from the historical scanning records, and count the total number of historical scans associated with the anti-counterfeiting mark code within the preset historical time period as a second count value; The first count value is compared with a preset first threshold, and the second count value is compared with a preset second threshold; If the first count value is greater than the first threshold, or the second count value is greater than the second threshold, then the current scan is determined to meet the first-level risk triggering condition.

4. The publication anti-counterfeiting and traceability management system according to claim 3, characterized in that, The first-level result processing module is specifically configured as follows: If the current scan meets the first-level risk triggering condition, the anti-counterfeiting and traceability management platform generates a liveness detection command and sends the command to the user terminal. In response to the activation liveness detection command, the user terminal calls the built-in gyroscope sensor to collect the three-axis angular velocity data generated by the user shaking the terminal device within a preset time period in real time, and generates a shaking data sequence. The user terminal encapsulates the shaking data sequence and sends it to the anti-counterfeiting and traceability management platform via the network; The anti-counterfeiting and traceability management platform receives and stores the shaking data sequence for subsequent analysis and processing; If the current scan does not meet the first-level risk triggering condition, the anti-counterfeiting and traceability management platform will directly generate a verification pass result and return the verification pass result to the user terminal for display.

5. The publication anti-counterfeiting and traceability management system according to claim 4, characterized in that, The specific configuration of the live data analysis module is as follows: The anti-counterfeiting and traceability management platform receives and parses the shaking data sequence, and extracts the triaxial angular velocity values ​​at consecutive time points contained in the shaking data sequence; Based on the three-axis angular velocity values, the resultant angular velocity value at each time point is calculated to generate a one-dimensional sway amplitude sequence; Statistical calculations are performed on the one-dimensional sway amplitude sequence to determine the degree of deviation between all sway amplitude values ​​and the sequence mean, and a variance value is generated. Peak detection is performed on the one-dimensional sway amplitude sequence to identify the location of local maxima in the sequence, and the time interval between adjacent peaks is statistically analyzed to generate a peak distribution pattern.

6. The publication anti-counterfeiting and traceability management system according to claim 5, characterized in that, The specific configuration of the second-level risk assessment module is as follows: The variance value is compared with a preset third threshold. Analyze the peak distribution pattern to determine whether the time interval between adjacent peaks exhibits a periodic repetition characteristic; If the variance value is lower than the third threshold and the time interval between adjacent peaks shows a periodic repetition characteristic, then the current scan is determined to meet the second-level risk triggering condition and is identified as a high-risk scan behavior. If the variance value is not lower than the third threshold, or the time interval between adjacent peaks does not exhibit periodic repetition, then the current scan does not meet the second-level risk triggering condition and is identified as normal manual scan behavior.

7. A publication anti-counterfeiting and traceability management system according to claim 6, characterized in that, The specific configuration of the second-level result processing module is as follows: If the current scan meets the second-level risk triggering condition, the anti-counterfeiting and traceability management platform adds a high-risk label to the current scan record and generates high-risk sample data. The high-risk sample data is associated and bound with the anti-counterfeiting label code, scanning timestamp, terminal device fingerprint, city-level geographic location information and shaking data sequence to form a complete abnormal sample record; The abnormal sample records are persistently stored in a preset abnormal sample database, and the risk level field of the current scan record in the scan log database is updated synchronously. If the current scan does not meet the second-level risk triggering conditions, the anti-counterfeiting traceability management platform will query and locate the first-level risk marker record corresponding to the current scan in the scan log database; Clear the first-level risk marker record and remove the risk marker status from the current scan. The anti-counterfeiting and traceability management platform generates a verification result and returns the verification result to the user terminal for display.

8. The publication anti-counterfeiting and traceability management system according to claim 1, characterized in that, The specific configuration of the model evolution module is as follows: When the preset time period arrives, an offline training task is triggered to read all high-risk sample data accumulated in the previous period from the abnormal sample library in batches. The swaying data sequence in the high-risk sample data is used as a real positive sample and input into the discriminator model in the generative adversarial network. Simulated shaking data is randomly generated by the generator model in the generative adversarial network and input as a fake negative sample into the discriminator model. The discriminator model is instructed to perform binary classification on the real positive samples and the fake negative samples, and the loss function is calculated based on the classification results. The network parameters of the generator model and the discriminator model are alternately optimized through the backpropagation algorithm until the discriminator model can no longer distinguish between real positive samples and fake negative samples, thus completing the model training. The internal feature weights for classifying and judging the shaking data sequence are extracted from the trained discriminator model. Based on the internal feature weights, the third threshold of the variance value and the periodic judgment parameters of the peak distribution pattern in the second-level risk triggering condition are recalculated. The distribution range of the first and second count values ​​in the high-risk sample data is statistically analyzed. Based on the distribution range, the time length of the preset historical time period, the first threshold and the second threshold in the first-level risk triggering condition are recalculated to generate updated threshold parameters and judgment rules.

9. A publication anti-counterfeiting and traceability management system according to claim 1, characterized in that, The rule deployment module is specifically configured as follows: Package the updated threshold parameters and decision rules generated during offline training into a configuration file or rule set; The configuration file or rule set is pushed to the rule engine of the online anti-counterfeiting and traceability system to replace the original threshold parameters and judgment rules. The online anti-counterfeiting and traceability system loads the updated threshold parameters and judgment rules, and applies them to the first-level risk triggering condition judgment and the second-level risk triggering condition judgment of the subsequently received QR code scanning request data; Record the timestamp and version number of this deployment, and update the rule version information of the online anti-counterfeiting and traceability system for future traceability and rollback.

10. A method for anti-counterfeiting and traceability management of publications, characterized in that, The method for a publication anti-counterfeiting and traceability management system according to any one of claims 1-9 includes: In response to a user terminal's scanning operation of the anti-counterfeiting label on a publication, the system obtains scanning request data, which includes the anti-counterfeiting label code, scanning timestamp, terminal device fingerprint, and city-level geographic location information of the scanning location. Based on the anti-counterfeiting label code, query the preset scanning log database to obtain the historical scanning records of the anti-counterfeiting label code within a preset historical time period. Based on the number of historical device fingerprints and the historical scanning timestamp in the historical scanning records, determine whether the current scanning meets the first-level risk triggering condition. If the first-level risk triggering condition is met, a command to start liveness detection is sent to the user terminal, and the shaking data sequence collected by the gyroscope sensor is received from the user terminal. Otherwise, a verification pass result is returned to the user terminal. Statistical feature analysis is performed on the shaking data sequence to calculate the variance and peak distribution pattern of the shaking data sequence; Based on the variance and peak distribution patterns, determine whether the current scan meets the second-level risk triggering conditions; If the second-level risk triggering condition is met, the current scanning record will be marked as a high-risk sample, and the anti-counterfeiting mark code, scanning timestamp, terminal device fingerprint, city-level geographic location information and shaking data sequence will be associated and stored in the abnormal sample database. Otherwise, the first-level risk mark will be removed, and the verification result will be returned to the user terminal. Based on a preset period, high-risk sample data accumulated in the abnormal sample library is called, and a generative adversarial network is used for offline training to update the threshold parameters of the first-level risk triggering condition and the judgment rules of the second-level risk triggering condition. The updated threshold parameters and judgment rules will be deployed to the online anti-counterfeiting and traceability system for subsequent scanning request processing.