Method for managing marketing funds of one object one code
By generating a unique dynamic QR code during the product entry stage and utilizing blockchain and smart contracts, combined with dynamic zero-knowledge proof, the centralized security risks and anomaly detection problems in marketing fund management are resolved, and the trusted binding, verifiability and traceability of fund flows are achieved, thereby improving fund security and transparency.
Patent Information
- Application Number
- CN202511024529.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-24
- Publication Date
- 2025-10-24
- Estimated Expiration
- 2045-07-24
AI Technical Summary
Existing marketing fund security management technologies have security risks of centralized management, making it difficult to achieve transparent traceability of the entire fund flow process and automatic detection of abnormal behaviors. In particular, during the dynamic distribution process, it is difficult to identify complex abnormal behaviors such as fund reflux, node aggregation anomalies, and frequent equipment replacement, resulting in an increased risk of funds being maliciously cashed out or laundered.
A one-item-one-code marketing fund security management method is adopted. By generating a unique dynamic QR code and assigning a master key index during the product production or warehousing stage, the blockchain ledger is used for synchronous ownership confirmation. Combined with dynamic zero-knowledge proof and smart contracts, dynamic session-level encryption and identity binding of fund data are achieved to build a closed-loop fund security management and control system.
It achieves transparent tracing of the entire process of fund flow and efficient detection of abnormal behavior, enhances the security and transparency of marketing funds, improves the system's resistance to data forgery and man-in-the-middle attacks, and ensures the legitimacy and automatic execution of fund disbursement.
Smart Images

Figure CN120525533B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of marketing fund management algorithm, in particular to a one-to-one code marketing fund safety management method. BACKGROUND
[0002] With the rapid development of digital marketing and e-commerce, marketing fund safety management has become a key link to ensure the safety of enterprise fund circulation and the fairness of marketing activities. The existing marketing fund safety management technology mostly adopts traditional centralized account management and permission control-based payment settlement system, records and verifies fund circulation through database and access control system, and ensures the legality and accuracy of fund transfer. At the same time, some schemes also use digital signature and public key infrastructure (PKI) technology to authenticate and protect funds transactions from tampering, in order to improve the security and transparency of fund transfer.
[0003] However, the traditional centralized management method has security risks. Once the central node is attacked or the internal personnel abuses the authority, the fund safety will face great risks. In addition, the existing technology is difficult to realize the transparent tracing and automatic detection of abnormal behavior in the whole process of fund circulation, especially in the dynamic distribution process of marketing funds. The traditional rule-based abnormal detection method is difficult to effectively identify complex abnormal behaviors such as fund backflow, node aggregation anomaly and frequent device replacement, which increases the risk of fund being maliciously cashed or money laundering, seriously affecting the effect of marketing fund safety management. SUMMARY
[0004] The present application proposes a one-to-one code marketing fund safety management method, aiming to improve the deficiencies of the existing marketing fund safety management method in fund identity binding, fund circulation privacy protection and abnormal fund circulation detection.
[0005] Among them, the one-to-one code marketing fund safety management method comprises the following steps:
[0006] S1. In the production or warehousing stage of the commodity, a unique dynamic two-dimensional code is generated for each commodity, and a master key index KeyIndex0 is assigned to the unique dynamic two-dimensional code; the master key index KeyIndex0 is registered as an initial state node in the blockchain account book;
[0007] Wherein, the step realizes the synchronous right confirmation and tamper-proof binding of the commodity and the fund identification in the blockchain by generating a unique dynamic two-dimensional code in the commodity production or warehousing stage, assigning it a master key index KeyIndex0, and registering KeyIndex0 as node information in the blockchain ledger. This technical means is different from the traditional method of recording commodity number or two-dimensional code information in the local system. Its technical advantage lies in that the distributed ledger of the blockchain can realize the public search, tamper-proof, and traceability of each piece of commodity identification information, effectively prevent the duplication, counterfeiting, or multiple use of the two-dimensional code, ensure that the subsequent marketing fund distribution is based on the unique commodity event trigger, and improve the trust foundation of the entire system.
[0008] S2. When the user scans the code to participate in the marketing activity, the master key index KeyIndex0 in the dynamic two-dimensional code is read to generate an encryption key K_enc for the current interaction session; and the marketing reward data is AES encrypted by the generated encryption key K_enc to generate a ciphertext fund data packet C1 and a transaction digest H_tx;
[0009] Wherein, the step realizes the dynamic session-level encryption of the fund data and the encrypted transmission of the identity binding by reading the KeyIndex0 embedded in the two-dimensional code, generating a session key K_enc together with the random number of the current scanning, and generating a ciphertext fund data packet C1 and a transaction digest H_tx by AES encrypting the reward data using K_enc. This technical means is different from the fixed key or static code encryption transmission method in the prior art. The key mechanism based on the dynamic generation of KeyIndex0 in the two-dimensional code and the session random number not only enhances the encryption strength, but also generates a unique data packet each time the code is scanned, has anti-replay attack ability, improves the resistance of the system to data forgery and man-in-the-middle attack, and thus safeguards the fund safety during the code scanning process of the user.
[0010] S3. The ciphertext fund data packet C1, the digest H_tx, and the master key index KeyIndex0 are submitted to the blockchain verification node, and the credibility thereof is verified by dynamic zero-knowledge proof, proving that the fund data is generated by the bound unique identification code and conforms to the preset rules, and the verification result is recorded on the chain;
[0011] The step is verified by submitting the ciphertext fund data packet C1, the digest H_tx and the KeyIndex0 to the block chain verification node and using a dynamic zero-knowledge proof mechanism for verification, so that the system can verify that the ciphertext fund data packet C1 is from a legal product identity and meets the preset fund distribution rules without exposing the encrypted content. This technical means is different from the traditional scheme which needs to decrypt and verify the content first and is easy to leak data privacy, and has obvious advantages. Through the zk-SNARK zero-knowledge proof protocol, the data compliance can be verified without exposing the data itself, so as to achieve the purpose of double protection of privacy protection and fund compliance.
[0012] S4. The verified ciphertext fund data packet C1, the digest H_tx and the zero-knowledge proof are transmitted into the smart contract pre-deployed on the chain. The reward amount and the target account information are obtained by analyzing the smart contract, and the balance of the fund pool bound with the KeyIndex0 is locked through the content decrypted from the ciphertext fund data packet and the verification result of the zero-knowledge proof protocol, and the fund transfer is executed.
[0013] The smart contract is an automatic execution subject on the chain, which first performs secondary zero-knowledge proof verification after receiving the verified data, then decrypts the ciphertext fund data packet, extracts the reward amount and the target account information, and executes the transfer operation combined with the balance of the fund pool bound with the KeyIndex0 on the chain. Compared with the traditional manual auditing and distribution or centralized system transfer method, this technical means has two key advantages: first, only the verified data can trigger the fund transfer to form a closed loop of automatic execution; second, the smart contract runs based on the data on the chain, and the rules are transparent and cannot be tampered with by human beings, which greatly improves the security and transparency of the marketing fund distribution process.
[0014] Specifically, the application constructs a closed-loop, static trusted and dynamic interactive integrated fund security management system. The system starts from four core stages of "identity creation-data encryption-legality verification-automatic transfer", and builds a static trusted, dynamically verifiable, controllable and fully traceable security marketing fund management model through block chain, dynamic key mechanism, zero-knowledge proof and smart contract and other key technologies.
[0015] The application has the following advantages:
[0016] The application binds the fund flow identity and the state node in the block chain account book by generating a unique dynamic two-dimensional code and a master key index for each commodity, uses zero-knowledge proof to ensure that the fund data is credible and privacy-protected, and realizes the automatic execution of the on-chain smart contract of fund transfer. Further, a graph neural network is introduced to combine a time series model to construct a dynamic evolution fund path atlas for the fund transfer process, accurately identify abnormal behaviors of fund path deviating from the regular mode, effectively prevent fund reflux and abnormal aggregation, and improve the automatic detection and real-time response capability of fund safety. The application significantly enhances the security, transparency and intelligent level of marketing fund management, realizes the credible flow of marketing funds and efficient early warning of abnormal behaviors. BRIEF DESCRIPTION OF DRAWINGS
[0017] Figure 1 A method flowchart of a one-to-one code marketing fund safety management method provided for an embodiment of the application. DETAILED DESCRIPTION
[0018] The technical solutions of the application will be further described in detail below with reference to the accompanying drawings, but the protection scope of the application is not limited to the following description.
[0019] In order to make the purpose, technical solutions and advantages of the application clearer and more understandable, the application will be further described in detail in combination with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the application, and are not used to limit the application, that is, the described embodiments are only a part of the embodiments of the application, but not all the embodiments. The components of the embodiments of the application described and shown in the drawings herein can be arranged and designed in various different configurations.
[0020] Therefore, the detailed description of the embodiments of the application provided in the drawings below is not intended to limit the scope of the claimed application, but only represents selected embodiments of the application. Based on the embodiments of the application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of the protection of the application. It should be noted that the relational terms such as "first" and "second" and the like are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between the entities or operations.
[0021] Moreover, the terms "comprise", "comprising", or any other variation thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can include other elements not expressly listed or inherent to such process, method, article, or apparatus. An element proceeded by "comprises... a" does not, without more constraints, exclude the presence of additional identical elements in the process, method, article, or apparatus that comprises the element.
[0022] The features and characteristics of the present application will be further described with reference to the following embodiments.
[0023] wherein, as Figure 1 A one-code marketing fund security management method, comprising the following steps:
[0024] S1. In the commodity production or warehousing stage, a unique dynamic two-dimensional code is generated for each commodity, and a master key index KeyIndex0 is assigned to the unique dynamic two-dimensional code; the master key index KeyIndex0 is registered as an initial state node in the blockchain ledger;
[0025] S2. When a user scans the code to participate in a marketing activity, the master key index KeyIndex0 in the dynamic two-dimensional code is read to generate an encryption key K_enc for the current interaction session; and the marketing reward data is AES encrypted by the generated encryption key K_enc to generate a ciphertext fund data packet C1 and a transaction digest H_tx;
[0026] S3. The ciphertext fund data packet C1, the digest H_tx, and the master key index KeyIndex0 are submitted to a blockchain verification node, and the credibility thereof is verified through dynamic zero-knowledge proof, proving that the fund data is generated by the bound unique identification code and conforms to the preset rules, and the verification result is recorded on the chain;
[0027] S4. The verified ciphertext fund data packet C1, the digest H_tx, and the zero-knowledge proof are transmitted to a smart contract pre-deployed on the chain; the reward amount and target account information are obtained by analyzing the smart contract, and the balance of the fund pool bound to KeyIndex0 is locked through the content decrypted from the ciphertext fund data packet and the verification result of the zero-knowledge proof protocol, and the fund transfer is executed.
[0028] Further, in the step S1, a timestamp, a manufacturer signature, and a marketing strategy ID are further assigned to the unique dynamic two-dimensional code.
[0029] Further, the step S1 specifically comprises the following sub-steps:
[0030] S101. Collect the basic information of commodity production or warehousing as unique input data;
[0031] S102. Hash the basic information by SHA-256 encryption hash function to generate a unique identification code; combine dynamic two-dimensional code algorithm to generate a unique dynamic two-dimensional code containing the unique identification code;
[0032] S103. Generate and bind the main key index KeyIndex0 based on the unique identification code, as the identity of the fund circulation;
[0033] S104. Register the main key index KeyIndex0 to the block chain to form the initial block of the commodity fund information.
[0034] Specifically, the trust starting point in the embodiment is the unique identification registration-main key index KeyIndex0 completed in the commodity warehousing stage, the main key index KeyIndex0 is written into the block chain as a static structure, becoming an unalterable commodity identity anchor point, not only establishing the unique binding of the commodity and marketing fund relationship, but also building an initial state pool independent of traditional centralized database control, realizing the static trusted structure of the trust initialization mechanism with the commodity unique identification as the anchor point.
[0035] Specifically, for the generation of the main key index KeyIndex0, the flow is represented as: , wherein the represents the unique identification code, and the represents the secure hash function SHA-256.
[0036] Further, the step S2 specifically includes the following sub-steps:
[0037] S201. Read the main key index KeyIndex0 in the two-dimensional code by user scanning, combine KeyIndex0 and the current session random number, and generate a session key K_enc through a pseudo-random function PRF;
[0038] S202. Calculate the marketing reward data according to the marketing activity rules, encrypt the marketing reward data through the AES symmetric encryption algorithm, combine the generated session key K_enc to form the ciphertext fund data package C1;
[0039] S203. Generate the digest H_tx of this transaction for the ciphertext fund data package C1.
[0040] 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.
[0041] Furthermore, the encrypted funds data packet C1 in step S202 is specifically represented as follows:
[0042] ;
[0043] 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.
[0044] Furthermore, the step S3 specifically includes the following sub-steps:
[0045] S301. Submit the encrypted funds data packet C1, transaction summary H_tx, and master key index KeyIndex0 to the blockchain verification node;
[0046] S302. Perform traceability and identity verification based on the initial state of the master key index KeyIndex0 registered on the chain.
[0047] 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.
[0048] S304. Write the zero-knowledge proof and verification results into the blockchain.
[0049] Specifically, after the ciphertext data is submitted to the on-chain node, the compliance of the ciphertext data is verified through the zero-knowledge proof mechanism without exposing the content of the ciphertext, forming a mathematical mapping closed loop among the fund source, the commodity identity and the encryption line, ensuring that each fund request is triggered by a legal code scanning behavior, and the content is complete and has not been tampered with. A closed loop verification model combining zero-knowledge proof and blockchain compliance verification is constructed, breaking the traditional security bottleneck of "needing a central node to decrypt and judge", and instead using on-chain tamper-proof + zero-knowledge calculation to form a secure closed loop without a trusted center.
[0050] Further, the step S4 specifically comprises the following sub-steps:
[0051] S401. Receiving the verified ciphertext fund data package C1, the digest H_tx and the zero-knowledge proof through the smart contract;
[0052] S402. Performing secondary verification on the zero-knowledge proof through on-chain verification;
[0053] S403. Decrypting the ciphertext fund data package C1 to extract the reward amount and target account information;
[0054] S404. Locking the corresponding fund according to the balance of the main key index KeyIndex0 bound in the on-chain balance pool, and performing fund transfer to transfer the reward amount to the target account.
[0055] Specifically, after the verification is completed, the system submits C1 and the verification proof to the on-chain smart contract for analysis and execution. The smart contract has the characteristics of automatic execution, conditional triggering and fixed rules, ensuring that only verified data will result in fund transfer, and the transfer behavior is based on the fund pool state mapped by KeyIndex0 on the chain, realizing the on-chain closed loop regulation of the fund. This stage establishes a full-process closed loop system "from unique identification → dynamic interaction → legal verification → automatic transfer", and all state transitions can be tracked and traced on the chain, constructing a smart contract-driven fund transfer and control closed loop automatic execution structure.
[0056] Further, the step S402 specifically comprises the following sub-steps:
[0057] S4021. Calling the on-chain zk-SNARK verification function through the smart contract, inputting the zero-knowledge proof and the digest H_tx;
[0058] S4022. Making the following logical judgments through the zk-SNARK verification function:
[0059] (1) Whether the zero-knowledge proof is generated by a ciphertext data satisfying the constraint;
[0060] (2) Whether the ciphertext data is from a certain bound unique identifier code generated ciphertext fund data packet C1;
[0061] (3) Whether the ciphertext data conforms to the marketing rules;
[0062] (4) Whether all the above rules are established without revealing the plaintext data;
[0063] S4023. When the verification results are all "yes", step S403 is performed.
[0064] Further, in the step S403, the specific process of the second verification of the zero-knowledge proof through on-chain verification includes the following sub-steps:
[0065] S4031. The symmetric decryption key K_enc is reconstructed through the same pseudo-random function PRF in the session key generation mechanism, combined with the random number in the transaction context and the main key index KeyIndex0;
[0066] S4032. And through the AES symmetric decryption algorithm, combined with the supported cryptography library on the chain, the ciphertext fund data packet C1 is decrypted to extract the reward amount and target account information.
[0067] Further, it also includes step S5: generating a transaction digest H_tx2 for the transfer transaction in the fund transfer process, and modeling the path graph for all fund flow digests H_tx2 to construct a transaction behavior graph; through a graph neural network combined with a transaction time series model to predict whether the fund path deviates from the regular mode; when finding that the transaction path includes fund backflow, node aggregation anomaly and frequent device code scanning features, locate the original two-dimensional code source according to the bound KeyIndex0, and freeze the uncompleted contract on the related path.
[0068] Specifically, based on the graph model and deep learning fusion mechanism, the structural modeling, sequence anomaly perception and behavior warning of the fund flow path are realized, so as to track and freeze the potential risk path at the two-dimensional code main index (KeyIndex0) level. The overall embodiment shows the reverse path tracking and active prevention and control ability from the perspective of fund transfer, and establishes a post + in-process dual risk control mechanism for the system.
[0069] Further, the step S5 specifically includes the following sub-steps:
[0070] S501. Generating a transaction digest H_tx2 for the transfer transaction in the fund transfer process, and tracing back to the main key index KeyIndex0 of the initial transaction;
[0071] 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.
[0072] 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 ], where each vector represents a transfer behavior feature, including fund reflow, node aggregation anomaly, and frequent device scanning features;
[0073] 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.
[0074] 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.
[0075] Specifically, for calculating the total score in step S505, freezing the fund path requires a clear triggering rule. For example, a triggering rule is:
[0076] when , then freeze all unfinished transfers of the current KeyIndex0 path;
[0077] Among them, the Indicates the total score, Indicates the preset threshold.
[0078] 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.
[0079] 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.
[0080] Further, for the above embodiment, the detailed principle of the flow is as follows:
[0081] For the directed graph structure , wherein, , the k represents the index of the number of transfer behaviors, the represents the edge corresponding to the kth transfer behavior, the respectively represent the transfer amount, the transfer-out address, the transfer-in address, the transfer time, the scanning device and the transaction summary of the kth transfer transaction, and the represents a node, and the represents a set of edges, and the represents a directed graph structure, characterizes the dynamic evolution process from the master key index KeyIndex0 to all the paths of the transfer behaviors related to the fund flow, in the time dimension t∈[t0,t]. Each edge is an evolution of the fund flow, containing its amount, source and target, time, device, summary and other multi-dimensional features, wherein t0 represents the generation time of the starting master key, and t represents the time node of the current time, i.e. the time section represented by the current constructed dynamic graph represents a directed graph composed of all the paths of the transfer behaviors from KeyIndex0 to the current time t.
[0082] Further, for the graph walk algorithm, the path is extracted by graph walk: the time-ordered path is extracted from KeyIndex0 using depth-first or breadth-first, wherein each path is directed, i.e. , wherein the represents the i-th fund transfer path, i.e. the path sequence, and the represents a path sequence obtained by graph structure walking in from KeyIndex0. Each path reflects a fund flow trajectory, and the represents a set of fund transfer paths, and the represents the path extracted by the depth-first / breadth-first graph walk algorithm, wherein is the depth-first / breadth-first algorithm; further, the behavior features are encoded, i.e. , wherein the represents the behavior vector of the jth step on the path, and the respectively represent the fund flow marker, the aggregation abnormality, the device change rate, the time difference from the previous hop, the current transfer amount, and the geographical jump distance.
[0083] Further, the behavior features of the aggregated surrounding nodes are output by the directed graph attention aggregation GAT, and the output behavior feature sequence is input into the nested GRU for time frequency / device fluctuation modeling, capturing the dynamic evolution mode of the device change frequency, code scanning rhythm and amount fluctuation, and calculating the deviation score. The specific calculation is as follows: wherein the represents the deviation score of path i, the represents the Sigmoid activation function, the represents the weight matrix of the deviation score layer, which is used for linear transformation of the spliced features, the represents the nonlinear activation function, the represents the feature splicing operation, which splices multiple vectors into a long vector as input, the represents the path embedding output by the GRU, the represents the average amount, the represents the device change variance statistic, which can be transformed according to the features set in the forward direction, the represents the overall abnormal score of the path, the , represents the bias vector of the first layer and the second layer, which acts on and the final output. Finally, the total score is calculated by , wherein the represents the total score, and the K represents the number of all paths started from the current key KeyIndex0.
[0084] Further, as a preferred embodiment of the above embodiment, a one-to-one code fund safety management system is provided, comprising:
[0085] A commodity unique identifier and master key initialization module is used to generate a unique dynamic two-dimensional code for each commodity during commodity production or warehousing, and a master key index KeyIndex0 is assigned to the unique dynamic two-dimensional code. The master key index KeyIndex0 is registered as an initial state node in the blockchain account book.
[0086] A marketing interaction and ciphertext fund generation module is used to generate an encryption key K_enc for the current interaction session by reading the master key index KeyIndex0 in the dynamic two-dimensional code when the user scans the code to participate in the marketing activity. The marketing reward data is AES encrypted by the generated encryption key K_enc to generate a ciphertext fund data packet C1 and a summary H_tx of the transaction.
[0087] A blockchain verification and credibility proof module is configured to submit the ciphertext fund data packet C1, the digest H_tx, and the master key index KeyIndex0 to a blockchain verification node, verify the credibility thereof through dynamic zero-knowledge proof, prove that the fund data is generated by the bound unique identification code and complies with preset rules, and record the verification result on the chain.
[0088] A smart contract unlocking and fund allocation module is configured to transmit the verified ciphertext fund data packet C1, the digest H_tx, and the zero-knowledge proof to a smart contract pre-deployed on the chain; obtain the reward amount and target account information through smart contract analysis, lock the balance of the fund pool bound with KeyIndex0 through the content decrypted from the ciphertext fund data packet and the verification result of the zero-knowledge proof protocol, and perform fund allocation.
[0089] The system proposed in the above embodiment is based on five functional modules of unique dynamic two-dimensional code, encrypted fund packet, blockchain verification, smart contract allocation, and graph neural network behavior monitoring, and constructs a marketing reward fund flow system with complete traceability and anti-fraud capability. In the implementation process, the system first generates a unique dynamic two-dimensional code for each product in the product production or warehousing stage, the two-dimensional code of which embeds the master key index KeyIndex0, and through the on-chain initialization operation, KeyIndex0 is registered as the initial state node in the blockchain ledger, ensuring that all subsequent fund interactions bound with the product have a unified starting identification. After the user participates in the marketing activity and scans the code, the system automatically reads KeyIndex0 in the two-dimensional code, and dynamically generates an encryption key K_enc for the current session using the index, which is derived from the master key based on a preset algorithm and combined with parameters such as time stamp or device fingerprint to enhance uniqueness. Subsequently, the system uses the K_enc to perform AES encryption on the marketing reward data to generate a ciphertext fund data packet C1, calculates a hash digest H_tx generated by the current transaction content, and uniformly submits C1, H_tx, and KeyIndex0 to a blockchain verification node.
[0090] The verification node performs a dynamic zero-knowledge proof protocol on the received transaction data to prove that the fund data is indeed generated by the goods bound by KeyIndex0, and that the scanning behavior comes from a compliant device and complies with marketing rules. After verification, the credibility result together with the data digest will be recorded on the chain for subsequent tracking and regulatory calls. The system then passes the ciphertext data package C1 and the zero-knowledge proof to the pre-deployed smart contract on the chain. The contract identifies the reward amount and the target transfer address after analyzing the ciphertext package, and confirms the executability of the transaction by verifying the consistency of the ciphertext package and the zero-knowledge proof. Once the verification is correct, the smart contract will lock the balance in the fund pool bound by KeyIndex0, and transfer the corresponding funds to the designated account, thus completing a complete fund reward operation.
[0091] During the fund transfer process, the system continuously generates a summary H_tx2 for each transfer transaction and maps all fund paths with KeyIndex0 as the center node to construct a dynamic graph structure , where the nodes are the main key index set, and the edges are the transfer behavior records, including the amount, time, scanning device, address information, and other transaction elements. This graph structure is updated in real time with the transfer behavior, and all fund flow behaviors in the path are modeled using deep walk (DFS / BFS), abstracting each fund path as a time-ordered behavior sequence. The system uses graph neural networks (such as GAT) to model the path sequence features, extract node aggregation, fund reflux, device switching, and other graph structure features, and input each path vector sequence into a nested GRU time series network to capture device usage frequency and time fluctuation patterns, thus combining graph and sequence features to complete the behavior deviation score of each path.
[0092] Finally, the system calculates the total risk score of the overall fund path based on the deviation score of each path, and compares the score with the pre-set threshold. Once a path with a high deviation score is found (such as frequent replacement of scanning devices, fund reflux of the same KeyIndex0 to the source address, aggregation of multiple KeyIndex0 to the same account, etc.), the system will immediately locate the corresponding main key index KeyIndex0 and freeze the fund transfer contract that has not been completed on its path, preventing further fund transfer, thus achieving immediate interruption and precise attack on abnormal fund paths. The entire process uses dynamic QR codes as the information entry, blockchain as the trust base, encryption calculation and smart contracts as the execution core, and combines graph neural network behavior recognition algorithms to achieve a full-link closed-loop prevention and control mechanism from fund ciphertext generation to on-chain transfer and risk interception.
[0093] The foregoing is considered as illustrative only of the principles of the application. Further, since numerous modifications and changes will readily occur to those skilled in the art, it is not desired to limit the application to the exact construction and operation described. Accordingly, all such variations are intended to be included within the scope of the present application as defined in the claims below and their equivalents.
Claims
1. A method for managing marketing funds of one product one code, characterized in that, Comprise the following steps: S1. In the commodity production or warehousing stage, a unique dynamic two-dimensional code is generated for each commodity, and a master key index KeyIndex0 is assigned to the unique dynamic two-dimensional code; the master key index KeyIndex0 is registered as an initial state node in the blockchain ledger; S2. When a user scans the code to participate in a marketing activity, the master key index KeyIndex0 in the dynamic two-dimensional code is read to generate an encryption key K_enc for the current interaction session; and the marketing reward data is AES encrypted by the generated encryption key K_enc to generate a ciphertext fund data packet C1 and a summary H_tx of the transaction generated by the current marketing activity; S3. The ciphertext fund data packet C1, the summary H_tx and the master key index KeyIndex0 are submitted to the blockchain verification node, and the authenticity thereof is verified by dynamic zero-knowledge proof, proving that the fund data is generated by the bound unique identification code and conforms to the preset rules, and the verification result is recorded on the chain; S4. The verified ciphertext fund data packet C1, the summary H_tx and the zero-knowledge proof are transmitted to the smart contract pre-deployed on the chain; the reward amount and target account information are obtained by analyzing the smart contract, and the balance of the fund pool bound with KeyIndex0 is locked and the fund transfer is executed through the content decrypted from the ciphertext fund data packet and the verification result of the zero-knowledge proof protocol.
2. The method for managing the security of one-code marketing funds according to claim 1, wherein, In the step S1, the unique dynamic two-dimensional code is also assigned a timestamp, a manufacturer signature and a marketing strategy ID.
3. The method of claim 1, wherein the one code one product marketing fund is managed by a plurality of companies, and the plurality of companies are managed by a plurality of companies. The step S1 specifically comprises the following sub-steps: S101. Collecting the basic information of commodity production or warehousing as unique input data; S102. Hashing the basic information by a SHA-256 encryption hash function to generate a unique identification code; combining the dynamic two-dimensional code algorithm to generate a unique dynamic two-dimensional code containing the unique identification code; S103. Generating and binding the master key index KeyIndex0 based on the unique identification code as the identity of the fund circulation; S104. Registering the master key index KeyIndex0 to the blockchain to form the initial block of the commodity fund information.
4. The method of claim 1, wherein the one code one product marketing fund is managed by a plurality of companies, and the plurality of companies are managed by a plurality of companies. The step S2 specifically comprises the following sub-steps: S201. Reading the master key index KeyIndex0 in the two-dimensional code by the user scanning, combining KeyIndex0 and the current session random number to generate a session key K_enc by a pseudo-random function PRF; S202. Calculating the marketing reward data to be issued according to the marketing activity rules, and encrypting the marketing reward data by the AES symmetric encryption algorithm to form a ciphertext fund data packet C1, combining the generated session key K_enc; S203. Generating a summary H_tx of the transaction for the ciphertext fund data packet C1.
5. The method of claim 4, wherein the one code one product marketing fund is managed by the server. The ciphertext fund data packet C1 in the step S202 is specifically represented as: ; Among them, the represents a secret fund data packet, and the represents a key K_enc encrypted by AES, and the represents a reward amount, and the represents a user ID, and the represents a code scanning time, and the , and are marketing reward data.
6. The method of claim 1, wherein the one code one product marketing fund is managed by a plurality of companies. The step S3 specifically comprises the following sub-steps: S301. Submitting the ciphertext fund data packet C1, the transaction summary H_tx and the master key index KeyIndex0 to the blockchain verification node; S302. Trace and identity check by the initial state of the on-chain registered master key index KeyIndex0; S303. Generate a proof through a dynamic zero-knowledge proof protocol, proving that the ciphertext fund data packet C1 is derived from the bound unique identification code and complies with the fund distribution rules, and without exposing the specific reward content; S304. Write the zero-knowledge proof and the verification result into the blockchain.
7. The method of claim 1, wherein the one code one product marketing fund is managed by a plurality of companies, and the plurality of companies are managed by a plurality of companies. The step S4 specifically includes the following sub-steps: S401. Receive the ciphertext fund data packet C1, the digest H_tx and the zero-knowledge proof that pass the verification through the smart contract; S402. Perform secondary verification on the zero-knowledge proof through on-chain verification; S403. Decrypt the ciphertext fund data packet C1 to extract the reward amount and target account information; S404. Lock the corresponding funds according to the balance of the bound master key index KeyIndex0 in the on-chain balance pool; And perform fund transfer to transfer the reward amount to the target account.
8. The method of claim 7, wherein the one code one product marketing fund is managed by the server. The step S402 specifically includes the following sub-steps: S4021. Call the on-chain zk-SNARK verification function through the smart contract, input the zero-knowledge proof and the digest H_tx; S4022. Perform the following logical judgment through the zk-SNARK verification function: Is the zero-knowledge proof generated from a ciphertext data that meets the constraints? Is the ciphertext data from a ciphertext fund data packet C1 generated from a bound unique identification code? Does the ciphertext data comply with the marketing rules? Are all the above rules established without revealing the 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: The step S403 specifically includes the following sub-steps: S4031. Reconstruct the symmetric decryption key K_enc through the same pseudo-random function PRF in the session key generation mechanism, combining the random number in the transaction context and the master key index KeyIndex0; S4032. And decrypt the ciphertext fund data packet C1 through the AES symmetric decryption algorithm, combining the on-chain supported cryptography library to extract the reward amount and target account information.
10. The method of claim 1, wherein the one-to-one marketing fund management method is characterized by, Also includes step S5: generate a transaction digest H_tx2 for the transfer transaction in the fund transfer process, and model the path graph for all fund flow digests H_tx2 to construct a transaction behavior graph; through a graph neural network combined with a transaction time series model to predict whether the fund path deviates from the regular mode; When it is found that the transaction path includes fund backflow, node aggregation anomaly and frequent device code scanning features, locate the original two-dimensional code source according to the bound KeyIndex0, and freeze the uncompleted contracts on the related path.
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 digest H_tx2 for the transfer transaction in the fund transfer process, and trace back to the initial master key index KeyIndex0 of the transaction; S502. Take the transfer amount, transaction summary H_tx2, transfer time, transfer-out address, transfer-in address and scanning device involved in the stroke as edges, and the KeyIndex0 as nodes, to construct a dynamic evolution directed graph structure for representing the path of the fund flow; S503. Unfold each path in the graph in time sequence to form a path sequence; encode each path as a vector sequence Xᵢ = [x1, x2,..., x n ] by extracting all paths in the sequence using a graph walk algorithm, where x1,x2,..., x n represent n vectors, each representing a diversion behavior feature, including fund backflow, node aggregation anomaly, and frequent device code scanning features; S504. Model the vector sequence based on the GAT graph neural network, and nest the GRU time series model to capture the time frequency and device fluctuation pattern, and calculate the deviation score of each path sequence; S505. Calculate the total score according to the deviation score of each path sequence, and compare the total score with the preset threshold, and freeze all uncompleted transfers of the KeyIndex0 path corresponding to the total score exceeding the threshold.
Citation Information
Patent Citations
Digital asset tracing method based on block chain
CN119338466A
Marketing arbitrage underground industry identification method based on dynamic attention graph network
WO2023029324A1