A merchant store passenger flow prediction method based on intelligent analysis

The intelligent analysis-based method for predicting customer traffic at merchant stores utilizes a sliding window and time-domain decomposition operators to monitor and adjust the feature weights of the prediction model. This solves the problems of uncontrolled oscillations and logical lag in the model under sudden disturbances, achieving rapid reset and stable prediction results.

CN122434595APending Publication Date: 2026-07-21HANGZHOU PASSING NETWORK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HANGZHOU PASSING NETWORK CO LTD
Filing Date
2026-06-23
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

Existing merchant store customer traffic prediction models suffer from insufficient residual feature identification due to feedback adjustment mechanisms when facing sudden external disturbances. They are unable to distinguish between random impulse noise and trend shifts, resulting in uncontrolled oscillations of model parameters under complex disturbance environments. Logical lag and coupling of long and short residual components interfere with global trend stability, and increased computational complexity easily triggers the risk of overfitting.

Method used

By constructing a prediction method based on intelligent analysis, a moving sliding window is used to monitor the algebraic sign of the instantaneous residual term, generate the cumulative deviation state value, calculate the moving variance to determine the feedback smoothing operator, and monitor the instantaneous correction gain to adjust the internal feature weights of the prediction model when the residual sign reverses. The trend deviation and transient disturbance components are decoupled using the time-domain decomposition operator, and a differentiated adjustment step size is set to establish a dynamic damping mechanism for the feedback gain.

Benefits of technology

It enables rapid reset of the prediction model after disturbance elimination, improves the operational stability and cross-scale matching accuracy of prediction logic in complex business noise environments, and ensures that the system captures short-term business pulses while avoiding short-term fluctuations from misleading long-term trends.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122434595A_ABST
    Figure CN122434595A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of big data analysis, and discloses a merchant store passenger flow prediction method based on intelligent analysis, which comprises the following steps: acquiring measured passenger flow data sequences and external disturbance feature vectors of a store to be predicted; calculating an instantaneous residual term generated by a prediction model; monitoring the algebraic sign of the instantaneous residual term by using a moving sliding window, and recursively generating a deviation cumulative state value when the algebraic sign is consistent; determining a feedback smoothing operator according to the moving variance of the instantaneous residual term, and correcting the deviation cumulative state value; monitoring the sign inversion state of the instantaneous residual term, triggering compensation release when the deviation cumulative state value exceeds a reset threshold, adjusting the feature weight of the prediction model by using the generated instantaneous correction gain, and outputting a prediction result; and through the deviation accumulation and directional release mechanism, the prediction lag defect after the elimination of external disturbance is eliminated, and the rapid reset of the prediction water level is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of big data analytics, and more specifically, to a method for predicting customer traffic in merchant stores based on intelligent analytics. Background Technology

[0002] Current retail practices extract data from heterogeneous data such as historical transaction records, promotional plans, weather characteristics, and holiday distributions. They then use recurrent neural networks or long short-term memory networks to construct nonlinear mapping models, outputting predictions of store traffic flow for specific future periods. The models adjust parameter weights based on changes in input features to track store traffic trends. However, store traffic data exhibits non-stationary characteristics. When stores encounter sudden external disturbances, such as temporary traffic control or sudden rainfall, a phase lag occurs between the predicted curve and the measured water level. Existing closed-loop feedback mechanisms typically feed back the residuals directly to correct the model gain when dealing with such disturbances. Because the feedback loop lacks the ability to recognize the recovery inertia of disturbances, the system is prone to overfitting during disturbances. After the disturbance is eliminated, the model weights cannot instantly return to the normal water level from the disturbance state, resulting in long-term deviations in the predicted output during the recovery period.

[0003] Specifically, existing technologies suffer from the following main shortcomings: 1. The feedback adjustment mechanism lacks sufficient ability to identify residual characteristics, failing to distinguish between random impulse noise and trend shifts, leading to uncontrolled oscillations in model parameters under complex disturbance environments; 2. The closed-loop correction process suffers from logical lag. When passenger flow experiences a momentary logical rebound, the model exhibits slow convergence due to the lack of a potential energy compensation mechanism; 3. Long-term and short-term residual components are coupled in the feedback path. Drastic fluctuations in the short term often interfere with the stability of the global trend, limiting the continuity of resource scheduling instructions; while increasing the sampling frequency or stacking model depth can improve fitting ability, it increases the computational load on edge devices and triggers the risk of overfitting. Even if the accuracy of passenger flow sensor acquisition is improved or the model parameter depth is increased, if the control logic... Without establishing a residual evolution logic for potential energy processing, the system still exhibits high response impedance when dealing with sudden changes in passenger flow. For example, Chinese invention patent CN114463054B discloses a method and system for predicting passenger flow in park stores based on a smart card system. This method relies on the historical statistical mean and the linear ratio of real-time passenger flow to calculate the prediction coefficient. The feedback mechanism based on static distribution law is insufficient to correct for drastic environmental changes, and the prediction produces long-term deviations during the disturbance recovery period, failing to overcome the bottleneck of lag compensation. To solve the above technical contradictions, the industry has tried to enhance the fitting ability by increasing the sampling frequency or stacking the model depth. However, analysis has found that simply increasing the computational complexity not only increases the computational load of edge devices but also easily triggers the risk of overfitting, and still cannot eliminate the phase deviation caused by the residual disturbance memory at the mechanistic level.

[0004] Therefore, how to construct a prediction system with residual energy perception and logical rebound correction capabilities to ensure that the model achieves quasi-instantaneous reset after disturbance elimination has become the technical problem to be solved by this invention. Summary of the Invention

[0005] This invention provides a method for predicting customer traffic in merchant stores based on intelligent analysis, comprising the following steps: Step S1: Obtain the measured customer flow data sequence, real-time transaction data sequence, and external disturbance feature vector of the store to be predicted; Step S2: Input the measured passenger flow data sequence into the prediction model, obtain the predicted value, and calculate the instantaneous residual term between the predicted value and the measured value; Step S3: Use a sliding window to monitor the algebraic sign of the instantaneous residual term. When the algebraic sign of the instantaneous residual term remains consistent within the sliding window, recursively accumulate the absolute value of the instantaneous residual term at each sampling time with the preset deviation retention factor to generate a deviation accumulation state value that characterizes the degree of accumulation of historical prediction deviation. Step S4: Calculate the moving variance of the instantaneous residual term within the moving sliding window, and determine the feedback smoothing operator based on the degree of deviation between the moving variance and the preset fluctuation threshold. Use the feedback smoothing operator to perform amplitude-weighted correction on the cumulative deviation state value. Step S5: Monitor the sign change of the instantaneous residual term. When the sign of the instantaneous residual term is reversed and the corrected cumulative deviation state value exceeds the preset reset threshold, trigger the compensation release of the cumulative deviation state value to generate instantaneous correction gain. Use the instantaneous correction gain to adjust the internal feature weights of the prediction model and output the updated store traffic prediction result.

[0006] Preferably, step S4 specifically includes: statistically analyzing the change amplitude of the instantaneous residual term at each sampling point within the moving sliding window, calculating the second moment of the change amplitude to obtain the moving variance; establishing a negative correlation mapping relationship between the moving variance and the feedback smoothing operator; when the moving variance is greater than a preset fluctuation threshold, proportionally reducing the value of the feedback smoothing operator; when the moving variance is not greater than the preset fluctuation threshold, restoring the feedback smoothing operator to a preset baseline value.

[0007] Preferably, in step S3, the calculation rule for the cumulative deviation state value follows the following formula: in, For the present The cumulative state value of the deviation at any given time; The accumulated state value representing the deviation from the previous moment; It is the deviation preservation factor, and its value ranges from 0.8 to 0.95; for The instantaneous residual term at time point.

[0008] Preferably, the prediction model includes a decoupling module based on a time-domain decomposition operator. The method further includes: using a time-domain decomposition operator to decompose the instantaneous residual term into a trend deviation component and a transient disturbance component; mapping the trend deviation component to the global trend weight parameter of the prediction model, and mapping the transient disturbance component to the local attention weight parameter of the prediction model; setting differentiated adjustment step sizes for the global trend weight parameter and the local attention weight parameter, so that the response step size constraint of the global trend weight parameter is greater than the response step size constraint of the local attention weight parameter.

[0009] Preferably, after step S1, the method further includes: calculating the correlation index between the measured passenger flow data sequence and the real-time transaction data sequence; using the correlation index to weight the instantaneous residual term; when the correlation index is lower than a preset correlation threshold, reducing the cumulative increment of the deviation accumulation state value; and when the correlation index is not lower than the preset correlation threshold, maintaining the cumulative increment of the deviation accumulation state value.

[0010] Preferably, in step S5, the specific method for adjusting the internal feature weights of the prediction model using the instantaneous correction gain is as follows: extract the rate of change slope at the sign reversal time of the instantaneous residual term, and use the rate of change slope as the amplitude modulation factor; calculate the correction vector by combining the current value of the cumulative deviation state value, and superimpose the correction vector into the feature mapping layer of the prediction model to perform nonlinear step size correction of the predicted water level.

[0011] Preferably, the internal feature weights include spatial feature weights and temporal feature weights. The step of adjusting the internal feature weights of the prediction model using instantaneous correction gain includes: identifying the type label of the external disturbance based on the external disturbance feature vector; retrieving a preset weight allocation strategy based on the type label; determining the adjustment ratio of spatial feature weights and temporal feature weights; and applying the instantaneous correction gain to the target weight component affected by the external disturbance.

[0012] Preferably, the length of the sliding window is dynamically adjusted according to the data sampling frequency, including: real-time monitoring of the signal envelope characteristics of the measured passenger flow data sequence; decreasing the length of the sliding window when the fluctuation frequency of the signal envelope increases; and increasing the length of the sliding window when the fluctuation frequency of the signal envelope decreases.

[0013] Preferably, the method further includes: establishing an upper limit protection mechanism for the cumulative deviation state value and setting a state saturation value; stopping accumulation and triggering the system stability verification process when the calculated cumulative deviation state value reaches the state saturation value; and executing a global parameter reset instruction if it is determined in the system stability verification process that the sign consistency of the instantaneous residual term is caused by model drift.

[0014] Preferably, after step S5, the method further includes: comparing the prediction results with the measured passenger flow data to generate a prediction accuracy evaluation index; and updating the mapping parameters of the deviation preservation factor and the feedback smoothing operator based on the prediction accuracy evaluation index.

[0015] The embodiments of the present invention have at least the following beneficial effects: 1. In predicting customer traffic at merchant stores, by constructing a virtual logical potential energy composed of instantaneous residual terms, during periods when the system encounters external random disturbances, the residual changes are transformed into energy accumulation rather than directly driving the weight updates of the prediction model. This allows the prediction model to maintain its existing trend inertia during the disturbance period. When the disturbance is eliminated and the residual sign is reversed, the accumulated virtual logical potential energy is released to generate instantaneous compensation gain, thereby enabling the prediction output to be quickly reset in the time domain. This solves the problem of logical lag and phase distortion in the closed-loop prediction mechanism after the disappearance of commercial disturbances.

[0016] 2. By using the moving variance of the residual sequence to characterize the certainty of the current deviation, a dynamic damping mechanism for the feedback gain is established. The feedback weight is automatically adjusted according to the intensity of residual fluctuation. When the moving variance exceeds the preset fluctuation threshold, the feedback gain coefficient is reduced to suppress the interference of random noise on the model parameters. When the moving variance is lower than the fluctuation threshold, the feedback gain coefficient is restored or increased to accelerate trend tracking. This eliminates the erroneous response of the prediction model to high-frequency random pulses and improves the operational stability of the system in complex commercial noise environments.

[0017] 3. By using the time-domain decomposition operator, the instantaneous residual term is recursively decoupled into a trend deviation term and a transient disturbance term. The two types of components are then directed to the global trend weight and local attention parameter of the prediction model, respectively. By setting differentiated adjustment step sizes, the long-period weights are made to have higher logical impedance, thereby achieving physical isolation between long-term and short-term prediction correction actions. This ensures that while the system captures short-term business pulses, it avoids short-term fluctuations from misleading long-term trend prediction levels, thus improving the cross-scale matching accuracy of the prediction logic. Attached Figure Description

[0018] Fig. 1 Flowchart of the method for cumulative correction of store customer traffic forecast deviation; Fig. 2 A schematic diagram of the weight adjustment structure for the store customer traffic prediction model. Detailed Implementation

[0019] The principles and spirit of the present invention will now be described with reference to several exemplary embodiments. It should be understood that these embodiments are provided merely to enable those skilled in the art to better understand and implement the present invention, and are not intended to limit the scope of the present invention in any way. On the contrary, these embodiments are provided to make the present invention more thorough and complete, and to fully convey the scope of the present invention to those skilled in the art.

[0020] This invention provides a method for predicting customer traffic at retail stores based on intelligent analysis. By integrating multi-source data acquisition, instantaneous residual calculation, deviation state accumulation, and logical rebound correction, a closed-loop prediction system with anti-interference and phase self-calibration capabilities is constructed. The method acquires the measured customer traffic data sequence, real-time transaction data sequence, and external disturbance feature vectors of the store to be predicted. Then, it calculates the instantaneous residual term using the predicted value generated by the prediction model and the measured value. Based on the consistency of the residual sign, it recursively generates the deviation accumulation state value in the time domain. Simultaneously, it determines the feedback smoothing operator based on the moving variance of the residual to correct the amplitude of the deviation accumulation state value. When a sign reversal of the residual is detected and the corrected deviation... When the accumulated state value exceeds the reset threshold, the system triggers a compensation release command, adjusts the internal feature weights of the prediction model using the generated instantaneous correction gain, and outputs the prediction result. In the business environment of a merchant store, customer flow data exhibits non-stationary characteristics. When a store encounters sudden external disturbances, such as temporary traffic control, sudden rainfall, or unexpected promotional events, a phase lag occurs between the prediction curve generated by the traditional open-loop model and the measured water level. This technical solution executes a data acquisition procedure, collecting the measured customer flow data sequence, real-time transaction data sequence, and external disturbance feature vector of the store to be predicted. The system uses an infrared customer flow counter deployed at the store entrance to acquire the measured customer flow at a sampling period of 5 minutes. And simultaneously obtain the real-time transaction count of the POS system. Real-time transaction count Before being integrated into the system, the data undergoes hash mapping for desensitization. The external disturbance feature vector includes discrete technical parameters such as meteorological level values, holiday weight coefficients, and surrounding traffic congestion indices. The system maps the above heterogeneous data to a unified spatiotemporal coordinate system, providing a physical benchmark for subsequent residual analysis.

[0021] After acquiring the raw data, the system inputs the feature vectors into a pre-trained Long Short-Term Memory (LSTM) prediction model to obtain the predicted passenger flow for the next sampling period. And calculate the instantaneous residual term Δ between the two, where Due to the presence of random impulse noise in commercial scenarios, relying on a single residual adjustment model can easily lead to system oscillations. To address this challenge, this solution adopts a monitoring method based on deviation energy accumulation. It utilizes a moving sliding window to monitor the algebraic sign change of the instantaneous residual term Δ. When the sign of Δ remains consistent within the sliding window, the system recursively generates the deviation accumulation state value according to the following formula. in, This represents the cumulative deviation state value at time t. The cumulative deviation value at the previous moment; γ is the preset deviation retention factor, which ranges from 0.8 to 0.95. for The instantaneous residual term at time Δ transforms discrete residual fluctuations into continuous logical potential energy, characterizing the duration and systematic deviation of the disturbance. Considering the interference of sensor packet loss or data spikes on the feedback link, the system needs to identify random noise and trend shifts. Therefore, the system calculates the moving variance of the instantaneous residual term Δ within the moving sliding window. The system statistically analyzes the variation amplitude of Δ at each sampling point within the sliding window and calculates its second moment to obtain the moving variance. The system establishes moving variance The negative correlation mapping relationship between the moving variance and the feedback smoothing operator λ, when the moving variance Exceeding the preset fluctuation threshold When the current residual is determined to contain high-frequency random noise, the value of the feedback smoothing operator λ is reduced proportionally. When the moving variance... Below the fluctuation threshold When the time comes, the feedback smoothing operator λ is restored to the preset reference value of 1.0, and the feedback smoothing operator λ is used as a weighting factor on the cumulative deviation state value. The accumulation process suppresses the interference of random noise on model parameters and improves the stability of the prediction system.

[0022] After external disturbances are eliminated, prediction models often experience slow convergence due to the residual effect of historical weights, causing the prediction curve to fail to quickly return to the baseline level. Logistic rebound points are captured by monitoring the sign change of the instantaneous residual term Δ. When a reversal of the sign of Δ is detected, for example, from a sustained positive deviation to a negative deviation, and the current cumulative deviation value... Exceeding the preset reset threshold When the disturbance is determined to be eliminated, the system instantaneously triggers a compensation release command and calculates the instantaneous correction gain δ. The formula for calculating the instantaneous correction gain δ is as follows: Where η is the rebound coefficient, The accumulated state value is the deviation at the current moment. The instantaneous correction gain δ, representing the slope of the residual rate of change at the sign-inversion moment, is applied to the internal feature weight parameters of the prediction model, enabling rapid reset of the prediction output in the time domain and eliminating phase bias caused by residual perturbation memory. When adjusting the internal feature weights of the prediction model using the instantaneous correction gain, the hidden state vector of the prediction model... Before output, a compensation vector of the corresponding dimension is generated based on the instantaneous correction gain δ. The compensation vector is then compared with the hidden state vector at the current time step. Perform element-wise addition to generate the corrected hidden state vector. The components of each dimension of the compensation vector are determined by multiplying the instantaneous correction gain δ with the corresponding feature channel weight sensitivity coefficient. The weight sensitivity coefficient is obtained by performing perturbation sensitivity analysis on each feature channel during the offline training phase, and by analyzing the hidden state vector. Real-time bias correction is performed to drive the displacement of the predicted water level, avoiding the risk of numerical stability caused by directly modifying the internal weight matrix of the model, and enabling the predicted output to quickly align with the benchmark water level after the disturbance is eliminated.

[0023] To optimize prediction accuracy at different time scales, the prediction model incorporates a decoupling module based on time-domain decomposition operators. The system utilizes a recursive filtering algorithm to decompose the instantaneous residual term Δ into trend deviation components. With transient disturbance components Trend deviation component Reflecting long-term passenger flow baseline drift, the system maps it to the global trend weight parameters of the prediction model, sets a small adjustment step size, performs long-term parameter alignment, and handles transient disturbance components. Reflecting short-term business pulses, the system maps them to the local attention weight parameters of the prediction model, setting a large adjustment step size to perform instantaneous deviation compensation. This double-loop recursive mechanism achieves physical isolation between short-term and long-term prediction correction actions at the logical level, ensuring that the system does not interfere with the stability of long-term trends while capturing short-term business fluctuations. When extracting the time-domain decomposition operator, the instantaneous residual term is filtered using a first-order lag filter procedure. Decomposition, trend deviation components The calculation formula is This represents the trend deviation component at the current moment. The trend deviation component is the value of the previous time step, and α is a preset smoothing coefficient, ranging from 0.05 to 0.15, determined by the formula... Extracting transient disturbance components By adjusting the smoothing coefficient α, the cutoff frequency of passenger flow fluctuation signals is controlled, thus reducing the trend deviation component. Includes low-frequency reference drift characteristics and transient disturbance components. It incorporates high-frequency service pulse characteristics, enabling logical isolation between long-cycle weight adjustment and short-time compensation in the frequency domain.

[0024] In the data verification stage, the system introduces real-time transaction data as the basis for consistency judgment, sets up a logical gateway for the feedback link, and calculates the correlation index between the measured passenger flow data sequence and the real-time transaction data sequence. When a sudden change in passenger flow is detected but the transaction density remains stable, the correlation index will decrease. When the residual value falls below a preset consistency threshold, it is determined that the current residual may be caused by non-business-related disturbances. In this case, the system automatically reduces the feedback adjustment coefficient to limit the strength of the residual term's correction to the model weights, allowing the model to maintain its original trend and inertia, pending the correlation index. After recovering to the preset range, the normal weight correction action is resumed. This mechanism utilizes the logical complementarity of multi-source business data to filter out spurious residuals caused by hardware anomalies at the observation end. The system also has an upper limit protection mechanism for the cumulative deviation state value, and the system sets a state saturation value. When the calculated cumulative deviation state value Reaching state saturation value When the system stops accumulating data and triggers a system stability verification process, if the verification determines that the current residual sign consistency is caused by model parameter drift, the system executes a global parameter reset command and loads the historical optimized parameter set. Furthermore, the length of the sliding window is dynamically adjusted according to the data sampling frequency. The system monitors the signal envelope characteristics of the measured passenger flow data sequence; when the fluctuation frequency increases, the sliding window length is reduced to improve sensitivity, and when the fluctuation frequency decreases, the sliding window length is increased. After the prediction process is completed, the system compares the prediction results with the measured data, generates a prediction accuracy evaluation index, and updates the deviation preservation factor γ and the feedback smoothing operator based on this index. The mapping parameters.

[0025] Example 1: In a specific commercial store operation scenario, a retail store located in a city business district encountered sudden road construction in the surrounding area, causing intermittent traffic closures on that section of road during the continuous sampling period. Since this type of sudden disruption was not included in the historical training sample set of the prediction model, the system's measured customer traffic... Compared to the predicted value A persistent negative deviation is generated. The system uses a sliding window to monitor the algebraic sign of the instantaneous residual term Δ in real time. Due to the continuous decline in passenger flow caused by traffic control, the instantaneous residual term Δ remains negative for six consecutive preset sampling periods. Based on the recursive relationship, a cumulative deviation state value is generated. The deviation retention factor γ is set to 0.9, where the cumulative deviation state value is... The recursive generation formula is ,in Let be the cumulative state value of the deviation at time t. Let γ be the cumulative deviation state value from the previous time step, and γ be the deviation preservation factor. The absolute value of the instantaneous residual term at time t is the accumulated state value through the deviation. Quantify persistent deviations.

[0026] When the road construction is completed and traffic resumes, the number of customers entering the store changes drastically in a short period of time, causing the algebraic sign of the instantaneous residual term Δ to reverse from negative to positive. At this time, the system detects the reverse change of the residual sign and the accumulated deviation value. Reset threshold reached The system determines that it has entered the rebound phase and triggers a compensation release command. It extracts the slope k of the residual rate of change from the sign inversion moment and combines it with the deviation accumulation state value. The instantaneous correction gain δ is generated, and the formula for calculating the instantaneous correction gain δ is as follows: Where δ is the instantaneous correction gain and η is the springback coefficient. The cumulative state value of the deviation at the current moment is given by δ, and k is the slope of the residual change rate at the sign reversal moment. This instantaneous correction gain δ is applied to the internal feature weight parameters of the prediction model, enabling the prediction output to be quickly reset in the time domain. Through the accumulation and directional release of the above logical potential energy, the system logically isolates the prediction model's sensitivity to short-term fluctuations from the stability of the global trend. By introducing the deviation energy quantification dimension, the correction method of real-time compensation of residuals in the feedback mechanism is changed, enabling the system to solve the contradiction between fitting accuracy and convergence speed by recognizing disturbances and restoring inertia. This gives the prediction system the adaptive recovery capability based on state awareness.

[0027] Example 2: In a specific urban large-scale commercial complex store operation scenario, to verify the adaptive recovery capability and prediction accuracy of this technical solution under complex external disturbance environments, the experimental group was built on a physical monitoring platform including a binocular vision sensor and a POS transaction system. The detection accuracy of the binocular vision sensor was no less than 0.98, and the sampling frequency was set to 10Hz to ensure complete capture of the customer flow trajectory. The measured customer flow data sequence was obtained from the sensor, and the real-time transaction data sequence was synchronously retrieved from the de-identified interface of the POS system. Through time alignment processing, the heterogeneous data was mapped to a unified spatiotemporal coordinate system. The setting of the core parameter sampling period was based on the real-time performance of the data and... Considering the balance of system computational load, the time was set to 5 minutes in this test scenario. When the frequency of signal envelope fluctuation of the measured passenger flow data sequence was high, in order to ensure the accuracy of pulse fluctuation perception, the sampling period tended to the lower limit of its value range. The value of the deviation retention factor γ was determined to be 0.9 based on the calibration of the historical passenger flow resilience characteristics of the store. This value was used to balance the accumulation rate of logical potential energy and the suppression effectiveness of random noise. When the signal-to-noise ratio decreased, the parameter tended to the upper limit of its value range. In order to simulate real industrial application conditions, Gaussian white noise with a signal-to-noise ratio of 20dB was actively superimposed in the test signal source, and power frequency interference with a frequency of 50Hz was introduced.

[0028] The experiment involved setting up the sample group of this invention, control group one (using the traditional open-loop prediction method of long short-term memory networks), and control group two (removing the cumulative bias state value). The immediate compensation method for the calculation steps, and the out-of-range control group with a deviation retention factor γ of 0.5 were compared and tested. During the period of negative passenger flow deviation caused by external rainfall, the original input data faced by each group was the measured passenger flow. Compared to the predicted value The resulting persistent deviation, with the average deviation of the measured passenger flow reaching 112.5 person-times and the algebraic sign of the instantaneous residual term Δ remaining negative for 12 consecutive sampling periods, is addressed by the sample group in this invention based on the recursive formula. Generate cumulative deviation state value ,in The accumulated state value is the deviation at the current moment. Let γ be the cumulative deviation state value from the previous time step, and γ be the deviation preservation factor. The absolute value of the instantaneous residual term represents the moving variance calculated by the system, given the high degree of certainty in the deviation caused by rainfall. Within the preset fluctuation threshold Hereinafter, the feedback smoothing operator λ is set to a baseline value of 1.0 to ensure that the logic potential energy fully records the total systematic deviation during the disturbance.

[0029] When the rainfall disturbance subsides and the measured passenger flow experiences a pulse-like rebound, causing the algebraic sign of the instantaneous residual term Δ to change from negative to positive, the sample group of this invention monitors the residual sign reversal and the deviation accumulation state value. Reset threshold reached The system triggers a compensation release command, extracts the slope k of the residual rate of change at the sign reversal moment, and combines it with the cumulative deviation state value. The instantaneous correction gain δ was calculated. Actual measurement data showed that the predicted output of the sample group of this invention coincided with the measured water level curve within 1.2 sampling periods, and the MAPE mean square percentage error converged to 4.2%. In contrast, the regression time of control group one was extended to 8.4 sampling periods, demonstrating the synergistic effect of the residual energy quantification mechanism in solving phase lag. Control group two, lacking a potential energy accumulation process, experienced severe oscillations in its predicted output after interference elimination, with a MAPE error reaching 15.3%. Verification results regarding parameter boundaries showed that control group three, due to the deviation of the bias retention factor γ from the optimal working window of 0.8 to 0.95, experienced a 40.5% decrease in logic potential energy accumulation efficiency, resulting in insufficient correction vector amplitude and an extended reset time to 5.2 sampling periods. When external interference... After the disturbance intensity increased by 10%, the accuracy of the control group showed a nonlinear degradation of 28.5%, while the sample group of this invention achieved dynamic damping of random noise through the feedback smoothing operator λ driven by the moving variance, and its prediction accuracy fluctuation was controlled within the order of 1.5%. This experiment, through closed-loop verification of the original input, intermediate logic data and final prediction results, confirmed that the residual energy perception and logic rebound correction method adopted in this invention can effectively suppress non-stationary disturbances in commercial scenarios. The experimental data and its changing trends show that the synergistic operation of the deviation preservation factor γ and the feedback smoothing operator λ can suppress the uncontrolled accumulation of random measurement errors while achieving rapid disturbance capture. The dynamic consistency between the prediction accuracy index output by the system and the measured passenger flow level confirms the stability of the scheme under extreme conditions.

[0030] Example 3: This example combines Figs. 1-2 This section describes a method for predicting customer traffic in merchant stores based on intelligent analysis, such as... Fig. 1As shown, the system first executes step S1 to obtain the measured customer flow data sequence, real-time transaction data sequence, and external disturbance feature vector of the store to be predicted. Then, step S2 is executed to input the measured customer flow data sequence into the prediction model to obtain the predicted value and calculate the instantaneous residual term between the predicted value and the measured value. Then, step S3 is executed to use the algebraic sign of the instantaneous residual term within the monitoring moving window. When the signs are consistent, the absolute value and the deviation retention factor are recursively accumulated to generate the deviation accumulation state value. Then, step S4 is executed to calculate the moving variance of the instantaneous residual term and determine the feedback smoothing operator. The deviation accumulation state value is corrected by amplitude weighting using this operator. Finally, step S5 is executed to trigger compensation release when the residual sign is reversed and the state value exceeds the limit to generate instantaneous correction gain. The gain is used to adjust the feature weights of the prediction model and output the prediction result.

[0031] like Fig. 2 As shown, the system extracts and adjusts the measured passenger flow data sequence during feature extraction and weight adjustment. Real-time transaction data sequence and external disturbance feature vectors containing weather level and promotion weights. Concatenate into a multidimensional feature matrix And input it into the input gate unit of the prediction model, using the weight matrix Feature matrix A linear transformation is performed to determine the activation state of the input gate, while the instantaneous residual terms are decomposed using a time-domain decomposition operator. Decomposed into trend deviation components and transient disturbance components and the trend deviation component The transient disturbance components are mapped to the global trend weight parameters of the prediction model. Mapping these parameters to the local attention weights of the prediction model to set differentiated adjustment step sizes, when instantaneous residual terms are detected. The algebraic sign is flipped and the deviation accumulates to the state value. Reaching the preset reset threshold Calculate instantaneous correction gain and instantaneous correction gain As a compensation operator, it is directly superimposed onto the original hidden state vector of the Long Short-Term Memory network at the current time step within the prediction model. The process involves performing element-wise addition to generate a corrected hidden state vector. It drives the predicted water level to generate a nonlinear displacement to the measured water level through real-time bias correction and outputs the updated store traffic prediction results.

[0032] Example 4: In a specific merchant store operation scenario, the system faces the technical problem of insufficient adaptability between the prediction model parameters and the store's customer flow fluctuation characteristics. The system initiates the parameter calibration procedure, retrieves the historical residual distribution sequence of the store for the previous 7 natural days, calculates the mean μ and standard deviation σ of the historical residual distribution sequence, and resets the threshold. Determined as This parameter determination logic is used to distinguish between random measurement noise and systematic bias using statistical probability distributions, ensuring that the trigger point for the reset action is established on a store-specific business benchmark, with a state saturation value. The value of is determined by the register bit width of the system processor and gradient stability constraints to prevent computational overflow caused by the recursive accumulation process; a preset reset threshold is also included. With preset fluctuation threshold During calibration, the system retrieves the historical residual distribution sequence of the store to be predicted for the previous 7 natural days, calculates the mean μ and standard deviation σ of the sequence, and sets the preset reset threshold. Set as As a statistical criterion for identifying systematic shifts; statistically analyzing the moving variance under unperturbed steady-state conditions. The probability distribution will be based on a preset fluctuation threshold. Calibration as moving variance 95th percentile, real-time calculation of moving variance When the threshold is exceeded, the system reduces the value of the feedback smoothing operator λ to decrease the control gain of the feedback loop and reduce the impact of random measurement noise at the observation end on the cumulative deviation state value. Intervention ensures that the physical properties of the accumulated deviation are driven only by the intensity of real business disturbances.

[0033] During data processing, the system executes a feature extraction procedure, converting the measured passenger flow data sequence... Real-time transaction data sequence and external disturbance feature vectors containing weather level and promotion weights. The features are concatenated into a multidimensional feature matrix X, which is then input into the input gate unit of the prediction model. The system utilizes the weight matrix... Perform a linear transformation on the feature matrix X to determine the activation state of the input gate, when an instantaneous residual term is detected. The algebraic sign is flipped and the deviation accumulates to the state value. Reset threshold reached At that time, the system calculates the instantaneous correction gain δ, which is then directly superimposed onto the hidden state vector of the long short-term memory network within the prediction model as a compensation operator. In this context, the update logic follows the formula below: in, This is the corrected hidden state vector. δ is the hidden state vector of the original output of the prediction model at the current moment, and δ is the instantaneous correction gain. This process drives the predicted water level to generate a nonlinear displacement to the measured water level by intervening in the internal memory flow direction of the model.

[0034] The system simultaneously monitors the cumulative deviation status value while performing the above corrective actions. Has the state saturation value been reached? ,when achieve At that time, the system truncates the recursive accumulation process and triggers the stability verification module. The stability verification module extracts the first derivative of the instantaneous residual term Δ within the sliding window and calculates the residual change rate. If it is continuously lower than the preset stability threshold, the system determines that the model has parameter drift and sends a reset command to the controller to load the historical optimized parameter set. Experimental data show that after applying the calibration procedure and state correction path, the system's reset delay after external interference is eliminated is controlled within a single sampling period, and the deviation between the predicted value and the measured water level is controlled within 5%.

[0035] Example 5: In a specific merchant store deployment scenario, the system executes an initialization calibration procedure to determine the basic operating parameters of the prediction model. It calculates the second moment of the average daily customer flow by reading the original customer flow sequence of the store for the previous 30 natural days, and then uses the coefficient of variation... The mapping relationship with the deviation preservation factor γ determines the initial parameters of the store. The coefficient of variation Defined as the ratio of standard deviation σ to mean μ, this process establishes a quantitative correlation between the historical fluctuation characteristics of stores and the rate of accumulation of logical potential energy. By mapping historical fluctuation characteristics to feedback gain control operators within the prediction model, the prediction system achieves benchmark alignment for specific business characteristics before formal operation.

[0036] The system determines the state saturation value based on the initialization calibration procedure. With reset threshold The initial baseline value is obtained by using the maximum residual jump variable of the perturbation recovery phase from historical data. As a quantitative indicator, the reset threshold Set as A compensation mechanism is implemented to suppress false triggering of the prediction system caused by random impulse noise, with a 1.2 times higher threshold, and a preset state saturation value is established in the computation unit. As the upper bound of the function of the bias maintenance factor γ and the sum of the absolute values ​​of historical residuals, after accessing the real-time data stream, the system monitors the slope of the real-time residual change through the logic component and compares it with the initial benchmark value. If the centroid of the residual distribution deviates from the initial mean by more than the preset range within three consecutive evaluation periods, an update command is sent to the prediction model parameter interface.

[0037] Example 6: In the deployment scenario of newly opened community retail stores, the system faces challenges such as the setting deviation of the feedback smoothing operator λ caused by the lack of feature benchmarks and the collaborative correlation index. In response to the challenges of instability and to eliminate deterministic obstacles in the functional logic during the initial application phase, the system executes a standardized pre-calibration procedure by acquiring a 24-hour continuous sampling sequence of measured customer flow data from the stores to be predicted. Extract the background signal components during business hours and calculate the moving variance of the instantaneous residual term Δ. And statistically analyze the probability distribution, and set the fluctuation threshold. Calibration as moving variance The upper bound of the 95% confidence interval under unperturbed steady state is calculated, along with the measured passenger flow data sequence. With real-time transaction data sequences The correlation coefficient between them determines the synergistic correlation index. The operating reference benchmark.

[0038] After receiving the real-time data stream, the system uses a logical judgment unit to evaluate the collaborative correlation index. Dynamic monitoring is implemented. When a non-business-related drop in actual passenger flow is detected due to hardware sensor obstruction, while transaction density remains stable, the collaborative correlation index is affected. When the dispersion from the operating reference exceeds a preset threshold of 0.2, the current instantaneous residual term Δ is determined to be a non-operational anomaly signal. At this time, the system forcibly locks the feedback smoothing operator λ in the low-order interval below 0.1 through control commands, truncating the interference signal towards the deviation accumulation state value. The transmission path, pending the recovery of the sensor's field of view and the cooperative correlation index Once the system returns to the tolerance range of the operating reference baseline, it resumes the feedback update procedure for the feature weights of the prediction model.

[0039] The above description is only a few preferred embodiments of the present invention and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present invention is not limited to the technical solutions formed by a specific combination of the above-mentioned technical features, but should also cover other technical solutions formed by any combination of the above-mentioned technical features or their equivalent features without departing from the above-mentioned inventive concept. For example, technical solutions formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in the embodiments of the present invention.

Claims

1. A method for predicting customer traffic in merchant stores based on intelligent analysis, characterized in that, Includes the following steps: Step S1: Obtain the measured customer flow data sequence, real-time transaction data sequence, and external disturbance feature vector of the store to be predicted; Step S2: Input the measured passenger flow data sequence into the prediction model, obtain the predicted value, and calculate the instantaneous residual term between the predicted value and the measured value; Step S3: Use a sliding window to monitor the algebraic sign of the instantaneous residual term. When the algebraic sign of the instantaneous residual term remains consistent within the sliding window, the system is determined to be in a disturbance state. The system is then recursively accumulated based on the absolute value of the instantaneous residual term at each sampling time and the preset deviation retention factor to generate a deviation accumulation state value that characterizes the degree of historical prediction deviation accumulation and has logical reset potential. Step S4: Calculate the moving variance of the instantaneous residual term within the moving sliding window, and determine the feedback smoothing operator based on the degree of deviation between the moving variance and the preset fluctuation threshold. Use the feedback smoothing operator to perform deterministic damping amplitude weighted correction on the cumulative deviation state value. Step S5: Monitor the sign change of the instantaneous residual term. When the sign of the instantaneous residual term reverses and the corrected cumulative deviation state value exceeds the preset reset threshold, it is determined that the disturbance has been eliminated. Trigger the compensation release of the cumulative deviation state value to generate instantaneous correction gain. By extracting the slope of the residual change at the moment of sign reversal as the modulation factor, the internal feature weights of the prediction model are adjusted using the instantaneous correction gain. Perform nonlinear step size correction of the prediction water level and output the updated store traffic prediction result.

2. The method for predicting customer traffic in a merchant store based on intelligent analysis according to claim 1, characterized in that, Step S4 specifically includes: statistically analyzing the change amplitude of the instantaneous residual term at each sampling point within the moving sliding window, calculating the second moment of the change amplitude to obtain the moving variance; establishing a negative correlation mapping relationship between the moving variance and the feedback smoothing operator; when the moving variance is greater than the preset fluctuation threshold, proportionally reducing the value of the feedback smoothing operator; when the moving variance is not greater than the preset fluctuation threshold, restoring the feedback smoothing operator to the preset baseline value.

3. The method for predicting customer traffic in a merchant store based on intelligent analysis according to claim 1, characterized in that, In step S3, the calculation rule for the cumulative deviation state value follows the following formula: ,in, For the present The cumulative state value of the deviation at any given time; The accumulated state value representing the deviation from the previous moment; It is the deviation preservation factor, and its value ranges from 0.8 to 0.95; for The instantaneous residual term at time point.

4. The method for predicting customer traffic in a merchant store based on intelligent analysis according to claim 1, characterized in that, The prediction model has a decoupling module based on time-domain decomposition operators. The method also includes: using time-domain decomposition operators to decompose the instantaneous residual term into trend deviation components and transient disturbance components; mapping the trend deviation components to the global trend weight parameters of the prediction model, and mapping the transient disturbance components to the local attention weight parameters of the prediction model; setting differentiated adjustment step sizes for the global trend weight parameters and the local attention weight parameters, so that the response step size constraint of the global trend weight parameters is greater than the response step size constraint of the local attention weight parameters.

5. The method for predicting customer traffic in a merchant store based on intelligent analysis according to claim 1, characterized in that, Step S1 is followed by: calculating the correlation index between the measured passenger flow data sequence and the real-time transaction data sequence; using the correlation index to weight the instantaneous residual term; when the correlation index is lower than the preset correlation threshold, reducing the cumulative increment of the deviation cumulative state value; when the correlation index is not lower than the preset correlation threshold, maintaining the cumulative increment of the deviation cumulative state value.

6. The method for predicting customer traffic in a merchant store based on intelligent analysis according to claim 1, characterized in that, In step S5, the specific method for adjusting the internal feature weights of the prediction model using instantaneous correction gain is as follows: extract the slope of the rate of change at the sign reversal time of the instantaneous residual term, and use the slope of the rate of change as the amplitude modulation factor. The correction vector is calculated by combining the current numerical value of the cumulative deviation state value, and then superimposed on the feature map layer of the prediction model to perform nonlinear step size correction of the predicted water level.

7. The method for predicting customer traffic in a merchant store based on intelligent analysis according to claim 1, characterized in that, The internal feature weights include spatial feature weights and temporal feature weights. The steps for adjusting the internal feature weights of the prediction model using instantaneous correction gain include: identifying the type label of the external disturbance based on the external disturbance feature vector; retrieving the preset weight allocation strategy based on the type label; determining the adjustment ratio of spatial feature weights and temporal feature weights; and applying the instantaneous correction gain to the target weight components affected by the external disturbance.

8. The method for predicting customer traffic in a merchant store based on intelligent analysis according to claim 1, characterized in that, The length of the sliding window is dynamically adjusted according to the data sampling frequency, including: real-time monitoring of the signal envelope characteristics of the measured passenger flow data sequence; decreasing the length of the sliding window when the fluctuation frequency of the signal envelope increases; and increasing the length of the sliding window when the fluctuation frequency of the signal envelope decreases.

9. The method for predicting customer traffic in a merchant store based on intelligent analysis according to claim 1, characterized in that, The method also includes: establishing an upper limit protection mechanism for the cumulative deviation state value and setting a state saturation value; stopping accumulation and triggering the system stability verification process when the calculated cumulative deviation state value reaches the state saturation value; and executing a global parameter reset instruction if it is determined in the system stability verification process that the sign consistency of the instantaneous residual term is caused by model drift.

10. The method for predicting customer traffic in a merchant store based on intelligent analysis according to claim 1, characterized in that, Step S5 and beyond includes: comparing the prediction results with the measured passenger flow data to generate a prediction accuracy evaluation index; and updating the mapping parameters of the deviation preservation factor and the feedback smoothing operator based on the prediction accuracy evaluation index.