A method and system for predicting car sales
Patent Information
- Application Number
- CN202611168458.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-03
- Publication Date
- 2026-10-16
AI Technical Summary
[0005]然而,上述思路若直接沿用于深度序列架构,并未解决表格时序预测中 GBDT 树学习器不可微、残差通道需要与树输出耦合、训练和推理需保持确定性可复核等问题
LDCHR 同时保留精确局部窗口、中程 Top-K 稀疏检索和远程加权摘要,使模型能够在不同样本和轮次上选择相关历史块。
Smart Images

Figure CN122928408A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence technology, and in particular to a method and system for predicting automobile sales. Background Technology
[0002] In business scenarios such as automobile sales, retail inventory management, and supply chain optimization, accurate forecasting of sales volume for specific vehicle models over the next few months has significant commercial value. Sales series typically exhibit strong seasonality, promotional responses, competitor influences, and long-term trend changes, and historical observations include both recent local fluctuations and cross-year structural patterns.
[0003] Therefore, GBDT and its variants are widely used in this type of task because they can handle non-linear splits, categorical features, missing values, and small to medium sample tabular data. Traditional GBDT time series schemes typically rely on manually constructed lag features, moving averages, holiday features, and residual iteration methods, but their utilization of long historical dependencies is mainly determined by a fixed window, making it difficult to dynamically select truly relevant historical segments for each sample and each boosting round.
[0004] Existing long sequence prediction methods typically handle long contexts through compressed memory, state recursion, or hierarchical summarization structures. Among these, hierarchical compression and sparse selection of long histories, applying stability constraints such as double randomization to the residual propagation matrix, and using approximate orthogonalization to update large matrix parameters can improve long dependency modeling capabilities and training stability.
[0005] However, directly applying the above approach to deep sequence architecture does not solve problems in tabular time series prediction such as the non-differentiability of the GBDT tree learner, the need for coupling of residual channels with the tree output, and the requirement for deterministic and verifiable training and inference. Directly migrating deep model structures to business prediction scenarios often leads to high training costs, high data volume requirements, and poor compatibility with existing GBDT production pipelines.
[0006] Currently, there are solutions that combine the two, but existing GBDT and neural network combinations also have shortcomings: First, ordinary GBDT residual iteration only accumulates tree results in the output space and cannot perform stable and interpretable dynamic mixing on potential residual channels. Second, although deep long-context models have compression retrieval capabilities, they are costly and complex to deploy when directly used for tabular time series prediction, and are difficult to train in a unified manner with the non-differentiable tree structure of GBDT. Third, existing hybrid models lack normalization processing for the tree target scale, and dynamic gating will change the residual injection scale, leading to training instability. Fourth, the continuous controller, history compressor, and indexer lack stable optimization mechanisms suitable for matrix parameters, which can easily lead to slow convergence or degradation of parameter update direction.
[0007] In summary, several problems can easily arise when forecasting car sales. For example, car sales are affected by long-term factors (e.g., 3-5 years) such as annual model updates, changes in emission standards, and subsidy policies, while the aforementioned methods are better at capturing recurring short-term patterns. For policy shocks that only occur every few years, compressed memory cannot retain complete signals, and retrieval may mismatch normal years, leading to forecasting bias. Furthermore, there is clear intra-brand competition (such as SUVs and sedans from the same brand being mutually exclusive) and inter-brand competition in car sales. The aforementioned methods may be overly personalized, masking the consistency of competition across samples.
[0008] The above content is only used to help understand the technical solution of the present invention and does not represent an admission that the above content is prior art. Summary of the Invention
[0009] This invention provides a method for predicting automobile sales, comprising: acquiring sample data of automobile sales, the sample data including long historical data. , Given covariates; Based on long-term historical data , Build memories, and rebuild them when refresh conditions are met; Initial context for encoding samples in sample data And based on the initial context Generate multi-channel prediction state ; Constructing tree features and normalized tree target To construct tree sequences ; Save the memory and tree sequence to generate the construction result, and output the sales forecast result based on the construction result.
[0010] Furthermore, the following steps are also included: initializing the LDCHR history compressor. Low-rank query / key indexer DMSRC Generator Initial state function InitState; From long historical data , Building Mid-Channel Block Memory Remote summary memory ; For each sample Encoding Initial Context The initial state function InitState is based on the initial context. Generate C×H multichannel prediction state ; As the main body; For time; C represents the number of residual channels; H represents the prediction step size; For each round When the refresh conditions are met, rebuild the intermediate block memory. Remote summary memory ; Encoding Context Vector Generate mapping , , Constructing tree features and normalized tree target Fitting a multi-output GBDT tree ,renew And update the continuous controller through the OMMO inner loop; Save intermediate block memory Remote summary memory LDCHR History Compressor Low-rank query / key indexer DMSRC Generator Initial state function InitState and tree sequence ; Encode the initial context and initialize the new sample Call the tree sequence in sequence ; Each round re-encodes the LDCHR context to generate a DMSRC mapping. , , Construct tree features and update channel states ; Output ; This is for the operation of taking the average.
[0011] Furthermore, it also includes the following steps: Long-term historical data is divided into precise local windows and mid-range block memory. Remote summary memory ; Precise local window retains recent One lag value; Mid-range block memory by Established for block length; Remote summary memory by Established for block length; Greater than .
[0012] Furthermore, constructing mid-range block memory Remote summary memory The formula used is:
[0013] ; This is a vector of mid-range memory values; For mid-range memory key vectors; A vector of remote memory values; For remote memory key vectors; It is a medium-range compression encoder; For remote compression encoders; For key generator; Subject s at a historical point in time Sales target value; Subject s at a historical point in time covariates; An index for historical time points; This is the b-th intermediate time block; This is the b-th remote time block.
[0014] Furthermore, regarding the samples When there is an existing channel status Then construct a state summary ; Query vector It is generated from current covariates, calendar features, local window statistics, and state summary, using the following formula:
[0015]
[0016] For variance taking operation; To perform the slope calculation operation; For query vector; It is a low-rank query encoder; For the current covariate; It is a calendar feature; These are local window statistics; Mid-range block memory A sparse candidate block retrieval strategy is adopted. Index scores are calculated for candidate historical blocks, and the Top-K results are obtained by adding time distance bias and seasonal bias. The formula is as follows:
[0017]
[0018] This is the final total score for matching. For scoring functions; For mid-range index keys; This is the time-distance bias function; This is the seasonal bias function; For the retrieved mid-range memory set; For memory value vectors; These are constraints; For hyperparameters; Remote summary memory A weighted summarization strategy is adopted, using the following formula:
[0019]
[0020] To normalize attention weights; For remote index keys; This is the final long-range summary embedding vector; For memory value vectors; Temperature coefficient; The context vector is: ; These are the original values for the local window.
[0021] Furthermore, in the In the boosting process, the DMSRC generator Based on the current channel status and context vector Generate mapping , , And denote the unconstrained quantities as an unconstrained matrix. , , ; For unconstrained matrices Take the index, then proceed. Secondary Sinkhorn row and column normalization to map Constrained to A birandomized matrix manifold of order 1.
[0022] Furthermore, normalized tree target for:
[0023] For root mean square normalization; Vectorize the matrix; Unconstrained matrix , , for:
[0024]
[0025]
[0026] This is the scaling factor; , , This is the weight matrix; , This is the bias matrix; This is the residual scaling factor; For matrix operations; This is the scaling factor after scaling. This is a transpose operation; It is the bias vector; Mapping , , for: ; ; ; Use the Sigmoid activation function; It is an iterative algorithm; For unconstrained matrices Take the index based on the element.
[0027] Furthermore, it also includes the following steps: in the r-th round, by mapping Extraction channel combination and with context vector Channel statistics together constitute tree features The formula used is:
[0028] For channel statistics; For current forecasts The negative gradient of the loss function L is calculated using the following formula:
[0029] It is the negative gradient vector; This is the actual sales target; These are partial derivatives; Introducing a scale normalization term for:
[0030] To perform the mean operation; It is a very small constant; Normalized tree target The change is as follows:
[0031] To stop gradient propagation; Based on tree characteristics Fitting normalized tree target The formula used is:
[0032] For the r-th round, a multi-output GBDT tree; This is a tree fitting algorithm; This is the output vector; Output the tree Inject potential residual channels and combine them with the results of the dual random channels to form the next round state, in order to update... The formula used is: .
[0033] Furthermore, it also includes the following steps: The OMMO inner loop is:
[0034]
[0035] ; This represents the multi-channel state after rollback; The learning rate; To cut off the gradient; superscript This is a transpose operation; To roll back the total loss; To predict losses; The regularization coefficient is used. The square of the norm; It is a C-order identity matrix.
[0036] This invention also provides a car sales forecasting system, which applies the method described above, including: an LDCHR historical compressor. Used to record long history , Encode the mid-range blocks and long-range summary blocks into searchable memories, forming mid-range block memories respectively. With remote summary memory ; Low-rank query / key indexer It is used to construct a query vector based on the current sample covariates, local statistics, and channel status summary, and to calculate the historical block relevance score; DMSRC Generator Used to generate for each sample and each round of boosting , , , The Sinkhorn projection results in a double random matrix; The initial state function InitState is used to initialize the state based on the initial context. Generate C×H multichannel prediction state ; Multi-output GBDT tree sequence ... This is used to fit the H-dimensional normalized residual objective in each round and output... ∈ ; OMMO is a continuous controller optimizer used to update continuous matrix parameters.
[0037] Compared with the prior art, the present invention has the following advantages: LDCHR simultaneously preserves precise local windows, mid-range Top-K sparse retrieval, and long-range weighted summarization, enabling the model to select relevant historical blocks across different samples and rounds.
[0038] Meanwhile, DMSRC dynamically generates data for each sample and each round of boosting. , , This ensures that the residual is no longer just a scalar accumulation in the output space, but rather propagates stably in the multi-channel latent state.
[0039] The Sinkhorn projection results in a double random matrix, which maintains the channel mean under pure channel mixing and reduces the risk of scale drift caused by residual propagation.
[0040] Separating the GBDT fitting target from the dynamic injection strength improves the numerical stability of tree training.
[0041] The non-differentiable tree structure is still handled by the multi-output GBDT, while the continuous controller acts as a peripheral differentiable module for collaborative optimization, facilitating integration into existing table-based time-series prediction systems.
[0042] OMMO is oriented towards , , Updating the momentum of a matrix with equal-sized parameters using orthogonal methods is beneficial for improving training stability and convergence speed.
[0043] The same compressed retrieval, DMSRC generation, and tree sequence update process as training is used to reduce errors caused by training-deployment inconsistency.
[0044] The model can output the historical blocks that were hit, the tree residuals of each round, the channel status statistics, and the dynamic gating value, which makes it easier for business personnel to analyze the source of the prediction and the cause of abnormal predictions. Attached Figure Description
[0045] Figure 1 Overall architecture diagram.
[0046] Figure 2 Overall flowchart. Detailed Implementation
[0047] It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of the invention.
[0048] Example 1: This invention provides a method for predicting automobile sales, referring to... Figure 1 , Figure 2 . Figure 1 This is a diagram of the overall architecture of the present invention. Figure 2 This is the overall flowchart. It includes: obtaining sample data for car sales figures, which includes long-term historical data. , Given covariates; Based on long-term historical data , Build memories, and rebuild them when refresh conditions are met; Initial context for encoding samples in sample data And based on the initial context Generate multi-channel prediction state ; Constructing tree features and normalized tree target To construct tree sequences ; Save the memory and tree sequence to generate the construction result, and output the sales forecast result based on the construction result.
[0049] Specifically, this includes the following symbol definition: Let the training set D consist of multi-subject time-series samples, and let sample i = (s, t) represent the prediction task of subject s at time t. For H steps, the true goal is... The potential residual channel state before the r-th round of boosting:
[0050] Where C is the number of residual channels, and H is the prediction step size. The visible predictions of the model in any round are obtained from the channel mean:
[0051] The above means that the single-path residual of ordinary GBDT is extended to C potential channels, so that different historical patterns, different prediction step sizes and different error morphologies can be decomposed within the channels and remixed by DMSRC.
[0052] The specific steps are as follows: Initialize the LDCHR history compressor Low-rank query / key indexer DMSRC Generator Initial state function InitState; From long historical data , Building Mid-Channel Block Memory Remote summary memory ; For each sample Encoding Initial Context The initial state function InitState is based on the initial context. Generate C×H multichannel prediction state ; For each round When the refresh conditions are met, rebuild the intermediate block memory. Remote summary memory ; Encoding Context Vector Generate mapping , , Constructing tree features and normalized tree target Fitting a multi-output GBDT tree ,renew And update the continuous controller through the OMMO inner loop; Save when training ends. , , , , InitState and tree sequence ; Encode the initial context and initialize the new sample Call the tree sequence in sequence ; Each round re-encodes the LDCHR context to generate a DMSRC mapping. , , Construct tree features and update channel states ; Output .
[0053] This is for the operation of taking the average.
[0054] Specifically, this invention divides long historical data into precise local windows and mid-range block memory. Remote summary memory Precise local window retention One lag value; mid-range block memory by Built for block length, used for Top-K sparse retrieval. Remote summary memory. by Established for block length, used to obtain a low-cost global history summary. Greater than Constructing mid-range block memory Remote summary memory The formula used is:
[0055] .
[0056] This is a vector of mid-range memory values; For mid-range memory key vectors; A vector of remote memory values; For remote memory key vectors; It is a medium-range compression encoder; For remote compression encoders; For key generator; Subject s at a historical point in time Sales target value; Subject s at a historical point in time covariates; An index for historical time points; This is the b-th intermediate time block; This is the b-th remote time block.
[0057] For the sample When there is an existing channel status Then construct a state summary ; during the first round or reasoning initialization A vector can be set to zero. Query vector. It is generated from current covariates, calendar features, local window statistics, and state summary, using the following formula:
[0058]
[0059] For variance taking operation; To perform the slope calculation operation; For query vector; It is a low-rank query encoder; For the current covariate; It is a calendar feature; These are local window statistics; Mid-range block memory A sparse candidate block retrieval strategy is adopted. Index scores are calculated for candidate historical blocks, and the Top-K results are obtained by adding time distance bias and seasonal bias. The formula is as follows:
[0060]
[0061] This is the final total score for matching. For scoring functions; For mid-range index keys; This is the time-distance bias function; This is the seasonal bias function; For the retrieved mid-range memory set; For memory value vectors; These are constraints; For hyperparameters; Remote summary memory A weighted summarization strategy is adopted, using larger compressed blocks to cover distant histories, avoiding the need to expand each item of the distant history. The formula is as follows:
[0062]
[0063] To normalize attention weights; For remote index keys; This is the final long-range summary embedding vector; For memory value vectors; Temperature coefficient; The context vector is: .
[0064] These are the original values for the local window.
[0065] Therefore, this invention forms an LDCHR structure oriented towards business time-series historical blocks; its retrieval object is not a general sequence cache, but a historical feature block organized by subject and time, thus making it more suitable for GBDT table-based time-series prediction tasks.
[0066] In the In the boosting process, the DMSRC generator Based on the current channel status and context vector Generate mapping , , Used to extract channel combinations related to tree input from multi-channel states. Used for residual propagation between channels Used to control the intensity of each channel injected into the tree output. To avoid unconstrained quantities having the same name as the projected mapping, this invention denotes unconstrained quantities as unconstrained matrices. , , .
[0067] Thus, the normalized tree target for:
[0068] For root mean square normalization; Vectorize the matrix; Unconstrained matrix , , for:
[0069]
[0070]
[0071] This is the scaling factor; , , This is the weight matrix; , This is the bias matrix; This is the residual scaling factor; For matrix operations; This is the scaling factor after scaling. This is a transpose operation; It is the bias vector; Mapping , , for:
[0072]
[0073] .
[0074] Use the Sigmoid activation function; It is an iterative algorithm; For unconstrained matrices Take the index based on the element.
[0075] To ensure stable residual propagation, this invention will Constrained to A birandomized matrix manifold of order 1, i.e., a Birkhoff polyhedron:
[0076] Specifically, for unconstrained matrices First, determine the exponent to ensure positiveness, then proceed. Sinkhorn row and column normalization:
[0077] in, This indicates a row-based normalization operation. This indicates a column-based normalization operation.
[0078] because It is a double random matrix, and the channel mean is in pure It remains unchanged under mixing:
[0079] The above properties make Information allocation can be adjusted within potential residual channels without changing the numerical scale of the current prediction, providing a stable benchmark for subsequent tree residual injection.
[0080] In the r-th round, by mapping Extraction channel combination and with context vector Channel statistics together constitute tree features The formula used is:
[0081] For current forecasts The negative gradient of the loss function L is calculated using the following formula:
[0082] It is the negative gradient vector; This is the actual sales target; It is a partial derivative.
[0083] Due to tree output pass Inject into each channel, and , The final effective correction to the channel mean is approximately Therefore, this invention introduces a scale normalization term. for:
[0084] To perform the mean operation; It is a very small constant; Normalized tree target The change is as follows:
[0085] To stop gradient propagation; Multi-output GBDT tree Using tree features Fitting normalized tree target The formula used is:
[0086] For the r-th round, a multi-output GBDT tree; This is a tree fitting algorithm; This is the output vector; Output the tree Inject potential residual channels and combine them with the results of the dual random channels to form the next round state, in order to update... The formula used is: .
[0087] The above normalization decouples the target scale of the tree learner from the DMSRC injection intensity, avoiding Dynamic gating alters the residual scale, causing training instability.
[0088] After each round of GBDT fitting and state update, this invention executes an OMMO inner loop. This inner loop fixes the current-round tree. The partitioning structure and leaf values are updated only through differentiable rollback loss. , , And consecutive module parameters such as InitState. Specifically:
[0089]
[0090] .
[0091] This represents the multi-channel state after rollback; The learning rate; To truncate the gradient; superscript This is a transpose operation; To roll back the total loss; To predict losses; The regularization coefficient is used. The square of the norm; It is a C-order identity matrix.
[0092] OMMO employs approximate orthogonalization updates for matrix parameters and adaptive weight decay updates for vector, bias, and scalar parameters. Thus, the history compressor, indexer, DMSRC generator, and initial state function can be collaboratively optimized around the tree residual feedback, while the non-differentiable GBDT tree structure maintains determinism and repeatability.
[0093] In summary, LDCHR simultaneously preserves precise local windows, mid-range Top-K sparse retrieval, and long-range weighted summarization, enabling the model to select relevant historical blocks across different samples and rounds.
[0094] Meanwhile, DMSRC dynamically generates data for each sample and each round of boosting. , , This ensures that the residual is no longer just a scalar accumulation in the output space, but rather propagates stably in the multi-channel latent state.
[0095] The Sinkhorn projection results in a double random matrix, which maintains the channel mean under pure channel mixing and reduces the risk of scale drift caused by residual propagation.
[0096] Separating the GBDT fitting target from the dynamic injection strength improves the numerical stability of tree training.
[0097] The non-differentiable tree structure is still handled by the multi-output GBDT, while the continuous controller acts as a peripheral differentiable module for collaborative optimization, facilitating integration into existing table-based time-series prediction systems.
[0098] OMMO is oriented towards , , Updating the momentum of a matrix with equal-sized parameters using orthogonal methods is beneficial for improving training stability and convergence speed.
[0099] The same compressed retrieval, DMSRC generation, and tree sequence update process as training is used to reduce errors caused by training-deployment inconsistency.
[0100] The model can output the historical blocks that were hit, the tree residuals of each round, the channel status statistics, and the dynamic gating value, which makes it easier for business personnel to analyze the source of the prediction and the cause of abnormal predictions.
[0101] It is worth noting that in the above content, some instances used the same symbols but different subscripts. They essentially convey the same meaning, but were chosen differently for expressive purposes. For example: Characterizes the channel state. , , Equivalences are different indexes chosen for mathematical and technical expression needs.
[0102] For ease of understanding, the following calculation examples are provided: Suppose we need to predict the sales volume of a specific car model in a certain region over the next three months.
[0103] The business scenarios are as follows: Main body: Brand A - Compact SUV - East China region; Current forecast date: End of July 2024; Forecast target: Sales volume for August, September, and October 2024; Prediction step size: ; Sample representation: ; Known true target:
[0104] That is, the actual sales volume for the next three months corresponding to this sample is 1380, 1420, and 1410 units respectively.
[0105] Input samples into the system: Current sample The raw inputs include: Historical sales series
[0106] Historical covariates For example, price, promotions, inventory, competition intensity, holidays, etc.; Known covariates include current and future variables, such as whether there are promotions in August, whether September is the end of the quarter, and whether October is the National Day holiday.
[0107] The precise local windows for the past 3 months are as follows:
[0108] This local window will be preserved directly without excessive compression, and will be used to express recent trends and local fluctuations.
[0109] LDCHR: Constructing a learning-based dual-scale compressed historical retrieval context. Building Mid-Channel Block Memory : The system will group recent history entries that do not belong to the exact window by... Cut into medium-sized blocks over a month and compressed by the LDCHR history compressor. The encoding is for searchable memory.
[0110] In the example, mid-range candidate blocks might include:
[0111] Low-rank query / key indexer Generate a query vector based on the current sample. And calculate the correlation of historical blocks. Assume the Top-K selection result is:
[0112] This indicates that the model considers "changes in popularity during the Spring Festival / new car sales" and "quarter-end / National Day promotions" to be more relevant for predicting the next three months.
[0113] Building a remote summary memory : Remote history no longer unfolds month by month, but rather according to... A global summary is generated every month. For example:
[0114] The system performs a weighted digest of the remote block to obtain the remote context. This summary is used to supplement long-term seasonal and multi-year structural information.
[0115] Get the initial context : Since the initial state has not yet been formed, the state summary can be set to a zero vector. Therefore:
[0116] In this example, Also includes: Sales figures for the last 3 months: 1200, 1350, 1280; Local statistics: mean, month-on-month change, volatility; Future monthly trends: August mini-promotion, September end of quarter, October National Day holiday; Hit historical blocks: Q1 2024 block, September-November 2023 block; Remote Annual Summary: Seasonal Overview for 2023.
[0117] InitState: Initializes the multi-channel prediction state. The initial state function InitState is based on generate Potential predicted states:
[0118] In the example, we get:
[0119] The model's visible predictions are the channel mean:
[0120] At this point, the model has provided the initial three-step predictions, but has not yet undergone boosting residual correction.
[0121] Round 1 boosting: DMSRC and GBDT coupled update: DMSRC generation , , : DMSRC Generator Based on the current context and multi-channel prediction state Three types of mappings are dynamically generated for this sample and this round.
[0122] In the example:
[0123]
[0124]
[0125] in, After Sinkhorn projection, the result approximately satisfies the double random constraint, meaning the sum of each row and each column is 1. Its function is to redistribute residual information among potential channels without altering the channel mean scale under pure channel mixing.
[0126] Constructing tree features : First use Extracting tree input-related combinations from multi-channel states:
[0127] Then construct the tree features:
[0128] ChannelStats can include channel mean, channel variance, inter-channel differences, and the slope of each prediction step.
[0129] Constructing a normalized tree target : Known true target:
[0130] The current forecast is:
[0131] If squared loss is used, the negative gradient can be approximated as the difference between the true value and the current prediction:
[0132] Because the tree output will pass through Injected into each channel, therefore a scale normalization term is introduced:
[0133] Obtain the normalized tree target :
[0134] Fitting a multi-output GBDT tree : Multi-output GBDT tree use As input, fit Dimensional Target .
[0135] The output of the hypothesis tree is:
[0136] Update potential channel status:
[0137] Substituting the example values, we can obtain an approximate result:
[0138] The updated visible predictions are:
[0139] As can be seen, the predicted value is from To the real target Directional movement.
[0140] OMMO: Fixed tree, continuously updating controller: First round of trees After fitting is complete and the state is updated, the inner loop of OMMO is executed. At this point: fixed Tree segmentation structure; fixed Leaf value; Do not use OMMO to update GBDT itself; Update parameters for consecutive modules only: History Compressor ; Low-rank query / key indexer ; DMSRC Generator ; Initial state function InitState.
[0141] OMMO may learn the following adjustment directions: The current sample is more sensitive to historical blocks related to promotions and National Day, therefore the retrieval weight of historical blocks from September 2023 to November 2023 in similar samples should be increased; The third channel is more like a promotion / holiday channel, so its tree output injection intensity can be appropriately increased in subsequent rounds; like If excessive mixing causes the channel differences to disappear, then an effective decomposition between channels is maintained by updating the orthogonal momentum matrix.
[0142] Round 2 and subsequent boosting: State affects the next round of retrieval and gating: When entering the second round, the sample state had already changed from Become Therefore, the query vector of LDCHR no longer depends only on the original covariates and local windows, but also includes a new channel state summary.
[0143] This will have a key effect: After the first round of modeling discovers that the sample is significantly underestimated in the direction of promotions / holidays, the second round of historical retrieval and DMSRC gating will be readjusted around this error structure.
[0144] For example, the second round might generate:
[0145] The current residual is:
[0146] If normalization is not performed The average injection strength is 0.9, which will cause the actual correction range of the tree output to be smaller than expected. This invention uses:
[0147] In this way, the target learned by the GBDT tree is decoupled from the dynamic injection strength, and finally... After injection, it can still maintain a stable and effective residual correction scale.
[0148] In actual training, the model will perform multiple rounds of boosting. After the round, the prediction may become:
[0149] Compared to the initial forecast The final result is closer to the real goal. .
[0150] After training, the model is saved: Mid-range block memory Remote summary memory ; LDCHR History Compressor Low-rank query / key indexer DMSRC Generator Initial state function InitState; Multi-output GBDT tree sequence ; Learning rate and related hyperparameters.
[0151] For a new prediction sample, for example: main body Brand B - Mid-size sedan - South China region Current time End of August 2024 Predictions needed for September, October, and November 2024. The reasoning process is as follows: Construct the initial context based on the historical sequence and known future covariates. ; UseInitState( Obtain the multi-channel prediction state ; right arrive : Re-encode LDCHR context ; generate , , ; Constructing tree features ; Call the pre-trained GBDT tree get ; Update status ; Output the final prediction:
[0152] No longer fitting GBDT trees, nor constructing them based on the true labels. and Instead, it uses the trained tree sequence and continuous controller to complete the same closed-loop state update.
[0153] Example 2: A car sales forecasting system, employing the method described in Example 1, includes: an LDCHR history compressor. Used to record long history , Encode the mid-range blocks and long-range summary blocks into searchable memories, forming mid-range block memories respectively. With remote summary memory ; Low-rank query / key indexer It is used to construct a query vector based on the current sample covariates, local statistics, and channel status summary, and to calculate the historical block relevance score; DMSRC Generator Used to generate for each sample and each round of boosting , , The The Sinkhorn projection results in a double random matrix; The initial state function InitState is used to initialize the state based on the initial context. Generate C×H multichannel prediction state ; Multi-output GBDT tree sequence ... This is used to fit the H-dimensional normalized residual objective in each round and output... ∈ ; OMMO is a continuous controller optimizer used to update continuous matrix parameters.
[0154] Furthermore, it should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.
[0155] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0156] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as read-only memory (ROM) / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0157] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.
[0158] It is understood that the system provided in the embodiments of the present invention corresponds to the method provided in the embodiments of the present invention, and the explanation, examples and beneficial effects of the relevant content can be referred to the corresponding parts of the above methods.
Claims
1. A method for predicting automobile sales, characterized in that, include: Obtain sample data on car sales, including long-term historical data. , Given covariates; Based on the aforementioned long historical data , Build a memory, and rebuild the memory when the refresh condition is met; Initial context for encoding samples in the sample data and based on the initial context Generate multi-channel prediction state ; Constructing tree features and normalized tree target To construct tree sequences ; The memory and the tree sequence are saved to generate the construction result, and the sales forecast result is output based on the construction result.
2. The automobile sales forecasting method as described in claim 1, characterized in that, It also includes the following steps: Initialize the LDCHR history compressor Low-rank query / key indexer DMSRC Generator Initial state function InitState; From the aforementioned long historical data , Building Mid-Channel Block Memory Remote summary memory ; For each sample Encoding Initial Context The initial state function InitState is based on the initial context. Generate C×H multichannel prediction state ; The As the main body; The For time; C represents the number of residual channels; H represents the prediction step size; For each round When the refresh conditions are met, the intermediate block memory is rebuilt. The remote summary memory ; Encoding Context Vector Generate mapping , , Construct the tree features and the normalized tree target Fitting a multi-output GBDT tree ,renew And update the continuous controller through the OMMO inner loop; Save the mid-range block memory The remote summary memory The LDCHR history compressor The low-rank query / key indexer The DMSRC generator The initial state function InitState and the tree sequence ; Encode the initial context and initialize the new sample The tree sequence is called sequentially. ; Each round re-encodes the LDCHR context to generate a DMSRC mapping. , , Construct tree features and update channel states ; Output ; The This is for the operation of taking the average.
3. The automobile sales forecasting method as described in claim 2, characterized in that, It also includes the following steps: The long historical data is divided into precise local windows and the mid-range block memory. The remote summary memory ; The precise local window retains the most recent One lag value; The mid-range block memory by Established for block length; The remote summary memory by Established for block length; The Greater than the .
4. The automobile sales forecasting method as described in claim 3, characterized in that, Constructing the mid-range block memory The remote summary memory The formula used is: ; The This is a vector of mid-range memory values; The For mid-range memory key vectors; The A vector of remote memory values; The For remote memory key vectors; The It is a medium-range compression encoder; The For remote compression encoders; The For key generator; The Subject s at a historical point in time Sales target value; The Subject s at a historical point in time covariates; The An index for historical time points; The This is the b-th intermediate time block; The This is the b-th remote time block.
5. The automobile sales forecasting method as described in claim 2, characterized in that, For the sample When there is an existing channel status Then construct a state summary ; Query vector It is generated from current covariates, calendar features, local window statistics, and state summary, using the following formula: The For variance taking operation; The To perform the slope calculation operation; The For query vector; The It is a low-rank query encoder; The For the current covariate; The It is a calendar feature; The These are local window statistics; The mid-range block memory A sparse candidate block retrieval strategy is adopted. Index scores are calculated for candidate historical blocks, and the Top-K results are obtained by adding time distance bias and seasonal bias. The formula is as follows: The This is the final total score for matching. The For scoring functions; The For mid-range index keys; The This is the time-distance bias function; The This is the seasonal bias function; The For the retrieved mid-range memory set; The For memory value vectors; The These are constraints; The For hyperparameters; The remote summary memory A weighted summarization strategy is adopted, using the following formula: The To normalize attention weights; The For remote index keys; The This is the final long-range summary embedding vector; The For memory value vectors; The Temperature coefficient; The context vector is: ; The These are the original values for the local window.
6. The automobile sales forecasting method as described in claim 2, characterized in that, In the In the boosting process, the DMSRC generator Based on the current channel status and the context vector Generate the mapping , , And denote the unconstrained quantities as an unconstrained matrix. , , ; For the unconstrained matrix Take the index, then proceed. Secondary Sinkhorn row and column normalization to normalize the mapping Constrained to A birandomized matrix manifold of order 1.
7. The automobile sales forecasting method as described in claim 6, characterized in that, The normalized tree target for: The For root mean square normalization; The Vectorize the matrix; The unconstrained matrix , , for: The This is the scaling factor; The The above The above This is the weight matrix; The The above This is the bias matrix; The This is the residual scaling factor; The For matrix operations; The This is the scaling factor after scaling. The This is a transpose operation; The It is the bias vector; The mapping , , for: ; ; ; The Use the Sigmoid activation function; The It is an iterative algorithm; The For the unconstrained matrix Take the index based on the element.
8. The automobile sales forecasting method as described in claim 2, characterized in that, It also includes the following steps: In the r-th round, by the mapping Extraction channel combination and with the context vector The tree features are composed of channel statistics and other elements. The formula used is: The For channel statistics; For current forecasts The negative gradient of the loss function L is calculated using the following formula: The It is the negative gradient vector; The This is the actual sales target; The These are partial derivatives; Introducing a scale normalization term for: The To perform the mean operation; The It is a very small constant; The normalized tree target The change is as follows: The To stop gradient propagation; Based on the tree features Fitting normalized tree target The formula used is: The For the r-th round, a multi-output GBDT tree; The This is a tree fitting algorithm; The This is the output vector; Output the tree Inject potential residual channels and combine them with the results of the dual random channels to form the next round state, thereby updating the... The formula used is: 。 9. The automobile sales forecasting method as described in claim 2, characterized in that, It also includes the following steps: The OMMO inner loop is as follows: ; The This represents the multi-channel state after rollback; The The learning rate; The To truncate the gradient; The superscript This is a transpose operation; The To roll back the total loss; The To predict losses; The The regularization coefficient is used. The The square of the norm; The It is a C-order identity matrix.
10. A car sales forecasting system, characterized in that, The method described in any one of claims 1 to 9 comprises: LDCHR History Compressor Used to record long history , Encode the mid-range blocks and long-range summary blocks into searchable memories, forming mid-range block memories respectively. With remote summary memory ; Low-rank query / key indexer It is used to construct a query vector based on the current sample covariates, local statistics, and channel status summary, and to calculate the historical block relevance score; DMSRC Generator Used to generate for each sample and each round of boosting , , The The Sinkhorn projection results in a double random matrix; The initial state function InitState is used to initialize the state based on the initial context. Generate C×H multichannel prediction state ; Multi-output GBDT tree sequence ... This is used to fit the H-dimensional normalized residual objective in each round and output... ∈ ; OMMO is a continuous controller optimizer used to update continuous matrix parameters.