Network marketing data abnormity monitoring method based on attention mechanism

Through the adaptive feature fusion and temperature regulation classification model based on attention mechanism, the problem of uneven fusion of multi-source heterogeneous data in online marketing is solved, and high-precision and stable abnormality detection is achieved to adapt to the real-time monitoring needs of complex marketing environments.

CN120296638AInactive Publication Date: 2025-07-11WUHAN TECHN COLLEGE OF COMM
View PDF 0 Cites 5 Cited by

Patent Information

Application Number
CN202510727186.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-03
Publication Date
2025-07-11
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The uneven fusion of multi-source heterogeneous data features in the prior art in online marketing leads to low accuracy of abnormal detection, making it difficult to deal with the heterogeneity and complex association relationships of multi-source heterogeneous data, and there are category imbalance problems, resulting in insufficient detection accuracy and generalization capabilities.

Method used

The network marketing data anomaly monitoring method based on attention mechanism is adopted, and adaptive feature fusion is performed through the multi-head attention mechanism and the gated weight function, and combined with the temperature control classification model, the feature weight and loss function are dynamically adjusted to achieve sample balance and high-precision detection.

Benefits of technology

It significantly improves the accuracy and generalization ability of abnormal detection, solves the problem of uneven fusion of multi-source heterogeneous data features, improves the accuracy and stability of detection, and adapts to the real-time monitoring needs of complex marketing environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120296638A_ABST
    Figure CN120296638A_ABST
Patent Text Reader

Abstract

The invention provides a network marketing data anomaly monitoring method based on an attention mechanism, and belongs to the technical field of marketing data anomaly monitoring. Eight types of network marketing data are collected, distribution weight and sample balance weight parameters are calculated, and multi-dimensional feature vectors are extracted to construct a feature correlation matrix; and a multi-head attention mechanism and a gating weight function in the adaptive feature fusion model are utilized to generate a fusion feature vector and a fusion weight parameter, the fusion feature vector and the fusion weight parameter are input into a temperature regulation and control classification model for dynamic temperature coefficient adjustment and weighted classification calculation, and a loss function weight is adjusted according to a sample balance weight parameter to output an anomaly detection result. And finally, accurate identification of the abnormal data sample is completed through multi-threshold determination, and the technical problem of low abnormal detection accuracy caused by unbalanced network marketing multi-source heterogeneous data feature fusion in the prior art is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of marketing data anomaly monitoring. Specifically, it relates to a method for monitoring network marketing data anomalies based on an attention mechanism. Background Art

[0002] Network marketing data anomaly monitoring is a key technology to ensure the stable operation of digital marketing systems. Traditional anomaly detection methods mainly rely on statistical analysis, machine learning algorithms, and deep learning models to identify abnormal behaviors in marketing data. Existing anomaly detection technologies are widely used in scenarios such as fraud detection in e-commerce platforms, abnormal traffic identification in advertising placement systems, false interaction monitoring in social media marketing, and abnormal user identification in customer behavior analysis systems. However, traditional anomaly detection methods have significant drawbacks when dealing with network marketing data. First, network marketing data has the characteristics of multi-source heterogeneity, including eight types of data with different natures such as user behavior, advertising placement, and transaction conversion. Traditional methods are difficult to effectively handle the heterogeneity and complex correlation relationships of this data. Second, the importance and feature contribution degrees of different types of data change dynamically, and existing methods lack an adaptive feature weight adjustment mechanism. Finally, the number of abnormal samples and normal samples is severely unbalanced, and traditional classification models are prone to produce biased prediction results. Traditional technologies are difficult to solve the problem of uneven feature fusion of network marketing multi-source heterogeneous data, resulting in insufficient accuracy and generalization ability of anomaly detection in complex marketing environments and unable to meet the technical requirements of high-precision anomaly monitoring in real-time marketing systems. That is to say, there is a technical problem in the prior art that the uneven feature fusion of network marketing multi-source heterogeneous data leads to low anomaly detection accuracy. Summary of the Invention

[0003] In view of this, the present invention provides a method for monitoring network marketing data anomalies based on an attention mechanism, which can solve the technical problem in the prior art that the uneven feature fusion of network marketing multi-source heterogeneous data leads to low anomaly detection accuracy.

[0004] The present invention is implemented as follows: The present invention provides a method for monitoring network marketing data anomalies based on an attention mechanism, including: collecting a set of original network marketing data; counting the quantity ratio of abnormal data samples to normal data samples, calculating distribution weights, and generating sample balance weight parameters; extracting multi-dimensional feature vectors of each data sample and constructing a feature correlation matrix; constructing an adaptive feature fusion model, and generating a fused feature vector and fused weight parameters through a multi-head attention mechanism and a gated weight function; inputting the fused feature vector and fused weight parameters into a temperature-regulated classification model, and performing weighted classification calculation by dynamically adjusting the temperature coefficient according to the fused weight parameters; adjusting the loss function weight according to the sample balance weight parameters, and outputting an anomaly detection result; and performing multi-threshold determination on the anomaly detection result.

[0005] Among them, the distribution weight is specifically a weight coefficient obtained by calculating the proportion of the sample quantity of different types of data in the original network marketing data set.

[0006] Among them, the sample balance weight parameter is specifically a combination of weight coefficients comprehensively calculated according to the quantity ratio of abnormal data samples to normal data samples and the distribution weight, and is used to balance the contribution degrees of different category samples during the training process.

[0007] Among them, the multi-dimensional feature vector is specifically a numerical vector representation containing multiple feature dimensions extracted from network marketing data.

[0008] Among them, the feature correlation matrix is specifically a relationship matrix constructed by calculating the Pearson correlation coefficients between multi-dimensional feature vectors, which reflects the strength of the linear relationship between the feature of different category data.

[0009] Among them, the structure of the adaptive feature fusion model is that the input layer receives the multi-dimensional feature vector and the feature correlation matrix, the feature encoding layer maps the multi-dimensional feature vector to a unified feature space, the multi-head attention layer calculates the attention weights between the features of different category data, the gated fusion layer dynamically adjusts the attention weights according to the gated weight function and generates a fused feature vector, and the output layer generates fused weight parameters.

[0010] Among them, the gated weight function is specifically a function that calculates a balance value based on the sample balance weight parameter, the eigenvalues of the feature correlation matrix, and the variance of the fused feature vector. When the balance value is in the range of 0 to 0.3, a linear weight adjustment function is adopted; when the balance value is in the range of 0.3 to 0.7, a non-linear sigmoid weight adjustment function is adopted; when the balance value is in the range of 0.7 to 1.0, an exponential weight adjustment function is adopted to adjust the gated parameters of the multi-head attention mechanism.

[0011] Among them, the structure of the temperature control classification model is that the input layer receives the fused feature vector and the fused weight parameters, the feature transformation layer performs a non-linear transformation on the fused feature vector, the temperature control layer dynamically calculates and adjusts the temperature coefficient according to the fused weight parameters, the classification calculation layer uses the adjusted temperature coefficient to perform a softmax probability calculation on the features, the loss weighting layer adjusts the loss weights of different category samples according to the sample balance weight parameter, and the output layer generates an anomaly detection result.

[0012] Among them, the temperature coefficient is specifically a probability distribution smoothing parameter dynamically adjusted according to the fused weight parameter, and is used to control the sharpness of the output probability of the temperature control classification model.

[0013] Among them, the anomaly detection result is specifically the probability value that each data sample output by the temperature control classification model is an abnormal sample.

[0014] Among them, before the step of constructing the adaptive feature fusion model, it also includes establishing a training data set, collecting historical data samples containing normal labels and abnormal labels from the network marketing system, performing data cleaning and preprocessing on the historical data samples to remove noise and missing values, extracting multi-dimensional feature vectors of each historical data sample and calculating the feature correlation matrix, and dividing the historical data samples into a training set, a validation set, and a test set in chronological order.

[0015] Among them, after the step of establishing the training data set, it also includes training the adaptive feature fusion model, initializing the model parameters and the hyperparameters of the gating weight function, calculating the fused feature vector and the fused weight parameters through forward propagation using the training set, calculating the reconstruction error and the feature fusion quality loss function, updating the model parameters through the backpropagation algorithm, evaluating the model performance on the validation set and adjusting the learning rate and the regularization parameters.

[0016] Among them, before the step of constructing the temperature regulation classification model, it also includes establishing a training data set for the temperature regulation classification model, performing feature fusion processing on all training samples using the trained adaptive feature fusion model to obtain the fused feature vector and the corresponding fused weight parameters, and constructing a training data set containing the fused feature vector, the fused weight parameters, and the abnormal labels.

[0017] Among them, after the step of establishing the training data set for the temperature regulation classification model, it also includes training the temperature regulation classification model, initializing the base value and the adjustment range of the temperature coefficient according to the distribution range of the fused weight parameters, calculating the classification probability after temperature regulation through forward propagation using the training data, calculating the comprehensive loss function including the classification loss and the temperature regulation regularization term, and simultaneously updating the classification layer parameters and the temperature regulation parameters through the gradient descent algorithm.

[0018] The present invention proposes to achieve precise anomaly detection of multi-source heterogeneous marketing data by constructing an adaptive feature fusion model and a temperature regulation classification model. Specifically, the core defects of traditional technologies are solved through the multi-head attention mechanism and the gating weight function. The adaptive feature fusion model can dynamically adjust the attention weights according to the feature correlation matrix of different data types, realizing the balanced feature extraction and fusion of eight types of heterogeneous data. The gating weight function is based on the comprehensive calculation of the sample balance weight parameter, the eigenvalues of the feature correlation matrix, and the variance of the fusion feature vector, and adopts a differential weight adjustment strategy within different balance value ranges, effectively solving the problem of uneven weight distribution in the feature fusion process. The temperature regulation classification model controls the sharpness of the output probability distribution by dynamically adjusting the temperature coefficient, and combines the sample balance weight parameter to weight-adjust the loss function, significantly improving the classification performance in an unbalanced sample environment. Through the attention mechanism, the importance of different data sources is adaptively evaluated, the gating weight function ensures the balance and stability of the feature fusion process, and the temperature regulation mechanism optimizes the probability calibration quality of the classification decision, thus achieving high-precision anomaly detection in a complex multi-source heterogeneous marketing data environment and solving the technical problem of unbalanced feature fusion of multi-source heterogeneous data in network marketing. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 It is a flowchart of the method of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0020] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention.

[0021] As Figure 1 shown, it is a flowchart of an abnormal monitoring method for network marketing data based on the attention mechanism provided by the present invention. This method includes the following steps:

[0022] S01. Collect the original network marketing data set, and the original network marketing data set includes eight types of data: user behavior data, advertising placement data, transaction conversion data, traffic access data, social media data, customer feedback data, competitor data, and market trend data;

[0023] S02. Statistically calculate the quantity ratio of abnormal data samples to normal data samples in the original network marketing data set, calculate the distribution weights of the eight types of data, and generate sample balance weight parameters;

[0024] S03. Extract the multi-dimensional feature vectors of each data sample in the original network marketing data set, and construct a feature correlation matrix between the eight types of data based on the multi-dimensional feature vectors;

[0025] S04. Construct an adaptive feature fusion model, input the multi-dimensional feature vector and the feature correlation matrix into the adaptive feature fusion model, and generate a fused feature vector and fused weight parameters through a multi-head attention mechanism and a gated weight function;

[0026] S05. Input the fused feature vector and the fused weight parameters into a temperature-regulated classification model. The temperature-regulated classification model dynamically adjusts the temperature coefficient according to the fused weight parameters and performs weighted classification calculation on the fused feature vector;

[0027] S06. Adjust the loss function weight of the temperature-regulated classification model according to the sample balance weight parameter, so that the temperature-regulated classification model outputs an anomaly detection result;

[0028] S07. Perform multi-threshold determination on the anomaly detection result, and determine it as an abnormal data sample when the anomaly probability value exceeds a preset threshold.

[0029] Among them, the user behavior data specifically refers to behavioral feature data such as the click behavior, browsing duration, page jump path, search keywords, purchase preferences, interaction frequency, and session duration of users on the online marketing platform.

[0030] Among them, the advertisement placement data specifically refers to the relevant data of advertising marketing activities such as the number of ad displays, click-through rate, conversion rate, placement time period, target audience, ad position, creative content, and placement cost.

[0031] Among them, the transaction conversion data specifically refers to the data of each link in the order amount, payment method, purchase frequency, refund rate, repurchase interval, change in customer unit price, and conversion funnel.

[0032] Among them, the traffic access data specifically refers to traffic statistical data such as website traffic, page views, number of independent visitors, access sources, device types, geographical locations, and access time distribution.

[0033] Among them, the social media data specifically refers to social interaction data such as the number of shares, comments, likes, user mentions, topic tags, sentiment tendencies, and dissemination paths on social platforms.

[0034] Among them, the customer feedback data specifically refers to feedback information data such as customer satisfaction scores, complaint content, suggestions, service evaluations, product reviews, customer service conversation records, and problem-solving times.

[0035] Among them, the competitor data specifically refers to the competition environment-related data such as the price strategies, marketing activities, market shares, product updates, user evaluations, and promotion channels of competitors.

[0036] Among them, the market trend data specifically refers to the macro market environment data such as industry development trends, changes in consumer demand, seasonal fluctuations, economic indicator impacts, policy and regulatory changes, and technological development dynamics.

[0037] Among them, the distribution weight specifically refers to the weight coefficient obtained by calculating the proportion of the sample quantity of the eight types of data in the original network marketing data set.

[0038] Among them, the sample balance weight parameter is specifically a combination of weight coefficients calculated comprehensively based on the quantity ratio of the abnormal data samples to the normal data samples and the distribution weight, and is used to balance the contribution degrees of different types of samples during the training process.

[0039] Among them, the multi-dimensional feature vector specifically refers to a numerical vector representation containing multiple feature dimensions extracted from the eight types of data.

[0040] Among them, the feature correlation matrix is specifically a multi-dimensional relationship matrix constructed by calculating the Pearson correlation coefficients between the multi-dimensional feature vectors of the eight types of data, and reflects the strength of the linear relationship between the feature of different types of data.

[0041] Among them, the gating weight function is specifically a function for calculating the balance value based on the sample balance weight parameter, the eigenvalues of the feature correlation matrix, and the variance of the fused feature vector. When the balance value is in the range of 0 to 0.3, a linear weight adjustment function is adopted; when the balance value is in the range of 0.3 to 0.7, a non-linear sigmoid weight adjustment function is adopted; when the balance value is in the range of 0.7 to 1.0, an exponential weight adjustment function is adopted to adjust the gating parameters of the multi-head attention mechanism.

[0042] Among them, the fused feature vector is specifically the feature representation obtained by weighted combination of the multi-dimensional feature vectors through the multi-head attention mechanism.

[0043] Among them, the fusion weight parameter is specifically the weight coefficient calculated through the gating weight function, and is used to quantify the relative importance of the eight types of data in the feature fusion process.

[0044] Among them, the temperature coefficient is specifically a probability distribution smoothing parameter dynamically adjusted according to the fusion weight parameter, and is used to control the sharpness of the output probability of the temperature-regulated classification model.

[0045] Among them, the anomaly detection result specifically refers to the probability value that each data sample output by the temperature-regulated classification model is an abnormal sample.

[0046] Among them, the preset threshold is specifically a determination threshold determined according to the sample balance weight parameter and the historical anomaly detection accuracy.

[0047] The structure of the adaptive feature fusion model is that the input layer receives the multi-dimensional feature vector and the feature correlation matrix, the feature encoding layer maps the multi-dimensional feature vector to a unified feature space, the multi-head attention layer calculates the attention weights between the feature of different category data, the gated fusion layer dynamically adjusts the attention weights according to the gated weight function and generates the fused feature vector, and the output layer generates the fusion weight parameter and the fused feature vector. The steps for establishing the training data set of the adaptive feature fusion model include collecting historical data samples of the eight types of data containing normal labels and abnormal labels from the network marketing system, performing data cleaning and preprocessing on the historical data samples to remove noise and missing values, extracting the multi-dimensional feature vector of each historical data sample and calculating the feature correlation matrix, dividing the historical data samples into a training set, a validation set and a test set in chronological order, and performing data augmentation and resampling on the training set according to the scarcity of abnormal samples to balance the positive and negative sample ratios. The steps for training the adaptive feature fusion model include initializing the model parameters and the hyperparameters of the gated weight function, using the training set to calculate the fused feature vector and the fusion weight parameter through forward propagation, calculating the reconstruction error and the feature fusion quality loss function, updating the model parameters and the parameters of the gated weight function through the backpropagation algorithm, evaluating the model performance on the validation set and adjusting the learning rate and regularization parameters, repeating the training process until the model converges, and verifying the generalization ability and feature fusion effect of the model on the test set.

[0048] The structure of the temperature regulation classification model is that the input layer receives the fusion feature vector and the fusion weight parameter, the feature transformation layer performs a non-linear transformation on the fusion feature vector, the temperature regulation layer dynamically calculates and adjusts the temperature coefficient according to the fusion weight parameter, the classification calculation layer uses the adjusted temperature coefficient to perform softmax probability calculation on the features, the loss weighting layer adjusts the loss weights of different category samples according to the sample balance weight parameter, and the output layer generates the anomaly detection result. The steps for establishing the training data set of the temperature regulation classification model include using the trained adaptive feature fusion model to perform feature fusion processing on all training samples to obtain the fusion feature vector and the corresponding fusion weight parameter, constructing a training data set including the fusion feature vector, the fusion weight parameter, and the anomaly label, performing stratified sampling on the training samples according to different fusion weight parameter values to ensure that there are sufficient training samples in various weight cases, performing standardization processing on the training data and adding an appropriate amount of noise to enhance the robustness of the model, and dividing the processed data into a model training set and a parameter tuning verification set according to a certain ratio. The steps for training the temperature regulation classification model include initializing the base value and adjustment range of the temperature coefficient according to the distribution range of the fusion weight parameter, using the training data to calculate the classification probability and the anomaly detection result after temperature regulation through forward propagation, calculating a comprehensive loss function including the classification loss and the temperature regulation regularization term, updating the classification layer parameters and the temperature regulation parameters simultaneously through the gradient descent algorithm, monitoring the classification performance and the probability calibration quality of the model on the verification set, adjusting the regulation strategy of the temperature coefficient and the learning rate decay plan according to the verification result, continuously training until the model achieves the optimal performance in the anomaly detection task, and saving the trained model parameters and the temperature regulation strategy.

[0049] The following describes the specific implementation manners of the above steps in detail.

[0050] The specific implementation of step S01 is to establish a mechanism for obtaining the original network marketing data set through multi-channel data collection interfaces. First, user behavior data is obtained from each marketing platform through application programming interfaces, including behavior characteristics such as user click trajectories, page residence durations, and search query records. Real-time data stream processing technology is used to ensure the timeliness of the data. Then, advertising management system interfaces are used to collect advertising placement data, covering key indicators such as advertising display frequency, user response rate, and placement budget allocation. The data is updated hourly through a scheduled task mechanism. Next, transaction conversion data is extracted from the e-commerce transaction system, recording the complete user purchase process, payment behavior, return information, etc. Database connection pool technology is used to improve the efficiency of data acquisition. At the same time, traffic access data is collected through website analysis tools, monitoring website access patterns, user source distributions, device usage, etc. Log file parsing methods are used to process massive access records. In addition, social media data is obtained through social media application programming interfaces, including user interaction behaviors, content dissemination paths, and emotional expression tendencies. Natural language processing technology is used to analyze the text content. Furthermore, a customer feedback data collection system is established to integrate data from multiple feedback channels such as customer service systems, evaluation platforms, and questionnaires. Text mining algorithms are used to extract key feedback information. Finally, web crawler technology and market research interfaces are used to collect competitor data and market trend data. Data deduplication and quality inspection mechanisms are used to ensure the accuracy and integrity of the data.

[0051] The specific implementation of step S02 is to establish a sample distribution statistics and weight calculation mechanism to generate sample balance weight parameters. First, label statistics are performed on the collected original network marketing data set. By traversing all data samples, abnormal labels and normal labels are identified, and the ratio of the number of abnormal data samples to normal data samples is calculated. Counting statistical algorithms are used to obtain accurate sample distribution information. Then, the distribution weights of eight types of data are calculated. By counting the proportion of the number of samples of each type of data in the total data set, normalization processing methods are used to limit the weight coefficients of each type of data between 0 and 1 to ensure the rationality of weight allocation. Next, sample balance weight parameters are calculated based on the theory of class imbalance processing. Considering the scarcity of abnormal samples and the distribution differences of various types of data, an inverse frequency weighting strategy is used to assign higher weights to minority class samples. The square root transformation is used to alleviate the problem of excessive weight differences. Finally, a dynamic weight adjustment mechanism is established to adjust the sample balance weight parameters in real time according to the changes in model performance during the training process. Exponential moving average methods are used to smooth the weight changes and prevent oscillation phenomena during the training process, ensuring the stability and convergence of model training.

[0052] The specific implementation of step S03 is to construct a multi-dimensional feature extraction and correlation analysis system to establish a feature representation system. First, perform feature engineering on eight types of network marketing data. Extract behavioral pattern indicators such as time series features, frequency features, and path features for user behavior data, calculate placement efficiency indicators such as effect features, cost features, and coverage features for advertising placement data, and use feature selection algorithms to remove redundant and noisy features. Then, use a variety of feature extraction methods to construct multi-dimensional feature vectors, including statistical features, time series features, text semantic features, image features, etc. Use principal component analysis dimensionality reduction technology to map the high-dimensional feature space to an appropriate dimension, and eliminate the influence of different feature dimensions through standardization processing. Next, construct a feature correlation matrix between the eight types of data based on the Pearson correlation coefficient calculation method, quantify the feature relationship by calculating the linear correlation strength between each pair of feature vectors, and use matrix decomposition technology to extract the main eigenvalues and eigenvectors of the correlation matrix to identify potential association patterns between data categories. Finally, establish a feature quality evaluation mechanism, use indicators such as information gain and mutual information to evaluate the discriminative ability of features, and screen out the most valuable feature subsets for the anomaly detection task through feature importance ranking to ensure the representativeness and effectiveness of the feature vectors.

[0053] The specific implementation of step S04 is to design and implement an adaptive feature fusion model to generate high-quality fused feature representations. First, construct the input layer architecture of the model, design a dual-input channel to receive multi-dimensional feature vectors and feature correlation matrices respectively, use feature alignment technology to ensure the dimensionality matching of data from different sources, and use batch normalization methods to stabilize the input data distribution. Then, implement the feature encoding layer, use a fully connected neural network to map multi-dimensional feature vectors of different categories to a unified feature space, use activation functions to introduce non-linear transformation capabilities, and maintain the integrity of feature information through a residual connection mechanism. Next, design a multi-head attention mechanism, calculate the attention weights between feature data of different categories based on the self-attention algorithm, use multi-head parallel computing to improve the expression ability of the model, and use the softmax function to normalize the attention scores to ensure the rationality of the weight distribution. Then, implement a gating weight function, calculate the balance value according to the sample balance weight parameter, the eigenvalue of the feature correlation matrix, and the variance of the fused feature vector. When the balance value is in the range of 0 to 0.3, use a linear weight adjustment function; when the balance value is in the range of 0.3 to 0.7, use a sigmoid weight adjustment function; when the balance value is in the range of 0.7 to 1.0, use an exponential weight adjustment function to dynamically adjust the gating parameters of the multi-head attention mechanism. Finally, through the gating fusion layer, weight the attention weights with the original features to generate fused feature vectors and corresponding fused weight parameters, and use layer normalization technology to stabilize the fusion results to ensure the effectiveness and stability of feature fusion.

[0054] The specific implementation of step S05 is to establish a temperature control classification model to achieve adaptive anomaly detection and classification. First, design the input layer of the model to receive the fused feature vector and the fused weight parameter, adopt a feature dimension check mechanism to ensure the correctness of the input data format, and use a data preprocessing module to standardize and filter the noise of the input. Then, implement the feature transformation layer, use a multi-layer perceptron to perform a non-linear transformation on the fused feature vector, use the dropout technique to prevent overfitting, and stabilize the data distribution of the intermediate layer through batch normalization. Next, construct the temperature control layer, dynamically calculate the temperature coefficient according to the fused weight parameter, adopt an adaptive adjustment strategy to make the temperature coefficient vary within the range of 0.5 to 2.0. When the fused weight is small, use a lower temperature coefficient to enhance the sensitivity of the model; when the fused weight is large, use a higher temperature coefficient to smooth the probability distribution. Then, design the classification calculation layer, use the adjusted temperature coefficient to perform softmax probability calculation on the features, adopt the temperature scaling technique to adjust the sharpness of the output probability, and improve the reliability of the classification result through the probability calibration method. Finally, implement the loss weighting layer, adjust the loss weights of different category samples according to the sample balance weight parameter, adopt the focal loss function to handle the class imbalance problem, use the gradient clipping technique to prevent gradient explosion, and ensure the stability and convergence of model training.

[0055] The specific implementation of step S06 is to establish a loss function weight adjustment mechanism to optimize the training effect of the temperature control classification model. First, design a loss function weight adjustment strategy according to the sample balance weight parameter, adopt a class-weighted cross-entropy loss function to handle the sample imbalance problem, and assign higher loss weights to abnormal samples. Usually, the weight of abnormal samples is set to 3 to 5 times that of normal samples. Then, implement a dynamic weight adjustment algorithm to dynamically adjust the loss weights according to the performance of the model on different categories during the training process, use an exponential decay strategy to gradually reduce the weight adjustment amplitude, and adopt a validation set performance monitoring mechanism to guide the weight adjustment direction. Next, design a regularization term to prevent model overfitting, add an L2 regularization term to constrain the scale of model parameters, use an early stopping mechanism to terminate the training when the performance of the validation set no longer improves, and optimize the training process through a learning rate decay strategy. Then, implement a model performance evaluation system, use indicators such as precision, recall, and F1 score to evaluate the anomaly detection performance, use the receiver operating characteristic curve and the precision-recall curve to analyze the discriminative ability of the model, and evaluate the generalization performance of the model through the cross-validation method. Finally, establish a model output calibration mechanism, use probability calibration technology to adjust the reliability of the model output probability, and adopt the isotonic regression method to calibrate the probability distribution to ensure the accuracy and interpretability of the anomaly detection results.

[0056] The specific implementation of step S07 is to design a multi-threshold decision-making system to accurately identify abnormal data samples. First, a preset threshold determination mechanism is established. The basic threshold is calculated based on the sample balance weight parameter and the historical abnormal detection accuracy rate, and the basic threshold is usually set between 0.6 and 0.8. The grid search method is used to find the optimal threshold parameter on the validation set. Then, a multi-level threshold decision-making strategy is implemented, setting three decision-making criteria: a low threshold of 0.5, a medium threshold of 0.7, and a high threshold of 0.9. When the abnormal probability value exceeds the high threshold, it is directly determined as an abnormal sample. When the probability value is between the medium threshold and the high threshold, other features are combined for comprehensive determination. When the probability value is between the low threshold and the medium threshold, it is marked as a suspicious sample for further analysis. Then, an adaptive threshold adjustment algorithm is designed to dynamically adjust the decision-making threshold according to the real-time detection results and feedback information. The sliding window statistical method is used to analyze the accuracy rate and false alarm rate of recent abnormal detections, and the proportional-integral-derivative controller principle is used to adjust the threshold parameter. Then, an abnormal degree quantification mechanism is established to not only determine whether a sample is abnormal but also quantify the severity of the abnormality. The abnormal probability value and the feature deviation degree are used to calculate the abnormal score, and a hierarchical alarm strategy is adopted to take corresponding measures for abnormalities of different severity levels. Finally, an abnormal detection result output system is implemented to generate a detection report containing information such as abnormal sample identification, abnormal probability value, abnormal type, influencing factors, etc. Visualization technology is used to display the abnormal detection results, and historical trend analysis is used to help users understand the abnormal pattern to ensure the practicality and operability of the detection results.

[0057] The adaptive feature fusion model adopts a hierarchical architecture design, including five main components: an input layer, a feature encoding layer, a multi-head attention layer, a gated fusion layer, and an output layer. The input layer is designed with a dual-channel structure. The first channel receives the multi-dimensional feature vectors of eight types of network marketing data, and the dimension is usually set between 256 and 512. The second channel receives an 8×8 feature correlation matrix, and a feature alignment module is used to ensure the matching of data dimensions. The feature encoding layer uses a three-layer fully connected neural network, with the number of neurons in each layer being 512, 256, and 128 respectively. The ReLU activation function and batch normalization technology are adopted, and the residual connection is used to maintain the smoothness of the gradient. The multi-head attention layer adopts 8 parallel attention heads, with the dimension of each head set to 64. The scaled dot-product attention mechanism is used to calculate the correlation between features, and the positional encoding is used to enhance the expression of sequence information. The gated fusion layer selects the corresponding weight adjustment function according to the balance value range. The slope of the linear function is set to 1.5, the temperature parameter of the sigmoid function is set to 6.0, and the base of the exponential function is set to 2.71828. The gated mechanism is used to dynamically adjust the feature weights. The output layer generates a 128-dimensional fusion feature vector and an 8-dimensional fusion weight parameter, and layer normalization is adopted to ensure the stability of the output.

[0058] The establishment process of the adaptive feature fusion model training dataset includes five stages: data collection, preprocessing, feature extraction, data division, and augmentation. In the data collection stage, historical data for the past 12 months is obtained from the network marketing system to ensure that it contains sufficient normal and abnormal samples, and the total sample size is controlled between 100,000 and 500,000. In the data preprocessing stage, statistical methods are used to detect and process missing values, the 3-sigma principle is adopted to identify and process outliers, and interpolation methods are used to fill in the gaps in time series data. In the feature extraction stage, various types of features such as statistical features, time series features, and text features are extracted from each data sample, and a feature selection algorithm is used to select 1,000 to 2,000 effective features, and the feature correlation matrix is calculated and eigenvalue decomposition is performed. In the data division stage, the data is divided into a training set, a validation set, and a test set according to the ratio of 7:2:1 to ensure that the proportion of abnormal samples in each set is basically the same. In the data augmentation stage, to address the problem of scarce abnormal samples, the synthetic minority over-sampling technique is used to generate artificial abnormal samples, and the noise injection method is used to enhance the robustness of the model, and finally the ratio of abnormal samples to normal samples is brought between 1:3 and 1:5.

[0059] The temperature regulation classification model adopts an end-to-end deep learning architecture, including six core modules: an input layer, a feature transformation layer, a temperature regulation layer, a classification calculation layer, a loss weighting layer, and an output layer. The input layer receives a 128-dimensional fusion feature vector and an 8-dimensional fusion weight parameter, and uses feature standardization to ensure the stability of the input data distribution. The feature transformation layer uses a four-layer fully connected network, with the number of neurons being 256, 128, 64, and 32 in sequence. The Leaky ReLU activation function is used to enhance the non-linear expression ability, and a dropout layer is added to prevent overfitting. The temperature regulation layer calculates the temperature coefficient according to the fusion weight parameter, and adopts a piecewise function strategy. When the sum of the weights is less than 2.0, the temperature coefficient is set to 0.8; when the sum of the weights is between 2.0 and 4.0, the temperature coefficient linearly increases to 1.5; when the sum of the weights is greater than 4.0, the temperature coefficient is fixed at 2.0. The classification calculation layer uses the temperature-scaled softmax function to calculate the abnormal probability, and adopts the label smoothing technique to alleviate the overfitting problem. The loss weighting layer implements the focal loss function, with the focusing parameter set to 2.0, and the class weights are dynamically adjusted according to the sample balance weight parameter. The output layer produces a binary classification probability result, and the probability calibration technique is used to improve the prediction reliability.

[0060] The establishment process of the temperature regulation classification model training dataset is divided into five steps: feature fusion processing, dataset construction, stratified sampling, data augmentation, and final division. In the feature fusion processing stage, the trained adaptive feature fusion model is used to perform forward inference on all original training samples to obtain the corresponding fusion feature vectors and fusion weight parameters, ensuring the consistency of feature representation. In the dataset construction stage, the fusion feature vectors, fusion weight parameters, and original anomaly labels are combined to form new training samples, and the data integrity and label correctness are checked. In the stratified sampling stage, the samples are divided into three levels: low weight, medium weight, and high weight according to the numerical distribution of the fusion weight parameters, and an appropriate ratio of anomaly samples and normal samples is maintained in each level to ensure sufficient training data under various weight conditions. In the data augmentation stage, Gaussian noise is added to the fusion feature vectors to enhance the robustness of the model, and the standard deviation of the noise is set to 0.1 times the feature variance. The fusion weight parameters are slightly perturbed to simulate the uncertainty in actual applications. In the final division stage, the processed data is divided into a model training set and a parameter tuning verification set in a ratio of 8:2 to ensure that the verification set can effectively evaluate the model performance and guide hyperparameter optimization.

[0061] The core significance of the temperature regulation mechanism for the model lies in optimizing the reliability and accuracy of classification decisions by dynamically adjusting the smoothness of the probability distribution. Traditional classification models often produce overly sharp or overly smooth probability distributions, resulting in the model lacking sufficient discriminative ability when facing boundary samples or producing overconfident prediction results. Temperature regulation scales the softmax function by introducing an adjustable temperature coefficient. When the temperature coefficient is low, the output probability distribution is sharper, enhancing the model's discriminative confidence in clear samples. When the temperature coefficient is high, the output probability distribution is smoother, avoiding overconfident judgments of the model for uncertain samples. The temperature regulation mechanism in the present invention dynamically adjusts the temperature coefficient according to the fusion weight parameters, achieving adaptive probability calibration, enabling the model to flexibly adjust the classification strategy according to the importance and reliability of different data features, thereby effectively controlling the false alarm rate while maintaining high detection accuracy.

[0062] The first key technology of the present invention is an adaptive feature fusion method based on the multi-head attention mechanism. Traditional feature fusion methods usually adopt simple splicing or weighted average strategies, which cannot fully capture the complex correlation relationships between different types of data, resulting in the loss of important feature information and the interference of redundant information. Through the multi-head attention mechanism, the present invention can automatically learn and identify the deep correlation patterns among eight types of network marketing data. Each attention head focuses on capturing the feature relationships in different dimensions, and the parallel calculation of multiple heads greatly improves the model's expression ability for complex feature interactions. Compared with traditional methods, this adaptive feature fusion can dynamically adjust the feature weights according to the internal structure of the data, highlight the role of key features while suppressing the influence of noise features, thereby obtaining a richer and more accurate feature representation, and significantly improving the sensitivity and accuracy of anomaly detection.

[0063] The second key technology is the design of a gated weight function based on sample balance weight parameters. Existing anomaly detection methods often adopt fixed resampling or weight adjustment strategies when dealing with class imbalance problems, lacking targeted consideration of different data types and sample distribution characteristics. The gated weight function designed in the present invention comprehensively calculates the balance value according to the sample balance weight parameters, the eigenvalues of the feature correlation matrix, and the variance of the fusion feature vector, and adopts a piecewise function strategy to select different weight adjustment functions, realizing the coordinated consideration and refined adjustment of multiple influencing factors. This dynamic gating mechanism can adaptively adjust the feature fusion strategy according to the actual data distribution, ensuring that minority class samples are fully concerned while preventing majority class samples from being overly suppressed, so as to maintain stable and reliable detection performance in complex class imbalance scenarios.

[0064] The third key technology is the combined application of the multi-dimensional feature correlation matrix and the Pearson correlation coefficient. Traditional anomaly detection methods usually process different types of data independently, ignoring the inherent correlation and mutual influence relationships among various types of network marketing data. The present invention constructs a feature correlation matrix by calculating the Pearson correlation coefficients between the multi-dimensional feature vectors of eight types of data, which not only quantifies the strength of the linear relationship between different data types, but also extracts potential correlation patterns and structural information through matrix decomposition technology. This feature modeling method based on correlation analysis can fully explore the synergistic effect and complementary information between data, identify complex anomaly patterns that cannot be discovered by single data type analysis, and has stronger anomaly recognition ability and lower false detection rate compared with traditional independent feature analysis methods.

[0065] The synergistic effect of these key technologies forms a highly integrated and optimized anomaly detection framework, showing significant comprehensive advantages compared with existing technologies. The adaptive feature fusion of the multi-head attention mechanism provides high-quality feature representations for subsequent classification decisions. The dynamic adjustment of the gating weight function ensures the balance and stability of the feature fusion process. The introduction of the feature correlation matrix enhances the model's ability to understand the internal structure of the data. The application of the temperature regulation mechanism optimizes the final classification decision-making process. This multi-level and multi-dimensional technology integration not only solves the key problems faced by traditional methods in processing complex network marketing data, such as insufficient feature representation, improper handling of class imbalance, and insufficient mining of data correlation, but also generates a synergistic effect through the organic combination of various technical components, significantly improving the detection accuracy, stability, adaptability, and robustness of the entire system, providing a more reliable and efficient technical solution for the anomaly monitoring of network marketing data.

[0066] Specifically, the principle of the present invention is as follows: The core principle of the present invention to solve the problem of unbalanced feature fusion of multi-source heterogeneous data in network marketing lies in constructing a hierarchical and progressive feature processing and classification decision-making mechanism. First, by calculating the distribution weights and sample balance weight parameters of eight types of data, a quantitative evaluation basis for the importance of data sources is established. This weight calculation method considers the sample quantity distribution of different data types and the proportional relationship between abnormal and normal samples, ensuring the rationality of the contribution degree of each data source in the subsequent feature fusion process from a mathematical principle.

[0067] The technical principle of the adaptive feature fusion model is based on the parallel feature learning ability of the multi-head attention mechanism. By mapping multi-dimensional feature vectors to a unified feature space, the multi-head attention layer can calculate the association strength between different data types in parallel, generating an attention weight matrix reflecting the complex dependence relationship between data. The design of the gating weight function is based on the principle of piecewise functions, adopting three different weight adjustment strategies of linear, sigmoid, and exponential according to different ranges of the balance value. This piecewise processing mechanism can adapt to the weight adjustment requirements in different feature fusion scenarios, ensuring the stability and effectiveness of the feature fusion process.

[0068] The technical principle of the temperature regulation classification model is based on the probability distribution adjustment theory. The temperature coefficient realizes the fine adjustment of the classification probability by controlling the output distribution shape of the softmax function. When the fusion weight parameter indicates that certain features are more important, dynamically reducing the temperature coefficient can enhance the certainty of the classification decision; conversely, increasing the temperature coefficient can smooth the probability distribution and avoid overconfident prediction results. The weighted adjustment mechanism of the loss function is based on the sample balance weight parameter, effectively alleviating the negative impact of sample imbalance on model training by assigning higher loss weights to abnormal samples.

[0069] The technical solution of the present invention logically forms a complete closed-loop processing flow: in the data preprocessing stage, a weight evaluation basis is established; in the feature fusion stage, balanced multi-source feature integration is achieved; in the classification decision-making stage, the probability output quality is optimized through temperature control; in the multi-threshold determination stage, the reliability of anomaly detection is ensured. This hierarchical processing architecture theoretically guarantees that each processing link is specifically optimized for multi-source heterogeneous data, thus realizing the high efficiency and robustness of the overall technical solution.

[0070] A specific embodiment 1 of the present invention is provided below, and the specific implementation manners of each step in this embodiment 1 are described in detail as follows.

[0071] The specific implementation manner of step S01 is the same as the foregoing, and will not be elaborated in detail here.

[0072] In the specific implementation manner of step S02, the calculation process of the quantity ratio of abnormal data samples to normal data samples is described in detail as follows:

[0073]

[0074] In the formula, R is the quantity ratio of abnormal data samples to normal data samples; N abnormal is the number of abnormal data samples, which is obtained by traversing all samples marked as abnormal in the original network marketing data set; N normal is the number of normal data samples, which is obtained by counting the number of samples marked as normal.

[0075] In step S02, the calculation of the distribution weights of eight types of data is specifically expressed as:

[0076]

[0077] In the formula, W i is the distribution weight of the i-th type of data, where i = 1, 2,..., 8 respectively corresponds to user behavior data, advertising placement data, transaction conversion data, traffic access data, social media data, customer feedback data, competitor data, and market trend data; N i is the number of samples of the i-th type of data in the original network marketing data set; is the total number of samples of eight types of data.

[0078] The calculation process of the sample balance weight parameter is described in detail as follows:

[0079]

[0080] In the formula, ω i is the sample balance weight parameter of the i-th type of data; W iis the distribution weight of the i-th type of data; R is the ratio of the number of abnormal data samples to the number of normal data samples; the square root transformation is used to alleviate the problem of excessive weight differences, This term is used to balance the impact of the scarcity of abnormal samples on weight allocation.

[0081] In the specific implementation of step S03, the calculation process of constructing the multi-dimensional feature vector is described in detail as follows:

[0082] F i = [f i1 , f i2 ,..., f id T ;

[0083] In the formula, F i is the multi-dimensional feature vector of the i-th type of data; f ij is the j-th feature component of the i-th type of data, j = 1, 2,..., d; d is the number of feature dimensions, usually set between 256 and 512; each feature component is obtained through various feature extraction methods such as statistical features, time series features, and text semantic features.

[0084] In step S03, the calculation of the feature correlation matrix is specifically expressed as:

[0085]

[0086] In the formula, ρ ij is the Pearson correlation coefficient between the i-th type of data and the j-th type of data; F ik is the k-th sample feature value of the i-th type of data; is the feature mean of the i-th type of data; n is the total number of samples, that is, all the samples in the original network marketing data set. The feature correlation matrix C between eight types of data is expressed as:

[0087]

[0088] This matrix is an 8×8 symmetric matrix, the diagonal elements are 1, and the non-diagonal elements represent the linear correlation strength between the features of different categories of data. The maximum eigenvalue λ max of the feature correlation matrix is obtained through eigenvalue decomposition:

[0089] C = VΛV T ;

[0090] In the formula, V is the eigenvector matrix; Λ is the eigenvalue diagonal matrix; λ max is the largest diagonal element in Λ.

[0091] In the specific implementation of step S04, the calculation process of the balance value of the gating weight function is described in detail as follows: ​

[0092]

[0093] Wherein, B is the balance value; α, β, γ are weight coefficients, and the default values are 0.4, 0.3, and 0.3 respectively; is the sum of the sample balance weight parameters; λ max is the maximum eigenvalue of the feature correlation matrix C; Var(F fusion ) is the variance of the fused feature vector; F fusion is the fused feature vector.

[0094] In step S04, the gating weight function adopts different weight adjustment functions according to different ranges of the balance value B: when B ∈ [0, 0.3], a linear weight adjustment function is adopted:

[0095] G(B) = 1.5B;

[0096] When B ∈ (0.3, 0.7], a non-linear sigmoid weight adjustment function is adopted:

[0097]

[0098] When B ∈ (0.7, 1.0], an exponential weight adjustment function is adopted:

[0099] G(B) = e 2.71828(B-0.7) ;

[0100] Wherein, G(B) is the output value of the gating weight adjustment function, which is used to dynamically adjust the gating parameters of the multi-head attention mechanism.

[0101] In step S04, the calculation process of the fused feature vector is described in detail as follows:

[0102]

[0103] Wherein, F fusion is the fused feature vector; A i is the attention weight of the i-th type of data calculated by the multi-head attention mechanism; F i is the multi-dimensional feature vector of the i-th type of data; G(B) is the output value of the gating weight function.

[0104] The calculation of the attention weight of the multi-head attention mechanism is specifically expressed as:

[0105]

[0106] Wherein, A i is the attention weight of the i-th type of data; Q i is the query matrix, which is obtained by performing an operation on the feature vector F of the i-th type of data iobtained by performing a linear transformation; K i is the key matrix, obtained by performing another set of linear transformations on the feature vector F of the i-th class of data i obtained by performing a linear transformation; V i is the value matrix, obtained by performing a third set of linear transformations on the feature vector F of the i-th class of data i obtained by performing a linear transformation; d k is the dimension of the key vector, usually set to 64; softmax is the normalized exponential function.

[0107] In the specific implementation of step S05, the calculation process of the temperature coefficient is described in detail as follows:

[0108]

[0109] In the formula, T is the dynamically adjusted temperature coefficient; T base is the base temperature coefficient, with a default value of 1.0; ΔT is the temperature adjustment coefficient, with a default value of 0.25; ω fusion,i is the fusion weight parameter of the i-th class of data; the value range of the temperature coefficient T is from 0.5 to 2.0.

[0110] In step S05, the softmax probability calculation of the temperature-controlled classification model is specifically expressed as:

[0111]

[0112] In the formula, P(y = k|x) is the probability that the sample x belongs to the k-th class; z k is the output score of the classification calculation layer for the k-th class; T is the dynamically adjusted temperature coefficient; K is the total number of classes, and in the anomaly detection task, K = 2.

[0113] In the specific implementation of step S06, the calculation process of the loss function weight adjustment is described in detail as follows:

[0114]

[0115] In the formula, L is the weighted cross-entropy loss function; N is the total number of training samples; K is the number of classes; w k is the loss weight of the k-th class; y ik is the true label of the i-th sample belonging to the k-th class, represented by one-hot encoding; P(y i = k|x i ) is the probability that the model predicts the i-th sample belongs to the k-th class.

[0116] In step S06, the calculation of the class loss weight is specifically expressed as:

[0117]

[0118] Where, w normal is the loss weight of normal samples; w abnormal is the loss weight of abnormal samples; R is the ratio of the number of abnormal data samples to the number of normal data samples; ω i is the sample balance weight parameter of the i-th type of data; this weight design ensures that abnormal samples receive higher attention.

[0119] In the specific implementation of step S07, the threshold calculation process of the multi-threshold determination system is described in detail as follows:

[0120]

[0121] Where, θ low is the low threshold, fixed at 0.5; θ mid is the medium threshold; θ high is the high threshold; ω i is the sample balance weight parameter of the i-th type of data; ACC hist is the historical abnormal detection accuracy rate, obtained by statistically calculating the proportion of correctly identified abnormal samples in historical detection results, and the value range is from 0 to 1.

[0122] In step S07, the calculation of the abnormal degree quantization score is specifically expressed as:

[0123] S anomaly = P anomaly ·(1 + α·D feature );

[0124] Where, S anomaly is the abnormal degree quantization score; P anomaly is the abnormal probability value output by the model; D feature is the feature deviation degree, and the calculation formula is F sample is the feature vector of the current sample; F normal is the mean value of the feature vectors of normal samples; α is the adjustment coefficient, and the default value is 0.5.

[0125] To better understand and implement the present invention, the following provides Example 2 of a specific application scenario of the present invention: A research team, aiming at the problem of abnormal monitoring of e-commerce platform network marketing data, adopts an abnormal monitoring method based on the attention mechanism for implementation verification. The researchers selected the network marketing data of a large e-commerce platform in the recent 6 months as the experimental object. The total amount of data reached 150,000 samples, among which the proportion of abnormal samples was about 3.2%, and the proportion of normal samples was 96.8%.

[0126] In step S01, the researchers established a complete data acquisition mechanism through a multi-channel data acquisition interface. The user behavior data includes information such as click behavior, browsing duration, and page jump path, with a total of 32,500 samples collected. The advertising placement data covers indicators such as display times, click-through rate, and conversion rate, obtaining 18,700 samples. The transaction conversion data records information such as order amount, payment method, and purchase frequency, collecting 28,900 samples. The traffic access data monitors website traffic, number of independent visitors, device type, etc., with a total of 21,800 samples. The social media data includes sharing times, number of comments, sentiment tendency, etc., collecting 16,400 samples. The customer feedback data integrates satisfaction scores, complaint content, service evaluations, etc., obtaining 13,200 samples. The competitor data collects information such as price strategies, marketing activities, and market share, with a total of 9,800 samples. The market trend data includes industry development trends, changes in consumer demands, etc., collecting 8,700 samples. The distribution of the eight types of data is shown in Table 1:

[0127] Table 1 Distribution Table of Eight Types of Network Marketing Data

[0128]

[0129]

[0130] In step S02, the researchers calculated that the ratio R of the number of abnormal data samples to the number of normal data samples is 4806 / 145194 = 0.0331. According to the formula, the sample balance weight parameters of each type of data are calculated. The weight parameter of the user behavior data The weight parameter of the advertising placement data ω2 = 2.739, the weight parameter of the transaction conversion data ω3 = 2.211, the weight parameter of the traffic access data ω4 = 2.542, the weight parameter of the social media data ω5 = 2.930, the weight parameter of the customer feedback data ω6 = 3.257, the weight parameter of the competitor data ω7 = 3.791, and the weight parameter of the market trend data ω8 = 4.015.

[0131] In step S03, the researchers extracted multi-dimensional feature vectors for each type of data, and the feature dimension was set to 256. Feature vectors were constructed through methods such as statistical features, time series features, and text semantic features, and the feature correlation matrix between the eight types of data was calculated. The calculation results of the Pearson correlation coefficient show that the correlation between the user behavior data and the transaction conversion data is the highest, reaching 0.742. The correlation between the advertising placement data and the user behavior data is 0.658, and the correlation between the social media data and the customer feedback data is 0.524. The maximum eigenvalue λ of the feature correlation matrix is obtained through eigenvalue decomposition max = 3.467.

[0132] In step S04, the researchers constructed an adaptive feature fusion model. The multi-head attention mechanism adopted 8 parallel attention heads, and the dimension of each head was set to 64. The calculated balance value of the gating weight function was B = 0.4×22.562 + 0.3×3.467 + 0.3×1.284 = 10.451. Since B > 1.0 and exceeded the preset range, the researchers normalized the balance value to B norm = 0.85, and used the exponential weight adjustment function G(B) = e 2.71828×(0.85-0.7) = 1.447. The dimension of the fused feature vector was 128, and the calculation results of the fusion weight parameters are shown in Table 2:

[0133] Table 2 Calculation Results of Fusion Weight Parameters

[0134]

[0135] In step S05, the researchers established a temperature regulation classification model. According to the fusion weight parameters, the temperature coefficient T = 1.0 + 0.25×1.446 = 1.362 was calculated. The temperature regulation classification model adopted a four-layer fully connected network, and the number of neurons was 256, 128, 64, and 32 in sequence. The model training used an 8:2 ratio to divide the training set and the validation set, the number of training rounds was set to 150 rounds, the initial learning rate was 0.001, and an exponential decay strategy was adopted.

[0136] In step S06, the researchers adjusted the loss function weights to optimize the model performance. The loss weight of normal samples was set to 1.0, and the loss weight of abnormal samples was calculated as The focal loss function was used to handle the class imbalance problem, and the focusing parameter was set to 2.0. The performance indicators during the model training are shown in Table 3:

[0137] Table 3 Model Training Performance Indicator Table

[0138] Number of training rounds Training loss Validation loss Precision Recall <![CDATA[F1 score]]> 50 0.245 0.287 0.823 0.756 0.788 100 0.178 0.203 0.867 0.814 0.840 150 0.142 0.168 0.891 0.847 0.868

[0139] In step S07, the researchers designed a multi-threshold decision-making system. The historical anomaly detection accuracy ACC hist = 0.854, and the low threshold θ low = 0.5 was calculated. The medium threshold Since it exceeded the reasonable range, it was adjusted to θ mid = 0.75, and the high threshold θ high = 0.8 + 0.1×0.854 = 0.885. The anomaly degree quantization was calculated using the adjustment coefficient α = 0.5.

[0140] During the test phase, an independent test set containing 15,000 samples was used for verification, including 480 abnormal samples and 14,520 normal samples. The test results show that the detection performance of the model at different thresholds is as shown in Table 4:

[0141] Table 4 Detection performance table at different thresholds

[0142] Decision threshold Number of detected anomalies Number of true anomalies Number of false alarms Precision Recall <![CDATA[F1 score]]> 0.5 542 421 121 0.777 0.877 0.824 0.75 467 398 69 0.852 0.829 0.841 0.885 386 357 29 0.925 0.744 0.825

[0143] Regarding the core technical problems of abnormal monitoring of e-commerce platform network marketing data, traditional methods mainly adopt a single-feature detection method based on statistical thresholds, and various types of data are independently monitored by setting fixed thresholds. The detection precision rate of traditional methods is usually between 75% and 80%, the recall rate is between 70% and 75%, and the F1 score is about 0.72 to 0.76. The present invention has brought significant improvements in technology compared with traditional means. First, through multi-dimensional feature fusion and attention mechanism, this method can capture the potential correlation relationships between different types of data. Compared with the independent detection mode of traditional methods, the expression ability of the fused features has been improved by about 12%. Second, the adaptive temperature control mechanism dynamically adjusts the classification probability distribution according to different data features. Compared with the traditional fixed-threshold method, the precision rate of abnormal detection has been improved by about 15%, and the recall rate has been improved by about 13%. Finally, the multi-threshold decision-making system combines the quantification of the degree of abnormality. Compared with the traditional single-threshold decision-making, the false alarm rate has been reduced by about 18%, and the F1 score of the overall detection performance has been improved by about 14%. The present invention realizes the effective fusion of multi-source heterogeneous data through the attention mechanism, realizes the adaptive adjustment of classification probability through temperature control, and realizes the refined management and control of abnormal detection through multi-threshold decision-making, significantly improving the accuracy and reliability of network marketing data abnormal monitoring from the technical level.

[0144] As described above, it is only the specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention can easily think of changes or substitutions, which should all be covered within the protection scope of the present invention.

Claims

1. A method for abnormal monitoring of network marketing data based on an attention mechanism, characterized in that, Including: Collecting the original data set of network marketing; Counting the quantity ratio of abnormal data samples and normal data samples, calculating the distribution weight, and generating the sample balance weight parameter; Extracting the multi-dimensional feature vectors of each data sample and constructing the feature correlation matrix; Constructing an adaptive feature fusion model, generating the fusion feature vector and the fusion weight parameter through the multi-head attention mechanism and the gating weight function; inputting the fusion feature vector and the fusion weight parameter into the temperature-regulated classification model, dynamically adjusting the temperature coefficient according to the fusion weight parameter for weighted classification calculation; adjusting the loss function weight according to the sample balance weight parameter, outputting the anomaly detection result; and performing multi-threshold determination on the anomaly detection result.

2. The method for abnormal monitoring of network marketing data based on the attention mechanism according to claim 1, wherein The distribution weight is specifically a weight coefficient obtained by calculating the proportion of the sample quantity of different types of data in the original data set of network marketing.

3. The method for abnormal monitoring of network marketing data based on the attention mechanism according to claim 2, wherein The sample balance weight parameter is specifically a combination of weight coefficients comprehensively calculated according to the quantity ratio of abnormal data samples and normal data samples and the distribution weight, and is used to balance the contribution degrees of different category samples in the training process.

4. The method for abnormal monitoring of network marketing data based on the attention mechanism according to claim 3, wherein The multi-dimensional feature vector is specifically a numerical vector representation containing multiple feature dimensions extracted from network marketing data.

5. The method for abnormal monitoring of network marketing data based on the attention mechanism according to claim 4, characterized in that, The feature correlation matrix is specifically a relationship matrix constructed by calculating the Pearson correlation coefficient between multi-dimensional feature vectors, reflecting the strength of the linear relationship between the feature of different category data.

6. The method for abnormal monitoring of network marketing data based on the attention mechanism according to claim 5, characterized in that, The structure of the adaptive feature fusion model is that the input layer receives the multi-dimensional feature vector and the feature correlation matrix, the feature encoding layer maps the multi-dimensional feature vector to a unified feature space, the multi-head attention layer calculates the attention weight between the features of different category data, the gating fusion layer dynamically adjusts the attention weight according to the gating weight function and generates the fusion feature vector, and the output layer generates the fusion weight parameter.

7. The abnormal monitoring method for network marketing data based on the attention mechanism according to claim 6, characterized in that The gating weight function is specifically a function for calculating the balance value based on the sample balance weight parameter, the eigenvalue of the feature correlation matrix, and the variance of the fusion feature vector. When the balance value is in the range of 0 to 0.3, a linear weight adjustment function is adopted; when the balance value is in the range of 0.3 to 0.7, a non-linear sigmoid weight adjustment function is adopted; and when the balance value is in the range of 0.7 to 1.0, an exponential weight adjustment function is adopted to adjust the gating parameter of the multi-head attention mechanism.

8. The method for abnormal monitoring of network marketing data based on the attention mechanism according to claim 7, characterized in that The structure of the temperature-regulated classification model is that the input layer receives the fusion feature vector and the fusion weight parameter, the feature transformation layer performs non-linear transformation on the fusion feature vector, the temperature regulation layer dynamically calculates and adjusts the temperature coefficient according to the fusion weight parameter, the classification calculation layer uses the adjusted temperature coefficient to perform softmax probability calculation on the features, the loss weighting layer adjusts the loss weight of different category samples according to the sample balance weight parameter, and the output layer generates the anomaly detection result.

9. The method for abnormal monitoring of network marketing data based on the attention mechanism according to claim 8, wherein The temperature coefficient is specifically a probability distribution smoothing parameter dynamically adjusted according to the fusion weight parameter, and is used to control the sharpness of the output probability of the temperature-regulated classification model.

10. The method for abnormal monitoring of network marketing data based on the attention mechanism according to claim 9, characterized in that, The anomaly detection result is specifically the probability value that each data sample output by the temperature-regulated classification model is an abnormal sample.

Citation Information

Cited By

  • Advertisement delivery abnormity monitoring and alarm current limiting system and method

    CN120951215A

  • A system and method for advertisement delivery anomaly monitoring and alarm throttling

    CN120951215B

  • Data security grading system and method for multi-task large model

    CN121396663A

  • Interaction data anomaly detection method based on gated data fusion

    CN122174129A

  • Interaction data anomaly detection method based on gated data fusion

    CN122174129B