Power grid abnormal signal analysis method, system and equipment based on deep association rule and medium
By constructing a power grid abnormal signal analysis method based on deep association rules and using association rule mining and LSTM algorithm to classify power grid abnormal signals, the problem of insufficient recognition and classification performance of traditional methods after distributed energy access is solved, and the power grid can be quickly responded and operated safely and stably.
Patent Information
- Application Number
- CN202510542244.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-28
- Publication Date
- 2025-09-16
AI Technical Summary
Traditional grid regulation abnormal signal classification methods are unable to cope with the complexity of signal characteristics after distributed energy access, resulting in insufficient recognition and classification performance, inability to accurately determine the cause of the fault, and inability to quickly respond to grid abnormalities.
A power grid abnormal signal analysis method based on deep association rules is adopted. By collecting power grid operating parameters and equipment status information, an alarm signal dataset is constructed. The alarm signals are identified and classified using association rule mining algorithm and LSTM algorithm. Single and associated alarm signal classification models are constructed, and processing solutions are matched according to signal types.
It improves the recognition efficiency of abnormal signals in the power grid and the accuracy of fault handling, ensures the stable operation and safety of the power grid, reduces misjudgments and missed judgments, and achieves rapid response and accurate processing.
Smart Images

Figure CN120654050A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology for power systems, and in particular to a method, system, equipment and medium for analyzing abnormal power grid signals based on deep association rules. Background Art
[0002] As the global energy transition progresses, the scale of distributed energy integration in power grids continues to expand year by year. Renewable energy sources such as photovoltaic and wind power are increasingly being used in distribution and transmission networks. However, the intermittent, random, and multi-point distribution of distributed energy sources presents new challenges to traditional power grid operations, particularly in the identification and classification of abnormal regulation signals.
[0003] Traditional methods for classifying abnormal grid control signals rely primarily on rule bases or simple statistical methods, which struggle to cope with the complexity of signal characteristics after the integration of distributed energy resources. For example, a single alarm signal typically has distinct measurement characteristics, but correlated alarm signals, due to their cross-regional and multi-stage propagation characteristics, require a comprehensive analysis combining topological structure and time series information to determine the fault source. Furthermore, due to the large disparity in the probability of various types of faults in actual operation, the distribution of abnormal control signal samples is uneven, and minority class samples are easily overwhelmed by the majority class, causing the model to favor the majority class and reducing the recognition of the minority class. Therefore, the classification performance and reliability of traditional methods are difficult to meet the needs of smart grids. Summary of the Invention
[0004] In view of the above-mentioned existing problems, the present invention provides a power grid abnormal signal analysis method, system, equipment and medium based on deep association rules to solve the problems in the existing technology that are unable to effectively identify and classify complex abnormal signals, unable to accurately determine the true cause of the fault and unable to quickly respond to abnormal conditions in the power grid.
[0005] In order to solve the above technical problems, a power grid abnormal signal analysis method based on deep association rules is proposed, including: Collect operating parameters and equipment status information, and use the collected information to build an alarm signal dataset. Use the association rule mining algorithm to identify alarm signals and divide the dataset to build a single alarm signal classification model to classify single alarm signals. Build a correlated alarm signal classification model, use the LSTM algorithm to classify correlated alarm signals, and display the classified alarm signals in partitions and layers, matching processing solutions according to signal types.
[0006] As a preferred solution of the power grid abnormal signal analysis method based on deep association rules described in the present invention, wherein: the collecting of operating parameters and equipment status information includes obtaining alarm signal data from historical power grid operation records, and collecting operating parameters of distributed energy after distributed energy is connected; The alarm signal data includes timestamp, alarm device, signal strength and fault type; the operating parameters of the distributed energy include reverse current, power generation fluctuation information and access node status; the constructed alarm signal data set includes collected monitoring information and corresponding alarm type.
[0007] As a preferred solution of the power grid abnormal signal analysis method based on deep association rules described in the present invention, wherein: the dividing of the data set includes using an association rule mining algorithm to distinguish single alarm signals from associated alarm signals, and dividing the original data set into a single alarm signal data set and an associated alarm signal data set; The association rule mining algorithm includes using a fast Apriori algorithm to discriminate the alarm signal by support, confidence and lift; The fast Apriori algorithm includes frequent item set generation and pruning and association rule generation and screening; frequent item set generation and pruning includes starting from a single item, expanding to generate candidate item sets of length k, and using the Apriori property to remove candidate item sets with support less than a preset threshold of 0.4%. Candidate item sets are judged to have a small number of occurrences and low correlation with the remaining candidate item sets and are not involved in subsequent calculations. The database is traversed to calculate the support of the candidate item sets, and frequent item sets with support greater than or equal to the threshold of 0.4% are retained until no frequent item sets can be generated; Association rule generation and screening includes generating non-empty subsets A and B for each frequent item set, calculating the confidence of the association rule A→B, setting a confidence threshold, and retaining the rule when the confidence is greater than or equal to the confidence threshold, and outputting all association rules that meet the support and confidence thresholds.
[0008] As a preferred solution of the power grid abnormal signal analysis method based on deep association rules described in the present invention, the fast Apriori algorithm also includes introducing a firefly algorithm for optimization, initializing each alarm signal in the alarm signal data set as an individual firefly, and the brightness represents the support of the alarm signal. The brightness of the firefly individual attracts the behavior of the firefly, and quickly converges to the candidate item set with the highest support. The support threshold is dynamically adjusted, the pruning strategy is optimized, and the size of the candidate item set is reduced. The support calculation formula of the alarm signal is: , in, is the support of the warning signal, is the candidate item set of the alarm signal, is the support function; The firefly algorithm includes expanding from a single item to generate a first-order alarm signal candidate item set with a length of 1, and using the Apriori property, according to the brightness, that is, the support of the alarm signal, the fireflies move to individuals with higher brightness, that is, individuals with support greater than or equal to 10%. The search space size is limited by adjusting the attenuation factor of the luminous intensity and the attractiveness function; The attraction function is expressed as: , in, For attraction, For maximum attraction, is the attraction attenuation factor, is the distance between two fireflies; The firefly algorithm also includes setting a support threshold to 0.4%, removing alarm signal candidate item sets with support less than the threshold, taking alarm signals that meet the minimum support as first-order frequent item sets, and gradually expanding to generate second-order alarm signal candidate item sets with a length of 2; and reducing computational complexity by repeating the firefly optimization process, pruning the second-order candidate item sets, pruning the candidate item sets with support less than the threshold, constructing second-order frequent item sets, and gradually expanding to generate high-order candidate item sets, while repeating the firefly optimization process, pruning the high-order candidate item sets, and retaining item sets with support greater than or equal to the threshold. For abnormal signals, when the confidence is lower than the threshold and there is no associated device, it is determined to be a single alarm signal; when the confidence is greater than the threshold and the lift is greater than 1, and accompanied by the occurrence of an alarm signal, it is determined to be an associated alarm signal.
[0009] As a preferred solution of the power grid abnormal signal analysis method based on deep association rules described in the present invention, wherein: the construction of a single alarm signal classification model includes dividing the single alarm signal data set into a training set, a test set and a cross-validation set, and adopting a decision tree classification algorithm based on a particle swarm optimization algorithm to construct the model; The classification of a single alarm signal includes setting an optimization objective function, initializing the parameters of the particle swarm algorithm and the parameter range of the decision tree, the position of each particle represents the hyperparameter of the decision tree, inputting the single alarm signal data set into the decision tree for training, finding the optimal solution and related fitness values by updating the speed and position of the particles, and re-evaluating the fitness of the particles in each iteration, updating the individual optimal solution and the global optimal solution, outputting the global optimal solution, i.e., the optimal decision tree parameters, when the maximum number of iterations is reached, substituting the optimized parameters into constructing a decision tree classification model, inputting the test set and the cross-validation set data into the model for classification, and outputting the classification results; The optimization objective function is expressed as: , in, is the fitness function value, The decision tree constructed for each set of parameters, The classification accuracy of each decision tree.
[0010] As a preferred solution of the power grid abnormal signal analysis method based on deep association rules described in the present invention, wherein: the construction of the associated alarm signal classification model includes classifying the associated alarm signals using the LSTM algorithm; The LSTM classification network includes an input layer, an LSTM layer, a fully connected layer, and a Softmax classification layer; the classification of the associated alarm signal includes dividing the associated alarm signal data set into a training set, a test set, and a cross-validation set, and passing the monitoring information and the alarm signal type of the alarm signal as input to the input layer, and adding an LSTM layer. The LSTM layer is used to filter and update the input data to obtain a new data set, and the new data set is input into the fully connected layer and the classification layer for learning and classification; The LSTM layer includes a forget gate, an input gate, and an output gate. The forget gate outputs a value from 0 to 1 through the Sigmoid layer, where 1 indicates complete retention and 0 indicates complete forgetting. The formula is: , in, For the forgetting threshold, For the last output information, To input data information, is the bias term of the forget gate, is the Sigmoid activation function, is the weight matrix of the forget gate; The input formula is expressed as: , , , in, is the input threshold, i.e. the input gate output of the current time step, is the weight matrix of the input gate, is the bias term of the input gate, is the Sigmoid activation function, For the last output information, To input data information, is the cell state at the previous moment, is the cell state bias term, is the weight matrix of the cell state, is the hyperbolic tangent activation function, is the cell state at the current time step, For forgotten information, For updated information; The output gate formula is expressed as: , , in, is the output threshold, is the Sigmoid activation function, For the last output information, is the bias term of the output gate, is the cell state at the current time step, is the hyperbolic tangent activation function, is the weight matrix of the output gate, is the input information of the current time step, The final output data set.
[0011] As a preferred solution of the power grid abnormal signal analysis method based on deep association rules described in the present invention, wherein: the matching processing solution includes partitioning and layering the classified alarm signals and matching the processing solution according to the signal type; The classified alarm signals include accident signals, abnormal signals, position change signals, over-limit signals, and notification signals; The matching processing scheme also includes that when the alarm signal is an accident signal, the operator immediately locates the source of the fault, disconnects the faulty equipment or cuts off the faulty area, and restores power supply through backup equipment or switching the grid configuration. After the event occurs, the fault information is recorded in detail, and subsequent analysis and processing are carried out; when the alarm signal is an abnormal signal, the operating status of the equipment and system is urgently checked, and historical data, equipment status and monitoring tools are used for diagnosis to determine the specific cause of the abnormality, and according to the analysis results, troubleshooting and recovery measures are carried out; when the alarm signal is a position change signal, the operator performs regular inspections of the equipment as planned, the status of the equipment has changed, and the equipment parameters need to be adjusted or reconfigured, and the position change signal is continuously monitored; when the alarm signal is an over-limit signal, the operator checks the working environment of the equipment, records the equipment, and sets up long-term monitoring; when the alarm signal is a notification signal, the operator inspects and repairs according to the equipment maintenance plan, and arranges relevant personnel to receive signals regularly and record the operating status of the equipment.
[0012] Another object of the present invention is to provide a power grid abnormality signal analysis system based on deep association rules. The present invention constructs an alarm signal data set to improve the efficiency of power grid abnormality detection and the accuracy of fault handling. The system of the present invention collects power grid operating parameters and equipment status information to construct an alarm signal data set, and uses deep association rules and LSTM algorithms to accurately distinguish and classify alarm signals, thereby realizing rapid identification and hierarchical display of power grid abnormality signals, and automatically matching processing solutions according to signal types, significantly improving the efficiency of power grid abnormality detection and the accuracy of fault handling, and ensuring the stable operation and safety of the power grid.
[0013] As a preferred solution of the power grid abnormal signal analysis system based on deep association rules described in the present invention, it is characterized by including a data acquisition and preprocessing module, an association rule mining and signal discrimination module, a classification model construction and training module, and an alarm signal display and processing module.
[0014] The data acquisition and preprocessing module is used to collect power grid operating parameters, equipment status information and distributed energy operating parameters to construct an alarm signal data set.
[0015] The association rule mining and signal discrimination module is used to discriminate the alarm signal using the association rule mining algorithm, and divide the data set into a single alarm signal data set and an associated alarm signal data set.
[0016] The classification model construction and training module is used to construct and train a single alarm signal classification model and an associated alarm signal classification model to classify the alarm signals.
[0017] The alarm signal display and processing module is used to display the classified alarm signals in zones and layers, and match corresponding processing solutions according to the signal types.
[0018] A computer device includes a memory and a processor, wherein the memory stores a computer program, and is characterized in that when the processor executes the computer program, the steps of the method for analyzing abnormal power grid signals based on deep association rules are implemented.
[0019] A computer-readable storage medium stores a computer program thereon, wherein when the computer program is executed by a processor, the steps of the method for analyzing abnormal power grid signals based on deep association rules are implemented.
[0020] The beneficial effects of the present invention are as follows: the present invention constructs an alarm signal data set by collecting the operating parameters and equipment status information of the power grid, ensures the accuracy and real-time performance of the analysis, and provides solid data support for the stable operation of the power grid; the alarm signals are efficiently identified through the association rule mining algorithm, and a single alarm signal classification model is constructed, which improves the signal processing efficiency, reduces misjudgments and missed judgments, and achieves rapid response; the LSTM algorithm is used to construct an associated alarm signal classification model to process the complex correlation of time series data, improve the depth and breadth of analysis, and provide a powerful tool for complex fault identification; by optimizing the fast Apriori algorithm and introducing the firefly algorithm, the computational complexity is significantly reduced, the speed of abnormal signal recognition is accelerated, and the accuracy of association rule mining is improved; at the same time, the decision tree parameters are optimized using the particle swarm optimization algorithm, which enhances the generalization ability and accuracy of the single alarm signal classification model; and by matching the processing scheme and partitioning and layering the classified alarm signals for display, the power grid operation and maintenance efficiency is greatly improved, the fault processing time is reduced, and the safe and stable operation of the power grid is guaranteed. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0022] Figure 1 An overall flow chart of a method for analyzing abnormal power grid signals based on deep association rules provided by one embodiment of the present invention.
[0023] Figure 2 A schematic diagram of the Apriori algorithm flow of a power grid abnormal signal analysis method based on deep association rules provided in one embodiment of the present invention.
[0024] Figure 3 A system solution flow chart of a power grid abnormal signal analysis system based on deep association rules provided by one embodiment of the present invention. DETAILED DESCRIPTION
[0025] To make the above-mentioned objects, features, and advantages of the present invention more clearly understood, the following detailed description of the specific embodiments of the present invention is given in conjunction with the accompanying drawings. It is obvious that the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary persons in this field without creative work should fall within the scope of protection of the present invention.
[0026] The present invention is described in detail with reference to schematic diagrams. For ease of illustration, cross-sectional views of device structures may be partially enlarged and not to scale when describing embodiments of the present invention. Furthermore, the schematic diagrams are merely illustrative and should not limit the scope of the present invention. Furthermore, in actual production, the three-dimensional dimensions of length, width, and depth should be included.
[0027] In this disclosure, unless otherwise specified or limited, the terms "mounted," "connected," and "connected" should be interpreted broadly. For example, they may refer to fixed, removable, or integral connections. They may also refer to mechanical, electrical, or direct connections, indirect connections through an intermediary, or internal communication between two components. Those skilled in the art will understand the specific meanings of these terms in this disclosure.
[0028] Example 1, with reference to Figure 1 and Figure 2 , which is the first embodiment of the present invention, provides a method for analyzing abnormal power grid signals based on deep association rules, including: S1: Collect operating parameters and equipment status information, and use the collected information to build an alarm signal dataset.
[0029] It should be noted that the collection of operating parameters and equipment status information includes obtaining alarm signal data from the historical operation records of the power grid and collecting the operating parameters of the distributed energy after the distributed energy is connected; The alarm signal data includes timestamp, alarm device, signal strength and fault type; the operating parameters of the distributed energy include reverse current, power generation fluctuation information and access node status; the constructed alarm signal data set includes collected monitoring information and corresponding alarm type.
[0030] By collecting operating parameters and equipment status information and building an alarm signal data set, we can achieve comprehensive monitoring and digital recording of the power grid status, providing a detailed data foundation for subsequent analysis, ensuring the accuracy and real-time nature of the analysis results, and providing data support for the stable operation of the power grid.
[0031] S2: Use association rule mining algorithm to identify alarm signals, divide the data set, build a single alarm signal classification model, and classify single alarm signals.
[0032] Furthermore, the dividing of the data set includes distinguishing between single alarm signals and associated alarm signals using an association rule mining algorithm, and dividing the original data set into a single alarm signal data set and an associated alarm signal data set; The association rule mining algorithm includes using a fast Apriori algorithm to discriminate the alarm signal by support, confidence and lift; The fast Apriori algorithm includes frequent item set generation and pruning and association rule generation and screening; frequent item set generation and pruning includes starting from a single item, expanding to generate candidate item sets of length k, and using the Apriori property to remove candidate item sets with support less than a preset threshold of 0.4%. Candidate item sets are judged to have a small number of occurrences and low correlation with the remaining candidate item sets and are not involved in subsequent calculations. The database is traversed to calculate the support of the candidate item sets, and frequent item sets with support greater than or equal to the threshold of 0.4% are retained until no frequent item sets can be generated; Association rule generation and screening includes generating non-empty subsets A and B for each frequent item set, calculating the confidence of the association rule A→B, setting a confidence threshold, and retaining the rule when the confidence is greater than or equal to the confidence threshold, and outputting all association rules that meet the support and confidence thresholds.
[0033] The association rule mining algorithm is used to identify alarm signals, and a single alarm signal classification model is constructed to efficiently identify alarm signals. This achieves accurate classification of single alarm signals, improves the efficiency of signal processing, reduces the possibility of misjudgment and missed judgment, and provides technical support for rapid response.
[0034] It should be noted that the fast Apriori algorithm also includes the introduction of the firefly algorithm for optimization, where each alarm signal in the alarm signal dataset is initialized as an individual firefly, and the brightness represents the support of the alarm signal. The brightness of the firefly individual attracts the behavior of the firefly, and the algorithm quickly converges to the candidate item set with the highest support. The support threshold is dynamically adjusted, the pruning strategy is optimized, and the size of the candidate item set is reduced. The support calculation formula of the alarm signal is: , in, is the support of the warning signal, is the candidate item set of the alarm signal, is the support function; The firefly algorithm includes expanding from a single item to generate a first-order alarm signal candidate item set with a length of 1, and using the Apriori property, according to the brightness, that is, the support of the alarm signal, the fireflies move to individuals with higher brightness, that is, individuals with support greater than or equal to 10%. The search space size is limited by adjusting the attenuation factor of the luminous intensity and the attractiveness function; The attraction function is expressed as: , in, For attraction, For maximum attraction, is the attraction attenuation factor, is the distance between two fireflies; The firefly algorithm also includes setting a support threshold of 0.4%, removing alarm signal candidate item sets with support less than the threshold, taking alarm signals that meet the minimum support as first-order frequent item sets, and gradually expanding to generate second-order alarm signal candidate item sets with a length of 2; and reducing computational complexity by repeating the firefly optimization process, pruning the second-order candidate item sets, pruning the candidate item sets with support less than the threshold, constructing second-order frequent item sets, and gradually expanding to generate high-order candidate item sets, while repeating the firefly optimization process, pruning the high-order candidate item sets, and retaining the item sets with support greater than or equal to the threshold. For abnormal signals, when the confidence is lower than the threshold and there is no associated device, it is determined to be a single alarm signal; when the confidence is greater than the threshold and the lift is greater than 1, and accompanied by the occurrence of an alarm signal, it is determined to be an associated alarm signal.
[0035] The optimization of the fast Apriori algorithm and the introduction of the firefly algorithm reduce the size of the candidate item set, improve the computational efficiency, significantly reduce the computational complexity, speed up the recognition of abnormal signals, and improve the accuracy of association rule mining.
[0036] Furthermore, the constructing of the single alarm signal classification model includes dividing the single alarm signal data set into a training set, a test set, and a cross-validation set, and using a decision tree classification algorithm based on a particle swarm optimization algorithm to construct the model; The classification of a single alarm signal includes setting an optimization objective function, initializing the parameters of the particle swarm algorithm and the parameter range of the decision tree, the position of each particle represents the hyperparameter of the decision tree, inputting the single alarm signal data set into the decision tree for training, finding the optimal solution and related fitness values by updating the speed and position of the particles, and re-evaluating the fitness of the particles in each iteration, updating the individual optimal solution and the global optimal solution, outputting the global optimal solution, i.e., the optimal decision tree parameters, when the maximum number of iterations is reached, substituting the optimized parameters into constructing a decision tree classification model, inputting the test set and the cross-validation set data into the model for classification, and outputting the classification results; The optimization objective function is expressed as: , in, is the fitness function value, The decision tree constructed for each set of parameters, The classification accuracy of each decision tree.
[0037] S3: Build a correlation alarm signal classification model, use the LSTM algorithm to classify the correlation alarm signals, and display the classified alarm signals in partitions and layers, matching the processing plan according to the signal type.
[0038] Furthermore, the constructing of the associated alarm signal classification model includes classifying the associated alarm signals using an LSTM algorithm; The LSTM classification network includes an input layer, an LSTM layer, a fully connected layer, and a Softmax classification layer; the classification of the associated alarm signal includes dividing the associated alarm signal data set into a training set, a test set, and a cross-validation set, and passing the monitoring information and the alarm signal type of the alarm signal as input to the input layer, and adding an LSTM layer. The LSTM layer is used to filter and update the input data to obtain a new data set, and the new data set is input into the fully connected layer and the classification layer for learning and classification; The LSTM algorithm is used to construct a correlation alarm signal classification model to better capture the long-term dependencies in time series data, improve the accuracy of correlation alarm signal classification, provide more accurate classification of power grid abnormal signals, and help to formulate more effective fault handling strategies.
[0039] The LSTM layer includes a forget gate, an input gate, and an output gate. The forget gate outputs a value from 0 to 1 through the Sigmoid layer, where 1 indicates complete retention and 0 indicates complete forgetting. The formula is: , in, For the forgetting threshold, For the last output information, To input data information, is the bias term of the forget gate, is the Sigmoid activation function, is the weight matrix of the forget gate; The input gate formula is expressed as: , , , in, is the input threshold, i.e. the input gate output of the current time step, is the weight matrix of the input gate, is the bias term of the input gate, is the Sigmoid activation function, For the last output information, To input data information, is the cell state at the previous moment, is the cell state bias term, is the weight matrix of the cell state, is the hyperbolic tangent activation function, is the cell state at the current time step, For forgotten information, For updated information; The output gate formula is expressed as: , , in, is the output threshold, is the Sigmoid activation function, For the last output information, is the bias term of the output gate, is the cell state at the current time step, is the hyperbolic tangent activation function, is the weight matrix of the output gate, is the input information of the current time step, The final output data set.
[0040] Constructing a correlation alarm signal classification model and using the LSTM algorithm to classify correlation alarm signals can handle the complex correlations in time series data, effectively classify correlation alarm signals, improve the depth and breadth of power grid abnormal signal analysis, and provide a powerful tool for the identification of complex faults.
[0041] Furthermore, the matching processing scheme includes displaying the classified alarm signals in zones and layers and matching the processing scheme according to the signal type; The classified alarm signals include accident signals, abnormal signals, displacement signals, over-limit signals, and notification signals; matching processing schemes, the classified alarm signals are partitioned and layered and displayed, and the alarm signal classification results are matched with the processing schemes, thereby achieving rapid response and accurate processing of power grid anomalies, greatly improving the efficiency of power grid operation and maintenance, reducing fault handling time, and ensuring the safe and stable operation of the power grid.
[0042] The matching processing scheme also includes that when the alarm signal is an accident signal, the operator immediately locates the source of the fault, disconnects the faulty equipment or cuts off the faulty area, and restores power supply through backup equipment or switching the grid configuration. After the event occurs, the fault information is recorded in detail, and subsequent analysis and processing are carried out; when the alarm signal is an abnormal signal, the operating status of the equipment and system is urgently checked, and historical data, equipment status and monitoring tools are used for diagnosis to determine the specific cause of the abnormality, and according to the analysis results, troubleshooting and recovery measures are carried out; when the alarm signal is a position change signal, the operator performs regular inspections of the equipment as planned, the status of the equipment has changed, and the equipment parameters need to be adjusted or reconfigured, and the position change signal is continuously monitored; when the alarm signal is an over-limit signal, the operator checks the working environment of the equipment, records the equipment, and sets up long-term monitoring; when the alarm signal is a notification signal, the operator inspects and repairs according to the equipment maintenance plan, and arranges relevant personnel to receive signals regularly and record the operating status of the equipment.
[0043] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.
[0044] Example 2, reference Figure 3 , which is the second embodiment of the present invention, provides a power grid abnormal signal analysis system based on deep association rules, including a data acquisition and preprocessing module, an association rule mining and signal discrimination module, a classification model construction and training module, and an alarm signal display and processing module.
[0045] The data acquisition and preprocessing module is used to collect power grid operating parameters, equipment status information and distributed energy operating parameters to construct an alarm signal data set.
[0046] The association rule mining and signal discrimination module is used to discriminate the alarm signal using the association rule mining algorithm, and divide the data set into a single alarm signal data set and an associated alarm signal data set.
[0047] The classification model construction and training module is used to construct and train a single alarm signal classification model and an associated alarm signal classification model to classify the alarm signals.
[0048] The alarm signal display and processing module is used to display the classified alarm signals in zones and layers, and match corresponding processing solutions according to the signal types.
[0049] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.
[0050] Embodiment 3, the third embodiment of the present invention, is different from the first two embodiments in that: If the functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the portion that contributes to the prior art, or the portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage media include various media that can store program code, such as USB flash drives, mobile hard drives, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical disks.
[0051] The logic and / or steps represented in the flowcharts or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing the logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (e.g., a computer-based system, a system including a processor, or other system that can fetch and execute instructions from an instruction execution system, apparatus, or device). For purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport a program for use by, or in conjunction with, an instruction execution system, apparatus, or device.
[0052] More specific examples (a non-exhaustive list) of computer-readable media include the following: an electrical connection with one or more wires (electronic devices), a portable computer disk cartridge (magnetic devices), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, and then editing, interpreting, or processing in another suitable manner as necessary, and then storing it in a computer memory.
[0053] It should be understood that various components of the present invention may be implemented using hardware, software, firmware, or a combination thereof. In the aforementioned embodiments, multiple steps or methods may be implemented using software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented using hardware, as in another embodiment, any one of the following technologies known in the art or a combination thereof may be used: a discrete logic circuit having logic gate circuits for implementing logic functions on data signals, an application-specific integrated circuit having suitable combinational logic gate circuits, a programmable gate array (PGA), a field-programmable gate array (FPGA), etc.
Claims
1. A power grid abnormal signal analysis method based on deep association rules, characterized by: include, Collect operating parameters and equipment status information, and use the collected information to build an alarm signal data set; Use association rule mining algorithms to identify alarm signals, divide the data set, build a single alarm signal classification model, and classify single alarm signals; Build a correlation alarm signal classification model, use the LSTM algorithm to classify the correlation alarm signals, and display the classified alarm signals in partitions and layers, matching the processing plan according to the signal type; The collecting of operating parameters and equipment status information includes obtaining alarm signal data from historical operation records of the power grid and collecting operating parameters of distributed energy after the distributed energy is connected; The alarm signal data includes timestamp, alarm device, signal strength and fault type; the operating parameters of the distributed energy include reverse current, power generation fluctuation information and access node status; The alarm signal data set is constructed to include collected monitoring information and corresponding alarm types; The dividing of the data set includes distinguishing between a single alarm signal and associated alarm signals by using an association rule mining algorithm, and dividing the original data set into a single alarm signal data set and an associated alarm signal data set; The association rule mining algorithm includes using a fast Apriori algorithm to discriminate the alarm signal by support, confidence and lift; The fast Apriori algorithm includes frequent item set generation and pruning and association rule generation and screening; frequent item set generation and pruning includes starting from a single item, expanding to generate candidate item sets of length k, and using the Apriori property to remove candidate item sets with support less than a preset threshold of 0.4%. Candidate item sets are judged to have a small number of occurrences and low correlation with the remaining candidate item sets and are not involved in subsequent calculations. The database is traversed to calculate the support of the candidate item sets, and frequent item sets with support greater than or equal to the threshold of 0.4% are retained until no frequent item sets can be generated; Association rule generation and screening includes generating non-empty subsets A and B for each frequent item set, calculating the confidence of the association rule A→B, setting a confidence threshold, and retaining the rule when the confidence is greater than or equal to the confidence threshold, and outputting all association rules that meet the support and confidence thresholds.
2. The method for analyzing abnormal power grid signals based on deep association rules according to claim 1, wherein: The fast Apriori algorithm also includes introducing a firefly algorithm for optimization, initializing each alarm signal in the alarm signal dataset as an individual firefly, with the brightness representing the support of the alarm signal. The algorithm then rapidly converges to the candidate item set with the highest support through the brightness attraction behavior of the individual fireflies, dynamically adjusts the support threshold, optimizes the pruning strategy, and reduces the size of the candidate item set. The support calculation formula of the alarm signal is: , in, is the support of the warning signal, is the candidate item set of the alarm signal, is the support function; The firefly algorithm includes expanding from a single item to generate a first-order alarm signal candidate item set with a length of 1, and using the Apriori property, according to the brightness, that is, the support of the alarm signal, the fireflies move to individuals with higher brightness, that is, individuals with support greater than or equal to 10%. The search space size is limited by adjusting the attenuation factor of the luminous intensity and the attractiveness function; The attraction function is expressed as: , in, For attraction, For maximum attraction, is the attraction attenuation factor, is the distance between two fireflies; The firefly algorithm also includes setting a support threshold of 0.4%, removing alarm signal candidate item sets with support less than the threshold, taking alarm signals that meet the minimum support as first-order frequent item sets, and gradually expanding to generate second-order alarm signal candidate item sets with a length of 2; and reducing computational complexity by repeating the firefly optimization process, pruning the second-order candidate item sets, pruning the candidate item sets with support less than the threshold, constructing second-order frequent item sets, and gradually expanding to generate high-order candidate item sets, while repeating the firefly optimization process, pruning the high-order candidate item sets, and retaining the item sets with support greater than or equal to the threshold. For abnormal signals, when the confidence is lower than the threshold and there is no associated device, it is determined to be a single alarm signal; when the confidence is greater than the threshold and the lift is greater than 1, and accompanied by the occurrence of an alarm signal, it is determined to be an associated alarm signal.
3. The power grid abnormal signal analysis method based on deep association rules according to claim 2 is characterized in that: The construction of the single alarm signal classification model includes dividing the single alarm signal data set into a training set, a test set and a cross-validation set, and adopting a decision tree classification algorithm based on a particle swarm optimization algorithm to construct the model; The classification of a single alarm signal includes setting an optimization objective function, initializing the parameters of the particle swarm algorithm and the parameter range of the decision tree, the position of each particle represents the hyperparameter of the decision tree, inputting the single alarm signal data set into the decision tree for training, finding the optimal solution and related fitness values by updating the speed and position of the particles, and re-evaluating the fitness of the particles in each iteration, updating the individual optimal solution and the global optimal solution, outputting the global optimal solution, i.e., the optimal decision tree parameters, when the maximum number of iterations is reached, substituting the optimized parameters into constructing a decision tree classification model, inputting the test set and the cross-validation set data into the model for classification, and outputting the classification results; The optimization objective function is expressed as: , in, is the fitness function value, The decision tree constructed for each set of parameters, The classification accuracy of each decision tree.
4. The method for analyzing abnormal power grid signals based on deep association rules according to claim 3, wherein: The constructing of the associated alarm signal classification model includes classifying the associated alarm signals using an LSTM algorithm; The LSTM classification network includes an input layer, an LSTM layer, a fully connected layer, and a Softmax classification layer; the classification of the associated alarm signal includes dividing the associated alarm signal data set into a training set, a test set, and a cross-validation set, and passing the monitoring information and the alarm signal type of the alarm signal as input to the input layer, and adding an LSTM layer. The LSTM layer is used to filter and update the input data to obtain a new data set, and the new data set is input into the fully connected layer and the classification layer for learning and classification; The LSTM layer includes a forget gate, an input gate, and an output gate. The forget gate outputs a value from 0 to 1 through the Sigmoid layer, where 1 indicates complete retention and 0 indicates complete forgetting. The formula is: , in, For the forgetting threshold, For the last output information, To input data information, is the bias term of the forget gate, is the Sigmoid activation function, is the weight matrix of the forget gate; The input gate formula is expressed as: , , , in, is the input threshold, i.e. the input gate output of the current time step, is the weight matrix of the input gate, is the bias term of the input gate, is the Sigmoid activation function, For the last output information, To input data information, is the cell state at the previous moment, is the cell state bias term, is the weight matrix of the cell state, is the hyperbolic tangent activation function, is the cell state at the current time step, For forgotten information, For updated information; The output gate formula is expressed as: , , in, is the output threshold, is the Sigmoid activation function, For the last output information, is the bias term of the output gate, is the cell state at the current time step, is the hyperbolic tangent activation function, is the weight matrix of the output gate, is the input information of the current time step, The final output data set.
5. The method for analyzing abnormal power grid signals based on deep association rules according to claim 4, wherein: The matching processing scheme includes displaying the classified alarm signals in different zones and layers, and matching the processing scheme according to the signal type; The classified alarm signals include accident signals, abnormal signals, position change signals, over-limit signals, and notification signals; The matching processing scheme also includes that when the alarm signal is an accident signal, the operator immediately locates the source of the fault, disconnects the faulty equipment or cuts off the faulty area, and restores power supply through backup equipment or switching the grid configuration. After the event occurs, the fault information is recorded in detail, and subsequent analysis and processing are carried out; when the alarm signal is an abnormal signal, the operating status of the equipment and system is urgently checked, and historical data, equipment status and monitoring tools are used for diagnosis to determine the specific cause of the abnormality, and according to the analysis results, troubleshooting and recovery measures are carried out; when the alarm signal is a position change signal, the operator performs regular inspections of the equipment as planned, the status of the equipment has changed, and the equipment parameters need to be adjusted or reconfigured, and the position change signal is continuously monitored; when the alarm signal is an over-limit signal, the operator checks the working environment of the equipment, records the equipment, and sets up long-term monitoring; when the alarm signal is a notification signal, the operator inspects and repairs according to the equipment maintenance plan, and arranges relevant personnel to receive signals regularly and record the operating status of the equipment.
6. A system using the power grid abnormal signal analysis method based on deep association rules according to any one of claims 1 to 5, characterized in that: It includes data acquisition and preprocessing module, association rule mining and signal discrimination module, classification model construction and training module, and alarm signal display and processing module; The data acquisition and preprocessing module is used to collect power grid operating parameters, equipment status information and distributed energy operating parameters to construct an alarm signal data set; The association rule mining and signal discrimination module is used to discriminate the alarm signal using the association rule mining algorithm and divide the data set into a single alarm signal data set and an associated alarm signal data set; The classification model construction and training module is used to construct and train a single alarm signal classification model and an associated alarm signal classification model to classify the alarm signals; The alarm signal display and processing module is used to display the classified alarm signals in zones and layers, and match corresponding processing solutions according to the signal types.
7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the power grid abnormal signal analysis method based on deep association rules according to any one of claims 1 to 5 are implemented.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the power grid abnormal signal analysis method based on deep association rules according to any one of claims 1 to 5 are implemented.