Phase recognition enhancement method and system based on frequency domain analysis and contrastive learning

By employing a multi-level progressive phase recognition method based on frequency domain analysis and comparative learning, combined with dynamic programming and convolutional neural networks, the accuracy and stability issues of phase recognition for low-power users in low-voltage distribution networks are resolved, achieving high-precision and low-cost phase recognition.

CN122365058APending Publication Date: 2026-07-10SHANGHAI TECH UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610463278.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-04-09
Publication Date
2026-07-10

AI Technical Summary

Technical Problem

Existing technologies have low accuracy in phase identification for low-power users in low-voltage distribution networks. Traditional methods are unstable in the presence of data noise and have high computational complexity, making it difficult to meet accuracy requirements.

Method used

A multi-level progressive phase recognition method based on frequency domain analysis and contrastive learning is adopted. It combines dynamic programming, frequency domain feature correlation analysis and contrastive learning model of convolutional neural network, and identifies user phase step by step through physical constraints and data-driven verification.

Benefits of technology

It improves the accuracy and applicability of phase recognition for low-power users, reduces false judgments, and achieves high-precision, low-cost phase recognition without the need for additional hardware.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122365058A_ABST
    Figure CN122365058A_ABST
Patent Text Reader

Abstract

This invention provides a phase recognition enhancement method and system based on frequency domain analysis and contrastive learning. The method includes: acquiring the user load time series of a user to be identified and the phase load time series of each phase within the same transformer area as the user to be identified; performing phase allocation on the user load time series and each phase load time series based on a dynamic programming algorithm to obtain candidate phases corresponding to the user to be identified and their phase position confidence; determining whether a phase to which the user to be identified belongs exists based on the confidence; if not, extracting frequency domain features from the user load time series and each phase load time series, calculating the correlation between the frequency domain features of the user to be identified and the frequency domain features of each phase, and determining whether a phase to which the user to be identified exists; if not, inputting the user load time series of the user to be identified into a phase recognition model to obtain the phase to which the user to be identified belongs. This invention improves the accuracy and applicability of phase recognition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of phase recognition technology, and in particular to a phase recognition enhancement method and system based on frequency domain analysis and contrastive learning. Background Technology

[0002] As the end point of power supply, the accuracy of the topology of low-voltage distribution networks directly affects the accuracy of line loss calculation, three-phase load balancing regulation, and fault location. In low-voltage distribution networks, users in each distribution area are typically connected to one phase of the three-phase grid. Therefore, accurately obtaining user phase information is crucial for three-phase load balancing analysis, line loss calculation, and refined management of the distribution network. However, due to incomplete early records, user wiring adjustments, or untimely record updates, the actual connected phase of some users is inconsistent with the recorded phase, necessitating phase identification through data analysis methods. Existing user phase identification methods are mostly based on voltage correlation, load correlation, or energy conservation principles. However, for low-power users, due to their small load fluctuations and indistinct characteristics, traditional correlation methods have low accuracy. Furthermore, when the number of users is large, the combined search method based on energy conservation has high computational complexity and poor identification stability in the presence of data noise. Therefore, a phase identification enhancement method and system based on frequency domain analysis and comparative learning is needed. Summary of the Invention

[0003] This invention provides a phase recognition enhancement method and system based on frequency domain analysis and contrastive learning, in order to improve the technical problem that the accuracy of user phase recognition is not high when the characteristics of low-power user load are not obvious.

[0004] This invention provides a phase recognition enhancement method based on frequency domain analysis and contrastive learning. The method includes: acquiring the user load time series of a user to be identified and the phase load time series of each phase in the same transformer area as the user to be identified; performing phase allocation processing on the user load time series and each phase load time series based on a dynamic programming algorithm to obtain the candidate phase corresponding to the user to be identified and the phase position confidence, and determining whether there is a phase to which the user to be identified belongs based on the confidence; if not, extracting frequency domain features from the user load time series and each phase load time series, and calculating the correlation between the extracted frequency domain features of the user to be identified and the frequency domain features of each phase to determine whether there is a phase to which the user to be identified belongs; if not, inputting the user load time series of the user to be identified into a phase recognition model to obtain the phase to which the user to be identified belongs.

[0005] In one embodiment of the present invention, the step of extracting frequency domain features from the user load time series and the phase load time series, and calculating the correlation between the extracted frequency domain features of the user to be identified and the frequency domain features of the three phases to determine whether there is a phase to which the user to be identified belongs includes: performing discrete Fourier transform on the user load time series and the phase load time series of each phase respectively to obtain the user load frequency domain feature sequence and the phase load frequency domain feature sequence; extracting high-frequency domain components from the user load frequency domain feature sequence and the phase load frequency domain feature sequence respectively, and applying the discrete inverse Fourier transform... The extracted high-frequency components are reconstructed to obtain the corresponding user high-frequency time-series load sequence and the phase high-frequency time-series load sequence for each phase. Based on the user high-frequency time-series load sequence, the user load change at adjacent times is calculated to form an initial user load change sequence. Based on the phase high-frequency time-series load sequence for each phase, the phase load change at adjacent times is calculated to form an initial load change sequence for each phase. The correlation between the initial user load change sequence and the initial phase load change sequence for each phase is calculated. Based on the correlation, it is determined whether there is a phase to which the user to be identified belongs.

[0006] In one embodiment of the present invention, the step of calculating the correlation between the initial user load change sequence and the initial phase load change sequence for each phase includes: for each phase: from the initial user load change sequence, selecting user load change amounts whose amplitude is greater than an adaptive change threshold at the sampling time to form a final user load change sequence; wherein, the adaptive change threshold is obtained based on the sum of user load changes of all remaining users in the transformer area at the sampling time; based on the final user load change sequence, extracting the phase load change at the corresponding sampling time from the initial phase load change sequence to form a corresponding final phase load change sequence; calculating the Pearson correlation coefficient between the user load change sequence and the phase load change sequence as the correlation between the two; selecting the phase with the highest correlation from the correlations corresponding to each phase as the candidate phase of the user to be identified.

[0007] In one embodiment of the present invention, the step of determining whether there is a phase belonging to the user to be identified based on the relevance includes: determining whether the relevance of the candidate phase is greater than a preset relevance threshold; if yes, then the phase of the candidate phase is taken as the phase belonging to the user to be identified; if no, then there is no phase belonging to the user to be identified.

[0008] In one embodiment of the present invention, the step of inputting the user load time series of the user to be identified into the phase recognition model to obtain the phase to which the user belongs includes: performing a discrete Fourier transform on the user load time series to extract low-frequency components, and reconstructing the extracted low-frequency components according to the discrete inverse Fourier transform to obtain a user low-frequency load sequence; and inputting the user low-frequency load sequence into the phase recognition model to obtain the phase to which the user belongs.

[0009] In one embodiment of the present invention, the step of inputting the user load time series of the user to be identified into a phase recognition model to obtain the phase to which the user belongs includes: inputting the user load time series of the user to be identified into the encoder of the phase recognition model to extract user load features; inputting the user load features into the classifier of the phase recognition model to calculate the similarity between the user load features and the phase center vectors of each phase, and selecting the phase corresponding to the phase center vector with the highest similarity as the phase to which the user belongs; wherein, the phase center vector is obtained by aggregating the user load features of each user with known phases in the training phase.

[0010] In one embodiment of the present invention, the phase recognition model is trained through a contrastive learning method.

[0011] This invention also provides a phase recognition enhancement system based on frequency domain analysis and contrastive learning. The system includes: a data acquisition module for acquiring the user load time series of a user to be identified and the phase load time series of each phase in the same transformer area as the user to be identified; a dynamic programming module for performing phase allocation processing on the user load time series and each phase load time series based on a dynamic programming algorithm to obtain the candidate phase to which the user to be identified belongs and the phase position confidence, and determining whether there is a phase to which the user to be identified belongs based on the confidence; a frequency domain analysis module for extracting frequency domain features from the user load time series and each phase load time series if the phase does not exist, and calculating the correlation between the extracted frequency domain features of the user to be identified and the frequency domain features of each phase to determine whether there is a phase to which the user to be identified belongs; and a contrastive learning module for inputting the user load time series of the user to be identified into a phase recognition model if the phase does not exist, to obtain the phase to which the user to be identified belongs.

[0012] The beneficial effects of this invention are as follows: This invention proposes a phase recognition enhancement method and system based on frequency domain analysis and contrastive learning. It uses a dynamic programming algorithm for phase allocation and energy conservation constraints to initially identify the user's phase. When dynamic programming fails to determine the user's phase, it further extracts frequency domain features and calculates the frequency domain feature correlation between the user and each phase to uncover the frequency domain correlation characteristics between the user's load and the phase load. When frequency domain correlation still fails to determine the user's phase, the user's load time series is input into the phase recognition model, which extracts deep time-series features and completes phase recognition. Through this step-by-step recognition method, a multi-level phase recognition process is achieved, from physical constraint analysis to frequency domain feature analysis and then to deep learning feature analysis. This method is applicable to users with different electricity consumption behaviors, improving the accuracy and applicability of phase recognition while reducing misjudgments and improving the reliability of phase recognition results. Attached Figure Description

[0013] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application. It is obvious that the drawings described below are merely some embodiments of this application, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.

[0014] In the attached diagram:

[0015] Figure 1 This is a schematic flowchart of a phase recognition enhancement method based on frequency domain analysis and contrastive learning provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of the comparative learning process in one embodiment of the present invention; Figure 3 This is a schematic diagram of a one-dimensional convolutional neural network structure in one embodiment of the present invention; Figure 4 This is a comparison chart showing the recognition accuracy of various phase recognition methods under different user scales and user distributions in this invention; Figure 5 This is a block diagram of a phase recognition enhancement system based on frequency domain analysis and contrastive learning provided in one embodiment of the present invention; Figure 6 This is a schematic diagram of the structure of an electronic device provided in one embodiment of the present invention. Detailed Implementation

[0016] The following specific examples illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments. Various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.

[0017] It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of the present invention. The drawings only show the components related to the present invention and are not drawn according to the actual number, shape and size of the components in the actual implementation. In the actual implementation, the form, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.

[0018] In the following description, numerous details are explored to provide a more thorough explanation of embodiments of the invention. However, it will be apparent to those skilled in the art that embodiments of the invention may be practiced without these specific details. In other embodiments, well-known structures and devices are shown in block diagram form rather than in detail to avoid obscuring embodiments of the invention.

[0019] The collection, storage, use, processing, transmission, provision, and disclosure of user personal information involved in the technical solution of this application all comply with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0020] The inventors discovered that traditional phase identification methods mainly include manual verification and signal injection. Manual verification requires on-site checking of user wiring, resulting in high workload and low efficiency. Signal injection requires additional signal injection devices and detection equipment, leading to high hardware costs and hindering large-scale application. Existing phase sequence identification methods based on low-frequency metering data often rely on the principle of energy conservation, employing heuristic algorithms such as dynamic programming to identify user phases. However, in practical applications, when the amount of sampled data is small, insufficient energy conservation constraints and a large physical constraint space can easily lead to multiple solutions or misjudgments. Furthermore, when the number of users in a distribution area is large, the combined search space increases rapidly, significantly increasing algorithm time complexity, often requiring a trade-off between computational efficiency and identification accuracy. In addition, traditional methods typically rely on load correlation or energy matching relationships for identification, failing to fully exploit the deep temporal characteristics inherent in the load time series. In the presence of data noise or a small sample size, the identification accuracy is low and highly sensitive to data quality, making it difficult to meet the accuracy requirements for low-power user phase identification. Therefore, how to improve the accuracy and efficiency of user phase recognition under conditions of indistinct low-power user load characteristics, limited data sample size, and noise interference has become a pressing technical problem to be solved in this field.

[0021] This invention provides a phase recognition enhancement method based on frequency domain analysis and contrastive learning. Addressing the challenge of phase recognition for low-power users in low-voltage distribution networks, this invention offers a multi-level progressive phase recognition method based on frequency domain feature correlation analysis and frequency domain feature contrastive learning. This method integrates optimized dynamic programming, frequency domain feature correlation analysis, and a contrastive learning model based on convolutional neural networks to achieve accurate and rapid phase recognition of users in distribution areas, exhibiting significant advantages, particularly in handling complex features and weak signals. This invention proposes a three-level progressive recognition architecture, integrating dynamic programming, frequency domain analysis, and spectral contrastive learning techniques. Through dual verification using physical constraints and data-driven approaches, it effectively overcomes the challenges of identifying low-power and fuzzy users, offering significant advantages such as high accuracy, low cost, and no need for additional hardware.

[0022] like Figure 1 As shown, the phase recognition enhancement method based on frequency domain analysis and contrastive learning includes the following steps: S100: Obtain the user load time series of the user to be identified and the phase load time series of each phase in the same transformer area as the user to be identified.

[0023] A distribution area is a low-voltage power supply area powered by the same distribution transformer. The area includes multiple electricity users and a three-phase power supply line, with each user connected to one phase of the three-phase power supply line. By collecting the electricity load data of each user within the distribution area, a user load time series can be formed for each user. By collecting the total load data from the three-phase outgoing side of the distribution area, a phase load time series for each phase can be formed. The phase load for each phase is the sum of the loads of all users connected to that phase. In this invention, the electricity load of the user to be identified at multiple consecutive sampling times can be collected by an energy metering device at a preset sampling interval, and these loads are arranged in chronological order to form the user load time series for that user. Similarly, for each phase, the total load of that phase is sampled at the same sampling interval and arranged sequentially to form the phase load time series for that phase. Furthermore, to ensure the accuracy of subsequent analysis, the collected user load time series and phase load time series can be aligned in the time dimension so that they have the same sampling time interval and the same sampling time.

[0024] S200. Based on the dynamic programming algorithm, perform phase allocation processing on the user load time series and each phase load time series to obtain the candidate phase to which the user to be identified belongs and the phase position confidence, and determine whether there is a phase to which the user to be identified belongs based on the confidence.

[0025] At each sampling time, the user load value of the user to be identified is assumed to be allocated to each phase, and the allocated phase load is compared with the actual acquired phase load. An objective function is constructed with the error between the calculated load and the actual observed load of each phase as the objective. A dynamic programming algorithm is used to perform global optimization across multiple sampling times to obtain the phase allocation result that minimizes the objective function, thereby determining the candidate phase to which the user to be identified belongs. During the dynamic programming solution process, statistical analysis can be performed based on the solution results at multiple sampling times. The phase position confidence of the user to be identified in each phase is calculated based on the number of times the candidate phase is allocated or the magnitude of the error at multiple sampling times. When the phase position confidence of a certain phase is greater than a preset confidence threshold, the phase to which the user to be identified can be determined, and that phase is taken as the phase to which the user belongs. Conversely, when the phase position confidence of each phase does not reach the preset confidence threshold, it is considered that the dynamic programming algorithm cannot reliably determine the phase to which the user belongs, and further identification is required through frequency domain feature correlation analysis or a phase identification model. It should be noted that in the dynamic programming solution process, the sampled time series is randomly sampled and the dynamic programming solution is executed multiple times. Based on the phase allocation results obtained from multiple solutions, a voting statistics are performed to obtain the voting ratio corresponding to each candidate phase, and the voting ratio is used as the phase position confidence.

[0026] S300. If not, then frequency domain features are extracted from the user load time series and the load time series of each phase, and the correlation between the extracted frequency domain features of the user to be identified and the frequency domain features of each phase is calculated to determine whether the phase to which the user to be identified belongs exists.

[0027] This step aims to capture significant load changes caused by the operation of switching devices and match the changes in user load with the load of each phase line to determine phase assignment.

[0028] In an optional embodiment of the present invention, step S300 includes the following process: S310. Perform discrete Fourier transform on the user load time series and the phase load time series of each phase respectively to obtain the user load frequency domain feature sequence and the phase load frequency domain feature sequence.

[0029] When dynamic programming algorithms cannot reliably determine the phase to which a user belongs, further frequency domain feature analysis of the user load time series and the phase load time series is required. Specifically, discrete Fourier transforms are performed on the user load time series and the phase load time series respectively, converting the load time series in the time domain into frequency domain signals, thereby obtaining the corresponding user load frequency domain features and phase load frequency domain features. For any load time series... ( It can be a user load time series or the phase load time series), and its discrete Fourier transform result is shown in formula (1): (1) in, Let m be the load at the nth sampling time, and m be the number of loads in the load time series. To obtain the frequency domain characteristics of the corresponding frequency components, the frequency domain characteristics are arranged in descending order of frequency, resulting in a corresponding frequency domain characteristic sequence. Through Discrete Fourier Transform, the original load time series can be decomposed into multiple different frequency domain components, thereby obtaining frequency domain information characterizing the rate of load change.

[0030] S320. Extract high-frequency components from the user load frequency domain feature sequence and the load frequency domain feature sequence of each phase respectively, and reconstruct the extracted high-frequency components according to the discrete inverse Fourier transform to obtain the corresponding user high-frequency time-series load sequence and the phase high-frequency time-series load sequence of each phase.

[0031] After obtaining the user load frequency domain characteristic sequence and the phase load frequency domain sequence, it is necessary to extract high-frequency components from the frequency domain signals to obtain high-frequency information reflecting the characteristics of sudden changes in user load. Specifically, if a cutoff frequency is preset... In the frequency domain, low-frequency components below the cutoff frequency are filtered out, while high-frequency components above the cutoff frequency are retained, thus obtaining the high-frequency components of the user load and the high-frequency components of the phase. Based on the discrete inverse Fourier transform, time-domain signal reconstruction processing is performed on the high-frequency components to obtain the high-frequency time-domain load sequence as shown in formula (2). : , (2) in, To preserve the frequency domain coefficients after retaining high-frequency components, m is the number of sampling points. The high-frequency time-domain load sequence is reconstructed. Through the above process, the user's high-frequency time-series load sequence and the phase high-frequency time-series load sequence for each phase can be obtained respectively.

[0032] It is understandable that the corresponding cutoff frequencies for users and phases can be different, and no specific restrictions are imposed.

[0033] S330. Based on the user high-frequency time-series load sequence, calculate the user load change at adjacent times to form an initial user load change sequence.

[0034] After obtaining the user's high-frequency time-series load sequence, the user load change sequence is obtained by calculating the difference between adjacent sampling times. For the k-th sampling time, if the user to be identified is the i-th user in the transformer area, its initial user load change is as shown in formula (3): (3) in, Let be the initial change in user load for the i-th user at the k-th sampling time. and These represent the user load of the i-th user at sampling time k+1 and sampling time k, respectively.

[0035] S340. Based on the phase high-frequency time-series load sequence of each phase, calculate the phase load change at adjacent times to form the initial load change sequence of each phase.

[0036] Similar to the aforementioned user load changes, for each phase's high-frequency time-series load sequence, the initial load change for each phase can be obtained using the following formula: (4) in, Let be the initial phase load change of the j-th phase at the k-th sampling time. and These are the phase loads of the j-th phase at the (k+1)-th and (k)-th sampling times, respectively.

[0037] S350. Calculate the correlation between the initial user load change sequence and the initial phase load change sequence for each phase.

[0038] For each phase, the correlation between the initial user load change sequence and the phase load change sequence for that phase is calculated to characterize the degree of association between user load changes and phase load changes. The correlation calculation method includes, but is not limited to, Pearson correlation coefficient, Spearman correlation coefficient, or correlation measurement methods based on cross-correlation functions, etc., and is not specifically limited to any particular method.

[0039] In an optional embodiment of the present invention, step S350 includes the following process: For each phase: From the initial user load change sequence, select user load changes whose amplitude is greater than the adaptive change threshold at the sampling time to form a final user load change sequence; wherein, the adaptive change threshold is obtained based on the sum of user load changes of all remaining users in the transformer area at the sampling time; Based on the final user load change sequence, extract the phase load change at the corresponding sampling time from the initial phase load change sequence to form a corresponding final phase load change sequence; Calculate the Pearson correlation coefficient between the user load change sequence and the phase load change sequence as the correlation between the two; Select the phase with the highest correlation from the correlations corresponding to each phase as the candidate phase of the user to be identified.

[0040] After obtaining the user high-frequency load change sequence and the phase high-frequency load change sequence of each phase, this invention further performs significant change screening on the user load change amount to reduce the interference of other user load changes in the transformer area on phase identification. Specifically, for the k-th sampling time, if the amplitude of the load change amount of the user to be identified at that sampling time is greater than a certain percentage threshold of the sum of the amplitudes of the load changes of other users in the transformer area at that sampling time, then the user load change amount corresponding to that sampling time is defined as a significant change amount, and the significant change amount satisfies the condition shown in formula (5): (5) in, Let be the magnitude of the load change of the b-th user in the transformer area at the k-th sampling time, and n be the number of remaining users in the transformer area excluding the user to be identified. This is a preset proportional coefficient. Let be the amplitude of the load change of the user to be identified at the k-th sampling time. Multiple significant changes can be selected from the high-frequency load change sequence of the user using the above method, forming a significant user change sequence (i.e., the final user load change sequence). After obtaining the significant user change sequence, the phase load change of each phase at the same sampling time is extracted to form the corresponding phase significant change sequence (i.e., the final phase load change sequence). The correlation between the significant user change sequence and each phase significant change sequence is calculated using the Pearson correlation coefficient to characterize the coupling strength between user load change and phase load change. The calculation formula is shown in formula (6): = (6) in, For the user's significant change sequence, For a sequence of significant phase changes, cov( ) represents the covariance. , They are respectively and standard deviation The number of significant changes. The mean of the series of significant changes in user behavior. The mean of the sequence of significant phase changes. This represents the change in the user's behavior at the ind-th significant change point. Let be the change in phase at the ind-th significant change time. By calculating the correlation between the user and each phase, the phase with the highest correlation is selected as the candidate phase to which the user to be identified belongs.

[0041] S360. Based on the correlation, determine whether there is a phase to which the user to be identified belongs.

[0042] In an optional embodiment of the present invention, step S360 includes the following process: determining whether the relevance of the candidate phase is greater than a preset relevance threshold; if yes, then the phase of the candidate phase is taken as the phase of the user to be identified; if no, then there is no phase of the user to be identified.

[0043] After calculating the correlation between the user to be identified and each phase, a threshold judgment needs to be made on the correlation of the candidate phases to determine whether the phase to which the user belongs can be determined based on the correlation of significant changes. Specifically, the correlation between the user and each phase is compared, and the phase with the highest correlation is selected as the candidate phase, and the maximum correlation corresponding to the candidate phase is obtained. The maximum correlation is compared with a preset correlation threshold (e.g., 0.6). When the maximum correlation is greater than the preset correlation threshold, it indicates that the load change of the user to be identified has a strong correlation with the load change of the candidate phase, and there is a strong coupling relationship between the two. Therefore, the candidate phase can be determined as the phase to which the user belongs. Conversely, when the maximum correlation is less than or equal to the preset correlation threshold, it indicates that the correlation between the load change of the user to be identified and the load changes of each phase is weak, and the phase to which the user belongs cannot be determined by the correlation of significant changes. In this case, it is determined that there is no phase to which the user belongs, and the subsequent identification steps based on frequency domain features and phase recognition models are performed. By setting a correlation threshold, misjudging the user's phase can be avoided when the correlation is not obvious, thereby improving the reliability of phase recognition results.

[0044] S400. If it does not exist, the user load time series of the user to be identified is input into the phase identification model to obtain the phase to which the user to be identified belongs.

[0045] For users whose features are not obvious but whose power consumption is stable and cannot be identified in the previous step, this step is based on voltage flow theory and extracts low-frequency components to uncover deeper features.

[0046] In an optional embodiment of the present invention, step S400 includes the following process: S410 performs a discrete Fourier transform on the user load time series to extract low-frequency components, and reconstructs the extracted low-frequency components based on the discrete inverse Fourier transform to obtain the user low-frequency load sequence.

[0047] When dynamic programming and correlation of significant changes fail to determine the phase to which a user belongs, it indicates that the user's load variation is not significant or that they are a continuously stable electricity user. In this case, effective identification through high-frequency load variation characteristics is difficult. Therefore, this invention further uses low-frequency load characteristics for phase identification. Specifically, discrete Fourier transforms are performed on the user's load time series and the load time series of each phase to obtain the corresponding frequency domain features. High-frequency components are filtered out, low-frequency components are retained, and the user's low-frequency load sequence is reconstructed through discrete inverse Fourier transform. The low-frequency load sequences for each phase are obtained. After obtaining the low-frequency load sequences, the user low-frequency load sequences are normalized to eliminate differences in low-frequency load between different users. For the user i to be identified within the transformer area, its low-frequency load value at the k-th sampling time is denoted as... Its normalized voltage fluctuation eigenvalue As shown in formula (7): = (7) in, Let be the mean of the low-frequency load sequence for user i, and m be the number of sampling points. Through the above normalization process, a standardized feature sequence reflecting the low-frequency variation trend of users can be obtained, thus characterizing the voltage correlation between users under the same phase. This index can effectively characterize the voltage flow correlation between users under the same phase line, and is particularly suitable for identifying the phase characteristics of users with low-power continuous power consumption.

[0048] S420. Input the user's low-frequency load sequence into the phase recognition model to obtain the phase to which the user to be identified belongs.

[0049] In an optional embodiment of the present invention, step S420 includes the following process: inputting the user load time series of the user to be identified into the encoder of the phase recognition model to extract user load features; calculating the similarity between the user load features and the phase center vector of each phase, and selecting the phase corresponding to the phase center vector with the highest similarity as the phase to which the user to be identified belongs; wherein, the phase center vector is obtained by aggregating the user load features of each user with known phases in the training phase.

[0050] After obtaining the standardized low-frequency features, the low-frequency load sequence of the user to be identified is input into the encoder of the pre-trained phase recognition model to extract the user load features, denoted as... Calculate the cosine similarity between the user load characteristics and each phase center vector, as shown in formula (8): (8) in, The similarity between the user to be identified and the k-th phase is... Let be the phase center vector of the k-th phase. The value is the vector value. After the three phases are calculated, the phase corresponding to the phase center vector with the highest similarity is selected as the phase to which the user to be identified belongs, thereby realizing phase recognition based on low-frequency features and a contrastive learning model.

[0051] The phase recognition model is trained through contrastive learning. Specifically, this invention uses a 1D-CNN (composed of 3 convolutional layers and 1 fully connected layer) as the encoder of the phase recognition model. During the training phase, positive sample pairs of users with the same phase and negative sample pairs of users with different phases are constructed to reduce the distance between the user load feature vectors of users with the same phase and to increase the distance between the user load feature vectors of users with different phases. In one embodiment, the phase recognition model can be trained using a triplet loss function, the expression of which is shown in formula (9): (9) in, For anchor samples, For positive samples that belong to the same phase as the anchor sample, For negative samples that belong to a different phase from the anchor sample. The feature map output by the encoder. The preset interval parameter is used. After the model training is completed, the user load feature vectors of multiple known users belonging to the same phase are aggregated to obtain the phase center vector corresponding to each phase. ( ).

[0052] like Figure 2 The diagram illustrates the comparative learning process of this invention. During training, high-confidence user data obtained through the first step (Dynamic Programming) and the second step (Spectral Correlation Analysis) are used as model input. Different users (User1, User2, User4, User5) correspond to a specific phase (e.g., Phase A, Phase B, Phase C). The user load time series is input into the encoder for feature extraction. The encoder parameters are denoted as θ. For each user, three user load features are obtained. , , During training, a contrastive learning strategy is used to minimize the distance between feature vectors of samples with the same phase. This also maximizes the distance between the feature vectors of samples from different phases. This process creates clustered distributions of users with different phases in the feature space (Learning). After model training, the load time series of the user to be identified (Useri) is input into the encoder to obtain its user load features, denoted as... The feature space is then matched with the feature distribution of known phase users to determine the phase to which the user to be identified belongs.

[0053] like Figure 3 The diagram illustrates the one-dimensional convolutional neural network structure used in this invention. The model input is a user load time series, which is first processed through multiple one-dimensional convolutional layers for feature extraction. After each convolutional layer, a max pooling layer is used for dimensionality reduction and feature compression. The number and size of the convolutional kernels in the convolutional layers are 16@3×1, 32@3×1, and 64@3×1, respectively, to progressively extract higher-level temporal features. Here, 16@3×1 represents a one-dimensional convolutional layer with 16 kernels and a kernel size of 3×1. After convolutional feature extraction, the features are input to a fully connected layer, and a dropout layer is set in the fully connected layer to prevent overfitting. The fully connected layer outputs user load features (denoted as an embedding vector), which are used for feature distance calculation and phase recognition in subsequent contrastive learning. It should be noted that the number and size of the one-dimensional convolutional kernels can be adjusted according to the actual data scale and recognition accuracy requirements; this invention does not limit this.

[0054] This invention obtains data from a demonstration distribution network operated by China Southern Power Grid, comprising 38 users, forming dataset 1. Due to unstable communication channels and conflicting data acquisition commands, the effective sampling interval of this data ranges from 20 to 30 seconds. Because the sampling interval of the data from the China Southern Power Grid demonstration distribution network is unstable, data preprocessing becomes a necessary step. This process first defines a standard sampling interval and time series, aligns the raw data with this standard time series, and uses linear interpolation to fill in any missing values. Ablation experiments are conducted to sequentially verify the progressive advantages of the three proposed methods: dynamic programming (DP), spectrum correlation analysis (SCA), and spectrum contrastive learning (SCL). The computing workstation used has the following configuration: Operating system: Windows 11; CPU: Intel Core i5-13500f; Memory: 32 GB; GPU: NVIDIA GeForce RTX 3070 (8GB VRAM). The results are shown in Table 1.

[0055] Table 1 Comparison of Recognition Accuracy Evaluation of Different Methods It can be seen that when the number of users is small, increasing the sampling duration adds more physical constraints to the DP solution. This makes the algorithm more likely to converge to the true value, thus leading to a gradual increase in recognition accuracy. Due to the unique power consumption patterns of users, SCA significantly improves the accuracy. However, in this scenario, the performance gain of SCL is not significant, which may be due to the small data sample size or the lack of continuously low-power users specifically targeted by SCL. We will proceed to the next step of validation using dataset 2. Dataset 2 is a simulated dataset generated by a random generator, designed to construct a sample with a large user group. It contains three subsets with 200, 500, and 1000 users, respectively. In this dataset, the line loss rate error is set to a random value between 2% and 5%. The algorithm performance is further evaluated using a multi-user dataset. The sampling duration is set to 4 days, generating approximately 10,000 sampling points per household. The evaluation is carried out on subsets containing 200, 500, and 1000 users. The distribution ratio of different types of users varies, defined as: [Nighttime active users: Daytime active users: Random users: Continuously normal power consumption users: Continuously low power consumption users]. The result is as follows Figure 4 As shown, the algorithm's accuracy decreases slightly with the increase in the proportion of users maintaining low power consumption, but remains at a high level. Table 2 shows the contribution of each step of the algorithm to the accuracy improvement in the case of 1000 users.

[0056]

[0057] Table 2. Accuracy Comparison Table for Different User Distributions It can be seen that when the user base mainly consists of regular users with predictable patterns, DP and SCA are sufficient to identify most of these users. As the number of persistently low-power users (PSW) increases, SCL demonstrates its effectiveness. It is worth noting that SCL may lead to a slight decrease in accuracy in certain scenarios. This is because the low-frequency characteristics of regular users can be complex, and applying SCL to them may result in misidentification. Therefore, SCL should be selectively applied as a specific solution for PSW users. Figure 4As shown, this diagram illustrates the relationship between the accuracy (%) and computation time cost (h) of various phase recognition methods under different user sizes and distributions. The horizontal axis represents the phase recognition accuracy, and the vertical axis represents the computation time cost. Different colored points in the diagram represent different user distributions, including various user types such as "5:5:0:0:0", "5:3:2:0:0", "5:2:2:1:0", "5:2:1.5:1:0.5", and "2:2:2:2:2". The labels on the right indicate different user sizes, including 200 users, 500 users, and 1000 users. As can be seen from the figure, the computation time cost of the algorithm gradually increases with the increase of the user scale, while the overall recognition accuracy remains at a high level. There are certain differences in recognition accuracy and computation time cost under different user distribution conditions, indicating that the present invention can maintain a high recognition accuracy and has an acceptable computation time cost under different user scales and different load distribution conditions, demonstrating the effectiveness and applicability of the present invention in phase recognition of large-scale transformer area users.

[0058] like Figure 5 As shown, the phase recognition enhancement system based on frequency domain analysis and contrastive learning includes: a data acquisition module 510, a dynamic programming module 520, a frequency domain analysis module 530, and a contrastive learning module 540. The data acquisition module 510 acquires the user load time series of the user to be identified and the phase load time series of each phase within the same transformer area as the user to be identified. The dynamic programming module 520 performs phase allocation processing on the user load time series and each phase load time series using a dynamic programming algorithm to obtain the candidate phase corresponding to the user to be identified and the phase position confidence, and determines whether the phase to which the user to be identified belongs exists based on the confidence. The frequency domain analysis module 530, if the phase to which the user to be identified belongs does not exist, extracts frequency domain features from the user load time series and each phase load time series, calculates the correlation between the extracted frequency domain features of the user to be identified and the frequency domain features of each phase, and determines whether the phase to which the user to be identified belongs exists. The contrastive learning module 540, if the phase to which the user to be identified belongs does not exist, inputs the user load time series of the user to be identified into the phase recognition model to obtain the phase to which the user to be identified belongs.

[0059] Specific limitations regarding the phase recognition enhancement system based on frequency domain analysis and contrastive learning can be found in the limitations of the phase recognition enhancement method based on frequency domain analysis and contrastive learning mentioned above, and will not be repeated here. Each module in the aforementioned phase recognition enhancement system based on frequency domain analysis and contrastive learning can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware format or independent of it, or stored in the memory of a computer device in software format, so that the processor can call the corresponding operations of each module.

[0060] It should be noted that, in order to highlight the innovative aspects of this invention, this embodiment does not include modules that are not closely related to solving the technical problems proposed by this invention, but this does not mean that there are no other modules in this embodiment.

[0061] like Figure 6 As shown, the electronic device 6 may include a memory 61, a processor 62 and a bus, and may also include a computer program stored in the memory 61 and capable of running on the processor 62, such as a phase recognition enhancement program based on frequency domain analysis and contrastive learning.

[0062] The memory 61 includes at least one type of readable storage medium, including flash memory, portable hard drive, multimedia card, card-type memory (e.g., SD or DX memory), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 61 can be an internal storage unit of the electronic device 6, such as the portable hard drive of the electronic device 6. In other embodiments, the memory 61 can also be an external storage device of the electronic device 6, such as a plug-in portable hard drive, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the electronic device 6. Furthermore, the memory 61 can include both internal and external storage units of the electronic device 6. The memory 61 can be used not only to store application software and various types of data installed on the electronic device 6, such as code for phase recognition enhancement based on frequency domain analysis and contrastive learning, but also to temporarily store data that has been output or will be output.

[0063] In some embodiments, processor 62 may be composed of integrated circuits, such as a single packaged integrated circuit or multiple integrated circuits packaged with the same or different functions, including combinations of one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and various control chips. Processor 62 is the control unit of electronic device 6, connecting various components of the entire electronic device 6 via various interfaces and lines. It executes programs or modules stored in memory 61 (such as phase recognition enhancement programs based on frequency domain analysis and contrastive learning) and calls data stored in memory 61 to perform various functions and process data in electronic device 6.

[0064] Processor 62 executes the operating system of electronic device 6 and various installed applications. Processor 62 executes applications to implement the steps in the phase recognition enhancement method based on frequency domain analysis and contrastive learning described above.

[0065] For example, a computer program can be divided into one or more modules, one or more of which are stored in memory 61 and executed by processor 62 to complete this application. The one or more modules can be a series of computer program instruction segments capable of performing specific functions, which describe the execution process of the computer program in electronic device 6. For example, the computer program can be divided into a data acquisition module 510, a dynamic programming module 520, a frequency domain analysis module 530, and a contrastive learning module 540.

[0066] The integrated unit implemented as a software functional module described above can be stored in a computer-readable storage medium, which can be non-volatile or volatile. The software functional module stored in the storage medium includes several instructions to cause a computer device (which may be a personal computer, computer equipment, or network device, etc.) or processor to execute some functions of the phase recognition enhancement method based on frequency domain analysis and contrastive learning according to various embodiments of this application.

[0067] In summary, compared with existing technologies, this invention combines dynamic programming, frequency domain correlation analysis, and phase recognition models. When user load changes significantly, it prioritizes the use of physical constraint-based dynamic programming; when load changes are not significant, it uses frequency domain feature analysis; and when power consumption is continuous and stable or features are not obvious, it uses a deep learning model for identification. This makes it applicable to users with different power consumption behaviors, improves the accuracy and applicability of phase recognition, reduces misjudgments, and improves the reliability of phase recognition results.

[0068] The above embodiments are merely illustrative of the principles and effects of the present invention and are not intended to limit the invention. Any person skilled in the art can modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by those skilled in the art without departing from the spirit and technical concept disclosed in the present invention should still be covered by the claims of the present invention.

Claims

1. A phase recognition enhancement method based on frequency domain analysis and contrastive learning, characterized in that, The method includes: Obtain the user load time series of the user to be identified and the phase load time series of each phase in the same area as the user to be identified; Based on the dynamic programming algorithm, phase assignment processing is performed on the user load time series and each phase load time series to obtain the candidate phase to which the user to be identified belongs and the phase position confidence. Based on the confidence, it is determined whether there is a phase to which the user to be identified belongs. If not, then frequency domain features are extracted from the user load time series and the load time series of each phase, and the correlation between the extracted frequency domain features of the user to be identified and the frequency domain features of each phase is calculated to determine whether there is a phase to which the user to be identified belongs. If it does not exist, the user load time series of the user to be identified is input into the phase identification model to obtain the phase to which the user to be identified belongs.

2. The phase recognition enhancement method based on frequency domain analysis and contrastive learning according to claim 1, characterized in that, The steps of extracting frequency domain features from the user load time series and the phase load time series, calculating the correlation between the extracted frequency domain features of the user to be identified and the frequency domain features of the three phases, and determining whether there is a phase to which the user to be identified belongs include: Discrete Fourier transforms are performed on the user load time series and the phase load time series of each phase, respectively, to obtain the user load frequency domain feature sequence and the phase load frequency domain feature sequence; High-frequency components are extracted from the user load frequency domain feature sequence and the load frequency domain feature sequence of each phase, and the extracted high-frequency components are reconstructed according to the discrete inverse Fourier transform to obtain the corresponding user high-frequency time-series load sequence and the phase high-frequency time-series load sequence of each phase. Based on the user high-frequency time-series load sequence, the user load change at adjacent times is calculated to form an initial user load change sequence; Based on the phase high-frequency time-series load sequence of each phase, the phase load change at adjacent times is calculated to form the initial load change sequence of each phase; Calculate the correlation between the initial user load change sequence and the initial phase load change sequence for each phase; Based on the correlation, it is determined whether the phase to which the user to be identified belongs exists.

3. The phase recognition enhancement method based on frequency domain analysis and contrastive learning according to claim 2, characterized in that, The step of calculating the correlation between the initial user load change sequence and the initial phase load change sequence for each phase includes: For each phase: From the initial sequence of user load changes, user load changes whose magnitude is greater than the adaptive change threshold at the sampling time are selected to form the final sequence of user load changes; wherein, the adaptive change threshold is obtained based on the sum of the user load changes of all remaining users in the transformer area at the sampling time. Based on the final user load change sequence, the phase load change at the corresponding sampling time is extracted from the initial phase load change sequence to form the corresponding final phase load change sequence. Calculate the Pearson correlation coefficient between the user load change sequence and the phase load change sequence as the correlation between the two; The phase with the highest correlation among all phases is selected as the candidate phase for the user to be identified.

4. The phase recognition enhancement method based on frequency domain analysis and contrastive learning according to claim 3, characterized in that, The step of determining whether the phase to which the user to be identified belongs exists based on the correlation includes: Determine whether the relevance of the candidate's phase is greater than a preset relevance threshold: If so, the phase of the candidate phase is taken as the phase of the user to be identified; If not, then there is no phase to which the user to be identified belongs.

5. The phase recognition enhancement method based on frequency domain analysis and contrastive learning according to claim 1, characterized in that, The steps of inputting the user load time series of the user to be identified into the phase identification model to obtain the phase to which the user to be identified belongs include: The user load time series is subjected to Discrete Fourier Transform to extract low-frequency components, and the extracted low-frequency components are reconstructed according to Discrete Inverse Fourier Transform to obtain the user low-frequency load series. The user's low-frequency load sequence is input into the phase recognition model to obtain the phase to which the user to be identified belongs.

6. The phase recognition enhancement method based on frequency domain analysis and contrastive learning according to claim 5, characterized in that, The steps of inputting the user load time series of the user to be identified into the phase identification model to obtain the phase to which the user to be identified belongs include: The user load time series of the user to be identified is input into the encoder of the phase recognition model to extract user load features; The user load features are input into the classifier of the phase recognition model, the similarity between the user load features and the phase center vectors of each phase is calculated, and the phase corresponding to the phase center vector with the highest similarity is selected as the phase to which the user to be identified belongs; wherein, the phase center vector is obtained by aggregating the user load features of each user with known phases in the training phase.

7. The phase recognition enhancement method based on frequency domain analysis and contrastive learning according to claim 6, characterized in that, The phase recognition model is trained through a contrastive learning method.

8. A phase recognition enhancement system based on frequency domain analysis and contrastive learning, characterized in that, The system includes: The data acquisition module is used to acquire the user load time series of the user to be identified and the phase load time series of each phase in the same area as the user to be identified; The dynamic programming module is used to perform phase allocation processing on the user load time series and each phase load time series based on the dynamic programming algorithm, to obtain the candidate phase to which the user to be identified belongs and the phase position confidence, and to determine whether there is a phase to which the user to be identified belongs based on the confidence. The frequency domain analysis module is used to extract frequency domain features from the user load time series and the load time series of each phase if the user does not exist, and to calculate the correlation between the extracted frequency domain features of the user to be identified and the frequency domain features of each phase, so as to determine whether the phase to which the user to be identified belongs exists. The contrastive learning module is used to input the user load time series of the user to be identified into the phase recognition model if the phase does not exist, so as to obtain the phase to which the user to be identified belongs.