A multi-marketing scenario-oriented general marketing plan method and system

By using a unified marketing plan data model and efficient caching and lock control mechanisms, the problem of poor universality and performance issues in high-concurrency scenarios of existing marketing automation solutions has been solved. This enables accurate user matching and full-process control across multiple scenarios and terminals, improving the efficiency and reliability of marketing campaigns.

CN122434579APending Publication Date: 2026-07-21SHANGHAI QUZHI NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHANGHAI QUZHI NETWORK TECH CO LTD
Filing Date
2026-05-06
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

Existing marketing automation solutions suffer from poor versatility, insufficient performance and anti-recurrence capabilities in high-concurrency scenarios, low user matching accuracy, and a lack of closed-loop control over the entire process.

Method used

It adopts a unified marketing plan data model, generates comprehensive configuration information through custom parameter and rule settings, and combines Redis hash caching, findAndModify atomic operations and scheduled tasks to realize user matching, reward distribution and process control, and supports standardized execution across multiple scenarios and terminals.

Benefits of technology

It improved the versatility and scalability of marketing campaigns, optimized system performance, ensured the accuracy of user matching and closed-loop management of processes, and reduced operation and maintenance costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122434579A_ABST
    Figure CN122434579A_ABST
Patent Text Reader

Abstract

The application discloses a kind of general marketing plan method and system for multi-marketing scene, and the method is configured by self-defined setting marketing plan information and rule, obtains comprehensive configuration information and enters marketing plan data model, generates executable configuration data.Order progress update event is listened to, and according to the configuration, reward trigger, effective range, excluded scene verification is completed;Check through the matching result of user and plan in Redis hash cache when verification passes, miss then generate new matching result by order statistics, label matching and write in cache;Verification does not terminate process.The voucher is sent after the user matching passes, and the planId identification is written and generated unshown coupon record;Receive user terminal initialization interface request, and after querying unshown coupon information grouping returns, update state;According to the configuration, start timing task, scan expired unused coupon, send reminder message and record result.The application solves the problems of poor universality, low user matching accuracy and other problems in the prior art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of computer technology and marketing automation technology, specifically to a general marketing planning method and system for multiple marketing scenarios. Background Technology

[0002] With the deep integration of the digital economy and new retail formats, offline consumption scenarios centered on intelligent self-service vending machines and omnichannel retail terminals continue to expand. Enterprises are increasingly demanding automated and precise marketing throughout the entire user lifecycle. Existing technologies, various marketing automation systems and coupon management platforms are widely used. These solutions have achieved core functions such as basic marketing plan configuration, order event-triggered reward distribution, and user tagging. Some solutions have also introduced distributed caching and concurrency control technologies to optimize system performance. They are widely adaptable to various industry scenarios, including retail, FMCG, self-service terminal operations, and membership system management, becoming core digital tools for enterprises to improve user repurchase rates and reduce manual operating costs. Simultaneously, existing technologies are gradually moving towards configurability, allowing operators to set marketing rules through a visual interface, enabling the launch of marketing campaigns for single scenarios without repetitive development, thus improving the efficiency of marketing campaign implementation to some extent.

[0003] However, existing marketing automation solutions still have many shortcomings. First, most existing solutions are customized for specific scenarios, lacking versatility and scalability. Marketing plans for different marketing scenarios and different terminal devices need to be developed and adapted independently, lacking a unified, multi-dimensional configuration model and standardized execution process. This results in long implementation cycles and high maintenance costs for cross-scenario marketing activities. Second, in the order-triggered marketing execution process, the user matching and judgment stage of existing solutions lacks a reasonable caching optimization mechanism. In high-concurrency scenarios, frequent queries to the database to collect historical order data can easily cause database performance bottlenecks. At the same time, the cache invalidation logic is not bound to the marketing plan lifecycle, which can easily lead to problems such as untimely cache data invalidation and inaccurate matching results. Furthermore, most solutions rely on single-channel user identifiers for order data statistics, which cannot... The aggregation of all order data from the same user across channels results in insufficient accuracy in user tag matching and target user selection. Third, existing solutions lack sufficient control over preventing duplicate coupon issuance in high-concurrency scenarios, lacking fine-grained atomic lock control and dual anti-duplicate verification mechanisms. This easily leads to issues such as the same user repeatedly claiming coupons for the same marketing plan and the same order repeatedly triggering marketing actions, causing unnecessary waste of enterprise marketing costs. Fourth, most existing solutions only focus on the core reward distribution process, failing to form a complete closed loop of "configuration-triggering-verification-issuance-display-reminder." Coupon arrival and display lack unified standardized grouping rules, expiration reminders are not deeply bound to marketing plan configurations, and there is a lack of a unified unique identifier for marketing plans to achieve full-link traceability of reward coupons. Both operational control capabilities and user reach experience have significant shortcomings.

[0004] Therefore, there is an urgent need for a universal marketing plan approach applicable to multiple marketing scenarios to address the problems of poor universality and low accuracy of user matching in existing technologies. Summary of the Invention

[0005] To address these issues, this invention provides a universal marketing plan method and system for multiple marketing scenarios, solving problems such as poor universality of existing marketing automation solutions, insufficient performance and anti-recurrence capabilities in high-concurrency scenarios, low user matching accuracy, and lack of closed-loop control throughout the entire process, thereby achieving standardized and automated execution of marketing plans applicable to multiple scenarios.

[0006] To achieve the above objectives, the present invention provides the following technical solution: a general marketing plan method for multiple marketing scenarios, characterized in that it includes:

[0007] By customizing parameters and rules for the marketing plan information and rules, comprehensive configuration information is obtained; the comprehensive configuration information is then entered into the marketing plan data model to generate executable marketing plan configuration data.

[0008] When an order progress update event is detected, based on the order progress update event and the marketing plan configuration data, the reward trigger conditions, effective region / machine range and exclusion scenario rules in the current order and the marketing plan configuration data to be executed are matched and verified in sequence to obtain the verification result;

[0009] When the verification passes, query the Redis hash cache for the matching result between the current user and the marketing plan to be executed; if the cache hits, obtain the target user matching result; if the cache misses, perform user historical order data statistics and user tag matching calculations to generate a new target user matching result and write it to the Redis hash cache; set the cache expiration time to the end time of the marketing plan to be executed; when the verification fails, terminate the marketing plan to be executed.

[0010] When a target user match is successful, an optimistic lock is added to the current user-pending marketing plan dimension for concurrency control via the findAndModify atomic operation; the system checks for duplicate coupon issuance records and duplicate order processing records under the current user-pending marketing plan dimension; if the check passes, reward coupons are issued to the user according to the reward package mapping rules in the pending marketing plan configuration data; the planId coupon source identifier is written to the coupon record, a coupon display record is generated, and the initial display status is marked as not displayed; when a target user match is unsuccessful, the pending marketing plan is terminated.

[0011] Based on the user's initialization interface request, the system retrieves the user coupon display records, associated coupon records, and coupon template information that are not currently displayed under the user's name by querying. The system then groups and assembles these information according to the joint grouping rules of coupon template ID and display type, generates coupon arrival notification data, and returns it to the user's client. After the coupon arrival notification data is successfully returned to the user's client, the display status of the user coupon display records is updated to "displayed".

[0012] The scheduled task is started according to the execution cycle set in the SMS outreach configuration data of the marketing plan to be executed; the scheduled task scans for unused valid reward coupons within the set expiration time window; after filtering the coupon records that have completed the expiration reminder from the valid reward coupons, the contact information of the users corresponding to the filtered valid reward coupons is retrieved and the SMS service is called to send the coupon expiration reminder SMS; the success or failure status of the SMS service is written into the reminder execution result record.

[0013] As a preferred solution for a general marketing plan approach applicable to multiple marketing scenarios, the marketing plan data model includes: a MarketingPlan main model, a MarketingPlanRecord execution record model, a MarketingCouponDisplay coupon display model, a CouponRemindRecord reminder record model, and an SmsNotifyConfigField SMS configuration sub-model. The MarketingPlan main model stores basic plan information, reward triggering conditions, and target user matching rules. The MarketingPlanRecord model stores the marketing plan's execution progress, order association records, coupon issuance records, and lock status information. The MarketingCouponDisplay model stores planId, displayType, display status identifier, and associated coupon record ID. The CouponRemindRecord model stores couponRecordId, user unique identifier, reminder time, and SMS sending success identifier.

[0014] As a preferred solution for a general marketing plan approach for multiple marketing scenarios, the marketing plan information and rules include the following during the process of setting custom parameters and rules: basic plan information, reward triggering conditions, target user matching rules, user tags / groups, reward package mapping rules, exclusion scenario rules, coupon display configuration, and SMS outreach configuration.

[0015] The basic information of the plan includes: plan name, plan validity period, review status, activity type, display type, planId, effective cities and effective machine range;

[0016] The user tags adopt a fixed naming convention:

[0017]

[0018] In the formula, Tag is the final generated user tag name; This represents the order tiers; "order" is a fixed string. This represents the number of days for order statistics; d is a fixed suffix.

[0019] Both the exclusion scenario rules and the displayType of the coupon display configuration support extensible configuration; when adding a new exclusion scenario or displayType, the corresponding enumeration value is added to the marketing plan data model without modifying the underlying execution logic.

[0020] As a preferred solution for a general marketing plan approach applicable to multiple marketing scenarios, during the process of statistical analysis of user historical order data and user tag matching calculation, the full user order data is obtained by association through multiple unionids; refunded orders and unpaid orders in the full user order data are filtered out and orders that have triggered the order progress update event are excluded; the order query fields are pruned and the upper limit of the number of query records is set to N;

[0021] The formula for calculating user tag matching is:

[0022]

[0023] In the formula, M represents the user tag matching result, M=1 indicates a successful match, and M=0 indicates a failed match; k represents the number of order dimensions counted. is the number of valid orders in the i-th dimension; T is the order quantity threshold set in the configuration data of the marketing plan to be executed; D is the number of days for counting valid orders; Configure the statistical days threshold set in the data for the marketing plan to be executed.

[0024] As a preferred solution for a general marketing plan approach across multiple marketing scenarios, this method adds an optimistic lock to the current user-marketing plan dimension for concurrency control via the findAndModify atomic operation. It then atomically queries and updates the lock state of this dimension. The expression for determining the lock state is:

[0025]

[0026] In the formula, L represents the result of the optimistic lock acquisition, where L=1 indicates successful lock acquisition and L=0 indicates failed lock acquisition; The initial lock state in dimension 1. =1 indicates that a lock already exists. =0 indicates no lock; This operation atomically updates the lock state from unlocked to locked, and this operation is an inseparable atomic operation from the lock state query.

[0027] As a preferred solution for a general marketing plan approach applicable to multiple marketing scenarios, the scanning of unused valid reward coupons within a set expiration time window via the scheduled task is performed in batches; the formula for calculating the number of scanning batches is:

[0028]

[0029] In the formula, P represents the scanning batch; S represents the total number of coupons to be scanned; and M represents the number of coupons scanned in a single batch.

[0030] This invention also provides a universal marketing plan system for multiple marketing scenarios, employing the above-mentioned universal marketing plan method for multiple marketing scenarios, including:

[0031] The marketing plan configuration data generation module is used to obtain comprehensive configuration information by customizing parameters and rules for setting marketing plan information and rules; and to input the comprehensive configuration information into the marketing plan data model to generate executable marketing plan configuration data.

[0032] The order and marketing plan configuration data matching verification module is used to, when an order progress update event is detected, perform matching verification on the reward trigger conditions, effective region / machine range and exclusion scenario rules in the current order and the marketing plan configuration data to be executed, based on the order progress update event and the marketing plan configuration data, and obtain the verification result.

[0033] The target user matching result acquisition module is used to query the Redis hash cache for the matching judgment result between the current user and the marketing plan to be executed when the verification passes; if the cache is hit, the target user matching result is obtained; if the cache is not hit, the user's historical order data is statistically analyzed and user tag matching calculations are performed to generate a new target user matching result and write it to the Redis hash cache; the cache expiration time is set to the plan end time of the marketing plan to be executed; when the verification fails, the marketing plan to be executed is terminated.

[0034] The reward coupon distribution module is used to add optimistic locking to the current user-pending marketing plan dimension for concurrency control through the findAndModify atomic operation when the target user is successfully matched; it verifies whether there are duplicate coupon distribution records and duplicate order processing records under the current user-pending marketing plan dimension; after the verification is successful, it distributes reward coupons to the user according to the reward package mapping rules in the pending marketing plan configuration data; it writes the planId coupon source identifier into the coupon record, generates a coupon display record, and marks the initial display status as not displayed; when the target user is not successfully matched, the pending marketing plan is terminated.

[0035] The initialization interface request processing module is used to obtain, based on the user's initialization interface request, user coupon display records not yet displayed under the username, associated coupon records and coupon template information by querying, and group and assemble them according to the joint grouping rules of coupon template ID and display type, generate coupon arrival notification data and return it to the user; after the coupon arrival notification data is successfully returned to the user, the display status of the user coupon display record is updated to displayed.

[0036] The scheduled task processing module is used to start a scheduled task according to the execution cycle set in the SMS outreach configuration data of the marketing plan to be executed; scan for unused valid reward coupons within the set expiration time window through the scheduled task; filter the coupon records that have completed the expiration reminder from the valid reward coupons, retrieve the contact information of the users corresponding to the filtered valid reward coupons, and call the SMS service to send the coupon expiration reminder SMS; and write the successful or failed sending status of the SMS service into the reminder execution result record.

[0037] As a preferred solution for a general marketing plan system oriented towards multiple marketing scenarios, the marketing plan configuration data generation module includes the following marketing plan data model: a MarketingPlan main model, a MarketingPlanRecord execution record model, a MarketingCouponDisplay coupon display model, a CouponRemindRecord reminder record model, and an SmsNotifyConfigField SMS configuration sub-model. The MarketingPlan main model stores basic plan information, reward triggering conditions, and target user matching rules. The MarketingPlanRecord model stores the marketing plan's execution progress, order association records, coupon issuance records, and lock status information. The MarketingCouponDisplay model stores planId, displayType, display status identifier, and associated coupon record ID. The CouponRemindRecord model stores couponRecordId, user unique identifier, reminder time, and SMS sending success identifier.

[0038] As a preferred solution for a general marketing plan system for multiple marketing scenarios, the marketing plan configuration data generation module includes the following settings during the process of customizing parameters and rules for setting marketing plan information and rules: basic plan information, reward triggering conditions, target user matching rules, user tags / groups, reward package mapping rules, exclusion scenario rules, coupon display configuration, and SMS outreach configuration.

[0039] The basic information of the plan includes: plan name, plan validity period, review status, activity type, display type, planId, effective cities and effective machine range;

[0040] The user tags adopt a fixed naming convention:

[0041]

[0042] In the formula, Tag is the final generated user tag name; This represents the order tiers; "order" is a fixed string. This represents the number of days for order statistics; d is a fixed suffix.

[0043] Both the exclusion scenario rules and the displayType of the coupon display configuration support extensible configuration; when adding a new exclusion scenario or displayType, the corresponding enumeration value is added to the marketing plan data model without modifying the underlying execution logic.

[0044] As a preferred solution for a general marketing plan system oriented towards multiple marketing scenarios, the target user matching result acquisition module obtains the user's full order data by associating multiple unionids during the process of statistical analysis of user historical order data and user tag matching calculation; it filters out refunded orders and unpaid orders in the user's full order data and excludes orders that have triggered the order progress update event; it also prunes the order query fields and sets the upper limit of the number of queries to N.

[0045] The formula for calculating user tag matching is:

[0046]

[0047] In the formula, M represents the user tag matching result, M=1 indicates a successful match, and M=0 indicates a failed match; k represents the number of order dimensions counted. is the number of valid orders in the i-th dimension; T is the order quantity threshold set in the configuration data of the marketing plan to be executed; D is the number of days for counting valid orders; Configure the statistical days threshold set in the data for the marketing plan to be executed.

[0048] As a preferred solution for a general marketing plan system applicable to multiple marketing scenarios, the reward coupon distribution module performs atomic queries and updates on the lock status of the current user-to-be-executed marketing plan dimension during the process of adding optimistic locks for concurrency control through the findAndModify atomic operation. The expression for determining the lock status is as follows:

[0049]

[0050] In the formula, L represents the result of the optimistic lock acquisition, where L=1 indicates successful lock acquisition and L=0 indicates failed lock acquisition; The initial lock state in dimension 1. =1 indicates that a lock already exists. =0 indicates no lock; This operation atomically updates the lock state from unlocked to locked, and this operation is an inseparable atomic operation from the lock state query.

[0051] As a preferred solution for a general marketing plan system applicable to multiple marketing scenarios, the scheduled task processing module employs a batch scanning method when scanning unused valid reward coupons within a set expiration time window. The formula for calculating the number of scanning batches is as follows:

[0052]

[0053] In the formula, P represents the scanning batch; S represents the total number of coupons to be scanned; and M represents the number of coupons scanned in a single batch.

[0054] The present invention has the following advantages:

[0055] First, it enhances the versatility and scalability of the solution. A unified marketing plan data model carries comprehensive configuration information, supporting the implementation of marketing plans across multiple marketing scenarios and terminal devices through custom parameter and rule settings. This eliminates the need for customized development for single scenarios, shortening the implementation cycle of marketing activities and reducing system maintenance costs.

[0056] Second, optimize system performance. By storing the matching results between users and marketing plans using Redis hash caching, the frequency of database query requests in high-concurrency scenarios is reduced. Simultaneously, the cache expiration time is bound to the end time of the marketing plan to avoid the problem of untimely cache data expiration, ensuring system stability.

[0057] Third, strengthen process control capabilities in high-concurrency scenarios. Fine-grained optimistic locking concurrency control is achieved through the findAndModify atomic operation, coupled with a dual verification mechanism for duplicate coupon issuance and order processing, to prevent the same user from repeatedly claiming coupons for the same marketing plan or the same order from repeatedly triggering marketing actions, thus achieving reasonable control over marketing costs.

[0058] Fourth, ensure the reliability of user matching results. Statistical calculations are performed by aggregating omnichannel order data for the same user through multiple unionid associations. This, combined with standardized user tag naming conventions, adapts to user matching rules across different marketing campaigns, improving the adaptability and reasonableness of the user matching process.

[0059] Fifth, achieve closed-loop management of the entire marketing plan process. This covers all execution stages, including marketing plan configuration, event triggering, rule verification, user matching, reward distribution, receipt display, and expiration reminders. A unified unique identifier for the marketing plan enables full-link traceability of reward coupons, improving operational control capabilities and user reach experience. Attached Figure Description

[0060] To more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings in the following description are merely exemplary, and those skilled in the art can derive other embodiments based on the provided drawings without creative effort.

[0061] The structures, proportions, sizes, etc. illustrated in this specification are only for the purpose of assisting those skilled in the art in understanding and reading the content disclosed herein, and are not intended to limit the conditions under which the present invention can be implemented. Therefore, they have no substantial technical significance. Any modifications to the structure, changes in the proportions, or adjustments to the size, without affecting the effects and objectives that the present invention can produce, should still fall within the scope of the technical content disclosed in the present invention.

[0062] Figure 1 This is a flowchart illustrating a general marketing plan method for multiple marketing scenarios provided in Embodiment 1 of the present invention;

[0063] Figure 2 This is a schematic diagram illustrating the specific implementation process of a general marketing plan method for multiple marketing scenarios provided in Embodiment 1 of the present invention;

[0064] Figure 3 This is a schematic diagram of the order triggering and coupon issuance process in a general marketing plan method for multiple marketing scenarios provided in Embodiment 1 of the present invention;

[0065] Figure 4 This is a schematic diagram of the coupon display and pop-up process in a general marketing plan method for multiple marketing scenarios provided in Embodiment 1 of the present invention;

[0066] Figure 5 This is a schematic diagram of the coupon expiration SMS reminder process in a general marketing plan method for multiple marketing scenarios provided in Embodiment 1 of the present invention;

[0067] Figure 6 This is a schematic diagram of the architecture of a general marketing plan system for multiple marketing scenarios provided in Embodiment 2 of the present invention. Detailed Implementation

[0068] The following specific embodiments illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0069] Example 1

[0070] See Figure 1 and Figure 2 Embodiment 1 of the present invention provides a general marketing plan method for multiple marketing scenarios, including the following steps:

[0071] S1. By customizing parameters and rules for the marketing plan information and rules, comprehensive configuration information is obtained; the comprehensive configuration information is entered into the marketing plan data model to generate executable marketing plan configuration data;

[0072] S2. When an order progress update event is detected, based on the order progress update event and the marketing plan configuration data, the reward trigger conditions, effective region / machine range and exclusion scenario rules in the current order and the marketing plan configuration data to be executed are matched and verified in sequence to obtain the verification result;

[0073] S3. When the verification passes, query the Redis hash cache for the matching result between the current user and the marketing plan to be executed; if the cache hits, obtain the target user matching result; if the cache misses, perform user historical order data statistics and user tag matching calculation, generate a new target user matching result and write it to the Redis hash cache; set the cache expiration time to the plan end time of the marketing plan to be executed; when the verification fails, terminate the marketing plan to be executed.

[0074] S4. When the target user is matched, optimistic locking is added to the current user-pending marketing plan dimension for concurrency control through the findAndModify atomic operation; the system checks whether there are duplicate coupon issuance records and duplicate order processing records under the current user-pending marketing plan dimension; after the verification is passed, reward coupons are issued to the user according to the reward package mapping rules in the pending marketing plan configuration data; the planId coupon source identifier is written into the coupon record, a coupon display record is generated, and the initial display status is marked as not displayed; when the target user is not matched, the pending marketing plan is terminated.

[0075] S5. Based on the user's initialization interface request, retrieve the user coupon display records, associated coupon records, and coupon template information that are not displayed under the user's name by querying, and group and assemble them according to the joint grouping rules of coupon template ID and display type to generate coupon arrival notification data and return it to the user's client; after the coupon arrival notification data is successfully returned to the user's client, update the display status of the user coupon display record to displayed.

[0076] S6. Start a scheduled task according to the execution cycle set in the SMS outreach configuration data of the marketing plan to be executed; scan for unused valid reward coupons within the set expiration time window through the scheduled task; filter the coupon records that have completed the expiration reminder among the valid reward coupons, retrieve the contact information of the users corresponding to the filtered valid reward coupons, and call the SMS service to send the coupon expiration reminder SMS; write the successful or failed sending status of the SMS service into the reminder execution result record.

[0077] In this embodiment, in step S1, comprehensive configuration information is obtained by customizing parameters and rules for setting marketing plan information and rules; the comprehensive configuration information is then entered into the marketing plan data model to generate executable marketing plan configuration data.

[0078] Specifically, operators can customize parameters and rules for setting marketing plan information and rules through a visual configuration backend. They can complete full-dimensional rule configuration without writing code, adapting to the personalized needs of various marketing scenarios such as new retail, vending machines, and member repeat purchases.

[0079] In the process of setting custom parameters and rules for the marketing plan information and rules, the setting marketing plan information and rules include: basic plan information, reward triggering conditions, target user matching rules, user tags / groups, reward package mapping rules, exclusion scenario rules, coupon display configuration and SMS outreach configuration;

[0080] The basic information of the plan includes: plan name, plan validity period, review status, activity type, display type, planId, effective cities and effective machine range;

[0081] The user tags adopt a fixed naming convention:

[0082]

[0083] In the formula, Tag is the final generated user tag name; This represents the order tiers; "order" is a fixed string. This represents the number of days for order statistics; d is a fixed suffix.

[0084] Both the exclusion scenario rules and the displayType of the coupon display configuration support extensible configuration; when adding a new exclusion scenario or displayType, the corresponding enumeration value is added to the marketing plan data model without modifying the underlying execution logic.

[0085] In this embodiment, the system structurally integrates the parameters and rules customized by operators to form standardized comprehensive configuration information. This information is then entered into a unified marketing plan data model, ultimately generating marketing plan configuration data that can be automatically recognized and executed throughout the entire process. This configuration data serves as the sole rule basis for all subsequent execution steps, enabling a single system to adapt to multiple marketing scenarios and multiple terminal devices. This solves the problems of customized development for different scenarios, long campaign implementation cycles, and high maintenance costs in existing technologies.

[0086] The marketing plan data model includes: a MarketingPlan main model, a MarketingPlanRecord execution record model, a MarketingCouponDisplay coupon display model, a CouponRemindRecord reminder record model, and an SmsNotifyConfigField SMS configuration sub-model. The MarketingPlan main model stores basic plan information, reward triggering conditions, and target user matching rules. The MarketingPlanRecord model stores the marketing plan's execution progress, order association records, coupon issuance records, and lock status information. The MarketingCouponDisplay model stores planId, displayType, display status identifier, and associated coupon record ID. The CouponRemindRecord model stores couponRecordId, user unique identifier, reminder time, and SMS sending success identifier.

[0087] In this embodiment, in step S2, when an order progress update event is detected, based on the order progress update event and the marketing plan configuration data, the reward triggering conditions, effective region / machine range and exclusion scenario rules in the current order and the marketing plan configuration data to be executed are matched sequentially to obtain the verification result.

[0088] Specifically, such as Figure 3 As shown, the asynchronous listening mechanism of the MQ message queue captures order progress update events in real time. After the event is triggered, the basic order data is parsed to extract core information such as the user to which the order belongs, the order status, the order region, the associated device ID, and the order type. It then matches the marketing plans that are currently active and waiting to be executed within the system. The marketing plan configuration data generated in step S1 is used as the sole verification basis, and the matching verification is strictly performed in a fixed order of "reward triggering conditions → effective region / machine range → exclusion scenario rules". This order design can intercept orders that do not meet the basic requirements in advance, reduce subsequent invalid calculations and database query operations, and improve system execution efficiency.

[0089] Among them, the reward trigger condition verification is used to determine whether the order status meets the trigger requirements set by the marketing plan, such as order payment completion, order pickup completion, etc.

[0090] The effective region / machine range verification is used to determine whether the region to which the order belongs and the associated device are within the whitelist range set in the marketing plan;

[0091] Exclusion scenario rule validation is used to filter out order types that are not eligible for the activity as defined in the marketing plan, such as test orders, refund orders, and enterprise purchase orders;

[0092] After three rounds of verification, a clear pass / fail result is generated, which serves as the core basis for judging subsequent processes. Orders that fail verification will directly terminate the execution process of the current marketing plan to avoid invalid operations consuming system resources.

[0093] In this embodiment, in step S3, when the verification passes, the matching result between the current user and the marketing plan to be executed is queried in the Redis hash cache; if the cache hits, the target user matching result is obtained; if the cache misses, the user's historical order data is statistically analyzed and user tag matching is calculated to generate a new target user matching result and write it to the Redis hash cache; the cache expiration time is set to the plan end time of the marketing plan to be executed; when the verification fails, the marketing plan to be executed is terminated.

[0094] Specifically, such as Figure 3 As shown, after the verification in step S2 passes, the Redis hash cache is queried first, starting with "the current user's unique identifier + " The matching results, using "planId" as the key, employ a hash caching structure to achieve fine-grained data management at the user-plan dimension. It supports flexible expansion with multiple fields per key and boasts extremely high read / write performance. When the cache hits, it directly reads existing target user matching results, eliminating the need to repeatedly execute user order statistics and tag matching calculations, significantly reducing query pressure on the business database in high-concurrency scenarios. When the cache misses, the system aggregates historical order data from all channels for the same user through multiple unionid associations. Multiple unionids represent globally unique user identifiers for the same real user across different login channels such as mini-programs, apps, and H5. Association with multiple unionids allows for complete retrieval of order data from all platforms, avoiding omissions in order statistics due to users changing login channels. During the statistics process, refunded orders, unpaid orders, and orders currently triggering order progress update events are filtered. Query fields are also pruned, and a query limit is set to reduce database query overhead. After completing valid order statistics, the system combines the standardized user tag rules configured in the marketing plan to complete the matching calculation, ultimately generating the target user matching results.

[0095] User tags follow a fixed naming convention:

[0096]

[0097] In the formula, Tag is the final generated user tag name; This represents the order tiers; "order" is a fixed string. This represents the number of days for order statistics; d is a fixed suffix.

[0098] The formula for calculating user tag matching is:

[0099]

[0100] In the formula, M represents the user tag matching result, M=1 indicates a successful match, and M=0 indicates a failed match; k represents the number of order dimensions counted. is the number of valid orders in the i-th dimension; T is the order quantity threshold set in the configuration data of the marketing plan to be executed; D is the number of days for counting valid orders; Configure the statistical days threshold set in the data for the marketing plan to be executed.

[0101] In this embodiment, after generating the result, the system synchronously writes the result to the Redis hash cache and sets the cache expiration time to the end time of the marketing plan to be executed. This cache expiration design can ensure that the cached data remains valid during the validity period of the marketing plan. After the plan ends, the cache will automatically expire and be cleaned up without manual maintenance, avoiding the problems of cache redundancy and untimely data expiration. If the verification in step S2 fails, the execution of the current marketing plan will be terminated directly, and the pre-screening and filtering of target users will be completed.

[0102] In this embodiment, in step S4, when the target user is matched, an optimistic lock is added to the current user-to-marketing plan dimension for concurrency control through the findAndModify atomic operation; the system checks whether there are duplicate coupon issuance records and duplicate order processing records under the current user-to-marketing plan dimension; after the verification is passed, reward coupons are issued to the user according to the reward package mapping rules in the marketing plan configuration data; the planId coupon source identifier is written into the coupon record, a coupon display record is generated, and the initial display status is marked as not displayed; when the target user is not matched, the marketing plan is terminated.

[0103] Specifically, such as Figure 3As shown, when the target user matching result generated without using S3 is a successful match, an optimistic lock is added to the "current user unique identifier - marketing plan planId to be executed" dimension through the findAndModify atomic operation for concurrency control. This atomic operation can merge lock state query and update into an indivisible execution unit, completely avoiding concurrency conflicts caused by multiple requests acquiring locks at the same time in high-concurrency scenarios. At the same time, the fine-grained lock design only restricts the execution of the current user's current marketing plan, without affecting the normal execution of other users and other marketing plans, thus ensuring the overall concurrency performance of the system.

[0104] The expression for determining the lock state is as follows:

[0105]

[0106] In the formula, L represents the result of the optimistic lock acquisition, where L=1 indicates successful lock acquisition and L=0 indicates failed lock acquisition; The initial lock state in dimension 1. =1 indicates that a lock already exists. =0 indicates no lock; This operation atomically updates the lock state from unlocked to locked, and this operation is an inseparable atomic operation from the lock state query.

[0107] After successfully acquiring the optimistic lock, a dual anti-duplicate verification is performed. The first verification checks for any historical duplicate coupon issuance records under the current user-to-marketing plan dimension, preventing the same user from repeatedly receiving reward coupons in the same marketing plan. The second verification checks for any duplicate processing records of the current order, preventing the same order from triggering the marketing plan's reward issuance action multiple times. This dual verification further mitigates the risk of duplicate coupon issuance. When the verification passes, the corresponding reward coupon is issued to the user strictly according to the reward package mapping rules in the marketing plan configuration data generated by S1. The reward package mapping rules can be configured to match reward coupon combinations corresponding to different user tags and different order tiers, achieving differentiated reward issuance. Simultaneously, the planId of the marketing plan to be executed is written into the coupon record as the coupon source identifier, realizing full-link traceability of reward coupons from issuance to use. At the same time, a MarketingCouponDisplay coupon display record associated with the coupon is generated, and its initial display status is marked as not displayed, providing a data foundation for the subsequent coupon arrival and display stage. If the target user matching result is a mismatch, the execution process of the current marketing plan is directly terminated.

[0108] In this embodiment, in step S5, based on the user's initialization interface request, the user coupon display records, associated coupon records and coupon template information that are not displayed under the user's name are obtained by querying, and grouped and assembled according to the joint grouping rules of coupon template ID and display type to generate coupon arrival notification data and return it to the user; after the coupon arrival notification data is successfully returned to the user, the display status of the user coupon display record is updated to displayed.

[0109] Specifically, such as Figure 4 As shown, the initialization interface request initiated by the user client serves as the trigger source. The trigger scenario typically occurs when the user is active, such as when they open a client, mini-program, or self-service device interface, ensuring the effective delivery of the securities arrival notification. Upon receiving the initialization interface request, the system verifies the user's identity. If the verification is successful, it queries all MarketingCouponDisplay records under the corresponding username that are not currently displayed. Based on the associated fields in the coupon display records, it synchronously retrieves the corresponding coupon record and coupon template information to obtain core information such as the coupon's face value, usage rules, validity period, applicable scope, and display style. The system then strictly follows the coupon template... The combined grouping rules of board ID (tid) and display type (displayType) group and assemble the above data, integrating coupon data with the same template and display type into unified coupon arrival notification data. This ensures the uniformity and standardization of the display style and avoids cluttered displays that affect the user experience. The system only updates the display status of the corresponding coupon display record to "displayed" in batches after the coupon arrival notification data is successfully returned to the user's terminal. This design can avoid the loss of coupon arrival notifications due to issues such as interface call failure, abnormal user terminal reception, and network fluctuations. It ensures that users can still obtain the coupon arrival information that has not been displayed when they log in later, greatly improving the reliability of user access.

[0110] In this embodiment, in step S6, a scheduled task is started according to the execution cycle set in the SMS outreach configuration data of the marketing plan to be executed; the scheduled task scans for unused valid reward coupons within the set expiration time window; after filtering the coupon records that have completed the expiration reminder among the valid reward coupons, the contact information of the users corresponding to the filtered valid reward coupons is retrieved and the SMS service is called to send the coupon expiration reminder SMS; the success or failure status of the SMS service is written into the reminder execution result record.

[0111] Specifically, such as Figure 5 As shown, the scheduled task is started strictly according to the execution cycle set in the SMS outreach configuration data of the marketing plan to be executed generated in step S1. It supports different reminder execution frequencies for different marketing plans, such as daily execution, execution every 3 days, etc., to adapt to the personalized operation needs of multiple scenarios.

[0112] After the scheduled task starts, it uses a batch scanning method to query valid reward coupons with an unused status within a preset expiration time window. The preset expiration time window is usually 3 days away from the coupon's expiration date. A fixed upper limit is set for the number of items per batch scan to avoid database performance pressure caused by scanning a large amount of data at once and to ensure stable system operation. After the scan is completed, the records of coupons that have already been reminded to expire are filtered out to avoid repeatedly sending SMS messages to disturb users. The system retrieves the pre-registered contact information of the users corresponding to the remaining coupon records and calls the SMS service to send coupon expiration reminder SMS messages to the users. The SMS content can be customized based on the marketing plan configuration to guide users to use reward coupons in a timely manner and improve the utilization rate of marketing resources. After the SMS is sent, the system writes the information such as the success or failure status of the SMS service, the sending time, and the receiving mobile phone number into the CouponRemindRecord reminder execution result record. This provides complete data support for subsequent operation statistics, effect analysis, and problem troubleshooting, and finally completes the closed loop of the entire process of the marketing plan from configuration, triggering, execution, reach, to reminder.

[0113] In the process of scanning unused valid reward coupons within the set expiration time window via the scheduled task, a batch scanning method is adopted; the formula for calculating the number of scanning batches is:

[0114]

[0115] In the formula, P represents the scanning batch; S represents the total number of coupons to be scanned; and M represents the number of coupons scanned in a single batch.

[0116] The application scenarios of this invention are as follows:

[0117] In the offline operation scenario of intelligent self-service vending machines, this invention can complete the configuration of marketing rules for multiple regions and multiple devices through a unified marketing plan data model, automatically trigger marketing actions based on order progress update events, adapt to the differentiated operational needs of different locations, eliminate the need to develop marketing logic separately for each device, and reduce the operation and maintenance costs of offline devices.

[0118] In the omnichannel marketing scenario of chain retail, this invention can associate order data from multiple channels such as online mini-programs, offline stores, and official apps through multiple unionids to complete the statistics and matching of users' omnichannel consumption behavior, realize a set of marketing rules adapted to omnichannel consumption scenarios, and ensure the consistency of marketing rule execution.

[0119] In the retail industry's member lifecycle operation scenario, this invention can cover the entire execution process of marketing plan configuration, order triggering, reward distribution, payment display, and expiration reminder. It automatically completes the distribution and delivery of member rewards based on user consumption orders, without the need for manual intervention to perform single-stage operations, thereby improving the efficiency of marketing campaign implementation.

[0120] In the context of large-scale marketing during holiday promotions in the retail industry, this invention can optimize system performance under high concurrency by using Redis hash caching, and avoid duplicate reward distribution by using atomic optimistic locking. It also supports the simultaneous parallel execution of multiple marketing plans, ensuring the stable operation of marketing activities during peak promotion periods.

[0121] In the context of new user acquisition and operation in offline consumer business, this invention allows for the customization of user matching rules, order triggering conditions, and exclusion scenarios. It automatically distributes and reaches new users with rewards based on their first order progress, adapts to the rule adjustment needs of different user acquisition activities, and shortens the launch cycle of user acquisition activities.

[0122] It should be noted that the method of this disclosure embodiment can be executed by a single device, such as a computer or server. The method of this embodiment can also be applied to a distributed scenario, where multiple devices cooperate to complete the task. In such a distributed scenario, one of these devices may execute only one or more steps of the method of this disclosure embodiment, and the multiple devices will interact with each other to complete the method described.

[0123] It should be noted that the above description describes some embodiments of this disclosure. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in a different order than that shown in the above embodiments and still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0124] Example 2

[0125] See Figure 6 Embodiment 2 of the present invention also provides a general marketing plan system for multiple marketing scenarios, including:

[0126] The marketing plan configuration data generation module 001 is used to obtain comprehensive configuration information by customizing parameters and rules for setting marketing plan information and rules; and to input the comprehensive configuration information into the marketing plan data model to generate executable marketing plan configuration data.

[0127] The order and marketing plan configuration data matching verification module 002 is used to, when an order progress update event is detected, perform matching verification on the reward trigger conditions, effective region / machine range and exclusion scenario rules in the current order and the marketing plan configuration data in sequence based on the order progress update event and the marketing plan configuration data, and obtain the verification result;

[0128] The target user matching result acquisition module 003 is used to query the matching judgment result between the current user and the marketing plan to be executed in the Redis hash cache when the verification passes; if the cache is hit, the target user matching result is obtained; if the cache is not hit, the user's historical order data is statistically analyzed and user tag matching calculations are performed to generate a new target user matching result and write it to the Redis hash cache; the cache expiration time is set to the plan end time of the marketing plan to be executed; when the verification fails, the marketing plan to be executed is terminated.

[0129] The reward coupon distribution module 004 is used to add an optimistic lock to the current user-pending marketing plan dimension for concurrency control through the findAndModify atomic operation when the target user is successfully matched; it verifies whether there are duplicate coupon distribution records and duplicate order processing records under the current user-pending marketing plan dimension; after the verification is successful, it distributes reward coupons to the user according to the reward package mapping rules in the pending marketing plan configuration data; it writes the planId coupon source identifier into the coupon record, generates a coupon display record, and marks the initial display status as not displayed; when the target user is not successfully matched, it terminates the pending marketing plan.

[0130] The initialization interface request processing module 005 is used to obtain, based on the user's initialization interface request, user coupon display records not yet displayed under the username, associated coupon records and coupon template information by querying, and group and assemble them according to the joint grouping rules of coupon template ID and display type, generate coupon arrival notification data and return it to the user; after the coupon arrival notification data is successfully returned to the user, the display status of the user coupon display record is updated to displayed.

[0131] The scheduled task processing module 006 is used to start a scheduled task according to the execution cycle set in the SMS outreach configuration data of the marketing plan to be executed; scan for unused valid reward coupons within the set expiration time window through the scheduled task; filter the coupon records that have completed the expiration reminder among the valid reward coupons, retrieve the contact information of the users corresponding to the filtered valid reward coupons, and call the SMS service to send the coupon expiration reminder SMS; and write the successful or failed sending status of the SMS service into the reminder execution result record.

[0132] In this embodiment, the marketing plan configuration data generation module 001 includes a marketing plan data model comprising: a MarketingPlan main model, a MarketingPlanRecord execution record model, a MarketingCouponDisplay coupon display model, a CouponRemindRecord reminder record model, and an SmsNotifyConfigField SMS configuration sub-model. The MarketingPlan main model stores basic plan information, reward triggering conditions, and target user matching rules. The MarketingPlanRecord model stores the marketing plan's execution progress, order association records, coupon issuance records, and lock status information. The MarketingCouponDisplay model stores planId, displayType, display status identifier, and associated coupon record ID. The CouponRemindRecord model stores couponRecordId, user unique identifier, reminder time, and SMS sending success identifier.

[0133] In this embodiment, in the marketing plan configuration data generation module 001, during the process of setting custom parameters and rules for the marketing plan information and rules, the marketing plan information and rules include: basic plan information, reward triggering conditions, target user matching rules, user tags / groups, reward package mapping rules, exclusion scenario rules, coupon display configuration, and SMS outreach configuration.

[0134] The basic information of the plan includes: plan name, plan validity period, review status, activity type, display type, planId, effective cities and effective machine range;

[0135] The user tags adopt a fixed naming convention:

[0136]

[0137] In the formula, Tag is the final generated user tag name; This represents the order tiers; "order" is a fixed string. This represents the number of days for order statistics; d is a fixed suffix.

[0138] Both the exclusion scenario rules and the displayType of the coupon display configuration support extensible configuration; when adding a new exclusion scenario or displayType, the corresponding enumeration value is added to the marketing plan data model without modifying the underlying execution logic.

[0139] In this embodiment, the target user matching result acquisition module 003 obtains the full user order data by associating multiple unionids during the process of statistical analysis of user historical order data and user tag matching calculation; it filters out refunded orders and unpaid orders in the full user order data and excludes orders that currently trigger the order progress update event; it also prunes the order query field and sets the upper limit of the number of query entries to N.

[0140] The formula for calculating user tag matching is:

[0141]

[0142] In the formula, M represents the user tag matching result, M=1 indicates a successful match, and M=0 indicates a failed match; k represents the number of order dimensions counted. is the number of valid orders in the i-th dimension; T is the order quantity threshold set in the configuration data of the marketing plan to be executed; D is the number of days for counting valid orders; Configure the statistical days threshold set in the data for the marketing plan to be executed.

[0143] In this embodiment, in the reward coupon distribution module 004, during the process of adding an optimistic lock to the current user-to-be-executed marketing plan dimension for concurrency control through the findAndModify atomic operation, the lock state of the current user-to-be-executed marketing plan dimension is atomically queried and updated. The expression for determining the lock state is:

[0144]

[0145] In the formula, L represents the result of the optimistic lock acquisition, where L=1 indicates successful lock acquisition and L=0 indicates failed lock acquisition; The initial lock state in dimension 1. =1 indicates that a lock already exists. =0 indicates no lock; This operation atomically updates the lock state from unlocked to locked, and this operation is an inseparable atomic operation from the lock state query.

[0146] In this embodiment, the scheduled task processing module 006 scans unused valid reward coupons within the set expiration time window using the scheduled task, employing a batch scanning method; the formula for calculating the number of scanning batches is:

[0147]

[0148] In the formula, P represents the scanning batch; S represents the total number of coupons to be scanned; and M represents the number of coupons scanned in a single batch.

[0149] It should be noted that the information interaction and execution process between the modules of the above system are based on the same concept as the method embodiment in Embodiment 1 of this application, and the resulting technical effects are the same as those in the method embodiment of this application. For details, please refer to the description in the method embodiment shown above in this application, and it will not be repeated here.

[0150] Example 3

[0151] Embodiment 3 of the present invention provides a non-transitory computer-readable storage medium storing program code for a general marketing plan method for multiple marketing scenarios. The program code includes instructions for executing the general marketing plan method for multiple marketing scenarios according to Embodiment 1 or any possible implementation thereof.

[0152] Computer-readable storage media can be any available medium that a computer can access, or a data storage device such as a server or data center that integrates one or more available media. The available medium can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives (SSDs)).

[0153] Example 4

[0154] Embodiment 4 of the present invention provides an electronic device, including: a memory and a processor;

[0155] The processor and the memory communicate with each other via a bus; the memory stores program instructions that can be executed by the processor, and the processor can execute a general marketing plan method for multiple marketing scenarios by calling the program instructions of Embodiment 1 or any possible implementation thereof.

[0156] Specifically, a processor can be implemented in hardware or software. When implemented in hardware, the processor can be a logic circuit, an integrated circuit, etc. When implemented in software, the processor can be a general-purpose processor that reads software code stored in memory. This memory can be integrated into the processor or located outside the processor and exist independently.

[0157] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable system. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means.

[0158] It is obvious to those skilled in the art that the modules or steps of the present invention described above can be implemented using general-purpose computing systems. They can be centralized on a single computing system or distributed across a network of multiple computing systems. Optionally, they can be implemented using program code executable by a computing system, thereby storing them in a storage system for execution by the computing system. In some cases, the steps shown or described can be performed in a different order than those presented herein, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any particular combination of hardware and software.

[0159] Although the present invention has been described in detail above with general descriptions and specific embodiments, modifications or improvements can be made to it, which will be obvious to those skilled in the art. Therefore, all such modifications or improvements made without departing from the spirit of the present invention fall within the scope of protection claimed by the present invention.

Claims

1. A general marketing plan method for multiple marketing scenarios, characterized in that, include: By customizing the parameters and rules of the marketing plan settings, comprehensive configuration information can be obtained; The comprehensive configuration information is entered into the marketing plan data model to generate executable marketing plan configuration data; When an order progress update event is detected, based on the order progress update event and the marketing plan configuration data, the reward trigger conditions, effective region / machine range and exclusion scenario rules in the current order and the marketing plan configuration data to be executed are matched and verified in sequence to obtain the verification result; When the verification passes, query the Redis hash cache for the matching result between the current user and the marketing plan to be executed; If the cache is hit, the target user matching result is obtained; if the cache is not hit, the user's historical order data is statistically analyzed and user tag matching calculations are performed to generate a new target user matching result and write it to the Redis hash cache. Set the cache expiration time to the planned end time of the marketing plan to be executed; terminate the marketing plan to be executed if the verification fails. When a target user is successfully matched, an optimistic lock is added to the current user-pending marketing plan dimension for concurrency control via the findAndModify atomic operation; the system checks for duplicate coupon issuance records and duplicate order processing records under the current user-pending marketing plan dimension; after successful verification, reward coupons are issued to the user according to the reward package mapping rules in the pending marketing plan configuration data; the planId coupon source identifier is written into the coupon record, a coupon display record is generated, and the initial display status is marked as not displayed; If the target user does not match, the marketing plan to be executed will be terminated. Based on the user's initialization interface request, the system retrieves the user's undisplayed coupon display records, associated coupon records, and coupon template information by querying. It then groups and assembles these according to the joint grouping rules of coupon template ID and display type, generates coupon arrival notification data, and returns it to the user's client. After the coupon arrival notification data is successfully returned to the user's terminal, the display status of the user's coupon display record is updated to "displayed". The scheduled task is started according to the execution cycle set in the SMS outreach configuration data of the marketing plan to be executed; the scheduled task scans for unused valid reward coupons within the set expiration time window; After filtering the valid reward coupons that have completed the expiration reminder, retrieve the contact information of the users corresponding to the filtered valid reward coupons and call the SMS service to send the coupon expiration reminder SMS. The success or failure status of the SMS service is written into the notification execution result record.

2. The general marketing plan method for multiple marketing scenarios according to claim 1, characterized in that, The marketing plan data model includes: a MarketingPlan main model, a MarketingPlanRecord execution record model, a MarketingCouponDisplay coupon display model, a CouponRemindRecord reminder record model, and an SmsNotifyConfigField SMS configuration sub-model. The MarketingPlan main model stores basic plan information, reward triggering conditions, and target user matching rules. The MarketingPlanRecord model stores the marketing plan's execution progress, order association records, coupon issuance records, and lock status information. The MarketingCouponDisplay model stores planId, displayType, display status identifier, and associated coupon record ID. The CouponRemindRecord model stores couponRecordId, user unique identifier, reminder time, and SMS sending success identifier.

3. The general marketing plan method for multiple marketing scenarios according to claim 2, characterized in that, In the process of customizing parameters and rules for setting marketing plan information and rules, the setting marketing plan information and rules include: basic plan information, reward triggering conditions, target user matching rules, user tags / groups, reward package mapping rules, exclusion scenario rules, coupon display configuration and SMS outreach configuration; The basic information of the plan includes: plan name, plan validity period, review status, activity type, display type, planId, effective cities and effective machine range; The user tags adopt a fixed naming convention: In the formula, Tag is the final generated user tag name; This represents the order tiers; "order" is a fixed string. This represents the number of days for order statistics; d is a fixed suffix. Both the exclusion scenario rules and the displayType of the coupon display configuration support extensible configuration; when adding a new exclusion scenario or displayType, the corresponding enumeration value is added to the marketing plan data model without modifying the underlying execution logic.

4. The general marketing plan method for multiple marketing scenarios according to claim 3, characterized in that, During the process of statistical analysis of user historical order data and user tag matching calculation, the full order data of the user is obtained by association through multiple unionids; refunded orders and unpaid orders in the full order data of the user are filtered out and orders that have triggered the order progress update event are excluded. Trim the order query fields and set the maximum number of queries to N; The formula for calculating user tag matching is: In the formula, M represents the user tag matching result, M=1 indicates a successful match, and M=0 indicates a failed match; k represents the number of order dimensions counted. is the number of valid orders in the i-th dimension; T is the order quantity threshold set in the configuration data of the marketing plan to be executed; D is the number of days for counting valid orders; Configure the statistical days threshold set in the data for the marketing plan to be executed.

5. The general marketing plan method for multiple marketing scenarios according to claim 4, characterized in that, During the process of adding an optimistic lock to the current user-pending marketing plan dimension for concurrency control using the findAndModify atomic operation, the lock state of the current user-pending marketing plan dimension is atomically queried and updated. The expression for determining the lock state is: In the formula, L represents the result of the optimistic lock acquisition, where L=1 indicates successful lock acquisition and L=0 indicates failed lock acquisition; The initial lock state in dimension 1. =1 indicates that a lock already exists. =0 indicates no lock; This operation atomically updates the lock state from unlocked to locked, and this operation is an inseparable atomic operation from the lock state query.

6. The general marketing plan method for multiple marketing scenarios according to claim 5, characterized in that, During the process of scanning unused valid reward coupons within the set expiration time window via the scheduled task, the scanning is performed in batches; the formula for calculating the number of scanning batches is: In the formula, P represents the scanning batch; S represents the total number of coupons to be scanned; and M represents the number of coupons scanned in a single batch.

7. A universal marketing plan system for multiple marketing scenarios, employing the universal marketing plan method for multiple marketing scenarios as described in any one of claims 1-6, characterized in that, include: The marketing plan configuration data generation module is used to obtain comprehensive configuration information by customizing parameters and rules based on the marketing plan information and rules. The comprehensive configuration information is entered into the marketing plan data model to generate executable marketing plan configuration data; The order and marketing plan configuration data matching verification module is used to, when an order progress update event is detected, perform matching verification on the reward trigger conditions, effective region / machine range and exclusion scenario rules in the current order and the marketing plan configuration data to be executed, based on the order progress update event and the marketing plan configuration data, and obtain the verification result. The target user matching result acquisition module is used to query the Redis hash cache for the matching result between the current user and the marketing plan to be executed when the verification is successful. If the cache is hit, the target user matching result is obtained; if the cache is not hit, the user's historical order data is statistically analyzed and user tag matching calculations are performed to generate a new target user matching result and write it to the Redis hash cache. Set the cache expiration time to the planned end time of the marketing plan to be executed; terminate the marketing plan to be executed if the verification fails. The reward coupon distribution module is used to add optimistic locking to the current user-pending marketing plan dimension for concurrency control through the findAndModify atomic operation when the target user is matched; it verifies whether there are duplicate coupon distribution records and duplicate order processing records under the current user-pending marketing plan dimension; after the verification is passed, the reward coupon is distributed to the user according to the reward package mapping rules in the pending marketing plan configuration data; the planId coupon source identifier is written into the coupon record, a coupon display record is generated, and the initial display status is marked as not displayed; If the target user does not match, the marketing plan to be executed will be terminated. The initialization interface request processing module is used to obtain, based on the user's initialization interface request, user coupon display records not yet displayed under the username, associated coupon records and coupon template information by querying, and group and assemble them according to the joint grouping rules of coupon template ID and display type, generate coupon arrival notification data and return it to the user; after the coupon arrival notification data is successfully returned to the user, the display status of the user coupon display record is updated to displayed. The scheduled task processing module is used to start scheduled tasks according to the execution cycle set in the SMS outreach configuration data of the marketing plan to be executed; and to scan for unused valid reward coupons within the set expiration time window through the scheduled task. After filtering the valid reward coupons that have completed the expiration reminder, retrieve the contact information of the users corresponding to the filtered valid reward coupons and call the SMS service to send the coupon expiration reminder SMS. The success or failure status of the SMS service is written into the notification execution result record.

8. A general marketing plan system for multiple marketing scenarios according to claim 7, characterized in that, The marketing plan configuration data generation module includes a marketing plan data model comprising: a MarketingPlan main model, a MarketingPlanRecord execution record model, a MarketingCouponDisplay coupon display model, a CouponRemindRecord reminder record model, and an SmsNotifyConfigField SMS configuration sub-model. The MarketingPlan main model stores basic plan information, reward triggering conditions, and target user matching rules. The MarketingPlanRecord model stores the marketing plan's execution progress, order association records, coupon issuance records, and lock status information. The MarketingCouponDisplay model stores planId, displayType, display status identifier, and associated coupon record ID. The CouponRemindRecord model stores couponRecordId, a unique user identifier, reminder time, and SMS sending success identifier.

9. A general marketing plan system for multiple marketing scenarios according to claim 8, characterized in that, In the marketing plan configuration data generation module, during the process of setting custom parameters and rules for setting marketing plan information and rules, the setting marketing plan information and rules include: basic plan information, reward triggering conditions, target user matching rules, user tags / groups, reward package mapping rules, exclusion scenario rules, coupon display configuration, and SMS outreach configuration. The basic information of the plan includes: plan name, plan validity period, review status, activity type, display type, planId, effective cities and effective machine range; The user tags adopt a fixed naming convention: In the formula, Tag is the final generated user tag name; This represents the order tiers; "order" is a fixed string. This represents the number of days for order statistics; d is a fixed suffix. Both the exclusion scenario rules and the displayType of the coupon display configuration support extensible configuration; when adding a new exclusion scenario or displayType, the corresponding enumeration value is added to the marketing plan data model without modifying the underlying execution logic.

10. A general marketing plan system for multiple marketing scenarios according to claim 9, characterized in that, In the target user matching result acquisition module, during the process of statistical analysis of user historical order data and user tag matching calculation, the full user order data is obtained by association through multiple unionids. Filter out refunded orders and unpaid orders from the user's full order data and exclude orders that currently trigger the order progress update event; Trim the order query fields and set the maximum number of queries to N; The formula for calculating user tag matching is: In the formula, M represents the user tag matching result, M=1 indicates a successful match, and M=0 indicates a failed match; k represents the number of order dimensions counted. is the number of valid orders in the i-th dimension; T is the order quantity threshold set in the configuration data of the marketing plan to be executed; D is the number of days for counting valid orders; Configure the statistical day threshold set in the data for the marketing plan to be executed; In the reward coupon distribution module, during the process of adding an optimistic lock to the current user-pending marketing plan dimension for concurrency control using the findAndModify atomic operation, the lock state of the current user-pending marketing plan dimension is atomically queried and updated. The expression for determining the lock state is: In the formula, L represents the result of the optimistic lock acquisition, where L=1 indicates successful lock acquisition and L=0 indicates failed lock acquisition; The initial lock state in dimension 1. =1 indicates that a lock already exists. =0 indicates no lock; To ensure atomicity, the lock state is updated from unlocked to locked, and this operation is an inseparable atomic operation from the lock state query; In the scheduled task processing module, the scanning of unused valid reward coupons within the set expiration time window is performed in batches; the formula for calculating the number of scanning batches is: In the formula, P represents the scanning batch; S represents the total number of coupons to be scanned; and M represents the number of coupons scanned in a single batch.