A marketing fund dynamic management and control method and device and storage medium

By constructing a fund pool, a cash deposit module, a number disbursement station, and a control node, and combining Redis caching technology and a ledger module, the limits and transaction limits are dynamically adjusted, solving the dynamic adjustment problem of existing marketing fund control methods and achieving efficient marketing fund utilization and transaction response.

CN122390795APending Publication Date: 2026-07-14BEIJING KAI KE WEISHI TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING KAI KE WEISHI TECH CO LTD
Filing Date
2026-04-21
Publication Date
2026-07-14

AI Technical Summary

Technical Problem

Existing marketing fund management methods cannot dynamically adjust management performance based on transaction concurrency, nor can they dynamically adjust periodic limits based on actual transactions and balances, resulting in low real-time transaction processing efficiency and insufficient utilization of marketing funds.

Method used

A dynamic marketing fund management method is adopted, which constructs a fund pool, a cash box module, a number disbursement station, and a management node. It utilizes a multi-queue control structure with Redis caching technology to dynamically monitor and adjust the management node. Combined with the ledger module for historical data analysis, it dynamically adjusts the limit and the transaction limit to achieve dynamic fault tolerance and resource scheduling.

Benefits of technology

It improves the processing performance of marketing fund management, can dynamically adjust according to transaction concurrency pressure, optimize resource allocation in high-concurrency scenarios, improve transaction response efficiency, and ensure the full utilization and reasonable allocation of marketing funds.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122390795A_ABST
    Figure CN122390795A_ABST
Patent Text Reader

Abstract

The application relates to the field of electronic payment, and specifically provides a marketing fund dynamic management and control method and device and a storage medium. The application aims to solve the problems that the prior art cannot dynamically adjust the management and control performance according to transaction concurrency, and cannot dynamically adjust the period limit according to the actual transaction and balance, thereby leading to low real-time transaction processing efficiency and insufficient fund utilization. The method comprises the following steps: constructing a management and control structure comprising a fund pool, a money cabinet module created daily, a number distribution station, at least one management and control node and a ledger module; when a real-time transaction is performed, available management and control nodes are acquired, a number plate is acquired through a number picker of the management and control node, and a quota deduction is initiated to a money chest; at the end of a day, unused number plates and quotas of all nodes are recovered, and a net expenditure amount and a number of used number plates of the day are recorded in the ledger; and based on historical data of the ledger and a remaining plan, the marketing limit of each period and the limit of each pen are dynamically adjusted.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of electronic payment, and provides a method, apparatus, and storage medium for dynamic management of marketing funds. Background Technology

[0002] Marketing activities in the field of electronic payment refer to the legal and compliant preferential means used by both the payer and payee in the process of conducting fund transactions using software applications. The marketing funds used in the transaction are another form of electronic cash, funded by the payee or a third-party institution. By setting certain conditions for the use of marketing funds and increasing the threshold for use, they are used to offset or reduce the actual transaction amount paid by the payer, thereby achieving the goal of mutual benefit, win-win or multi-win for all parties.

[0003] Marketing funders typically employ a wide variety of marketing methods to attract new users, reactivate existing customers, and maintain a continuously active trading market. Therefore, the rational allocation and strict control of marketing funds after they are deployed to the market are particularly important. To prevent marketing funds from being frequently used and rapidly consumed by "wool party" members (those who exploit promotional offers), thus failing to achieve the desired marketing results and objectives, strict requirements are imposed on the management and use of marketing funds to ensure their healthy and rational utilization.

[0004] One method is to pre-set a marketing plan for a certain number of days and divide the marketing funds into multiple portions according to the number of days in the marketing plan. Each portion is only available for one day's transactions. If the day's transactions use up the marketing quota for that day, then subsequent transactions within that day cannot use the marketing funds. This ensures that there is still a usable marketing share every day within the entire marketing plan without overdrafting the marketing funds, thus guaranteeing the sustainability and effectiveness of the marketing.

[0005] Some methods set limits on marketing funds, namely, limiting the maximum number of transactions and the maximum amount of money used for marketing each day, week, and month. If marketing funds are used for each transaction, the marketing amount and number of transactions are continuously accumulated on a daily, weekly, and monthly basis. When the total number of transactions or the total marketing amount exceeds the limit or limit for that period, the use of marketing funds is no longer allowed. This achieves reasonable control over the use of marketing funds and ensures the sustainability and effectiveness of marketing. Summary of the Invention

[0006] The purpose of this invention is to solve the problems of low real-time transaction processing efficiency and insufficient utilization of marketing funds caused by the inability of existing marketing fund management methods to dynamically adjust management performance according to transaction concurrency and to dynamically adjust periodic limits according to actual transactions and balance.

[0007] To achieve the above objectives, the present invention employs the following technical means:

[0008] This invention provides a method for dynamic management and control of marketing funds, comprising the following steps:

[0009] Step S1: Construct a marketing fund management structure, which includes a fund pool for storing the total marketing funds, as well as a daily-created cash box module, a number dispensing station, at least one management node, and a ledger module; wherein, the management node includes a number dispenser and a cash box;

[0010] Step S2: In real-time transaction processing, the control program obtains an available control node, retrieves a number from the number dispenser of the control node, and sends a marketing quota deduction instruction to the money box of the control node.

[0011] Step S3: At the end of the day, start the clearing process, collect all unused remaining license plates in the ticket dispensers and unused remaining marketing funds in the cash box at all control nodes, and record the net marketing expenditure and net number of license plates used for the day in the ledger module.

[0012] Step S4: Based on the historical data and remaining marketing plans recorded in the ledger module, dynamically adjust the marketing limits and transaction limits for each period.

[0013] In steps S1 and S2, the number dispensing station dynamically monitors and adjusts the management and control nodes through a "multi-queue joint control structure based on Redis caching technology," specifically including:

[0014] The number distribution station creates a corresponding, uniquely named cache queue in Redis for each newly created management node, and sets a TTL countdown for the key of the queue;

[0015] When the number generator generates a number for a transaction, it resets the TTL countdown of the corresponding queue key and sets the queue lock status of that queue to off; after the quota deduction for that transaction is completed, the queue lock status is reopened.

[0016] When the number issuing station receives a new transaction request, if the queue lock of the currently selected control node is in a closed state, it will automatically find and select another control node with a queue lock in an open state to process the transaction request.

[0017] When the number issuing station detects that the queue locks of all existing control nodes are in a closed state, it automatically creates a new control node and its corresponding Redis cache queue to handle new transaction requests.

[0018] Redis automatically deletes timed-out queue keys based on the TTL countdown. The number disbursement station uses this information to identify idle management nodes and reclaim their remaining resources. In the above scheme, step S1 includes:

[0019] Step S1.1: The server automatically creates a new cash register module and a new number dispensing station every day;

[0020] Step S1.2: Calculate the average daily marketing quota based on the total amount of the fund pool and the total number of days of the marketing plan, which is the maximum marketing quota for the day, and deposit it into the fund module as the initial quota for the day;

[0021] Step S1.3: The number distribution station automatically generates an equal number of number plates based on the maximum number of marketing transactions allowed per day set in the marketing plan;

[0022] Step S1.4: The ticket dispensing station automatically monitors the currently available control nodes. If there are no currently available control nodes, the ticket dispensing station will automatically create a new control node. A control node consists of two parts: a ticket dispenser and a money box.

[0023] In the above scheme, step S2 includes:

[0024] Step S2.1: The marketing control program automatically obtains an available control node;

[0025] Step S2.2: Take a number from the number dispenser at the control node. If there are no numbers in the number dispenser or all numbers have been taken, the number dispenser will automatically request a number of numbers from the number distribution station in batches.

[0026] Step S2.3: If the number of license plates currently available at the ticket dispensing station is sufficient to meet the current application of the ticket dispenser, then the corresponding number of license plates will be taken from the license plates it manages and dispensed to the ticket dispenser. At the same time, the number of license plates available at the ticket dispensing station itself will be reduced accordingly.

[0027] Step S2.4: After the control program takes a number from the number dispenser of the control node, it can send a real-time deduction instruction to the cash box to reduce the marketing quota managed by the cash box.

[0028] Step S2.5: If the cash box has no quota or the quota is insufficient to support the marketing transaction, the cash box will automatically apply for a quota from the cash box module. If the existing marketing quota of the cash box module is sufficient to meet the cash box's application, the corresponding quota will be taken out from the marketing quota managed by the module to release the quota to the cash box.

[0029] Step S2.6: After receiving the instruction, Qianxia immediately deducts an amount equal to the marketing funds in the transaction from its existing quota.

[0030] Step 2.5: If the current control node is unable to process the current transaction due to insufficient resources during the license plate application or quota application process, the control procedure will transfer the current transaction to another control node for processing.

[0031] In the above scheme, step S3 includes:

[0032] Step S3.1: At the end of the day, the scheduled task on the server triggers the clearing schedule module, which broadcasts a resource reclamation instruction to all active management nodes.

[0033] Step S3.2: Collect all unused remaining number plates from the number dispensers in all control nodes to the number dispensing station, and collect all unused remaining marketing funds from the cash boxes in all control nodes to the cash box module;

[0034] Step S3.3: By comparing the remaining amount at the end of the day with the initial value at the beginning of the day, the difference is obtained as the net usage for the day. The net usage for the day includes the net marketing expenditure amount for the day and the net number of license plates used for the day.

[0035] Step S3.4: Record the net marketing expenditure amount and the net number of license plates used on the same day into the ledger module;

[0036] Step S3.5: If there are marketing funds returned the following day, summarize the number of license plates and the amount of funds returned according to the original transaction date, and deduct them from the data record corresponding to the original transaction date in the ledger module.

[0037] In the above scheme, step S4 includes:

[0038] Step S4.1: After the daily reconciliation is completed, the ledger module reads historical marketing data, the remaining days of the marketing plan, the remaining status of each preset period, and historical year-on-year data from the non-volatile storage medium;

[0039] Step S4.2: The ledger module calls a preset data analysis subroutine to generate the total remaining daily average suggested value, the periodic remaining daily average suggested value for at least one preset period, and the periodic year-on-year daily average suggested value for the corresponding preset period.

[0040] Step S4.3: The ledger module compares the total remaining daily average suggested value, the remaining daily average suggested value for each period, and the preset fixed limit.

[0041] Step S4.4: If the total remaining daily average suggested value or the remaining daily average suggested value of any period is greater than the fixed limit, the ledger module selects the maximum value between the total remaining daily average suggested value and the remaining daily average suggested value of each period as the actual limit value for that day.

[0042] Step S4.5: If the total remaining daily average suggested value and the remaining daily average suggested value of all periods are not greater than the fixed limit, then the ledger module selects the minimum value between the remaining daily average suggested value of the period and the same period's daily average suggested value for each preset period, and selects the minimum value from the minimum values ​​of all preset periods as the actual limit value for that day.

[0043] Step S4.6: The ledger module writes the actual limit value of the day into the daily marketing fund limit parameter register of the cash box module, and simultaneously updates the daily marketing transaction limit parameter register of the number release station module.

[0044] Step S4.7: Based on the updated parameter register, the cash register module and the number dispensing station module dynamically allocate marketing funds and number resources in subsequent transaction processing to optimize the node resource scheduling efficiency in high-concurrency scenarios.

[0045] In the above scheme, the ledger module reads the remaining total marketing funds data field maintained by the fund pool module and the remaining days data field maintained by the marketing plan module from the non-volatile storage medium, and calls the preset total remaining daily average generation subroutine; the total remaining daily average generation subroutine performs data conversion operations by the central processing unit to generate a suggested total remaining daily average value, and writes the suggested total remaining daily average value into the memory cache area of ​​the ledger module;

[0046] The ledger module reads the remaining quota data field and the remaining days data field of each preset period from the non-volatile storage medium, and calls the preset daily average remaining period generation subroutine; the daily average remaining period generation subroutine performs data conversion operation on each preset period by the central processing unit, generates the suggested daily average remaining period value for each preset period, and writes the suggested daily average remaining period value for each period into the memory cache area.

[0047] The ledger module reads historical marketing transaction record data from the non-volatile storage medium and calls a preset periodic year-on-year daily average generation subroutine. The periodic year-on-year daily average generation subroutine aggregates and statistically analyzes data at the same calendar position in the historical transaction records according to a preset period by the central processing unit, generates suggested values ​​for the periodic year-on-year daily average for each preset period, and writes the suggested values ​​for the periodic year-on-year daily average to the memory cache.

[0048] The suggested values ​​in the memory cache serve as input parameters for the numerical comparison in step 4.3, enabling the cashier module and the number dispensing module to directly call the pre-generated suggested values ​​in subsequent transaction processing. This avoids dynamic calculations during peak real-time transaction periods, reduces the instantaneous load on the central processing unit, and improves the response efficiency of marketing resource allocation in high-concurrency scenarios.

[0049] In the above scheme, step S2 further includes dynamic fault-tolerant processing performed by the control program:

[0050] When the ticket dispenser requests a license plate from the ticket dispensing station, if the number of license plates remaining at the ticket dispensing station is insufficient to meet the request, the ticket dispensing station module will write the remaining full number of license plates it maintains into the license plate cache area of ​​the ticket dispenser.

[0051] If the license plate data field of the number dispensing module is empty, the control program will transfer the current transaction request and the pointer of the pending transaction queue of license plates already obtained in the number dispenser to the scheduling module, which will then allocate them to other available control nodes.

[0052] When Qianxia requests a credit limit from Qiangui, if the remaining funds in the Qiangui module are insufficient to meet the requested amount, the Qiangui module will write the remaining full credit limit data it maintains into the credit limit cache area of ​​Qianxia.

[0053] If the credit limit data field of the cash box module is empty and the cash box still cannot meet the current transaction deduction requirements, the control program will transfer the current transaction request to the scheduling module.

[0054] After the transaction is completed, the ticket dispensing module sets the status flag of the control node to "unavailable" and triggers the control node to perform resource reclamation operation: write the remaining license plate data in the license plate cache area of ​​the ticket dispenser back to the license plate data pool of the ticket dispensing module, and write the remaining amount data in the amount cache area of ​​the money box back to the amount data pool of the money box module.

[0055] The number dispensing module sends a node deletion command to the server-side node management unit, which then releases the memory and thread resources occupied by the controlled node to reduce system resource fragmentation and improve the scheduling efficiency of available controlled nodes in high-concurrency scenarios.

[0056] The above scheme further includes a step of dynamically adjusting the number of control nodes, executed by the number disbursement module:

[0057] The ticket dispensing module collects queue length data of the ticket dispensers in each control node in real time through polling or event-driven mechanisms.

[0058] When it is determined that the queue length of all number dispensers is greater than zero, the number dispensing module instantiates a new control node process, triggering the new control node process to apply for number plates in batches from the number dispensing module and to apply for marketing funds in batches from the cashier module; after the application is successful, the number dispensing module routes subsequent transaction requests to the new control node process;

[0059] When it is determined that the queue length of the ticket dispenser is continuously zero for more than a preset time threshold, the ticket dispensing module sends a node deactivation instruction to the corresponding management node process.

[0060] In response to the node deactivation command, the control node process returns the remaining license plate data packets in the ticket dispenser to the ticket dispensing module and the remaining marketing fund amount data packets in the cash box to the cash vault module. After resource recovery is confirmed, the ticket dispensing module destroys the control node process.

[0061] The dynamic adjustment process enables the system to automatically expand processing resources in high-concurrency transaction scenarios and automatically reclaim idle resources during low-load periods, thereby reducing the idle load and memory usage of the central processing unit and improving the real-time response throughput of marketing fund management operations.

[0062] The present invention also provides a storage medium storing a computer program, which, when executed by a processor, implements the method for dynamic management of marketing funds as described in any one of claims 1 to 8.

[0063] The present invention also provides a device for dynamic management and control of marketing funds, wherein the processor executes the aforementioned method for dynamic management and control of marketing funds.

[0064] Because the present invention employs the above-mentioned technical means, it has the following beneficial effects:

[0065] 1. This invention designs a special control structure to restrict and manage marketing transactions, resulting in higher performance in quota control and dynamic adjustment of processing performance based on transaction concurrency pressure. The control structure distributes the overall quota into multiple control nodes to simultaneously handle multiple transaction requests. When a control node experiences transaction queuing congestion, the control structure automatically adds control nodes to improve concurrency control capabilities; when a control node is idle, the control structure automatically removes idle control nodes to conserve resources. By flexibly adjusting control nodes, the processing performance of quota control can be dynamically adjusted according to changes in concurrency pressure, thereby improving the performance of marketing fund management.

[0066] 2. An automatic marketing quota adjustment mechanism has been added. Through the analysis and calculation of historical data in the ledger, the allocation of quotas can be dynamically adjusted. The maximum limit and transaction limit can be flexibly and automatically adjusted according to the overall situation of current marketing transactions. When the remaining quota is sufficient, the control structure can automatically expand the maximum limit limit. When the remaining quota is scarce, the control structure can automatically shrink the maximum limit limit. This can prevent the overall quota from being used up in advance, which would affect the later marketing activities of the marketing plan, and can also achieve the goal of making full use of marketing funds without waste.

[0067] 3. An automatic compensation mechanism has been added for lost control limits due to transaction anomalies or rollbacks. The control structure records and cancels transactions in real time to return the limits that have already been deducted. Cancellations made on the same day are returned directly in real time, while cancellations made the following day are returned through the ledger record. This is more in line with actual business operations. Through the automatic compensation mechanism, the limit records are more accurate and more in line with actual usage, so as to achieve the goal of making fuller use of marketing funds.

[0068] 4. A dynamic fault tolerance mechanism has been added for abnormal credit limit deduction situations. In the event of unconventional credit limit shortages due to credit resource allocation, the credit limit management is made more flexible by allowing applications to be submitted at any time. When credit limit applications cannot be fulfilled, the fault tolerance mechanism is used to transfer the current marketing management and automatically cancel the management node with insufficient credit limit, so that marketing funds can still be fully utilized even with multiple management nodes. Attached Figure Description

[0069] Figure 1 Overall structural diagram;

[0070] Figure 2 : The workflow of the control structure;

[0071] Figure 3 The workflow of the compensation mechanism;

[0072] Figure 4 A workflow for dynamically adjusting and controlling performance;

[0073] Figure 5 The workflow for dynamically adjusting marketing quotas;

[0074] Figure 6 Workflow of dynamic fault tolerance in control structure (1);

[0075] Figure 7 Workflow of dynamic fault tolerance in control structure (2). Detailed Implementation

[0076] The embodiments of the present invention will be described in detail below. Although the present invention will be described and illustrated in conjunction with some specific embodiments, it should be noted that the present invention is not limited to these embodiments. On the contrary, any modifications or equivalent substitutions made to the present invention should be covered within the scope of the claims of the present invention.

[0077] Furthermore, to better illustrate the present invention, numerous specific details are set forth in the following detailed embodiments. Those skilled in the art will understand that the present invention can be practiced without these specific details.

[0078] I. Overall Structure

[0079] The overall structure of the present invention is as follows Figure 1 As shown, the core of this invention includes the following concepts:

[0080] Funds pool: A container used to store the total amount and remaining amount of marketing funds for a marketing plan. It is not a real account, but the data stored in it can accurately represent the real funds situation of the dedicated funds account used for this marketing plan.

[0081] The Cash Box module is a structure used to control the daily marketing fund limit of the current marketing plan. It has the ability to apply for and return funds from the fund pool, as well as the ability to distribute funds to the cash box in batches.

[0082] Number dispensing station: A structure used to control the daily marketing limit of the current marketing plan, using the number of number plates to implement the limit; it dispenses numbers in batches to the number dispensing machines, and can dynamically monitor the traffic of each number dispensing machine;

[0083] Ledger module: Records the daily net marketing expenditure of the cashier module and the daily net number of license plates used by the number disbursement station. It has data analysis capabilities and the ability to provide suggestions on the initial daily quota for the cashier module and the number disbursement station.

[0084] Control node: A special structure consisting of a ticket dispenser and a cash box, which has the ability to communicate and exchange data with the cash box module and the ticket dispensing station, and is generated by the ticket dispensing station;

[0085] Number dispenser: Receives transaction requests from clients, serves as an entry point for marketing control during real-time transactions, and has the ability to apply for number plates in bulk from the number dispensing station;

[0086] Qianxia module: manages the marketing quota allocated by Qiangui module, receives deduction instructions from the control program to deduct marketing quota in real time, and has the ability to apply for quota from Qiangui module and return the remaining quota;

[0087] Issuing numbers: The process by which the number issuing station distributes a certain number of number plates to the number dispensing machine;

[0088] Disbursement: The process by which the cashier module allocates a certain amount of marketing funds to the cash box;

[0089] Recycling: The process by which the ticket dispenser returns unused ticket numbers to the ticket dispensing station and the cash box returns unused marketing funds to the cash drawer module;

[0090] Account clearing: At the end of the day, the cash register module and the ticket dispensing station collect the remaining balances from all controlled nodes, calculate the net number of license plates consumed by the ticket dispensing station and the net marketing expenditure of the cash register module for the day, and record the process in the ledger module.

[0091] II. Working Principles of Marketing Fund Management

[0092] In the field of electronic payment, conducting a marketing campaign requires preparing marketing funds and setting up a marketing plan. The marketing funds are generally provided by the organizer (payee or third-party institution), who designs and plans the timeline for the marketing campaign and transfers the full amount of funds used for the campaign into a dedicated marketing fund account, while also writing the total amount into a fund pool.

[0093] The total amount in the fund pool used for this marketing plan is equal to the actual amount in the marketing fund special account used for this marketing plan, and it decreases as the marketing funds are used. During the execution of the marketing transaction, the current remaining amount in the fund pool also represents the remaining funds of the current marketing plan.

[0094] The daily usage of the funds pool is managed by the ledger module.

[0095] Examples of capital pools are as follows:

[0096]

[0097] Control structure initialization:

[0098] Once the marketing plan begins execution, the server automatically creates a new cash pool module and a new number dispensing station at 00:00 every day. Based on the total amount of the fund pool and the total number of days in the marketing plan, the average daily marketing quota, i.e. the maximum marketing quota for the day, is calculated and deposited into the cash pool module as the initial quota for the day. At the same time, the number dispensing station automatically generates an equal number of number plates according to the maximum number of marketing transactions allowed per day set in the marketing plan.

[0099] Once the cash register module and ticket dispensing station are ready, the ticket dispensing station automatically monitors available control nodes. If no control node is currently available, the ticket dispensing station will automatically create a new one. A control node consists of two parts: a ticket dispenser and a cash box. The ticket dispenser is responsible for communication and data exchange with the ticket dispensing station, while the cash box is responsible for communication and data exchange with the cash register module.

[0100] Once the control nodes are created by the number issuing platform, the entire marketing control structure is complete.

[0101] How a control structure works:

[0102] When a client submits a payment transaction containing marketing information to the server, the server completes the business checks on the transaction and immediately invokes the marketing control program to begin processing the marketing portion.

[0103] like Figure 2 As shown in the process, the marketing control program automatically obtains an available control node and takes a number from the number dispenser of that control node. If there are no numbers in the number dispenser or all numbers have been taken, the number dispenser will automatically apply for a number of numbers from the number release station in batches. If the number release station has enough numbers in stock to meet the number dispenser's application, it will take the corresponding number of numbers from its own managed number of numbers and release numbers to the number dispenser. At the same time, the number of numbers in the number release station itself will also be reduced accordingly.

[0104] After receiving the number assigned by the ticket dispensing station, the ticket dispenser stores it. The control program retrieves a number from the dispenser at that control node and then sends a real-time deduction instruction to the cash box (or similar device) to reduce its managed marketing quota. Once the number is retrieved, it is automatically destroyed. If the cash box has no quota or insufficient funds to support the marketing transaction, it will automatically request a quota from the cash vault module. If the cash vault module's existing marketing quota is sufficient to meet the cash box's request, it will allocate the corresponding quota from its own managed marketing quota to the cash box, while simultaneously reducing its own marketing quota accordingly.

[0105] After receiving the marketing quota allocated by the QianKu module, the QianKu is stored in the existing quota of the QianKu. The control program sends a real-time deduction instruction to the QianKu. Upon receiving the instruction, the QianKu immediately deducts an amount equal to the marketing funds in the transaction from its existing quota.

[0106] How the ledger module works:

[0107] The ledger module records the daily net marketing expenditure of the cashier module and the daily net number of license plates used by the number dispensing station. Each day, both the cashier module and the number dispensing station have initial values: the maximum usable marketing funds and the maximum number of marketing transactions for that day. During the transaction marketing control process, after the control node application, the cashier module's credit limit is released, and the number dispensing station releases license plates, the remaining credit limit of the cashier module decreases as transactions are deducted, and the remaining number of license plates on the number dispensing station also decreases. This continues until the end of the day, at which point the control program automatically initiates the clearing process.

[0108] The clearing process starts automatically after all transactions for the day. First, it collects any unused license plates from the ticket dispensers at all controlled nodes and returns them to the ticket dispensing station. It also collects any unused marketing funds from the cash drawers at all controlled nodes and returns them to the cash drawer module. Then, it compares the remaining amount at the end of the day with the initial value at the beginning of the day; the difference is the net usage, which represents the total number of marketing transactions and the total amount of marketing funds used that day. The net marketing expenditure and the number of marketing transactions (net number of license plates used) are recorded in the ledger module.

[0109] The following is an example of the ledger module:

[0110]

[0111] Automatic compensation mechanism of control structure:

[0112] When there are special or abnormal circumstances in a transaction, the control structure cannot accurately manage the limits and transaction limits. In this case, a certain compensation mechanism is needed to handle the abnormal situation and ensure the accuracy of the entire control process.

[0113] When a marketing transaction is deducted from the marketing limit by the marketing control program, if the transaction fails, is canceled by the payer, or is refunded, the limit recorded by the control structure in the ledger module, cash register module, and number disbursement station will be inconsistent with the actual usage. When such situations involving the return of marketing funds occur, the control structure will automatically correct the data through a compensation mechanism.

[0114] like Figure 3 As shown in the process, when a marketing fund is returned, the issuing station of the control structure accepts the request for the return of the marketing fund. The issuing station determines whether the return is a same-day return or a return the following day based on the original transaction date. If the original transaction is returned on the same day, the issuing station automatically creates a new number and sends a marketing quota return instruction to the cashier module. The cashier module automatically adds up the amount of the returned marketing fund, so subsequent transactions on the same day can continue to use this number and quota to complete the transaction.

[0115] If the marketing funds being returned are not from a transaction that occurred on the same day, but from a transaction that occurred the day before, the ticket issuing station will separately record the date and number of the original transaction. The number will be accumulated multiple times by date, and a return instruction for the next day will be sent to the cashier module. After receiving the instruction, the cashier module will also separately record the date of the original transaction and the corresponding marketing fund amount, and the amount will be accumulated multiple times by date.

[0116] At the end of the day, in addition to recording the net marketing expenditure amount and the number of marketing transactions (net number of license plates used) in the ledger module, the cashier module and the number disbursement station simultaneously deduct the cumulative number of returned license plates and the amount of funds from the account on the corresponding date. This ensures the accuracy of fund management in the ledger module, cashier module, and number disbursement station.

[0117] III. Methods for Dynamically Adjusting and Controlling Performance

[0118] Based on the working principle of the marketing control structure, the control node is the core of processing transaction requests. The number of control nodes directly affects the control performance under concurrent transaction requests. The number disbursement station in the control structure dynamically monitors the traffic of the control nodes and, through traffic pressure assessment, dynamically increases or decreases the number of control nodes, thereby achieving the goal of the control structure to dynamically adjust the processing performance under concurrent transaction conditions.

[0119] When the transaction concurrency is high, the control node in the entire control structure may become a performance bottleneck. This is because the cash box in the control node can only process the deduction of marketing quota for one transaction at a time. High-concurrency transaction traffic will cause congestion at the control node. That is, when the quota deduction processing efficiency of the cash box cannot keep up with the efficiency of the control program in obtaining the number from the number dispenser, the control program will queue the transactions that obtain the number from the number dispenser in the number dispenser. Based on the first-in-first-out principle of the queue structure, the quota will be deducted in the cash box in the order of the queue.

[0120] like Figure 4 As shown in the process, the ticket dispensing station monitors the queue length of the ticket dispensers in each control node. If all ticket dispensers are currently in a queue, it means that there are no idle control nodes available. In this case, the ticket dispensing station automatically creates a new control node. After the new control node successfully applies for a ticket number and a fund quota from the ticket dispensing station and the cashier module, the marketing fund management for subsequent transactions is automatically allocated to the new control node by the ticket dispensing station. This reduces the concurrent pressure on the entire control structure and ensures the efficient operation of marketing fund management.

[0121] If the ticket dispensing station detects an idle control node in the queue for a period of time, it will automatically mark the idle control node as unavailable. The control node will no longer receive new transaction control requests. At the same time, the ticket dispensing station will send a cancellation command to it. After receiving the cancellation command from the ticket dispensing station, the control node will immediately return the remaining ticket number in the ticket dispenser to the ticket dispensing station and return the remaining amount in the cash box to the cash vending module. After the recycling operation is completed, the control node will be deleted to save quota resources and avoid resource waste.

[0122] IV. Methods for Dynamically Adjusting Marketing Quotas

[0123] Marketing fund quota control is mainly reflected in the dynamic adjustment of the maximum marketing transaction fund limit and the maximum number of marketing transactions within different periods such as daily, weekly, monthly, quarterly, and annually.

[0124] Within a marketing plan, the control structure has the ability to flexibly adjust the maximum limit within different period ranges. The ledger module records the amount of funds used and the number of transactions for all marketing transactions within a marketing plan on a daily basis as the smallest unit. The ledger module automatically performs data analysis based on the remaining days of the marketing plan, the remaining period, and year-on-year comparison, and provides the cashier module and the number release station with the initial limit suggestion for the day.

[0125] After the daily ledger module completes its reconciliation, it automatically begins analyzing and calculating the data in the ledger module, resulting in the following items:

[0126] *Total Remaining Daily Average: Suggested daily usage based on the total remaining marketing funds in the fund pool and the remaining days of the marketing plan;

[0127] *Remaining Daily Average for Each Cycle: Suggested daily usage based on the remaining credit limit within the cycle and the number of days remaining in the cycle, with different cycles of week, month, quarter, and year.

[0128] *Period Year-on-Year Average Daily: The suggested daily usage value is calculated based on the historical average daily usage for different periods, such as week, month, quarter, and year. For example: if the period is week and the current date is Tuesday, the average marketing amount recorded in the ledger module for every Tuesday will be calculated; if the period is month and the current date is the 12th, the average marketing amount recorded in the ledger module for every 12th of the month will be calculated.

[0129] like Figure 5 As shown in the process, the above calculation results are compared with the set fixed limit to obtain the actual limit value for the day. If the remaining daily average amount is larger than the fixed limit, it means that there is still a relatively sufficient marketing quota by the end of the marketing plan or the end of the current period. In this case, the quota value with the larger remaining daily average amount is used as the limit value for the day, realizing dynamic expansion of the limit. If the remaining daily average amount is insufficient to meet the fixed limit requirement, it means that the quota is tight. To avoid the total plan quota or period quota being used up in advance, resulting in no marketing quota available later, the remaining daily average amount is compared with the same period last year's daily average amount, and the smaller daily average amount value is used as the limit value for the day, realizing dynamic contraction of the limit.

[0130] V. Methods for Dynamic Fault Tolerance in Fund Management

[0131] During the fund management process, each control node may encounter situations where the remaining number of license plates at the ticket dispensing station or the remaining amount of funds in the cash box module is too low, resulting in an inability to supply the ticket dispenser and cash box with batch applications. To avoid resource waste, the control structure uses flexible fault-tolerant methods to ensure that the remaining number of license plates and the amount of funds can be flexibly adjusted so that resources can be fully utilized.

[0132] During transaction processing, control nodes may encounter various resource shortages requiring dynamic fault tolerance. For example, when the control program requests a number from the ticket dispenser, the dispenser may be out of available numbers; when the ticket dispenser initiates a batch request for numbers from the ticket distribution station, the station may not have enough remaining numbers to meet the dispenser's request. Similarly, when the ticket dispenser sends a deduction instruction to the cash register, the cash register may have insufficient remaining funds; and when the cash register automatically requests funds from the cash vending module in batches, the cash vending module may also have insufficient remaining funds to meet the cash register's request. When these situations occur, dynamic fault tolerance methods within the control structure are necessary to handle them.

[0133] like Figure 6As shown in the process, when there are no available numbers in the ticket dispenser, the dispenser automatically requests numbers in batches from the ticket distribution station. If the number of numbers remaining at the ticket distribution station is insufficient to meet the number of numbers requested in batches by the dispenser, all remaining numbers will be released to the dispenser. If the ticket distribution station has no numbers, the current control node is unable to process the marketing control. To avoid transaction waiting, the control program automatically transfers the current transaction to another control node for processing. The ticket distribution station marks the current control node as unavailable. After the current control node returns the remaining amount in the cash box to the cash box module, it automatically deletes the control node.

[0134] like Figure 7 As shown in the process, if a number has already been obtained from the ticket dispenser, and a deduction instruction is sent to the cash box, but the remaining amount in the cash box is insufficient to deduct the marketing funds for this transaction, the cash box will automatically apply for a batch of funds from the cash cabinet module. If the remaining amount in the cash cabinet module is also insufficient to meet the batch application of funds by the cash box, then all remaining funds will be released to the cash box. If the cash cabinet module has no funds left and the cash box still cannot meet the current transaction deduction, then the current control node cannot process the marketing control. To avoid transaction waiting, the control program will automatically transfer the current transaction to another control node for processing.

[0135] If the cash box has no available quota and the cash vending module also has no available quota, the ticket dispensing station will mark the current control node as unavailable. The current control node will return all remaining tickets in the ticket dispenser to the ticket dispensing station, automatically transfer all transaction queues with tickets already obtained in the ticket dispenser to other control nodes for processing, and then automatically delete the control node.

[0136] VI. Dynamic monitoring of traffic at control nodes

[0137] As stated in Part Three, "Methods for Dynamically Adjusting Control Performance," based on the working principle of the marketing control structure, the control node is the core of processing transaction requests. When the transaction concurrency changes (concurrency increases or decreases), the number disbursement station in the control structure dynamically monitors the traffic of the control nodes and, through traffic pressure assessment, dynamically increases or decreases the number of control nodes. This achieves the goal of dynamically adjusting the processing performance of the control structure under concurrent transaction conditions. For existing technologies, how to dynamically monitor and adjust, and what technical means to use for adjustment, are technical challenges that need to be overcome. Conventional techniques in this field are difficult to achieve. Therefore, this invention further explains as follows:

[0138] The difficulty of conventional technical means in this field lies in the difficulty of using technical means to control the traffic of control nodes, because there are no mature tools or algorithms in this field to effectively distribute the concurrent processing pressure of control nodes. There is no way to track or express how the control node is considered to be under great pressure, what bottleneck it reaches, when a new control node should be created to share the pressure, and what effect should be achieved to revoke the control node to release resources.

[0139] In this invention, the number dispensing module uses a "multi-queue joint control structure based on Redis caching technology" to dynamically monitor and adjust the traffic of the management and control nodes. Redis is a mature caching tool in the computer field, and its features are: 1) high performance, 2) atomic operation, and 3) automatic deletion of storage upon expiration (Redis sets the TTL countdown of the storage key in seconds, and the storage key is automatically deleted when the countdown reaches 0).

[0140] The ticket dispensing station creates a control node, which in turn creates a corresponding cache queue (Queue) in Redis and names the queue QUEUE1 (the name is unique among all control nodes, and the numbers increase sequentially). In other words, the key of this queue in Redis is set to QUEUE1, and the TTL of this key is set to 60 seconds. The queue lock is in the open state by default (i.e., no transactions when idle). The ticket dispensing station allocates each number to the ticket dispenser, which increases the length of its corresponding cache queue. The length is the number of numbers that can be dispensed.

[0141] Each time a transaction occurs, the ticket dispenser retrieves a ticket from the head of the queue in QUEUE1, decrements the queue length by 1, and closes the queue lock (which remains closed until the transaction's marketing quota is deducted from the cash register). Simultaneously, the TTL of QUEUE1 is reset to 60 seconds. Therefore, based on Redis's automatic key deletion function when the countdown reaches 0, if no transaction enters QUEUE1 within 60 seconds, the ticket dispensing station automatically deletes QUEUE1 and returns the remaining tickets to the dispensing station.

[0142] When a control node accepts a transaction request and finds that its own queue lock is closed, it means that the control node is currently processing a previous transaction that has not yet been completed. To avoid the risk of funds due to thread concurrency, the queue prohibits the ticket dispenser from taking a number. The ticket dispensing station will then automatically check all unlocked queues in the current ticket dispensing station, randomly select an unlocked queue, and send the transaction to the ticket dispenser of that queue for ticket dispensing. This avoids the risk of thread concurrency and also realizes the ability to dynamically adjust the concurrency pressure among multiple control nodes.

[0143] If all queues in the number dispensing station are locked, it means that all control nodes of the current number dispensing station are processing transaction requests and no numbers are available. To avoid transaction waiting and improve transaction control performance, the number dispensing station automatically creates a new control node and simultaneously creates a corresponding cache queue to process concurrent transaction requests. This achieves dynamic control when concurrency increases, avoids concurrent financial risks, effectively alleviates concurrency pressure, improves transaction performance, and avoids transaction waiting.

[0144] The above describes the core technology implementation of the "multi-queue joint control structure based on Redis caching technology" for dynamic monitoring and adjustment of traffic in the management and control nodes. Through this technology, the management and control device can flexibly and efficiently monitor the dynamic changes in transaction concurrency, and can also flexibly cope with the automatic control under the conditions of concurrency surge and concurrency contraction without manual intervention, achieving dynamic distribution and pressure relief of concurrency pressure, and ensuring the accuracy of marketing funds calculation.

[0145] To facilitate a better understanding of the technical solution of this invention by those skilled in the art, the following further explanation is provided regarding the conventional applications and effects of Redis caching technology in the prior art:

[0146] Redis is a memory-based, high-performance key-value cache database that supports data persistence. Its common uses and effects in the industry mainly include the following:

[0147] 1. Used as a cache storage, it offers fast data access and has the ability to set a data storage countdown timer (TTL in seconds), automatically deleting the data after the countdown reaches 0;

[0148] 2. Distributed locks: Redis provides methods to solve concurrency safety issues in multi-service and multi-threaded environments, ensuring that access to and operation on individual data stored on it are atomic.

[0149] 3. Session storage enables a shared login mechanism;

[0150] 4. Rate limiting and counters: Because Redis operations are atomic, they can be used for API access traffic control, SMS verification code limit, and other scenarios that limit the number of times an application can be accessed.

[0151] 5. Message Queues: Also based on atomicity, Redis provides methods to implement a sequential data processing mechanism for simple queues, asynchronous notifications, broadcast messages, etc.

[0152] 6. Leaderboard: Sort by score, used for the regular sorting function of the leaderboard;

[0153] 7. Deduplication (removal of duplicate operations): Redis provides data collection methods to ensure that data within a collection is not duplicated. Based on the data non-duplication of internal storage, it can ensure that duplicate operations such as repeated check-ins and repeated clicks in lottery draws only take effect once.

[0154] The above are some common use cases in the industry based on Redis's own principles and capabilities. Its internal logic is simple and mature, and it can basically be used out of the box.

[0155] In this invention, the effects of Redis caching technology are demonstrated.

[0156] While the "multi-queue joint control structure based on Redis caching technology" in this invention is also based on the principles and capabilities of Redis itself, its internal structure, logic, and methods are not common or conventional technical means used in the industry for Redis tools.

[0157] First, it should be noted that the effects of the conventional applications listed above are all target effects that can be achieved entirely based on the capabilities of Redis itself. Unlike the conventional uses of Redis listed above, the effect achieved by the "number dispensing station" in the "control device" of this invention is not entirely achieved by Redis's own functions independently. Rather, it is the result of the combined effect of computer applications and Redis tools. The two are indispensable and together form the "number dispensing station module". They are interdependent and cannot achieve the designed effect independently without either one.

[0158] Next, I will introduce the "number dispensing module" in more detail:

[0159] The "number dispensing module" is a technical device that works in conjunction with a computer application and Redis. Redis serves as the storage, while the application operates on the Redis storage and runs the entire logic. The two interact and work together to achieve the final result.

[0160] a) The main functions of the application program in the number dispensing module are:

[0161] Operational status monitoring: Monitor the operational status of all control nodes;

[0162] Create a control node: A new control node can be dynamically created based on monitoring data;

[0163] Routing selection: Select a currently available management node;

[0164] b) The main functions of the Redis component in the number dispensing module are:

[0165] Cache storage: Stores all control nodes. Each control node is a queue structure that stores multiple license plates. It records the current number of remaining license plates, the remaining time of the idle TTL countdown, and the queue lock status (whether the current control node is occupied).

[0166] Delete control node: When the number of tickets in the ticket dispenser of the control node is exhausted, or the idle countdown TTL is 0, the control node will be automatically deleted.

[0167] Send notifications: When the control node changes, proactively send a notification to the application to inform it of the change;

[0168] So why must it consist of two parts? Can it be achieved independently using Redis's own capabilities? What are the challenges in understanding the differences between the effects of this invention and Redis's conventional uses? These will be explained in detail below:

[0169] It cannot be implemented using Redis alone. Relying solely on Redis would greatly increase the pressure on Redis itself. This is because the core of the ticket distribution station is a "multi-queue shared control structure." Each management node is a cache queue, and its storage in Redis is an independent key. The normal function of Redis is to obtain the remaining number of license plates, the remaining time of the idle TTL countdown, and the queue lock status of a management node. However, the technical difficulty of the ticket distribution station module with the "multi-queue shared control structure" lies in the need to perceive the current information of each management node in the current ticket distribution station in real time. The "real-time perception" of multiple queues cannot be achieved by Redis alone (for example, finding an available management node by traversing the data one by one in Redis is too inefficient. If there are too many management nodes, it would take a long time to access all management nodes, and the pressure on Redis would also increase significantly; moreover, the result would be inaccurate because a lot of data changes during the process).

[0170] Therefore, it must be designed and implemented in conjunction with the application. The core point of this invention is the establishment of a real-time communication and awareness mechanism between Redis and the application. When a control node in Redis undergoes a state change (such as a change in the number of remaining license plates, a change in the control node's state lock, or whether the control node has been automatically removed), the application can detect and record it in real time. Its advantage is that the ticket issuing station no longer needs to access every queue in Redis to perceive the current state of each control node, thus affecting the station's real-time routing decisions (the station can directly obtain the queue with the most available license plates from the application), achieving more efficient and accurate traffic control and real-time dynamic switching. This technical solution is not a common industry practice, and the effects it achieves are beyond the typical uses of Redis.

[0171] Compared with the prior art, the present invention has the following advantages:

[0172] 1. Fully automated process with no manual intervention required. After configuring the marketing plan, no manual intervention is needed to adjust relevant quotas and parameters during the entire marketing budget management process. The management structure can be used to realize the allocation of the entire marketing plan's budget and the monitoring of the amount of budget usage, so that the marketing funds are not used up in advance and can be fully utilized without waste. Moreover, it can automatically adjust and recover in the event of various abnormal situations during management. The entire process can be achieved without service interruption or manual adjustment of any system parameters.

[0173] 2. The control structure supports dynamic adjustment, making control performance higher and more flexible. The control structure can dynamically sense the concurrent pressure of marketing transactions and can dynamically adjust the processing nodes according to changes in concurrent pressure, ensuring the performance and efficiency of transaction control and processing. This avoids both transaction backlog and congestion, as well as the waste and low utilization rate of allocated resources.

[0174] 3. Improved control accuracy through automatic compensation and fault tolerance mechanisms, resulting in higher utilization of marketing funds. The control structure has better recovery mechanisms for situations such as business rollbacks and abnormal credit limit control, ensuring accuracy in the credit limit deduction process and the accuracy of credit limit control results. Throughout the entire marketing plan, credit limit control and actual marketing fund usage are highly consistent, avoiding resource waste caused by deviations between credit limit control and actual use, which would result in underutilization of marketing funds.

Claims

1. A method for dynamic management and control of marketing funds, characterized in that, Includes the following steps: Step S1: Construct a marketing fund management structure, which includes a fund pool for storing the total marketing funds, as well as a daily-created cash box module, a number dispensing station, at least one management node, and a ledger module; wherein, the management node includes a number dispenser and a cash box; Step S2: In real-time transaction processing, the control program obtains an available control node, retrieves a number from the number dispenser of the control node, and sends a marketing quota deduction instruction to the money box of the control node. Step S3: At the end of the day, start the clearing process, collect all unused remaining license plates in the ticket dispensers and unused remaining marketing funds in the cash box at all control nodes, and record the net marketing expenditure and net number of license plates used for the day in the ledger module. Step S4: Based on the historical data and remaining marketing plans recorded in the ledger module, dynamically adjust the marketing limits and transaction limits for each period; In steps S1 and S2, the number dispensing station dynamically monitors and adjusts the management and control nodes through a "multi-queue joint control structure based on Redis caching technology," specifically including: The number distribution station creates a corresponding, uniquely named cache queue in Redis for each newly created management node, and sets a TTL countdown for the key of the queue; When the number generator generates a number for a transaction, it resets the TTL countdown of the corresponding queue key and sets the queue lock status of that queue to off; after the quota deduction for that transaction is completed, the queue lock status is reopened. When the number issuing station receives a new transaction request, if the queue lock of the currently selected control node is in a closed state, it will automatically find and select another control node with a queue lock in an open state to process the transaction request. When the number issuing station detects that the queue locks of all existing control nodes are in a closed state, it automatically creates a new control node and its corresponding Redis cache queue to handle new transaction requests. Redis automatically deletes timed-out queue keys based on the TTL countdown, and the number issuing station uses this information to identify idle management nodes and reclaim their remaining resources.

2. The method for dynamic management and control of marketing funds according to claim 1, characterized in that, Step S1 includes: Step S1.1: The server automatically creates a new cash register module and a new number dispensing station every day; Step S1.2: Calculate the average daily marketing quota based on the total amount of the fund pool and the total number of days of the marketing plan, which is the maximum marketing quota for the day, and deposit it into the fund module as the initial quota for the day; Step S1.3: The number distribution station automatically generates an equal number of number plates based on the maximum number of marketing transactions allowed per day set in the marketing plan; Step S1.4: The ticket dispensing station automatically monitors the currently available control nodes. If there are no currently available control nodes, the ticket dispensing station will automatically create a new control node. A control node consists of two parts: a ticket dispenser and a money box.

3. The method for dynamic management and control of marketing funds according to claim 1, characterized in that, Step S2 includes: Step S2.1: The marketing control program automatically obtains an available control node; Step S2.2: Take a number from the number dispenser at the control node. If there are no numbers in the number dispenser or all numbers have been taken, the number dispenser will automatically request a number of numbers from the number distribution station in batches. Step S2.3: If the number of license plates currently available at the ticket dispensing station is sufficient to meet the current application of the ticket dispenser, then the corresponding number of license plates will be taken from the license plates it manages and dispensed to the ticket dispenser. At the same time, the number of license plates available at the ticket dispensing station itself will be reduced accordingly. Step S2.4: After the control program takes a number from the number dispenser of the control node, it can send a real-time deduction instruction to the cash box to reduce the marketing quota managed by the cash box. Step S2.5: If the cash box has no quota or the quota is insufficient to support the marketing transaction, the cash box will automatically apply for a quota from the cash box module. If the existing marketing quota of the cash box module is sufficient to meet the cash box's application, the corresponding quota will be taken out from the marketing quota managed by the module to release the quota to the cash box. Step S2.6: After receiving the instruction, Qianxia immediately deducts an amount equal to the marketing funds in the transaction from its existing quota. Step 2.5: If the current control node is unable to process the current transaction due to insufficient resources during the license plate application or quota application process, the control procedure will transfer the current transaction to another control node for processing.

4. The method for dynamic management and control of marketing funds according to claim 1, characterized in that, Step S3 includes: Step S3.1: At the end of the day, the scheduled task on the server triggers the clearing schedule module, which broadcasts a resource reclamation instruction to all active management nodes. Step S3.2: Collect all unused remaining number plates from the number dispensers in all control nodes to the number dispensing station, and collect all unused remaining marketing funds from the cash boxes in all control nodes to the cash box module; Step S3.3: By comparing the remaining amount at the end of the day with the initial value at the beginning of the day, the difference is obtained as the net usage for the day. The net usage for the day includes the net marketing expenditure amount for the day and the net number of license plates used for the day. Step S3.4: Record the net marketing expenditure amount and the net number of license plates used on the same day into the ledger module; Step S3.5: If there are marketing funds returned the following day, summarize the number of license plates and the amount of funds returned according to the original transaction date, and deduct them from the data record corresponding to the original transaction date in the ledger module.

5. The method for dynamic management and control of marketing funds according to claim 1, characterized in that, Step S4 includes: Step S4.1: After the daily reconciliation is completed, the ledger module reads historical marketing data, the remaining days of the marketing plan, the remaining status of each preset period, and historical year-on-year data from the non-volatile storage medium; Step S4.2: The ledger module calls a preset data analysis subroutine to generate the total remaining daily average suggested value, the periodic remaining daily average suggested value for at least one preset period, and the periodic year-on-year daily average suggested value for the corresponding preset period. Step S4.3: The ledger module compares the total remaining daily average suggested value, the remaining daily average suggested value for each period, and the preset fixed limit. Step S4.4: If the total remaining daily average suggested value or the remaining daily average suggested value of any period is greater than the fixed limit, the ledger module selects the maximum value between the total remaining daily average suggested value and the remaining daily average suggested value of each period as the actual limit value for that day. Step S4.5: If the total remaining daily average suggested value and the remaining daily average suggested value of all periods are not greater than the fixed limit, then the ledger module selects the minimum value between the remaining daily average suggested value of the period and the same period's daily average suggested value for each preset period, and selects the minimum value from the minimum values ​​of all preset periods as the actual limit value for that day. Step S4.6: The ledger module writes the actual limit value of the day into the daily marketing fund limit parameter register of the cash box module, and simultaneously updates the daily marketing transaction limit parameter register of the number release station module. Step S4.7: Based on the updated parameter register, the cash register module and the number dispensing station module dynamically allocate marketing funds and number resources in subsequent transaction processing to optimize the node resource scheduling efficiency in high-concurrency scenarios.

6. The method for dynamic management and control of marketing funds according to claim 5, characterized in that, The ledger module reads the remaining total marketing funds data field maintained by the funds pool module and the remaining days data field maintained by the marketing plan module from the non-volatile storage medium, and calls the preset total remaining daily average generation subroutine; the total remaining daily average generation subroutine performs data conversion operations by the central processing unit to generate a suggested total remaining daily average value, and writes the suggested total remaining daily average value into the memory cache area of ​​the ledger module; The ledger module reads the remaining quota data field and the remaining days data field of each preset period from the non-volatile storage medium, and calls the preset daily average remaining period generation subroutine; the daily average remaining period generation subroutine performs data conversion operation on each preset period by the central processing unit, generates the suggested daily average remaining period value for each preset period, and writes the suggested daily average remaining period value for each period into the memory cache area. The ledger module reads historical marketing transaction record data from the non-volatile storage medium and calls a preset periodic year-on-year daily average generation subroutine. The periodic year-on-year daily average generation subroutine aggregates and statistically analyzes data at the same calendar position in the historical transaction records according to a preset period by the central processing unit, generates suggested values ​​for the periodic year-on-year daily average for each preset period, and writes the suggested values ​​for the periodic year-on-year daily average to the memory cache. The suggested values ​​in the memory cache serve as input parameters for the numerical comparison in step 4.3, enabling the cashier module and the number dispensing module to directly call the pre-generated suggested values ​​in subsequent transaction processing. This avoids dynamic calculations during peak real-time transaction periods, reduces the instantaneous load on the central processing unit, and improves the response efficiency of marketing resource allocation in high-concurrency scenarios.

7. The method for dynamic management and control of marketing funds according to claim 1, characterized in that, Step S2 also includes dynamic fault-tolerant processing performed by the control program: When the ticket dispenser requests a license plate from the ticket dispensing station, if the number of license plates remaining at the ticket dispensing station is insufficient to meet the request, the ticket dispensing station module will write the remaining full number of license plates it maintains into the license plate cache area of ​​the ticket dispenser. If the license plate data field of the number dispensing module is empty, the control program will transfer the current transaction request and the pointer of the pending transaction queue of license plates already obtained in the number dispenser to the scheduling module, which will then allocate them to other available control nodes. When Qianxia requests a credit limit from Qiangui, if the remaining funds in the Qiangui module are insufficient to meet the requested amount, the Qiangui module will write the remaining full credit limit data it maintains into the credit limit cache area of ​​Qianxia. If the credit limit data field of the cash box module is empty and the cash box still cannot meet the current transaction deduction requirements, the control program will transfer the current transaction request to the scheduling module. After the transaction is completed, the ticket dispensing module sets the status flag of the control node to "unavailable" and triggers the control node to perform resource reclamation operations: write the remaining license plate data in the license plate cache area of ​​the ticket dispenser back to the license plate data pool of the ticket dispensing module, and write the remaining amount data in the amount cache area of ​​the money box back to the amount data pool of the money box module. The number dispensing module sends a node deletion command to the server-side node management unit, which then releases the memory and thread resources occupied by the controlled node to reduce system resource fragmentation and improve the scheduling efficiency of available controlled nodes in high-concurrency scenarios.

8. The method for dynamic management and control of marketing funds according to claim 1, characterized in that, The method also includes a step of dynamically adjusting the number of control nodes, performed by the number dispensing module: The ticket dispensing module collects queue length data of the ticket dispensers in each control node in real time through polling or event-driven mechanisms. When it is determined that the queue length of all number dispensers is greater than zero, the number dispensing module instantiates a new control node process, triggering the new control node process to apply for number plates in batches from the number dispensing module and to apply for marketing funds in batches from the cashier module; after the application is successful, the number dispensing module routes subsequent transaction requests to the new control node process; When it is determined that the queue length of the ticket dispenser is continuously zero for more than a preset time threshold, the ticket dispensing module sends a node deactivation instruction to the corresponding management node process. In response to the node deactivation command, the control node process returns the remaining license plate data packets in the ticket dispenser to the ticket dispensing module and the remaining marketing fund amount data packets in the cash box to the cash vault module. After resource recovery is confirmed, the ticket dispensing module destroys the control node process. The dynamic adjustment process enables the system to automatically expand processing resources in high-concurrency transaction scenarios and automatically reclaim idle resources during low-load periods, thereby reducing the idle load and memory usage of the central processing unit and improving the real-time response throughput of marketing fund management operations.

9. A storage medium, characterized in that, The device stores a computer program, which, when executed by a processor, implements the method for dynamic management of marketing funds as described in any one of claims 1 to 8.

10. A device for dynamic management and control of marketing funds, characterized in that, The processor executes the method for dynamic management of marketing funds as described in any one of claims 1 to 8.