Power marketing business transaction diagnosis method based on dynamic self-adaption and feature fusion

By using multi-scale feature fusion and dynamic scene adaptive modeling, the problem of false alarms and missed alarms caused by changes in the power marketing business environment has been solved, achieving accurate anomaly detection and cause analysis, and supporting business risk prediction.

CN121580248APending Publication Date: 2026-02-27MARKETING SERVICE CENT (MEASURING CENT) OF STATE GRID SHAANXI ELECTRIC POWER CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511828803.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-05
Publication Date
2026-02-27

AI Technical Summary

Technical Problem

Existing anomaly detection methods are unable to adapt to changes in the power marketing business environment, resulting in high false alarm or false negative rates, and are unable to provide clear reasons for anomalies.

Method used

A multi-scale feature fusion and dynamic scene adaptive modeling approach is adopted. By extracting micro, meso and macro features, and combining Gaussian mixture model and variational autoencoder, the scene is dynamically identified and a dedicated pattern model is trained to calculate the anomaly score and locate the root cause of the anomaly.

Benefits of technology

It enables accurate detection of anomalies in electricity marketing operations, reduces false alarm and false negative rates, and provides clear analysis of the causes of anomalies, supporting business risk prediction and decision-making.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121580248A_ABST
    Figure CN121580248A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of electric digital data processing, and particularly relates to an electric power marketing business transaction diagnosis method based on dynamic self-adaption and feature fusion, which comprises the following steps: acquiring electric power marketing work order data, respectively extracting multi-scale features, and obtaining high-dimensional feature vectors; clustering the high-dimensional feature vectors by adopting a Gaussian mixture model, determining the number of scenes through a Bayesian information criterion, and performing dynamic evolution recognition on the scenes to obtain a scene division result; independently training an exclusive normal mode model for each divided scene; and for newly input power marketing work order data, calculating transaction scores by using the normal mode model corresponding to the scene, judging transaction, positioning features corresponding to transaction during transaction, analyzing a service root cause, and outputting a transaction diagnosis result. According to the method, accurate detection of power marketing work order transaction is realized through multi-scale feature fusion and dynamic scene adaptive modeling, and both technical accuracy and service practicability are considered.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of electric digital data processing, and particularly relates to a power marketing business abnormality diagnosis method based on dynamic self-adaptation and feature fusion. BACKGROUND

[0002] With enterprise digital transformation, various industries have accumulated massive business operation data, such as power industry enterprise appeal work order data, power consumption data, financial industry transaction flow data, and industrial industry equipment sensor data. How to mine massive high-value data, discover risks, discover business information, and support business management is the core of enterprise improvement.

[0003] However, business data usually has two characteristics of complexity and variability. First, the data mode has different time scales, such as power load, which fluctuates randomly with a time scale of minutes; power load presents periodic changes with a time scale of days and weeks; and power load presents a long trend with a time scale of years, either increasing or fluctuating. Second, the business scene is not fixed and unchangeable, but changes with the environment (season, holiday) and itself (market situation, user change), and the regularity of power load in the same business district is different on weekdays and weekends. This is the difference in business scenarios.

[0004] Existing methods for detecting abnormalities cannot well handle such problems. Traditional abnormality detection methods mostly use static fixed threshold methods or single model methods, which cannot adapt to changes in business environment. Traditional methods either consider the normal peak value of a scene as an anomaly (high false alarm rate) or cannot detect small but important deviations mixed in the background (high false negative rate); most methods can only give an "abnormal" warning after detecting abnormality, but cannot give diagnostic information, i.e., answering which data dimensions have abnormality and what deep influencing factors cause it, but the key question "why" cannot be clearly answered.

[0005] Therefore, a new business data abnormality diagnosis method is needed to enable business departments to mine real abnormalities from complex environments, adaptively learn and timely warn as business scenarios change, and give business diagnosis from "what" to "why" to accurately predict business risks and make scientific decisions. SUMMARY

[0006] In view of the deficiencies in the above prior art, the purpose of the present application is to provide a power marketing business abnormality diagnosis method based on dynamic self-adaptation and feature fusion, which realizes precise detection of power marketing work order abnormalities through multi-scale feature fusion and dynamic scene self-adaptive modeling, and balances technical precision and business practicality.

[0007] In order to achieve the above object, the application provides a power marketing business anomaly diagnosis method based on dynamic self-adaptation and feature fusion, comprising the following steps: S1, obtaining power marketing work order data, respectively extracting micro-scale features, meso-scale features and macro-scale features, and performing feature splicing and standardization processing to obtain a high-dimensional feature vector; S2, using a Gaussian mixture model to cluster the high-dimensional feature vector, determining the number of scenes through the Bayesian information criterion, and performing dynamic evolution identification of the scenes to obtain a scene division result; S3, for each divided scene, an exclusive normal mode model is separately trained, and the normal mode model uses a variational autoencoder to learn the complete probability manifold of the normal data in the corresponding scene in the form of a deep learning model; S4, for newly input power marketing work order data, first extract a high-dimensional feature vector, then match the high-dimensional feature vector to the scene division result, calculate the anomaly score using the normal mode model corresponding to the divided scene, if the anomaly score exceeds the preset scene exclusive threshold, it is determined as an anomaly, then locate the corresponding features of the anomaly, analyze the business root cause of the anomaly, and output the anomaly diagnosis result.

[0008] As a preferred scheme of the application, in S1, the power marketing work order data contains the following fields: Work order basic information, including work order ID, submission channel; Business type information, including business main category, sub-business type; Time information, including submission timestamp, acceptance timestamp, and completion timestamp; User information, including user number, user type, and belonging power supply area; Text information, including user filled work order problem description and staff filled processing notes; Processing information, including processing duration, processing personnel ID, and processing result.

[0009] As a preferred scheme of the application, in S1, the micro-scale features are extracted by dividing the power marketing work order data according to the business type, setting a sliding window length, and calculating the local mean, local standard deviation and instantaneous change rate based on each power marketing work order data in the sliding window length, wherein: The local mean represents the average intensity of the work order and is expressed as: ; In the formula, is the local mean of the kth work order at time t; is the sliding window length; t is the target time point corresponding to the calculation of the local mean; i is the time index in the sliding window, and the value range is ; is the count of the kth type of work order at time i, representing the actual number of the kth type of work order at time point i; Local standard deviation quantifies the fluctuation amplitude of the number of work orders in the local area, represented as: ; In the formula, is the local standard deviation of the kth type of work order at time t; Instantaneous change rate characterizes the speed of change in the number of work orders, represented as: ; In the formula, is the instantaneous change rate of the kth type of work order at time t; 、 is the count of the kth type of work order at time t, t-1, respectively; Extracting mesoscale features is to set a duration, select the work order count sequence in the duration, and perform continuous wavelet transform or discrete wavelet transform on the work order count sequence to obtain wavelet detail coefficients at different scales. Calculate the energy feature of the corresponding wavelet detail coefficient at each scale: ; In the formula, is the wavelet coefficient energy of the kth type of work order at time t at the jth scale; is the preset mesoscale time window length; is the time index variable, represents the wavelet detail coefficient of the count sequence of the kth type of work order after wavelet transform at scale j, time point ; Extracting macro-scale features includes: Set the time window in months, and for the power marketing work order data in the time window, obtain the trend baseline by removing short-term noise through exponential weighted moving average: ; In the formula, 、 is the exponential weighted moving average value of the kth type of work order at time t, t-1, respectively; is the smoothing coefficient; Encode the time information of the power marketing work order data, including the hour vector corresponding to time t, the week vector corresponding to time t, and the scalar whether time t is a holiday; Convert the work order problem description in the power marketing work order data into a semantic vector through the BERT model, and calculate the centroid of all semantic vectors in each time window: ; In the formula, The centroid of the text semantic vector within the time window corresponding to time t; Let z be the set of work orders within the time window corresponding to time t, where z represents one of the electricity marketing work orders. Let z be the semantic vector of the work order.

[0010] In a preferred embodiment of the present invention, in S1, the micro-scale features, meso-scale features, and macro-scale features are concatenated to obtain a fused feature vector: ; In the formula, Here is the fused feature vector at time t; concat indicates concatenation; K is the total number of work order types; right Each dimension of the feature vector is Z-score normalized to obtain a high-dimensional feature vector.

[0011] As a preferred embodiment of the present invention, the process of dynamic scene evolution recognition in S2 is as follows: Divide the time window into two parts, using the current time as the baseline: In the current window, set a duration and retrieve the set of high-dimensional feature vectors corresponding to the electricity marketing work order data within that duration; Stable window, with a window duration consistent with the current window, uses reference stable data from the initial Gaussian mixture model clustering within the stable window; A two-sample Kolmogorov-Smirnov test is used to compare the data distributions in the current window and the stable window to evaluate the data distribution in the current Gaussian mixture model. For each feature dimension, the empirical cumulative distribution function (ECDF) of the current window and the stable window is calculated. The maximum difference between the two ECDFs is calculated, and the corresponding test value (P-value) is calculated based on the maximum difference to quantify the degree of difference in the feature distributions of the two windows. A significance level is preset. If the P-value is less than the significance level, concept drift exists, and the parameters of the Gaussian mixture model are adjusted and clustering is performed again. If there is no concept drift, the current scene segmentation result is output.

[0012] As a preferred embodiment of the present invention, in S3, the process of training a dedicated normal mode model separately is as follows: For each high-dimensional feature vector contained in the scene, a variational autoencoder (VAE) is constructed separately, including an encoder and a decoder. The encoder maps the high-dimensional feature vector in the scene to a low-dimensional latent space and outputs the Gaussian distribution parameters of the latent space. The decoder samples vectors from the Gaussian distribution of the latent space and reconstructs feature vectors with the same dimension as the input. The normal work order feature set in the scene is taken as training data, and the evidence lower bound loss of the VAE is optimized through training: ; In the formula, is a total loss function; is a reconstruction loss, which is used to measure the consistency of the input and the output; is a KL divergence loss; is a balance coefficient, which is used to control the regularization strength; d is the number of dimensions of the high-dimensional feature vector, and v is the dimension index; is the v-th dimension component of the high-dimensional feature vector of the original input; is the v-th dimension component of the feature vector reconstructed by the VAE decoder; is the KL divergence; u is the latent space variable of the VAE; F represents the input feature; is the prior distribution of the latent space; represents the posterior distribution of the latent space output by the encoder; is the dimension of the latent space; is the variance of the v-th dimension of the latent space distribution output by the encoder; is the mean of the v-th dimension of the latent space distribution output by the encoder; After training, the VAE corresponding to each scene is the normal mode model of the scene.

[0013] As a preferred scheme of the present application, the method for obtaining the normal work order feature set is as follows: from historical power marketing work order data, normal processing and non-abnormal work order data are selected through business annotation, the filtered work order data is distributed to the corresponding scene according to the scene division result, and the normal work order feature set of each scene is obtained.

[0014] As a preferred scheme of the present application, in S4, the process of matching the scene division result is as follows: for the high-dimensional feature vector of the newly input power marketing work order data, the posterior probability of belonging to each scene is calculated through a Gaussian mixture model, and the scene with the maximum posterior probability is matched with the high-dimensional feature vector of the power marketing work order data.

[0015] As a preferred scheme of the present application, in S4, the calculation of the abnormality score is as follows: for the newly input power marketing work order data, the normal mode model corresponding to the matched scene is used to calculate the abnormality score through the following formula: ; In the formula, is the high-dimensional feature vector of the newly input power marketing work order data; is the feature vector reconstructed after inputting the corresponding normal mode model; is the L2 norm; is corresponding abnormal transaction score; For each scene, a scene-specific threshold is dynamically set based on the reconstruction error of the scene historical normal data by the POT method of extreme value analysis, and if greater than the scene-specific threshold, it is determined to be an abnormal transaction; By analyzing the reconstruction error vector of each dimension , the corresponding feature of the abnormal transaction is located: ; In the formula, d is the number of dimensions of the high-dimensional feature vector, 、 is the value in the first dimension and the d-th dimension; 、 is the value of the feature vector reconstructed after inputting the corresponding normal mode model in the first dimension and the d-th dimension; Based on the size of each element in , the dimensions corresponding to the largest N elements are selected in descending order, and the features of the dimensions are taken as the corresponding features of the abnormal transaction.

[0016] As a preferred scheme of the present application, in S4, the process of analyzing the business root cause of the abnormal transaction and outputting the abnormal transaction diagnosis result is: taking the full-dimensional features of the historical power marketing work order data as input, taking the abnormal transaction score generated by the normal mode model as output, training the XGBoost regression model, when the newly input power marketing work order data is determined to be an abnormal transaction, inputting the feature corresponding to the abnormal transaction into the trained XGBoost regression model, and through XGBoost feature importance sorting and SHAP value analysis, combining the preset business logic to determine the root cause of the abnormal transaction, and finally outputting the abnormal transaction diagnosis result containing the scene to which the abnormal transaction belongs, the feature corresponding to the abnormal transaction, the root cause of the abnormal transaction and the evidence support, wherein the evidence support is the result of XGBoost feature importance sorting and SHAP value analysis.

[0017] The present application has the beneficial effects of: The present application integrates micro transient fluctuations, meso periodic rhythms and macro long-term trends through a multi-scale feature extraction scheme, simultaneously incorporates multi-source information such as calendar encoding and text semantic vectors, and constructs a multi-source fused high-dimensional feature vector, laying a foundation for accurate modeling; relying on Gaussian mixture model (GMM) unsupervised clustering to realize automatic discovery of business scenes, combining the concept drift detection mechanism of double-sample Kolmogorov-Smirnov (K-S) test, which can dynamically track scene evolution and adaptively update the model, and then combining the scene-specific VAE generative model to fit the normal mode, the dynamic threshold is determined based on the historical normal data by the POT method, which greatly reduces the false positive rate and the false negative rate, and realizes the accurate identification of small abnormal transactions and extreme abnormal transactions.

[0018] The application does not stop at the transaction identification level, but locates the key transaction features through dimension-by-dimension reconstruction error analysis, and determines the specific data dimension of the transaction; then, with the aid of the XGBoost regression model to simulate the decision logic of the VAE, the SHAP algorithm is used to quantify the contribution of each business variable (such as temperature and marketing activities) to the transaction, the detection results of the black box model are converted into root cause explanations that can be understood by business personnel, forming a complete link from feature extraction, scene adaptation, model building to transaction judgment, feature positioning, and root cause inference, which not only provides high-precision technical support for business risk prediction, but also gives quantifiable and executable decision suggestions, helping to manage lean operations. BRIEF DESCRIPTION OF DRAWINGS

[0019] Figure 1 is a step schematic diagram of the application; Figure 2 is a transaction judgment flowchart for newly input power marketing work order data. DETAILED DESCRIPTION

[0020] The embodiments of the application will be further described below in conjunction with the accompanying drawings: Embodiment 1: As shown in Figure 1 and Figure 2 , the power marketing business transaction diagnosis method based on dynamic self-adaptation and feature fusion includes the following steps: S1, obtaining power marketing work order data, respectively extracting micro-scale features, meso-scale features and macro-scale features, and performing feature splicing and standardization processing to obtain a high-dimensional feature vector; S2, using a Gaussian mixture model to cluster the high-dimensional feature vector, determining the number of scenes through the Bayesian information criterion, and performing dynamic evolution identification of the scenes to obtain a scene division result; S3, for each divided scene, separately training a dedicated normal mode model, and the normal mode model uses a variational autoencoder to learn the complete probability manifold of the normal data in the corresponding scene in the form of a deep learning model; S4, for newly input power marketing work order data, first extract a high-dimensional feature vector, then match the high-dimensional feature vector with the scene division result, use the corresponding normal mode model of the divided scene to calculate a transaction score, if the transaction score exceeds a preset scene-specific threshold, it is determined as a transaction, then locate the corresponding features of the transaction, and analyze the business root cause of the transaction, and output a transaction diagnosis result.

[0021] In S1, the power marketing work order data includes the following fields: Work order basic information, including work order ID, submission channel (APP / offline business hall / customer service telephone); Business type information, including business main category (fault repair / service expansion installation / electricity fee consultation / complaint suggestion / handling of transfer, etc.), sub-business type (such as fault repair- electric meter fault / line fault / trip); Time information, including submission timestamp (accurate to seconds), acceptance timestamp, completion timestamp; User information, including user number, user type (resident / low-voltage non-resident / high-voltage enterprise), belonging to power supply area (block / street / district); Text information, including user's work order problem description, staff's processing notes; Processing information, including processing duration (time difference from acceptance to completion), processing personnel ID, processing result (solved / pending follow-up / transfer to other departments).

[0022] The power marketing work order data can be obtained through the existing power marketing system. Before feature extraction, preprocessing can be performed, such as aggregating work orders by type and time, and eliminating abnormal / repeated work orders.

[0023] In order to capture the volatility and local mutation characteristics in the business volume data, the micro-scale features are extracted. Micro-scale features can help capture the sudden increase in work order volume caused by sudden events, such as short-term burst of work orders caused by local power grid failure. To extract micro-scale features, the power marketing work order data is divided by business type, and a sliding window length (such as 15 minutes, 45 minutes, 1 hour) is set. Based on each power marketing work order data within the sliding window length, the local mean, local standard deviation and instantaneous change rate are calculated, wherein: The local mean represents the average intensity of work orders, which is used to smooth short-term noise and is represented as: ; In the formula, is the local mean of the kth type of work order at time t; is the sliding window length; t is the target time point corresponding to the calculation of the local mean; i is the time index within the sliding window, and the value range is ; is the count of the kth type of work order at time i, which represents the actual number of the kth type of work order at time point i; The local standard deviation quantifies the fluctuation amplitude of the work order quantity in the local area, and measures the business stability, which is represented as: ; In the formula, is the local standard deviation of the kth type of work order at time t; The instantaneous change rate represents the speed of work order quantity change, which is particularly sensitive to the upcoming surge of pre-warning, and is represented as: ; In the formula, is the instantaneous rate of change (first-order difference) of the kth type of work order at time t; 、 are the counts of the kth type of work order at times t and t-1, respectively; For example, Take 3, cover 3 time points, total duration 45 minutes, and the counts of the fault repair type work order (k = 1) at each time point are 2, 3, and 5, respectively, then The calculated value of is 3, i.e., the average intensity of the fault repair work order is 3 orders per 15 minutes within 45 minutes, and is calculated to be 、 (i.e., 66.7%).

[0024] Work order business usually has a certain period, for example, electricity dispute work order exists in all time periods of weekdays, if the periodicity is not stripped from modeling, work orders with strong periodicity will be incorrectly identified as abnormal, therefore, the rhythm is quantified by constructing mesoscale features. In order to deal with the case that the rhythm may not be very smooth (the rhythm itself may change with seasons, holidays, etc.), the mesoscale feature is extracted, set a duration (e.g., 168 hours for a week), select the work order count sequence within the duration, perform continuous wavelet transform or discrete wavelet transform on the work order count sequence, and obtain the wavelet coefficient energy at different scales (frequency bands): ; In the formula, is the wavelet coefficient energy of the kth type of work order at time t and at the jth scale; is a preset mesoscale time window length; is a time index variable, represents the wavelet detail coefficient of the count sequence of the kth type of work order after wavelet transform, at scale j, and at time point The feature can capture the energy change of a specific periodic pattern within a specific time window; For example, the fault repair type work order (k = 1), scale j = 1 (corresponding to a 24-hour periodic frequency band), and the wavelet detail coefficients of the count sequence of the first type of work order after wavelet transform at scale 1 and at two time points are 1.2 and 1.5, respectively, The window length of is 2, then the wavelet coefficient energy of the first type of work order at the first scale is .

[0025] The macro-scale feature extraction includes: Any short-term shock, periodic shock exists in the long-term macro trend, to help the normal mode model understand the long-term business trend (the continuous growth of new user shops in a certain area), prevent identifying long-term flat trends as continuous, small amplitude outliers, introduce macro scale features, remove short-term noise through exponential weighted moving average (EWMA) of order sequence, get smooth trend baseline. Set the time window in months, for the power marketing order data in this time window, remove short-term noise to get the trend baseline through exponential weighted moving average: ; In the formula, , are the exponential weighted moving average values of the kth order at time t and t-1 respectively; is the smoothing coefficient (which can be adjusted according to the data trend smoothing requirement, and the value is 0.2 in this embodiment); In order to avoid the normal mode model directly observing the time context, the time information of the power marketing order data is encoded, including the time vector corresponding to the time t, the week vector corresponding to the time t and the scalar (0, 1 variable) whether the time t is a holiday; The order problem description in the power marketing order data is converted into a semantic vector through the BERT model, and the centroid of all semantic vectors in each time window is calculated to describe the topic distribution of the order in the window: ; In the formula, is the text semantic vector centroid in the time window corresponding to time t; is the order set in the time window corresponding to time t, and z represents a power marketing order therein; is the semantic vector of order z.

[0026] The micro scale feature, meso scale feature and macro scale feature are spliced to obtain a fusion feature vector: ; In the formula, is the fusion feature vector at time t; concat represents splicing; K is the total number of order types; ellipsis represents In the formula, other features can be extended according to business requirements, such as order department code, customer electricity category, whether the current window is in the electricity peak period, etc.

[0027] The vector is a holographic, three-dimensional digital snapshot of the service state at the current time, which avoids eliminating differences in the model due to different dimensions and different numerical ranges in the vector before modeling. The Z-Score standardization processing is performed on the characteristics of each dimension to obtain a high-dimensional feature vector.

[0028] The normal operation mode (scene) of the power marketing business is different at different times and in different internal and external scenes. The business consultation work order mode in the afternoon of a working day in summer is completely different from the fault repair work order mode at night during winter holidays. If the same standard is placed on all data for judgment, there will obviously be a large number of false positives and false negatives. Therefore, on the basis of unsupervised learning, this embodiment proposes a scene dynamic division and evolution identification method, which aims to adaptively and data-drivenly learn the objectively existing and significantly different operation scenes in business, and follow the evolution of these scenes to make the scene division fit the current business data distribution and ensure the accuracy of subsequent modeling.

[0029] For the high-dimensional feature vector, an unsupervised clustering is performed by using a Gaussian mixture model: within a preset upper limit of the number of components, the fitting is performed in turn, the Bayesian information criterion BIC is used as the scoring basis, and the number of components that makes the BIC minimum is selected as the optimal number of scenes, so that the best balance between the explanation ability and the model complexity is achieved, and a compact and statistically supported scene division result is obtained.

[0030] In S2, the process of dynamic evolution identification of the scene is as follows: Two time windows are divided based on the current time point: In the current window, a duration (for example, one week) is set, and the high-dimensional feature vector set corresponding to the power marketing work order data in the duration is used; In the stable window, the window length is consistent with that of the current window, and the reference stable data used in the initial Gaussian mixture model clustering in the stable window is used; The double-sample Kolmogorov-Smirnov test is used to compare the data distribution in the current window and the stable window to evaluate the data distribution in the current Gaussian mixture model: for each feature dimension, the empirical cumulative distribution function ECDF of the current window and the stable window is calculated, the maximum difference value of the two ECDFs is calculated, the test value P value is calculated based on the maximum difference value, and the feature distribution difference degree of the two windows is quantified, a significance level is preset, the significance level 0.05 is used as the threshold, if the P value is less than the significance level, it is determined that there is a concept drift, the parameters of the Gaussian mixture model are adjusted to re-cluster (the high-dimensional feature vector is re-clustered, and the number of scenes is determined by the Bayesian information criterion), and if there is no concept drift, the current scene division result is output.

[0031] The reason for using GMM is that it is not hard classification, but can output the posterior probability of each sample belonging to each scene, which is more in line with the actual business scene.

[0032] After reasonable division of the business scene, the next goal is to train a high-quality normal mode model for each scene. It is not enough to use the mean and covariance given by GMM to represent a scene, which cannot represent the internal relationship between complex, nonlinear high-dimensional features in the scene. Therefore, a dedicated variational autoencoder (VAE) is trained for each business scene. It is equivalent to establishing a digital twin model for each scene, which learns the complete probability manifold of normal data in the scene in the form of a deep learning model.

[0033] In S3, the process of training a dedicated normal mode model is as follows: For each high-dimensional feature vector contained in each scene, a variational autoencoder VAE is constructed separately, including an encoder and a decoder. The encoder maps the high-dimensional feature vector in the scene to a low-dimensional hidden space, and outputs the Gaussian distribution parameters of the hidden space. The decoder samples a vector from the Gaussian distribution of the hidden space to reconstruct a feature vector consistent with the input dimension. The evidence lower bound loss of VAE is optimized by taking the normal work order feature set in the scene as the training data: ; In the formula, is the total loss function; is the reconstruction loss, which is used to measure the consistency of input and output; is the KL divergence loss; is the balance coefficient, used to control the regularization strength; d is the number of dimensions of the high-dimensional feature vector, and v is the dimension index; is the v-th component of the original input high-dimensional feature vector; is the v-th component of the feature vector reconstructed by the VAE decoder; is the KL divergence; u is the hidden space variable of VAE; F represents the input feature; is the prior distribution of the hidden space; represents the posterior distribution of the hidden space output by the encoder represents the set of learnable parameters of the encoder neural network, such as weight matrices, bias vectors, etc. is the dimension of the hidden space; is the variance of the v-th dimension of the hidden space distribution output by the encoder; is the mean of the v-th dimension of the hidden space distribution output by the encoder; After training, the VAE corresponding to each scene is the normal mode model of the scene.

[0034] If the ticket feature dimension is high and the sample size is small, a large value (such as 1-10) can be taken to enhance the regularization constraint. If the sample is sufficient and the feature noise is low, a small value (such as 0.5-0.8) can be taken to reduce the limitation on the model fitting ability.

[0035] The normal ticket feature set is obtained by selecting normal processing and non-exceptional ticket data from historical power marketing ticket data through business annotation, and then distributing the filtered ticket data to the corresponding scene according to the scene division result, to obtain the normal ticket feature set of each scene.

[0036] In S4, the process of matching the scene division result is to calculate the posterior probability of each scene to which the high-dimensional feature vector of the newly input power marketing ticket data belongs through the Gaussian mixture model, and match the scene with the largest posterior probability to the high-dimensional feature vector of the power marketing ticket data.

[0037] The calculation of the abnormal transaction score is specifically to calculate the abnormal transaction score of the newly input power marketing ticket data by using the normal mode model corresponding to the matched scene through the following formula: ; In the formula, is the high-dimensional feature vector of the newly input power marketing ticket data; is the feature vector reconstructed after inputting the corresponding normal mode model; is the L2 norm; is the corresponding abnormal transaction score; This abnormal transaction score directly represents the error value of the new data point under the normal scene. For the scene-specific threshold, the threshold is not fixed, but is dynamically set for each scene. For each scene, a scene-specific threshold is dynamically set based on the reconstruction error of the historical normal data of the scene through the POT method. For example: for each business scene, first calculate the reconstruction error of its historical normal sample on the exclusive VAE to obtain a one-dimensional error set; take the 95% quantile of the set as the threshold, and regard the part higher than the threshold as the extreme tail, and then use the GPD to fit the shape and scale parameters of this tail; according to the set false alarm rate, the corresponding quantile point is calculated through the POT formula as the dynamic specific threshold of the scene, so that the abnormal transaction alarm can be triggered sensitively for the slight deviation while ensuring the extremely low false alarm rate.

[0038] If is greater than the scene-specific threshold, it is determined to be an abnormal transaction.

[0039] For example, for a high-dimensional feature vector (d=2) of a new sample. (Local mean of fault repair work orders, EWMA standardized value), VAE reconstruction features Then the calculation yields If the scene threshold for the new sample, determined by the POT method, is 1.8, then the new sample is considered an anomaly.

[0040] By analyzing the reconstruction error vector dimension by dimension Locating the characteristics corresponding to the abnormal movement: ; In the formula, d is the number of dimensions of the high-dimensional feature vector. , for The values ​​in the 1st and dth dimensions; , for The values ​​of the reconstructed feature vector in the 1st and dth dimensions after inputting the corresponding normal mode model; based on The size of each element is sorted in descending order, and the features corresponding to the dimensions of the N largest elements are selected as the features corresponding to the anomalies.

[0041] Each element in the vector reflects the offset of the corresponding dimension of the original high-dimensional feature vector. Based on this vector from large to small, the contribution of the feature elements with the highest contribution values ​​to the total anomaly value is directly obtained. For example, for this power marketing work order, the business personnel interpret it as the anomaly being caused by the offset of the centroid of the micro-fault repair work order count and the macro-trend work order text semantics.

[0042] The process of analyzing the root causes of anomalies and outputting anomaly diagnosis results is as follows: Using the full-dimensional features of historical electricity marketing work order data as input and the anomaly score generated by the normal mode model as output, an XGBoost regression model is trained as a surrogate model. When newly input electricity marketing work order data is determined to be anomaly, its corresponding features are input into the trained XGBoost regression model. Through XGBoost feature importance ranking and SHAP value analysis, combined with preset business logic, the root cause of the anomaly is identified. Finally, an anomaly diagnosis result is output, including the scenario to which the anomaly belongs, the corresponding features, the root cause of the anomaly, and supporting evidence. The supporting evidence is the result of XGBoost feature importance ranking and SHAP value analysis.

[0043] For example, output a specific attribution matrix sorted by contribution, showing that this anomaly has a 50% probability of being attributed to a sudden drop in regional temperature and a 20% probability of being attributed to the launch of a new round of marketing activities, providing managers with clear, quantifiable, and actionable decision-making support.

[0044] Embodiment 2: The difference between this embodiment and embodiment 1 is that, when the mesoscale feature is used, the following method is used: set a duration (for example, one week), and preset important cycle points (for example, 24 hours, 12 hours, 8 hours), select the work order count sequence in the duration, perform discrete Fourier transform on the work order count sequence, convert the work order count sequence from time domain to frequency domain, and extract the amplitude and phase corresponding to the important cycle points in the frequency domain.

[0045] Embodiment 3: A power marketing business anomaly diagnosis device based on dynamic self-adaptation and feature fusion, comprising: one or more processors; a memory for storing one or more computer programs; wherein when the one or more programs are executed by the one or more processors, the one or more processors execute the method in embodiment 1 or embodiment 2.

[0046] Embodiment 4: A computer readable storage medium having executable instructions stored thereon, the instructions being executed by a processor to cause the processor to execute the method in embodiment 1 or embodiment 2.

Claims

1. A power marketing business transaction diagnosis method based on dynamic self-adaptation and feature fusion, characterized in that The method comprises the following steps: S1, obtaining power marketing work order data, extracting micro-scale features, meso-scale features and macro-scale features respectively, and performing feature splicing and standardization processing to obtain a high-dimensional feature vector; S2, using a Gaussian mixture model to cluster the high-dimensional feature vector, determining the number of scenes through the Bayesian information criterion, and performing dynamic evolution identification of the scenes to obtain a scene division result; S3, for each divided scene, a dedicated normal mode model is trained separately, and the normal mode model uses a variational autoencoder to learn the complete probability manifold of the normal data in the corresponding scene in the form of a deep learning model; S4, for newly input power marketing work order data, first extract the high-dimensional feature vector, then match the high-dimensional feature vector to the scene division result, calculate the abnormal score using the normal mode model corresponding to the divided scene, if the abnormal score exceeds the preset scene-specific threshold, it is determined to be abnormal, then locate the corresponding features of the abnormality, analyze the business root cause of the abnormality, and output the abnormality diagnosis result. 2.The method of claim 1, wherein, In the S1, the power marketing work order data includes the following fields: Work order basic information, including work order ID, submission channel; Business type information, including business main category, sub-business type; Time information, including submission timestamp, acceptance timestamp, completion timestamp; User information, including user number, user type, and belonging power supply area; Text information, including user filled work order problem description, and staff filled processing notes; Processing information, including processing time, processing personnel ID, and processing result. 3.The method of claim 2, wherein, In the S1, the micro-scale features are extracted by dividing the power marketing work order data according to the business type, setting a sliding window length, calculating the local mean, local standard deviation and instantaneous change rate based on each power marketing work order data in the sliding window length, wherein: The local mean represents the average intensity of the work order, which is represented as: ; In the formula, is the local mean value of the kth type of work order at time t; is the sliding window length; t is the target time point corresponding to the current calculation of the local mean value; i is the time index in the sliding window, and the value range is ; is the count of the kth type of work order at time i, indicating the actual number of the kth type of work order at time point i; The local standard deviation quantifies the fluctuation amplitude of the number of work orders in the local area, which is represented as: ; wherein is the local standard deviation of the kth type of work order at time t; The instantaneous change rate represents the speed of the number of work orders, which is represented as: ; wherein, is the instantaneous rate of change of the kth type of work order at time t; , are the counts of the kth type of work order at times t, t-1, respectively. The meso-scale features are extracted by setting a duration, selecting the work order count sequence in the duration, and performing continuous wavelet transform or discrete wavelet transform on the work order count sequence to obtain wavelet detail coefficients at different scales, and calculating the energy features of the corresponding wavelet detail coefficients at each scale: ; In the formula, is the wavelet coefficient energy of the kth type of work order at the jth scale at time t; is a preset mesoscopic time window length; is a time index variable, indicates the wavelet detail coefficient of the counting sequence of the kth type of work order after wavelet transform, at scale j, at time point ; The macro-scale features include: Setting a time window in months, and using an exponential weighted moving average to remove short-term noise to obtain a trend baseline for the power marketing work order data in the time window: ; In the formula, , are the exponentially weighted moving average values of the kth type of work order at times t, t-1, respectively; is a smoothing coefficient; Encode the time information of the power marketing work order data, including the time t corresponding to the time vector , the time t corresponding to the week vector , and the scalar of whether the time t is a holiday ; Converting the work order problem description in the power marketing work order data into a semantic vector through a BERT model, and calculating the centroid of all semantic vectors in each time window: ; In the formula, is the text semantic vector centroid in the time window corresponding to time t; is the work order set in the time window corresponding to time t, and z represents a power marketing work order therein; is the semantic vector of the work order z. 4.The method of claim 3, wherein, In the S1, the micro-scale features, meso-scale features and macro-scale features are spliced to obtain a fusion feature vector: ; wherein is the fused feature vector at time t; Concat represents splicing; K is the total number of work order types; To Z-Score standardization is performed on the characteristics of each dimension to obtain a high-dimensional feature vector. 5.The method of claim 1, wherein, In the S2, the process of dynamic evolution identification of the scene is: Divide two time windows based on the current time point: In the current window, set a duration and retrieve the set of high-dimensional feature vectors corresponding to the electricity marketing work order data within that duration; Stable window, with a window duration consistent with the current window, uses reference stable data from the initial Gaussian mixture model clustering within the stable window; A two-sample Kolmogorov-Smirnov test is used to compare the data distributions in the current window and the stable window to evaluate the data distribution in the current Gaussian mixture model. For each feature dimension, the empirical cumulative distribution function (ECDF) of the current window and the stable window is calculated. The maximum difference between the two ECDFs is calculated, and the corresponding test value (P-value) is calculated based on the maximum difference to quantify the degree of difference in the feature distributions of the two windows. A significance level is preset. If the P-value is less than the significance level, concept drift exists, and the parameters of the Gaussian mixture model are adjusted and clustering is performed again. If there is no concept drift, the current scene segmentation result is output. 6.The method of claim 1, wherein, In S3, the process of training a dedicated normal mode model separately is as follows: For each high-dimensional feature vector contained in the scene, a variational autoencoder (VAE) is constructed separately, including an encoder and a decoder. The encoder maps the high-dimensional feature vector in the scene to a low-dimensional latent space and outputs the Gaussian distribution parameters of the latent space. The decoder samples vectors from the Gaussian distribution of the latent space and reconstructs feature vectors with the same dimension as the input. Using the feature set of normal work orders in the scenario as training data, the evidence lower bound loss of the VAE is optimized through training: ; wherein, is the total loss function; is the reconstruction loss, which measures the consistency between the input and output; is the KL divergence loss; is the balance coefficient, which controls the regularization strength; d is the number of dimensions of the high-dimensional feature vector, and v is the dimension index; is the v-th dimension component of the high-dimensional feature vector of the original input; is the v-th dimension component of the feature vector reconstructed by the VAE decoder; is the KL divergence; u is the latent space variable of the VAE; F represents the input feature; is the prior distribution of the latent space; represents the posterior distribution of the latent space output by the encoder; is the dimension of the latent space; is the variance of the latent space distribution output by the encoder in the v-th dimension; is the mean of the latent space distribution output by the encoder in the v-th dimension; After training, the VAE corresponding to each scene is the normal mode model for that scene. 7.The method of claim 6, wherein, The normal work order feature set is obtained by selecting work order data that are processed normally and without anomalies from historical power marketing work order data through business annotation, and then assigning the filtered work order data to the corresponding scenarios according to the scenario division results to obtain the normal work order feature set for each scenario. 8.The method of claim 1, wherein, In S4, the process of matching the scenario segmentation results is as follows: for the high-dimensional feature vector of the newly input power marketing work order data, the posterior probability of it belonging to each scenario is calculated by Gaussian mixture model, and the scenario with the highest posterior probability is matched with the high-dimensional feature vector of the power marketing work order data. 9.The method of claim 1, wherein, In S4, the anomaly score is calculated specifically by using the normal mode model corresponding to the matched scenario to calculate the anomaly score for newly input electricity marketing work order data using the following formula: ; In the formula, is a high-dimensional feature vector of the newly input power marketing work order data; is is a feature vector reconstructed after inputting the corresponding normal mode model; is an L2 norm; is is a corresponding abnormal transaction score; For each scene, based on the reconstruction error of the scene historical normal data, a scene-specific threshold is dynamically set by the POT method of extreme value analysis, and if greater than the scene-specific threshold, it is determined as an abnormal event. by analyzing the reconstruction error vector dimension by dimension locating the feature corresponding to the transaction ; In the formula, d is the dimension number of the high-dimensional feature vector, , is the value of the reconstructed feature vector in the first dimension, the dth dimension after inputting the corresponding normal mode model; , is the value of the reconstructed feature vector in the first dimension, the dth dimension after inputting the corresponding normal mode model; Based on In each element of the size, in order from high to low, select the largest N elements corresponding to the dimension of the characteristics, as the corresponding characteristics of the transaction. 10.The method of claim 9, wherein, In S4, the process of analyzing the root cause of the anomaly and outputting the anomaly diagnosis result is as follows: using the full-dimensional features of historical power marketing work order data as input and the anomaly score generated by the normal mode model as output, an XGBoost regression model is trained. When newly input power marketing work order data is determined to be an anomaly, the features corresponding to the anomaly are input into the trained XGBoost regression model. Through XGBoost feature importance ranking and SHAP value analysis, combined with preset business logic, the root cause of the anomaly is identified. Finally, the anomaly diagnosis result, which includes the scenario to which the anomaly belongs, the features corresponding to the anomaly, the root cause of the anomaly, and the evidence supporting it, is output. The evidence supporting it is the result of XGBoost feature importance ranking and SHAP value analysis.