An AI-based e-commerce marketing activity intelligent planning and execution method and system
Patent Information
- Application Number
- CN202610836464.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-10
- Publication Date
- 2026-08-18
AI Technical Summary
[0008]因此,本申请提供了一种基于AI的电商营销活动智能策划与执行方法及系统,能够解决高并发下人工智能临时加塞推荐商品引发的数据锁等待与支付链路死锁问题
本申请提供了一种基于AI的电商营销活动智能策划与执行方法及系统,响应于人工智能加塞推荐事件,获取原支付订单的当前订单状态与数据锁定标识,基于当前订单状态与数据锁定标识构建原支付订单的快照数据;基于快照数据与加塞推荐商品的商品属性及折扣规则,生成加塞分支事务,根据加塞分支事务计算加塞推荐商品对原支付订单产生的增量价格变动值;响应于用户对加塞推荐商品的确认加入信号,获取原支付订单的数据写入锁,基于数据写入锁将增量价格变动值与原支付订单的初始价格进行合并替换操作,生成最终支付金额。本发明避免了人工智能加塞推荐对原支付订单数据锁的直接争抢,消除了高并发下的支付链路死锁。
Smart Images

Figure CN122597043A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of e-commerce data processing technology, and in particular to an AI-based intelligent planning and execution method and system for e-commerce marketing activities. Background Technology
[0002] With the widespread application of artificial intelligence technology in the e-commerce field, e-commerce platforms often introduce AI recommendation systems in the user payment process, attempting to temporarily recommend discounted or add-on products to users at the moment they are about to pay, in order to increase order amount and marketing effect.
[0003] However, during peak sales periods, a large number of users submit orders concurrently within a very short time, putting the e-commerce system's servers under heavy load as they are already fully engaged in calculating the original product price and the combined discounts.
[0004] At this point, if the AI system temporarily inserts recommended products and new discount rules based on user preferences at the moment of payment, the e-commerce system must immediately interrupt the current calculation process, reacquire the order data lock, and recalculate the total order ledger.
[0005] During the rush to buy, a large number of concurrent orders were vying for the same batch of data locks. The AI system's temporary recalculation requests could only be executed after other concurrent orders released their data locks. As the number of waiting recalculation requests increased, the e-commerce system's computing resources were exhausted by the massive queue of processes, ultimately causing the payment process to completely block, preventing all users from completing their payments.
[0006] Existing order processing technologies lack methods to resolve concurrent resource conflicts in scenarios where AI temporarily adds recommendations, making it impossible to handle additional products and discounts temporarily injected by AI while ensuring the smooth operation of the main payment process. This can easily cause system crashes and transaction failures. Summary of the Invention
[0007] In view of the aforementioned problems, this application is hereby filed.
[0008] Therefore, this application provides an AI-based intelligent planning and execution method and system for e-commerce marketing activities, which can solve the problems of data lock waiting and payment link deadlock caused by artificial intelligence temporarily adding recommended products under high concurrency.
[0009] To solve the above-mentioned technical problems, this application provides the following technical solution: In the first aspect, this application provides an AI-based intelligent planning and execution method for e-commerce marketing activities, including: responding to an AI-assisted recommendation event, obtaining the current order status and data lock identifier of the original payment order, and constructing a snapshot of the original payment order based on the current order status and data lock identifier; Based on the snapshot data and the product attributes and discount rules of the recommended products, a branch transaction for adding products is generated, and the incremental price change value of the recommended products for adding products to the original payment order is calculated based on the branch transaction for adding products. In response to the user's confirmation signal to add the recommended product, the system acquires the data write lock of the original payment order. Based on the data write lock, the incremental price change value is merged and replaced with the initial price of the original payment order to generate the final payment amount.
[0010] As a preferred approach, in response to AI-driven queue-jumping recommendations, the current order status and data lock identifier of the original payment order are obtained. Based on the current order status and data lock identifier, a snapshot of the original payment order is constructed, including: In response to the AI-driven queue-jumping recommendation event, obtain the current order status of the original payment order and the corresponding order identifier of the original payment order; Determine the current order status. If the current order status is in the payment calculation state, obtain the total amount of goods in the original payment order and the first value of the matched discount rules. The total amount of the goods is combined with the first value of the matched discount rules and the corresponding order identifier. The combined first value and the order identifier are then used as the snapshot data of the original payment order.
[0011] As a preferred approach, based on the snapshot data and the product attributes and discount rules of the recommended products, a branch transaction for adding products is generated. The incremental price change value resulting from adding the recommended products to the original payment order is calculated based on this branch transaction, including: Based on the matched discount rules and the discount rules for the recommended products in the snapshot data, obtain the mutual exclusion relationship between the matched discount rules and the discount rules for the recommended products. The mutual exclusion relationship is determined. When the mutual exclusion relationship exists, the non-overlapping individual discount value of the recommended product is calculated based on the total amount of the products in the snapshot data and the product attributes of the recommended product. A branch transaction for adding a product is generated based on the non-overlayed individual discount value of the product added, and the non-overlayed individual discount value of the product added is determined as the incremental price change value generated by the product added to the original payment order.
[0012] As a preferred option, after determining the mutual exclusion relationship, the following steps are also included: When the mutual exclusion relationship is non-exclusive, the initial deduction value of the recommended product is calculated based on the product attributes and discount rules of the recommended product. The initial deduction value of the recommended product is correlated with the total amount of the product in the snapshot data, and a branch transaction is generated based on the result of the correlation process. The initial deduction value of the recommended product is converted to the incremental price change value of the recommended product on the original payment order.
[0013] Preferably, in response to the user's confirmation signal to add the recommended product, a data write lock is acquired for the original payment order. Based on the data write lock, the incremental price change value is merged and replaced with the initial price of the original payment order to generate the final payment amount, including: In response to the user's confirmation signal for adding the recommended products, the occupancy status of the data write lock of the original payment order is detected, and the current waiting time of the data write lock is obtained; Based on the relationship between the current waiting time of the data write lock and the preset waiting threshold, when the current waiting time of the data write lock exceeds the preset waiting threshold, the percentage of incremental price change is calculated based on the incremental price change value and the total amount of the goods in the original payment order. The incremental price change percentage is compared with a preset percentage threshold. When the incremental price change percentage is less than the preset percentage threshold, the incremental price change value is written to the asynchronous queue to be merged, and the request to occupy the data write lock of the original payment order is released.
[0014] Preferably, after writing the incremental price change value to the asynchronous queue to be merged and releasing the data write lock request for the original payment order, the process also includes: In response to the triggering of the incremental price change value in the asynchronous queue to be merged meeting the preset merging conditions, the data write lock of the original payment order and the initial price of the original payment order are acquired. Based on the data write lock of the original payment order, the incremental price change value is summed with the initial price of the original payment order to generate a combined price value; The initial price of the original payment order is overwritten based on the merged price value to generate the final payment amount, while the data write lock of the original payment order is released.
[0015] As a preferred option, before combining the total amount of the goods with the first value of the matched discount rule and the corresponding order identifier, the following steps are also included: Obtain the first timestamp of the original payment order and the second timestamp of the AI queue-jumping recommendation event, and determine the time extraction result based on the first timestamp of the original payment order and the second timestamp of the AI queue-jumping recommendation event; The time difference is calculated based on the first timestamp of the original payment order and the second timestamp of the AI-assisted queue recommendation event, and the time difference is used as the basis for judging the timeliness of the queue recommendation event. The time difference is compared with a preset time threshold. When the time difference is greater than the preset time threshold, a signal indicating failure of the insertion recommendation is sent to the AI server and the generation of the insertion branch transaction is terminated.
[0016] As a preferred option, after calculating the incremental price change value of the recommended product on the original payment order based on the branch transaction, the following is also included: In response to the user's signal to refuse to join the recommended product, obtain the current status identifier of the joining branch transaction and the storage location of the corresponding incremental price change value; The current status identifier of the branch transaction is verified. If the current status identifier of the branch transaction is "unmerged", the branch transaction and its corresponding incremental price change value are cleared. Based on the clearing results of the branch transaction and the corresponding incremental price change value, the initial price of the original payment order remains unchanged, and the temporary computing resources occupied by the branch transaction are released.
[0017] Preferably, after considering the relationship between the current waiting time of the data write lock and the preset waiting threshold, the method further includes: When the current waiting time of the data write lock does not exceed the preset waiting threshold, acquire the data write lock of the original payment order and the lock status of the initial price of the original payment order; Based on the data write lock of the original payment order, the incremental price change value is merged with the initial price of the original payment order to generate the initial merged amount; The initial price of the original payment order is replaced based on the initial merged amount, and the replaced initial merged amount is determined as the final payment amount and output to the payment gateway.
[0018] Secondly, this application also provides an AI-based intelligent planning and execution system for e-commerce marketing activities, including: a snapshot construction module, configured to respond to an AI-assisted recommendation event, obtain the current order status and data lock identifier of the original payment order, and construct snapshot data of the original payment order based on the current order status and data lock identifier; The incremental calculation module is configured to generate a branch transaction based on snapshot data and the product attributes and discount rules of the recommended products, and calculate the incremental price change value of the recommended products on the original payment order based on the branch transaction. The merge and replace module is configured to respond to the user's confirmation signal for adding the recommended product, acquire the data write lock of the original payment order, and merge and replace the incremental price change value with the initial price of the original payment order based on the data write lock to generate the final payment amount.
[0019] Implementing this application will have the following beneficial effects: This application provides an AI-based intelligent planning and execution method and system for e-commerce marketing activities. In response to an AI-driven "queue-jumping" recommendation event, it obtains the current order status and data lock identifier of the original payment order, and constructs a snapshot of the original payment order based on the current order status and data lock identifier. Based on the snapshot data and the product attributes and discount rules of the recommended product, it generates a queue-jumping branch transaction, and calculates the incremental price change value of the recommended product on the original payment order according to the queue-jumping branch transaction. In response to the user's confirmation signal for adding the recommended product, it obtains a data write lock for the original payment order, and merges and replaces the incremental price change value with the initial price of the original payment order based on the data write lock to generate the final payment amount. This invention avoids direct contention for the original payment order's data lock by AI-driven queue-jumping recommendations, eliminating deadlocks in the payment chain under high concurrency. Attached Figure Description
[0020] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1 This is an overall flowchart of an AI-based intelligent planning and execution method for e-commerce marketing activities involved in this application; Figure 2 This is a flowchart of the queue recommendation and concurrency conflict resolution judgment process for an AI-based intelligent planning and execution method for e-commerce marketing activities involved in this application. Figure 3 This application relates to an AI-based intelligent planning and execution method for e-commerce marketing activities, specifically an AI-driven order lifecycle and ecosystem mapping diagram for recommended orders. Figure 4 This application relates to an AI-based intelligent planning and execution method for e-commerce marketing activities, specifically an incremental price change value calculation and data flow diagram. Detailed Implementation
[0022] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0023] Example 1, referring to Figures 1-4 This is the first embodiment of the present invention, which provides an AI-based intelligent planning and execution method for e-commerce marketing activities, including: This invention provides a method that can effectively solve the problems mentioned above. The following will describe in detail how to implement this AI-based intelligent planning and execution method for e-commerce marketing activities with multiple embodiments. Figure 1 A flowchart illustrating an AI-based intelligent planning and execution method for e-commerce marketing campaigns is provided, including: Step S1: In response to the AI queue-jumping recommendation event, obtain the current order status and data lock identifier of the original payment order, and construct a snapshot of the original payment order based on the current order status and data lock identifier; In the e-commerce payment process, when an AI system temporarily adds product recommendations, directly recalculating the original payment order data could lead to data lock contention and payment deadlock under high concurrency. To avoid this, a snapshot construction logic was designed. By obtaining the current order status and data lock identifier of the original payment order, a snapshot of the original payment order is constructed, isolating the calculation logic for adding recommendations from the main process of the original payment order.
[0024] In some embodiments, in response to an AI-driven queue-jumping recommendation event, the current order status and data lock identifier of the original payment order are obtained, and snapshot data of the original payment order is constructed based on the current order status and data lock identifier, including: Step S11: In response to the triggering of the AI queue-jumping recommendation event, obtain the current order status of the original payment order and the corresponding order identifier of the original payment order; In some embodiments, when a user stays on the payment confirmation page on the terminal interface for a period of time exceeding a preset browsing time, an AI-assisted recommendation event is triggered. At this time, the current order status of the original payment order and the order identifier of the original payment order are extracted from the order database.
[0025] The current order status includes enumerations such as pending payment, in payment, and paid, and the order identifier is a unique numerical number.
[0026] For example, if a user enters the payment page after purchasing a smartphone, the AI system recognizes that the user may need a phone case, triggering an AI-assisted recommendation event. At this time, the system reads the current order status from the database as "paying" and the order identifier is ORD202310240001.
[0027] Specifically, the current order status and order identifier are written into a temporary cache in memory for quick retrieval in subsequent steps.
[0028] Understandably, by accurately obtaining the current order status and order identifier, a basic data source is provided for the subsequent construction of snapshot data, avoiding the problem of being unable to read key information when the original payment order data is locked.
[0029] In one implementation, the current order status of the original payment order can be obtained by listening to the state change event of the order state machine. For example, when the order state machine transitions, the latest state value is pushed to the message queue and obtained by consuming the message queue. In another implementation, the current order status of the original payment order can also be obtained by actively polling the order status table. The status field can be retrieved based on the order identifier. For example, a query instruction can be sent to the order status table every 500 milliseconds.
[0030] Step S12: Determine the current order status. If the current order status is in the payment calculation state, obtain the total amount of goods in the original payment order and the first value of the matched discount rules. This invention provides a data extraction method based on state judgment to solve the problem of data inconsistency that may occur when extracting data in a non-computational state.
[0031] It should be noted that if the current order status is not checked and the total amount of goods and the matched discount rules are directly extracted, dirty data may be read when the order has been paid or cancelled.
[0032] It is important to understand that only orders in the payment calculation stage have an active and variable total amount and matched discount rules, making them suitable for snapshot construction.
[0033] According to an embodiment of the present invention, the current order status is determined. When the current order status is in the payment calculation state, the total amount of goods in the original payment order and the first value of the matched discount rules are obtained. The payment calculation state indicates that the order is in the stage of amount calculation but payment has not been completed. The total amount of goods is the sum of the products of the individual prices of all goods in the original payment order and the corresponding quantities of goods. The first value of the matched discount rules is the cumulative result of the currently effective full reduction amount, discount amount, or coupon amount.
[0034] When the current order status is confirmed as payment calculation status, the total amount of the goods and the first value of the matched discount rules are retrieved from the memory context of the order calculation engine to ensure that the retrieved data reflects the latest calculation intermediate state.
[0035] Step S13: Combine the total amount of the goods with the first value of the matched discount rule and the corresponding order identifier, and determine the combined first value and order identifier as the snapshot data of the original payment order; This application provides a snapshot data construction method, which includes structurally decomposing and encapsulating the acquired parameters.
[0036] Furthermore, a combination operation is performed based on the total amount of the goods, the first value of the matched discount rules, and the corresponding order identifier.
[0037] Specifically, the combined operation includes mapping the total product amount, the first value matching the discount rule, and the order identifier to fields according to a preset data structure template. A snapshot object with three fields is created: the total product amount is written to the amount field of the snapshot object; the first value matching the discount rule is written to the discount value field of the snapshot object; and the order identifier is written to the identifier field of the snapshot object.
[0038] In other words, to ensure data integrity during the combination operation, the total product amount and the first value matching the discount rule are validated for data type before writing, ensuring that both are numeric data. The snapshot object formed by the combined first value and the order identifier is serialized into a binary byte stream. This binary byte stream is identified as the snapshot data of the original payment order and stored in a separate snapshot storage space, physically isolated from the persistent storage space of the original payment order. Through the above decomposition and combination, the independence and immutability of the snapshot data are ensured, providing a static data benchmark for subsequent incremental calculations. Here, the first value represents the total discount deduction amount determined at the moment the AI-assisted recommendation event is triggered in the original payment order; it is a scalar value with definite physical meaning.
[0039] In some embodiments, before performing the combination operation based on the total amount of goods and the first value of the matched discount rule and the corresponding order identifier, the method further includes: Step S131: Obtain the first timestamp of the original payment order and the second timestamp of the AI queue-jumping recommendation event, and determine the time extraction result based on the first timestamp of the original payment order and the second timestamp of the AI queue-jumping recommendation event; It should be noted that the first timestamp comes from the time of the last amount calculation update of the original payment order, and the second timestamp comes from the time when the AI queue-jumping recommendation event is generated and pushed to the event bus.
[0040] In detail, the extracted time results contain two 64-bit long integer values, corresponding to the millisecond-level Unix timestamps of the first and second timestamps, respectively. These extracted timestamps serve as the source data for subsequent timeliness assessments, ensuring the accuracy of time calculations. Both the first and second timestamps are obtained from the system's unified time synchronization server, eliminating clock offset errors between different servers.
[0041] Step S132: Calculate the time difference based on the first timestamp of the original payment order and the second timestamp of the AI queue-jumping recommendation event, and use the time difference as the basis for judging the timeliness of the queue-jumping recommendation event; The time difference is the difference between the second timestamp and the first timestamp, calculated by subtracting the first timestamp from the second timestamp. The timeliness criterion is a quantitative indicator used to measure the delay between the AI-assisted recommendation event and the final calculation time of the original payment order.
[0042] It should be noted that the smaller the time difference, the closer the AI-assisted recommendation event is to the user's current payment intention; the larger the time difference, the more delayed the AI-assisted recommendation event, and the better the opportunity for recommendation may have been missed. The time difference ranges from 0 to positive infinity. Negative values indicate abnormal time synchronization and should be removed as outlier data.
[0043] In this application, the time difference can be calculated as follows: ; in, It represents the time difference, and its value ranges from 0 to positive infinity. The second timestamp representing the AI-driven lane-jumping recommendation event, with a value range of positive real numbers; Represents the first timestamp of the original payment order, with a value range of positive real numbers.
[0044] Step S133: Compare the time difference with the preset time threshold. When the time difference is greater than the preset time threshold, send a signal to the AI server indicating failure of the insertion recommendation and terminate the generation operation of the insertion branch transaction. It should be noted that the preset time threshold is the critical time limit for distinguishing whether a recommendation event has real-time commercial value. In this invention, the preset time threshold is obtained by statistically analyzing the distribution range of time differences in historical successful queue-jumping recommendation order data and taking the value corresponding to the 95th percentile. The comparison operation uses numerical comparison logic. If the time difference is greater than the preset time threshold, a Boolean failure flag is generated and set to true. When the failure flag is true, the system immediately calls the message interface of the AI server to encapsulate the queue-jumping recommendation failure signal into a specific message body and send it out. This message body contains the order identifier of the original payment order and the failure reason code.
[0045] Simultaneously, within the local computing engine, the currently running thread generating the branch transaction is forcibly interrupted, releasing the CPU time slice and memory space occupied by the thread and preventing subsequent calculations of incremental price changes. Through this mechanism, the system can truncate expired recommendation requests at the source, avoiding meaningless discount calculations and data merging waits in the payment chain.
[0046] Step S2: Based on the snapshot data and the product attributes and discount rules of the recommended products, generate a branch transaction for adding products, and calculate the incremental price change value of the recommended products for adding products to the original payment order based on the branch transaction. Understandably, after obtaining the snapshot data of the original payment order, it is necessary to independently calculate the price impact of adding recommended products based on the snapshot data and generate a branch transaction to avoid lock conflicts caused by directly operating on the original order data, thereby accurately calculating the incremental price change value.
[0047] In some embodiments, based on snapshot data and the product attributes and discount rules of the recommended product, a branch transaction for adding a product is generated. The incremental price change value of the recommended product on the original payment order is calculated based on the branch transaction, including: Step S21: Based on the matched discount rules and the discount rules for the recommended products in the snapshot data, obtain the mutual exclusion relationship between the matched discount rules and the discount rules for the recommended products. It should be noted that the mutual exclusion relationship in this invention is not a simple conflict in everyday semantics, but specifically refers to the mathematical logic constraint in e-commerce discount calculation logic that two discount rules cannot enjoy the maximum discount at the same order dimension due to the underlying constraints of their applicable conditions or calculation methods.
[0048] It should be noted that mutual exclusion relationships include two logical states: complete mutual exclusion and partial mutual exclusion. Complete mutual exclusion means that the two rules have a direct mutual exclusion mapping in the mutual exclusion configuration table of the rule engine. Partial mutual exclusion means that the two rules will have a cumulative effect within a specific amount range, decreasing to zero. The process of obtaining mutual exclusion relationships is actually querying the preset rule mutual exclusion graph data structure. In this graph structure, nodes represent discount rules, and edges represent mutual exclusion weights.
[0049] It is easy to understand that by querying the graph structure, we can determine whether there are edges connecting the nodes corresponding to the matched discount rules and the nodes corresponding to the discount rules for the added recommended products, as well as the weight values of the edges, thereby accurately obtaining the mutual exclusion relationship.
[0050] Step S22: Determine the mutual exclusion relationship. When the mutual exclusion relationship exists, calculate the non-overlapping individual discount value of the recommended product based on the total amount of the product in the snapshot data and the product attributes of the recommended product. Furthermore, based on the mutual exclusion relationship between the matched discount rules in the snapshot data and the discount rules of the recommended products, the mutual exclusion relationship is judged. When the mutual exclusion relationship exists, the non-overlapping individual discount value of the recommended products is calculated based on the total amount of the products in the snapshot data and the product attributes of the recommended products.
[0051] According to an embodiment of the present invention, the input of this step strictly depends on the determination result of the mutual exclusion relationship and the snapshot data, and the output must promise to provide a separate, non-overlapping discount value independent of the original discount system.
[0052] It's easy to understand that when mutual exclusion exists, it means that the discount of the recommended product cannot be effective at the same time as the original matching discount rules. Therefore, the discount brought by the recommended product must be evaluated separately after removing the original matching discount rules.
[0053] Specifically, the unit price and quantity of the recommended product are extracted from its attributes, and a new virtual discount value containing only the discount of the recommended product is recalculated based on the total product amount. This value is the non-overlapping individual discount value. In this embodiment, the non-overlapping individual discount value is the core basis for measuring the value of the recommendation in mutually exclusive scenarios.
[0054] Step S23: Generate a branch transaction for adding a line based on the non-overlapping individual discount value of the line-adding recommended product, and determine the non-overlapping individual discount value of the line-adding recommended product as the incremental price change value generated by the line-adding recommended product on the original payment order; To achieve isolated calculation of price impact in the context of queue-jumping scenarios, this invention provides an incremental determination method based on branch transactions to solve the problem of price calculation interfering with the original order in mutually exclusive scenarios.
[0055] In detail, a branch transaction is a lightweight transaction object independent of the original payment order's main transaction. It includes a transaction identifier, a related order identifier, an incremental amount field, and a transaction status field. The process of generating a branch transaction includes initializing an empty transaction object, assigning a globally unique transaction identifier, writing the original payment order's order identifier into the related order identifier field, writing the negative value of the calculated non-overlay individual discount value into the incremental amount field, and initializing the transaction status field to a pending merge state. Since the non-overlay individual discount value represents the amount that can be reduced, its incremental price change value for the original payment order is essentially a negative value, i.e., a reduction in the total price. Writing this negative value into the incremental amount field completes the determination of the incremental price change value.
[0056] In some embodiments, after determining the mutual exclusion relationship, the method further includes: Step S221: When the mutual exclusion relationship is non-exclusive, calculate the initial deduction value of the recommended product based on the product attributes and discount rules of the recommended product. Correspondingly, the input consists of the product attributes and discount rules of the recommended products. The processing involves performing numerical calculations based on the deduction ratio or fixed deduction amount in the discount rules, combined with the unit price in the product attributes, and the output is the initial deduction value.
[0057] Specifically, if the discount rule is a percentage discount, the initial deduction is the product of the unit price in the product attributes and the discount percentage; if the discount rule is a fixed amount deduction, the initial deduction is the fixed deduction amount itself. The unit of the initial deduction is consistent with the unit price in the product attributes, both being yuan. Since there is no mutual exclusion, this initial deduction can be directly applied to the calculation of the total order amount.
[0058] Step S222: Based on the initial deduction value of the recommended products and the total amount of the products in the snapshot data, perform correlation processing, and generate a branch transaction based on the result of the correlation processing; In simple terms, correlation processing maps the initial deduction value to the value space of the total amount of the goods, assessing its proportion of influence on the total amount. Correlation processing logically binds the initial deduction value to the total amount of the goods.
[0059] According to an embodiment of this application, the result of the association processing includes an encapsulation of the influence ratio and the deduction value. A branching transaction object is created based on this encapsulation, the initial deduction value is written as the transaction payload, and the total amount of the goods is recorded as the calculation basis context for the transaction, thus completing the generation of the branching transaction.
[0060] Step S223: Perform a conversion operation on the initial deduction value of the recommended product for adding lines, and determine the initial deduction value of the recommended product for adding lines as the incremental price change value generated by the recommended product for adding lines to the original payment order; In practice, the essence of the conversion operation is to satisfy the symbolic convention constraints during incremental merging and eliminate logical uncertainty.
[0061] It should be noted that since the initial deduction value is usually represented as a positive number, and when calculating the impact on the total price, the deduction means a decrease in the total price, the initial deduction value must be converted to its opposite. The conversion operation specifically involves taking the negative value of the initial deduction value, i.e., subtracting the initial deduction value from 0. The converted value logically represents the decrease in the total price, and determining it as the incremental price change value aligns with the data expectations for the summation calculation in subsequent merge and replacement operations, ensuring the consistency and correctness of the merge logic. If the initial deduction value is 15 yuan, the incremental price change value after the conversion operation will be -15 yuan.
[0062] In some embodiments, after calculating the incremental price change of the recommended product on the original payment order based on the branch transaction, the method further includes: Step S241: In response to the user's signal to refuse to add the recommended product, obtain the current status identifier of the add branch transaction and the storage location of the corresponding incremental price change value. It should be noted that a branching transaction has a complete lifecycle. The lifecycle of a branching transaction is divided into the generation phase, the survival phase, and the termination phase. The generation phase represents when the transaction is created and written to memory; the survival phase represents when the transaction is waiting for user confirmation or merging; and the termination phase represents when the transaction has been merged or cleared.
[0063] When the rejection signal is triggered, the branch transaction is still alive. At this time, it is necessary to obtain the current status identifier of the branch transaction to confirm whether it is still operable, and at the same time obtain the storage location of the incremental price change value. This storage location is a specific address offset in memory or a cache key name.
[0064] Accordingly, based on this lifecycle division, the system can accurately locate and intervene in invalid transactions that are still in their lifecycle. The current status identifier and storage location are necessary prerequisites for performing the cleanup action.
[0065] Step S242: Verify the current status identifier of the branch transaction. When the current status identifier of the branch transaction is unmerged, clear the branch transaction and the corresponding incremental price change value. It should be noted that the macroscopic verification operation is equivalent to comparing the current state identifier with the unmerged state values in the preset state enumeration set bit by bit.
[0066] In detail, if the current state identifier is exactly the same as the unmerged state value, the verification passes, triggering a cleanup action. The cleanup action includes releasing the memory space occupied by the interrupted branch transaction object and deleting the corresponding key-value pair of the incremental price change value from the cache. This macro-micro equivalence verification mechanism ensures the absolute accuracy of state judgment and avoids data corruption caused by misjudgment of the state.
[0067] Step S243: Based on the clearing results of the branch transaction and the corresponding incremental price change value, keep the initial price of the original payment order unchanged and release the temporary computing resources occupied by the branch transaction; It should be noted that temporary computing resources include CPU time slices, memory caches, and network connection handles allocated to the branch transaction. The release process in this invention includes resetting the memory cache's occupancy flag to free, returning the CPU time slice to the thread pool scheduler, and closing the database read-only connection established for the branch transaction. Since the user refuses to join, adding recommended products will not affect the original payment order; therefore, the initial price of the original payment order remains unchanged and does not need to be recalculated. By releasing temporary computing resources in a timely manner, the system can allocate more resources to the main payment process currently being processed, thereby optimizing the overall resource utilization under high concurrency.
[0068] In one implementation, keeping the initial price of the original payment order unchanged can be achieved by locking the price field of the original payment order, for example, by adding a read-only lock to the price field when a rejection signal is triggered. In another implementation, keeping the initial price of the original payment order unchanged can also be achieved by skipping all write operations on the original payment order. For example, a condition check can be added to the price update process, and the update can be interrupted if a rejection signal is present.
[0069] Step S3: In response to the user's confirmation signal for adding the recommended product, acquire the data write lock of the original payment order, and merge and replace the incremental price change value with the initial price of the original payment order based on the data write lock to generate the final payment amount; It should be noted that after a user confirms the addition of a recommended product, the independently calculated incremental price change value must be merged with the original payment order, and an optimized lock acquisition strategy must be adopted to ensure the smoothness of the payment process and data consistency under high concurrency.
[0070] In some embodiments, in response to the user's confirmation signal to add the recommended product, a data write lock is acquired for the original payment order. Based on the data write lock, the incremental price change value is merged and replaced with the initial price of the original payment order to generate the final payment amount, including: Step S31: In response to the user's confirmation signal for adding the recommended product, the occupancy status of the data write lock of the original payment order is detected, and the current waiting time of the data write lock is obtained; Specifically, the occupancy status of data written to the lock is transformed into a quantifiable and comparable time metric.
[0071] In detail, the data write lock's occupancy status includes two states: occupied and idle. The current waiting time is the time span from the moment the lock acquisition request is initiated to the moment of detection. The current waiting time is obtained by recording the timestamp of the lock acquisition request and subtracting the timestamp from the current system timestamp.
[0072] The current waiting time serves as a unified reference benchmark, replacing the fuzzy judgment of lock tension and providing a precise numerical basis for subsequent branch processing. In this invention, the unit of the current waiting time is milliseconds, obtained through a high-precision timer.
[0073] Step S32: Based on the relationship between the current waiting time of the data write lock and the preset waiting threshold, when the current waiting time of the data write lock exceeds the preset waiting threshold, calculate the percentage of incremental price change based on the incremental price change value and the total amount of goods in the original payment order. Furthermore, the hierarchical depth covered by the overarching concept of the percentage of incremental price changes not only includes simple proportional values, but also recursively includes the sign attribute and absolute value of those proportional values.
[0074] The percentage of incremental price change is calculated as the ratio of the incremental price change to the total amount of the original order. Since the incremental price change may be negative, this percentage also includes a negative sign, indicating the proportion of the total price decrease. The percentage of incremental price change is a floating-point number, ranging from negative infinity to positive infinity.
[0075] When the current waiting time exceeds the preset waiting threshold, it indicates that the lock contention is intense. At this time, it is necessary to assess the urgency of incremental merging, and therefore calculate the percentage of incremental price change.
[0076] In this invention, the percentage of incremental price changes is calculated in real time by a calculation module, and the preset waiting threshold is determined by obtaining the safe critical value of system lock waiting through stress testing.
[0077] In this embodiment of the application, the percentage of incremental price change can be calculated as follows: ; in, It represents the percentage change in incremental prices, with a unit of 1 and a value range from negative infinity to positive infinity. It represents the incremental price change, and its value ranges to real numbers. This represents the total amount of goods in the original payment order, and its value range is a positive real number.
[0078] Step S33: Compare the incremental price change percentage with the preset percentage threshold. When the incremental price change percentage is less than the preset percentage threshold, write the incremental price change value into the asynchronous queue to be merged and release the data write lock request of the original payment order. The explicit extension of the percentage of incremental price changes includes three logical types: less than a preset percentage threshold, greater than or equal to the preset percentage threshold but less than or equal to the upper limit of the percentage threshold, and greater than the upper limit of the percentage threshold. Specifically, the preset percentage threshold is a real number with an absolute value less than 1. In this invention, the preset percentage threshold is obtained by analyzing the user sensitivity curve to price changes in historical order data.
[0079] When the percentage of incremental price changes falls below a preset threshold, it indicates a small price fluctuation and low user sensitivity, allowing for delayed merging. The asynchronous merging queue is a first-in, first-out message queue. Incremental price changes are serialized and written to the end of the queue. For example, if the incremental price change is -5 yuan, the total product amount is 1000 yuan, and the percentage is 0.5%, which is less than the preset threshold of 2%, then -5 yuan is written to the queue. Simultaneously, the data write lock is proactively released to avoid blocking other high-priority payment processes.
[0080] In some embodiments, after considering the relationship between the current waiting time of the data write lock and a preset waiting threshold, the method further includes: Step S321: When the current waiting time of the data write lock does not exceed the preset waiting threshold, obtain the data write lock of the original payment order and the lock status of the initial price of the original payment order; In this embodiment, based on the relationship between the current waiting time of the data write lock and the preset waiting threshold, when the current waiting time of the data write lock does not exceed the preset waiting threshold, the data write lock of the original payment order and the locking status of the initial price of the original payment order are obtained.
[0081] Accordingly, before executing this step, the system is in a state of waiting for the lock with a controllable waiting time. After execution, the system successfully acquires control of the lock and the price data. Acquiring the write lock for the original payment order means that the current thread has exclusive write access to the order data, and acquiring the initial price lock status means that it has been confirmed that the price data in memory has not been modified by other transactions.
[0082] Specifically, the initial price's locking status includes both unlocked and locked. If locked, it must spin and wait until unlocked. The data write lock is acquired by calling the operating system's mutex lock acquisition interface, and the locking status is confirmed by reading the version number of the price field. When the waiting time is 50 milliseconds, which does not exceed the preset waiting threshold of 100 milliseconds, the system calls Lock to acquire the data write lock and reads the initial price version number as V1, confirming that it is not locked.
[0083] Step S322: Based on the data write lock of the original payment order, merge the incremental price change value with the initial price of the original payment order to generate the initial merged amount; It is important to understand that the key variables that play a decisive role in this step are the incremental price change and the initial price of the original payment order. The way these two variables change with the conditions directly reveals the internal mechanism of the merger step.
[0084] Specifically, the incremental price change is statically deterministic, remaining unchanged once the branch transaction is completed; while the initial price of the original payment order is dynamically variable, potentially modified by other concurrent payment processes before acquiring the data write lock. The essence of the merge process is to superimpose the static increment onto the dynamic baseline, forming a new static baseline.
[0085] In this invention, under the protection of a data write lock, the current value of the initial price of the original payment order is first read from the database persistence layer, and denoted as... Next, the incremental price change value is extracted from the context of the branch transaction, denoted as... Then and The data is fed into the arithmetic logic unit to perform an addition operation, yielding the initial combined amount. Among them, the incremental price change value Negative numbers represent deductions, and positive numbers represent increases. Throughout the entire operation, the data write lock must be held to prevent intermediate states from being entered into. It was overwritten by another thread.
[0086] In this application, the initial consolidated amount can be calculated as follows: ; in, This represents the initial merged amount, and its value ranges to positive real numbers. Represents the initial price of the original payment order, and its value ranges from positive real numbers; It represents the incremental price change and takes the value of a real number.
[0087] In a preferred implementation, even if the current waiting time does not exceed the preset waiting threshold in extremely high-concurrency scenarios, the initial price of the original payment order may be modified by the upstream discount rollback process at the moment the data write lock is acquired, resulting in a slight time window deviation between the newly read initial price and the actual latest price. Therefore, the following operation logic needs to be configured: Once the data write lock is acquired, if the version number of the initial price is found to be consistent with the version number during pre-reading, and the absolute value of the incremental price change is less than the preset tolerance, then the addition merging is directly performed to generate the initial merged amount; if the version number of the initial price is found to be inconsistent with the version number during pre-reading, and the absolute value of the incremental price change is greater than or equal to the preset tolerance, and the difference between the reread initial price and the pre-read price is within the tolerance range, then the merging is performed based on the reread initial price; if the sign of the incremental price change is opposite to the expected deduction direction, then the merging is terminated and an abnormal rollback transaction is thrown.
[0088] Step S323: Replace the initial price of the original payment order with the initial merged amount, determine the replaced initial merged amount as the final payment amount, and output it to the payment gateway; Specifically, the replacement operation first overwrites the initial price cache in memory, then updates the initial price persistence record in the database, and finally assembles and outputs the payment request containing the final payment amount.
[0089] In other words, the memory cache is overwritten using a write-through strategy to ensure consistency between the cache and the database; database updates use UPDATE statements, with the initial merged amount as the new value and the order identifier as a condition; output to the payment gateway is achieved by calling the gateway's SDK interface. The replacement operation is not a simple assignment, but a complex process involving a series of state synchronization and data flow actions. The final payment amount is the final output of the entire queue-jumping recommendation process, and its physical meaning is the total amount of the order that the user actually needs to pay.
[0090] In some embodiments, after writing the incremental price change value to the asynchronous queue to be merged and releasing the request to hold the data write lock on the original payment order, the method further includes: Step S331: In response to the triggering of the incremental price change value in the asynchronous queue to be merged meeting the preset merging conditions, acquire the data write lock of the original payment order and the initial price of the original payment order; It is important to understand that, in order to eliminate the uncertainty of asynchronous processing under high concurrency, preset merging conditions are designed. The preset merging conditions include one of the following three conditions: the queue length reaches the batch processing limit, the waiting time from the head element of the queue exceeds the maximum tolerance time, or the current system load is lower than the off-peak threshold.
[0091] In one implementation, merging is triggered when any one of the conditions is met. The data write lock acquisition also employs a spin-backoff strategy to prevent immediate acquisition failures that could lead to exceptions. By constraining the preset merging conditions, the system can still perform merging at the appropriate time even under uncontrollable concurrent request interference, ensuring the consistency of the final data.
[0092] Step S332: Based on the data write lock of the original payment order, sum the incremental price change value and the initial price of the original payment order to generate a merged price value; In this embodiment of the application, after acquiring the data write lock of the original payment order, the incremental price change value is summed with the initial price of the original payment order based on the acquired data write lock of the original payment order to generate a merged price value.
[0093] Furthermore, following strict timing and causal relationships, the initial price of the original payment order is first loaded from persistent storage into the CPU register, then the incremental price change value is loaded from the cache into another register, and finally the addition operation of the arithmetic logic unit is performed.
[0094] In detail, the core sequence of actions in the summation process must follow the order of read, calculate, and write back to ensure data flow consistency. The merged price value is essentially the sum of the incremental price change and the initial price of the original payment order. This sequence of actions guarantees that, under the protection of the exclusive lock, the merge calculation will not be interfered with by other concurrent requests.
[0095] Step S333: Overwrite the initial price of the original payment order based on the merged price value to generate the final payment amount, and at the same time release the data write lock of the original payment order. In this invention, the backend automatically encapsulates and hides the complex internal processes of lock acquisition, calculation, write-back, and lock release, exposing only the final payment amount to the frontend. Accordingly, the overwrite operation specifically includes writing the merged price value into the amount field of the original payment order, overwriting the original initial price, and updating the order's modification timestamp.
[0096] It's important to note that after generating the final payment amount, it is encapsulated as a payment context object and passed to the unified entry point of the payment gateway. Releasing the data write lock of the original payment order is the final step in the entire merging process. By calling the `Unlock` method, the lock's state is reset to idle, waking up other threads in the waiting queue. Through this encapsulation mechanism, front-end users only perceive the amount update and do not need to worry about the details of concurrency conflict resolution in the backend, greatly simplifying the front-end operation logic and improving the user experience.
[0097] Figure 2 In an AI-based intelligent planning and execution method for e-commerce marketing campaigns, a multi-layered judgment and branching logic is designed to resolve deadlocks in the high-concurrency payment chain. First, the system responds to queue recommendation events and verifies the order status and time difference to ensure the timeliness of the computing environment. Then, by constructing snapshot data, queue calculations are isolated from the main process, and different incremental calculation paths are selected based on mutual exclusion judgment results. After obtaining user confirmation, the system does not directly compete for the data lock, but introduces a dual verification of lock waiting time and incremental percentage. Low-percentage changes are asynchronous, and synchronous merging and replacement are only performed for high urgency or low waiting time. This completely avoids payment chain blockage caused by forced recalculation while ensuring data consistency.
[0098] Figure 3This paper maps the macro-lifecycle and state evolution of the order ecosystem in an AI-driven recommendation scenario. When an AI event triggers a payment order, a snapshot static baseline is extracted to isolate the main process. The order then enters an evaluation process involving rule-based mutual exclusion and superposition, resulting in the lifecycle of the recommendation branch transaction. This lifecycle faces two fates: if the user rejects the order, it enters a termination phase, releasing temporary computing resources; if the user confirms, it enters a data write lock contention state. Within this lock contention ecosystem, an asynchronous queue for merging buffers high concurrency pressure. Ultimately, incremental price changes are merged to update the original order, achieving the final payment amount. This fundamentally eliminates deadlocks in the payment chain and maintains the stability of the system ecosystem.
[0099] Figure 4 This describes the complete data flow path for incremental price change values, from the convergence of multi-source data to the final merged and persistent storage. The total amount of the original order and the matched discount values are first encapsulated as snapshot data, which, along with recommended product attributes and discount rules, flows into a mutual exclusion mapping graph. Based on mutual exclusion criteria, the data flows to the calculation node for non-overlapping individual discount values or initial deduction values, and then is uniformly merged into the incremental price change value conversion stage. Under the control of the data write lock occupancy state, the converted change values and the original order's initial price are diverted to the initial merged amount or the asynchronous merge queue based on the waiting time threshold. Finally, through the processing of the merged price values, the final payment amount is persistently stored on disk.
[0100] Example 2: This example also provides an AI-based intelligent planning and execution system for e-commerce marketing activities, including: a snapshot construction module, configured to respond to an AI-assisted recommendation event, obtain the current order status and data lock identifier of the original payment order, and construct snapshot data of the original payment order based on the current order status and data lock identifier; The incremental calculation module is configured to generate a branch transaction based on snapshot data and the product attributes and discount rules of the recommended products, and calculate the incremental price change value of the recommended products on the original payment order based on the branch transaction. The merge and replace module is configured to respond to the user's confirmation signal for adding the recommended product, acquire the data write lock of the original payment order, and merge and replace the incremental price change value with the initial price of the original payment order based on the data write lock to generate the final payment amount.
[0101] The above-mentioned unit modules can be embedded in the processor of the electronic device in hardware form or independent of it, or they can be stored in the memory of the electronic device in software form, so that the processor can call and execute the corresponding operations of the above modules.
[0102] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0103] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. An AI-based intelligent planning and execution method for e-commerce marketing campaigns, characterized in that, include: In response to AI-driven queue-jumping recommendations, the system obtains the current order status and data lock identifier of the original payment order, and constructs a snapshot of the original payment order based on the current order status and data lock identifier. Based on the snapshot data and the product attributes and discount rules of the recommended products, a branch transaction for adding products is generated, and the incremental price change value of the recommended products for adding products to the original payment order is calculated based on the branch transaction for adding products. In response to the user's confirmation signal to add the recommended product, the system acquires the data write lock of the original payment order. Based on the data write lock, the incremental price change value is merged and replaced with the initial price of the original payment order to generate the final payment amount.
2. The AI-based intelligent planning and execution method for e-commerce marketing activities as described in claim 1, characterized in that: In response to the AI-driven queue-jumping recommendation event, the current order status and data lock identifier of the original payment order are obtained. Based on the current order status and data lock identifier, a snapshot of the original payment order is constructed, including: In response to the AI-driven queue-jumping recommendation event, obtain the current order status of the original payment order and the corresponding order identifier of the original payment order; Determine the current order status. If the current order status is in the payment calculation state, obtain the total amount of goods in the original payment order and the first value of the matched discount rules. The total amount of the goods is combined with the first value of the matched discount rules and the corresponding order identifier. The combined first value and the order identifier are then used as the snapshot data of the original payment order.
3. The AI-based intelligent planning and execution method for e-commerce marketing activities as described in claim 2, characterized in that: Based on snapshot data and the product attributes and discount rules of the recommended products, a branch transaction for adding products is generated. The incremental price change value of the recommended products on the original payment order is calculated based on this branch transaction, including: Based on the matched discount rules and the discount rules for the recommended products in the snapshot data, obtain the mutual exclusion relationship between the matched discount rules and the discount rules for the recommended products. The mutual exclusion relationship is determined. When the mutual exclusion relationship exists, the non-overlapping individual discount value of the recommended product is calculated based on the total amount of the products in the snapshot data and the product attributes of the recommended product. A branch transaction for adding a product is generated based on the non-overlayed individual discount value of the product added, and the non-overlayed individual discount value of the product added is determined as the incremental price change value generated by the product added to the original payment order.
4. The AI-based intelligent planning and execution method for e-commerce marketing activities as described in claim 3, characterized in that: After determining the mutual exclusion relationship, the following steps are also included: When the mutual exclusion relationship is non-exclusive, the initial deduction value of the recommended product is calculated based on the product attributes and discount rules of the recommended product. The initial deduction value of the recommended product is correlated with the total amount of the product in the snapshot data, and a branch transaction is generated based on the result of the correlation process. The initial deduction value of the recommended product is converted to the incremental price change value of the recommended product on the original payment order.
5. The AI-based intelligent planning and execution method for e-commerce marketing activities as described in claim 4, characterized in that: In response to the user's confirmation signal to add the recommended product, a data write lock is acquired for the original payment order. Based on the data write lock, the incremental price change value is merged and replaced with the initial price of the original payment order to generate the final payment amount, including: In response to the user's confirmation signal for adding the recommended products, the occupancy status of the data write lock of the original payment order is detected, and the current waiting time of the data write lock is obtained; Based on the relationship between the current waiting time of the data write lock and the preset waiting threshold, when the current waiting time of the data write lock exceeds the preset waiting threshold, the percentage of incremental price change is calculated based on the incremental price change value and the total amount of the goods in the original payment order. The incremental price change percentage is compared with a preset percentage threshold. When the incremental price change percentage is less than the preset percentage threshold, the incremental price change value is written to the asynchronous queue to be merged, and the request to occupy the data write lock of the original payment order is released.
6. The AI-based intelligent planning and execution method for e-commerce marketing activities as described in claim 5, characterized in that: After writing the incremental price change value to the asynchronous queue to be merged and releasing the data write lock request for the original payment order, the process also includes: In response to the triggering of the incremental price change value in the asynchronous queue to be merged meeting the preset merging conditions, the data write lock of the original payment order and the initial price of the original payment order are acquired. Based on the data write lock of the original payment order, the incremental price change value is summed with the initial price of the original payment order to generate a combined price value; The initial price of the original payment order is overwritten based on the merged price value to generate the final payment amount, while the data write lock of the original payment order is released.
7. The AI-based intelligent planning and execution method for e-commerce marketing activities as described in claim 2, characterized in that: Before combining the total product amount with the first value of the matched discount rules and the corresponding order identifier, the following steps are also included: Obtain the first timestamp of the original payment order and the second timestamp of the AI queue-jumping recommendation event, and determine the time extraction result based on the first timestamp of the original payment order and the second timestamp of the AI queue-jumping recommendation event; The time difference is calculated based on the first timestamp of the original payment order and the second timestamp of the AI-assisted queue recommendation event, and the time difference is used as the basis for judging the timeliness of the queue recommendation event. The time difference is compared with a preset time threshold. When the time difference is greater than the preset time threshold, a signal indicating failure of the insertion recommendation is sent to the AI server and the generation of the insertion branch transaction is terminated.
8. The AI-based intelligent planning and execution method for e-commerce marketing activities as described in claim 1, characterized in that: After calculating the incremental price change of the recommended product on the original payment order based on the branch transaction, it also includes: In response to the user's signal to refuse to join the recommended product, obtain the current status identifier of the joining branch transaction and the storage location of the corresponding incremental price change value; The current status identifier of the branch transaction is verified. If the current status identifier of the branch transaction is "unmerged", the branch transaction and its corresponding incremental price change value are cleared. Based on the clearing results of the branch transaction and the corresponding incremental price change value, the initial price of the original payment order remains unchanged, and the temporary computing resources occupied by the branch transaction are released.
9. The AI-based intelligent planning and execution method for e-commerce marketing activities as described in claim 5, characterized in that: Based on the relationship between the current wait time of the data write lock and the preset wait threshold, the following is also included: When the current waiting time of the data write lock does not exceed the preset waiting threshold, acquire the data write lock of the original payment order and the lock status of the initial price of the original payment order; Based on the data write lock of the original payment order, the incremental price change value is merged with the initial price of the original payment order to generate the initial merged amount; The initial price of the original payment order is replaced based on the initial merged amount, and the replaced initial merged amount is determined as the final payment amount and output to the payment gateway.
10. An AI-based intelligent planning and execution system for e-commerce marketing activities, employing the AI-based intelligent planning and execution method for e-commerce marketing activities as described in any one of claims 1 to 9, characterized in that, include: The snapshot building module is configured to respond to AI queue-jumping recommendation events, obtain the current order status and data lock identifier of the original payment order, and build snapshot data of the original payment order based on the current order status and data lock identifier; The incremental calculation module is configured to generate a branch transaction based on snapshot data and the product attributes and discount rules of the recommended products, and calculate the incremental price change value of the recommended products on the original payment order based on the branch transaction. The merge and replace module is configured to respond to the user's confirmation signal for adding the recommended product, acquire the data write lock of the original payment order, and merge and replace the incremental price change value with the initial price of the original payment order based on the data write lock to generate the final payment amount.