A method and system for constructing a power grid marketing data distribution feature comparison library
By constructing a multi-dimensional feature comparison library using dynamic spatiotemporal graphs and federated learning, the privacy and security issues and the global perspective in power grid marketing data analysis are resolved. This enables efficient risk assessment and early warning for power grid marketing operations, improving the accuracy and adaptability of risk identification.
Patent Information
- Application Number
- CN202511668244.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-14
- Publication Date
- 2026-02-13
- Estimated Expiration
- 2045-11-14
AI Technical Summary
Existing technologies for power grid marketing data analysis face challenges in data privacy and security, fail to provide a holistic perspective, struggle to capture the spatiotemporal dynamic correlation between user equipment and marketing activities, and cannot adaptively adjust risk comparison benchmarks, leading to a decline in the accuracy of risk warnings.
A technical solution combining dynamic spatiotemporal graph construction, federated learning, multi-scale spatiotemporal entropy calculation, and adaptive updating is adopted to construct an adaptively optimizable multi-dimensional feature comparison library. User groups, marketing events, and device status are constructed through dynamic spatiotemporal graphs. Graph neural networks are used for local training to generate deep distributed feature vectors. Multi-scale spatiotemporal entropy calculation is performed to construct a distributed feature comparison library for risk assessment.
It has improved the accuracy and foresight of power grid marketing risk assessment while protecting data privacy, enabling it to identify complex cross-regional risks, adapt to changes in the power grid marketing environment, and ensure the robustness and reliability of risk assessment.
Smart Images

Figure CN121117626B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of power grid data analysis, risk assessment and artificial intelligence application, in particular to a method and system for constructing a power grid marketing data distribution feature comparison library. BACKGROUND
[0002] Under the wave of digital transformation, the power grid marketing business has generated massive, multi-source and heterogeneous data, which contains rich business status information. In order to ensure the stable operation of the power grid marketing business, advanced data processing technology needs to be used to analyze these data in real time, establish a feature model that can accurately reflect the business status, and conduct risk monitoring and early warning based on it. Therefore, the development of an efficient and intelligent data analysis system is crucial to improving the management level of the power grid marketing.
[0003] In the prior art, for the analysis and risk assessment of power grid marketing data, a technical solution of storing the data of each region to a central data warehouse or data lake is usually adopted. On this basis, traditional statistical analysis methods, time series prediction models or conventional machine learning algorithms are used to process the aggregated data, extract key business indicators, and compare them with fixed thresholds set based on historical data to determine whether the current business is abnormal. Some solutions also independently deploy analysis models in each region to monitor local data.
[0004] However, the above prior art solution has obvious technical defects. First, the physical concentration of sensitive marketing data in each region faces serious data security and privacy compliance challenges. Second, the independent analysis of each region cannot form a global perspective and is difficult to find cross-regional correlation risks. In addition, traditional analysis models usually treat data as isolated time series or table data, making it difficult to effectively capture the complex spatio-temporal dynamic correlation between users, devices and marketing activities. More importantly, the existing risk comparison benchmarks are mostly static, which cannot be adjusted adaptively with changes in business environment, resulting in a significant decrease in the accuracy of early warning when facing new marketing strategies or user behavior patterns. SUMMARY
[0005] To solve the above problems, the present application provides a method and system for constructing a power grid marketing data distribution feature comparison library, which adopts a technical solution combining dynamic spatio-temporal graph construction, federated learning, multi-scale spatio-temporal entropy calculation and adaptive updating, which can protect data privacy while constructing a multi-dimensional feature comparison library that can be adaptively optimized, thereby improving the accuracy and forward-looking of power grid marketing business risk assessment.
[0006] The above object can be achieved by the following solution:
[0007] The application discloses a method for constructing a power grid marketing data distribution feature comparison library, and comprises the following steps: obtaining original data of regional power grid marketing, wherein the original data comprises user behavior data, marketing activity data, geographic information data and timestamp data; constructing a dynamic space-time graph based on the original data, wherein nodes of the dynamic space-time graph represent user groups, marketing events and device states, and edges of the dynamic space-time graph represent business relationships and space-time proximity relationships between nodes; performing local training based on the dynamic space-time graph in each region to generate model parameters, and uploading the model parameters to a central server; the central server aggregates the received model parameters to obtain a global model; using the global model to extract features from the dynamic space-time graph to generate a deep distribution feature vector; performing multi-scale space-time entropy calculation on the deep distribution feature vector to generate a multi-scale space-time entropy feature set; constructing and updating a distribution feature comparison library containing normal business state statistical characteristics based on the multi-scale space-time entropy feature set; and performing risk assessment on a current business state based on the distribution feature comparison library to generate a risk warning.
[0008] Optionally, the constructing of the dynamic space-time graph based on the original data comprises: dividing the original data into regional local data; abstracting the regional local data into nodes and edges to obtain an initial graph structure containing nodes and edges; defining a time window and a space distance window, and dynamically updating the relationship between the nodes and the edges based on the time window and the space distance window to generate the dynamic space-time graph.
[0009] Optionally, the feature extraction from the dynamic space-time graph based on the global model comprises: deploying a graph neural network model with a unified architecture in each region; inputting the dynamic space-time graph into the graph neural network model for local training, learning the relationship between the nodes and the edges, and generating model parameters; using the global model to perform forward propagation calculation on a real-time acquired dynamic space-time graph to output a deep distribution feature vector, wherein the deep distribution feature vector encodes a potential probability distribution of a business state.
[0010] Optionally, the multi-scale space-time entropy calculation on the deep distribution feature vector comprises: defining a plurality of time scales and space scales, combining the time scales and the space scales to form a multi-scale combination; performing dimension reduction and probability distribution estimation on the deep distribution feature vector under each multi-scale combination to obtain a probability distribution; calculating a space-time entropy value based on the probability distribution, and integrating the space-time entropy values under all multi-scale combinations to generate a multi-scale space-time entropy feature set.
[0011] Optionally, the defining the plurality of time scales and space scales comprises: defining hour-level and day-level granularities as the time scales, and defining cell-level and region-level granularities as the space scales; and combining the time scales and the space scales to obtain a plurality of scale combinations, wherein the plurality of scale combinations are used to realize uncertainty measurement of the service state from micro to macro and from short term to long term.
[0012] Optionally, the constructing and updating the distribution feature comparison library comprising normal service state statistical characteristics comprises: obtaining a plurality of scale-time-space entropy feature sets in a historical normal service state, and obtaining scene labels corresponding to the plurality of scale-time-space entropy feature sets; grouping the plurality of scale-time-space entropy feature sets according to the scene labels, and calculating a mean distribution and a confidence interval of each group at each scale; and storing a mapping relationship of the scene labels, the scale-time-space scales, the mean distribution and the confidence interval to generate the distribution feature comparison library.
[0013] Optionally, the constructing and updating the distribution feature comparison library comprising normal service state statistical characteristics further comprises: obtaining a reward signal by obtaining a business expert feedback on risk early warning and automatically confirmed stable running data; introducing a reinforcement learning mechanism to adjust the mean distribution and the confidence interval in the distribution feature comparison library according to the reward signal; and updating the mapping relationship based on the adjusted mean distribution and the confidence interval.
[0014] Optionally, the risk assessment on the current service state comprises: obtaining a current service environment parameter in real time, and generating a current service scene label according to the service environment parameter; matching and extracting a corresponding mean distribution and a confidence interval from the distribution feature comparison library according to the current service scene label; calculating a difference between a plurality of scale-time-space entropy feature sets of the current service state and the mean distribution; comparing the difference with a preset threshold to determine whether key components of the plurality of scale-time-space entropy feature sets are outside the confidence interval, and if yes, determining that the service is abnormal, and if no, determining that the service is normal; dividing a risk level according to a size of the difference and a degree of exceeding the confidence interval to generate a risk early warning.
[0015] Optionally, the calculating the difference between the plurality of scale-time-space entropy feature sets of the current service state and the mean distribution comprises: regarding the plurality of scale-time-space entropy feature sets and the mean distribution as probability distributions; and calculating a distance between the two probability distributions by using a probability distance measurement method to obtain the difference, wherein the difference is used to quantify an overall degree of deviation of the current service state from the normal state.
[0016] Based on the same inventive concept, the application also provides a system for constructing a power grid marketing data distribution feature comparison library, comprising: a data acquisition module for acquiring original data of regional power grid marketing, wherein the original data comprises user behavior data, marketing activity data, geographic information data and timestamp data; a spatio-temporal graph construction module for constructing a dynamic spatio-temporal graph based on the original data, wherein the nodes of the dynamic spatio-temporal graph represent user groups, marketing events and device states, and the edges of the dynamic spatio-temporal graph represent business relationships and spatio-temporal proximity relationships between nodes; a federated training aggregation module for local training based on the dynamic spatio-temporal graph in each region, generating model parameters, and uploading the model parameters to a central server, wherein the central server aggregates the received model parameters to obtain a global model; a deep feature extraction module for extracting features of the dynamic spatio-temporal graph using the global model to generate a deep distribution feature vector; an entropy feature calculation module for calculating multi-scale spatio-temporal entropy of the deep distribution feature vector to generate a multi-scale spatio-temporal entropy feature set; a comparison library construction and update module for constructing and updating a distribution feature comparison library containing normal business state statistical characteristics based on the multi-scale spatio-temporal entropy feature set; and a risk assessment and early warning module for risk assessment of the current business state based on the distribution feature comparison library to generate a risk warning.
[0017] Compared with the prior art, the application has the following advantages:
[0018] 1. By combining the federated learning mechanism with the dynamic spatio-temporal graph model, the application realizes collaborative modeling and global feature learning of regional power grid marketing data without the need for centralized original data. It effectively solves the contradiction between data privacy protection and global information sharing, and by learning rich spatio-temporal dynamic relationships locally and aggregating model parameters, a unified model reflecting the overall network business state is constructed, which improves the generalization ability and accuracy of the risk assessment model compared with isolated regional analysis.
[0019] 2. The application combines deep feature extraction with multi-scale spatio-temporal entropy calculation to realize deep and multi-dimensional quantification of business state uncertainty. The deep distribution feature vector extracted by the graph neural network captures the potential and non-linear correlation patterns in the data, and the multi-scale spatio-temporal entropy measures the stability of these patterns from different spatio-temporal granularities. This combination enables the identification of early, complex and cross-regional risk signs that are difficult to discover by traditional single-scale or surface-based statistical analysis methods, enhancing the forward-looking and refinement of risk assessment.
[0020] 3、The application introduces an adaptive updating mechanism based on reinforcement learning, and constructs a dynamic distribution feature comparison library that can be self-optimized. The comparison library can continuously adjust the normal business state benchmark in its internal according to the actual feedback effect of risk early warning. This closed-loop learning capability can automatically adapt to the long-term evolution of the power grid marketing environment and the drift of the business mode, avoiding the performance degradation of the traditional static comparison library due to the data timeliness problem, and ensuring the long-term robustness and reliability of the risk assessment system.
[0021] Other features and advantages of the present application will be set forth in the following description, and in part will be apparent from the description, or can be learned by practice of the present application. The objects and other advantages of the present application will be realized and attained by the structure particularly pointed out in the written description and claims thereof as well as the appended drawings. BRIEF DESCRIPTION OF DRAWINGS
[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or the prior art description. Obviously, the drawings in the following description are some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor on the basis of these drawings.
[0023] Figure 1 is a flowchart of a power grid marketing data distribution feature comparison library construction method according to an embodiment of the present application.
[0024] Figure 2 is a comparison diagram of a federal training aggregation process according to an embodiment of the present application.
[0025] Figure 3 is a multi-scale spatio-temporal entropy feature set difference thermodynamic diagram according to an embodiment of the present application.
[0026] Figure 4 is a structural schematic diagram of a power grid marketing data distribution feature comparison library construction system according to an embodiment of the present application. DETAILED DESCRIPTION
[0027] In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the following will combine the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are some of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the protection scope of the present application.
[0028] REFERENCE Figure 1An embodiment of the present application proposes a method for constructing a power grid marketing data distribution feature comparison library, which adopts a technical solution combining dynamic spatiotemporal graph construction, federated learning, multi-scale spatiotemporal entropy calculation and adaptive updating, and can construct a multi-dimensional feature comparison library that can be adaptively optimized while protecting data privacy, thereby improving the accuracy and forward-looking nature of power grid marketing business risk assessment.
[0029] The method of the embodiment specifically includes:
[0030] Obtaining original data of regional power grid marketing, wherein the original data includes user behavior data, marketing activity data, geographic information data and timestamp data;
[0031] Constructing a dynamic spatiotemporal graph based on the original data, wherein the nodes of the dynamic spatiotemporal graph represent user groups, marketing events and device states, and the edges of the dynamic spatiotemporal graph represent business relationships and spatiotemporal proximity relationships between nodes;
[0032] Performing local training based on the dynamic spatiotemporal graph in each region to generate model parameters, and uploading the model parameters to a central server, wherein the central server aggregates the received model parameters to obtain a global model;
[0033] Using the global model to perform feature extraction on the dynamic spatiotemporal graph to generate a deep distribution feature vector;
[0034] Performing multi-scale spatiotemporal entropy calculation on the deep distribution feature vector to generate a multi-scale spatiotemporal entropy feature set;
[0035] Based on the multi-scale spatiotemporal entropy feature set, constructing and updating a distribution feature comparison library containing normal business state statistical characteristics;
[0036] Based on the distribution feature comparison library, performing risk assessment on the current business state to generate a risk warning.
[0037] Specifically, through multi-stage and multi-technology collaborative processing, the original and scattered power grid marketing data is transformed into a risk assessment benchmark that can accurately represent and adaptively update. Using dynamic spatio-temporal graph construction technology, the original multi-source heterogeneous data is transformed into a network structure that can reflect the spatio-temporal dynamic correlation between business entities. Combined with the federated learning mechanism, under the premise of protecting the privacy of regional data, through distributed local training and centralized parameter aggregation, a graph neural network global model that can capture global data patterns is learned and constructed. Using this global model, a deep distribution feature vector that encodes the deep probability distribution of the business state is extracted from the dynamic spatio-temporal graph. A multi-scale spatio-temporal entropy calculation method is introduced to further refine a multi-scale spatio-temporal entropy feature set that can quantify business uncertainty at different spatio-temporal granularities from the deep feature. Based on this feature set, a distribution feature comparison library containing normal business state statistical characteristics is constructed and continuously updated with the help of a reinforcement learning feedback mechanism. By comparing the features of the current business state with the benchmarks of the corresponding scenarios in the library, accurate assessment and early warning of business risks are achieved. The entire process forms a closed loop from data modeling, distributed learning, multi-dimensional feature extraction to adaptive comparison, achieving deep insight and dynamic monitoring of complex power grid marketing business states.
[0038] Optionally, the constructing a dynamic spatio-temporal graph based on the original data comprises:
[0039] The original data is regionally divided to obtain local data of each region;
[0040] Specifically, the original data of each regional power grid marketing is regionally divided, and the division is based on administrative division or power grid power supply range, so that the global data is decomposed into local data of multiple regions, which lays a foundation for distributed processing and privacy protection.
[0041] The local data of each region is abstracted into nodes and edges to obtain an initial graph structure containing nodes and edges;
[0042] Specifically, the local data of each region is abstracted and processed to construct an initial graph structure. In this structure, entities in the data, such as user groups with specific power consumption patterns, ongoing marketing events, and related device states, are defined as nodes of the graph. The association between nodes, such as the business relationship of user groups participating in marketing events or the proximity relationship of different devices in geographical location, is defined as the edge connecting the nodes. In this way, discrete data points are organized into an initial graph structure with topological relationships.
[0043] A time window and a spatial distance window are defined, and the relationship between nodes and edges is dynamically updated based on the time window and the spatial distance window to generate a dynamic spatio-temporal graph.
[0044] Specifically, in order to make the graph structure reflect the dynamic evolution process of the business state, the method further defines a time window and a spatial distance window. The time window is a division of the time dimension, for example, in units of hours or days; the spatial distance window is a division of the geographic dimension, for example, in the range of a transformer area or a power supply area. Based on the two windows, the edges of the initial graph structure are dynamically updated to generate a dynamic space-time graph. The existence or nonexistence of the edge or its weight will change according to whether the relationship between the nodes occurs within the current time window and the spatial distance window. For example, only when the abnormal power consumption behaviors of the two user groups are within the same time window and the geographic distance is less than the spatial distance window threshold, the edge between them will be activated or enhanced. The dynamic updating process is realized by the following rules:
[0045] ;
[0046] wherein, represents whether there is an edge between the node and the node at the time point , and the value is 1 indicating the existence. represents whether there is a business relationship or a space-time proximity relationship between the node and the node at a certain time point in the past . is the current time, is the preset time window length. represents the spatial distance between the node and the node , which can be calculated according to the geographic information data thereof. is the preset spatial distance window threshold. By applying this rule in each time step, the connection relationship of the graph constantly evolves over time, and the dynamic space-time graph finally formed can accurately capture the complex dynamic correlation of the power grid marketing data in the time and space dimensions.
[0047] Optionally, the feature extraction of the dynamic space-time graph using the global model comprises:
[0048] deploying a unified architecture of a graph neural network model in each region;
[0049] Specifically, a graph neural network model with unified architecture is deployed in each region of the power grid. The graph neural network is a deep learning model specially used for processing graph structure data, and the core idea is to learn the representation of nodes by transmitting and aggregating information between nodes. Deploying a unified architecture means that the graph neural network model used in each region is consistent in terms of the number of layers, the number of neurons in each layer, and the activation function, etc., which is a prerequisite for effectively aggregating the model parameters trained by each region to form a global model.
[0050] The dynamic spatio-temporal graph is input into a graph neural network model for local training to learn the relationships between nodes and edges, generating model parameters;
[0051] Specifically, after model deployment, the generated dynamic spatio-temporal graph is used as input for local training on the local server of each region. During the training process, the graph neural network model iteratively updates the feature representation of each node through its built-in neighborhood aggregation mechanism. The process is implemented by the formula:
[0052] ;
[0053] where, is the feature representation of node at the th layer. is the feature representation of node 's neighbor nodes at the th layer, denotes the set of neighbor nodes of node . is the trainable weight matrix at the th layer, which learns how to transform the features of neighbor nodes during training. denotes the aggregation function, such as summation or averaging, used to gather information from all neighbor nodes. is a nonlinear activation function used to increase the expressive power of the model. Through the backpropagation algorithm, the weight matrix is constantly optimized, and the model can learn the implicit relationships between nodes and edges in the dynamic spatio-temporal graph. After training, the optimized weight matrix obtained is the model parameter for the region.
[0054] The global model is used to perform forward propagation calculations on the real-time acquired dynamic spatio-temporal graph, outputting a deep distribution feature vector that encodes the underlying probability distribution of the business state.
[0055] Specifically, after the central server obtains the global model by aggregating the model parameters uploaded by each region, the global model can be used for feature extraction on the real-time acquired dynamic spatio-temporal graph. This is accomplished by performing a forward propagation calculation on the input new graph. In the forward propagation, the data of the real-time dynamic spatio-temporal graph flows through each layer of the global model, and each layer uses the already solidified and integrated global model parameters to transform and update the feature representation of the nodes without adjusting the parameters. When the calculation is finally completed, the model outputs a high-dimensional deep distribution feature vector. This vector is not a simple statistic of the original data, but a deep and abstract representation of the current business state under multi-source data fusion and spatio-temporal evolution, which encodes the underlying probability distribution rules behind the business state. For example, Figure 2As shown, the federal graph neural network demonstrates advantages in model accuracy convergence compared to other training methods, which intuitively supports the innovation of federated learning.
[0056] Optionally, the multi-scale spatio-temporal entropy calculation on the deep distribution feature vector comprises:
[0057] A plurality of time scales and space scales are defined, and the time scales and space scales are combined to form a multi-scale combination.
[0058] Specifically, a plurality of time scales and space scales are defined, which are different observation perspectives for analyzing business state uncertainty. For example, the time scales can be defined as hourly and daily, and the space scales can be defined as substation level and regional level. By combining these different granularity time scales and space scales in pairs, a set of multi-scale combinations is formed, such as (hourly, substation level), (hourly, regional level), (daily, substation level), and (daily, regional level).
[0059] The deep distribution feature vector is dimensionally reduced and probability distribution is estimated under each multi-scale combination to obtain a probability distribution.
[0060] Specifically, for each multi-scale combination, the input deep distribution feature vector is processed. Since the deep distribution feature vector usually has high dimension, direct probability estimation will result in complex calculation and sparse results, so dimension reduction is needed. The purpose of dimension reduction is to map the high-dimensional feature vector to a low-dimensional space suitable for the current scale combination, retaining the main information. After dimension reduction, the processed feature point set is estimated in the low-dimensional space to generate a probability distribution that can describe the business state distribution characteristics under the scale. This process usually uses a non-parametric method such as kernel density estimation to avoid making strong prior assumptions about the data distribution.
[0061] Based on the probability distribution, the spatio-temporal entropy value is calculated, and the spatio-temporal entropy values under all multi-scale combinations are integrated to generate a multi-scale spatio-temporal entropy feature set.
[0062] Specifically, after obtaining the probability distribution under each multi-scale combination, the corresponding spatio-temporal entropy value can be calculated based on it. Spatio-temporal entropy is an index that measures the degree of uncertainty or chaos under a certain spatio-temporal scale, and the calculation can be based on the principle of information entropy. For a given probability distribution, the spatio-temporal entropy value is calculated as follows:
[0063] ;
[0064] wherein, represents the calculated spatio-temporal entropy value. represents the probability distribution function, which describes the business state Probability density of occurrence. represents the integral over all possible states . The result of this integral calculation is a scalar value that quantifies the overall uncertainty of the business state at the current scale. This calculation is repeated for the probability distribution at all multiscale combinations to obtain a series of spatiotemporal entropy values. Finally, these spatiotemporal entropy values calculated at different spatiotemporal scale combinations are integrated to form a vector or set, which is the final generated multiscale spatiotemporal entropy feature set. As shown in FIG. 6, the distribution of entropy value differences of abnormal business states at different spatiotemporal scale combinations is demonstrated, highlighting the role of multiscale in identifying abnormalities and risks. Figure 3
[0065] Optionally, the defining the plurality of time scales and spatial scales comprises:
[0066] defining hour-level and day-level granularity as time scales, and defining district-level and region-level granularity as spatial scales;
[0067] Specifically, in order to define time scales, the timestamp data contained in the original data is utilized. The hour-level granularity is defined as a time scale, requiring that when performing feature analysis, the data generated within the same hour on the continuous time axis is regarded as an analysis unit, which is used to capture the short-term fluctuations of the business state. The day-level granularity is defined as another time scale, which aggregates the data within 24 hours into an analysis unit, which is used to observe the daily trends and periodic changes of the business state. In order to define spatial scales, the geographic information data in the original data is utilized. The district-level granularity is defined as a spatial scale, corresponding to the geographic range served by one or more distribution transformers in the power grid, which is the smallest unit of power grid marketing management, and is used for micro-level spatial analysis. The region-level granularity is defined as another more macro spatial scale, which is composed of multiple districts, usually corresponding to an administrative division or a larger power supply area, and is used for macro-level spatial analysis.
[0068] The time scales and spatial scales are combined to obtain multiscale combinations, wherein the multiscale combinations are used to realize the uncertainty measurement of the business state from micro to macro and from short-term to long-term.
[0069] Specifically, after defining the time scales and spatial scales respectively, they are combined to obtain multiscale combinations for subsequent entropy calculation. The two time scales of hour-level and day-level are paired with the two spatial scales of district-level and region-level, thereby forming a set containing four different analysis perspectives, i.e., the combination of hour-level and district-level, the combination of hour-level and region-level, the combination of day-level and district-level, and the combination of day-level and region-level. Each multiscale combination provides a unique analysis framework for subsequent multiscale spatiotemporal entropy calculation, enabling the uncertainty measurement of the deep distribution feature vector at different spatiotemporal resolutions.
[0070] Optionally, the construction and updating of the distribution feature comparison library containing statistical characteristics of normal business status includes:
[0071] Obtain multi-scale spatiotemporal entropy feature sets under historical normal business conditions, and obtain scene labels corresponding to the multi-scale spatiotemporal entropy feature sets;
[0072] Specifically, multi-scale spatiotemporal entropy feature sets are obtained under historical normal business conditions. These feature sets are obtained by processing historical power grid marketing data that has been confirmed as normal through steps such as dynamic spatiotemporal graph construction, global model feature extraction, and multi-scale spatiotemporal entropy calculation. Simultaneously, scene labels corresponding to each multi-scale spatiotemporal entropy feature set need to be obtained. Scene labels are qualitative descriptions of the business environment at that time, such as "peak electricity consumption on weekdays," "holiday promotional activities," or "impact of severe weather," providing necessary contextual information for the feature data.
[0073] Based on the scene labels, the multi-scale spatiotemporal entropy feature set is grouped, and the mean distribution and confidence interval of each group at each scale are calculated.
[0074] Specifically, after obtaining the feature sets labeled with scene tags, all multi-scale spatiotemporal entropy feature sets are grouped according to the scene tags to ensure that the feature sets within each group come from the same business scenario. Then, for each group, statistical properties are calculated. Since the multi-scale spatiotemporal entropy feature set is a vector, where each component corresponds to a specific spatiotemporal scale, the calculation is also performed component-wise. For each component, the mean of all samples within the group is calculated on that component, forming the mean distribution of the scenario at that scale. Simultaneously, the standard deviation is calculated, and a confidence interval is set based on this, representing the reasonable fluctuation range of the entropy value at that scale under normal conditions. This process can be expressed as: for a specific scenario... and scale Its mean distribution and confidence interval The calculation is as follows:
[0075] ;
[0076] ;
[0077] in, It is a scene The total number of samples. It is the first A sample in the scene and scale The spacetime entropy value below. That is the corresponding standard deviation. is a coefficient selected according to a required confidence level.
[0078] store the mapping relationship of the scene label, the spatio-temporal scale, the mean distribution and the confidence interval, and generate a distribution feature comparison library.
[0079] Specifically, after the calculation is completed, the mapping relationship of the scene label, the spatio-temporal scale, the mean distribution and the confidence interval is stored in a structured manner, and finally a distribution feature comparison library available for query is generated.
[0080] Optionally, the constructing and updating the distribution feature comparison library containing the statistical characteristics of the normal business state further comprises:
[0081] obtaining the feedback of the business experts on the risk early warning and the automatically confirmed stable operation data to generate a reward signal;
[0082] Specifically, the feedback information on the generated risk early warning is continuously obtained. These feedback information sources are diverse, including manual confirmation of business experts, that is, experts judge the accuracy of the early warning according to their professional knowledge; and the automatically confirmed stable operation data, that is, if the relevant business indicators remain in a stable state in a subsequent period of time after the early warning is issued, the early warning may be considered as a false positive. These feedback information is converted into a quantitative reward signal. For example, an early warning confirmed by an expert as accurate will generate a positive reward signal, and an early warning confirmed as a false alarm will generate a negative reward signal.
[0083] introducing a reinforcement learning mechanism to adjust the mean distribution and the confidence interval in the distribution feature comparison library according to the reward signal;
[0084] Specifically, after the reward signal is obtained, a reinforcement learning mechanism is introduced to adjust the statistical characteristics in the distribution feature comparison library according to the reward signal. Reinforcement learning is a machine learning method that learns to maximize cumulative rewards by interacting with the environment. In the present application, the "environment" is the business of power grid marketing, the "agent" is the update of the comparison library, and the "action" is the adjustment of the mean distribution and the confidence interval of a specific scale under a specific scene in the comparison library. When an early warning is confirmed as accurate, it indicates that the current confidence interval may be too wide and fails to effectively capture the anomaly, so the reinforcement learning algorithm will decide to appropriately tighten the confidence interval under the scene and the scale. Conversely, when an early warning is confirmed as a false alarm, it indicates that the current confidence interval may be too narrow and too sensitive, and the algorithm will decide to appropriately relax the confidence interval. The adjustment of the mean distribution is based on the rolling update of the newly confirmed normal sample data. This adjustment process is formalized by the update rule:
[0085] ;
[0086] ;
[0087] wherein, and are the updated and pre-updated mean distribution respectively. is the spatio-temporal entropy value of the newly confirmed normal sample. is the learning rate, which controls the degree of influence of the new sample on the mean. and are the updated and pre-updated confidence interval coefficient respectively. is the reward signal obtained, is another learning rate, which controls the adjustment range of the reward signal on the confidence interval width. Through this process, both the mean distribution and the confidence interval are adjusted.
[0088] Based on the adjusted mean distribution and confidence interval, the mapping relationship is updated.
[0089] Specifically, based on the adjusted mean distribution and confidence interval, the mapping relationship stored in the distribution feature comparison library is updated. This means that the content of the comparison library is no longer fixed, but can be continuously and automatically optimized according to the actual running effect.
[0090] Optionally, the risk assessment of the current business state comprises:
[0091] Real-time acquisition of current business environment parameters, and generation of current business scene labels according to business environment parameters;
[0092] Specifically, real-time acquisition of current business environment parameters, which include but are not limited to current time, date attribute, type of ongoing marketing activities, weather conditions, etc. According to a preset rule or a classification model, these real-time acquired business environment parameters are comprehensively analyzed to generate current business scene labels that can represent the current macro business background, such as "weekday off-peak hours" or "holiday large-scale promotion activities".
[0093] According to the current business scene label, the corresponding mean distribution and confidence interval are matched and extracted from the distribution feature comparison library;
[0094] Specifically, after generating the current business scene label, use this label as an index to match and query in the already constructed distribution feature comparison library, and accurately extract the mean distribution and confidence interval corresponding to the current scene. This step ensures that the comparison is carried out on a homogeneous and comparable benchmark.
[0095] Calculate the difference between the multi-scale spatio-temporal entropy feature set of the current business state and the mean distribution;
[0096] Specifically, the difference between the multi-scale spatio-temporal entropy feature set of the current service state and the mean distribution extracted from the library is calculated. The difference here is a comprehensive measure that quantifies the overall degree of deviation of the uncertainty pattern of the current state from the normal pattern.
[0097] The difference is compared with a preset threshold to determine whether the key components of the multi-scale spatio-temporal entropy feature set fall outside the confidence interval. If yes, it is determined that the service is abnormal, and if no, the service is normal.
[0098] Specifically, after obtaining the difference, a double judgment logic is performed. On the one hand, the overall difference calculated is compared with a preset threshold for rapid screening of significant global deviation. On the other hand, more importantly, it is judged whether each key component in the current multi-scale spatio-temporal entropy feature set, i.e., the entropy value at each spatio-temporal scale, falls outside the corresponding confidence interval. If the entropy value of any key component exceeds the normal fluctuation range, the current service state is determined to be abnormal; otherwise, if all components are within the confidence interval, it is determined to be normal.
[0099] According to the size of the difference and the degree of exceeding the confidence interval, a risk level is divided, and a risk warning is generated.
[0100] Specifically, in the case of determining that the service is abnormal, a binary result is not simply output. According to the size of the difference and the degree of exceeding the confidence interval of the key components, a risk level is divided. For example, a local anomaly slightly exceeding the confidence interval may be classified as low risk, while a global anomaly greatly exceeding the confidence interval in multiple key scales will be classified as high risk. Based on this risk level division, a risk warning containing the specific risk level and possible abnormal dimensions is finally generated for reference and decision-making by business personnel.
[0101] Optionally, the calculation of the difference between the multi-scale spatio-temporal entropy feature set of the current service state and the mean distribution comprises:
[0102] The multi-scale spatio-temporal entropy feature set and the mean distribution are both regarded as probability distributions.
[0103] Specifically, the multi-scale spatio-temporal entropy feature set under the current service state, a vector composed of multiple components, is normalized so that the sum of all components is 1, thereby forming a probability distribution representing the current state. Similarly, the mean distribution vector corresponding to the current scenario extracted from the distribution feature comparison library is also normalized to form a reference probability distribution representing the normal state.
[0104] The distance between the two probability distributions is calculated using a probability distance measurement method to obtain the difference.
[0105] Specifically, after obtaining two probability distributions, a probabilistic distance metric is used to calculate the distance between them; this distance represents the desired difference. A typical probabilistic distance metric is the Kullback-Leibler divergence, also known as relative entropy. It effectively measures the degree of difference between one probability distribution and another. Its calculation formula is:
[0106] ;
[0107] in, The final calculated difference value is a non-negative scalar. The probability distribution representing the current business state is in the th order. The probability value at each spatiotemporal scale is obtained from the components of the normalized multi-scale spatiotemporal entropy feature set. The baseline probability distribution representing the normal business state is at the th The probability value at each spatiotemporal scale is obtained from the components of the normalized mean distribution. Represents all spatiotemporal scales Perform summation.
[0108] The difference is used to quantify the overall degree to which the current business status deviates from the normal state.
[0109] Specifically, the calculated difference value quantifies the amount of information required to transform the probability distribution of the normal state into the probability distribution of the current state. The larger the value, the more severe the overall deviation of the current state from the normal state.
[0110] Based on the same inventive concept, such as Figure 4 As shown, the present invention also provides a system for constructing a power grid marketing data distribution feature comparison database, the system comprising:
[0111] The data acquisition module is used to acquire raw data of power grid marketing in various regions, wherein the raw data includes user behavior data, marketing activity data, geographic information data and timestamp data;
[0112] A spatiotemporal graph construction module is used to construct a dynamic spatiotemporal graph based on the original data. The nodes of the dynamic spatiotemporal graph represent user groups, marketing events, and device status, and the edges of the dynamic spatiotemporal graph represent business relationships and spatiotemporal proximity relationships between nodes.
[0113] The federated training aggregation module is used to perform local training in each region based on the dynamic spatiotemporal graph, generate model parameters, and upload the model parameters to the central server. The central server aggregates the received model parameters to obtain a global model.
[0114] a deep feature extraction module configured to perform feature extraction on the dynamic spatio-temporal graph using the global model to generate a deep distribution feature vector;
[0115] an entropy feature calculation module configured to perform multi-scale spatio-temporal entropy calculation on the deep distribution feature vector to generate a multi-scale spatio-temporal entropy feature set;
[0116] a comparison library construction and update module configured to construct and update a distribution feature comparison library containing statistical characteristics of normal business states based on the multi-scale spatio-temporal entropy feature set;
[0117] a risk assessment and early warning module configured to perform risk assessment on a current business state based on the distribution feature comparison library to generate a risk early warning.
[0118] To verify the feasibility of the application in implementation, the application is applied to marketing business risk monitoring of a company. The company has multiple power supply areas under its jurisdiction, and faces multiple challenges such as difficulty in evaluating the effectiveness of marketing activities, concealment of electricity stealing behavior, and untimely equipment failure warning. The traditional method relies on static statistics and manual experience, and is difficult to cope with massive, multi-source and dynamically changing marketing data, resulting in lagging risk identification and high false alarm rate. The company hopes to use the application to construct a comparison library that can deeply learn the distribution features of data and adapt to changes in business scenarios, and improve the accuracy and forward-looking nature of risk early warning.
[0119] In this embodiment, the company first collected marketing raw data of two regions A and B under its jurisdiction in the third quarter of a certain year, including user electricity consumption information, marketing activity records, power grid equipment status and geographic information, etc. The data is first divided into regions, and a dynamic spatio-temporal graph is constructed based on the local data of each region. In the graph, user groups with specific power consumption patterns, marketing activities, and area equipment are abstracted as nodes, and the business relationships and spatio-temporal proximity relationships between them are defined as edges. For example, it is captured that in a certain industrial park in region A, multiple user groups in two area equipment appear synchronous sharp reduction of power consumption in the same hour, and the graph connection relationship between them is dynamically updated, laying a foundation for subsequent correlation analysis.
[0120] Subsequently, a unified architecture of graph neural network model is deployed on the local servers of regions A and B, and local training is performed using the respective dynamic spatio-temporal graphs. After training, the model parameters generated by each are uploaded to the provincial central server for aggregation, forming a graph neural network global model with a global view. The global model is used to extract features from real-time dynamic spatio-temporal graphs. For example, at 10:00 am on a certain day, the forward propagation calculation is performed on the real-time business state graph of region A, and a high-dimensional deep distribution feature vector is output, which encodes the potential probability distribution law of the whole area business state at that time.
[0121] Then, the deep distribution feature vector is calculated by multi-scale spatio-temporal entropy. The time scale and space scale are defined, and four scale combinations are formed. By dimensionality reduction and probability distribution estimation of the feature vector under each scale combination, four spatio-temporal entropy values are calculated, and the multi-scale spatio-temporal entropy feature set is formed after integration. This feature set quantifies the uncertainty of the current business state under different spatio-temporal granularity.
[0122] Based on the historical normal operation data, a distribution feature comparison library is constructed. A large number of historical multi-scale spatio-temporal entropy feature sets confirmed to be normal are obtained, and they are labeled with scene tags such as "peak electricity on weekdays", "holiday promotion activities" and the like. For each scene, the mean distribution and confidence interval of the entropy values of each scale are calculated. For example, in the "peak electricity on weekdays" scene, the entropy value of the (hour level, district level) scale is 0.85, and the confidence interval is [0.75, 0.95]. These statistical characteristics are stored in the comparison library as a benchmark for risk assessment.
[0123] The adaptive updating mechanism of the application is also verified. On the day of the gaze, an abnormal warning is issued for the B area "night low valley electricity" scene, indicating that the entropy value of a certain area is too high. It is confirmed by business experts that a newly built factory in the area is conducting equipment debugging at night, which is normal business. This feedback is converted into a negative reward signal. The reinforcement learning module adjusts the confidence interval of the corresponding scale in this scene from [0.60, 0.80] to [0.58, 0.83] according to the signal, thereby reducing the sensitivity to similar normal fluctuations and improving the adaptability of the comparison library.
[0124] In the real-time risk assessment stage, its accuracy is shown. At 14:30 on a certain day, the current business scene is "non-peak period on weekdays". The multi-scale spatio-temporal entropy feature set of the current state is calculated, and the mean distribution and confidence interval of the corresponding scene are extracted from the comparison library. By calculating the KL divergence, it is found that the overall difference between the current state and the normal mean distribution is large. Further analysis shows that the entropy value of the (hour level, district level) scale is 1.12, which is significantly higher than the confidence interval of this scale [0.70, 0.90]. Therefore, it is determined that the business is abnormal, and a high-risk warning is generated, indicating that the risk may be caused by short-term and sharp fluctuations in the micro spatial scale, providing a clear direction for business personnel to investigate local electricity theft or equipment failure.
[0125] It should be noted that the electrical connection between the above-mentioned units does not necessarily mean direct connection, indirect connection mode, as long as the purpose of the application is achieved, which can be applied to the embodiments of the application. The above described is only an exemplary embodiment of the application, which cannot limit the scope of the application.
[0126] intended to encompass any and all embodiments of the application with equivalents as would be ascertained by those skilled in the art to which the application pertains. Other embodiments of the application will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
Claims
1. A method for constructing a comparison database of power grid marketing data distribution characteristics, characterized in that, The method includes: Obtain raw data on power grid marketing in various regions, including user behavior data, marketing activity data, geographic information data, and timestamp data; A dynamic spatiotemporal graph is constructed based on the original data. The nodes of the dynamic spatiotemporal graph represent user groups, marketing events, and device status, and the edges of the dynamic spatiotemporal graph represent business relationships and spatiotemporal proximity relationships between nodes. Local training is performed in each region based on the dynamic spatiotemporal graph to generate model parameters, which are then uploaded to a central server. The central server aggregates the received model parameters to obtain a global model. The local training in each region based on the dynamic spatiotemporal graph includes: deploying a graph neural network model with a unified architecture in each region; inputting the dynamic spatiotemporal graph into the graph neural network model for local training to learn the relationship between nodes and edges and generate model parameters. The global model is used to extract features from the dynamic spatiotemporal graph to generate a depth distribution feature vector. The step of using the global model to extract features from the dynamic spatiotemporal graph includes: using the global model to perform forward propagation calculation on the dynamic spatiotemporal graph used to build the comparison library, and outputting a depth distribution feature vector, wherein the depth distribution feature vector encodes the potential probability distribution of the business state. The depth distribution feature vector is subjected to multi-scale spatiotemporal entropy calculation to generate a multi-scale spatiotemporal entropy feature set. The multi-scale spatiotemporal entropy calculation of the depth distribution feature vector includes: defining multiple time scales and spatial scales, combining the time scales and spatial scales to form a multi-scale combination; performing dimensionality reduction and probability distribution estimation on the depth distribution feature vector under each multi-scale combination to obtain a probability distribution; calculating the spatiotemporal entropy value based on the probability distribution; and integrating the spatiotemporal entropy values under all multi-scale combinations to generate a multi-scale spatiotemporal entropy feature set. Based on the multi-scale spatiotemporal entropy feature set, a distribution feature comparison library containing statistical characteristics of normal business states is constructed and updated. This construction and updating of the distribution feature comparison library includes: acquiring a multi-scale spatiotemporal entropy feature set under historical normal business states, and acquiring scene labels corresponding to the multi-scale spatiotemporal entropy feature set; grouping the multi-scale spatiotemporal entropy feature set according to the scene labels, and calculating the mean distribution and confidence interval of each group at each scale; storing the mapping relationship between the scene labels, spatiotemporal scale, mean distribution, and confidence interval, and generating the distribution feature comparison library. The construction and updating of the distribution feature comparison library also includes: acquiring stable operating data from business expert feedback and automatic confirmation regarding risk warnings, and generating reward signals; introducing a reinforcement learning mechanism to adjust the mean distribution and confidence interval in the distribution feature comparison library according to the reward signals; and updating the mapping relationship based on the adjusted mean distribution and confidence interval. Based on the aforementioned distribution feature comparison library, a risk assessment is performed on the current business status, and a risk warning is generated. The definition of multiple time and spatial scales includes: defining hourly and daily granularity as time scales, and defining district and regional granularity as spatial scales; combining the time and spatial scales to obtain a multi-scale combination, wherein the multi-scale combination is used to measure the uncertainty of business status from micro to macro and from short to long term.
2. The method for constructing a power grid marketing data distribution feature comparison database according to claim 1, characterized in that, The construction of the dynamic spatiotemporal graph based on the original data includes: The original data is divided into regions to obtain local data for each region; The local data of each region is abstracted into nodes and edges to obtain an initial graph structure containing nodes and edges; Define a time window and a spatial distance window, and dynamically update the relationship between nodes and edges based on the time window and the spatial distance window to generate a dynamic spatiotemporal graph.
3. The method for constructing a power grid marketing data distribution feature comparison database according to claim 1, characterized in that, The risk assessment of the current business status includes: Real-time acquisition of current business environment parameters, and generation of current business scenario tags based on business environment parameters; Based on the current business scenario label, match and extract the corresponding mean distribution and confidence interval from the distribution feature comparison library; Calculate the difference between the multi-scale spatiotemporal entropy feature set and the mean distribution of the current business status; The difference is compared with a preset threshold to determine whether the key components of the multi-scale spatiotemporal entropy feature set fall outside the confidence interval. If yes, the service is deemed abnormal; otherwise, the service is deemed normal. Risk levels are classified based on the magnitude of the difference and the degree to which it exceeds the confidence interval, and risk warnings are generated.
4. The method for constructing a power grid marketing data distribution feature comparison database according to claim 3, characterized in that, The difference between the multi-scale spatiotemporal entropy feature set used to calculate the current business state and the mean distribution includes: Both the multi-scale spatiotemporal entropy feature set and the mean distribution are considered as probability distributions. The distance between two probability distributions is calculated using a probabilistic distance metric to obtain the difference. The difference is used to quantify the overall degree to which the current business status deviates from the normal state.
5. A system for constructing a comparison database of power grid marketing data distribution characteristics, characterized in that, The system is used for constructing a power grid marketing data distribution feature comparison database as described in any one of claims 1-4, the system comprising: The data acquisition module is used to acquire raw data of power grid marketing in various regions, wherein the raw data includes user behavior data, marketing activity data, geographic information data and timestamp data; A spatiotemporal graph construction module is used to construct a dynamic spatiotemporal graph based on the original data. The nodes of the dynamic spatiotemporal graph represent user groups, marketing events, and device status, and the edges of the dynamic spatiotemporal graph represent business relationships and spatiotemporal proximity relationships between nodes. The federated training aggregation module is used to perform local training in each region based on the dynamic spatiotemporal graph, generate model parameters, and upload the model parameters to the central server. The central server aggregates the received model parameters to obtain a global model. The local training in each region based on the dynamic spatiotemporal graph includes: deploying a graph neural network model with a unified architecture in each region; inputting the dynamic spatiotemporal graph into the graph neural network model for local training, learning the relationship between nodes and edges, and generating model parameters. The deep feature extraction module is used to extract features from the dynamic spatiotemporal graph using the global model and generate a deep distribution feature vector. The step of extracting features from the dynamic spatiotemporal graph using the global model includes: using the global model to perform forward propagation calculation on the dynamic spatiotemporal graph used to build the comparison library and outputting a deep distribution feature vector, wherein the deep distribution feature vector encodes the potential probability distribution of the business state. The entropy feature calculation module is used to perform multi-scale spatiotemporal entropy calculation on the depth distribution feature vector to generate a multi-scale spatiotemporal entropy feature set. The multi-scale spatiotemporal entropy calculation of the depth distribution feature vector includes: defining multiple time scales and spatial scales; combining the time scales and spatial scales to form a multi-scale combination; performing dimensionality reduction and probability distribution estimation on the depth distribution feature vector under each multi-scale combination to obtain a probability distribution; calculating the spatiotemporal entropy value based on the probability distribution; and integrating the spatiotemporal entropy values under all multi-scale combinations to generate a multi-scale spatiotemporal entropy feature set. The comparison library construction and update module, based on the multi-scale spatiotemporal entropy feature set, constructs and updates a distribution feature comparison library containing statistical characteristics of normal business states. This construction and update includes: acquiring a multi-scale spatiotemporal entropy feature set under historical normal business states, and acquiring scene labels corresponding to the multi-scale spatiotemporal entropy feature set; grouping the multi-scale spatiotemporal entropy feature set according to the scene labels, calculating the mean distribution and confidence interval for each group at each scale; storing the mapping relationship between the scene labels, spatiotemporal scale, mean distribution, and confidence interval, and generating a distribution feature comparison library. The construction and update of the distribution feature comparison library containing statistical characteristics of normal business states further includes: acquiring stable operating data from business expert feedback and automatic confirmation of risk warnings, generating reward signals; introducing a reinforcement learning mechanism to adjust the mean distribution and confidence interval in the distribution feature comparison library according to the reward signals; and updating the mapping relationship based on the adjusted mean distribution and confidence interval. The risk assessment and early warning module is used to assess the risk of the current business status based on the distribution feature comparison library and generate risk warnings. The definition of multiple time and spatial scales includes: defining hourly and daily granularity as time scales, and defining district and regional granularity as spatial scales; combining the time and spatial scales to obtain a multi-scale combination, wherein the multi-scale combination is used to measure the uncertainty of business status from micro to macro and from short to long term.
Citation Information
Patent Citations
Student learning behavior trend prediction method and system based on time sequence analysis
CN119378768A
Multi-scene marketing business risk digital monitoring system and method
CN120298036A