One-item-one-code marketing fund safety management method
By generating a unique dynamic QR code on the product and using blockchain and smart contracts, centralized security risks and abnormal detection problems in marketing fund management are solved, trustworthy and transparent and automated management of capital flow are achieved, and the ability to detect funds security and abnormal behaviors is improved.
Patent Information
- Application Number
- CN202511024529.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-24
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2045-07-24
AI Technical Summary
The existing marketing fund security management technology has the security risks of centralized management, and it is difficult to achieve transparent traceability and automatic detection of abnormal behaviors throughout the entire process of capital flow. Especially in the dynamic distribution process, traditional methods are difficult to identify complex abnormal behaviors, resulting in an increase in the risk of funds being maliciously cashed out or money laundered.
The security management method of one-item one-code marketing funds is adopted. By generating a unique dynamic QR code during the product production or storage stage and giving the main key index, blockchain is used for synchronous rights confirmation and tamper-free binding, combining dynamic zero-knowledge proof and smart contracts, dynamic session-level encryption and identity binding of fund data is realized, and a closed-loop fund security control system is built.
It realizes the trustworthy circulation of marketing funds throughout the entire process and the efficient warning of abnormal behavior, improves the security, transparency and intelligence of funds, and ensures the automatic execution of fund allocation and privacy protection.
Smart Images

Figure CN120525533A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of marketing fund management algorithms, and specifically to a one-item-one-code marketing fund security management method. Background Art
[0002] With the rapid development of digital marketing and e-commerce, the secure management of marketing funds has become a critical component in ensuring the safety of corporate capital flows and the fairness of marketing activities. Existing marketing fund security management technologies often rely on traditional centralized account management and permission-based payment and settlement systems. These systems record and verify fund flows through databases and access control systems, ensuring the legitimacy and accuracy of fund transfers. At the same time, some solutions employ digital signatures and public key infrastructure (PKI) technologies to authenticate and tamper-proof fund transactions, enhancing the security and transparency of fund transfers.
[0003] However, traditional centralized management methods present security risks. If a central node is attacked or an insider abuses their authority, the security of funds will be greatly risked. Furthermore, existing technologies struggle to transparently trace the entire fund flow process and automatically detect abnormal behavior. This is especially true during the dynamic distribution of marketing funds, where fund paths are complex and volatile. Traditional rule-based anomaly detection methods struggle to effectively identify complex anomalies such as fund reflows, node aggregation anomalies, and frequent equipment changes. This increases the risk of funds being maliciously cashed out or laundered, severely impacting the security management of marketing funds. Summary of the Invention
[0004] The present invention proposes a one-item-one-code marketing fund security management method, which aims to improve the deficiencies of the existing marketing fund security management methods in fund identity binding, fund flow privacy protection and abnormal fund flow detection.
[0005] The one-to-one-code marketing fund security management method includes the following steps: S1. During the product production or warehousing phase, a unique dynamic QR code is generated for each product and assigned a master key index, KeyIndex0. This master key index, KeyIndex0, is registered as the initial state node in the blockchain ledger. This step achieves simultaneous ownership confirmation and tamper-proof binding of product and fund identification in the blockchain by generating a unique dynamic QR code during the product production or warehousing stage, assigning it a master key index of KeyIndex0, and registering KeyIndex0 as node information in the blockchain ledger. This technical approach differs from the traditional practice of only recording product numbers or QR code information in the local system. Its technical advantage lies in its ability to utilize the blockchain's distributed ledger to make each product identification information publicly accessible, tamper-proof, and traceable, effectively preventing the copying, counterfeiting, or multiple use of QR codes, ensuring that the subsequent disbursement of marketing funds is triggered by unique product events, and enhancing the trust foundation of the entire system.
[0006] S2. When a user scans the QR code to participate in a marketing campaign, the encryption key K_enc for this interaction session is generated by reading the master key index KeyIndex0 within the dynamic QR code. The marketing reward data is then encrypted using AES using the generated encryption key K_enc, generating the encrypted funds data packet C1 and the transaction digest H_tx. This step reads the KeyIndex0 embedded in the QR code and combines it with the random number of the current scan to generate the session key K_enc. K_enc is then used to perform AES encryption on the reward data, generating a secret fund data packet C1 and a transaction summary H_tx. This achieves dynamic session-level encryption of the fund data and identity-bound encrypted transmission. This technical approach differs from existing technologies that use fixed keys or static code encryption and transmission. The key mechanism dynamically generated based on the KeyIndex0 in the QR code and the random number of the session not only enhances encryption strength, but also ensures uniqueness and resistance to replay attacks for the data packets generated for each scan. This improves the system's resistance to data forgery and man-in-the-middle attacks, thereby ensuring the security of users' funds during the scanning process.
[0007] S3. Submit the encrypted funds data packet C1, digest H_tx, and master key index KeyIndex0 to the blockchain verification node. A dynamic zero-knowledge proof verifies their authenticity, proving that the funds data is generated from the bound unique identifier and complies with pre-set rules. The verification result is recorded on-chain. This step involves submitting the encrypted funds data packet C1, digest H_tx, and KeyIndex0 to a blockchain verification node and applying a dynamic zero-knowledge proof mechanism for verification. This allows the system to verify the encrypted content, while still maintaining its identity as legitimate goods and complying with pre-set fund release rules. This technical approach offers significant advantages over traditional solutions that require decryption and verification, which can easily compromise data privacy. Furthermore, through the zk-SNARK zero-knowledge proof protocol, data compliance can be verified without exposing the data itself, achieving the dual goals of privacy protection and fund compliance.
[0008] S4. The verified encrypted fund data packet C1, digest H_tx, and zero-knowledge proof are passed to the pre-deployed on-chain smart contract. The smart contract parses the reward amount and target account information. Using the decrypted contents of the encrypted fund data packet and the verification results of the zero-knowledge proof protocol, the balance bound to KeyIndex0 in the fund pool is locked and the funds are transferred.
[0009] The smart contract, acting as the on-chain, automatically executes funds after receiving verified data. It then performs a secondary zero-knowledge proof check, decrypts the encrypted funds data packet, extracts the reward amount and target account information, and executes the transfer operation based on the balance bound to KeyIndex0 in the on-chain fund pool. This technical approach offers two key advantages over traditional manual review and issuance or centralized system-based transfer methods: first, it ensures that only verified data triggers fund transfers, forming an automated closed-loop execution loop; second, smart contracts operate based on on-chain data, with transparent rules that cannot be tampered with, greatly improving the security and transparency of the marketing fund distribution process.
[0010] Specifically, the present invention constructs a closed-loop, statically trusted and dynamically interactive fund security management and control system. Starting from the four core stages of "identity creation - data encryption - legality verification - automatic transfer", the system uses key technologies such as blockchain, dynamic key mechanism, zero-knowledge proof and smart contracts to construct a statically identifiable, dynamically verifiable, execution-controllable and full-chain traceable security marketing fund management model.
[0011] The beneficial effects of the invention are: The present invention generates a unique dynamic QR code and master key index for each product, binds the identity of the fund flow to the status node in the blockchain ledger, and uses zero-knowledge proof to ensure the credibility and privacy of fund data, thereby realizing the automatic execution of the on-chain smart contract for fund transfers. Furthermore, a graph neural network is introduced in combination with a time series model to construct a dynamically evolving fund path map for the fund transfer process, accurately identifying abnormal behavior of fund paths that deviate from the normal pattern, effectively preventing fund reflux and abnormal aggregation, and improving the automatic detection and real-time response capabilities of fund security. The present invention significantly enhances the security, transparency, and intelligence level of marketing fund management, and realizes the trusted flow of marketing funds and efficient early warning of abnormal behavior. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] Figure 1 A flow chart of the method for secure management of one-item-one-code marketing funds provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0013] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings, but the protection scope of the present invention is not limited to the following.
[0014] In order to make the objectives, technical solutions, and advantages of the present invention more clearly understood, the present invention is further described in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present invention and are not intended to limit the present invention. That is, the embodiments described herein are only some embodiments of the present invention, not all embodiments. Generally, the components of the embodiments of the present invention described and illustrated in the drawings herein may be arranged and designed in various different configurations.
[0015] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making any creative work shall fall within the scope of protection of the present invention. It should be noted that relational terms such as "first" and "second" are merely used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations.
[0016] Furthermore, the terms "comprises," "comprising," or any other variations thereof are intended to cover a non-exclusive inclusion such that a process, method, article, or machine that comprises a list of elements includes not only those elements but also other elements not expressly listed or inherent to such process, method, article, or machine. In the absence of more limitations, an element defined by the phrase "comprising a..." does not preclude the presence of additional identical elements in the process, method, article, or machine that comprises the element.
[0017] The features and performance of the present invention are further described in detail below with reference to the embodiments.
[0018] Among them, such as Figure 1 The one-item-one-code marketing fund security management method includes the following steps: S1. During the product production or warehousing phase, a unique dynamic QR code is generated for each product and assigned a master key index, KeyIndex0. This master key index, KeyIndex0, is registered as the initial state node in the blockchain ledger. S2. When a user scans the QR code to participate in a marketing campaign, the encryption key K_enc for this interaction session is generated by reading the master key index KeyIndex0 within the dynamic QR code. The marketing reward data is then encrypted using AES using the generated encryption key K_enc, generating the encrypted funds data packet C1 and the transaction digest H_tx. S3. Submit the encrypted funds data packet C1, digest H_tx, and master key index KeyIndex0 to the blockchain verification node. A dynamic zero-knowledge proof verifies their authenticity, proving that the funds data is generated from the bound unique identifier and complies with pre-set rules. The verification result is recorded on-chain. S4. The verified encrypted fund data packet C1, digest H_tx, and zero-knowledge proof are passed to the pre-deployed on-chain smart contract. The smart contract parses the reward amount and target account information. Using the decrypted contents of the encrypted fund data packet and the verification results of the zero-knowledge proof protocol, the balance bound to KeyIndex0 in the fund pool is locked and the funds are transferred.
[0019] Furthermore, the step S1 also includes assigning a timestamp, a manufacturer's signature and a marketing strategy ID to the unique dynamic QR code.
[0020] Furthermore, the step S1 specifically includes the following sub-steps: S101. Collect basic information about product production or warehousing as unique input data; S102. Perform a hash operation on the basic information using the SHA-256 cryptographic hash function to generate a unique identification code; combine the dynamic QR code algorithm to generate a unique dynamic QR code containing a unique identification code; S103 based on a unique identification code generated and bound to the master key index KeyIndex0, as the identity of the capital flow; S104. Register the master key index KeyIndex0 to the blockchain to form the initial block of the product's financial information.
[0021] Specifically, the starting point of trust in this embodiment is the unique identification registration completed at the product warehousing stage - the master key index KeyIndex0. The master key index KeyIndex0 is written into the blockchain ledger as a static structure, becoming an unalterable product identity anchor. It not only establishes the unique binding between the product and the marketing funds, but also builds an initial state pool that is independent of the control of the traditional centralized database, realizing a static trusted structure of the trust initialization mechanism with the product's unique identification as the anchor.
[0022] Specifically, the process for generating the master key index KeyIndex0 is as follows: , wherein the Represents a unique identification code, the Represents the secure hash function SHA-256.
[0023] Furthermore, the step S2 specifically includes the following sub-steps: S201. The user scans the QR code to read the master key index KeyIndex0, combines KeyIndex0 and the random number of this session, and generates the session key K_enc through the pseudo-random function PRF; S202. Calculate the marketing incentive data to be issued according to the marketing activity rules, encrypt the marketing incentive data using the AES symmetric encryption algorithm and the generated session key K_enc to form a encrypted financial data packet C1; S203. Generate a transaction summary H_tx for the encrypted funds data packet C1.
[0024] Specifically, when a user scans the QR code, a session key is dynamically generated based on the read KeyIndex0 and random parameters. This key is then encrypted, creating a coded funds data packet (C1) and a corresponding digest (H_tx). This process features one-time key use, non-reusable interactions, and on-chain verifiability. It implements a user-driven, dynamic fund identification mapping and transmission process, transitioning from static identities (KeyIndex0) to dynamic sessions (K_enc → C1), avoiding the reuse and attack risks common in fixed-code, fixed-key mechanisms. This creates a dynamic interaction mechanism based on session key secure transmission logic.
[0025] Furthermore, the encrypted funds data packet C1 in step S202 is specifically represented as follows: ; Among them, the Indicates a secret fund data packet, Indicates the key K_enc encrypted by AES, Indicates the reward amount, Indicates the user ID, Indicates the scanning time. 、 and Reward data for marketing.
[0026] Furthermore, the step S3 specifically includes the following sub-steps: S301. Submit the encrypted funds data packet C1, transaction summary H_tx, and master key index KeyIndex0 to the blockchain verification node; S302. Perform traceability and identity verification based on the initial state of the master key index KeyIndex0 registered on the chain. S303. Generate proof using a dynamic zero-knowledge proof protocol, proving that the encrypted funds packet C1 originates from the bound unique identifier and complies with the fund issuance rules, without revealing the specific reward details. S304. Write the zero-knowledge proof and verification results into the blockchain.
[0027] Specifically, after the encrypted data is submitted to the on-chain node, its compliance is verified through a zero-knowledge proof mechanism without exposing the ciphertext content. This forms a closed mathematical mapping loop between the source of funds, the identity of the product, and the encrypted line, ensuring that each funding request is triggered by a legitimate scan and that the content is complete and untampered. A closed-loop verification model combining zero-knowledge proof and blockchain compliance verification has been constructed, breaking the traditional security bottleneck of requiring a central node to decrypt and determine the data. Instead, it uses an on-chain, tamper-proof and zero-knowledge computing approach to form a secure closed loop that eliminates the need for a trusted center.
[0028] Furthermore, the step S4 specifically includes the following sub-steps: S401. Receive the verified encrypted funds data packet C1, digest H_tx, and zero-knowledge proof through the smart contract; S402. Perform secondary verification of the zero-knowledge proof through on-chain verification. S403 decrypts the encrypted funds packet C1 to extract the reward amount and target account information; S404. Lock the corresponding funds based on the balance of the master key index KeyIndex0 in the on-chain balance pool. Then execute the fund transfer to transfer the reward amount to the target account.
[0029] Specifically, after verification is complete, the system passes C1 and the verification certificate to the on-chain smart contract for parsing and execution. Smart contracts feature automatic execution, conditional triggering, and fixed rules, ensuring that only verified data results in fund transfers. Transfers are based on the state of the fund pool mapped by the on-chain KeyIndex0, achieving on-chain closed-loop control of funds. This phase establishes a full-process closed-loop system from "unique identification → dynamic interaction → legal verification → automatic transfer," with all state transitions tracked and traced on-chain. This establishes a closed-loop, automated execution structure for fund transfers and control driven by smart contracts.
[0030] Furthermore, step S402 specifically includes the following sub-steps: S4021. Call the on-chain zk-SNARK verification function through the smart contract, inputting the zero-knowledge proof and digest H_tx; S4022. Use the zk-SNARK verification function to make the following logical judgments: (1) Whether the zero-knowledge proof is generated by a certain ciphertext data that satisfies the constraints; (2) Whether the ciphertext data comes from a ciphertext fund data packet C1 generated by a unique identification code; (3) Whether the encrypted data complies with marketing rules; (4) Whether all the above rules are valid without leaking plaintext data; S4023. When the verification results are all "yes", execute step S403.
[0031] Furthermore, in step S403, the specific process of performing secondary verification on the zero-knowledge proof through on-chain verification includes the following sub-steps: S4031. The symmetric decryption key K_enc is reconstructed by combining the random number and the master key index KeyIndex0 in the transaction context with the same pseudo-random function PRF in the session key generation mechanism; S4032. Decrypt the encrypted fund data packet C1 using the AES symmetric decryption algorithm and the cryptographic library supported on the chain to extract the reward amount and target account information.
[0032] Furthermore, step S5 is also included: generating a transaction summary H_tx2 for the transfer transaction in the fund transfer process, and performing path graph modeling on the summary H_tx2 of all fund flows to construct a transaction behavior graph; predicting whether the fund path deviates from the normal pattern through a graph neural network combined with a transaction time series model; when it is found that the transaction path includes fund reflux, node aggregation anomalies, and frequent device scanning features, the original QR code source is located according to the bound KeyIndex0, and the unfinished contracts on the relevant path are frozen.
[0033] Specifically, by integrating graph models with deep learning, we achieve structured modeling of capital flow paths, sequence anomaly detection, and behavioral warnings, thereby tracking and freezing potential risk paths at the QR code primary index (KeyIndex0) level. Overall, this system demonstrates reverse path tracing and proactive prevention capabilities from a post-transfer perspective, establishing a dual risk control mechanism for the system: both post-transfer and in-process.
[0034] Furthermore, the step S5 specifically includes the following sub-steps: S501. Generate a transaction summary H_tx2 for the transfer transaction during the funds transfer process and trace it back to the initial master key index KeyIndex0 of the transaction; S502. Using the transfer amount, transaction summary H_tx2, transfer time, outgoing address, incoming address, and scanning device involved in the transfer as edges and the KeyIndex0 as a node, a dynamically evolving directed graph structure is constructed to represent the capital flow path. S503. Expand each path in the graph in chronological order to form a path sequence. Extract all paths in the sequence using a graph walk algorithm and encode each path as a vector sequence Xᵢ = [x1, x2, ..., xn ], where each vector represents a transfer behavior feature, including fund reflow, node aggregation anomaly, and frequent device scanning features; S504. Model the vector sequence using a GAT-based graph neural network. A GRU time series model is embedded to capture temporal frequency and device fluctuation patterns, calculating the deviation score for each path sequence. S505. Calculate a total score based on the deviation score of each path sequence, compare the total score with a preset threshold, and freeze all unfinished transfers of the KeyIndex0 path corresponding to the total score exceeding the threshold.
[0035] Specifically, for calculating the total score in step S505, freezing the fund path requires a clear triggering rule. For example, a triggering rule is: when , then freeze all unfinished transfers of the current KeyIndex0 path; Among them, the Indicates the total score, Indicates the preset threshold.
[0036] In the on-chain smart contract execution logic, logical judgments must be made using a single numerical value (score); multi-dimensional vectors cannot be used as trigger conditions. Furthermore, if an abnormality triggers a freeze, the score and cause of the freeze must be traced back, and the reason for the freeze must be recorded on-chain.
[0037] Preferably, the total score is calculated by weighted calculation of each sub-score in each path sequence, wherein the sub-score is specifically the score value output by the allocation behavior characteristics in the path sequence through the GAT's graph neural network and GRU time series model. For example: the graph neural network outputs the fund aggregation score, the time series model outputs the time deviation score, and the scanning device switching anomaly score.
[0038] Furthermore, for the above embodiment, the detailed principle of the process is as follows: For directed graph structures ,in, , the k represents the number of transfers and allocations, the Indicates the edge corresponding to the k-th transfer behavior, Respectively represent the transfer amount, transfer-out address, transfer-in address, transfer time, scanning device and transaction summary of the kth transfer transaction. Represents a node, the represents the edge set, Represents a directed graph structure, It represents the dynamic evolution process from the master key index KeyIndex0 to all the transfer behavior paths related to its fund flow in the time dimension t∈[t0,t]. Each edge is an evolution of the fund flow, including its amount, source and target, time, device, summary and other multi-dimensional features. The t0 represents the time when the starting master key is generated, and the t represents the current time node, that is, the current construction of the dynamic graph. The time section represented is a directed graph consisting of all transfer behavior paths from the occurrence of KeyIndex0 to the current time t.
[0039] Furthermore, for the graph walk algorithm, the path is extracted by graph walk: using depth-first or breadth-first to extract the time-ordered path from KeyIndex0, where each path is directed, that is: , wherein the Indicates the i-th fund transfer path, that is, the path sequence, starting from KeyIndex0, A path sequence is obtained by walking along the graph structure. Each path reflects a capital flow trajectory. Represents a set of fund transfer paths, Indicates that the path is extracted by using the depth-first / breadth-first graph walking algorithm, where This is a depth-first / breadth-first algorithm; further, the behavioral characteristics are encoded, namely: , wherein the Represents the behavior vector of step j on the path, They respectively represent the fund return mark, aggregation anomaly degree, equipment change rate, time difference from the previous jump, current transfer amount, and geographical jump distance.
[0040] Furthermore, the directed graph attention aggregation GAT outputs the behavioral features of the aggregated surrounding nodes, and the output behavioral feature sequence is input into the nested GRU for time-frequency / device fluctuation modeling. This captures the dynamic evolution pattern of device change frequency, scanning rhythm, and amount fluctuation, and calculates the deviation score. The specific calculation is expressed as: , wherein the represents the deviation score of path i, Represents the Sigmoid activation function, Represents the weight matrix of the deviation scoring layer, which is used to perform linear transformation on the splicing features. represents a nonlinear activation function, Represents the feature concatenation operation, which concatenates multiple vectors into a long vector as input. represents the path embedding of the GRU output, Indicates the mean amount, Represents the equipment variation variance statistics, which can be transformed according to the features set in the forward direction. Represents the overall abnormality score of the path, 、 Represents the bias vectors of the first and second layers, acting on And the final output. Finally, through Calculate the total score, where Represents the total score, and K represents the number of all paths starting from the current key KeyIndex0.
[0041] Furthermore, as a preferred implementation of the above embodiment, a one-item-one-code fund security management system is proposed, including: The product unique identification and master key initialization module is used to generate a unique dynamic QR code for each product during the product production or warehousing stage, and assign the master key index KeyIndex0 to the unique dynamic QR code; the master key index KeyIndex0 is registered as the initial state node in the blockchain ledger; The marketing interaction and encrypted funds generation module is used to generate the encryption key K_enc for this interactive session by reading the master key index KeyIndex0 in the dynamic QR code when the user scans the code to participate in the marketing activity. The generated encryption key K_enc is then used to perform AES encryption on the marketing reward data to generate the encrypted funds data packet C1 and the transaction summary H_tx. The blockchain verification and credibility proof module is used to submit the encrypted fund data packet C1, digest H_tx, and master key index KeyIndex0 to the blockchain verification node, verify its credibility through dynamic zero-knowledge proof, prove that the fund data is generated by the bound unique identification code and complies with the preset rules, and record the verification results on the chain; The smart contract unlocking and fund transfer module is used to pass the verified encrypted fund data package C1, summary H_tx and zero-knowledge proof to the smart contract pre-deployed on the chain; obtain the reward amount and target account information through smart contract parsing, and lock the balance bound to KeyIndex0 in the fund pool through the decrypted content of the encrypted fund data package and the verification result of the zero-knowledge proof protocol, and execute the fund transfer.
[0042] The system proposed in the above embodiment is based on five functional modules: unique dynamic QR codes, encrypted fund packages, blockchain verification, smart contract allocation, and graph neural network behavior monitoring. It constructs a marketing incentive fund flow system with complete traceability and anti-fraud capabilities. During implementation, the system first generates a unique dynamic QR code for each item during the production or warehousing phase. This QR code embeds the master key index KeyIndex0. Through an on-chain initialization operation, KeyIndex0 is registered as the initial state node in the blockchain ledger, ensuring that all subsequent fund interactions associated with this item have a unified starting point identifier. After a user participates in a marketing campaign and scans the code, the system automatically reads KeyIndex0 from the QR code and uses this index to dynamically generate the encryption key K_enc for the current session. This key is derived from the master key based on a preset algorithm and incorporates parameters such as timestamps or device fingerprints to enhance uniqueness. Subsequently, the system uses the K_enc to perform AES encryption on the marketing reward data to generate the encrypted fund data packet C1, and calculates the hash summary H_tx generated by the current transaction content, and submits C1, H_tx and KeyIndex0 to the blockchain verification node.
[0043] The verification node executes a dynamic zero-knowledge proof protocol on the received transaction data, proving that the funds were indeed generated by the product associated with KeyIndex0 and that the scan was performed by a compliant device and in compliance with marketing regulations. Once verified, the authenticity of the data, along with a data summary, is recorded on-chain for subsequent tracking and regulatory access. The system then passes the encrypted data packet C1 and the zero-knowledge proof to a pre-deployed smart contract on-chain. The contract parses the encrypted data packet to identify the reward amount and the target transfer address, and confirms the enforceability of the transaction by verifying the consistency between the encrypted data packet and the zero-knowledge proof. Once verified, the smart contract locks the balance in the fund pool associated with KeyIndex0 and transfers the corresponding funds to the designated account, completing the reward operation.
[0044] During the fund transfer process, the system will continuously generate a summary H_tx2 of each transfer transaction, and use KeyIndex0 as the central node to map all fund paths and construct a dynamic graph structure. , where nodes are sets of primary key indexes and edges are transfer records, including transaction elements such as amount, time, scanning device, and address information. This graph structure is updated in real time as transfers occur. Deep Forward Flow Modeling (DFS / BFS) is performed on all fund flow behaviors along the path, abstracting each fund path into a temporally ordered sequence of behaviors. The system uses graph neural networks (such as GAT) to model the features of this path sequence, extracting graph structural features such as node aggregation, fund reflow, and device switching. Each path vector sequence is then fed into a nested GRU time series network to capture device usage frequency and temporal fluctuation patterns. This combined graph and sequence features completes a behavioral deviation score for each path.
[0045] Ultimately, the system calculates a total risk score for the entire fund path based on the deviation score for each path and compares this score against a pre-set threshold. If a path with excessive deviation is detected (e.g., frequent changes in scanning devices, funds flowing back to the source address from the same KeyIndex0, or multiple KeyIndex0s being aggregated into the same account), the system immediately locates the corresponding master key index, KeyIndex0, and freezes any uncompleted fund transfer contracts along that path to prevent further transfers, thereby instantly blocking and precisely targeting abnormal fund paths. The entire process utilizes dynamic QR codes as the information entry point, blockchain as the trust foundation, and cryptographic computing and smart contracts as the execution core. Incorporating graph neural network behavior recognition algorithms, this creates a comprehensive, closed-loop prevention and control mechanism, from ciphertext generation to on-chain transfers and risk interception.
[0046] The foregoing description is merely a preferred embodiment of the present invention. It should be understood that the present invention is not limited to the form disclosed herein and should not be construed as excluding other embodiments. Rather, the present invention can be used in various other combinations, modifications, and environments and can be modified within the scope of the concept described herein through the above teachings or techniques or knowledge in the relevant field. Modifications and variations made by those skilled in the art that do not depart from the spirit and scope of the present invention are intended to be protected by the appended claims.
Claims
1. One-item-one-code marketing fund security management method, characterized by: The following steps are involved: S1. During the product production or warehousing phase, a unique dynamic QR code is generated for each product and assigned a master key index, KeyIndex0. This master key index, KeyIndex0, is registered as the initial state node in the blockchain ledger. S2. When a user scans the QR code to participate in a marketing campaign, the encryption key K_enc for this interaction session is generated by reading the master key index KeyIndex0 within the dynamic QR code. The marketing reward data is then encrypted using AES using the generated encryption key K_enc, generating the encrypted funds data packet C1 and the transaction summary H_tx generated by this marketing campaign. S3. Submit the encrypted funds data packet C1, digest H_tx, and master key index KeyIndex0 to the blockchain verification node. A dynamic zero-knowledge proof verifies their authenticity, proving that the funds data is generated from the bound unique identifier and complies with pre-set rules. The verification result is recorded on-chain. S4. The verified encrypted fund data packet C1, digest H_tx, and zero-knowledge proof are passed to the pre-deployed on-chain smart contract. The smart contract parses the reward amount and target account information. Using the decrypted contents of the encrypted fund data packet and the verification results of the zero-knowledge proof protocol, the balance bound to KeyIndex0 in the fund pool is locked and the funds are transferred.
2. The one-item-one-code marketing fund security management method according to claim 1 is characterized in that: The step S1 also includes assigning a timestamp, a manufacturer signature and a marketing strategy ID to the unique dynamic QR code.
3. The one-item-one-code marketing fund security management method according to claim 1, characterized in that: The step S1 specifically includes the following sub-steps: S101. Collect basic information about product production or warehousing as unique input data; S102. Perform a hash operation on the basic information using the SHA-256 cryptographic hash function to generate a unique identification code; combine the dynamic QR code algorithm to generate a unique dynamic QR code containing a unique identification code; S103 based on a unique identification code generated and bound to the master key index KeyIndex0, as the identity of the capital flow; S104. Register the master key index KeyIndex0 to the blockchain to form the initial block of the product's financial information.
4. The one-to-one-code marketing fund security management method according to claim 1, characterized in that: The step S2 specifically includes the following sub-steps: S201. The user scans the QR code to read the master key index KeyIndex0, combines KeyIndex0 and the random number of this session, and generates the session key K_enc through the pseudo-random function PRF; S202. Calculate the marketing incentive data to be issued according to the marketing activity rules, encrypt the marketing incentive data using the AES symmetric encryption algorithm and the generated session key K_enc to form a secret fund data packet C1; S203. Generate a transaction summary H_tx for the encrypted funds data packet C1.
5. The one-item-one-code marketing fund security management method according to claim 4, characterized in that: The encrypted funds data packet C1 in step S202 is specifically represented as follows: ; Among them, the Indicates a secret fund data packet, Indicates the key K_enc encrypted by AES, Indicates the reward amount, Indicates the user ID, Indicates the scanning time. 、 and Reward data for marketing.
6. The one-item-one-code marketing fund security management method according to claim 1, characterized in that: The step S3 specifically includes the following sub-steps: S301. Submit the encrypted funds data packet C1, transaction summary H_tx, and master key index KeyIndex0 to the blockchain verification node; S302. Perform traceability and identity verification based on the initial state of the master key index KeyIndex0 registered on the chain. S303. Generate proof using a dynamic zero-knowledge proof protocol, proving that the encrypted funds packet C1 originates from the bound unique identifier and complies with the fund issuance rules, without revealing the specific reward details. S304. Write the zero-knowledge proof and verification results into the blockchain.
7. The one-to-one-code marketing fund security management method according to claim 1, characterized in that: The step S4 specifically includes the following sub-steps: S401. Receive the verified encrypted funds data packet C1, digest H_tx, and zero-knowledge proof through the smart contract; S402. Perform secondary verification of the zero-knowledge proof through on-chain verification. S403 decrypts the encrypted funds packet C1 to extract the reward amount and target account information; S404. Lock the corresponding funds based on the balance of the master key index KeyIndex0 bound to the on-chain balance pool. And execute fund transfer to transfer the reward amount to the target account.
8. The one-item-one-code marketing fund security management method according to claim 7, characterized in that: The step S402 specifically includes the following sub-steps: S4021. Call the on-chain zk-SNARK verification function through the smart contract, inputting the zero-knowledge proof and digest H_tx; S4022. Use the zk-SNARK verification function to make the following logical judgments: Whether the zero-knowledge proof is generated by a certain ciphertext data that meets the constraints; Whether the ciphertext data comes from a ciphertext fund data packet C1 generated by a binding unique identification code; Whether the encrypted data complies with marketing regulations; Whether all the above rules are valid without leaking plaintext data; S4023. When the verification results are all "yes", execute step S403.
9. The one-item-one-code marketing fund security management method according to claim 7, characterized in that: In step S403, the specific process of performing secondary verification of the zero-knowledge proof through on-chain verification includes the following sub-steps: S4031. The symmetric decryption key K_enc is reconstructed by combining the random number and the master key index KeyIndex0 in the transaction context with the same pseudo-random function PRF in the session key generation mechanism; S4032. Decrypt the encrypted fund data packet C1 using the AES symmetric decryption algorithm and the cryptographic library supported on the chain to extract the reward amount and target account information.
10. The one-item-one-code marketing fund security management method according to claim 1, characterized in that: The process also includes step S5: generating a transaction summary H_tx2 for the transfer transaction in the fund transfer process, and performing path graph modeling on the summary H_tx2 of all fund flows to construct a transaction behavior graph; and predicting whether the fund path deviates from the normal pattern by combining a graph neural network with a transaction time series model; When it is found that the transaction path includes capital reflux, abnormal node aggregation, and frequent device scanning features, the original QR code source is located according to the bound KeyIndex0, and the unfinished contracts on the relevant path are frozen.
11. The one-item-one-code marketing fund security management method according to claim 10, characterized in that: The step S5 specifically includes the following sub-steps: S501. Generate a transaction summary H_tx2 for the transfer transaction during the funds transfer process and trace it back to the initial master key index KeyIndex0; S502. Using the transfer amount, transaction summary H_tx2, transfer time, outgoing address, incoming address, and scanning device involved in the transfer as edges and the KeyIndex0 as a node, a dynamically evolving directed graph structure is constructed to represent the capital flow path. S503. Expand each path in the graph in chronological order to form a path sequence. Extract all paths in the sequence using a graph walk algorithm and encode each path as a vector sequence Xᵢ = [x1, x2, ..., x n ], wherein x1, x2, ..., x n represents n vectors, each vector representing a transfer behavior feature, including fund reflow, node aggregation anomaly, and frequent device scanning. S504. Model the vector sequence using a GAT-based graph neural network. A GRU time series model is embedded to capture temporal frequency and device fluctuation patterns, calculating the deviation score for each path sequence. S505. Calculate a total score based on the deviation score of each path sequence, compare the total score with a preset threshold, and freeze all unfinished transfers of the KeyIndex0 path corresponding to the total score exceeding the threshold.
Citation Information
Patent Citations
Block chain-based data transaction model and privacy protection method
CN114900290A
Anonymous authentication and vehicle-mounted information sharing method based on block chain and zero-knowledge proof
CN117375797A
Digital asset tracing method based on block chain
CN119338466A
Financial transaction data intelligent protection method and system based on block chain
CN119599679A
Block chain transaction settlement method and system, and related device
WO2021031460A1