A data return length prediction method and system for an intelligent converged terminal
By calculating the bias importance of data features and multi-time-scale clustering, combined with the LSTM model, the problems of inaccurate clustering and single time window in the prediction of data return length of intelligent fusion terminals are solved, thereby improving the prediction accuracy and the optimization effect of the communication network.
Patent Information
- Application Number
- CN202611685527.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-29
- Publication Date
- 2026-11-27
Smart Images

Figure CN123185096A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of digital information transmission technology, and in particular to a method and system for predicting the data return length of an intelligent fusion terminal. Background Technology
[0002] In power Internet of Things (IoT) systems, numerous smart meters need to periodically communicate with the main data center via a limited power communication network to upload electricity consumption data. Network bandwidth resources are limited and the environment is complex, making it prone to instability. If the main station simultaneously sends data requests to a large number of meters without predicting the amount of data returned for each request, it can easily lead to instantaneous network congestion, channel contention, or even communication failure, severely impacting the real-time performance and integrity of data acquisition. If the data return length can be predicted in advance, the data center can intelligently schedule the communication network, alleviating the pressure on the power communication network. Therefore, solving the problem of accurately predicting the data return length from devices is crucial for achieving network resource optimization and load balancing.
[0003] However, existing technologies for predicting the data return length of intelligent converged terminals typically suffer from two major drawbacks. The first is the coarse clustering methods and inaccurate pattern recognition. Traditional methods often directly cluster raw data from electricity meter communication, such as voltage and current. These business values have weak correlation with the prediction target, i.e., the return data length, and have high feature dimensionality, leading to poor clustering results. Simultaneously, traditional methods ignore the differences in the impact of different data features on the total data return length, failing to accurately identify the key factors causing abnormal fluctuations in data volume. This results in poor homogeneity of the historical patterns formed by clustering, affecting the accuracy of subsequent prediction models. The second major drawback is the limited time window and one-sided situational awareness. Most existing methods use a fixed, single time window to analyze historical data; short windows can only capture short-term fluctuations and cannot identify medium- to long-term trends; long windows may dilute recent abrupt changes. This one-sided perspective cannot fully grasp the dynamic changes in communication behavior, and when communication patterns undergo phased shifts, the prediction model struggles to respond accurately. Summary of the Invention
[0004] To improve the prediction accuracy of device data return length, optimize communication strategies in power communication networks, and address the problems of traditional prediction methods failing to capture complete trends and exhibiting poor prediction accuracy, this invention provides a data return length prediction method and system for intelligent fusion terminals. The technical solution is as follows: In a first aspect, the present invention provides a method for predicting the data return length of an intelligent fusion terminal, comprising the following steps: acquiring data information of the current communication process and historical records of multiple consecutive historical communication processes and extracting data features; calculating the bias importance of each data feature based on the historical records; presetting multiple time scales and calculating the temporal deviation degree of each historical record sample at each time scale; clustering to obtain clusters at each time scale, establishing prediction models for each cluster, and constructing historical communication feature vectors of historical records at each time scale for training to obtain prediction models for each cluster after training; calculating the similarity between the current communication process and each cluster based on the data information of the current communication process; constructing the current communication feature vector, obtaining several prediction lengths based on the prediction models of each cluster after training, and calculating the final prediction length by combining the similarity and the prediction length; In this process, each meter device corresponds to a current communication sample. Based on the trained prediction model, the predicted length set of each current communication sample at each time scale is obtained. The degree of distinction between each cluster is quantified based on the time series deviation, and the distinction degree at each time scale is obtained. The distinction degree and similarity are normalized. The cumulative value of the product between each predicted length and the corresponding normalized similarity in the predicted length set is calculated. The product between the cumulative value and the corresponding normalized distinction degree is used as the predicted length component. The predicted length components at each time scale are accumulated, and the value after rounding up is used as the final predicted length of the meter device.
[0005] Preferably, in a cluster of meters of the same model in the same region, the master station system in the power communication network obtains data information of the current communication process of multiple meters and historical records of multiple consecutive historical communication processes. Each type of data returned by the meter is taken as a data feature, and each communication process of the meter contains all data features corresponding to various return data types. The data information of the current communication process includes the current required length of each data feature. Each historical record sample includes the required length of each data feature in the corresponding historical communication process and the actual data return length uploaded by the meter. It also includes the address code of the meter and the timestamp of the communication process. The sum of the required lengths of each data feature in each historical record sample is taken as the base length of the corresponding historical record sample, and the sum of the actual data return lengths of each data feature in each historical record sample is taken as the true length of the corresponding historical record sample.
[0006] Preferably, any data feature is selected as the target data feature. The absolute difference between the required length and the corresponding actual returned length of each data feature in a certain historical record sample is calculated. The absolute differences corresponding to each data feature in the historical record sample are accumulated to obtain the total absolute difference of the historical record sample. The ratio between the absolute difference corresponding to the target data feature and the total absolute difference is taken as the relative difference of the target data feature in the historical record sample. Similarly, the relative difference of the target data feature in each historical record sample is obtained. All the relative differences of the target data feature are arranged according to the address code of the meter device and the time order of the communication process to obtain the relative difference sequence of the target data feature. Similarly, the relative difference sequence of each data feature is obtained. The absolute difference between the basic length and the actual length of each historical record sample is taken as the total length deviation of the corresponding historical record sample. The total length deviation of all historical record samples is arranged according to the address code of the meter device and the time order of the communication process to obtain the total length deviation sequence.
[0007] Preferably, the standard deviation of the relative difference sequence of each data feature is calculated separately, and then the standard deviation of the total length deviation sequence is calculated. The absolute difference between the standard deviation of the target data feature and the standard deviation of the total length deviation sequence is taken as the degree of deviation of the target data feature. Similarly, the degree of deviation of each data feature is obtained. The cross-correlation coefficient between the relative difference sequence of each data feature and the total length deviation sequence is calculated separately. The natural exponential function is used to reverse map the degree of deviation of the target data feature. The product between the mapped value and the absolute value of the cross-correlation coefficient corresponding to the target data feature is taken as the deviation importance of the target data feature. Similarly, the deviation importance of each data feature is obtained.
[0008] Preferably, all historical records are grouped according to the address code of the meter device and arranged according to the time sequence of the communication process to obtain a historical record sample sequence for each meter device. The number of communication intervals between historical records within the historical record sample sequence is defined as the time scale. Based on the communication frequency of the power communication network in the actual application scenario, multiple time scales are set. The basic length of each historical record sample and the required length of each data feature within the historical record sample are extracted. Any data feature is selected as the target data feature, any historical record sample is selected as the target historical record sample, and any time scale is selected as the target time scale. Based on the historical record sample sequence where the target historical record sample is located, the historical records preceding the target historical record sample within the target time scale range are used as time-series comparison samples. When the number of historical records preceding the target historical record sample in the historical record sample sequence does not meet the range of the target time scale, virtual historical records are set to fill the gap by virtual padding. The basic length of the virtual historical record sample is set to 1, and the required length of each data feature is set to 0. Several identical virtual historical records are set to supplement the number of time-series comparison samples to the same as the target time scale.
[0009] Preferably, the ratio between the required length of the target data feature within the target historical record sample and the base length of the target historical record sample is used as the target time-series feature. Similarly, the ratio between the required length of the target data feature within a certain time-series comparison sample and the base length of that time-series comparison sample is used as the time-series comparison feature of that time-series comparison sample. The time-series comparison features of each time-series comparison sample are obtained in the same way. The absolute difference between the target time-series feature and each time-series comparison feature is calculated and accumulated sequentially. The ratio of the accumulated value to the target time scale is used as the time-series deviation value of the target data feature. The deviation weight of the target data feature is extracted. The importance of the target data feature is determined by multiplying its deviation importance with its temporal deviation value. Similarly, based on the total number of data features, the weighted temporal deviation values of each data feature within the target historical record sample are obtained. The weighted temporal deviation values of each data feature are accumulated, and the accumulated value is used as the degree of temporal deviation of the target historical record sample at the target time scale. The degree of temporal deviation of the target historical record sample at each time scale is obtained by traversing all time scales. Then, the degree of temporal deviation of each historical record sample at each time scale is obtained by traversing all historical record samples.
[0010] Preferably, an arbitrary time scale is selected as the target time scale. The temporal deviation of all historical records at the target time scale is extracted, and the Euclidean distance between each pair of temporal deviations is calculated. Based on the Euclidean distance, the K-Means clustering algorithm is used to cluster all historical records, resulting in one cluster at the target time scale. Similarly, multiple clusters at each time scale are obtained. The sum of the deviation importance of each data feature within each historical record is taken as the total deviation importance of the corresponding historical record. Based on the basic length, total deviation importance, and temporal deviation of each historical record, a [structure / system] is constructed. For each historical record sample, a historical communication feature vector is generated at the target time scale, and the true length of each historical record sample is used as the label of the corresponding historical communication feature vector. An LSTM model is used to build a corresponding prediction model for each cluster. The historical communication feature vectors within each cluster at the target time scale are used as the input layer of the corresponding prediction model, and the corresponding true length label is used as the output layer. The mean squared error is used as the loss function to train each prediction model until the loss function converges, thus obtaining the prediction model of each cluster at the target time scale after training. Similarly, the prediction models of all clusters after training are obtained.
[0011] Preferably, the following steps are taken: extract data information of the current communication process of each meter device, as well as historical records of each meter device prior to the current communication process within the maximum time scale range; calculate the current time series deviation of each current communication sample at each time scale; select any time scale as the target time scale, select any cluster at the target time scale as the target cluster, extract the time series deviation of each historical record sample within the target cluster at the target time scale, and use the mean of the time series deviations within the target cluster as the cluster center time series deviation of the target cluster; then calculate the relationship between the time series deviation of each time series within the target cluster and the cluster center time series deviation of the target cluster. The Euclidean distance between the degree of deviation is calculated, and the variance is calculated based on each Euclidean distance. The variance is used as the temporal fluctuation feature of the target cluster. The square of the difference between the current temporal deviation of each current communication sample at the target time scale and the temporal deviation of the cluster center of the target cluster is used as the current temporal deviation feature of the corresponding current communication sample. The natural exponential function is used to back-map the ratio between the current temporal deviation feature of a certain current communication sample and the temporal fluctuation feature of the target cluster. The mapped value is used as the similarity between the current communication sample and the target cluster. Similarly, the similarity between each current communication sample and each cluster in the current communication process is obtained.
[0012] Preferably, based on the current required length of each data feature during the current communication process of each meter device, the basic length of each current communication sample is obtained. The total deviation importance of the current communication sample is the same as that of the total deviation importance of the historical data sample. Based on the basic length, total deviation importance, and current time-series deviation degree of each current communication sample at each time scale, a current communication feature vector of each current communication sample at each time scale is constructed. Each current communication sample is then sequentially input into the prediction model of each cluster after training to obtain the predicted length set of each current communication sample at each time scale. The Euclidean distance between the cluster centers of each cluster at the same time scale is calculated, and their average value is used as the discrimination degree at the corresponding time scale. The normalized discrimination degree at each time scale is obtained by summation and normalization. The similarity between each current communication sample and each cluster is normalized by summation and normalization to obtain the corresponding normalized similarity. Based on the predicted length set, the normalized similarity corresponding to each predicted length, and the normalized discrimination degree at each time scale, the final predicted length of each meter device during the current communication process is calculated.
[0013] Secondly, the present invention provides a data return length prediction system for an intelligent fusion terminal, used to implement the aforementioned data return length prediction method for an intelligent fusion terminal, comprising: a processor, a memory, a communication interface, and a power communication network. The processor stores computer program instructions for implementing the aforementioned data return length prediction method for an intelligent fusion terminal, and the communication interface is communicatively connected to the power communication network.
[0014] Compared with the prior art, the beneficial effects of the present invention are as follows: This invention calculates the relationship between the relative deviation sequence of data features and the total length deviation sequence to obtain the deviation importance of each data feature. Simultaneously, it detects and quantifies the deviation of the current communication process from recent historical communication processes to obtain the degree of temporal deviation. Combining multiple time scales, it uses the degree of temporal deviation to perform multi-granular clustering of historical communication behaviors to identify typical communication patterns. This results in highly homogeneous behavioral patterns within the same cluster, allowing for the training of multiple prediction models focused on corresponding communication patterns based on all clusters. This effectively improves prediction accuracy and solves the problem of traditional prediction methods failing to capture complete trends and having poor prediction accuracy. Next, it calculates the similarity between the current communication process and each historical pattern, using this similarity as a weight to weight the predicted length obtained from the prediction model. By comprehensively considering communication patterns across multiple time scales and combining the clustering capabilities of different time scales, it obtains the final predicted length for each meter device. This multi-time-scale situational awareness improves the accuracy of prediction results, effectively enhancing the prediction accuracy of device data return length and optimizing communication strategies in power communication networks. Attached Figure Description
[0015] Figure 1 This is a flowchart illustrating the implementation of a data return length prediction method for an intelligent fusion terminal according to an embodiment of this application. Figure 2 This is a structural block diagram of a data return length prediction system for an intelligent fusion terminal according to an embodiment of this application. Detailed Implementation
[0016] The technical features of the present invention will be further described in detail below with reference to the accompanying drawings so that those skilled in the art can understand them.
[0017] A method for predicting the data return length of an intelligent fusion terminal, the implementation process of which is as follows: Figure 1 As shown, the specific implementation steps are as follows: Step S1: Obtain the data information of the current communication process and historical records of multiple consecutive historical communication processes, and extract data features.
[0018] Specifically, within a cluster of electricity meters of the same model in the same region, the master station system in the power communication network acquires data information on the current communication process of multiple electricity meter devices, as well as historical records of multiple consecutive historical communication processes. Each type of data returned by the electricity meter device is considered a data feature, and each communication process of the electricity meter device includes all data features corresponding to various return data types. The data information of the current communication process includes the current required length of each data feature, and each historical record sample includes the required length of each data feature in the corresponding historical communication process and the actual data return length uploaded by the electricity meter device, as well as the address code of the electricity meter device and the timestamp of the communication process. The sum of the required lengths of each data feature in each historical record sample is used as the base length of the corresponding historical record sample, and the sum of the actual data return lengths of each data feature in each historical record sample is used as the true length of the corresponding historical record sample.
[0019] In power communication networks, meter clusters of the same type and in the same area typically receive the same call commands from the master station system, such as reading current, voltage, and electricity consumption. The meter devices will return different types of data based on different call commands, and the data structure and length of each data type returned by the meter devices will be different. Therefore, the data return length is highly correlated with the data characteristics. The purpose of setting each communication process of the meter devices to include all data characteristics is to unify the data structure for subsequent calculations. For data characteristics that the call command does not require to be collected, the required length and the actual data return length can be set to 0.
[0020] Step S2: Calculate the bias importance of each data feature based on historical data samples.
[0021] Existing techniques typically use raw data of data features to predict data return length, considering only the strength of the relationship between data features and the deviation of data return length while ignoring fluctuation pattern matching. This step extracts the length attribute of data features, obtains the total length deviation sequence and the relative difference sequence of each data feature, and then quantifies the correlation between the relative difference sequence of each data feature and the total length deviation sequence, reflecting the strength of the influence of each data feature on the total length deviation. At the same time, it combines the difference in fluctuation amplitude between the two sequences to measure the matching degree between the fluctuation amplitude of the data feature and the total fluctuation amplitude, so as to determine whether the fluctuation pattern of the corresponding data feature can represent the overall fluctuation pattern, thereby comprehensively quantifying the importance of each data feature to the total length deviation.
[0022] Specifically, any data feature is selected as the target data feature. The absolute difference between the required length and the corresponding actual returned length of each data feature in a historical record sample is calculated. The absolute differences of each data feature in the historical record sample are summed to obtain the total absolute difference of the historical record sample. The ratio between the absolute difference of the target data feature and the total absolute difference is taken as the relative difference of the target data feature in the historical record sample. Similarly, the relative difference of the target data feature in each historical record sample is obtained. All the relative differences of the target data feature are arranged according to the address code of the meter device and the time order of the communication process to obtain the relative difference sequence of the target data feature. Similarly, the relative difference sequence of each data feature is obtained. The absolute difference between the basic length and the actual length of each historical record sample is taken as the total length deviation of the corresponding historical record sample. The total length deviation of all historical record samples is arranged according to the address code of the meter device and the time order of the communication process to obtain the total length deviation sequence.
[0023] In addition, the standard deviation of the relative difference sequence of each data feature is calculated, and then the standard deviation of the total length deviation sequence is calculated. The absolute difference between the standard deviation of the target data feature and the standard deviation of the total length deviation sequence is taken as the degree of deviation of the target data feature. Similarly, the degree of deviation of each data feature is obtained. The cross-correlation coefficient between the relative difference sequence of each data feature and the total length deviation sequence is calculated. The natural exponential function is used to reverse map the degree of deviation of the target data feature. The product of the mapped value and the absolute value of the cross-correlation coefficient corresponding to the target data feature is taken as the deviation importance of the target data feature. Similarly, the deviation importance of each data feature is obtained.
[0024] The importance of the bias of the j-th data feature is: The calculation formula is as follows: In the formula, Indicates the first The cross-correlation coefficient between the relative difference sequence of each data feature and the total length deviation sequence. Indicates the first The degree of deviation of the first data feature, i.e., the first... The absolute difference between the standard deviation of the relative difference sequence of individual data features and the standard deviation of the total length deviation sequence. This represents the natural exponential function.
[0025] The larger it is, the more likely it is to be the first The greater the correlation between the relative difference sequence of each data feature and the total length deviation sequence, the stronger the association between them. The greater the bias in a data feature, the more significant it is; The smaller the value, the better. The closer the volatility of the relative difference sequence of the first data feature is to the volatility of the total length deviation sequence, that is, the more the volatility of the first data feature is to the relative difference sequence of the second data feature is to the relative difference sequence of the third ... The greater the contribution of each data feature to the overall fluctuation, the more significant the impact of the first data feature. The greater the bias of a data feature, the more important it is.
[0026] Step S3: Preset multiple time scales and calculate the degree of temporal deviation of each historical record sample at each time scale.
[0027] After establishing the importance of the deviations of each data feature, this step uses them as weights to measure the structural changes of historical communication processes over time. Specifically, by detecting the degree of deviation of the current communication process from recent historical communication processes, it is determined whether the current communication request pattern is shifting to a region that has historically led to unpredictable return lengths. This yields the net change in the uncertainty of the current communication process relative to the benchmark of recent historical communication processes. Validation across multiple time scales simplifies subsequent clustering and similarity calculation tasks.
[0028] Specifically, all historical records are grouped according to the address codes of the electricity meters and arranged in chronological order of the communication process to obtain a historical record sample sequence for each electricity meter. The number of communication intervals between historical records within the historical record sample sequence is defined as the time scale. Based on the communication frequency of the power communication network in the actual application scenario, multiple time scales are set, with the value range being 2 to 10 and the value being a positive integer. The basic length of each historical record sample and the required length of each data feature within the historical record sample are extracted. Any data feature is selected as the target data feature, any historical record sample is selected as the target historical record sample, and any time scale is selected as the target time scale. Based on the historical record sample sequence where the target historical record sample is located, the historical records preceding the target historical record sample within the target time scale range are used as time-series comparison samples. When the number of historical records preceding the target historical record sample in the historical record sample sequence does not meet the range of the target time scale, virtual historical records are used to fill the gap. The basic length of the virtual historical record sample is set to 1, and the required length of each data feature is set to 0. Several identical virtual historical records are set to supplement the number of time-series comparison samples to be the same as the target time scale.
[0029] Furthermore, the ratio between the required length of the target data feature within the target historical record sample and the base length of the target historical record sample is used as the target temporal feature. Similarly, the ratio between the required length of the target data feature within a given temporal comparison sample and the base length of that temporal comparison sample is used as the temporal comparison feature of that temporal comparison sample. The temporal comparison features of each temporal comparison sample are obtained in the same way. The absolute difference between the target temporal feature and each temporal comparison feature is calculated and accumulated sequentially. The ratio of the accumulated value to the target time scale is used as the temporal deviation value of the target data feature. The significance of the deviation of the target data feature is then extracted. The weighted time-series deviation value of the target data feature is obtained by multiplying the deviation importance of the target data feature with the time-series deviation value. Based on the total number of data features, the weighted time-series deviation value of each data feature in the target historical record sample is obtained in the same way. The weighted time-series deviation values of each data feature are accumulated, and the accumulated value is used as the degree of time-series deviation of the target historical record sample at the target time scale. The degree of time-series deviation of the target historical record sample at each time scale is obtained by traversing all time scales. Then, the degree of time-series deviation of each historical record sample at each time scale is obtained by traversing all historical record samples again.
[0030] Wherein, the degree of temporal deviation of the i-th historical record sample at time scale n is: The calculation formula is as follows: In the formula, S represents the total number of data features. Let represent the bias importance of the j-th data feature, and n represent the value of the time scale. This represents the required length of the j-th data feature within the i-th historical record sample. This represents the base length of the i-th historical record sample. This represents the required length of the j-th data feature within the k-th time series comparison sample. This represents the base length of the k-th time-series alignment sample; Let be the temporal deviation value of the j-th data feature within the i-th historical record sample. The larger the temporal deviation value, the greater the historical deviation of the length proportion of the corresponding data feature at the target time scale.
[0031] Step S4: Clustering is performed to obtain clusters at each time scale. Prediction models for each cluster are established, and historical communication feature vectors of historical records at each time scale are constructed for training to obtain prediction models for each cluster after training.
[0032] Specifically, an arbitrary time scale is selected as the target time scale. The temporal deviation of all historical records at the target time scale is extracted, and the Euclidean distance between each pair of temporal deviations is calculated. Based on the Euclidean distance, the K-Means clustering algorithm is used to cluster all historical records, resulting in one cluster at the target time scale. Similarly, multiple clusters at each time scale are obtained. The sum of the deviation importance of each data feature within each historical record is taken as the total deviation importance of the corresponding historical record. Based on the basic length, total deviation importance, and temporal deviation of each historical record at the target time scale, a historical timeline is constructed for each historical record at the target time scale. The system uses historical communication feature vectors and assigns the true length of each historical record sample as the label of the corresponding historical communication feature vector. An LSTM (Long-Short-Term-Memory-Network) model is used to build a corresponding prediction model for each cluster. The historical communication feature vectors within each cluster at the target time scale are used as the input layer of the corresponding prediction model, and the corresponding true length label is used as the output layer. Mean squared error is used as the loss function to train each prediction model until the loss function converges, thus obtaining the prediction model for each cluster at the target time scale after training. Similarly, the prediction models for all clusters after training are obtained.
[0033] Among them, based on the degree of time series deviation, historical data samples are grouped into different time series patterns by clustering, thereby automatically generating clustering dimensions with unified business significance. This can capture the instantaneous changes, short-term trends and medium-term fluctuation patterns of nearest neighbors, so as to effectively improve prediction accuracy.
[0034] Step S5: Based on the data information of the current communication process, calculate the similarity between the current communication process and each cluster.
[0035] After dividing historical data samples into different temporal deviation patterns through cluster analysis, it is necessary to quantify the degree of matching between the current communication process and these historical patterns. To this end, this step introduces similarity calculation. Compared with directly calculating the distance between the temporal deviation of the current communication process and the temporal deviation of the cluster center, this step divides the distance by the variance of the distance within the cluster to obtain the standardized ratio of the distance from the temporal deviation of the current communication process to the cluster center relative to the intra-cluster dispersion. The distance is converted into a score based on the fluctuation of the cluster itself to eliminate the differences in density and compactness of different clusters, making the distance comparable between different clusters.
[0036] Specifically, data information from the current communication process of each meter device is extracted, along with historical records from previous communication processes within the maximum time scale. Each meter device corresponds to a current communication sample during the current communication process, and the current time-series deviation of each current communication sample at each time scale is calculated. An arbitrary time scale is selected as the target time scale, and an arbitrary cluster within that target time scale is selected as the target cluster. The time-series deviation of each historical record sample within the target cluster at the target time scale is extracted, and the mean of the time-series deviations within the target cluster is used as the cluster center time-series deviation of the target cluster. Finally, the time-series deviation of each sample within the target cluster is calculated. The Euclidean distance between the current communication sample and the target cluster center temporal deviation is calculated, and the variance is used as the temporal fluctuation feature of the target cluster. The square of the difference between the current temporal deviation of each current communication sample at the target time scale and the temporal deviation of the target cluster center is used as the current temporal deviation feature of the corresponding current communication sample. The natural exponential function is used to back-map the ratio between the current temporal deviation feature of a certain current communication sample and the temporal fluctuation feature of the target cluster, and the mapped value is used as the similarity between the current communication sample and the target cluster. Similarly, the similarity between each current communication sample and each cluster in the current communication process is obtained.
[0037] Wherein, the similarity between the m-th current communication sample and the p-th cluster at time scale n is: The calculation formula is as follows: In the formula, This indicates the degree of temporal deviation of the m-th current communication sample at time scale n. This represents the degree of temporal skewness of the cluster centers of the p-th cluster at a time scale n. This represents the temporal fluctuation characteristics of the p-th cluster at a time scale n, specifically the variance of each Euclidean distance between the temporal deviation of each historical data sample within the p-th cluster and the temporal deviation of its cluster center. This represents the natural exponential function.
[0038] Current timing deviation characteristics The larger the value, the less the m-th current communication sample is close to the typical communication pattern represented by the p-th cluster at time scale n, and the smaller the similarity between the two. The larger the value, the more dispersed the distribution of historical data samples within the p-th cluster at time scale n, and the higher the similarity between them. The smaller the value, the closer the historical data samples within the cluster are to the center. Even a slight change in distance will cause the similarity between the current communication sample and the cluster to drop sharply. This step considers communication patterns at multiple time scales, which can measure the significance of the current communication process in different time dimensions, thereby improving the accuracy of the prediction results through multi-scale situational awareness.
[0039] Step S6: Construct the current communication feature vector, obtain several prediction lengths based on the prediction models of each cluster after training, and calculate the final prediction length by combining similarity and prediction length.
[0040] Each prediction model corresponds to a specific communication pattern. It is necessary to consider communication patterns at all time scales, as well as the clustering ability at different time scales. At the same time, the credibility of clustering patterns at different time scales should be evaluated and integrated to calculate the accurate final prediction length.
[0041] Specifically, based on the current required length of each data feature during the current communication process of each meter device, the base length of each current communication sample is obtained. The total deviation importance of the current communication sample is the same as that of the total deviation importance of the historical data sample. Based on the base length, total deviation importance, and current time-series deviation degree of each current communication sample at each time scale, a current communication feature vector of each current communication sample at each time scale is constructed. Each current communication sample is then input into the prediction model of each cluster after training to obtain the predicted length set of each current communication sample at each time scale. The Euclidean distance between the cluster centers of each cluster at the same time scale is calculated, and the average value is used as the discrimination at the corresponding time scale. The normalized discrimination at each time scale is obtained by summation and normalization. The similarity between each current communication sample and each cluster is normalized by summation and normalization to obtain the corresponding normalized similarity.
[0042] Furthermore, an arbitrary meter device corresponding to any current communication sample is selected as the target device, and an arbitrary time scale is selected as the target time scale. The predicted length set corresponding to the target device at the target time scale and the normalized similarity corresponding to each predicted length are extracted. The cumulative value of the product between each predicted length and the corresponding normalized similarity in the predicted length set is taken as the weighted predicted length of the target device at the target time scale. The product between the weighted predicted length and the normalized discriminant at the target time scale is taken as the predicted length component of the target device at the target time scale. Based on the number of time scales, the predicted length components at each time scale are accumulated, and the accumulated value is rounded up using an up-rounding function. The rounded value is taken as the final predicted length of the target device. Similarly, the final predicted length of each meter device in the current communication process is obtained.
[0043] The final predicted length of the R-th meter device is: The calculation formula is as follows: In the formula, N represents the number of time scales. The discriminant at time scale n is the average of the Euclidean distances between each pair of cluster centers at time scale n, representing the degree of temporal deviation between cluster centers. K represents the number of clusters at time scale n. This represents the normalized similarity between the R-th current communication sample and the p-th cluster at time scale n. It represents the p-th prediction length within the prediction length set of the R-th current communication sample at time scale n, that is, the prediction length output by the prediction model corresponding to the p-th cluster at time scale n when the R-th current communication sample is used as input.
[0044] The larger the value, the greater the normalized similarity between the Rth current communication sample and the pth cluster at time scale n, and the greater the weight of the corresponding prediction result in the final result should be. The larger the value, the higher the distinguishability of each cluster at time scale n across all considered time scales. This indicates that the historical behavior pattern depicted at that time scale is more stable, and therefore the prediction results are more reliable. The purpose of using the floor function is to prioritize ensuring the reliability of data transmission and avoid insufficient allocated communication resources leading to data loss.
[0045] In addition, by comparing the final predicted length of each meter with the corresponding base length, if the final predicted length of a certain meter is much greater than the base length, the single request of that meter can be split into multiple smaller requests to obtain data in batches, or the communication request of that meter can be scheduled to an idle or high-bandwidth channel to prevent network congestion. If the final predicted length of a certain meter is significantly smaller or zero, the reconnection mechanism can be immediately activated or a backup communication path can be enabled to quickly restore the communication failure of that meter and improve the communication success rate and data integrity rate.
[0046] This invention also discloses a data return length prediction system for an intelligent fusion terminal, used to implement the aforementioned data return length prediction method for an intelligent fusion terminal. The system structure is as follows: Figure 2 As shown, it includes: a processor, a memory, a communication interface, and a power communication network. The processor stores computer program instructions for implementing the data return length prediction method of the above-mentioned intelligent fusion terminal, and the communication interface is connected to the power communication network.
[0047] The embodiments included in this invention are merely descriptions of preferred embodiments of the invention and are not limited to the precise structures described above and shown in the accompanying drawings. Various modifications and changes can be made without departing from the scope of protection. Any variations and improvements made by those skilled in the art to the technical solutions of this invention without departing from the design concept of this invention should fall within the scope of protection of this invention.
Claims
1. A method for predicting the data return length of an intelligent fusion terminal, characterized in that: Acquire data information from the current communication process and historical records of multiple consecutive historical communication processes, and extract data features; Based on historical data samples, the bias importance of each data feature is calculated; multiple time scales are preset, and the temporal deviation of each historical data sample at each time scale is calculated; clustering is performed to obtain clusters at each time scale, and a prediction model for each cluster is established. Historical communication feature vectors of historical data samples at each time scale are constructed for training, resulting in a prediction model for each cluster after training; based on the data information of the current communication process, the similarity between the current communication process and each cluster is calculated; the current communication feature vector is constructed, and several prediction lengths are obtained based on the prediction models of each cluster after training. The final prediction length is calculated by combining the similarity and the prediction length. In the current communication process, each meter device corresponds to a current communication sample. Based on the trained prediction model, the predicted length set of each current communication sample at each time scale is obtained. The degree of distinction between each cluster is quantified based on the degree of time series deviation to obtain the distinction at each time scale. The distinction and similarity are normalized. The cumulative value of the product between each predicted length and the corresponding normalized similarity in the predicted length set is calculated. The product between the cumulative value and the corresponding normalized distinction is used as the predicted length component. The predicted length components at each time scale are summed up, and the sum is rounded up to obtain the final predicted length of the meter.
2. The data return length prediction method for an intelligent fusion terminal according to claim 1, characterized in that, The process of acquiring data information of the current communication process and historical records of multiple consecutive historical communication processes and extracting data features includes: acquiring data information of the current communication process of multiple electricity meter devices and historical records of multiple consecutive historical communication processes through the master station system in the power communication network within a cluster of electricity meters of the same type and in the same region; taking each type of data returned by the electricity meter device as a data feature; each communication process of the electricity meter device includes all data features corresponding to various types of returned data; the data information of the current communication process includes the current required length of each data feature; each historical record sample includes the required length of each data feature in the corresponding historical communication process and the actual data return length uploaded by the electricity meter device, as well as the address code of the electricity meter device and the timestamp of the communication process; taking the sum of the required lengths of each data feature in each historical record sample as the base length of the corresponding historical record sample, and taking the sum of the actual data return lengths of each data feature in each historical record sample as the true length of the corresponding historical record sample.
3. The data return length prediction method for an intelligent fusion terminal according to claim 2, characterized in that, The method of calculating the deviation importance of each data feature based on historical records includes: selecting any data feature as the target data feature; calculating the absolute difference between the required length and the corresponding actual data return length of each data feature in a historical record sample; summing the absolute differences of each data feature in the historical record sample to obtain the total absolute difference of the historical record sample; taking the ratio between the absolute difference of the target data feature and the total absolute difference as the relative difference of the target data feature in the historical record sample; similarly obtaining the relative difference of the target data feature in each historical record sample; arranging all the relative differences of the target data feature according to the address code of the meter device and the time order of the communication process to obtain the relative difference sequence of the target data feature; similarly obtaining the relative difference sequence of each data feature; taking the absolute difference between the base length and the actual length of each historical record sample as the total length deviation of the corresponding historical record sample; arranging the total length deviation of all historical record samples according to the address code of the meter device and the time order of the communication process to obtain the total length deviation sequence.
4. The data return length prediction method for an intelligent fusion terminal according to claim 3, characterized in that, The step of calculating the bias importance of each data feature based on historical data samples further includes: calculating the standard deviation of the relative difference sequence of each data feature, then calculating the standard deviation of the total length bias sequence, and taking the absolute difference between the standard deviation of the target data feature and the standard deviation of the total length bias sequence as the bias degree of the target data feature, and similarly obtaining the bias degree of each data feature; calculating the cross-correlation coefficient between the relative difference sequence of each data feature and the total length bias sequence, using the natural exponential function to perform a reverse mapping on the bias degree of the target data feature, and taking the product between the mapped value and the absolute value of the cross-correlation coefficient corresponding to the target data feature as the bias importance of the target data feature, and similarly obtaining the bias importance of each data feature.
5. The data return length prediction method for an intelligent fusion terminal according to claim 2, characterized in that, The process of pre-setting multiple time scales to calculate the temporal deviation of each historical record sample at each time scale includes: grouping all historical record samples according to the address code of the electricity meter device and arranging them according to the time sequence of the communication process to obtain a historical record sample sequence for each electricity meter device; defining the number of communication intervals between historical record samples within the historical record sample sequence as a time scale; setting multiple time scales based on the communication frequency of the power communication network in the actual application scenario; extracting the basic length of each historical record sample and the required length of each data feature within the historical record sample; selecting any data feature as the target data feature; selecting any historical record sample as the target historical record sample; selecting any time scale as the target time scale; based on the historical record sample sequence where the target historical record sample is located, using the historical record samples preceding the target historical record sample within the target time scale as temporal comparison samples; when the number of historical record samples preceding the target historical record sample in the historical record sample sequence does not meet the range of the target time scale, using virtual padding to set virtual historical record samples for filling; setting the basic length of the virtual historical record sample to 1 and the required length of each data feature to 0; setting several identical virtual historical record samples to supplement the number of temporal comparison samples to the same as the target time scale.
6. The data return length prediction method for an intelligent fusion terminal according to claim 5, characterized in that, The calculation of the temporal deviation of each historical record sample at each time scale further includes: using the ratio between the required length of the target data feature in the target historical record sample and the basic length of the target historical record sample as the target temporal feature; using the ratio between the required length of the target data feature in a certain time-series comparison sample and the basic length of that time-series comparison sample as the temporal comparison feature of that time-series comparison sample; similarly obtaining the temporal comparison features of each time-series comparison sample; sequentially calculating and accumulating the absolute difference between the target temporal feature and each time-series comparison feature; and using the ratio of the accumulated value to the target time scale as the temporal deviation value of the target data feature. The process involves extracting the bias importance of target data features, multiplying the bias importance of the target data features by the time-series bias value, and using this product as the weighted time-series bias value of the target data features. Based on the total number of data features, the weighted time-series bias values of each data feature within the target historical record sample are obtained similarly. The weighted time-series bias values of each data feature are then summed, and the sum is used as the degree of time-series bias of the target historical record sample at the target time scale. This process is repeated across all time scales to obtain the degree of time-series bias of the target historical record sample at each time scale. Finally, iterates through all historical record samples to obtain the degree of time-series bias of each historical record sample at each time scale.
7. The data return length prediction method for an intelligent fusion terminal according to any one of claims 2 to 6, characterized in that, The clustering process yields clusters at various time scales, establishes prediction models for each cluster, and trains historical communication feature vectors of historical records at each time scale to obtain the prediction models for each cluster after training. This includes: selecting any time scale as the target time scale; extracting the temporal deviation degree of all historical records at the target time scale; calculating the Euclidean distance between each pair of temporal deviation degrees; using the K-Means clustering algorithm based on the Euclidean distance to cluster all historical records, obtaining a set of clusters at the target time scale; similarly, obtaining multiple sets of clusters at various time scales; and using the sum of the deviation importance of each data feature within each historical record as the total deviation importance of the corresponding historical record. The historical communication feature vector for each historical record sample at the target time scale is constructed by considering the base length, total bias importance, and temporal bias degree of the historical record sample. The true length of each historical record sample is used as the label of the corresponding historical communication feature vector. An LSTM model is used to build a corresponding prediction model for each cluster. The historical communication feature vector within each cluster at the target time scale is used as the input layer of the corresponding prediction model, and the corresponding true length label is used as the output layer. The mean squared error is used as the loss function to train each prediction model until the loss function converges, thus obtaining the prediction model for each cluster at the target time scale after training. Similarly, the prediction models for all clusters after training are obtained.
8. The data return length prediction method for an intelligent fusion terminal according to claim 7, characterized in that, The calculation of the similarity between the current communication process and each cluster based on the data information of the current communication process includes: extracting the data information of the current communication process of each meter device, as well as historical records of each meter device before the current communication process within the maximum time scale, and calculating the current time series deviation of each current communication sample at each time scale; selecting any time scale as the target time scale, selecting any cluster at the target time scale as the target cluster, extracting the time series deviation of each historical record sample within the target cluster at the target time scale, and using the mean of the time series deviations within the target cluster as the time series deviation of the cluster center of the target cluster; and then calculating the time series deviation of each historical record sample within the target cluster at each time scale. The Euclidean distance between the degree of temporal deviation and the degree of temporal deviation of the cluster center of the target cluster is calculated, and the variance is used as the temporal fluctuation feature of the target cluster. The square of the difference between the current temporal deviation of each current communication sample at the target time scale and the degree of temporal deviation of the cluster center of the target cluster is used as the current temporal deviation feature of the corresponding current communication sample. The natural exponential function is used to back-map the ratio between the current temporal deviation feature of a certain current communication sample and the temporal fluctuation feature of the target cluster, and the mapped value is used as the similarity between the current communication sample and the target cluster. Similarly, the similarity between each current communication sample and each cluster in the current communication process is obtained.
9. The data return length prediction method for an intelligent fusion terminal according to claim 8, characterized in that, The construction of the current communication feature vector involves obtaining several prediction lengths based on the prediction models of each cluster after training, and calculating the final prediction length by combining similarity and prediction length. This includes: obtaining the base length of each current communication sample based on the current required length of each data feature during the current communication process of each meter device; ensuring that the total deviation importance of the current communication sample is the same as that of the historical data sample; constructing the current communication feature vector of each current communication sample at each time scale based on the base length, total deviation importance, and current time-series deviation degree at each time scale; and sequentially inputting each current communication sample into the prediction model of each cluster after training. The model obtains the predicted length set for each current communication sample at each time scale; calculates the Euclidean distance between each cluster center temporal deviation at the same time scale, and uses the average of these distances as the discriminant at the corresponding time scale. It then uses summation and normalization to obtain the normalized discriminant at each time scale; it also uses summation and normalization to normalize the similarity between each current communication sample and each cluster, obtaining the corresponding normalized similarity; based on the predicted length set, the normalized similarity corresponding to each predicted length, and the normalized discriminant at each time scale, it calculates the final predicted length of each meter device during the current communication process.
10. A data return length prediction system for an intelligent fusion terminal, characterized in that: It includes a processor, a memory, a communication interface, and a power communication network. The processor stores computer program instructions for implementing the data return length prediction method of the intelligent fusion terminal according to any one of claims 1 to 9. The communication interface is communicatively connected to the power communication network.
