Intelligent prediction and decision system for earphone sales based on knowledge graph and deep learning

By constructing a temporal causal knowledge graph and introducing a prediction mechanism that perceives uncertainty, combined with reinforcement learning decision-making based on counterfactual reasoning, the problems of causal relationship modeling and cold start of new products in headphone sales forecasting are solved, achieving high-precision and interpretable intelligent prediction and decision-making.

CN123141012APending Publication Date: 2026-11-20HENAN ZHENGFENFA NETWORK TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611266647.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-20
Publication Date
2026-11-20

AI Technical Summary

Technical Problem

Existing headphone sales forecasting methods cannot effectively incorporate diverse and heterogeneous market information, cannot distinguish between correlation and causation, lack uncertainty quantification, and lack interpretability in forecasting and decision-making. Furthermore, the cold start problem for new products is serious, resulting in low forecast accuracy and unstable decision-making.

Method used

A knowledge graph and deep learning-based system is adopted. Through multimodal data acquisition and causal discovery modules, a temporal causal knowledge graph is constructed. A causal-attention collaborative graph neural network encoding module is used to introduce uncertainty-aware temporal feature extraction and uncertainty-weighted spatiotemporal fusion prediction. Combined with a constraint reinforcement learning decision module enhanced by counterfactual reasoning, cross-product knowledge transfer is achieved.

Benefits of technology

It significantly improves the model's robustness and prediction accuracy under mixed factors, provides interpretable decision support, forms an intelligent closed loop, solves the cold start problem for new products, and realizes fully automated and trustworthy operational decision-making.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123141012A_ABST
    Figure CN123141012A_ABST
Patent Text Reader

Abstract

The application discloses an intelligent prediction and decision system for earphone sales based on a knowledge graph and deep learning, relates to the technical field of knowledge graphs and deep learning, and comprises a multi-modal data acquisition and causality discovery module, a time-series causality knowledge graph construction module, a causality-attention collaborative graph neural network coding module, an uncertainty perception time-series feature extraction module, an uncertainty weighted spatio-temporal fusion prediction module, a counterfactual reasoning enhanced constraint reinforcement learning decision module and a cross-product meta-learning cold start migration module.The application replaces the fuzzy correlation edges in the traditional knowledge graph with causality propagation edges with directionality and effect strength by introducing a causality discovery algorithm to construct a time-series causality knowledge graph, so that the model can distinguish the essential difference between "a competitor's price reduction leading to a decrease in the sales of the self" and "both being driven by seasonal factors", and the robustness of the model in the presence of mixed factors is significantly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of knowledge graph and deep learning technology, and in particular to an intelligent prediction and decision-making system for headphone sales based on knowledge graph and deep learning. Background Technology

[0002] The headphone market is highly competitive, with rapid product updates and iterations. User preferences are easily influenced by technological innovations, fashion trends, and social media. Accurate sales forecasting and agile operational decisions (such as dynamic pricing and inventory allocation) are crucial for companies to remain competitive in the market.

[0003] Existing headphone sales forecasting methods mainly fall into two categories: First, traditional statistical models based on time series data (such as ARIMA and Prophet). These methods rely solely on historical sales data, failing to incorporate diverse and heterogeneous information from the market, and exhibiting extremely poor responsiveness to sudden market events (such as competitor product launches or public opinion crises). Second, machine learning or deep learning models based on general features. While these models can incorporate features such as product parameters and prices, these features often exist in a flat, independent form, failing to depict complex, deep-seated correlations and causal relationships such as "the impact of competitor A's new product launch on product B's sales" or "a certain combination of technical parameters being sought after by a specific user group," leading to a bottleneck in forecast accuracy.

[0004] In recent years, the combination of knowledge graphs and graph neural networks (GNNs) has provided new solutions to the aforementioned problems. Existing technologies include solutions that integrate knowledge graphs with GCN-LSTM models for drug demand forecasting, and solutions that combine dynamic heterogeneous graph convolutional networks with LSTM for automotive parts demand forecasting. However, these solutions share the following common defects: (1) They only model the correlation between entities without distinguishing between correlation and causation, which makes the model susceptible to interference from confounding factors and leads to incorrect inferences in scenarios such as simultaneous price adjustments by competitors; (2) They use deterministic point prediction outputs without quantifying the uncertainty of predictions, which makes it impossible for downstream decision-making modules to distinguish between "high confidence predictions" and "low confidence guesses", increasing the risk of decision-making when data is sparse or the market changes drastically; (3) There is a lack of interpretable intermediate links between prediction and decision-making, and the reinforcement learning model outputs decision-making actions in a "black box" manner, making it difficult for operators to understand "why a 10% price reduction is recommended at this time", making it difficult for decisions to be trusted and adopted; (4) Given the frequent launch of new products in the headphone industry, there is a lack of effective cross-product knowledge transfer mechanisms, resulting in serious cold start problems for new products.

[0005] Furthermore, in existing technologies, prediction and subsequent decision-making are often disconnected. Predictions serve only as reference values ​​for decision-making, which still relies on human experience or simple rules. This fails to create a data-driven, intelligent closed loop from perception to action, resulting in delayed responses and difficulty in achieving global optimization. Even when some solutions incorporate reinforcement learning for dynamic pricing, their state space design is simplistic, failing to consider deeper information such as prediction uncertainty and the strength of causal influence. The action space lacks constraints on decision stability, leading to a tendency for models to frequently adjust prices, damaging brand image and customer trust.

[0006] Therefore, there is an urgent need for an intelligent prediction and decision-making system for headphone sales that can simultaneously model causal relationships, quantify and predict uncertainty, provide interpretable decisions, and support cross-product knowledge transfer. Summary of the Invention

[0007] To address the shortcomings of existing technologies in headphone sales forecasting, such as failing to fully utilize the complex causal structure information within the field, lacking uncertainty quantification in forecast output, lacking an interpretable bridge between forecasting and decision-making, and the prominent cold start problem for new products, this invention provides an intelligent headphone sales forecasting and decision-making system based on knowledge graphs and deep learning.

[0008] To achieve the above objectives, the present invention adopts the following technical solution: A knowledge graph and deep learning-based intelligent prediction and decision-making system for headphone sales, the system comprising: The multimodal data acquisition and causal discovery module is used to collect raw headphone-related data from multiple data sources, including product parameters, historical sales, prices, user review texts, social media sentiment, market competitor information, and product images; and to perform a constraint-based causal discovery algorithm on the historical sales data and market competitor information to identify causal dependencies between entities and generate a causal adjacency matrix. The temporal causal knowledge graph construction module is used to perform entity recognition and relation extraction on the original data, and to construct causal propagation edges with timestamps in the knowledge graph based on the causal adjacency matrix, forming a dynamic temporal causal knowledge graph with headphone products, brands, technical parameters, user groups, usage scenarios, comment sentiment, and market events as nodes, and semantic relation edges and causal propagation edges together. A causal-attention collaborative graph neural network encoding module is used to extract multi-hop heterogeneous subgraphs centered on target product nodes from the dynamic temporal causal knowledge graph for a target headphone product. The module encodes nodes in the heterogeneous subgraphs using a heterogeneous graph attention network with a causal masking mechanism. This causal masking mechanism is configured to: retain the original attention calculation for causal neighbor nodes identified by the causal discovery module, and apply a decay mask to non-causal neighbor nodes; and evaluate the change in the target node's embedding vector after removing each neighbor node through counterfactual attention weight calculation to identify key causal neighbors; ultimately, the causal-enhanced graph embedding vector of the target product node is obtained. An uncertainty-aware time-series feature extraction module is used to extract historical sales time-series data of the target headphone product, generate time-series feature vectors through a deep ensemble recurrent neural network, and calculate the sales forecast uncertainty based on the output variance of the deep ensemble network. An uncertainty-weighted spatiotemporal fusion prediction module is used to input the causal enhancement graph embedding vector and the temporal feature vector into an uncertainty-weighted gating fusion layer. The gating fusion layer dynamically adjusts the fusion weights of the graph embedding and the temporal features according to the sales prediction uncertainty, and predicts the sales volume and prediction confidence interval of the target headphone product in a future preset period based on the fused feature vector. The counterfactual reasoning-enhanced constraint reinforcement learning decision module is used to generate and output the optimal decision action using a deep reinforcement learning model that incorporates decision stability constraints and multi-objective Pareto optimization. The decision action includes dynamic pricing strategies and inventory allocation schemes. The module also outputs a counterfactual decision explanation, which is configured to quantify the marginal contribution of each state variable to the decision result by comparing the expected return difference between executing the decision action and executing the baseline action.

[0009] Preferably, the multimodal data acquisition and causal discovery module specifically includes: The web crawler unit is used to crawl headphone product information, sales rankings, user review texts, and product images from e-commerce platforms; The API interface unit is used to access social media platforms to obtain topic popularity, public opinion data, and audio evaluation information. The multimodal feature extraction unit is used to extract semantic features from the product image using a pre-trained visual-language model, generate a visual embedding vector, and store the visual embedding vector as a multimodal attribute of the corresponding product node in the knowledge graph. The causal discovery unit is used to perform causal structure learning based on PC algorithm or NOTEARS algorithm on the historical sales data and the market competitor information to identify causal dependencies of the types "competitor price reduction → target product sales change", "technical parameter upgrade → user attention shift", and "negative public opinion outbreak → brand trust decline", and output the causal adjacency matrix.

[0010] Preferably, the time-series causal knowledge graph construction module includes: The entity recognition submodule is used to identify headphone-specific entities from unstructured text using a sequence labeling algorithm based on a domain-adaptive pre-trained language model. The relation extraction submodule is used to determine the semantic relations and causal directions between entities by combining syntactic dependency analysis, remote supervision and causal prompting learning. The semantic relations include "brand-launch-product", "product-competition-product", "user-purchase-product" and "event-impact-product". The causal directions are constrained by the causal adjacency matrix. The temporal causal edge construction submodule is used to attach a timestamp and a causal effect strength weight to each causal propagation edge. The causal effect strength weight is estimated from historical interaction data through propensity score matching or difference-in-differences method. The dynamic update submodule is used to incrementally update the node attributes, relation weights, causal effect strengths, and topological structure of the knowledge graph based on newly collected data within the time window, and trigger online re-verification of the causal structure.

[0011] Preferably, the heterogeneous graph attention network in the causal-attention collaborative graph neural network encoding module is a multi-head heterogeneous graph attention network, and its message passing process is configured as follows: Calculate the attention weight of the source node to the target node for each relation type; By applying the causal masking mechanism, the attention weights are multiplied element-wise with the causal adjacency matrix, so that the attention weights of causal neighbors are preserved or enhanced, while the attention weights of non-causal neighbors are reduced by a preset attenuation coefficient. Aggregate features of different types of neighbor nodes and calculate them using counterfactual attention weights: for each neighbor node Calculate the embedding vector of the target node after removing the neighbor. Norm change ,Will The normalized counterfactual importance score is multiplied by the original attention weight to obtain the final attention coefficient. To capture the heterogeneous effects of the same product under different semantic associations and causal influences.

[0012] Preferably, the uncertainty-aware time-series feature extraction module employs a deep integrated long short-term memory network. The deep integrated network consists of K LSTM sub-networks with the same structure but different initialization parameters. Each sub-network encodes the historical sales time-series data. The mean of the hidden states of the last time step of the K sub-networks is taken as the time-series feature vector, and the variance of the prediction outputs of the K sub-networks is taken as the sales prediction uncertainty.

[0013] Preferably, the uncertainty-weighted gating fusion layer in the uncertainty-weighted spatiotemporal fusion prediction module is configured as follows: Receive the causal augmentation graph embedding vector The time-series feature vector and the aforementioned sales forecast uncertainty ; Computational graph embedding gate value and timing gate value ; Output fusion features Where the sales forecast uncertainty When the value exceeds a preset threshold, the timing gate value... Automatically increase to reduce the prediction risk when graph structure information is insufficient.

[0014] The prediction network is a Bayesian neural network or a deep ensemble fully connected network with a dropout layer. It is trained to minimize the negative log-likelihood loss between the predicted sales and the actual sales, and outputs the predicted sales point value and the prediction confidence interval.

[0015] Preferably, the deep reinforcement learning model in the counterfactual reasoning-enhanced constraint reinforcement learning decision module is the actor-critic algorithm, wherein: Commentator Network Estimation State Value Function Actor network output motion distribution π ; The state space It consists of the following parts: (1) the estimated future sales value output by the prediction module (2) The half-width of the prediction confidence interval characterizes the prediction uncertainty; (3) The causal enhancement graph embedding vector of the target product node. (4) Quantitative values ​​of causal influence extracted from the knowledge graph, including the causal effect coefficient of the price reduction of major competitors on its own sales volume and the causal propagation path length of recent public opinion events; (5) Standardized explicit variables, including its own inventory, its own current price, the average price of major competitors, cost price, and the number of price adjustments in the past N days. The action space It is a two-dimensional continuous vector, with the first dimension being the price adjustment ratio and the second dimension being the suggested inventory transfer quantity; The reward function Set as a multi-objective Pareto optimization form: ; in, The expected profit after taking into account inventory holding costs and stockout penalties; This is a penalty item for inventory turnover rate. As a decision stability penalty, it is configured to apply an increasing penalty when the number of price adjustments in the past N days exceeds a threshold; Out-of-stock penalty item; The counterfactual decision interpretation constructs counterfactual states. To achieve the counterfactual state Configured to: set the state The key variables in the process are replaced one by one with the baseline values. The difference in expected returns under each counterfactual state is calculated through forward propagation, thereby quantifying the marginal causal effect of each state variable on the optimal decision action.

[0016] Preferably, the system further includes a cross-product meta-learning cold start migration module, used when the target headphone product is a new product with a market launch time less than a preset threshold: Build a product prototype network to learn about sales model prototypes corresponding to different combinations of technical parameters, price ranges, and brand positioning. Based on the product prototype network, extract the causal augmentation graph embedding vectors of the K prototype products that are most similar to the new product from the temporal causal knowledge graph subgraph of the existing mature products. By employing a model-independent meta-learning algorithm, rapid adaptation is achieved on the historical decision trajectories of the K prototype products, enabling the sales forecasting module and the decision generation module to fine-tune parameters with a small number of new product samples, thereby alleviating the cold start problem for new products.

[0017] Preferably, the temporal causal knowledge graph construction module is further configured to: calculate the visual similarity between products based on the visual embedding vector of the product image, and construct visual-similar-product type edges between product nodes whose visual similarity exceeds a preset threshold; calculate the sound quality similarity between products based on the frequency response curve features of audio evaluation information, and construct sound quality-similar-product type edges between product nodes whose sound quality similarity exceeds a preset threshold; enabling the causal-attention collaborative graph neural network encoding module to integrate visual similarity and sound quality similarity as supplementary representations of product competition relationships during encoding.

[0018] The beneficial effects of this invention are as follows: 1. This invention constructs a temporal causal knowledge graph by introducing a causal discovery algorithm, replacing the fuzzy correlation edges in the traditional knowledge graph with causal propagation edges that have directionality and effect strength. This enables the model to distinguish the essential difference between "competitor price reductions leading to a decline in its own sales" and "both being driven by seasonal factors," significantly improving the robustness of the model in scenarios with mixed factors.

[0019] 2. This invention introduces a causal masking mechanism and counterfactual attention weights into heterogeneous graph attention networks, enabling graph neural networks to focus not only on "which neighbors are important" but also on "which neighbors are important in a causal way." Furthermore, it quantifies the irreplaceability of each neighbor through counterfactual reasoning, providing causal reasoning capabilities that surpass existing RGAT models.

[0020] 3. This invention introduces a spatiotemporal fusion prediction mechanism with uncertainty awareness. It quantifies the prediction uncertainty through a deep integrated network and dynamically adjusts the fusion weights of graph embedding and temporal features based on the uncertainty. This enables the model to automatically reduce its dependence on unreliable graph structures when data is sparse or the market is volatile, thus significantly improving prediction accuracy and reliability.

[0021] 4. This invention builds a decision-making module based on constraint reinforcement learning and counterfactual reasoning on top of prediction. It incorporates prediction uncertainty and the strength of causal influence into the state space, introduces decision stability constraints to avoid frequent price adjustments, and answers the reasons for decision-making through counterfactual explanations, forming an intelligent closed loop of "causal perception → uncertain prediction → explainable decision → environmental feedback". This realizes full automation, intelligence and trustworthiness from insight to action, reducing costs and increasing efficiency for enterprise operations and improving decision-making transparency.

[0022] 5. This invention effectively solves the cold start problem caused by the frequent launch of new products in the headphone industry through a cross-product meta-learning mechanism, enabling the system to continuously learn and quickly adapt to new products. Attached Figure Description

[0023] Figure 1 This is a system architecture diagram of the present invention; Figure 2 This is a flowchart of the system steps of the present invention. Detailed Implementation

[0024] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.

[0025] Example 1, referring to Figure 1The headphone sales intelligent prediction and decision-making system based on knowledge graphs and deep learning includes a multimodal data acquisition and causal discovery module, a temporal causal knowledge graph construction module, a causal-attention collaborative graph neural network encoding module, an uncertainty-aware temporal feature extraction module, an uncertainty-weighted spatiotemporal fusion prediction module, a constraint reinforcement learning decision-making module enhanced by counterfactual reasoning, and a cross-product meta-learning cold start transfer module.

[0026] Specifically, the multimodal data acquisition and causal discovery module obtains headphone sales data, user reviews, and product images from e-commerce platforms (such as Taobao, JD.com, and Amazon) and related discussions and audio review videos from social media platforms such as Weibo, Zhihu, and Bilibili through web crawlers and APIs. For text data, sentiment analysis is performed using a domain-adaptive pre-trained model based on RoBERTa-wwm-ext, converting each comment into a "positive," "negative," or "neutral" sentiment label and intensity score. For product images, a CLIP model is used to extract 512-dimensional visual embedding vectors. For audio review videos, sentiment analysis is also performed after extracting the review text through speech recognition.

[0027] Crucially, this module performs causal structure learning on historical sales data and market competitor information. Specifically, it collects weekly sales sequences for each headphone product over the past two years and price sequences for major competitors to construct a multivariate time series dataset. The NOTEARS algorithm is used to learn a causal directed acyclic graph (DAG) on this dataset, identifying causal edges such as "competitor A price reduction" → "target product B sales decline" and "active noise cancellation depth parameter improvement" → "increased attention from business users." Simultaneously, the propensity score matching (PSM) method is used to estimate the effect strength of each causal edge; for example, the causal effect coefficient for "competitor A's 10% price reduction leads to a roughly 15% decrease in target product B's weekly sales" is estimated. Finally, a causal adjacency matrix is ​​output. ,in Represents a node For nodes The strength of the causal effect (0 when there is no causal relationship).

[0028] The temporal causal knowledge graph construction module defines the ontology of the headphone domain, including entity types such as "product," "brand," "parameters" (refined to such as dynamic driver, 40mm diaphragm, -40dB active noise cancellation, LDAC codec), "user groups" (such as students, business people, Hi-Fi enthusiasts), "scenarios" (such as commuting, gaming, sports), and "events" (such as new product launches, 618 shopping festivals, chip supply chain disruptions). Relationship types include semantic relationships (such as brand-manufacturing-product, product-equipped-parameters, product-applicable-scenarios, product-competition-product, user-hot topic-product) and causal propagation relationships (such as competitor price reduction-causal impact-product sales, technology upgrade-causal impact-user preference shift).

[0029] Named entity recognition is performed using a domain-adaptive pre-trained language model (BERT-wwm-ext, further pre-trained on headphone domain corpus) combined with a BiLSTM-CRF architecture. Relation extraction is performed using syntactic templates, remote supervision, and causal prompting. Causal prompting guides the pre-trained language model to focus on causal relationships in the text by inserting causal prompt templates such as "because...therefore...", "leading to", and "causing" into the input text. The extraction results are stored in the Neo4j graph database, and causal propagation edges are added according to the causal adjacency matrix C. Each causal edge is appended with a timestamp (the time window in which the causal effect occurs) and a causal effect strength weight. Incremental updates are triggered daily based on new data, and an online re-verification of the causal structure is triggered monthly (the NOTEARS algorithm is re-run using newly accumulated data to check whether the causal structure has changed).

[0030] Furthermore, based on the visual embedding vectors of product images, cosine similarity between products is calculated, and "visual-similarity-product" edges are constructed between product nodes with visual similarity exceeding 0.85. Based on frequency response curve features extracted from audio evaluation information (such as low-frequency extension, high-frequency resolution, and sound field width), sound quality similarity between products is calculated, and "sound quality-similarity-product" edges are constructed between product nodes with sound quality similarity exceeding 0.80. These multimodal similarity edges supplement the competitive or substitutive relationships between products that may be missed in text relation extraction.

[0031] The specific processing flow of the causal-attention collaborative graph neural network encoding module is as follows. For the target headphone product P to be predicted, a knowledge graph query is used to sample its neighbor nodes within 2 hops, constructing a heterogeneous subgraph G. The node types in the subgraph include product, brand, parameter, user group, scene, event, etc., and the edge types include semantic relationship edges, causal propagation edges, visual similarity edges, sound quality similarity edges, etc.

[0032] This module uses an improved relational graph attention network (CA-RGAT) for encoding. The calculation process is as follows: for the target node... Each type of relationship Calculate all its neighbor nodes Original attention coefficient: ; in It is a linear transformation matrix. For relationship The attention parameter vector. Then, a causal masking mechanism is applied: for each neighbor... If the causal adjacency matrix middle If the causal effect strength is greater than 0, the original attention coefficient is retained; otherwise, the attention coefficient is multiplied by the attenuation coefficient. Attention coefficients after obtaining the causal mask: .

[0033] Then calculate the counterfactual attention weights: for each neighbor Temporarily change the node Remove from the subgraph and recalculate the target node. Embedded vector ,calculate Norm change .Will Softmax normalization is performed among all neighbors to obtain the counterfactual importance score. The final attention coefficient is: .

[0034] Weighted aggregation of neighbor features for different relationship types: ; go through Layer stacking, finally retrieving the node The top-level embedding vector is used as its causal augmentation graph embedding vector. This vector encapsulates the product's competitive landscape, technology stack, public opinion environment, and causal impact path.

[0035] Uncertainty-aware temporal feature extraction module acquires product past Historical sales sequence at each time step (weekly sales over the past 52 weeks). And the corresponding external features of the time step (such as whether it is a promotional week, holiday markers, and competitor average price series). Construct Each subnetwork has an identical two-layer LSTM structure, with each subnetwork having a hidden layer dimension of 128, but using different random initialization seeds. Encode the input sequence and output the hidden state at the last time step. and predicted output Temporal feature vectors Pick Mean of hidden states of each subnetwork: ; Sales forecast uncertainty Take the variance of the predicted outputs of K subnetworks: ; in This uncertainty quantification reflects the model's confidence in the prediction results: when historical sales fluctuate drastically or structural breakpoints exist, the differences in predictions among subnetworks increase. Increase.

[0036] The uncertainty-weighted spatiotemporal fusion prediction module embeds the causal enhancement graph into the vector. With time series feature vectors Input uncertainty weighted gating fusion layer.

[0037] The specific calculation is as follows: concatenating vectors ,in This is the logarithmic transformation of the uncertainty.

[0038] Computational graph embedding gate value and timing gate value ,in , , , These are learnable parameters. Crucially, the design of the gate value ensures that when... When it increases, The mean values ​​of all dimensions tend to increase. The means of each dimension tend to decrease, meaning the model automatically reduces its reliance on graph structure information and increases its reliance on temporal features. Feature fusion. .

[0039] Will The data is fed into a Bayesian neural network predictor with two hidden layers (dimensions 256 and 128, respectively, and ReLU activation function). This predictor performs approximate Bayesian inference at each layer using Monte Carlo Dropout (dropout rate p=0.1), outputting the predicted sales for the coming week. and prediction variance .

[0040] The training objective is to minimize the negative log-likelihood loss. ; in This represents actual sales figures. For model parameters, This is the regularization coefficient. This loss function enables the model to produce a larger prediction variance for samples that are difficult to predict, while ensuring accurate predictions, thus achieving reliable uncertainty quantification.

[0041] The counterfactual reasoning-enhanced constraint reinforcement learning decision-making module employs an improved actor-commentator (A2C) algorithm to implement dynamic pricing and inventory decisions. We will consider the market state at each decision step. The design is composed of the following parts: (1) the sales forecast for the next week output by the forecasting module. (2) Half width of the predicted confidence interval (At a 95% confidence level) ), characterizing prediction uncertainty; (3) the current causal enhancement graph embedding vector of the target product (4) The causal influence intensity quantification value extracted from the knowledge graph, including: the causal effect coefficient of the price reduction of major competitors on its own sales volume. (e.g., -0.15), the length of the causal propagation path of recent public opinion events (e.g., 2 jumps), the price difference between the average price of visually similar competitors and its own price. (5) Standardized explicit variables, including their own inventory levels. Current price Average price of major competing products Cost price Number of price adjustments in the past 7 days State vector .

[0042] action It is a two-dimensional continuous vector, where the first dimension is the price adjustment ratio. The second dimension is the suggested inventory transfer quantity. .

[0043] The reward function R is set to a multi-objective Pareto optimization form:

[0044]

[0045]

[0046]

[0047] in The adjusted price, For the inventory after allocation, For actual sales volume, The demand response function (based on historical elasticity estimates) is given. Unit inventory holding cost Penalty for unit stockouts. to for Weights can be set based on operational preferences. The first item is expected profit, the second is inventory turnover rate incentive (encouraging high turnover), and the third is decision-making stability incentive (based on the number of price adjustments in the last 7 days). (A penalty will be imposed if the violation occurs more than 3 times to avoid frequent price adjustments). The fourth item is the out-of-stock penalty.

[0048] Critics Network And actors network All networks use a three-layer fully connected network (hidden layer dimensions 512-256-128, activation function ReLU). Training uses the standard A2C gradient update strategy, but the following improvements are introduced: (1) When the prediction uncertainty is Exceeding the preset threshold At that time, exploration noise is added to the output standard deviation of the actor network to make the decision biased towards conservatism in uncertain environments (such as reducing the price adjustment range); (2) when the causal influence strength When the absolute value exceeds a preset threshold, an aggressive response mode is triggered (such as increasing the price adjustment) to quickly respond to the impact of competitors.

[0049] Counterfactual decision interpretations are generated through the following steps: for the optimal decision action , build A counterfactual state Each counterfactual state will One of the key variables is replaced with the baseline value. For example: "average price of competing products" Replace with the value from the previous period (assuming competitors have not lowered their prices). Replace "Inventory Quantity I" with I+50 (assuming an additional 50 units are needed). "causal effect coefficient" "Set the value to zero (assuming that the competitor's price reduction has no causal effect). Input each counterfactual state into the trained commentator network to obtain the expected return." Calculating marginal causal effects The marginal causal effects of each variable are sorted, and the explanatory text is output as follows: "The main reason for suggesting an 8% price reduction is that competitor A recently reduced its price by 15% (marginal contribution -320 yuan). If the competitor has not reduced its price, it is recommended to reduce the price by only 2%; the current inventory is too high (marginal contribution -150 yuan). If the inventory decreases by 50 units, it is recommended to maintain the original price."

[0050] The workflow of the cross-product meta-learning cold start migration module is as follows. When the target product P is detected to be a new product that has been on the market for less than 3 months: Step 1: Construct a product prototype network. Embed the causal augmentation graph of an existing mature product into a vector. As input, a prototypical network is used to learn sales pattern prototypes corresponding to different combinations of technical parameters, price ranges, and brand positioning. Specifically, products are grouped according to "sound unit type × noise cancellation type × price range × brand positioning," and a prototype vector is calculated for each group. ,in For the first A collection of products.

[0051] Step 2: Prototype Matching. Calculate the initial graph embedding vector (a subgraph constructed based on finite neighbors) of the new product P and the prototype vectors. The cosine similarity is used to select the K=3 prototype products with the highest similarity.

[0052] Step 3: Meta-learning Adaptation. The Model-Independent Meta-Learning (MAML) algorithm is employed. An inner loop update is performed on the historical decision trajectories of each prototype product: for each prototype product, gradient descent is performed once on its historical data to obtain task-specific parameters. In the outer loop, the meta-parameters are updated based on the verification loss of all prototype products. Finally, use meta-parameters. By initializing the network parameters of the sales forecasting module and the decision generation module, and performing 1-3 steps of gradient fine-tuning on a small number of historical samples (e.g., 50-100) of the new product P, rapid adaptation to the new product can be achieved.

[0053] Example 2, refer to Figure 2 This embodiment discloses a method for intelligent prediction and decision-making of headphone sales based on knowledge graphs and deep learning, which includes the following steps: S1: Collect raw headphone-related data from multiple data sources, and perform causal structure learning on historical sales data and market competitor information to identify causal dependencies between entities and generate a causal adjacency matrix. S2: Perform entity recognition and relation extraction on the original data, and construct a dynamic temporal causal knowledge graph that integrates timestamps and causal propagation edges based on the causal adjacency matrix; S3: For the target headphone product, extract multi-hop heterogeneous subgraphs from the knowledge graph, use a heterogeneous graph attention network with causal masking mechanism to encode the causal enhanced graph embedding vector, and identify key causal neighbors through counterfactual attention weights; S4: Extract the historical sales time series data of the target headphone product, and generate a time series feature vector and sales prediction uncertainty through a deep integrated recurrent neural network; S5: Input the causal enhancement graph embedding vector and the temporal feature vector into the uncertainty weighted gating fusion layer, dynamically adjust the fusion weights based on the sales prediction uncertainty, and predict the sales volume and prediction confidence interval within a preset period in the future. S6: Using the predicted sales volume, prediction confidence interval, causal reinforcement graph embedding vector, sales prediction uncertainty, causal influence strength quantification value, and explicit market state code as input, a deep reinforcement learning model with decision stability constraints and multi-objective Pareto optimization is used to generate dynamic pricing and inventory decisions, and output counterfactual decision explanations.

[0054] In the step of generating dynamic pricing and inventory decisions using a deep reinforcement learning model, the training process of the deep reinforcement learning model and the output of the sales forecasting module form a closed-loop feedback. The closed-loop feedback is configured as follows: when the half-width of the prediction confidence interval exceeds a preset threshold, the exploration strategy enhancement of the actor-critic network is triggered, making the decision action more conservative in uncertain environments; when the causal effect coefficient of competitor price reduction in the causal influence strength quantification value exceeds a preset threshold, an aggressive response mode of the decision action is triggered to maximize short-term gains.

[0055] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.

Claims

1. A smart prediction and decision-making system for headphone sales based on knowledge graphs and deep learning, characterized in that: The system includes: The multimodal data acquisition and causal discovery module is used to collect raw headphone-related data from multiple data sources, including product parameters, historical sales, prices, user review texts, social media sentiment, market competitor information, and product images; and to perform a constraint-based causal discovery algorithm on the historical sales data and market competitor information to identify causal dependencies between entities and generate a causal adjacency matrix. The temporal causal knowledge graph construction module is used to perform entity recognition and relation extraction on the original data, and to construct causal propagation edges with timestamps in the knowledge graph based on the causal adjacency matrix, forming a dynamic temporal causal knowledge graph with headphone products, brands, technical parameters, user groups, usage scenarios, comment sentiment, and market events as nodes, and semantic relation edges and causal propagation edges together. A causal-attention collaborative graph neural network encoding module is used to extract multi-hop heterogeneous subgraphs centered on target product nodes from the dynamic temporal causal knowledge graph for a target headphone product. The module then encodes the nodes in the heterogeneous subgraphs using a heterogeneous graph attention network with a causal masking mechanism. This causal masking mechanism is configured to: retain the original attention calculation for causal neighbor nodes identified by the causal discovery module, and apply a decay mask to non-causal neighbor nodes. Furthermore, by calculating counterfactual attention weights, the module evaluates the change in the target node's embedding vector after removing each neighbor node to identify key causal neighbors. Finally, the causal-enhanced graph embedding vector of the target product node is obtained. An uncertainty-aware time-series feature extraction module is used to extract historical sales time-series data of the target headphone product, generate time-series feature vectors through a deep ensemble recurrent neural network, and calculate the sales forecast uncertainty based on the output variance of the deep ensemble network. An uncertainty-weighted spatiotemporal fusion prediction module is used to input the causal enhancement graph embedding vector and the temporal feature vector into an uncertainty-weighted gating fusion layer. The gating fusion layer dynamically adjusts the fusion weights of the graph embedding and the temporal features according to the sales prediction uncertainty, and predicts the sales volume and prediction confidence interval of the target headphone product in a future preset period based on the fused feature vector. The counterfactual reasoning-enhanced constraint reinforcement learning decision module is used to generate and output the optimal decision action using a deep reinforcement learning model that incorporates decision stability constraints and multi-objective Pareto optimization. The decision action includes dynamic pricing strategies and inventory allocation schemes. The module also outputs a counterfactual decision explanation, which is configured to quantify the marginal contribution of each state variable to the decision result by comparing the expected return difference between executing the decision action and executing the baseline action.

2. The intelligent prediction and decision-making system for headphone sales based on knowledge graphs and deep learning according to claim 1, characterized in that, The multimodal data acquisition and causality discovery module specifically includes: The web crawler unit is used to crawl headphone product information, sales rankings, user review texts, and product images from e-commerce platforms; The API interface unit is used to access social media platforms to obtain topic popularity, public opinion data, and audio evaluation information. The multimodal feature extraction unit is used to extract semantic features from the product image using a pre-trained visual-language model, generate a visual embedding vector, and store the visual embedding vector as a multimodal attribute of the corresponding product node in the knowledge graph. The causal discovery unit is used to perform causal structure learning based on PC algorithm or NOTEARS algorithm on the historical sales data and the market competitor information to identify four types of causal dependencies: from competitor price reduction to target product sales changes, from technical parameter upgrade to user attention shift, and from negative public opinion outbreak to brand trust decline, and outputs the causal adjacency matrix.

3. The intelligent prediction and decision-making system for headphone sales based on knowledge graphs and deep learning according to claim 1, characterized in that, The time-series causal knowledge graph construction module includes: The entity recognition submodule is used to identify headphone-specific entities from unstructured text using a sequence labeling algorithm based on a domain-adaptive pre-trained language model. The relation extraction submodule is used to determine the semantic relations and causal directions between entities by combining syntactic dependency parsing, remote supervision and causal prompting learning, wherein the causal directions are constrained by the causal adjacency matrix. The temporal causal edge construction submodule is used to attach a timestamp and a causal effect strength weight to each causal propagation edge. The causal effect strength weight is estimated from historical interaction data through propensity score matching or difference-in-differences method. The dynamic update submodule is used to incrementally update the node attributes, relation weights, causal effect strengths, and topological structure of the knowledge graph based on newly collected data within the time window, and trigger online re-verification of the causal structure.

4. The intelligent prediction and decision-making system for headphone sales based on knowledge graphs and deep learning according to claim 1, characterized in that, The heterogeneous graph attention network in the causal-attention collaborative graph neural network encoding module is a multi-head heterogeneous graph attention network, and its message passing process is configured as follows: Calculate the attention weight of the source node to the target node for each relation type; By applying the causal masking mechanism, the attention weights are multiplied element-wise with the causal adjacency matrix, so that the attention weights of causal neighbors are preserved or enhanced, while the attention weights of non-causal neighbors are reduced by a preset attenuation coefficient. Aggregate features of different types of neighbor nodes and calculate them using counterfactual attention weights: for each neighbor node Calculate the embedding vector of the target node after removing the neighbor. Norm change ,Will The normalized counterfactual importance score is multiplied by the original attention weight to obtain the final attention coefficient. To capture the heterogeneous effects of the same product under different semantic associations and causal influences.

5. The intelligent prediction and decision-making system for headphone sales based on knowledge graphs and deep learning according to claim 1, characterized in that, The uncertainty-aware time-series feature extraction module employs a deep integrated long short-term memory network. The deep integrated network consists of K LSTM sub-networks with identical structures but different initialization parameters. Each sub-network encodes the historical sales time-series data. The mean of the hidden states at the last time step of the K sub-networks is taken as the time-series feature vector, and the variance of the prediction outputs of the K sub-networks is taken as the sales prediction uncertainty.

6. The intelligent prediction and decision-making system for headphone sales based on knowledge graphs and deep learning according to claim 1, characterized in that, The deep reinforcement learning model in the counterfactual reasoning-enhanced constraint reinforcement learning decision module is the actor-critic algorithm.

7. The intelligent prediction and decision-making system for headphone sales based on knowledge graphs and deep learning according to claim 1, characterized in that, The system also includes a cross-product meta-learning cold start migration module, used when the target headphone product is a new product with a market launch time less than a preset threshold: Build a product prototype network to learn about sales model prototypes corresponding to different combinations of technical parameters, price ranges, and brand positioning. Based on the product prototype network, extract the causal augmentation graph embedding vectors of the K prototype products that are most similar to the new product from the temporal causal knowledge graph subgraph of the existing mature products. By employing a model-independent meta-learning algorithm, rapid adaptation is achieved on the historical decision trajectories of the K prototype products, enabling the sales forecasting module and the decision generation module to fine-tune parameters with a small number of new product samples, thereby alleviating the cold start problem for new products.

8. The intelligent prediction and decision-making system for headphone sales based on knowledge graphs and deep learning according to claim 1, characterized in that, The temporal causal knowledge graph construction module is further used to: calculate the visual similarity between products based on the visual embedding vector of the product image, and construct visual-similar-product type edges between product nodes where the visual similarity exceeds a preset threshold; calculate the sound quality similarity between products based on the frequency response curve features of the audio evaluation information, and construct sound quality-similar-product type edges between product nodes where the sound quality similarity exceeds a preset threshold; enabling the causal-attention collaborative graph neural network encoding module to integrate visual similarity and sound quality similarity as supplementary representations of product competition relationships during encoding.