Marketing data link abnormity diagnosis method, system and device and storage medium
By adopting a combination method of self-supervised support vector machine algorithm and LSTM neural network in the power marketing data link, the problems of multi-source data differences and lack of real-time diagnostic tools are solved, and efficient and automated anomaly diagnosis and decision-making support are achieved, improving the The stability and business performance of data products.
Patent Information
- Application Number
- CN202510022637.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-07
- Publication Date
- 2025-02-11
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
There are differences in the multi-source data formats in the power marketing data link, the lack of real-time abnormal diagnosis tools and efficient data governance methods, which makes it difficult to ensure the accuracy and consistency of data applications, affecting the stability and reliability of data products.
Using a method based on self-supervised support vector machine algorithm, efficient diagnosis and interpretation of marketing data link abnormalities is achieved through data link feature extraction, self-supervised learning label generation, abnormal detection model training and adaptive optimization of LSTM neural network.
It improves the accuracy and adaptability of data link abnormal diagnosis, reduces manual intervention, realizes automated abnormal detection and decision-making support, and improves the stability and business efficiency of data products.
Smart Images

Figure CN119416045A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power system data management, and in particular to a marketing data link abnormality diagnosis method, system, device and storage medium. Background Art
[0002] In recent years, with the rapid growth of power marketing data volume and data sources, the accuracy and consistency requirements of data applications have been increasing, and data link anomaly diagnosis methods have also received attention. Through multi-source fusion data quality inspection technology, data aggregation and cleaning can be unified, data quality risks can be eliminated, and data utilization efficiency and synergy effects can be effectively improved, thereby improving the operational efficiency of enterprises. On this basis, through deep learning methods such as support vector machines, graph neural networks, and self-learning algorithms, the automation of data anomaly diagnosis and link traceability can be further realized, assisting enterprises to achieve full-link monitoring of data links, promote enterprise digital transformation, and enhance competitiveness in data quality assurance and intelligent operations.
[0003] However, due to the differences in multi-source data, the lack of data link anomaly diagnosis tools, and high data governance costs, the link anomaly diagnosis method for power marketing data faces many challenges in practical applications: (1) Differences in multi-source data formats affect data quality. Data sources in the power marketing field are widely distributed in different systems and departments, and there are significant differences in data formats and specifications. Due to the lack of unified standards among systems, data duplication, missing data, or inconsistent formats are prone to occur during the integration process, which ultimately reduces the accuracy and consistency of data applications. Current diagnostic methods cannot effectively and comprehensively solve the quality problems of multi-source data, and they urgently need to be improved to support data fusion and anomaly management in power marketing. (2) Lack of real-time anomaly diagnosis of data links affects application stability. In the existing power marketing data links, due to the lack of an efficient real-time anomaly detection mechanism, link anomalies are difficult to detect and locate in a timely manner in data product applications. With the increasing complexity of data flow, link anomalies may cause data loss or dislocation, greatly reducing the stability and reliability of data products. The lack of effective data link anomaly diagnosis tools makes it difficult to timely manage data problems, affecting the operating efficiency and data availability of business systems. (3) Data governance is time-consuming and labor-intensive, and it is difficult to support business needs. At present, data governance mainly focuses on the development and cleaning of underlying data. The governance process is highly dependent on manual cleaning, standardization and anomaly repair. It is not only difficult to efficiently meet the marketing data needs, but also may miss business value due to governance delays. The governance of complex power marketing data should be more flexible and intelligent to support quick decision-making on the business side, reduce time consumption, and improve the reliability and applicability of data products. Summary of the invention
[0004] The technical problem to be solved and the technical task proposed by the present invention are to improve and perfect the existing technical solutions, and provide a marketing data link abnormality diagnosis method, system, device and storage medium, so as to solve the problems of multi-source data differences, lack of data link abnormality diagnosis tools, high data management costs, etc. To this end, the present invention adopts the following technical solutions.
[0005] The first technical solution of the present invention is: a marketing data link abnormality diagnosis method based on a self-supervised support vector machine algorithm, comprising the following steps: 1) Data link feature extraction and data preprocessing, including: Collecting multi-source heterogeneous data of the marketing data link, wherein the multi-source data includes node status data, link transmission rate, delay, packet loss rate and timestamp information; Clean the collected data, fill in missing values, process outliers, and standardize each feature; 2) Self-supervised learning label generation, including: The sliding window method is used to calculate the statistical characteristics of the link data, and the data are grouped through the clustering algorithm; Generate self-supervised learning labels based on the proportion of outliers in each cluster for anomaly detection; 3) Anomaly detection model training: build a classification model through support vector machine (SVM), use self-supervised labels for training, and then classify the data into normal and abnormal; 4) Adaptive model optimization based on LSTM neural network: further training and optimization of the anomaly detection model through multi-classification processing, sample expansion and LSTM neural network algorithm to improve the accuracy of anomaly detection and the adaptability of the model; 5) Interpretation of abnormal diagnosis results and decision support: Based on the classification results of the LSTM neural network, provide abnormal cause analysis, time series analysis and decision support suggestions.
[0006] This technical solution uses a combination of self-supervised learning, support vector machines and LSTM neural networks to efficiently and accurately diagnose anomalies in marketing data links. It has strong adaptability, scalability and interpretability, and can provide high-precision decision support for anomaly detection. Specifically, it includes: This technical solution ensures the comprehensiveness and representativeness of data by collecting multi-source heterogeneous data (such as node status data, link transmission rate, delay, packet loss rate and timestamp information). By cleaning, filling missing values, processing outliers and standardizing these data, it can effectively eliminate noise and improve the accuracy of the model, thereby improving the accuracy of abnormal diagnosis.
[0007] This technical solution can not only generate high-quality training labels on unlabeled data, but also use the outlier detection function of the clustering algorithm to more accurately identify potential abnormal data. Self-supervised learning labels provide strong support for subsequent anomaly detection models, reduce dependence on manually labeled data, and improve the automation of model training.
[0008] The support vector machine (SVM) classification model enables efficient and accurate anomaly detection of data. The advantage of SVM is that it can handle nonlinear data and segment data by optimizing hyperplanes to ensure accurate classification of abnormal and normal data. Self-supervised learning labels provide rich training data for the support vector machine, further improving the detection ability of the model.
[0009] This technical solution further optimizes the anomaly detection model through the LSTM (Long Short-Term Memory Network) algorithm, which can improve the model's adaptability to time series data. LSTM can capture the time series characteristics of link data and analyze the trend of data changes over time, which is crucial for the identification of anomalies in dynamically changing data links. In addition, the multi-classification processing and sample expansion technology based on LSTM enhances the model's ability to recognize complex data patterns, thereby improving the accuracy and robustness of anomaly detection.
[0010] This technical solution uses the classification results of the LSTM neural network to achieve abnormal cause analysis, time series analysis, and the generation of decision support suggestions. Through time series analysis and feature weight analysis, it can explain the cause of the abnormality and help identify key abnormal factors in the data. In addition, based on the results of the LSTM model, decision support can be provided, and improvement suggestions can be provided for abnormal events to further optimize the performance of the data link.
[0011] By adaptively learning the LSTM model, this technical solution can dynamically optimize model parameters as new data is continuously added, improving the accuracy and robustness of the model. In addition, sample expansion strategies (such as data enhancement) can increase sample diversity and further enhance the generalization ability of the model, enabling it to handle abnormal events of different types and complexity.
[0012] This technical solution provides a complete end-to-end solution from data collection, preprocessing, label generation, anomaly detection to result interpretation and decision support. Through multi-level processing and model optimization, it can achieve high-precision and efficient anomaly detection and provide practical decision-making basis for the optimization and improvement of marketing data links.
[0013] Through self-supervised learning and the automatic optimization mechanism of LSTM neural network, this technical solution significantly reduces the need for manual intervention and improves the automation of model training and anomaly detection. The processes of self-supervised label generation, anomaly detection, model optimization, etc. can all be automated, improving the operation and maintenance efficiency and flexibility of the system.
[0014] As a preferred technical means: Step 2) specifically includes: 2.1) Based on the abnormal distribution characteristics of the link, the sliding window method is used to calculate the statistical characteristics of the link data, and the clustering algorithm is used to classify the data into different clusters; Assume For the processed data set, each sample Represents a link data with m-dimensional features, and clusters the data by calculating the Euclidean distance between samples: Any two samples and The Euclidean distance is defined as: d(
[0015] in, Represents the value of sample i in dimension k; Indicates the value of sample j in dimension k; uses Euclidean distance to calculate the distance between samples in link data, and implements preliminary data grouping through cluster analysis, providing a basis for subsequent label generation; 2.2) After clustering is completed, the abnormality of the data is determined by calculating the proportion of outliers in each cluster and generating self-supervised labels; Define the threshold distance between samples to determine outliers. If the distance between a sample and its nearest neighbor is greater than the threshold distance, it is marked as an outlier. After clustering is completed, calculate the proportion of outliers in each cluster. :
[0016] For clusters whose outlier ratio is higher than the set threshold, the samples of the cluster are marked as abnormal labels, thereby generating label data for self-supervised learning for supervised training of the model.
[0017] Step 2.1 Calculate the statistical characteristics of the link data through the sliding window method, and classify the data in combination with the clustering algorithm, so that the system can extract rich feature information from the time series. This method can effectively capture the changing trends and potential patterns of the data link, especially for the dynamically changing marketing data link, it can provide more accurate feature representation. Through the clustering algorithm and outlier detection, accurate anomaly labels can be generated without manual intervention. This not only reduces the dependence on manual labeling, but also by calculating the outlier ratio (p_c) of each cluster, it can intelligently determine which samples are abnormal, thereby efficiently and automatically providing labels for subsequent model training. This process is completely data-driven and does not require additional labeling work, which greatly improves work efficiency. Using Euclidean distance to measure the similarity between samples can effectively group data and identify outliers. Euclidean distance is a simple and effective distance measurement method that can clearly reflect the similarity between data points. Through the calculation of outliers and threshold judgment, anomalies in the data can be accurately identified, and reliable labeling information can be provided for subsequent model training. This method can better adapt to the scenario of multi-dimensional features when processing link data, and can find potential abnormal patterns in the data set. After clustering is completed, the abnormality is determined by calculating the proportion of outliers in the cluster, and the samples that need to be marked as abnormal are determined according to the preset threshold. This detection method based on the proportion of outliers has strong flexibility, and can dynamically adjust the sensitivity of anomaly detection according to the distribution of actual data, and adapt to the characteristics of different data sets. At the same time, the calculation method of the proportion of outliers enables the system to distinguish complex abnormal patterns, thereby providing more accurate abnormal detection results. This technical solution introduces self-supervised learning and self-supervised label generation in the traditional support vector machine (SVM) training method, and can automatically learn abnormal patterns without a large number of manual labels. This combination not only reduces the cost of data annotation, but also enhances the adaptability and robustness of the model. Self-supervised learning can use more unlabeled data, improve the generalization ability of the model through self-labeling, and enhance the prediction ability of unknown data. Since the generated self-supervised labels can accurately reflect the distribution of abnormal data and normal data, the model trained based on these labels can more effectively detect anomalies. As a powerful classification tool, support vector machine (SVM) can find the optimal hyperplane in high-dimensional space, thereby improving classification accuracy. In addition, the subsequent adaptive optimization of the LSTM neural network model further improves the model's anomaly recognition ability, especially when processing time series data, it can fully explore the time series rules and potential abnormal patterns in the data. The combination of cluster analysis and outlier detection enables this solution to dynamically adapt to changes in data distribution.When the characteristics of the data link change, the new clustering results and outlier detection can be automatically updated to generate new anomaly labels, so that the model training and anomaly detection process always maintain high accuracy and adaptability. This approach avoids the need for manual intervention or re-labeling of data, ensuring the long-term stability and efficiency of the system in practical applications. This technical solution is completely data-driven, generating labels through clustering, outlier detection and self-supervised learning, reducing manual intervention and making the anomaly detection process highly automated. Through this data-driven approach, valuable information can be continuously extracted from the data, and accurate anomaly identification decisions can be made based on this information.
[0018] As a preferred technical means: In step 3), during the anomaly detection model training phase, the generated self-supervisory labels are used to build a classification model based on a support vector machine. The support vector machine divides the data into normal and abnormal categories by finding a hyperplane. Assuming that a given training set ,in , represents normal and abnormal category labels; the goal of SVM is to solve the classification hyperplane that satisfies the following constraints:
[0019] in, is the normal vector of the hyperplane, is the offset, is the slack variable, Control the slackness of anomaly detection; The constraints are as follows:
[0020] in, is the kernel function, which maps the input samples to a high-dimensional space; After training is completed, if the new sample x satisfies , then the sample is judged to be abnormal.
[0021] By finding the best classification hyperplane, SVM can effectively distinguish normal data from abnormal data. In this technical solution, SVM ensures the robustness of the classification model by maximizing the margin (i.e., minimizing ||ω||), thereby improving the accuracy of anomaly detection.
[0022] By generating self-supervised labels, there is no need to rely on a large amount of manually labeled data. The labels generated by clustering algorithms and outlier detection provide an automated way to build training sets, which enables the anomaly detection process to complete data classification and training without manual intervention. This label generation method not only reduces the time and cost of data annotation, but also effectively improves the efficiency and accuracy of model training.
[0023] The SVM algorithm takes into account the classification boundaries of samples when classifying. Based on the calculation of the distance of samples, it can effectively balance the classification of normal and abnormal samples. In some cases, the proportion of abnormal samples is much smaller than that of normal samples. By using slack variables and adjusting slack parameters, SVM can flexibly deal with this data imbalance problem and reduce the risk of misclassification. By adjusting the ν value, the sensitivity of the model to anomaly detection can also be controlled, further optimizing the performance of the model.
[0024] By solving optimization problems with constraints, SVM can accurately find the optimal hyperplane, making the model more accurate in learning classification boundaries. Constraints ensure that samples are in the correct category as much as possible, while slack variables ξ_i allow for a certain degree of tolerance for misclassification, thereby improving the model's robustness to noisy data. This mathematical optimization process can effectively reduce training errors and improve classification reliability.
[0025] SVM uses the kernel function φ(x) to map input samples to a high-dimensional space, so that even samples that are not linearly separable in low-dimensional space can be converted into a linearly separable high-dimensional space through the kernel technique. This is crucial for anomaly detection of complex data structures, especially in the case of multi-source heterogeneous data, where the data may contain complex nonlinear relationships. By using a suitable kernel function, SVM can find the best classification boundary in high-dimensional space, significantly improving the effect of anomaly detection.
[0026] By solving the optimal hyperplane, SVM can ensure the maximization of the classification boundary, thereby improving the generalization ability of the model. After training, SVM can accurately predict new samples and reduce the risk of overfitting, which is particularly suitable for processing the ever-changing network environment in marketing data links. Regardless of the type, quantity or distribution of abnormal samples, SVM can automatically adapt to a certain extent and accurately classify them.
[0027] Since SVM divides data into two categories through a well-defined hyperplane and uses clear mathematical constraints during training, the decision process of the model is well explainable. In practical applications, the anomaly detection model can output decision boundaries and support vectors to help analysts understand which samples are considered abnormal, so as to conduct a deeper analysis of the causes.
[0028] By relaxing variables and controlling relaxation parameters, SVM allows adjusting the sensitivity of the anomaly detection model to abnormal data, providing a flexible way to adapt to different anomaly detection needs. In the marketing data link, due to the large fluctuations and noise of the data, this flexibility allows SVM to better adapt to various changes in practical applications.
[0029] As a preferred technical means: Step 4) specifically includes the following steps: 4.1) Multi-classification labeling and sample expansion of abnormal events: In this stage, the labeled abnormal events are multi-classified, including common abnormal categories such as high-dimensional anomalies, outliers, and trend deviations, and data expansion is performed based on the existing labeled samples. The expansion method adopts data enhancement strategies, including random slicing, noise addition, and feature perturbation, to enrich the diversity of samples. Assume that the abnormal data set is ,in represents the abnormal category label, and K is the number of classification categories; this multi-classification process provides sufficient labeled samples for the subsequent training of the LSTM model; 4.2) LSTM neural network model construction and training; select the LSTM neural network algorithm, which uses its internal memory gate and forget gate structure to perform self-supervised multi-classification training on abnormal events in the data sequence; select the appropriate LSTM model architecture, optimizer, and loss function parameters to train and optimize the model; during the training process, perform time series processing on the input data X so that it enters the LSTM layer and is passed to the output layer layer by layer; the output of the model is the probability distribution of each abnormal category:
[0030] in is the hidden state of the last time step, and are weights and biases; the multi-classification model can efficiently identify abnormal events based on time series characteristics; 4.3) Self-supervised learning of unlabeled sample data: Use unlabeled sample data to further improve the generalization ability of the model; input unlabeled data into the LSTM model, and perform self-supervised learning based on its sequence context information, and enhance the model's learning ability on unlabeled data by updating the model's parameters; this self-supervised update can be completed through pseudo-label generation or confidence screening strategies, such as treating samples with high prediction probability as new labels and adding them to the training set, so that the model has better adaptability to unlabeled data; 4.4) Combine the training results of the LSTM model and the SVM preliminary detection model to achieve adaptive optimization of the human-machine loop feedback; in each round of training, adjust the model parameters according to the performance of the model on the latest data to obtain higher recognition accuracy and generalization; set incremental update conditions to adjust the support vector set and LSTM network parameters in a timely manner for new abnormal patterns; including: controlling the training step by updating the learning rate 𝛼 so that the model maintains accuracy and robustness during the convergence stage; adopting an incremental learning strategy to enhance the model's adaptability to new features.
[0031] The multi-classification labeling and sample expansion method proposed in step 4.1 enables the model to identify and classify many different types of abnormal events, such as high-dimensional anomalies, outliers, trend deviations, etc. This method not only improves the ability to recognize various abnormal patterns, but also expands the diversity of samples through data enhancement techniques (such as random slicing, noise addition, and feature perturbation), thereby improving the model's recognition accuracy for complex abnormal situations. The expanded samples help to enhance the representativeness of the training data, especially for rare abnormal types, which can effectively improve the learning effect of the model.
[0032] In this technical solution, LSTM (Long Short-Term Memory) neural network is used to perform multi-classification training on abnormal events. LSTM can capture long-term dependencies in data through its memory gate and forget gate structure, so that the model can effectively identify abnormal patterns in time series. By building a multi-classification model based on LSTM, the occurrence of abnormal events can be accurately identified and classified according to the characteristics of the time series, which is particularly important for the dynamic and temporal characteristics in the marketing data link.
[0033] The self-supervised learning part in step 4.3 further improves the generalization ability of the model by learning from unlabeled samples. The LSTM model can perform self-supervised learning on unlabeled data based on the existing sequence context information. Even in the absence of labeled data, it can generate pseudo labels through prediction and confidence screening. This process can effectively enhance the performance of the model on unseen data, making the model more adaptable to unknown patterns, thereby improving the stability and accuracy of the model.
[0034] In step 4.4, adaptive optimization is performed by combining the training results of the LSTM model and the SVM preliminary detection model. This optimization strategy ensures that the model has high accuracy and robustness in dealing with new abnormal patterns by continuously updating model parameters and support vector sets. Especially in scenarios where data and abnormal patterns change frequently, the incremental learning strategy enables the model to quickly adapt to new abnormal situations, thereby effectively improving the accuracy of anomaly detection. By adjusting the learning rate and incremental updates, the model can balance the convergence speed and accuracy during the training phase to avoid overfitting and underfitting problems.
[0035] The joint training mechanism in this solution combines two different types of models, LSTM and SVM, to form a human-machine loop feedback mechanism to further improve the efficiency of anomaly detection. The SVM model can quickly screen out abnormal data in the initial detection stage, while the LSTM captures the temporal nature of the data for detailed classification and further optimization. The combination of the two forms a multi-level, dynamically adaptive feedback mechanism that can continuously adjust and optimize according to the latest training data and model performance, making anomaly detection more accurate and intelligent.
[0036] The data enhancement strategy in step 4.1 enables the model to generate more diverse training samples under relatively limited labeled samples, thereby improving the robustness of the model. Through enhancement methods such as random slicing and feature perturbation, the model can handle more diverse abnormal events, which is crucial for the diverse abnormal patterns that appear in actual business scenarios. Data enhancement not only enriches the training set of the model, but also prevents performance degradation caused by data overfitting and improves the generalization ability of the model.
[0037] By integrating LSTM and SVM models, and combining incremental learning and self-supervised learning strategies, the model can continuously adapt to new data patterns and anomaly types. The LSTM model extracts complex dynamic patterns through time series analysis, while the SVM plays a strong role in the initial anomaly classification. The combination of the two enables this solution to cope with the complex and rapidly changing marketing data link environment.
[0038] As a preferred technical means: Step 5) specifically includes the following steps: 5.1) Classification and interpretation of abnormal diagnostic results The LSTM model is used to segment multiple types of anomalies, and the abnormal results are classified and explained by combining the feature weights and time series patterns of each type of anomaly; the probability vector output by the model middle, Indicates The predicted probability of the class anomaly is calculated based on the maximum probability value Classify the samples and further analyze the characteristics of the category; the feature weight W and bias b of each category are used to mark the main factors causing the anomaly and generate an explanation report; the importance ranking of feature weights can be achieved through the following formula:
[0039] in, and Respectively weights and biases of anomaly-like features, is the hidden state of the last time step of LSTM; the key features and their contribution to the anomaly are determined by the absolute value of the weight value; 5.2) Timing explanation of abnormal causes In the LSTM model, the hidden layer state Maintain the time series dependency information of the data and support the time series analysis of abnormal causes; through the hidden state matrix The characteristic change curve analysis is used to locate the time nodes and cumulative impact process of abnormal events; the nodes with drastic changes in the hidden state are marked as the abnormal cause highlighting time. The specific formula is:
[0040] The larger value Indicates the change intensity of the abnormal factor at this time step, further interprets the time distribution characteristics of the abnormal occurrence, and generates an abnormal time chart; 5.3) Interpretability Analysis of Abnormal Diagnosis Results Through the parameter interpretation results of the LSTM model in multi-classification tasks, the impact of abnormal factors on the overall trend is quantified; the feature weights and biases of each category are combined to form an abnormal impact report, and the SHAP value interpretation method is used to analyze the contribution of each feature to the model decision; the contribution of the jth feature in the classification decision is , the expression is:
[0041] in is the SHAP value weight of feature j in category k, is the average probability of all samples; this explanatory model can reveal the specific role of each feature in abnormal classification decisions; 5.4) Decision support and improvement suggestions for abnormal events Based on the explanatory results, specific decision support recommendations are generated for each type of anomaly. Combined with the time distribution of anomaly occurrence and the contribution of main features, response recommendations are generated, including adjusting specific feature parameters, optimizing input data quality, or changing the monitoring period of abnormal events.
[0042] Step 5.1 uses the multi-classification output of the LSTM model, combined with the feature weights and time series patterns of each type of anomaly, to generate a detailed classification explanation for each abnormal event. By calculating the feature importance of each type of anomaly, the main factors that cause the anomaly are identified, providing transparency of the anomaly detection results. This weight- and bias-based explanation method makes anomaly detection not only a "black box" mode, but also understandable, making it easier for business personnel to take measures based on specific causes.
[0043] Step 5.2 analyzes the time series changes of abnormal events through the hidden state matrix of LSTM, which can reveal the time nodes of abnormal occurrence and their cumulative impact. By calculating the change intensity between time steps, the change trend of abnormal factors in the time series can be accurately identified. This enables the model to not only detect anomalies, but also provide specific time distribution charts to help analysts understand the evolution of abnormal events.
[0044] Step 5.3 quantifies the contribution of each feature in the anomaly classification decision by using the SHAP (Shapley Additive Explanations) value interpretation method. This method can deeply analyze the specific role of each feature in the anomaly classification decision, especially by calculating the SHAP value of each feature to quantify the contribution of the feature to the model output. The SHAP value is a very effective tool for explaining model decisions. It can assign a specific contribution to each feature, making the entire anomaly diagnosis process more transparent and easier for business analysts to understand the factors behind the anomaly.
[0045] Step 5.4 provides decision support based on the anomaly diagnosis interpretation results, which can provide specific response suggestions for different types of anomalies. For example, based on the time distribution and feature contribution of anomalies, the model can propose specific improvement measures, such as adjusting the parameters of certain features, optimizing data quality, or changing the monitoring cycle. This enables the technical team to make practical optimization decisions based on the anomaly diagnosis results, thereby improving the stability and performance of the data link.
[0046] Through the interpretative analysis of abnormal diagnosis results, especially the combination of time series analysis and feature weight analysis, the output of the model is no longer a simple "normal" or "abnormal" judgment, but has operational and executable business suggestions. This ability to convert complex anomaly detection results into specific operational suggestions is a major advantage of this technical solution, which can effectively support actual business decisions.
[0047] This solution provides detailed classification explanations of anomaly causes, time series analysis, and feature contribution analysis, so that non-technical personnel (such as business analysts and decision-makers) can also understand the root causes of anomalies. This transparent and explainable approach improves the communication efficiency between technology and business, allowing decision-makers to formulate more scientific business adjustment strategies based on anomaly diagnosis results.
[0048] Through detailed anomaly classification, time series interpretation, and SHAP value analysis, the model can not only identify anomaly types more accurately, but also monitor and analyze the changing trends of abnormal events in real time. Timely understanding of the time series patterns and main characteristics of anomalies can enable rapid response and formulate more effective countermeasures. This helps improve the overall stability of the marketing data link and the response speed of anomaly detection.
[0049] The second technical solution of the present invention is: a marketing data link abnormality diagnosis system based on a self-supervised support vector machine algorithm, applying the aforementioned marketing data link abnormality diagnosis method based on a self-supervised support vector machine algorithm, the system comprises: The data collection and preprocessing module is used to collect multi-source heterogeneous data of the marketing data link in real time, and complete data cleaning, missing value filling and outlier processing; The label generation module generates preliminary anomaly labels through self-supervised learning to guide the training of the anomaly detection model. The label generation module extracts the statistical features of the link data based on the sliding window method and clustering algorithm, and performs cluster analysis on the data to generate self-supervised labels. The anomaly detection model training module uses the support vector machine (SVM) algorithm to train the classification model through self-supervised labels to classify data into normal and abnormal data. Adaptive optimization module, based on the adaptive learning mechanism of LSTM neural network, further trains and optimizes the anomaly detection model through multi-classification processing, sample expansion and LSTM neural network algorithm, improving the accuracy of anomaly detection and the adaptability of the model; The abnormal diagnosis explanation and decision support module uses the multi-classification results generated by the LSTM model and the self-supervised learning strategy to achieve interpretable analysis and decision support for abnormal diagnosis. The output of the abnormal diagnosis explanation and decision support module includes classification explanation, time series analysis, abnormal feature explanation and decision support suggestions for abnormal diagnosis results. By calculating the contribution of each abnormal feature, an explanation report of the cause of the abnormality is generated, and corresponding improvement suggestions are provided.
[0050] The system realizes the full chain of automated processing from data collection, label generation, anomaly detection to diagnosis and interpretation through the collaborative work of multiple submodules such as data collection and preprocessing module, label generation module, anomaly detection model training module, adaptive optimization module and anomaly diagnosis interpretation and decision support module. Each module plays a role at different levels and cooperates with each other to form an efficient workflow, ensuring the comprehensiveness and efficiency of the anomaly diagnosis process.
[0051] The label generation module generates preliminary anomaly labels using a self-supervised learning strategy, sliding windows, and clustering algorithms. Self-supervised learning can automatically learn anomaly patterns from data without a large amount of manually labeled data, and generate accurate labels to support the training of subsequent anomaly detection models. As a powerful classification model, support vector machine (SVM) can effectively identify abnormal patterns in data and ensure efficient classification accuracy by finding a hyperplane to distinguish normal data from abnormal data.
[0052] After the anomaly detection model is trained, the adaptive optimization module further optimizes the model through the LSTM neural network. LSTM can process time series data, has strong adaptive learning and memory capabilities, and can improve the ability to identify complex abnormal patterns through multi-classification processing, sample expansion, etc. This mechanism not only improves the accuracy of anomaly detection, but also enhances the model's adaptive ability, allowing the system to adapt to changes in data features, continuously optimize, and respond to new abnormal patterns.
[0053] The abnormal diagnosis explanation and decision support module combines the output results of the model with business needs by generating interpretable analysis and decision support reports for abnormal diagnosis, and provides detailed abnormal cause analysis, timing analysis, and feature explanation. This module can help business personnel understand the reasons behind model decisions, analyze the root causes of abnormalities, and make specific improvement suggestions for different types of abnormalities. This is of great significance for the optimization and decision support of marketing data links, making communication between technical teams and business teams smoother.
[0054] By calculating the contribution of each abnormal feature, generating an explanation report of the abnormal cause, and providing improvement suggestions, the system can not only accurately diagnose the abnormality, but also help decision makers formulate targeted response strategies based on the type and impact of the abnormality. This transparent decision support enables management and technical personnel to respond and adjust more quickly and accurately, improving the stability of the data link and business efficiency.
[0055] The adaptive learning mechanism of the LSTM neural network gives the system enhanced robustness, can effectively handle different types of abnormal patterns, and self-adjust parameters according to actual data conditions, improving the overall stability and generalization ability of the system. In addition, data enhancement strategies and self-supervised learning of unlabeled samples further improve the accuracy and adaptability of the model, enabling the system to cope with the ever-changing marketing data environment.
[0056] In the data preprocessing stage, the system cleans the data, fills in missing values, processes outliers, and standardizes them to ensure the quality of the input data, thus providing a high-quality data foundation for the subsequent anomaly detection model. By extracting statistical features and performing cluster analysis using the sliding window method, it can efficiently process and analyze large-scale, multi-source heterogeneous data, making anomaly detection more accurate and efficient.
[0057] Through the multi-classification training of the LSTM model, the system can handle different types of abnormal events, such as high-dimensional anomalies, outliers, trend deviations, etc., and provide more fine-grained abnormal analysis. This multi-class anomaly detection capability can more comprehensively reflect potential problems in the marketing data link, which is conducive to refined management and optimization.
[0058] The system can be expanded and adjusted according to different needs. For example, by adjusting the parameters of the SVM and LSTM models, the system can adapt to data links of different scales and characteristics; by introducing new features or optimizing data preprocessing methods, the system can be applied to anomaly detection tasks in different fields, and has strong cross-domain adaptability.
[0059] As a preferred technical means: the label generation module includes: A statistical feature calculation unit, used for calculating the statistical features of the link data using a sliding window method; Clustering unit, which uses clustering algorithm to classify data, calculates similarity based on Euclidean distance between data, and forms different clusters; The outlier detection unit generates self-supervised labels based on the proportion of outliers in each cluster and determines which data are abnormal labels; The anomaly detection model training module includes: The SVM classifier unit trains the support vector machine model based on self-supervised labels and classifies the data into normal and abnormal by finding the classification hyperplane; Classification hyperplane calculation unit solves the optimization problem to determine the optimal hyperplane, in which the slack variable is introduced and parameters Control the slackness of anomaly detection; Model evaluation unit, which evaluates the accuracy of the classification model and performs anomaly detection on new samples based on the model performance to generate classification results; The adaptive optimization module includes: Data augmentation unit, which expands the diversity of training samples through data augmentation strategies; LSTM training unit, based on LSTM neural network algorithm, performs multi-classification training on abnormal events to improve the model's ability to identify abnormalities in time series data; Adaptive learning unit, which adaptively optimizes the detection model through deep learning mechanism to improve the model's ability to process complex data patterns; The abnormal diagnosis interpretation and decision support modules include: The abnormal classification explanation unit analyzes the abnormal categories and provides feature explanations for each category based on the multi-classification results output by the LSTM model; The time series analysis unit analyzes the time distribution and cumulative impact of abnormal events based on the time series characteristics of the LSTM model; The abnormal feature interpretation unit calculates the contribution of each abnormal feature and generates an explanation report of the abnormal cause; The decision support unit provides targeted improvement suggestions based on abnormal diagnosis results and feature contributions to optimize link performance or adjust monitoring strategies.
[0060] Comprehensive anomaly detection and optimization process, automated closed loop from data collection to decision support; self-supervised learning combined with SVM reduces manual intervention and improves the intelligence level of the model; LSTM adaptive optimization and data enhancement enhance the accuracy and robustness of the model; explainable analysis makes anomaly cause analysis and decision support more transparent and actionable; time series analysis capabilities enhance the ability to identify complex data patterns and dynamic anomalies.
[0061] The third technical solution of the present invention is: a computer device, which includes one or more processors and one or more memories, and the one or more memories store at least one program code. When the program code is executed by the one or more processors, it implements a marketing data link anomaly diagnosis method based on a self-supervised support vector machine algorithm as mentioned above.
[0062] The fourth technical solution of the present invention is: a storage medium, in which at least one program code is stored, characterized in that when the program code is executed by a processor, the steps of a marketing data link anomaly diagnosis method based on a self-supervised support vector machine algorithm as described above are implemented.
[0063] Beneficial effects: 1. Improve the accuracy of anomaly detection: The self-supervised support vector machine is combined with a multi-classification LSTM model, and the autoencoder is used to generate high-quality label data to enhance the detection accuracy of the model. The sparse autoencoder effectively extracts and labels features, which improves the accuracy and pertinence of anomaly detection and solves the problem of unclear anomaly classification in traditional methods.
[0064] 2. Realize automatic precise positioning and alarm: Through the application of time series sliding window and adaptive threshold, the present invention can accurately identify the specific time point when abnormal events occur, and dynamically output through the alarm module, reducing the errors of human intervention and manual judgment, and realizing automatic and efficient abnormal positioning and alarm functions.
[0065] 3. Improve the processing and generalization capabilities of multi-source heterogeneous data: By using multimodal data fusion and self-supervised learning methods, the adaptability to multi-source heterogeneous data is enhanced, so that the model can show good generalization capabilities in different environments, solving the problems of complex data sources and poor model generalization in existing technologies, and providing a more robust solution for data link anomaly diagnosis. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] Figure 1 It is a flow chart of the present invention.
[0067] Figure 2 It is a flow chart of label sample identification of the present invention. DETAILED DESCRIPTION
[0068] The technical solution of the present invention is further described in detail below in conjunction with the accompanying drawings.
[0069] Embodiment 1 This embodiment provides a marketing data link abnormality diagnosis method based on a self-supervised support vector machine algorithm. Figure 1 As shown, the following steps are included: Step 1: Data link feature extraction and data preprocessing.
[0070] Step 1.1: In the data link feature extraction and data preprocessing stage, the multi-source heterogeneous data of the marketing data link is first collected, including node status data, link transmission rate, delay, packet loss rate and timestamp information.
[0071] Step 1.2: Further, preprocessing steps such as data cleaning, missing value filling, and outlier processing are performed to ensure that the data meets the requirements of consistency, integrity, and standardization. The data feature vector is represented as ,in Represents the characteristic value of the i-th link. For feature normalization, the z-score method is used to transform each feature into a standard normal distribution so that it satisfies:
[0072] in and Characteristics The mean and standard deviation of .
[0073] Through this step, the extraction and standardization of multi-dimensional features of marketing data are achieved, laying a solid foundation for model input.
[0074] Step 2: Self-supervised learning label generation: In the label generation stage, self-supervised learning is used to provide preliminary labeled data for anomaly detection.
[0075] Step 2.1: First, based on the abnormal distribution characteristics of the link, the sliding window method is used to calculate the statistical characteristics of the link data (such as mean, variance, peak, etc.), and a clustering algorithm (such as DBSCAN or K-means) is used to classify the data into different clusters. For the processed data set, each sample Represents a link data with m-dimensional features, and clusters the data by calculating the Euclidean distance between samples: Any two samples and The Euclidean distance is defined as: d(
[0076] in, Indicates the value of sample i in dimension k. Use Euclidean distance to calculate the distance between samples in link data, and use cluster analysis to achieve preliminary grouping of data, providing a basis for subsequent label generation.
[0077] Step 2.2: After clustering is completed, the abnormality of the data is determined by calculating the proportion of outliers in each cluster and generating self-supervised labels.
[0078] Define the threshold distance between samples To determine outliers, if the distance between a sample and its nearest neighbor is greater than , it is marked as an outlier. After clustering is completed, the proportion of outliers in each cluster is calculated :
[0079] For clusters with a high proportion of outliers (setting the threshold ), mark the samples of the cluster as abnormal labels, thereby generating label data for self-supervised learning, which is used for supervised training of the model, reducing the burden of manual labeling and improving the adaptability of the model.
[0080] Step 3: In the anomaly detection model training phase, the generated self-supervised labels are used to build a classification model based on support vector machines. The support vector machine divides the data into normal and abnormal categories by finding a hyperplane. Assuming that the training set ,in , representing normal and abnormal category labels. The goal of SVM is to solve the classification hyperplane that satisfies the following constraints:
[0081] in, is the normal vector of the hyperplane, is the offset, is the slack variable, Controls the laxity of anomaly detection. The constraints are as follows:
[0082] in, is the kernel function that maps the input samples to a high-dimensional space.
[0083] After training is completed, if the new sample x satisfies , then the sample is judged to be abnormal. The label sample identification process is as follows Figure 2 shown.
[0084] Step 4: Adaptive model optimization based on deep neural network algorithm. On the basis of completing the preliminary anomaly detection model of support vector machine (SVM), in order to further improve the accuracy of anomaly recognition and capture of complex data patterns, an adaptive optimization mechanism based on LSTM neural network algorithm is incorporated, as follows: Step 4.1: Multi-classification labeling of abnormal events and sample expansion. In this stage, the labeled abnormal events are multi-classified, including common abnormal categories such as high-dimensional anomalies, outliers, trend deviations, etc., and data expansion is performed based on the existing labeled samples. The expansion method uses data enhancement strategies such as random slicing, noise addition, feature perturbation, etc. to enrich the diversity of samples. Assume that the abnormal data set is ,in represents the abnormal category label, and K is the number of classification categories. This multi-classification process provides sufficient labeled samples for subsequent training of the LSTM model.
[0085] Step 4.2: LSTM neural network model construction and training. Select the LSTM neural network algorithm, which uses its internal memory gate and forget gate structure to perform self-supervised multi-classification training on abnormal events in the data sequence. Select appropriate LSTM model architecture, optimizer, loss function and other parameters to train and optimize the model. During the training process, the input data X is processed in time series so that it enters the LSTM layer and is passed to the output layer layer by layer. The output of the model is the probability distribution of each abnormal category:
[0086] in is the hidden state of the last time step, and are weights and biases. This multi-classification model can efficiently identify abnormal events based on time series characteristics.
[0087] Step 4.3: Self-supervised learning of unlabeled sample data. Use unlabeled sample data to further improve the generalization ability of the model. Input the unlabeled data into the LSTM model and perform self-supervised learning based on its sequence context information. By updating the model parameters, the model's learning ability on unlabeled data is enhanced. This self-supervised update can be completed through pseudo-label generation or confidence screening strategies, such as treating samples with high prediction probability as new labels and adding them to the training set, so that the model has better adaptability to unlabeled data.
[0088] Step 4.4: Combine the training results of the LSTM model and the SVM preliminary detection model to achieve adaptive optimization of the human-machine loop feedback. In each round of training, adjust the model parameters according to the performance of the model on the latest data to obtain higher recognition accuracy and generalization. Set incremental update conditions to adjust the parameters of the support vector set and LSTM network in a timely manner for new abnormal patterns. For example, by updating the learning rate 𝛼 to control the training stride, the model maintains accuracy and robustness during the convergence stage. Adopt an incremental learning strategy to enhance the model's adaptability to new features.
[0089] Step 5: Explanation and decision support based on abnormal diagnosis results. Based on the abnormal classification results of the LSTM deep neural network model and self-supervised learning strategy, combined with actual business needs, the interpretability of abnormal diagnosis and intelligent support for decision-making are achieved. The model output not only helps identify anomalies, but also provides explainable abnormal cause analysis and improvement suggestions. The specific contents are as follows: Step 5.1: Categorical interpretation of abnormal diagnostic results The LSTM model is used to segment multiple types of anomalies, and the feature weights and time series patterns of each type of anomaly are combined to classify and explain the anomaly results. The probability vector output by the model is middle, Indicates The predicted probability of the class anomaly is calculated based on the maximum probability value Classify the samples and further analyze the characteristics of the category. The feature weight W and bias b of each category are used to mark the main factors causing the anomaly and generate an explanation report. The importance ranking of feature weights can be achieved through the following formula:
[0090] in, and Respectively weights and biases of anomaly-like features, is the hidden state of the last time step of LSTM. The key features and their contribution to the anomaly are determined by the absolute value of the weight value.
[0091] Step 5.2: Time-series explanation of abnormal causes In the LSTM model, the hidden layer state Maintain the time series dependency information of the data and support the time series analysis of abnormal causes. The characteristic change curve analysis can locate the time nodes and cumulative impact process of abnormal events. The nodes (time steps) with drastic changes in the hidden state are marked as the abnormal cause highlighting time. The specific formula is:
[0092] The larger value Indicates the intensity of change of the abnormal factor at this time step, further interprets the time distribution characteristics of the abnormal occurrence, and generates an abnormal time chart.
[0093] Step 5.3 Interpretability analysis of abnormal diagnosis results Through the parameter interpretation results of the LSTM model in multi-classification tasks, the impact of abnormal factors on the overall trend is quantified. Combine the feature weights and biases of each category to form an abnormal impact report, and use the SHAP value interpretation method to analyze the contribution of each feature to the model decision. For the contribution of the jth feature in the classification decision , which can be expressed as:
[0094] in is the SHAP value weight of feature j in category k, is the average probability of all samples. This explanatory model can reveal the specific role of each feature in abnormal classification decisions.
[0095] Step 5.4: Decision support and improvement suggestions for abnormal events Based on the above explanatory results, specific decision support recommendations are generated for each type of anomaly. Based on the time distribution of anomaly occurrence and the contribution of the main features, response recommendations are generated, including adjusting specific feature parameters, optimizing input data quality, or changing the monitoring period of abnormal events. Decision support recommendations are generated using the following methods: (1) Adjust weight features. Parameters are adjusted based on features with high contribution to optimize the input quality of the cause of the anomaly; (2) Increase monitoring frequency. Increase the monitoring frequency during high-risk periods and periods of frequent anomalies to capture data changes in a timely manner.
[0096] In order to further verify the technical solution of the present invention, an experimental simulation test of the database early warning method of the automated operation system is carried out. The simulation data set comes from a real marketing data link, including multi-source data such as user profile data, transaction data, and system logs. The simulation environment includes the following parameter settings: Data size: 500,000 data records.
[0097] Abnormality types: data loss, data delay, data disorder, data redundancy, and data noise.
[0098] Model training: Use self-supervised learning technology combined with support vector machine algorithm for anomaly detection training and testing.
[0099] Evaluation indicators: Accuracy, Precision, Recall, F1-score, False Positive Rate, abnormality recovery time, etc.
[0100] Table 1 Simulation results of marketing data link abnormality diagnosis method
[0101] From the data experimental simulation results in Table 1, after applying the marketing data link abnormality diagnosis method described in the present invention, the accuracy and precision of data link abnormality identification have been greatly improved, and the confidence intervals of various accuracy indicators show small fluctuations, which verifies the stability and reliability of the patented method in different environments. At the same time, for the five types of abnormal situations of data loss, data delay, data disorder, data redundancy and data noise, this method has achieved the improvement of accuracy indicators, ensuring the comprehensiveness and accuracy of this method in the abnormality identification level.
[0102] Embodiment 2 Accordingly, this embodiment provides a marketing data link anomaly diagnosis system based on a self-supervised support vector machine algorithm, including a data acquisition and preprocessing module, a label generation module, an anomaly detection model training module, an adaptive optimization module, and an anomaly diagnosis interpretation and decision support module.
[0103] The data collection and preprocessing module is used to collect multi-source heterogeneous data of the marketing data link in real time, and complete data cleaning, missing value filling and abnormal value processing. This module is used to implement the function of step 1 in embodiment 1, and will not be repeated here.
[0104] The label generation module generates preliminary anomaly labels through self-supervised learning to guide the training of the anomaly detection model. Based on the sliding window method and clustering algorithm, this module extracts the statistical features of the link data and performs cluster analysis on the data to generate self-supervised labels. This module is used to implement the function of step 2 in Example 1, which will not be repeated here.
[0105] The anomaly detection model training module uses the generated self-supervised labels to build a support vector machine classification model to detect normal and abnormal data in the link. This module mainly uses the support vector machine algorithm to find a suitable hyperplane to classify the data into normal and abnormal categories. This module is used to implement the function of step three in Example 1, which will not be repeated here.
[0106] The adaptive optimization module further optimizes the anomaly detection model through the adaptive learning mechanism of the deep neural network to improve the recognition ability of complex data patterns. The module also expands the sample diversity through the data enhancement strategy, and completes the multi-classification training of abnormal events based on the LSTM model to enhance the model's anomaly recognition ability. This module is used to implement the function of step 4 in Example 1, which will not be repeated here.
[0107] The abnormal diagnosis explanation and decision support module uses the multi-classification results and self-supervised learning strategy generated by the LSTM model to achieve interpretability analysis and decision support for abnormal diagnosis. This module includes classification explanations, time series analysis, abnormal feature explanations, and decision support suggestions for abnormal diagnosis results. By calculating the contribution of each abnormal feature, an explanation report of the cause of the abnormality is generated, and corresponding improvement suggestions are provided. This module is used to implement the function of step five in Example 1, which will not be repeated here.
[0108] Embodiment 3 This embodiment provides an electronic device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, it implements the marketing data link anomaly diagnosis method based on the self-supervised support vector machine algorithm as described in any embodiment of the present invention.
[0109] Embodiment 4 This embodiment provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method for diagnosing anomalies in a marketing data link based on a self-supervised support vector machine algorithm as described in any embodiment of the present invention is implemented.
[0110] Those skilled in the art will appreciate that the various units and algorithm steps described in the embodiments disclosed in the present invention can be implemented by a combination of electronic hardware, computer software, and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0111] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0112] In several embodiments provided in the present application, if any function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory; hereinafter referred to as: ROM), random access memory (Random Access Memory; hereinafter referred to as: RAM), disk or optical disk, and other media that can store program codes.
[0113] The marketing data link abnormality diagnosis method, system, device and storage medium shown above are specific embodiments of the present invention, which have embodied the substantial characteristics and progress of the present invention. According to actual use needs and under the guidance of the present invention, equivalent modifications in shape, structure, etc. can be made to them, which are all within the protection scope of this scheme.
Claims
1. A marketing data link anomaly diagnosis method based on self-supervised support vector machine algorithm, characterized in that The following steps are involved: 1) Data link feature extraction and data preprocessing, including: Collecting multi-source heterogeneous data of the marketing data link, wherein the multi-source data includes node status data, link transmission rate, delay, packet loss rate and timestamp information; Clean the collected data, fill in missing values, process outliers, and standardize each feature; 2) Self-supervised learning label generation, including: The sliding window method is used to calculate the statistical characteristics of the link data, and the data are grouped through the clustering algorithm; Generate self-supervised learning labels based on the proportion of outliers in each cluster for anomaly detection; 3) Anomaly detection model training: build a classification model through support vector machine (SVM), use self-supervised labels for training, and then classify the data into normal and abnormal; 4) Adaptive model optimization based on LSTM neural network: further training and optimization of the anomaly detection model through multi-classification processing, sample expansion and LSTM neural network algorithm to improve the accuracy of anomaly detection and the adaptability of the model; 5) Interpretation of abnormal diagnosis results and decision support: Based on the classification results of the LSTM neural network, provide abnormal cause analysis, time series analysis and decision support suggestions.
2. According to claim 1, a marketing data link anomaly diagnosis method based on a self-supervised support vector machine algorithm is characterized in that: Step 2) specifically includes: 2.1) Based on the abnormal distribution characteristics of the link, the sliding window method is used to calculate the statistical characteristics of the link data, and the clustering algorithm is used to classify the data into different clusters; Assume For the processed data set, each sample Represents a link data with m-dimensional features, and clusters the data by calculating the Euclidean distance between samples: Any two samples and The Euclidean distance is defined as: d( in, Represents the value of sample i in dimension k; Indicates the value of sample j in dimension k; uses Euclidean distance to calculate the distance between samples in link data, and implements preliminary data grouping through cluster analysis, providing a basis for subsequent label generation; 2.2) After clustering is completed, the abnormality of the data is determined by calculating the proportion of outliers in each cluster and generating self-supervised labels; Define the threshold distance between samples to determine outliers. If the distance between a sample and its nearest neighbor is greater than the threshold distance, it is marked as an outlier. After clustering is completed, calculate the proportion of outliers in each cluster. : For clusters whose outlier ratio is higher than the set threshold, the samples of the cluster are marked as abnormal labels, thereby generating label data for self-supervised learning for supervised training of the model.
3. The marketing data link anomaly diagnosis method based on the self-supervised support vector machine algorithm according to claim 2 is characterized in that: In step 3), the anomaly detection model training phase, the generated self-supervised labels are used to build a classification model based on a support vector machine. The support vector machine divides the data into normal and abnormal categories by finding a hyperplane. Assuming that the given training set ,in , represents normal and abnormal category labels; the goal of SVM is to solve the classification hyperplane that satisfies the following constraints: in, is the normal vector of the hyperplane, is the offset, is the slack variable, Control the slackness of anomaly detection; The constraints are as follows: in, is the kernel function, which maps the input samples to a high-dimensional space; After training is completed, if the new sample x satisfies , then the sample is judged to be abnormal.
4. The marketing data link anomaly diagnosis method based on the self-supervised support vector machine algorithm according to claim 3 is characterized by: Step 4) specifically includes the following steps: 4.1) Multi-classification labeling and sample expansion of abnormal events: In this stage, the labeled abnormal events are multi-classified, including common abnormal categories such as high-dimensional anomalies, outliers, and trend deviations, and data expansion is performed based on the existing labeled samples. The expansion method adopts data enhancement strategies, including random slicing, noise addition, and feature perturbation, to enrich the diversity of samples. Assume that the abnormal data set is ,in represents the abnormal category label, K is the number of classification categories; multi-classification processing provides sufficient labeled samples for subsequent training of the LSTM model; 4.2) LSTM neural network model construction and training; select the LSTM neural network algorithm, which uses its internal memory gate and forget gate structure to perform self-supervised multi-classification training on abnormal events in the data sequence; select the appropriate LSTM model architecture, optimizer and loss function parameters to train and optimize the model; During the training process, the input data X is processed in time series so that it enters the LSTM layer and is passed to the output layer layer by layer; the output of the model is the probability distribution of each abnormal category: in is the hidden state of the last time step, and are weights and biases; the multi-classification model can efficiently identify abnormal events based on time series characteristics; 4.3) Self-supervised learning of unlabeled sample data; Use unlabeled sample data to further improve the generalization ability of the model; input unlabeled data into the LSTM model and perform self-supervised learning based on its sequence context information. By updating the model parameters, the model's learning ability on unlabeled data is enhanced; this self-supervised update can be completed through pseudo-label generation or confidence screening strategies, such as treating samples with high prediction probability as new labels and adding them to the training set, so that the model has better adaptability to unlabeled data; 4.4) Combine the training results of the LSTM model and the SVM preliminary detection model to achieve adaptive optimization of the human-machine loop feedback; in each round of training, adjust the model parameters according to the performance of the model on the latest data to obtain higher recognition accuracy and generalization; Set incremental update conditions and adjust the parameters of the support vector set and LSTM network in a timely manner for new abnormal patterns; including: controlling the training stride by updating the learning rate 𝛼 so that the model maintains accuracy and robustness during the convergence stage; An incremental learning strategy is adopted to enhance the model's adaptability to new features.
5. The marketing data link anomaly diagnosis method based on the self-supervised support vector machine algorithm according to claim 4 is characterized in that: Step 5) specifically includes the following steps: 5.1) Classification and interpretation of abnormal diagnostic results The LSTM model is used to segment multiple types of anomalies, and the abnormal results are classified and explained by combining the feature weights and time series patterns of each type of anomaly; the probability vector output by the model middle, Indicates The predicted probability of the class anomaly is calculated based on the maximum probability value Classify the samples and further analyze the characteristics of the category; the feature weight W and bias b of each category are used to mark the main factors causing the anomaly and generate an explanation report; the importance ranking of feature weights can be achieved through the following formula: in, and Respectively weights and biases of anomaly-like features, is the hidden state of the last time step of LSTM; the key features and their contribution to the anomaly are determined by the absolute value of the weight value; 5.2) Timing explanation of abnormal causes In the LSTM model, the hidden layer state Maintain the time series dependency information of the data and support the time series analysis of abnormal causes; through the hidden state matrix The characteristic change curve analysis is used to locate the time nodes and cumulative impact process of abnormal events; the nodes with drastic changes in the hidden state are marked as the abnormal cause highlighting time. The specific formula is: The larger value Indicates the change intensity of the abnormal factor at this time step, further interprets the time distribution characteristics of the abnormal occurrence, and generates an abnormal time chart; 5.3) Interpretability Analysis of Abnormal Diagnosis Results Through the parameter interpretation results of the LSTM model in multi-classification tasks, the impact of abnormal factors on the overall trend is quantified; the feature weights and biases of each category are combined to form an abnormal impact report, and the SHAP value interpretation method is used to analyze the contribution of each feature to the model decision; the contribution of the jth feature in the classification decision is , the expression is: in is the SHAP value weight of feature j in category k, is the average probability of all samples; this explanatory model can reveal the specific role of each feature in abnormal classification decisions; 5.4) Decision support and improvement suggestions for abnormal events Based on the explanatory results, specific decision support recommendations are generated for each type of anomaly. Combined with the time distribution of anomaly occurrence and the contribution of main features, response recommendations are generated, including adjusting specific feature parameters, optimizing input data quality, or changing the monitoring period of abnormal events.
6. A marketing data link anomaly diagnosis system based on self-supervised support vector machine algorithm, characterized in that: A marketing data link anomaly diagnosis method based on a self-supervised support vector machine algorithm as described in any one of claims 1 to 5 is applied, wherein the system comprises: The data collection and preprocessing module is used to collect multi-source heterogeneous data of the marketing data link in real time, and complete data cleaning, missing value filling and outlier processing; The label generation module generates preliminary anomaly labels through self-supervised learning to guide the training of the anomaly detection model. The label generation module extracts the statistical features of the link data based on the sliding window method and clustering algorithm, and performs cluster analysis on the data to generate self-supervised labels. The anomaly detection model training module uses the support vector machine (SVM) algorithm to train the classification model through self-supervised labels to classify data into normal and abnormal data. Adaptive optimization module, based on the adaptive learning mechanism of LSTM neural network, further trains and optimizes the anomaly detection model through multi-classification processing, sample expansion and LSTM neural network algorithm, improving the accuracy of anomaly detection and the adaptability of the model; The abnormal diagnosis explanation and decision support module uses the multi-classification results generated by the LSTM model and the self-supervised learning strategy to achieve interpretable analysis and decision support for abnormal diagnosis. The output of the abnormal diagnosis explanation and decision support module includes classification explanation, time series analysis, abnormal feature explanation and decision support suggestions for abnormal diagnosis results. By calculating the contribution of each abnormal feature, an explanation report of the cause of the abnormality is generated, and corresponding improvement suggestions are provided.
7. The marketing data link anomaly diagnosis system based on the self-supervised support vector machine algorithm according to claim 6 is characterized by: The label generation module includes: A statistical feature calculation unit, used for calculating the statistical features of the link data using a sliding window method; Clustering unit, which uses clustering algorithm to classify data, calculates similarity based on Euclidean distance between data, and forms different clusters; The outlier detection unit generates self-supervised labels based on the proportion of outliers in each cluster and determines which data are abnormal labels; The anomaly detection model training module includes: The SVM classifier unit trains the support vector machine model based on self-supervised labels and classifies the data into normal and abnormal by finding the classification hyperplane; Classification hyperplane calculation unit solves the optimization problem to determine the optimal hyperplane, in which the slack variable is introduced and parameters Control the slackness of anomaly detection; Model evaluation unit, which evaluates the accuracy of the classification model and performs anomaly detection on new samples based on the model performance to generate classification results; The adaptive optimization module includes: Data augmentation unit, which expands the diversity of training samples through data augmentation strategies; LSTM training unit, based on LSTM neural network algorithm, performs multi-classification training on abnormal events to improve the model's ability to identify abnormalities in time series data; Adaptive learning unit, which adaptively optimizes the detection model through deep learning mechanism to improve the model's ability to process complex data patterns; The abnormal diagnosis interpretation and decision support modules include: The abnormal classification explanation unit analyzes the abnormal categories and provides feature explanations for each category based on the multi-classification results output by the LSTM model; The time series analysis unit analyzes the time distribution and cumulative impact of abnormal events based on the time series characteristics of the LSTM model; The abnormal feature interpretation unit calculates the contribution of each abnormal feature and generates an explanation report of the abnormal cause; The decision support unit provides targeted improvement suggestions based on abnormal diagnosis results and feature contributions to optimize link performance or adjust monitoring strategies.
8. A computer device, characterized in that: The device includes one or more processors and one or more memories, wherein at least one program code is stored in the one or more memories. When the program code is executed by the one or more processors, a marketing data link anomaly diagnosis method based on a self-supervised support vector machine algorithm as described in any one of claims 1 to 5 is implemented.
9. A storage medium, wherein at least one program code is stored in the storage medium, characterized in that: When the program code is executed by the processor, the steps of a marketing data link anomaly diagnosis method based on a self-supervised support vector machine algorithm as described in any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Fault diagnosis method based on fault data deep mining and learning
CN110263846A
Transmission line fault classification and positioning method based on transfer learning
CN116068329A
Data link state monitoring method and device, monitoring system and storage medium
CN116827817A
5G traffic anomaly detection and protection method and system based on interpretable artificial intelligence
CN117715045A
Complex equipment fault diagnosis system and diagnosis method based on multivariate data fusion
CN118468165A
Cited By
Inspection intelligent analysis method and system for electricity marketing
CN120338553A
Crop growth monitoring method and system based on agricultural Internet of Things
CN120429737A
Crop growth monitoring method and system based on agricultural Internet of Things
CN120429737B
Database anomaly detection method for power plant statistical management system
CN120611298A
Database anomaly detection method for power plant statistical management system
CN120611298B