Communication network optimization method, system and equipment based on self-cooperative selection and medium
Through the self-collaboratively selected communication network optimization method, the Gaussian anomaly detection algorithm and network state detection model are used to solve the problems of the communication module of the metering terminal in the prior art supporting a single operator, missing redundant channels and low fault diagnosis efficiency, realizing automatic network switching and communication network optimization of the metering terminal group, improving network availability and operation and maintenance efficiency.
Patent Information
- Application Number
- CN202510316421.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-18
- Publication Date
- 2025-06-17
AI Technical Summary
The existing metering public network communication module only supports a single operator, lacks redundant uplink channels, has low communication reliability, and lacks automated fault diagnosis methods, resulting in data transmission interruption and low operation and maintenance efficiency.
Using a communication network optimization method based on self-collaborative selection, a network state detection model is constructed using a Gaussian anomaly detection algorithm to realize automatic network switching and group collaborative optimization.
The network synchronization switching of metering terminal groups is realized, network availability and communication reliability are improved, operation and maintenance efficiency and data transmission stability are improved.
Smart Images

Figure CN120166038A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of communication network optimization, and particularly to a communication network optimization method, system, device, and medium based on self-collaborative selection. Background Art
[0002] With the continuous advancement of the construction of digital power grids, the integration of the Internet of Things and traditional power grids has been continuously strengthened. As a key node in the new generation of metering systems, ensuring the reliable backhaul of collected data is the basis for achieving minute-level collection. Currently, the widely used metering communication modules are based on public network technologies, but there are still some problems.
[0003] On the one hand, the terminal communication module only supports a single operator's SIM card. When the base station is powered off or the signal is poor, the terminal immediately disconnects from the network and has no redundant channels, resulting in data transmission interruption and requiring manual on-site processing. On the other hand, there is a lack of automated analysis means for network air interface anomalies such as signal quality deterioration and base station handover failure. Maintenance depends on SIM card replacement tests or operator feedback, with low efficiency and inability to locate the root cause. In addition, the operation data of the public network depends on operator push and cannot be directly obtained from the terminal device, resulting in difficulties in verifying data authenticity, making it difficult to support multi-source data fusion and in-depth analysis. Moreover, each metering terminal device operates independently and cannot dynamically collaborate and switch according to the network status, and the overall communication reliability is limited by the performance of a single point. Summary of the Invention
[0004] To solve the above technical problems, the present invention provides a communication network optimization method, system, device, and medium based on self-collaborative selection, so as to solve the problems of existing metering public network communication modules that only support a single operator, have no redundant upstream channels, low reliability, and lack of fault diagnosis means, and achieve the technical effect of automatically switching the network of metering terminals and group collaborative optimization.
[0005] In a first aspect, the present invention provides a communication network optimization method based on self-collaborative selection, and the method includes:
[0006] Obtain the historical network parameters of each candidate network of the metering terminal group, evaluate the credibility of the historical network parameters, and screen out network characteristic parameters. The metering terminal group includes several metering terminals, and each metering terminal uses the same communication network;
[0007] Collect the real-time network parameters of each candidate network, extract real-time network characteristic parameters from the real-time network parameters according to the network characteristic parameters, and generate a detection feature vector based on the sliding window mechanism;
[0008] Input the detected feature vector into a pre-constructed network status detection model to obtain the network operation status and network switching flag of each candidate network, where the network status detection model is constructed based on the Gaussian anomaly detection algorithm;
[0009] According to the network switching flag, determine whether the current network of the metering terminal group needs to be switched. In response to the need for switching, select the optimal status network from each candidate network according to the network operation status;
[0010] Generate a network switching instruction according to the optimal status network and send it to the metering terminal group to achieve network synchronous switching of the metering terminal group.
[0011] Further, the steps of obtaining the historical network parameters of each candidate network of the metering terminal group, evaluating the credibility of the historical network parameters, and screening out the network feature parameters include:
[0012] Obtain the historical network parameters of each candidate network of the metering terminal group and perform data cleaning on the historical network parameters. The historical network parameters include signal quality parameters, base station information parameters, and network status parameters;
[0013] Evaluate the credibility of the cleaned historical network parameters and sort them according to the evaluation results to obtain a credibility ranking;
[0014] Select the corresponding network feature parameters from the credibility ranking according to the preset parameter rules.
[0015] Further, the steps of evaluating the credibility of the cleaned historical network parameters and sorting them according to the evaluation results to obtain a credibility ranking include:
[0016] Use the coefficient of variation to quantify the parameter volatility of the cleaned historical network parameters to obtain the historical volatility coefficients of each historical network parameter;
[0017] According to the historical fault logs of each candidate network, use the Pearson correlation coefficient to calculate the historical correlation coefficient between the historical network parameter fluctuations and the candidate network interruptions;
[0018] Sort the historical network parameters comprehensively in ascending order of the historical volatility coefficient and descending order of the historical correlation coefficient to obtain a credibility ranking.
[0019] Further, the construction steps of the network status detection model include:
[0020] Construct a detection feature set based on network feature parameters according to historical network parameters. The detection feature set includes a normal feature set and an abnormal feature set;
[0021] Randomly select normal network feature parameters from the normal feature set to form a pre-training feature set, and jointly form a cross-validation feature set with the abnormal feature set and the remaining normal network feature parameters in the normal feature set;
[0022] Construct a network state detection model with the Gaussian distribution probability density of network feature parameters as the objective function;
[0023] Use the pre-training feature set to perform initial training on the network state detection model, and use the cross-validation feature set to perform model tuning and verification on the network state detection model to obtain the trained network state detection model.
[0024] Further, the step of using the cross-validation feature set to perform model tuning and verification on the network state detection model to obtain the trained network state detection model includes:
[0025] Construct a loss function according to the accuracy and recall rate of the model prediction results, and use the covariance matrix of the network state detection model as a positive definite matrix as a constraint condition;
[0026] According to the gradient descent method, calculate the partial derivatives of the loss function with respect to the model parameters, where the model parameters include the mean and covariance matrix;
[0027] Iteratively update the model parameters according to the partial derivatives;
[0028] Perform a candidate anomaly threshold traversal in the cross-validation feature set, calculate the F1 score corresponding to each candidate anomaly threshold, and select the candidate anomaly threshold with the highest F1 score as the anomaly threshold of the network state detection model;
[0029] When the loss function reaches the preset convergence condition or the model iteration times reach the preset iteration times, stop the iterative update to obtain the trained network state detection model.
[0030] Further, the step of inputting the detection feature vector into a pre-constructed network state detection model to obtain the network operation state and network switching mark of each candidate network includes:
[0031] Input the detection feature vector into a pre-constructed network state detection model to obtain the Gaussian distribution probability density of the detection feature vector;
[0032] Compare the Gaussian distribution probability density with the anomaly threshold. If it is less than the anomaly threshold, set the network switching mark of the candidate network to the switching mark. Otherwise, set the network switching mark of the candidate network to the keep mark.
[0033] Further, after the step of generating a network switching instruction according to the optimal state network and sending it to the metering terminal group to achieve network synchronization switching of the metering terminal group, the method further includes:
[0034] Weighted sum the historical fluctuation coefficient and the historical correlation coefficient according to a preset weight to obtain the initial weight of each historical network parameter;
[0035] Based on the real-time network parameters of each candidate network, calculate the real-time fluctuation coefficient of each real-time network parameter based on the sliding window mechanism and the anomaly coefficient;
[0036] Update the initial weight according to the ratio of the real-time fluctuation coefficient to the historical fluctuation coefficient to obtain the parameter weight;
[0037] Update the network feature parameters according to the parameter weight, and update the network state detection model according to the updated network feature parameters.
[0038] In a second aspect, the present invention provides a communication network optimization system based on self-collaborative selection, the system includes:
[0039] A feature screening module, configured to obtain the historical network parameters of each candidate network of the metering terminal group, evaluate the credibility of the historical network parameters, and screen out network feature parameters. The metering terminal group includes several metering terminals, and the networks of each metering terminal are synchronized;
[0040] A network monitoring module, configured to collect the real-time network parameters of each candidate network, extract real-time network feature parameters from the real-time network parameters according to the network feature parameters, and generate a detection feature vector based on the sliding window mechanism;
[0041] Input the detection feature vector into a pre-constructed network state detection model to obtain the network operation state and network switching mark of each candidate network. The network state detection model is constructed based on the Gaussian anomaly detection algorithm;
[0042] A network switching module, configured to determine whether the current network of the metering terminal group needs to be switched according to the network switching mark, and in response to the need for switching, select the optimal state network from each candidate network according to the network operation state;
[0043] Generate a network switching instruction according to the optimal state network and send it to the metering terminal group to achieve network synchronization switching of the metering terminal group.
[0044] In a third aspect, an embodiment of the present invention further provides a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the steps of the above method are implemented.
[0045] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above method are implemented.
[0046] The present invention provides a communication network optimization method, system, device, and medium based on self-collaborative selection. Through the dual-channel separation design and multi-network switching strategy, the present invention can achieve seamless switching of the communication network of the metering terminal, improve network availability. Through the Gaussian anomaly detection model based on feature parameter selection and semi-supervised learning training strategy, the efficiency and accuracy of model detection can be improved. At the same time, through the dynamic adjustment of feature parameters and model parameters, the model can adapt to the changes of the dynamic network environment, thereby improving the dynamic adaptive ability of the model. The present invention provides a highly stable and adaptive network switching solution for power IoT communication, which can significantly improve the intelligent level and operation and maintenance efficiency of the digital power grid. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 is a schematic flowchart of the communication network optimization method based on self-collaborative selection in an embodiment of the present invention;
[0048] Figure 2 is a schematic structural framework diagram of the communication network optimization method based on self-collaborative selection in an embodiment of the present invention;
[0049] Figure 3 is a schematic structural diagram of the communication network optimization system based on self-collaborative selection in an embodiment of the present invention;
[0050] Figure 4 is an internal structural diagram of the computer device in an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0051] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Apparently, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0052] Please refer to Figure 1 , a communication network optimization method based on self-collaborative selection proposed in the first embodiment of the present invention, which includes steps S10 to S50:
[0053] Step S10: Obtain the historical network parameters of each candidate network of the metering terminal group, evaluate the credibility of the historical network parameters, and filter out network feature parameters. The metering terminal group includes several metering terminals, and the networks of the metering terminals are synchronized.
[0054] Step S20: Collect the real-time network parameters of each candidate network, extract real-time network feature parameters from the real-time network parameters according to the network feature parameters, and generate a detection feature vector based on a sliding window mechanism.
[0055] Step S30: Input the detection feature vector into a pre-constructed network status detection model to obtain the network operation status and network switching flag of each candidate network. The network status detection model is constructed based on the Gaussian anomaly detection algorithm.
[0056] Step S40: Determine whether the current network of the metering terminal group needs to be switched according to the network switching flag. In response to the need for switching, select the optimal status network from each candidate network according to the network operation status.
[0057] Step S50: Generate a network switching instruction according to the optimal status network and send it to the metering terminal group to achieve network synchronization switching of the metering terminal group.
[0058] The present invention provides a communication network optimization method for power metering terminals. In the present invention, multiple metering terminals are grouped, and all metering terminals in the group use the same communication network. In order to achieve unified management of the communication network of power metering terminals, in a preferred embodiment, please refer to Figure 2 , the present invention sets up a management platform for the metering terminal group. The management platform can uniformly manage the communication networks of each metering terminal in the metering terminal group, such as Figure 2 shown. The current metering terminal group uses network A provided by a certain operator as the communication network, and at the same time realizes diagnostic analysis and network optimization for faults caused by abnormal radio interfaces of the terminal network. The present invention also sets up a main device for the metering terminal group. In the main device, a module A and a module B with dual-channel separation are built in. Module A and module B are connected by a serial port. Among them, module B is used as a monitoring channel to monitor all candidate networks available to the metering terminal, such as Figure 2 shown network A, network B, and network C and other communication networks provided by different operators, and module A is used as a management channel to communicate with the management platform through wired or wireless connection to achieve data transmission and task distribution.
[0059] Under this architecture, the present invention realizes the unified management of the communication network of metering terminals by monitoring the network status of each metering terminal and all candidate networks in real time, and determining the optimal network through the analysis of the network status. Due to the separate design of the management channel and the monitoring channel, it can ensure that the management channel remains online during the network switching process, thus effectively reducing the switching interruption time. And through the redundant uplink channels of multi-operator SIM cards, it can automatically switch to the optimal network in case of a single network failure, thereby effectively improving the network availability.
[0060] When analyzing the network status, since there are many network parameters in the communication network, if all network parameters are used for analysis, it will not only increase the computational complexity, but also introduce more noise due to the different importance levels of each parameter, thus affecting the accuracy of the analysis results. To solve this problem, the present invention first analyzes the historical network parameters of all candidate networks, and selects characteristic network parameters for subsequent network status determination. When screening the characteristic network parameters, the credibility of the network parameters can be calculated, and the parameter with the highest credibility can be selected, or through the trade-off analysis of cost and performance, combining the historical operation and maintenance costs (such as the fees of different operators, the base station maintenance costs) and the parameter performance (such as the frequency band coverage range), the parameter with the best comprehensive cost performance can be selected as the characteristic parameter for subsequent analysis.
[0061] In a preferred embodiment, the present invention screens out the network characteristic parameters by evaluating the credibility of the historical network parameters. The specific steps include:
[0062] Obtain the historical network parameters of each candidate network of the metering terminal group, and perform data cleaning on the historical network parameters. The historical network parameters include signal quality parameters, base station information parameters, and network status parameters;
[0063] Evaluate the credibility of the cleaned historical network parameters, and sort them according to the evaluation results to obtain a credibility ranking;
[0064] Select the corresponding network characteristic parameters from the credibility ranking according to the preset parameter rules.
[0065] In this embodiment, first obtain the historical network parameters of all candidate networks. The obtaining method can be obtained from the monitoring database of module B or from each network operator corresponding to the candidate network. The historical network parameters include signal quality parameters, base station information parameters, and network status parameters. Among them, the signal quality parameters include reference signal received power (RSRP), signal-to-noise ratio (SINR), and received signal strength indication (RSSI); the base station information includes physical cell identifier (PCI), frequency point, and frequency band (BAND); the network status parameters include network latency, packet loss rate, and bandwidth utilization rate.
[0066] Clean the historical network parameters, removing invalid data and outliers, such as signal loss periods and extreme point fluctuations, etc. Then, evaluate the credibility of the network parameters after data cleaning. In this embodiment, the credibility of the parameters is evaluated by the volatility of the parameters and the correlation with network failures, so as to screen out the key parameters with high stability and low volatility. The specific evaluation steps are as follows:
[0067] Use the coefficient of variation to quantify the parameter volatility of the cleaned historical network parameters, and obtain the historical volatility coefficients of each historical network parameter;
[0068] According to the historical fault logs of each candidate network, use the Pearson correlation coefficient to calculate the historical correlation coefficient between the historical network parameter fluctuations and the candidate network interruptions;
[0069] Sort the historical network parameters comprehensively in ascending order of the historical volatility coefficient and descending order of the historical correlation coefficient to obtain the credibility ranking.
[0070] In this embodiment, the credibility evaluation includes two parts: parameter volatility quantification and parameter-fault correlation verification. Among them, this embodiment uses the coefficient of variation to characterize the volatility of each network parameter. The coefficient of variation is a dimensionless statistic used to measure the degree of data dispersion, which is the ratio of the standard deviation to the arithmetic mean. For each historical network parameter, its coefficient of variation, that is, the historical volatility coefficient, is obtained by calculating its standard deviation and mean.
[0071] For the parameter-fault correlation verification, first, through the historical fault logs of each candidate network, count the relevance between parameter fluctuations and network interruptions (such as lag and disconnection events), and then use the Pearson correlation coefficient to verify the linear correlation between the parameters and the faults, and use the Pearson correlation coefficient of each parameter as the historical correlation coefficient between the historical network parameter fluctuations and the candidate network interruptions.
[0072] Then, a comprehensive sorting is performed according to volatility and correlation, that is, the historical network parameters are comprehensively sorted in ascending order of the historical volatility coefficient and descending order of the historical correlation coefficient. By ascending the volatility, parameters with high stability are preferentially selected. By sorting in descending order of correlation, parameters strongly correlated with faults are preferentially selected. When sorting, first sort in ascending order of volatility. If the historical volatility coefficients are the same, then sort in descending order of the historical correlation coefficient. Finally, network feature parameters are selected from the credibility sorting. When selecting parameters, one or more network parameters can be selected from the sorting according to the credibility sorting. The specific number of selections can be set in advance, or parameters with low volatility and high correlation can be selected in the way that the historical volatility coefficient is less than the volatility threshold and the historical correlation coefficient is greater than the correlation threshold. Preferably, the parameter with the highest credibility needs to satisfy: CV < 15% and |r| > 0.6, where CV represents the historical volatility coefficient and r represents the historical correlation coefficient.
[0073] For the selected network feature parameters, the present invention constructs a network state detection model based on the historical network feature parameters, and determines the current network state of each candidate network by inputting the collected real-time network feature parameters into the model. The steps for constructing the network state detection model include:
[0074] Construct a detection feature set based on network feature parameters according to the historical network parameters, where the detection feature set includes a normal feature set and an abnormal feature set;
[0075] Randomly select normal network feature parameters from the normal feature set to form a pre-training feature set, and jointly form a cross-validation feature set with the abnormal feature set and the remaining normal network feature parameters in the normal feature set;
[0076] Construct a network state detection model with the Gaussian distribution probability density of network feature parameters as the objective function;
[0077] Use the pre-training feature set to perform initial training on the network state detection model, and use the cross-validation feature set to perform model tuning and verification on the network state detection model to obtain the trained network state detection model.
[0078] In this embodiment, first, a sliding window mechanism is adopted to establish a detection feature vector of historical network feature parameters. The length of the time series window is defined, and data is collected by sliding at fixed time intervals, thereby constructing the detection feature vector. Then, a data set, that is, a detection feature set, is constructed based on the detection feature vector. Among them, the detection feature set includes a normal feature set and an abnormal feature set. The normal feature set contains feature sequences of normal network states, and the abnormal feature set contains feature sequences of abnormal network states. Then, the detection feature set is classified. Feature sequences of normal network states (without switching) are randomly selected from the normal feature set to establish a pre-training feature set for initial training of the model. The remaining feature sequences in the normal feature set and the feature sequences of known abnormalities (requiring network switching) in the abnormal feature set are jointly composed of a cross-validation feature set for model tuning and verification.
[0079] In this embodiment, the network state detection model is constructed based on the Gaussian anomaly detection algorithm. Specifically, the Gaussian distribution probability density of the detection feature vector is used as the objective function of the model:
[0080]
[0081] In the formula, x t represents the detection feature vector at time t, μ represents the mean of the vector, Ω represents the covariance matrix of the vector, (*) T represents the transpose, (*) -1 represents the inverse matrix.
[0082] Through the pre-training feature set, the initial values of the model parameters, that is, the vector mean and the vector covariance matrix, are calculated. At the same time, the initial value of the anomaly threshold ε of the model is set to a random number within the range of (0, 1). Through the comparison relationship between the probability density and the anomaly threshold, the relationship between the detection feature vector of the network and network switching is determined:
[0083]
[0084] In the formula, Y t represents the network switching flag at time t.
[0085] In this embodiment, through the network state detection model, the probability that the detection feature vector belongs to the normal distribution can be calculated, that is, the normal probability that can characterize the network operation state. And according to the comparison relationship between the probability density and the anomaly threshold, it is determined whether the network needs to be switched. If the Gaussian distribution probability density is less than the anomaly threshold, it means that the probability of the abnormal state of the network is relatively high and the network needs to be switched. Otherwise, it means that the current network operation state is normal and the connection can be continued.
[0086] For the network status detection model that has completed the initial training, it is also necessary to use the cross-validation feature set to optimize and validate the network status detection model. The model optimization and validation can adopt conventional model training methods, which will not be elaborated here.
[0087] In order to improve the accuracy of the network status detection model in a dynamic network and ensure the reliability of the detection results, in a preferred embodiment, the present invention optimizes the model parameters through precision and recall rate. The specific steps include:
[0088] Construct a loss function based on the precision and recall rate of the model prediction results, and use the covariance matrix of the network status detection model as a positive definite matrix as a constraint condition;
[0089] According to the gradient descent method, calculate the partial derivatives of the loss function with respect to the model parameters, where the model parameters include the mean and covariance matrix;
[0090] Iteratively update the model parameters according to the partial derivatives;
[0091] Traverse the candidate anomaly thresholds in the cross-validation feature set, calculate the F1 scores corresponding to each candidate anomaly threshold, and select the candidate anomaly threshold with the highest F1 score as the anomaly threshold of the network status detection model;
[0092] When the loss function reaches the preset convergence condition or the model iteration times reach the preset iteration times, stop the iterative update to obtain the trained network status detection model.
[0093] In this embodiment, when using the cross-validation feature set to optimize the model parameters, the precision / recall rate is also combined to update the model parameters. In the conventional technology, the model parameters of traditional Gaussian anomaly detection are usually directly calculated by maximum likelihood estimation, that is, directly learning the normal distribution from unlabeled data without relying on fault markers, which belongs to the conventional method of unsupervised learning. And precision Precision and recall Recall are classification performance indicators in supervised learning, which are often used to adjust the classification threshold or optimize the model. In this embodiment, the unsupervised model is optimized through the supervised index, so as to improve the adaptability of network handover detection in complex environments.
[0094] Based on the above principles, the entire training steps of the network status detection model will be described below:
[0095] ① Dataset definition
[0096] Construct a pre-training feature set and a cross-validation feature set, and label the true labels for the sample data in the cross-validation feature set. Among them, y = 0 indicates the normal state and no handover is required, and y = 1 indicates the abnormal state and handover is required.
[0097] ② Model parameter initialization
[0098] Initialize the model's vector mean and vector covariance matrix based on the pre-trained feature set, and set the initial anomaly threshold according to the distribution of the pre-trained feature set. For example, take the 5% quantile of the distribution density.
[0099] ③ Cross-validation and metric calculation
[0100] For each sample in the cross-validation feature set, calculate its probability density, perform anomaly prediction according to the initial anomaly threshold, and calculate the precision Precision and recall Recall based on the comparison between the prediction result and the true label. Then calculate the F1 score based on the precision and recall.
[0101] ④ Parameter optimization objective
[0102] According to the weighted sum of maximizing precision and recall, since the gradient descent algorithm is default used to minimize the loss function, the maximization objective needs to be converted into a minimization problem. Therefore, define the loss function as:
[0103] L = -(Precision + λ · Recall)
[0104] In the formula, λ represents the recall weight factor, Precision represents precision, and Recall represents recall.
[0105] At the same time, define the constraint condition of the loss function as that the covariance matrix of the vector is a positive definite matrix, so as to ensure the effectiveness of the probability density.
[0106] ⑤ Parameter update by gradient descent method
[0107] First, perform gradient calculation, that is, calculate the partial derivatives of the loss function with respect to the mean μ and the covariance matrix Ω through numerical differentiation or automatic differentiation tools, and then update the mean μ and the covariance matrix Ω according to the partial derivatives:
[0108]
[0109] In the formula, μ new and Ω new represent the updated mean and covariance matrix respectively, μ old and Ω old represent the mean and covariance matrix before update respectively, and η represents the preset learning rate.
[0110] ⑥ Threshold dynamic adjustment
[0111] Optimize the anomaly threshold based on the F1 score, that is, traverse different candidate anomaly thresholds in the cross-validation feature set, and select the threshold that maximizes the F1 score as the anomaly threshold. If the current F1 score is lower than 90% of the historical best value, trigger the recalculation of the threshold.
[0112] ⑦ Iteration termination condition
[0113] There are two termination conditions for the iterative optimization of model parameters. One is convergence judgment, that is, when the change amplitude of the loss function in several consecutive iterations is less than the amplitude threshold, it is determined that the iteration converges. For example, |△L| < δ and δ = 0.001. The second is the maximum iteration number judgment. By setting the maximum iteration number, such as 100 times, infinite loops are prevented.
[0114] In this embodiment, by introducing a labeled cross-validation feature set, the supervision index is incorporated into model optimization. By maximizing precision and recall, the Gaussian distribution parameters are dynamically adjusted, and by calculating the gradient of the precision / recall with respect to the model parameters, the distribution parameters are adjusted backpropagatively, making the model pay more attention to the features strongly related to faults, thereby reducing false alarms and missed alarms and improving the accuracy of the model detection results. Through the training method provided in this embodiment, in the scenario where the power grid network fluctuates frequently, the model parameters can be dynamically adjusted with real-time data, avoiding the performance degradation of traditional static models caused by environmental changes and making the model more in line with the actual business requirements. This embodiment optimizes the unsupervised model through the supervision index, can significantly improve the detection performance, and provides a highly robust network switching solution for the power Internet of Things scenario.
[0115] After training the network status detection model through the above steps, the management platform can, based on actual needs, send monitoring tasks to module A at regular intervals. Module A communicates with module B through the serial port. Module B uses SIM cards of different operators as monitoring channels to maintain connections with each operator's network and monitor the network status parameters of multiple operators. These network status parameters will be reported to the management platform through module A. At the same time, the management platform will also obtain the network status information of each metering terminal in the metering terminal group to achieve unified management of the terminal network.
[0116] In the management platform, the collected real-time network feature parameters are used to generate real-time detection feature vectors through a sliding window mechanism and input into the trained network status detection model to obtain the Gaussian distribution probability density of each candidate network. According to the comparison relationship between the probability density and the anomaly threshold, the corresponding network switching mark is determined. At this time, the network operation status of each candidate network, that is, the Gaussian distribution probability density, and the network switching mark corresponding to this network can be obtained.
[0117] The management platform determines the current communication network of the metering terminal group based on the communication network information uploaded by the metering terminals, and determines whether the network switching flag corresponding to the current communication network is a switching flag according to the detection result output by the model. If so, the candidate network with the highest probability density of the normal network operation state is selected as the optimal state network according to the Gaussian distribution probability density, and a network switching instruction is generated and sent to the metering terminal group, so as to realize the synchronous and rapid switching of the communication network of the entire metering terminal group. If the flag is a holding flag, the current communication network of the metering terminal group remains unchanged.
[0118] In a preferred embodiment, in order to improve the accuracy and adaptability of the network state detection model in the dynamic network environment of the power system, the present invention also provides a method for dynamically updating the detection feature parameters. The specific steps include:
[0119] Performing weighted summation on the historical fluctuation coefficient and the historical correlation coefficient according to a preset weight to obtain the initial weight of each historical network parameter;
[0120] Based on the real-time network parameters of each candidate network, calculating the real-time fluctuation coefficient of each real-time network parameter based on the sliding window mechanism and the anomaly coefficient;
[0121] Updating the initial weight according to the ratio of the real-time fluctuation coefficient to the historical fluctuation coefficient to obtain the parameter weight;
[0122] Updating the network feature parameters according to the parameter weight, and updating the network state detection model according to the updated network feature parameters.
[0123] In this embodiment, first, the initial weight is calculated by weighted summation according to the historical fluctuation coefficient and the historical correlation coefficient of each historical network parameter; then, the real-time network parameters of each candidate network are obtained, and the real-time fluctuation coefficient of the real-time network parameter is calculated through the sliding window mechanism and the anomaly coefficient; then, the initial weight is updated according to the ratio of the real-time fluctuation coefficient to the historical fluctuation coefficient:
[0124]
[0125] where ω new represents the updated parameter weight, ω old represents the parameter weight before update, represents a preset dynamic adjustment coefficient, CV r represents the real-time fluctuation coefficient, CV h represents the historical fluctuation coefficient.
[0126] Then, according to the latest parameter weights, update the detection feature parameters. If the weight ω of a certain detection feature parameter is new less than zero for several consecutive times, then select the next sub-optimal parameter from the credibility ranking to replace the current detection feature parameter. At the same time, the replaced parameter should meet the previously set requirements for volatility and correlation. If it does not meet the requirements, continue to replace. Finally, update and train the network status detection model according to the updated detection feature parameters, so as to obtain an updated network status detection model, and use the updated network status detection model to continue to detect the network status of the candidate network. Through the feature parameter dynamic adjustment method provided in this embodiment, the adaptability of the model to the dynamic network environment can be improved, and the detection accuracy of the model is further ensured.
[0127] A communication network optimization method based on self-collaborative selection provided in this embodiment. Through the dual-channel separation design and multi-network switching strategy, the invention realizes the seamless switching of the communication network of the metering terminal, improves the network availability, and effectively improves the detection efficiency and accuracy of the model through the Gaussian anomaly detection model based on the feature parameter selection and semi-supervised learning training strategy. At the same time, through the dynamic adjustment of the feature parameters and model parameters, the model can adapt to the changes in the dynamic network environment, improving the dynamic adaptability of the model. The invention provides a highly stable and adaptive network switching solution for the communication of the power Internet of Things, significantly improving the intelligent level and operation and maintenance efficiency of the digital power grid.
[0128] Please refer to Figure 3 , based on the same inventive concept, a communication network optimization system proposed in the second embodiment of the present invention includes:
[0129] A feature screening module 10, configured to obtain the historical network parameters of each candidate network in the metering terminal group, evaluate the credibility of the historical network parameters, and screen out network feature parameters. The metering terminal group includes several metering terminals, and the networks of each metering terminal are synchronized;
[0130] A network monitoring module 20, configured to collect the real-time network parameters of each candidate network, extract real-time network feature parameters from the real-time network parameters according to the network feature parameters, and generate a detection feature vector based on a sliding window mechanism;
[0131] Input the detection feature vector into a pre-constructed network status detection model to obtain the network operation status and network switching mark of each candidate network. The network status detection model is constructed based on the Gaussian anomaly detection algorithm;
[0132] The network switching module 30 is used to determine whether the current network of the metering terminal group needs to be switched according to the network switching mark, and in response to the need to switch, select the optimal state network from each candidate network according to the network operation state;
[0133] A network switching instruction is generated according to the optimal state network, and is sent to the metering terminal group to implement network synchronous switching of the metering terminal group.
[0134] The technical features and technical effects of the communication network optimization system based on self-cooperative selection proposed in the embodiment of the present invention are the same as the method proposed in the embodiment of the present invention, and will not be repeated here. Each module in the above-mentioned communication network optimization system based on self-cooperative selection can be implemented in whole or in part through software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0135] In addition, an embodiment of the present invention further provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the computer program.
[0136] See also Figure 4 , an internal structure diagram of a computer device in one embodiment, the computer device can specifically be a terminal or a server. The computer device includes a processor, a memory, a network interface, a display and an input device connected via a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a communication network optimization method based on self-cooperative selection is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a button, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.
[0137] It can be understood by those skilled in the art that Figure 4 The structure shown in the figure is only a block diagram of a part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computing device may include more or fewer components than shown in the figure, or combine certain components, or have the same component arrangement.
[0138] In addition, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above method are implemented.
[0139] In summary, an embodiment of the present invention provides a communication network optimization method, system, device, and medium based on self-cooperative selection. The method obtains the historical network parameters of each candidate network in the metering terminal group, evaluates the credibility of the historical network parameters, and filters out network feature parameters. The metering terminal group includes several metering terminals, and each metering terminal uses the same communication network; collects the real-time network parameters of each candidate network, extracts real-time network feature parameters from the real-time network parameters according to the network feature parameters, and generates a detection feature vector based on the sliding window mechanism; inputs the detection feature vector into a pre-constructed network state detection model to obtain the network operation state and network switching flag of each candidate network. The network state detection model is constructed based on the Gaussian anomaly detection algorithm; determines whether the current network of the metering terminal group needs to be switched according to the network switching flag, and in response to the need to switch, selects the optimal state network from each candidate network according to the network operation state; generates a network switching instruction according to the optimal state network and sends it to the metering terminal group to achieve the network synchronous switching of the metering terminal group. The present invention realizes the seamless switching of the communication network of the metering terminal through the dual-channel separation design and multi-network switching strategy, improves the network availability, effectively improves the efficiency and accuracy of model detection through the Gaussian anomaly detection model based on feature parameter selection and semi-supervised learning training strategy, and at the same time, through the dynamic adjustment of feature parameters and model parameters, enables the model to adapt to the changes of the dynamic network environment, improves the dynamic adaptability of the model. The present invention provides a highly stable and adaptive network switching solution for the communication of the power Internet of Things, significantly improving the intelligent level and operation and maintenance efficiency of the digital power grid.
[0140] Each embodiment in this specification is described in a progressive manner. For parts that are the same or similar in each embodiment, reference can be made to each other. Each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiment. It should be noted that the technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope recorded in this specification.
[0141] The above-described embodiments merely represent several preferred embodiments of the present application. The description thereof is relatively specific and detailed, but it should not be construed as a limitation on the scope of the invention patent. It should be noted that for those of ordinary skill in the art, without departing from the technical principles of the present invention, several improvements and substitutions can be made, and these improvements and substitutions should also be regarded as the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the protection scope of the claims described above.
Claims
1. A communication network optimization method based on self-cooperative selection, characterized in that: include: Acquire historical network parameters of each candidate network of a metering terminal group, perform credibility evaluation on the historical network parameters, and screen out network characteristic parameters, wherein the metering terminal group includes a plurality of metering terminals, and each metering terminal uses the same communication network; Collecting real-time network parameters of each candidate network, extracting real-time network characteristic parameters from the real-time network parameters according to the network characteristic parameters, and generating a detection feature vector based on a sliding window mechanism; Inputting the detection feature vector into a pre-built network status detection model to obtain the network operation status and network switching mark of each candidate network, wherein the network status detection model is built based on a Gaussian anomaly detection algorithm; According to the network switching mark, determining whether the current network of the metering terminal group needs to be switched, and in response to the need to switch, selecting the optimal state network from each candidate network according to the network operation state; A network switching instruction is generated according to the optimal state network and sent to the metering terminal group to achieve network synchronous switching of the metering terminal group.
2. The communication network optimization method based on self-cooperative selection according to claim 1, characterized in that: The step of obtaining historical network parameters of each candidate network of the metering terminal group, performing credibility evaluation on the historical network parameters, and screening out network characteristic parameters comprises: Acquire historical network parameters of each candidate network of the metering terminal group, and perform data cleaning on the historical network parameters, wherein the historical network parameters include signal quality parameters, base station information parameters, and network status parameters; Conduct credibility evaluation on the cleaned historical network parameters, and sort them according to the evaluation results to obtain credibility ranking; According to preset parameter rules, corresponding network characteristic parameters are selected from the credibility ranking.
3. The communication network optimization method based on self-cooperative selection according to claim 2, characterized in that: The steps of evaluating the credibility of the cleaned historical network parameters and sorting them according to the evaluation results to obtain the credibility sorting include: The coefficient of variation is used to quantify the parameter volatility of the cleaned historical network parameters, and the historical volatility coefficient of each historical network parameter is obtained; Based on the historical fault logs of each candidate network, the historical correlation coefficient between historical network parameter fluctuations and candidate network outages is calculated using the Pearson correlation coefficient; The historical network parameters are comprehensively sorted according to the ascending order of the historical volatility coefficients and the descending order of the historical correlation coefficients to obtain a credibility ranking.
4. The communication network optimization method based on self-cooperative selection according to claim 1, characterized in that: The steps of constructing the network status detection model include: According to the historical network parameters, a detection feature set based on the network feature parameters is constructed, wherein the detection feature set includes a normal feature set and an abnormal feature set; Randomly select normal network feature parameters from the normal feature set to form a pre-training feature set, and use the abnormal feature set and the remaining normal network feature parameters in the normal feature set to form a cross-check feature set; Taking the Gaussian distribution probability density of network characteristic parameters as the objective function, a network status detection model is constructed; The network status detection model is initially trained using the pre-trained feature set, and the network status detection model is model tuned and verified using the cross-check feature set to obtain the trained network status detection model.
5. The communication network optimization method based on self-cooperative selection according to claim 4 is characterized in that: The step of using the cross-check feature set to perform model tuning and verification on the network status detection model to obtain the trained network status detection model comprises: According to the accuracy and recall rate of the model prediction results, a loss function is constructed, and the covariance matrix of the network state detection model is taken as a positive definite matrix as a constraint condition; Calculate the partial derivatives of the loss function with respect to the model parameters according to the gradient descent method, wherein the model parameters include the mean and the covariance matrix; Iteratively updating the model parameters according to the partial derivatives; Traversing candidate anomaly thresholds in the cross-check feature set, calculating the F1 scores corresponding to the candidate anomaly thresholds, and selecting the candidate anomaly threshold with the highest F1 score as the anomaly threshold of the network status detection model; When the loss function reaches a preset convergence condition or the number of model iterations reaches a preset number of iterations, the iterative update is stopped to obtain the trained network status detection model.
6. The communication network optimization method based on self-cooperative selection according to claim 4, characterized in that: The step of inputting the detection feature vector into a pre-built network status detection model to obtain the network operation status and network switching mark of each candidate network includes: Inputting the detection feature vector into a pre-built network status detection model to obtain a Gaussian distribution probability density of the detection feature vector; The Gaussian distribution probability density is compared with an abnormal threshold. If it is less than the abnormal threshold, the network switching mark of the candidate network is set to a switching mark. Otherwise, the network switching mark of the candidate network is set to a holding mark.
7. The communication network optimization method based on self-cooperative selection according to claim 3, characterized in that: After the step of generating a network switching instruction according to the optimal state network and sending the instruction to the metering terminal group to implement network synchronous switching of the metering terminal group, the method further includes: According to preset weights, the historical volatility coefficient and the historical correlation coefficient are weighted and summed to obtain initial weights of various historical network parameters; According to the real-time network parameters of each candidate network, based on the sliding window mechanism and the anomaly coefficient, the real-time fluctuation coefficient of each real-time network parameter is calculated; According to the ratio of the real-time volatility coefficient to the historical volatility coefficient, the initial weight is updated to obtain a parameter weight; The network characteristic parameters are updated according to the parameter weights, and the network status detection model is updated according to the updated network characteristic parameters.
8. A communication network optimization system based on self-cooperative selection, characterized in that: include: A feature screening module, used to obtain historical network parameters of each candidate network of a metering terminal group, perform credibility assessment on the historical network parameters, and screen out network feature parameters, wherein the metering terminal group includes a plurality of metering terminals, and each metering terminal network is synchronized; A network monitoring module, used for collecting real-time network parameters of each candidate network, extracting real-time network characteristic parameters from the real-time network parameters according to the network characteristic parameters, and generating a detection feature vector based on a sliding window mechanism; Inputting the detection feature vector into a pre-built network status detection model to obtain the network operation status and network switching mark of each candidate network, wherein the network status detection model is built based on a Gaussian anomaly detection algorithm; A network switching module, configured to determine whether the current network of the metering terminal group needs to be switched according to the network switching mark, and in response to the need to switch, select the optimal network from various candidate networks according to the network operation status; A network switching instruction is generated according to the optimal state network and sent to the metering terminal group to achieve network synchronous switching of the metering terminal group.
9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. 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 method according to any one of claims 1 to 7 are implemented.