An event-driven demand revision method for promotion and emergency
Patent Information
- Application Number
- CN202610972475.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-01
- Publication Date
- 2026-10-16
- Estimated Expiration
- 2046-07-01
AI Technical Summary
但大部分方案停留在“把事件作为外生变量、影响因素或修正系数输入模型”的层面,导致方案容易写得较宽,技术落地时又缺乏统一的事件处理链路
1、事件影响可独立建模,解释性更强:
Smart Images

Figure CN122550223B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of demand forecasting and forecast correction technology, and in particular to an event-driven demand correction method for promotions and unexpected events. Background Technology
[0002] In existing demand forecasting solutions, it is common practice in the industry to incorporate weather, holidays, promotions, or other external events as influencing factors in forecasting. However, most solutions remain at the level of "inputting events as exogenous variables, influencing factors, or correction coefficients into the model," which leads to overly broad solutions and a lack of a unified event handling process when implementing the technology.
[0003] First, existing solutions typically lack independent event object abstractions. Events often exist as a single label or a single feature column, failing to simultaneously express event type, target, trigger time, warm-up time, main impact range, decay interval, and rollback conditions. Therefore, an interpretable and traceable correction chain cannot be formed.
[0004] Second, different events often share the same correction rule. For example, price reductions and promotions, typhoon warnings, social media buzz, advertising campaigns, and supply anomalies all affect demand in different directions, at different times, and in different ways. However, many existing solutions only use uniform addition and subtraction coefficients or uniform input characteristics, which cannot reflect the differences between various events.
[0005] Third, when multiple events occur on the same object within the same time period, existing solutions typically employ simple superposition, simple weighting, or manual overriding, lacking a mechanism for conflict handling based on priority, confidence level, and historical similarity. This can easily lead to excessively high or low correction values, or abnormal fluctuations.
[0006] Fourth, the lack of automatic decay and rollback mechanisms after the event often results in forecast values remaining at high or low levels for a long time after the event ends, which in turn affects inventory preparation, stock levels, and subsequent marketing assessments.
[0007] Fifth, although many solutions use historical promotions, holidays, or weather factors, they do not write the "event correction effect" back to the template library. When a similar event occurs again, the old parameters are reused, making it difficult to form a self-learning closed loop for event templates.
[0008] To address the problems in existing technologies that treat events such as promotions, weather, holidays, public opinion, and supply anomalies as external influencing factors when inputting them into prediction models, resulting in difficulties in quantifying the impact of events, lack of differentiated treatment for different types of events, easy conflicts when multiple events overlap, difficulty in timely rollback of prediction results after the event ends, and lack of automatic optimization capabilities based on actual feedback, there is an urgent need for an event-driven demand correction method for promotions and emergencies. Summary of the Invention
[0009] In view of this, the purpose of this invention is to propose an event-driven demand correction method for promotions and emergencies. Based on the baseline forecast results, an independent event-driven correction chain is constructed. Events such as promotional activities, price changes, advertising, weather changes, holiday fluctuations, public opinion fluctuations, and supply anomalies are standardized and coded. Combined with event impact templates, multi-event conflict handling, decay rollback control, and template self-learning update mechanism, the method achieves structured, dynamic, and interpretable correction of demand forecast results.
[0010] To achieve the above-mentioned technical objectives, the technical solution adopted by this invention is as follows: This invention provides an event-driven demand modification method for promotions and unexpected events, comprising the following steps: Step 1: Obtain the baseline demand values for the target object over multiple forecast periods in the future; Step 2: Collect multi-source event data and perform cleaning and time alignment processing on the event data; Step 3: Convert the processed event data into standardized event objects, generate correction tasks based on the standardized event objects, and determine the objects that need to be recalculated; Step 4: For objects that need to be recalculated, calculate the template value of each event in each prediction period, select the corresponding template value according to the periodic integrity of the event, and calculate the relative impact of a single event. Step 5: When there are multiple events within the same prediction period, calculate the composite weight based on the priority, confidence and historical similarity of each event, and generate a comprehensive event correction coefficient based on the composite weight and the relative influence of a single event. Step 6: Calculate the event increment value based on the baseline demand value and the comprehensive event correction coefficient, and add the baseline demand value and the event increment value to obtain the corrected demand value; Step 7: After the event ends, perform the corresponding decay and rollback control according to the current stage of the event; Step 8: After obtaining the actual sales volume, calculate the deviation rate between the actual sales volume and the corrected demand value. When the deviation rate exceeds the preset deviation rate threshold, update the template parameters in the corresponding event template.
[0011] Furthermore, step 1 specifically includes: Step 11: Set the forecast period by day, week, or hour; Step 12: Collect baseline prediction data for the target object over multiple future prediction periods from time series prediction models, machine learning prediction models, deep learning prediction models, or prediction results after manual review by business personnel. Step 13: Standardize the collected baseline prediction data according to the target object and prediction period, and define the standardized prediction values as baseline demand values to form a demand sequence to be corrected; the baseline demand values The formula is:
[0012] in, Number the prediction period. For the first Baseline demand for each forecast period. The predicted values output by the basic prediction engine.
[0013] Furthermore, step 2 specifically includes: Step 21: Collect multi-source event data from different sources, and clean the collected event data to obtain cleaned event data; specifically including: Step 211: Collect event data from multiple business systems and external data sources. The event data includes at least one of the following: price event data, promotion event data, advertising event data, weather event data, public opinion event data, holiday event data, and supply anomaly event data. Step 212: Perform deduplication, missing field validation, abnormal time correction, event status standardization, and invalid record removal on the collected event data, and retain the cleaned event data; Step 22: Perform time alignment processing on the cleaned event data, specifically including: Step 221: Using the natural week as the unified calculation granularity, for the first... Each prediction period defines the start point of the period. and the end of the cycle Then the first Total duration of each prediction period Recorded as: ; Step 222, for the first Baseline demand for each forecast period Generate a unified periodic label The details are as follows: (2) Through the periodic label conversion function () will the first The trigger time of each event Start time and end time Mapped to the corresponding trigger cycles respectively Start-up cycle and end cycle The formula is:
[0014]
[0015]
[0016] in, For event indexing; It is the triggering cycle of the j-th event. For the first j The start period of an event. This is the end period for the j-th event; the trigger period, start period, and end period are all period identifiers obtained based on a unified calculation granularity. (2) The triggering period Start-up cycle and end cycle Constituting a unified periodic label ; Step 223: For events with non-integer periods, calculate the coverage ratio of the event in each prediction period and calculate the effective template value; specifically as follows: (1) Let the first The effective impact range of the event is [ , ), then the first The event in the 1st Coverage duration within each prediction period for:
[0017] (2) Calculate the first The event in the 1st Coverage ratio within a forecast period for:
[0018] (3) Calculate the coverage ratio based on the coverage ratio. The event in the 1st Valid template values within a prediction period The formula is:
[0019] in, This is the event template value; Step 224: For events spanning multiple prediction periods, split the event into multiple event-period records according to the period boundaries. Each split event-period record should include at least the event number, event type, target, trigger time, start time, end time, unified period label, stage identifier, coverage ratio, event direction, original intensity, data source, and event status; One event Represented as:
[0020] in, Indicates the first The event in the 1st The first event-cycle record in the prediction period, Indicates the first The event in the 1st The second event-cycle record in the prediction cycle, Indicates the first The event in the 1st The first prediction period Event - Periodic Record; Step 225: Determine the stage of the event based on its trigger time, start time, and end time. The period in which the trigger time occurs is the trigger period; The period covered by the start time to the end time is the main influencing period; The period in which the end time falls is the end period; The period following the end of the cycle is the rollback cycle; Step 226: Convert event data at different time granularities into multiple event-period records at the event-period level, forming the following fields: (event_id, event_type, object_id, trigger_time, start_time, end_time, , , , , , data_source, ) Where event_id is the event number, event_type is the event type, object_id is the target object, trigger_time is the trigger time, start_time is the start time, and end_time is the end time. To standardize periodic labels, As a stage identifier, For coverage ratio, For the direction of the event, The original strength is represented by `data_source`, which represents the data source. This is the event status; Step 227: Associate event-cycle records of the same event in different prediction cycles into a record group based on the event number; search for the corresponding event template in the event template library based on the event type, and search for the corresponding target object in the sequence of requirements to be corrected based on the target object; associate the event template, target object, and unified cycle label, stage identifier, coverage ratio, event direction, original intensity, data source and event status with the record group; Step 228: Read the unified cycle label in the record group according to the event number, set the stage identifier of the event-cycle record corresponding to the main influence cycle as the main influence stage, associate the end cycle with the record group and use it as the end position of the main influence stage and the start position of the rollback stage, and set the stage identifier of the event-cycle record corresponding to the rollback cycle as the rollback stage.
[0021] Furthermore, step 3 specifically includes: Step 31: Convert each event-cycle record into a standardized event object with a unified structure. The standardized event object includes at least the following parameters: The triggering cycle of an event , No. Pre-event warm-up time , No. Duration of the main impact of an event , No. Rewind time for each event , No. The basic impact of the event , No. Attenuation coefficient of an event , No. Event direction of an event , No. Confidence of an event , No. Priority of events and the Historical similarity of events ; Step 32: Configure corresponding event templates according to different event types. The event types include: price events, promotion events, advertising events, weather events, public opinion events, holiday events, and supply anomalies. The event templates include: price event templates, promotion event templates, advertising event templates, weather event templates, public opinion event templates, holiday event templates, and supply anomaly templates. Step 33: Generate template parameters for each type of event template using any of the following methods: (1) Default parameters are preset by business rules; (2) The mean parameter is obtained from the historical event sample database; (3) Recommended parameters are obtained by backtracking from similar historical events; (4) Correction parameters are entered manually through the configuration interface; Step 34: For any event Based on event status and triggering cycle Preheating time Duration of main impact Rollback duration and confidence level To determine whether the event should enter the correction path, the specific rules are as follows: (1) If the event has been collected but has not yet entered the active event range, or the confidence level of the event is low. If the confidence level is lower than the preset confidence threshold, the event is in a pending confirmation or pending activation state and will not be included in the active event set. (2) If the current forecast period satisfy: If the event is in the warm-up phase, it enters the active event set and the event template value of the warm-up phase is calculated. (3) If the current forecast period satisfy: If the event is in the main impact phase, it enters the active event set, and the event template value for the main impact phase is calculated. (4) If the current forecast period satisfy: If the event is in the rollback phase, it enters the active event set and the event template value for the rollback phase is calculated. (5) If the current forecast period satisfy: If the event status is updated to canceled, invalid, or closed, the event will no longer be included in the active event set; Step 35: A correction task will be automatically generated when any of the following occurs: (1) New events enter the correction link: After the new events are standardized and encoded, if the confidence of the encoded new events is not less than the preset confidence threshold and its active event range overlaps with the prediction period, then the correction calculation is triggered. (2) The event status changes: When the event changes from pending to effective, from effective to canceled, from the main impact stage to the rollback stage, or when the start time, end time, event direction or original intensity of the event changes, the standardized template parameters of the event are regenerated and the corresponding prediction cycle is recalculated. (3) Template parameter update: When the warm-up time of a certain type of event template is updated. Duration of main impact Rollback duration Basic impact range or attenuation coefficient When adjusted, future unfinished events using that event template are filtered, and their event template values and correction results are recalculated. (4) Baseline demand value is recalculated: When the baseline demand value of the target object changes in certain forecast periods, the baseline demand value of the corresponding forecast period is reread, and the event increment value and the corrected demand value are recalculated in combination with the active events in that forecast period. (5) Actual sales data feedback and template update: After the actual sales data feedback, the deviation rate is calculated; if the deviation rate exceeds the preset deviation rate threshold, the template parameter update process is entered, and the prediction cycle of related events is recalculated after the template parameter update. Step 36: After triggering the correction task, determine the affected target objects and the affected prediction periods, and identify the objects that need to be recalculated; (1) For the affected target object, the judgment is made according to the target object in the event-cycle record: if the target object of the event is a single SKU, then only the SKU is recalculated; if the target object of the event is a category, channel, region or store, then the subordinate SKU, category or channel combination is found through the object mapping relationship, and only the target object is recalculated. (2) For the affected forecast period, based on the event Triggering cycle Preheating time Duration of main impact and rollback duration The local recalculation range that needs to be recalculated is determined as follows:
[0022] Recalculation is only performed on the forecast period covered by the event during the warm-up phase, main impact phase, and rollback phase; (3) If the triggering reason is that the baseline demand value is recalculated, then only the target object and the forecast period whose baseline demand value has changed will be recalculated; if the triggering reason is that the template parameter is updated, then only the event that uses the template and is still in the local recalculation range will be recalculated.
[0023] Furthermore, step 4 specifically includes: Step 41: For objects that need to be recalculated, based on the current forecast period... With the The triggering cycle of an event The relative positions between them are used to calculate the first... Offset of each event: ;in, For the first The prediction period is relative to the first The triggering cycle of an event The offset between; Step 42, according to the The warm-up time for each event Duration of main impact Rollback duration attenuation coefficient and offset Calculate the first The event in the 1st Event template values within a prediction period The formula is as follows: ; Step 43: Calculate the relative impact of a single event by selecting the corresponding template value based on the event's periodic integrity. (1) When the event is a non-integer period event, the effective template value calculated by the coverage ratio shall be used. Participating in the calculation of the relative impact of a single event; specifically: The first The event direction corresponding to each event Basic impact range Confidence level Historical similarity and valid template values Multiply to get the first The event in the 1st Relative impact of a single event over a forecast period This results in a single-event correction; the relative impact of the single event... The formula is as follows:
[0024] Wherein, the relative impact of a single event is used to reflect the relative adjustment strength of a single event to demand within a single period. If A value greater than 0 indicates a pulling effect on demand; if... <0 indicates a suppressive effect on demand; if =0 indicates that it has no effect on the demand; (2) When the event belongs to the whole cycle event, the event template value is used. Participating in the calculation of the relative impact of a single event; specifically: The first The event direction corresponding to each event Basic impact range Confidence level Historical similarity and event template values Multiply to get the first The event in the 1st Relative impact of a single event over a forecast period This results in a single-event correction; the relative impact of the single event... The formula is as follows: .
[0025] Furthermore, step 5 specifically includes: Step 51: When multiple active events exist within the same target object and the same prediction period, let the first... The set of active events within each prediction period is According to the Priority of events Confidence level Similarity to history Calculate the first The event in the 1st Synthetic weights over each prediction period :
[0026] in, Preset positive number and <0.01; For active event set Index of active events in the middle, For the first The priority of each active event For the first Confidence level of an active event For the first Historical similarity of active events; Step 52: Based on the synthesized weights Relative impact of a single event Calculate the first Comprehensive event correction coefficient for each forecast period The formula is: in, To positively adjust the upper limit, This is a negative correction upper limit. This is a truncation function.
[0027] Furthermore, step 6 specifically includes: Step 61, according to the first Baseline demand for each forecast period and comprehensive event correction coefficient Calculate the first Event increment value per prediction period The formula is as follows: ; Step 62, according to the first Baseline demand for each forecast period and event increment value Calculate the first Corrected demand value for each forecast period The formula is as follows: .
[0028] Furthermore, step 7 specifically includes: In each forecasting cycle, check whether the event is still in the main impact phase or the rollback phase: (1) If the event is still in the main impact phase, the event template value of the main impact phase will continue to be used for correction; (2) If the event has entered the rollback phase, continue to use the event template value of the rollback phase to gradually reduce the impact; (3) If the event template value is less than the preset template threshold, or the event has exceeded the rollback time, the superposition of the event's impact will be automatically stopped, and the corrected demand value will be adjusted. Restore to baseline demand value .
[0029] Furthermore, step 8 specifically includes: Step 81: Obtaining actual sales figures After that, the first Actual sales for the forecast period Compared with the revised demand value Compare and calculate the first Deviation rate per prediction period The formula is:
[0030] in, Indicates taking The maximum value between 1 and 2; Step 82: When the deviation rate exceeds the preset deviation rate threshold, it is determined that the current template parameters need to be updated; after the update conditions are met, at least one of the template parameters of the event-corresponding template, such as the basic influence amplitude, main influence duration, backtracking duration, or attenuation coefficient, is updated, and the updated template parameters are written back to the template parameter library.
[0031] Furthermore, in step 82, the basic impact magnitude of the template corresponding to the event is updated. The update process is as follows: (1) Calculate the basic impact range of the target The formula is:
[0032] in, For the event The set of monitoring cycles; (2) Based on the learning rate The updated base impact magnitude The formula is: .
[0033] By adopting the above technical solution, the present invention has the following beneficial effects compared with the prior art: 1. The impact of events can be modeled independently, making them more interpretable: This invention does not treat events such as promotions, weather, holidays, public opinion, and supply anomalies merely as external influencing factors input into the prediction model. Instead, it constructs them as independent event-driven correction chains, which can clearly reflect the trigger point, duration, direction of impact, decay process, and rollback process of the event, improving the interpretability and traceability of demand correction. It solves the problem in existing solutions where the impact of events cannot be uniformly modeled according to the trigger point, duration, peak intensity, and rollback process.
[0034] 2. Differentiated event templates improve the accuracy of corrections: This invention configures corresponding event templates for different types of events, enabling price events, promotional events, advertising events, weather events, public opinion events, holiday events, and supply anomaly events to participate in correction according to their respective business rules. This solves the problem in the prior art where different types of events share a single correction rule, resulting in inconsistencies between the correction results and actual business rules.
[0035] 3. Enhanced ability to handle multiple event conflicts: This invention synthesizes multiple concurrent events according to priority, confidence level and historical similarity within the same prediction period to generate a comprehensive event correction coefficient. This can effectively avoid the problems of overcorrection, undercorrection or mutual coverage distortion caused by simple superposition of multiple events in the same time period, and improve the stability of results in complex scenarios.
[0036] 4. Features attenuation and automatic fallback mechanisms: This invention can automatically reduce the impact of an event after it ends according to a preset attenuation rule, and restore the baseline output after the rollback condition is met, thereby avoiding the problem that the prediction results still deviate from the baseline for a long time after the event ends or the abnormality subsides.
[0037] 5. The output results are more suitable for business use: This invention can simultaneously output baseline demand values, event increment values, and corrected demand values. It not only meets the needs of replenishment, production scheduling, and business decision-making, but also supports marketing review, activity evaluation, and attribution analysis, improving the business usability of the results. It solves the problems of existing forecasting results being output in a single format, unable to distinguish between baseline demand and event increments, and difficult to meet the needs of business-specific applications.
[0038] 6. Possesses self-learning ability based on actual sales feedback: This invention updates the template parameters of an event based on the deviation between actual sales and the revised demand value, enabling subsequent similar events to use more reasonable correction parameters, thus forming a continuous optimization loop. It solves the problem of fixed event correction rules that cannot be automatically adjusted based on actual sales feedback.
[0039] 7. Enhanced project feasibility: This invention can be integrated into existing forecasting systems as an independent correction module without replacing the original baseline forecasting model. It has strong compatibility, low transformation cost, and is easy to promote and apply in retail, e-commerce, catering, cultural tourism and other industries with significant demand fluctuations.
[0040] Therefore, this invention can generate three types of results: baseline demand value, event increment value, and corrected demand value, and realize the calculable, attenuable, rollbackable, reusable, and sustainable optimization of the impact of events. Attached Figure Description
[0041] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0042] Figure 1 This is an execution flowchart of an event-driven demand modification method for promotions and emergencies provided in an embodiment of the present invention.
[0043] Figure 2 This is an architecture diagram of an event-driven demand correction system for promotions and emergencies provided by an embodiment of the present invention. Detailed Implementation
[0044] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be particularly noted that the following embodiments are for illustrative purposes only and do not limit the scope of the invention. Similarly, the following embodiments are only some, not all, embodiments of the present invention, and all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0045] This invention is applicable to industries with significant demand fluctuations, such as retail, e-commerce, catering, cultural tourism, fast-moving consumer goods, and chain operations. Its core purpose is not to replace the original forecasting model, but to establish an additional, calculable, attenuable, rollbackable, reusable, and learnable event impact chain after the original forecasting model has output a baseline demand value, and to perform engineering corrections to the forecast results.
[0046] The present invention preferably outputs three sets of results: baseline demand value, event increment value, and corrected demand value, so that the supply chain department, marketing department, and algorithm review department can use them respectively.
[0047] This invention adopts an architecture of "event center + template engine + correction hub + feedback loop," with the core comprising the following modules: data acquisition module, event standardization and template configuration module, event-driven requirement correction module, and result output / self-learning update module. Cross-module data transfer and logical linkage are achieved through a real-time data bus. The architecture logic is as follows: Figure 2 As shown. Wherein: The data acquisition module is used to: collect baseline prediction data, which is then standardized to obtain the baseline; collect multi-source event data, including: price event data, promotional event data, advertising event data, weather event data, public opinion event data, holiday event data, and supply anomaly event data; and collect actual sales data. It generates a time-consistent and granular event correction input sequence, providing an accurate data source for subsequent correction calculations, breaking through the traditional static processing method that only accesses baseline prediction results; The event standardization and template configuration module is used to uniformly encode events from different sources and match corresponding impact templates according to event type; it constructs a unified event object and template parameter system so that events from different sources, in different formats, and with different business meanings can participate in correction under the same computing framework.
[0048] The event-driven demand correction module, acting as the computing hub, is based on real-time data bus input and performs unified processing through five layers of logic: "single event impact calculation, multi-event conflict handling, correction result generation, decay rollback control, and feedback update," thereby realizing event-driven demand correction.
[0049] The result output module is used to output the baseline demand value, the event increment value, and the corrected demand value. The self-learning update module is used to update the template parameters (which are the configuration rules of the event template, such as duration and decay) after obtaining the actual sales.
[0050] Please see Figure 1 The present invention provides an event-driven demand modification method for promotions and emergencies, comprising the following steps: Step 1: Obtain the baseline demand values for the target object over multiple forecast periods in the future; In this embodiment, step 1 specifically includes: Step 11: Set the forecast period by day, week, or hour. In this embodiment, it is preferred to define it by week. Step 12: Collect baseline prediction data of the target object over multiple future prediction periods from time series prediction models, machine learning prediction models, deep learning prediction models, or prediction results after manual review by business personnel; the target object is SKU, category, store, region, channel, or a combination thereof; Step 13: Standardize the collected baseline prediction data according to the target object and prediction period, and define the standardized prediction values as baseline demand values to form a demand sequence to be corrected; the baseline demand values The formula is:
[0051] in, Number the prediction period. For the first Baseline demand for each forecast period, in units of pieces, orders, sets or other business units of measurement; The predicted values output by the basic prediction engine.
[0052] The purpose of the above formula is to provide the initial forecast starting point before event correction. Subsequent event increment values and corrected demand values are based on this. Based on calculations, therefore it is The input reference for the entire correction link.
[0053] Step 2: Since the data from different event sources have different time granularities, in order to ensure that the baseline prediction data and event data can participate in the correction calculation under the same time coordinate, the system establishes a unified timestamp alignment mechanism.
[0054] Collect multi-source event data and perform cleaning and time alignment processing on the event data; In this embodiment, step 2 specifically includes: Step 21: Collect multi-source event data from different sources, and clean the collected event data to obtain cleaned event data; specifically including: Step 211: Collect event data from multiple business systems and external data sources. The event data includes at least one of the following: price event data, promotion event data, advertising event data, weather event data, public opinion event data, holiday event data, and supply anomaly event data. (1) The price event data includes: price reduction, price increase, coupons, discounts for purchases over a certain amount, direct price reduction, etc.; (2) The promotional event data includes information such as platform promotions, store activities, flash sales, and live streaming events; (3) The advertising event data includes: information on in-site advertising, out-of-site advertising, influencer advertising, brand advertising, etc.; (4) The weather event data includes information such as: rainstorms, high temperatures, cold waves, typhoons, and warning levels; (5) The public opinion event data includes information such as: positive hot discussions, negative dissemination, and public opinion heat level; (6) The holiday event data includes information such as statutory holidays, regional festivals, and seasonal consumption periods; (7) The supply anomaly event data includes information such as stockouts, purchase restrictions, delivery delays, and logistics disruptions.
[0055] Step 212: Perform deduplication, missing field validation, abnormal time correction, event status standardization, and invalid record removal on the collected event data, and retain the cleaned event data; Step 22: Perform time alignment processing on the cleaned event data, specifically including: Step 221: Using the natural week as the unified calculation granularity, for the first... Each prediction period defines the start point of the period. and the end of the cycle Then the first Total duration of each prediction period Recorded as: ; Step 222, for the first Baseline demand for each forecast period Generate a unified periodic label The details are as follows: (1) Through the periodic label conversion function () will the first The trigger time of each event Start time and end time Mapped to the corresponding trigger cycles respectively Start-up cycle and end cycle The formula is:
[0056]
[0057]
[0058] in, For event indexing; where, For the triggering period of the j-th event, Let j be the start period of the j-th event. This is the end period for the j-th event; the trigger period, start period, and end period are all period identifiers obtained based on a unified calculation granularity. (2) The triggering period Start-up cycle and end cycle Constituting a unified periodic label ; The aforementioned periodic labels are used to complete three types of processing in subsequent steps: firstly, according to First, determine the event triggering cycle to calculate the event's relative offset; second, based on... Record the event-cycle data with the baseline demand value for the same forecast period. Third, based on the periodic labels, identify the set of active events for the same target object within the same prediction period.
[0059] Step 223: For events with non-integer periods, calculate the coverage ratio of the event in each prediction period and calculate the effective template value; specifically as follows: (1) Let the first The effective impact range of the event is [ , ), then the first The event in the 1st Coverage duration within each prediction period for:
[0060] (2) Calculate the first The event in the 1st Coverage ratio within a forecast period for:
[0061] (3) Calculate the coverage ratio based on the coverage ratio. The event in the 1st Valid template values within a prediction period The formula is:
[0062] in, The event template value (a numerical result calculated based on the template parameters under a specific event and a specific prediction period); Replaced in subsequent calculations of single-event impact. This method avoids mistreating partial periodic events as complete periodic events.
[0063] Step 224: For events spanning multiple prediction periods, split the event into multiple event-period records according to the period boundaries. Each split event-period record should include at least the event number, event type, target, trigger time, start time, end time, unified period label, stage identifier, coverage ratio, event direction, original intensity, data source, and event status; One event Represented as:
[0064] in, Indicates the first The event in the 1st The first event-cycle record in the prediction period, Indicates the first The event in the 1st The second event-cycle record in the prediction cycle, Indicates the first The event in the 1st The first prediction period Event - Periodic Record; Step 225: Determine the stage of the event based on its trigger time, start time, and end time. The period in which the trigger time is located is the trigger period, used to determine whether the event enters the correction path; The period covered by the start time to the end time is the main impact period, used to calculate the main impact of the event; The period in which the end time falls is the end period, used to determine the end position of the main impact phase; The period following the end period is the rollback period, which is used to gradually reduce the impact of the event according to the rollback duration and attenuation coefficient; Step 226: Convert event data at different time granularities into multiple event-period records at the event-period level, forming the following fields: (event_id, event_type, object_id, trigger_time, start_time, end_time, , , , , , data_source, ) Where event_id is the event number, event_type is the event type, object_id is the target object, trigger_time is the trigger time, start_time is the start time, and end_time is the end time. To unify period labels, used to match baseline demand values within the same forecast period; This is a stage identifier used to select the warm-up stage, main impact stage, or rollback stage in the event template. This is the coverage ratio, used to calculate the effective template value; This indicates the event direction, used to calculate the impact of a single event. `data_source` represents the raw intensity, used to calculate the impact of a single event; `data_source` represents the data source, used to calculate the confidence level of the event. This refers to the event status, used to determine whether the event has entered the active event set; Step 227: Associate event-cycle records of the same event in different prediction cycles into a record group based on the event number; search for the corresponding event template in the event template library based on the event type, and search for the corresponding target object in the sequence of requirements to be corrected based on the target object; associate the event template, target object, and unified cycle label, stage identifier, coverage ratio, event direction, original intensity, data source and event status with the record group; Step 228: Read the unified cycle label in the record group according to the event number, set the stage identifier of the event-cycle record corresponding to the main influence cycle as the main influence stage, associate the end cycle with the record group and use it as the end position of the main influence stage and the start position of the rollback stage, and set the stage identifier of the event-cycle record corresponding to the rollback cycle as the rollback stage.
[0065] (1) Collect event-cycle records of the same event under different unified cycle labels according to the event number event_id, form a record group, and write the event number into the corresponding standardized event object; (2) Search for the corresponding event template in the event template library according to the event type event_type, and associate the found event template with the record group; (3) Based on the object_id, find the corresponding SKU, category, store, region, channel or combination thereof in the demand sequence to be corrected, and associate the found baseline demand sequence with the record group; (4) Map the trigger time (trigger_time) to the trigger period using the period label conversion function, and write the trigger period into the normalized event object; (5) The start time is mapped to the start period through the period label conversion function, and the warm-up duration is generated according to the interval between the start period and the trigger period; (6) The end time is mapped to the end period through the period label conversion function. The main influence duration is generated according to the number of periods covered between the start period and the end period, and the end period is used as the starting point of the rollback phase. (7) According to the unified periodic label The event-cycle records are matched with the baseline demand values of the same target in the same forecast period, and active events are grouped according to the target and uniform period label in step 51. (8) According to the stage identifier In step 42, select the segment corresponding to the warm-up phase, main impact phase, or rollback phase from the event template; (9) When the event is a non-integer period event, the coverage ratio will be adjusted. Multiply the event template value calculated in step 42 to obtain the valid template value, and write the valid template value into the corresponding event-period record; (10) Directing the event Write the standardized event object, and read the event direction when calculating the relative impact of a single event in step 43; (11) Based on the original strength The event type converts the original intensity into a basic impact magnitude, and the basic impact magnitude is written into the standardized event object; (12) Calculate the confidence level based on the data source (data_source), field integrity, and event status, and write the confidence level into the standardized event object; (13) In steps 34 and 7, read the event status according to the event number. And determine whether the event enters, continues to participate in, or exits the active event set according to the event status.
[0066] Step 3: Convert the processed event data into standardized event objects, generate correction tasks based on the standardized event objects, and determine the objects that need to be recalculated; In this embodiment, step 3 specifically includes: Step 31: Convert each event-cycle record into a standardized event object with a unified structure. The standardized event object includes at least the following parameters: The triggering cycle of an event , No. Pre-event warm-up time , No. Duration of the main impact of an event , No. Rewind time for each event , No. The basic impact of the event , No. Attenuation coefficient of an event , No. Event direction of an event , No. Confidence of an event , No. Priority of events and the Historical similarity of events ;in: (1) Triggering cycle : It is obtained by converting the trigger time in the event-cycle record according to the unified cycle label. It is used to determine from which prediction cycle the event impact enters the correction link and to calculate the relative offset between the current prediction cycle and the event trigger cycle. (2) Preheating time : Determined by the interval between the event's trigger period and start period, or by the default value of the event template corresponding to the event type, it is used to characterize the duration of the period during which demand begins to change in advance before the event officially takes effect, and to determine whether the current prediction period is in the warm-up phase; (3) Duration of main impact Determined by the uniform number of cycles covered between the start and end times of an event, it is used to characterize the duration of an event in its peak or sustained state, and to determine whether the current prediction period is in the main influence phase. (4) Rollback duration Determined by the event type, business rules, or the fallback performance of similar historical events, it is used to characterize the duration of the period during which the impact gradually recovers to the baseline level after the event ends, and is used in calculating event template values and attenuation fallback control; (5) Basic impact range This is derived from the raw intensity in the event-cycle record and is used to characterize the basic impact intensity of the event on the target object. For example, price events are determined based on discount rates or price reduction percentages, promotional events are determined based on activity level or ad placement level, advertising events are determined based on advertising budget or exposure, weather events are determined based on warning levels, and supply anomaly events are determined based on out-of-stock rates, purchase limits, or fulfillment restrictions. This basic impact magnitude will be used in subsequent steps to calculate the relative impact of a single event. (6) Attenuation coefficient The rate of decline in impact during the rollback phase is determined by the event type, rollback duration, or the rate of decline of similar historical events. For events with a relatively rapid decline in impact, Larger values are acceptable; for events with a longer duration of impact, The value is relatively small. This attenuation factor will be used in the subsequent back-up phase; (7) Event direction For positive cases, add 1; for negative cases, add 1. 1. Derived from the event direction transformation in the event-cycle record, used to distinguish between demand-boosting and demand-suppressing events. For events that boost demand, such as price reductions and promotions, platform activities, advertising, positive public opinion, and pre-holiday stockpiling, =+1; For events that suppress demand, such as price increases, stockouts, purchase restrictions, delivery delays, logistical disruptions, and negative public opinion, = 1. This event direction will be used in subsequent steps to determine the positive or negative direction of the impact of a single event; (8) Confidence level This is calculated based on the reliability of the data source, field completeness, and event status, and is used to describe the credibility of the current event data. Events confirmed by the business system, with complete fields, and in effect are considered valid. High values; events originating from external interfaces, missing fields, or pending status confirmation. The value is low. This confidence level will be used in formulas in subsequent steps; (9) Priority This priority level is determined based on the event type, scope of impact, and level of business impact, and is used to distinguish the primary and secondary processing of multiple concurrent events. For example, events that directly affect supply or demand, such as supply anomalies, major price adjustments, and platform promotions, have higher priority; ordinary advertising campaigns, low-level public opinion events, or events with weak impact, such as holidays, have lower priority. This priority will be used in the formula for handling multiple event conflicts in subsequent steps. (10) Historical similarity The similarity between the current event and historical events is determined based on their similarity in event type, target audience, occurrence cycle, duration, and original intensity. This is used to measure the compatibility between the current event and historical events. If events of the same type, target audience, intensity, or time window exist in the historical sample, then the relevant event is considered. The value is relatively high; if no historical samples are available for reference, the default value will be used. This parameter will be used in the formulas of subsequent steps.
[0067] Step 32: Configure corresponding event templates according to different event types (standardized modeling rules for the impact of a certain type of event on demand, used to define the basic impact form and calculation method of this type of event on demand changes at different stages (preheating, main impact, rollback)). The event types include: price events, promotion events, advertising events, weather events, public opinion events, holiday events, and supply anomalies; the event templates include: price event template, promotion event template, advertising event template, weather event template, public opinion event template, holiday event template, and supply anomaly template. (1) Price event template: The step growth template is preferred and is suitable for events such as price reduction, discount for purchases over a certain amount, and coupons; (2) Promotional event template: Platform activity maintenance templates are preferred, which are suitable for events such as major promotions, flash sales, and store activities; (3) Advertising template: The preferred template is the gradual increase and decrease template, which is suitable for scenarios where advertising volume is gradually increased; (4) Weather event template: The preferred template is the advance pull-up template, which is suitable for scenarios such as cold wave, rainstorm, and typhoon warnings that require advance stocking. (5) Public opinion event template: The fast rise and fall template is preferred, which is suitable for hot topics or negative dissemination scenarios on social media; (6) Holiday event template: The preferred template is one that warms up before the holiday, maintains the momentum during the holiday, and falls rapidly after the holiday; (7) Supply anomaly event template: The negative suppression template is preferred and is suitable for scenarios such as stockouts, contract failures, and logistics restrictions.
[0068] Step 33: Generate template parameters for each type of event template using any of the following methods: (1) Default parameters are preset by business rules; (2) The mean parameter is obtained from the historical event sample database; (3) Recommended parameters are obtained by backtracking from similar historical events; (4) Correction parameters are entered manually through the configuration interface; The automatic triggering mechanism in this invention is executed in conjunction with the aforementioned standardized event coding, differentiated event template configuration, and template parameter initialization process. The system does not perform a full recalculation every time data changes; instead, it first identifies the trigger source, then determines the affected target object and the affected prediction period, and finally calls the event-driven requirement correction module to perform a partial recalculation.
[0069] Specifically, the system monitors event data, template parameters, baseline demand values, and actual sales feedback results. When the above data is added, changed, or feedback occurs, the system generates a trigger task and executes it according to the following steps.
[0070] Step 34: For any event Based on event status and triggering cycle Preheating time Duration of main impact Rollback duration and confidence level To determine whether the event should enter the correction path, the specific rules are as follows: (1) If the event has been collected but has not yet entered the active event range (the value of the active event range is not a single value, but a set of prediction periods dynamically determined by the template parameters. Its range is the entire set of prediction periods covered from the start of the trigger period to the end of the rollback phase, i.e., the set of periods corresponding to [trigger period - warm-up duration, trigger period + main impact duration + rollback duration]), or the confidence level of the event. If the confidence level is lower than the preset confidence threshold, the event is in a pending confirmation or pending activation state and will not be included in the active event set. (2) If the current forecast period satisfy: If the event is in the warm-up phase, it enters the active event set and the event template value of the warm-up phase is calculated. (3) If the current forecast period satisfy: If the event is in the main impact phase, it enters the active event set, and the event template value for the main impact phase is calculated. (4) If the current forecast period satisfy: If the event is in the rollback phase, it enters the active event set and the event template value for the rollback phase is calculated. (5) If the current forecast period satisfy: If the event status is updated to canceled, invalid, or closed, the event will no longer be included in the active event set; Based on the above judgment, the system can convert business descriptions such as "new event enters effective state" and "existing event state changes" into executable state recognition rules, and determine whether the event should participate in subsequent correction calculations.
[0071] Step 35: A correction task will be automatically generated when any of the following occurs: (1) New events enter the correction link: After the new events are standardized and encoded, if the confidence of the encoded new events is not less than the preset confidence threshold and its active event range overlaps with the prediction period, then the correction calculation is triggered. (2) The event status changes: When the event changes from pending to effective, from effective to canceled, from the main impact stage to the rollback stage, or when the start time, end time, event direction or original intensity of the event changes, the standardized template parameters of the event are regenerated and the corresponding prediction cycle is recalculated. (3) Template parameter update: When the warm-up time of a certain type of event template is updated. Duration of main impact Rollback duration Basic impact range or attenuation coefficient When adjusted, future unfinished events using that event template are filtered, and their event template values and correction results are recalculated. (4) Baseline demand value is recalculated: When the baseline demand value of the target object changes in certain forecast periods, the baseline demand value of the corresponding forecast period is reread, and the event increment value and the corrected demand value are recalculated in combination with the active events in that forecast period. (5) Actual sales data feedback and template update: After the actual sales data feedback, the deviation rate is calculated; if the deviation rate exceeds the preset deviation rate threshold, the template parameter update process is entered, and the prediction cycle of related events is recalculated after the template parameter update. Step 36: After triggering the correction task, determine the affected target objects and the affected prediction periods, and identify the objects that need to be recalculated; (1) For the affected target object, the judgment is made according to the target object in the event-cycle record: if the target object of the event is a single SKU, then only the SKU is recalculated; if the target object of the event is a category, channel, region or store, then the subordinate SKU, category or channel combination is found through the object mapping relationship, and only the target object is recalculated. (2) For the affected forecast period, based on the event Triggering cycle Preheating time Duration of main impact and rollback duration The local recalculation range that needs to be recalculated is determined as follows:
[0072] Recalculation is only performed on the forecast period covered by the event during the warm-up phase, main impact phase, and rollback phase; The local recalculation range in step 36 is used to determine the set of prediction periods that need to be recalculated; the effective influence range in step 24 is used to calculate the event coverage ratio and the effective template value, which correspond to the local recalculation range and the coverage reduction range, respectively.
[0073] (3) If the triggering reason is that the baseline demand value is recalculated, then only the target object and the forecast period whose baseline demand value has changed will be recalculated; if the triggering reason is that the template parameter is updated, then only the event that uses the template and whose scope of influence has not ended will be recalculated.
[0074] Through the above mechanism, this invention achieves a local recalculation method based on "event-driven + impact range judgment". The system only performs corrections on the affected target objects and affected periods, rather than performing a full recalculation on all prediction results. This ensures timely updates of correction results while improving system processing efficiency and creating a continuous connection between standardized event coding, differentiated template configuration, template parameter initialization, and event-driven correction processes.
[0075] Step 4: For objects that need to be recalculated, calculate the template value of each event in each prediction period, select the corresponding template value according to the periodic integrity of the event, and calculate the relative impact of a single event. In this embodiment, step 4 specifically includes: Step 41: For objects that need to be recalculated, based on the current forecast period... With the The triggering cycle of an event The relative positions between them are used to calculate the first... Offset of each event: ;in, For the first The prediction period is relative to the first The triggering cycle of an event The offset between; the formula for this offset is used to determine whether the current prediction period is in the warm-up phase, main impact phase, rollback phase, or impact end phase of the event.
[0076] Step 42, according to the The warm-up time for each event Duration of main impact Rollback duration attenuation coefficient and offset Calculate the first The event in the 1st Event template values within a prediction period The formula is as follows: ; The above formula is used to express the impact of an event as a curve value that changes over time. The formula clearly gives a four-stage impact chain: (1) before the warm-up, the impact is 0; (2) during the warm-up stage, the impact gradually increases; (3) during the main impact stage, the impact remains at its peak; (4) during the retreat stage, the impact gradually decays to 0. Step 43: Calculate the relative impact of a single event by selecting the corresponding template value based on the event's periodic integrity. (1) When the event is a non-integer period event, the effective template value calculated by the coverage ratio shall be used. Participating in the calculation of the relative impact of a single event; specifically: The first The event direction corresponding to each event Basic impact range Confidence level Historical similarity and valid template values Multiply to get the first The event in the 1st Relative impact of a single event over a forecast period This results in a single-event correction; the relative impact of the single event... The formula is as follows:
[0077] Wherein, the relative impact of a single event is used to reflect the relative adjustment strength of a single event to demand within a single period. If A value greater than 0 indicates a pulling effect on demand; if... <0 indicates a suppressive effect on demand; if =0 indicates that it has no effect on the demand; (2) When the event belongs to the whole cycle event, the event template value is used. Participating in the calculation of the relative impact of a single event; specifically: The first The event direction corresponding to each event Basic impact range Confidence level Historical similarity and event template values Multiply to get the first The event in the 1st Relative impact of a single event over a forecast period This results in a single-event correction; the relative impact of the single event... The formula is as follows: .
[0078] The above formula is used to calculate the relative impact of a single event on the demand of the target object within a certain forecast period. This relative impact is not the final correction result, but rather an input value for subsequent synthesis of multiple events.
[0079] Step 5: When there are multiple events within the same prediction period, calculate the composite weight based on the priority, confidence and historical similarity of each event, and generate a comprehensive event correction coefficient based on the composite weight and the relative influence of a single event. When multiple active events exist within the same target object and the same prediction period, the priority, confidence, and historical similarity of each event are first standardized and scored, and then the composite weight of each event in the current period is calculated.
[0080] Among them, the priority of events Priority is determined based on event type, scope of impact, and level of business impact. Preferably, the system pre-configures priority levels for different event types in a template parameter table. For example, events directly affecting demand or supply, such as supply anomalies, significant price adjustments, and platform-level promotions, are configured with higher priority; events such as ordinary advertising campaigns, low-level public opinion events, and holidays with weak impact are configured with lower priority. Within the same event type, if the scope of impact is larger, the impact period is longer, or the initial intensity is higher, the corresponding priority is adjusted. The value is higher. The priority is... Normalized to the [0,1] interval, it is used to represent the primary and secondary processing of this event when multiple events occur concurrently.
[0081] Confidence of the event The determination is based on the reliability of the data source, the completeness of the fields, and the event status. If the event originates from a confirmed record in the business system, and the fields such as trigger time, start time, end time, affected object, and original intensity are complete, and the event status is either active or confirmed, then... The value is higher; if the event originates from an external interface, a field is missing, the status is pending confirmation, or there is a data conflict, then... The value is relatively low. The confidence level... It is also normalized to the [0,1] interval to indicate the reliability of the current event data entering the correction calculation.
[0082] Historical similarity of events The similarity between the current event and historical events is determined based on their similarity in event type, target audience, frequency of occurrence, duration, and original intensity. If historical samples contain events of the same type, target audience, similar intensity, similar duration, or similar frequency of occurrence, then... The value is relatively high; if there is a lack of historical samples for reference, or if there is a significant difference between historical events and the current event, then... The value is set to a lower value or a preset default value is used. (The historical similarity...) Normalized to the [0,1] interval, it is used to represent the degree to which historical experience can be used to correct current events.
[0083] In this embodiment, step 5 specifically includes: Step 51: When multiple active events exist within the same target object and the same prediction period, let the first... The set of active events within each prediction period is According to the Priority of events Confidence level Similarity to history Calculate the first The event in the 1st Synthetic weights over each prediction period :
[0084] in, Preset positive number and <0.01; For active event set Index of active events in the middle, For the first The priority of each active event For the first Confidence level of an active event For the first Historical similarity of active events; The above formula is used to address the overcorrection or undercorrection problems caused by simply adding multiple events together. Using this formula, events with high priority, high confidence, and high historical similarity will receive higher weights.
[0085] The aforementioned weighting ratios are not assigned manually, but rather determined by... , , The configuration results are automatically calculated. The system can adjust the priority level, confidence scoring rules, and historical similarity matching rules corresponding to different event types through the template parameter table, thereby indirectly controlling the weight ratio of different events in multi-event synthesis. The calculated results... This will continue into subsequent formulas to generate the first... The comprehensive event correction coefficient for each prediction period.
[0086] Step 52: Based on the synthesized weights Relative impact of a single event Calculate the first Comprehensive event correction coefficient for each forecast period The formula is: in, To positively adjust the upper limit, This is a negative correction upper limit. This is a truncation function.
[0087] The above formula is used to generate the correction coefficient for the final execution of the current prediction period, and upper and lower limits are used to prevent the correction from being too large.
[0088] Step 6: Calculate the event increment value based on the baseline demand value and the comprehensive event correction coefficient, and add the baseline demand value and the event increment value to obtain the corrected demand value; In this embodiment, step 6 specifically includes: Step 61, according to the first Baseline demand for each forecast period and comprehensive event correction coefficient Calculate the first Event increment value per prediction period The formula is as follows: ; The above formula is used to convert relative correction coefficients into absolute increases or decreases, making it convenient for business departments to use directly.
[0089] Step 62, according to the first Baseline demand for each forecast period and event increment value Calculate the first Corrected demand value for each forecast period The formula is as follows: .
[0090] The above formula is used to obtain the final demand results that can be used by the supply chain, operations, marketing, and other business departments. It also outputs baseline demand values, event increment values, and corrected demand values, facilitating business segmentation and use.
[0091] Step 7: After the event ends, perform the corresponding decay and rollback control according to the current stage of the event; In this embodiment, step 7 specifically includes: In each forecasting cycle, check whether the event is still in the main impact phase or the rollback phase: (1) If the event is still in the main impact phase, the event template value of the main impact phase will continue to be used for correction; (2) If the event has entered the rollback phase, continue to use the event template value of the rollback phase to gradually reduce the impact; (3) If the event template value is less than the preset template threshold, or the event has exceeded the rollback time, the superposition of the event's impact will be automatically stopped, and the corrected demand value will be adjusted. Restore to baseline demand value This mechanism ensures that event corrections have a clear endpoint, preventing forecasts from remaining abnormally high or low for extended periods after promotions end, public opinion subsides, weather conditions improve, or supply recovers.
[0092] Step 8: After obtaining the actual sales volume, calculate the deviation rate between the actual sales volume and the corrected demand value. When the deviation rate exceeds the preset deviation rate threshold, update the template parameters in the corresponding event template.
[0093] In this embodiment, step 8 specifically includes: Step 81: Obtaining actual sales figures After that, the first Actual sales for the forecast period Compared with the revised demand value Compare and calculate the first Deviation rate per prediction period The formula is:
[0094] in, Indicates taking The maximum value between 1 and 0 is used to prevent the denominator from being too small.
[0095] The above formula is used to measure the degree of deviation between the current event correction result and the actual sales volume, realize the template update trigger based on actual sales feedback, and improve the accuracy of subsequent corrections for similar events.
[0096] Step 82: When the deviation rate exceeds the preset deviation rate threshold, it is determined that the current template parameters need to be updated; after the update conditions are met, at least one of the template parameters of the event-corresponding template, such as the basic influence amplitude, main influence duration, backtracking duration, or attenuation coefficient, is updated, and the updated template parameters are written back to the template parameter library.
[0097] In this embodiment, step 82 updates the basic impact magnitude of the template corresponding to the event. The update process is as follows: (1) Calculate the basic impact range of the target The formula is:
[0098] in, For the event The set of monitoring cycles; Monitoring cycle set According to the event Whether the correction calculation has been participated in, whether the corrected demand value for the corresponding period has been generated, whether the actual sales have been fed back, and whether the data for that period is valid are used to determine the effective feedback period used when the current event participates in the template parameter update. If a certain forecast period... China Event If a forecast period belongs to the active event set, and the revised demand value has been generated and the actual sales have been reported back, and it has not been marked as a severe stockout, missing data, or abnormal period, then the forecast period will be included in the monitoring period set. If the prediction period is China Event If no correction was made, or actual sales figures have not yet been received, or there are significant data anomalies in the forecast period, then the period will not be included in the monitoring period set. This monitoring period set is used to calculate the basic impact magnitude of the target.
[0099] (2) Based on the learning rate The updated base impact magnitude The formula is: .
[0100] The above formula is used to adjust template parameters based on actual sales feedback, so that when the same type and similar intensity of event enters the system again, a more reasonable correction range can be adopted.
[0101] Basic concept explanation:
[0102] The above description is only a part of the embodiments of the present invention and does not limit the scope of protection of the present invention. Any equivalent device or equivalent process transformation made based on the content of the present invention specification and drawings, or direct or indirect application in other related technical fields, are similarly included within the patent protection scope of the present invention.
Claims
1. An event-driven demand modification method for promotions and unexpected events, characterized in that, Includes the following steps: Step 1: Obtain the baseline demand values for the target object over multiple forecast periods in the future; Step 2: Collect multi-source event data and perform cleaning and time alignment processing on the event data; Step 3: Convert the processed event data into standardized event objects, generate correction tasks based on the standardized event objects, and determine the objects that need to be recalculated; Step 4: For objects that need to be recalculated, calculate the template value of each event in each prediction period, select the corresponding template value according to the periodic integrity of the event, and calculate the relative impact of a single event. Step 5: When there are multiple events within the same prediction period, calculate the composite weight based on the priority, confidence and historical similarity of each event, and generate a comprehensive event correction coefficient based on the composite weight and the relative influence of a single event. Step 6: Calculate the event increment value based on the baseline demand value and the comprehensive event correction coefficient, and add the baseline demand value and the event increment value to obtain the corrected demand value; Step 7: Execute the corresponding decay and rollback control according to the current stage of the event; Specifically: (1) If the event is still in the main impact phase, the event template value of the main impact phase will continue to be used for correction; (2) If the event has entered the rollback phase, continue to use the event template value of the rollback phase to gradually reduce the impact; (3) If the event template value is less than the preset template threshold, or the event has exceeded the rollback time, the superposition of the event's impact will be automatically stopped, and the corrected demand value will be adjusted. Restore to baseline demand value ; Step 8: After obtaining the actual sales volume, calculate the deviation rate between the actual sales volume and the corrected demand value. When the deviation rate exceeds the preset deviation rate threshold, update the template parameters in the corresponding event template.
2. The event-driven demand modification method for promotions and unexpected events as described in claim 1, characterized in that, Step 1 specifically includes: Step 11: Set the forecast period by day, week, or hour; Step 12: Collect baseline prediction data for the target object over multiple future prediction periods from time series prediction models, machine learning prediction models, deep learning prediction models, or prediction results after manual review by business personnel. Step 13: Standardize the collected baseline prediction data according to the target object and prediction period, and define the standardized prediction values as baseline demand values to form a demand sequence to be corrected; the baseline demand values The formula is: in, Number the prediction period. For the first Baseline demand for each forecast period. The predicted values output by the basic prediction engine.
3. The event-driven demand modification method for promotions and unexpected events as described in claim 1, characterized in that, Step 2 specifically includes: Step 21: Collect multi-source event data from different sources, and clean the collected event data to obtain cleaned event data; specifically including: Step 211: Collect event data from multiple business systems and external data sources. The event data includes at least one of the following: price event data, promotion event data, advertising event data, weather event data, public opinion event data, holiday event data, and supply anomaly event data. Step 212: Perform deduplication, missing field validation, abnormal time correction, event status standardization, and invalid record removal on the collected event data, and retain the cleaned event data; Step 22: Perform time alignment processing on the cleaned event data, specifically including: Step 221: Using the natural week as the unified calculation granularity, for the first... Each prediction period defines the start point of the period. and the end of the cycle Then the first Total duration of each prediction period Recorded as: ; Step 222, for the first Baseline demand for each forecast period Generate a unified periodic label The details are as follows: (1) Through the periodic label conversion function () will the first The trigger time of each event Start time and end time Mapped to the corresponding trigger cycles respectively Start-up cycle and end cycle The formula is: in, For event indexing; For the first j The triggering cycle of an event. For the first j The start period of an event. For the first j The end cycle of an event; the trigger cycle, start cycle, and end cycle are all cycle identifiers obtained based on a unified calculation granularity; (2) The triggering period Start-up cycle and end cycle Constituting a unified periodic label ; Step 223: For events with non-integer periods, calculate the coverage ratio of the event in each prediction period and calculate the effective template value; specifically as follows: (1) Let the first The effective impact range of the event is [ , ), then the first The event in the 1st Coverage duration within each prediction period for: (2) Calculate the first The event in the 1st Coverage ratio within a forecast period for: (3) Calculate the coverage ratio based on the coverage ratio. The event in the 1st Valid template values within a prediction period The formula is: in, This is the event template value; Step 224: For events spanning multiple prediction periods, split the event into multiple event-period records according to the period boundaries. Each split event-period record should include at least the event number, event type, target, trigger time, start time, end time, unified period label, stage identifier, coverage ratio, event direction, original intensity, data source, and event status; One event Represented as: in, Indicates the first The event in the 1st The first event-cycle record in the prediction period, Indicates the first The event in the 1st The second event-cycle record in the prediction cycle, Indicates the first The event in the 1st The first prediction period Event - Periodic Record; Step 225: Determine the stage of the event based on its trigger time, start time, and end time. The period in which the trigger time occurs is the trigger period; The period covered by the start time to the end time is the main influencing period; The period in which the end time falls is the end period; The period following the end of the cycle is the rollback cycle; Step 226: Convert event data at different time granularities into multiple event-period records at the event-period level, forming the following fields: (event_id, event_type, object_id, trigger_time, start_time, end_time, , , , , , data_source, ) Where event_id is the event number, event_type is the event type, object_id is the target object, trigger_time is the trigger time, start_time is the start time, and end_time is the end time. To standardize periodic labels, As a stage identifier, For coverage ratio, For the direction of the event, The original strength is represented by `data_source`, which represents the data source. This is the event status; Step 227: Associate event-cycle records of the same event in different prediction cycles into a record group based on the event number; search for the corresponding event template in the event template library based on the event type, and search for the corresponding target object in the sequence of requirements to be corrected based on the target object; associate the event template, target object, unified cycle label, stage identifier, coverage ratio, event direction, original intensity, data source, and event status with the record group; Step 228: Read the unified cycle label in the record group according to the event number, set the stage identifier of the event-cycle record corresponding to the main influence cycle as the main influence stage, associate the end cycle with the record group and use it as the end position of the main influence stage and the start position of the rollback stage, and set the stage identifier of the event-cycle record corresponding to the rollback cycle as the rollback stage.
4. The event-driven demand modification method for promotions and emergencies as described in claim 3, characterized in that, Step 3 specifically includes: Step 31: Convert each event-cycle record into a standardized event object with a unified structure. The standardized event object includes at least the following parameters: The triggering cycle of an event , No. Pre-event warm-up time , No. Duration of the main impact of an event , No. Rewind time for each event , No. The basic impact of the event , No. Attenuation coefficient of an event , No. Event direction of an event , No. Confidence of an event , No. Priority of events and the Historical similarity of events Specifically: The triggering period is determined based on the event's trigger time and its corresponding unified periodicity label. The preheating time is determined based on the interval between the event's trigger cycle and its start cycle. Alternatively, the warm-up duration can be determined based on the default value of the event template corresponding to the event type. The duration of the main impact is determined based on the uniform number of periods covered between the start and end times of the event. The rollback duration is determined based on the event type, business rules, or the historical performance of similar events. The base influence magnitude is generated based on the original intensity in the event-cycle record. The decay coefficient is determined based on the event type, rollback duration, or the decay rate of similar historical events. Determine the event direction based on the event direction in the event-cycle record. ; Generate confidence scores based on data source, field completeness, and event status. Prioritize events based on their type, scope, and level of business impact. Historical similarity is determined based on the degree of similarity between the current event and historical events in terms of event type, target, occurrence cycle, duration, and original intensity. ; Step 32: Configure corresponding event templates according to different event types. The event types include: price events, promotion events, advertising events, weather events, public opinion events, holiday events, and supply anomalies. The event templates include: price event templates, promotion event templates, advertising event templates, weather event templates, public opinion event templates, holiday event templates, and supply anomaly templates. Step 33: Generate template parameters for each type of event template using any of the following methods: (1) Default parameters are preset by business rules; (2) The mean parameter is obtained from the historical event sample database; (3) Recommended parameters are obtained by backtracking from similar historical events; (4) Correction parameters are entered manually through the configuration interface; Step 34: For any event Based on event status and triggering cycle Preheating time Duration of main impact Rollback duration and confidence level To determine whether the event should enter the correction path, the specific rules are as follows: (1) If the event has been collected but has not yet entered the active event range, or the confidence level of the event is low. If the confidence level is lower than the preset confidence threshold, the event is in a pending confirmation or pending activation state and will not be included in the active event set. (2) If the current forecast period satisfy: If the event is in the warm-up phase, it enters the active event set and the event template value of the warm-up phase is calculated. (3) If the current forecast period satisfy: If the event is in the main impact phase, it enters the active event set, and the event template value for the main impact phase is calculated. (4) If the current forecast period satisfy: If the event is in the rollback phase, it enters the active event set and the event template value for the rollback phase is calculated. (5) If the current forecast period satisfy: If the event status is updated to canceled, invalid, or closed, the event will no longer be included in the active event set; Step 35: A correction task will be automatically generated when any of the following occurs: (1) New events enter the correction link: After the new events are standardized and encoded, if the confidence of the encoded new events is not less than the preset confidence threshold and its active event range overlaps with the prediction period, then the correction calculation is triggered. (2) The event status changes: When the event changes from pending to effective, from effective to canceled, from the main impact stage to the rollback stage, or when the start time, end time, event direction or original intensity of the event changes, the standardized template parameters of the event are regenerated and the corresponding prediction cycle is recalculated. (3) Template parameter update: When the warm-up time of a certain type of event template is updated. Duration of main impact Rollback duration Basic impact range or attenuation coefficient When adjusted, future unfinished events using that event template are filtered, and their event template values and correction results are recalculated. (4) Baseline demand value is recalculated: When the baseline demand value of the target object changes in certain forecast periods, the baseline demand value of the corresponding forecast period is reread, and the event increment value and the corrected demand value are recalculated in combination with the active events in that forecast period. (5) Actual sales data feedback and template update: After the actual sales data feedback, the deviation rate is calculated; if the deviation rate exceeds the preset deviation rate threshold, the template parameter update process is entered, and the prediction cycle of related events is recalculated after the template parameter update. Step 36: After triggering the correction task, determine the affected target objects and the affected prediction periods, and identify the objects that need to be recalculated; (1) For the affected target object, the judgment is made according to the target object in the event-cycle record: if the target object of the event is a single SKU, then only the SKU is recalculated; if the target object of the event is a category, channel, region or store, then the subordinate SKU, category or channel combination is found through the object mapping relationship, and only the target object is recalculated. (2) For the affected forecast period, based on the event Triggering cycle Preheating time Duration of main impact and rollback duration The local recalculation range that needs to be recalculated is determined as follows: Recalculation is only performed on the forecast period covered by the event during the warm-up phase, main impact phase, and rollback phase; (3) If the triggering reason is that the baseline demand value is recalculated, then only the target object and the forecast period whose baseline demand value has changed will be recalculated; if the triggering reason is that the template parameter is updated, then only the event that uses the template and is still in the local recalculation range will be recalculated.
5. The event-driven demand modification method for promotions and emergencies as described in claim 4, characterized in that, Step 4 specifically includes: Step 41: For objects that need to be recalculated, based on the current forecast period... With the The triggering cycle of an event The relative positions between them are used to calculate the first... Offset of each event: ;in, For the first The prediction period is relative to the first The triggering cycle of an event The offset between; Step 42, according to the The warm-up time for each event Duration of main impact Rollback duration attenuation coefficient and offset Calculate the first The event in the 1st Event template values within a prediction period The formula is as follows: ; Step 43: Calculate the relative impact of a single event by selecting the corresponding template value based on the event's periodic integrity. (1) When the event is a non-integer period event, the effective template value calculated by the coverage ratio shall be used. Participating in the calculation of the relative impact of a single event; specifically: The first The event direction corresponding to each event Basic impact range Confidence level Historical similarity and valid template values Multiply to get the first The event in the 1st Relative impact of a single event over a forecast period This results in a single-event correction; the relative impact of the single event... The formula is as follows: Wherein, the relative impact of a single event is used to reflect the relative adjustment strength of a single event to demand within a single period. If A value greater than 0 indicates a pulling effect on demand; if... <0 indicates a suppressive effect on demand; if =0 indicates that it has no effect on the demand; (2) When the event belongs to the whole cycle event, the event template value is used. Participating in the calculation of the relative impact of a single event; specifically: The first The event direction corresponding to each event Basic impact range Confidence level Historical similarity and event template values Multiply to get the first The event in the 1st Relative impact of a single event over a forecast period This results in a single-event correction; the relative impact of the single event... The formula is as follows: 。 6. The event-driven demand modification method for promotions and emergencies as described in claim 5, characterized in that, Step 5 specifically includes: Step 51: When multiple active events exist within the same target object and the same prediction period, let the first... The set of active events within each prediction period is According to the Priority of events Confidence level Similarity to history Calculate the first The event in the 1st Synthetic weights over each prediction period : in, Preset positive number and <0.01; For active event set Index of active events in the middle, For the first The priority of each active event For the first Confidence level of an active event For the first Historical similarity of active events; Step 52: Based on the synthesized weights Relative impact of a single event Calculate the first Comprehensive event correction coefficient for each forecast period The formula is: in, To positively adjust the upper limit, This is a negative correction upper limit. This is a truncation function.
7. The event-driven demand modification method for promotions and emergencies as described in claim 6, characterized in that, Step 6 specifically includes: Step 61, according to the first Baseline demand for each forecast period and comprehensive event correction coefficient Calculate the first Event increment value per prediction period The formula is as follows: ; Step 62, according to the first Baseline demand for each forecast period and event increment value Calculate the first Corrected demand value for each forecast period The formula is as follows: 。 8. The event-driven demand modification method for promotions and emergencies as described in claim 7, characterized in that, Step 8 specifically includes: Step 81: Obtaining actual sales figures After that, the first Actual sales for the forecast period Compared with the revised demand value Compare and calculate the first Deviation rate per prediction period The formula is: in, Indicates taking The maximum value between 1 and 2; Step 82: When the deviation rate exceeds the preset deviation rate threshold, it is determined that the current template parameters need to be updated; after the update conditions are met, at least one of the template parameters of the event-corresponding template, such as the basic influence amplitude, main influence duration, backtracking duration, or attenuation coefficient, is updated, and the updated template parameters are written back to the template parameter library.
9. The event-driven demand modification method for promotions and emergencies as described in claim 8, characterized in that, In step 82, the basic impact magnitude of the event-corresponding template is updated. The update process is as follows: (1) Calculate the basic impact range of the target The formula is: in, For the event The set of monitoring cycles; (2) Based on the learning rate The updated base impact magnitude The formula is: 。
Citation Information
Patent Citations
Commodity sales volume prediction analysis method and system based on big data
CN120894070A
Long-tail SKU sales prediction method and system
CN121414416A