Search

CN-121544315-B - Transformer and SHAP interpretability-based cross-border e-commerce sales prediction method and system

CN121544315BCN 121544315 BCN121544315 BCN 121544315BCN-121544315-B

Abstract

The invention discloses a trans-former and SHAP interpretability-based cross-border e-commerce sales prediction method and a trans-border e-commerce sales prediction system, which are characterized in that a multi-mode feature extraction module is used for respectively processing commodity images, text descriptions and historical sales sequences to generate fusion feature vectors; the method comprises the steps of building space-time heterograms of commodity association by using a dynamic diagram building module, enhancing characteristic representation through a diagram attention network, performing meta training among a plurality of tasks by using a meta learning prediction module, outputting sales prediction with confidence intervals, finally analyzing characteristic contribution degree by using an SHAP interpretation engine, generating an interpretable report, performing inverse fact reasoning by using a report building strategy simulator, and outputting a risk weighted decision proposal. The method and the system remarkably improve the adaptability and generalization capability of the prediction model in a dynamic market environment, provide reliable basis for operation decisions through interpretability analysis, and realize closed-loop support from prediction to decision.

Inventors

  • CHEN SHENGQIANG

Assignees

  • 福建东西乐活科技股份有限公司

Dates

Publication Date
20260512
Application Date
20260119

Claims (9)

  1. 1. The trans-former and SHAP interpretability-based cross-border e-commerce sales prediction method is characterized by comprising the following steps of: acquiring multi-source time sequence data of a cross-border e-commerce platform, wherein the multi-source time sequence data comprises commodity basic attribute data and external environment data; Inputting the multi-source time sequence data into a multi-mode feature extraction module, extracting commodity image features through a visual transducer, extracting commodity description text features through a text transducer, extracting historical sales volume sequence features through a time sequence encoder, and generating a multi-mode fusion feature vector; Inputting the multi-mode fusion feature vector to a dynamic diagram construction module, constructing a space-time heterogram based on commodity association, and aggregating neighborhood node information through a diagram attention network to generate an enhanced space-time feature representation; Inputting the enhanced space-time characteristic representation to a meta-learning prediction module, performing meta-training among a plurality of prediction tasks by adopting a model-independent meta-learning framework, and outputting a sales prediction result of a future period and a confidence interval thereof through a time sequence converter decoder; inputting the sales quantity prediction result into a SHAP interpretation engine, calculating contribution degree distribution of each feature to the prediction result, identifying key causal features through a causal discovery algorithm, and generating a multi-level interpretability analysis report; Constructing a strategy simulator based on the multi-level interpretability analysis report, calculating expected sales volume changes under different operation strategies through a back-facts reasoning algorithm, and generating and outputting a risk weighted decision proposal by combining a confidence interval; The multi-mode fusion feature vector is input to a dynamic diagram construction module, and a space-time heterogram is constructed based on commodity association relation, comprising: Calculating semantic similarity among commodities based on commodity semantic embedding vectors in the multi-mode fusion feature vectors, and mining substitution relations and complementary relations among the commodities through a collaborative filtering algorithm to construct commodity association patterns, wherein the method comprises the following steps: extracting commodity category characteristics and functional characteristics in the commodity semantic embedding vector; calculating semantic similarity among commodities according to commodity category characteristics and functional characteristics through a cosine similarity algorithm; calculating the association strength between commodities by using a collaborative filtering algorithm; Carrying out weighted fusion on the semantic similarity and the association strength to construct a commodity association map containing the substitution relationship and the complementary relationship; Carrying out heterogeneous fusion on the commodity association map and a user-commodity interaction map to generate a space-time heterogram, wherein the method comprises the following steps of: identifying common nodes in the commodity association map and the user-commodity interaction map; extracting a high-order semantic relation of the commodity association map and a midspan map in the user-commodity interaction map through a meta-path migration strategy; aligning node representations in the commodity association map and the user-commodity interaction map by using a drawing meaning mechanism according to the high-order semantic relation; and carrying out graph structure fusion on the aligned node representations to generate the space-time heterograph.
  2. 2. The cross-border e-commerce sales prediction method based on the converter and the SHAP interpretability according to claim 1, wherein the multi-source time series data is input into a multi-modal feature extraction module, commodity image features are extracted through a visual converter, commodity description text features are extracted through a text converter, and the method comprises the following steps: Carrying out multi-scale feature pyramid processing on the commodity image in the commodity basic attribute data, extracting visual semantic features from local textures to global configurations through a hierarchical attention mechanism of a visual transducer, and generating commodity visual feature tensors comprising spatial position codes, wherein the processing comprises the following steps: inputting the commodity image into a pre-trained visual transducer model; Calculating the spatial dependency relationship between image blocks of the commodity image through a multi-layer self-attention mechanism; capturing local texture features of the commodity in a shallow network according to the spatial dependency relationship, and aggregating in a deep network to form global configuration features of the commodity; fusing the local texture features with the global configuration features, and outputting commodity visual feature tensors with spatial position codes; carrying out semantic role labeling and dependency syntax analysis on commodity description texts in the commodity basic attribute data, capturing context semantic relations through a bidirectional encoder architecture of a text transducer, and generating commodity semantic embedded vectors with E-commerce field characteristics by combining field self-adaptive pre-training, wherein the method comprises the following steps: inputting the commodity description text into a pre-trained text transducer model; Calculating semantic dependency relations among the lemmas through a multi-head self-attention layer in the bidirectional encoder architecture; constructing a context-dependent representation of the commodity description based on the semantic dependency; And performing field self-adaptive alignment processing on the context related representation and an E-commerce field knowledge base to generate a commodity semantic embedded vector with E-commerce field characteristics.
  3. 3. The trans-former and SHAP interpretability-based cross-border e-commerce sales prediction method of claim 2, wherein extracting historical sales sequence features by a timing encoder generates a multi-modal fusion feature vector, comprising: the commodity visual feature tensor, the commodity semantic embedding vector and the historical sales volume sequence feature are subjected to cross-modal feature fusion to generate a unified multi-modal fusion feature vector, which comprises the following steps: inputting the commodity visual feature tensor, commodity semantic embedding vector and historical sales volume sequence feature into a cross-modal attention network; calculating the association weight among different modal features through a cross-modal attention mechanism; Weighting and fusing commodity visual feature tensors, commodity semantic embedding vectors and sequence coding features based on the association weights; and carrying out dimension unification processing on the weighted and fused feature vectors to generate the multi-mode fusion feature vector.
  4. 4. The method for cross-border e-commerce sales prediction based on Transformer and SHAP interpretability of claim 1, wherein generating the enhanced spatiotemporal feature representation by aggregating neighborhood node information through a graph attention network comprises: The node characteristics in the space-time heterograms are subjected to multi-hop neighborhood information aggregation, and node enhancement representations are generated through a hierarchical graph attention network, and the method comprises the following steps: extracting node initial characteristics and edge relation weights in the space-time heterograms; Calculating the attention coefficient between the node in the space-time heterogram and the first-order neighbor of the node through a multi-head graph attention mechanism; performing weighted aggregation on the first-order neighbor features based on the attention coefficient to generate a first-order enhancement representation of the nodes in the space-time heterograph; Taking the first-order enhancement representation as input, iteratively executing multi-hop neighborhood aggregation, and generating multi-order enhancement representation of nodes in the space-time heterograph; Performing space-time feature fusion on the multi-order enhancement representation to generate an enhancement feature representation with space-time consistency, wherein the method comprises the following steps: Extracting spatial structural features and time evolution features in the multi-order enhancement representation; the contribution degree of the space structural features and the time evolution features is balanced through a space-time feature fusion gating mechanism; performing feature stitching on the balanced spatial structure features and the time evolution features; and carrying out nonlinear transformation on the spliced features to generate the enhanced space-time feature representation.
  5. 5. The method for cross-border e-commerce sales prediction based on the converter and SHAP interpretability according to claim 1, wherein the inputting the enhanced spatiotemporal feature representation into the meta-learning prediction module, performing meta-training between a plurality of prediction tasks using a model-independent meta-learning framework, outputting future periodic sales prediction results and confidence intervals thereof through a time sequence converter decoder comprises: initializing a meta learning prediction module; Constructing a meta-learning task set based on the enhanced spatiotemporal feature representation, performing cross-task model training through a model-independent meta-learning framework, comprising: The sales predicting task of different commodity classes in different markets is defined as a meta-learning task; Sampling from historical data to construct a support set and a query set of each meta-learning task; Calculating task-specific losses on the support set and updating model parameters; Evaluating the generalization performance of the model on the query set and calculating the meta-gradient; Updating and optimizing model initial parameters of the meta learning prediction module through meta gradients; in the updated meta-learning prediction module, inputting the enhanced spatiotemporal feature representation into a time sequence transducer decoder to generate a sales prediction result of a future period, comprising: processing the enhanced spatiotemporal feature representation using a time sequence fransformer decoder; ensuring timing consistency of the autoregressive predictions by a causal attention mask; Outputting point predicted values of a plurality of time steps in the future by using a multi-layer perceptron; Taking the point predicted value as a sales predicted result of a future period; Constructing a prediction interval based on a quantile regression algorithm, generating a confidence interval of sales prediction, comprising: calculating a plurality of quantile values in parallel at an output layer of the time sequence converter decoder; Optimizing interval estimation precision through a fractional number loss function; Taking the optimized quantile value as the upper and lower boundaries of the prediction interval; And outputting the upper and lower boundaries as confidence intervals of sales prediction.
  6. 6. The trans-former and SHAP interpretability-based cross-border e-commerce sales prediction method of claim 1, wherein the sales prediction result is input to a SHAP interpretation engine, and the contribution degree distribution of each feature to the prediction result is calculated, comprising: Constructing a feature contribution computing framework based on a kernel SHAP algorithm, generating a background data set through feature substitution sampling, and comprising: Sampling from training data to generate a characteristic background data set; constructing a feature disturbance sample set through random feature replacement; Calculating a model predictive value of each characteristic disturbance sample; Calculating a SHAP reference value using weighted linear regression based on the model predictive value; Performing multi-level feature attribution analysis on the sales volume prediction result to generate feature contribution degree distribution, including: calculating marginal contribution degree of each feature to the sales prediction result based on the SHAP reference value; aggregating the feature level contribution degree to a modal level, and calculating the total influence weight of the multi-modal features; Identifying key feature interaction relations through attention weight analysis; and integrating the marginal contribution degree, the total influence weight and the key feature interaction relation into a feature contribution degree distribution.
  7. 7. The trans-former and SHAP interpretability-based cross-border e-commerce sales prediction method of claim 6, wherein identifying key causal features by a causal discovery algorithm, generating a multi-level interpretability analysis report, comprises: Constructing a causal discovery model based on a potential outcome framework, eliminating confounding variable effects by dual robust estimation, comprising: Extracting high-contribution features from the feature contribution distribution as candidate causal features; constructing a causal graph model comprising candidate causal features, sales prediction results and potential confounding variables; calculating an average processing effect for each candidate causal feature using the dual robust estimators; verifying the statistical significance of the causal relationship through a conditional independence test; Constructing a causal verification mechanism based on a counterfacts reasoning framework, generating a key causal feature set, comprising: constructing a counterfactual intervention scenario for each candidate causal feature; Calculating an expected sales change under a counter-fact intervention; screening stable candidate causal features through causal effect stability analysis; marking the screened candidate causal features as key causal features; integrating the feature contribution distribution and key causal features to generate a multi-level interpretability analysis report, including: performing association analysis on the feature contribution degree and the causal effect intensity, and constructing a visual chart comprising feature importance sequencing and causal paths; and generating a text analysis report containing key findings and decision suggestions; visual charts and text analysis reports are integrated into a multi-level interpretable analysis report.
  8. 8. The trans-former and SHAP interpretability-based cross-border e-commerce sales prediction method of claim 1, wherein constructing a policy simulator based on the multi-level interpretability analysis report calculates expected sales changes under different operation policies by a back-facts reasoning algorithm, and generates and outputs a risk weighted decision suggestion scheme in combination with a confidence interval, comprising: Constructing a strategy-feature mapping knowledge base, converting an operation strategy into system intervention on key causal features, comprising: Extracting key causal features and influence weights thereof from the multi-level interpretability analysis report; Constructing an operation strategy feature space based on the key causal features, wherein the operation strategy feature space comprises a price adjustment strategy space, a marketing delivery strategy space and an inventory optimization strategy space; generating a candidate strategy set in the operation strategy feature space, wherein the candidate strategy set comprises a plurality of candidate strategies; establishing a mapping relation between a candidate strategy and key causal features, and generating a strategy-feature mapping knowledge base; And carrying out batch anti-fact reasoning on the candidate strategy set, and calculating expected sales change, wherein the method comprises the following steps of: Traversing each candidate strategy in the candidate strategy set; determining a feature intervention scheme corresponding to the current candidate strategy according to the strategy-feature mapping knowledge base; constructing a counterfactual feature vector based on the feature intervention scheme; inputting the inverse fact feature vector into a trained meta learning prediction module to obtain an inverse fact prediction result; calculating the difference value between the inverse fact prediction result and the reference prediction result to be used as the expected sales volume change of the current candidate strategy; recording all candidate strategies and the corresponding expected sales changes thereof, and generating a strategy-effect mapping table; Generating a risk weighted decision proposal scheme in combination with the confidence interval, comprising: extracting upper and lower bounds of a confidence interval of the sales prediction result; calculating risk exposure of each candidate strategy in the candidate strategy set based on the upper and lower bounds of the confidence interval and the strategy-effect mapping table; evaluating the profit fluctuation range of each candidate strategy in the confidence interval through Monte Carlo simulation; sorting and screening the candidate strategy sets based on risk and benefit comparison, and generating a sorted candidate strategy sequence; integrating the ordered candidate strategy sequences and the risk assessment results thereof into a risk weighted decision proposal scheme and outputting the risk weighted decision proposal scheme.
  9. 9. A trans-former and SHAP interpretability-based cross-border e-commerce sales prediction system adapted for use in the method of any one of claims 1 to 8, the system comprising: A data acquisition module for acquiring multi-source time sequence data of the cross-border e-commerce platform, the multi-source time sequence data comprises commodity basic attribute data and external environment data; The multi-mode feature extraction module is used for receiving the multi-source time sequence data, extracting commodity image features through a visual transducer, extracting commodity description text features through a text transducer, extracting historical sales volume sequence features through a time sequence encoder and generating multi-mode fusion feature vectors; the dynamic diagram construction module is used for receiving the multi-mode fusion feature vector, constructing a space-time heterogram based on commodity association, and aggregating neighborhood node information through a diagram attention network to generate an enhanced space-time feature representation; The meta-learning prediction module is used for receiving the enhanced space-time characteristic representation, performing meta-training among a plurality of prediction tasks by adopting a model-independent meta-learning framework, and outputting a sales prediction result of a future period and a confidence interval thereof through a time sequence converter decoder; The SHAP interpretation engine is used for receiving the sales quantity prediction result, calculating contribution degree distribution of each feature to the prediction result, identifying key causal features through a causal discovery algorithm, and generating a multi-level interpretability analysis report; The strategy simulator is used for calculating expected sales volume changes under different operation strategies through a counter fact reasoning algorithm based on the multi-level interpretability analysis report, generating a risk weighted decision proposal by combining a confidence interval and outputting the risk weighted decision proposal; The multi-mode fusion feature vector is input to a dynamic diagram construction module, and a space-time heterogram is constructed based on commodity association relation, comprising: Calculating semantic similarity among commodities based on commodity semantic embedding vectors in the multi-mode fusion feature vectors, and mining substitution relations and complementary relations among the commodities through a collaborative filtering algorithm to construct commodity association patterns, wherein the method comprises the following steps: extracting commodity category characteristics and functional characteristics in the commodity semantic embedding vector; calculating semantic similarity among commodities according to commodity category characteristics and functional characteristics through a cosine similarity algorithm; calculating the association strength between commodities by using a collaborative filtering algorithm; Carrying out weighted fusion on the semantic similarity and the association strength to construct a commodity association map containing the substitution relationship and the complementary relationship; Carrying out heterogeneous fusion on the commodity association map and a user-commodity interaction map to generate a space-time heterogram, wherein the method comprises the following steps of: identifying common nodes in the commodity association map and the user-commodity interaction map; extracting a high-order semantic relation of the commodity association map and a midspan map in the user-commodity interaction map through a meta-path migration strategy; aligning node representations in the commodity association map and the user-commodity interaction map by using a drawing meaning mechanism according to the high-order semantic relation; and carrying out graph structure fusion on the aligned node representations to generate the space-time heterograph.

Description

Transformer and SHAP interpretability-based cross-border e-commerce sales prediction method and system Technical Field The invention relates to the technical field of computers, in particular to a trans-former and SHAP interpretability-based cross-border e-commerce sales prediction method and system. Background In the field of cross-border electronic commerce, accurate sales volume prediction has important significance for optimizing inventory management, formulating marketing strategies and improving operation efficiency. At present, a sales volume prediction method based on deep learning has advanced to a certain extent, for example, prediction precision is improved through multi-modal feature fusion, a multi-head attention mechanism is adopted to extract commodity attributes, time sequence features and competition relations, and LSTM models are combined to conduct sales volume prediction, and similarly, some schemes construct association relations among commodities through multi-modal information fusion and a graph neural network so as to enhance the comprehensiveness of market dynamic analysis. These improve the accuracy of the predictions to some extent and enable capturing the market performance of the commodity from multiple dimensions. However, on one hand, the method mainly focuses on static feature extraction and historical data fitting, is difficult to adapt to the characteristics of short commodity life cycle and frequent market fluctuation in cross-border electronic commerce, and causes insufficient generalization capability of a model when facing new commodities or sudden market changes, and on the other hand, the existing prediction models are mostly of a 'black box' structure, and lack of interpretability analysis on prediction results, so that operators cannot easily understand the specific influence of key features on sales, and therefore cannot effectively formulate a targeted strategy. In addition, the existing scheme generally processes the prediction and decision links independently, and cannot organically combine the prediction result with the operation strategy simulation, so that the application value of the scheme in real-time decision support is limited. Therefore, a sales volume prediction scheme capable of combining prediction accuracy, model generalization capability and decision interpretation is needed in the art, so as to solve the problems that the adaptability of the prior art in a dynamic market environment is insufficient and the prediction result is difficult to be converted into an effective operation decision. Disclosure of Invention Therefore, the invention aims to provide a cross-border e-commerce sales prediction method and system based on the convertor and SHAP interpretability, which solve the problems of insufficient generalization capability and difficult decision support of the existing prediction model in a dynamic market through deep fusion of a meta-learning framework and an interpretability analysis. To achieve the above technical objective, in a first aspect, the present application provides a cross-border e-commerce sales prediction method based on convertors and SHAP interpretability, including: acquiring multi-source time sequence data of a cross-border e-commerce platform, wherein the multi-source time sequence data comprises commodity basic attribute data and external environment data; Inputting multi-source time sequence data into a multi-mode feature extraction module, extracting commodity image features through a visual transducer, extracting commodity description text features through a text transducer, extracting historical sales volume sequence features through a time sequence encoder, and generating a multi-mode fusion feature vector; inputting the multi-mode fusion feature vector to a dynamic diagram construction module, constructing a space-time heterogram based on commodity association, and aggregating neighborhood node information through a diagram attention network to generate an enhanced space-time feature representation; The enhanced space-time characteristic representation is input into a meta-learning prediction module, meta-training is carried out among a plurality of prediction tasks by adopting a model-independent meta-learning framework, and a sales prediction result of a future period and a confidence interval thereof are output through a time sequence transducer decoder; Inputting sales quantity prediction results into a SHAP interpretation engine, calculating contribution degree distribution of each feature to the prediction results, identifying key causal features through a causal discovery algorithm, and generating a multi-level interpretability analysis report; And constructing a strategy simulator based on the interpretability analysis report, calculating expected sales volume changes under different operation strategies through a back-facts reasoning algorithm, and generating and outputting a risk weighted decision proposa