Data layered transmission method and system of intelligent converged terminal
By improving the state-action Q-table of the Q-Learning algorithm and optimizing clustering using multi-dimensional operating condition data and dynamic weights, the redundancy problem of state partitioning under harmonic interference in the traditional Q-Learning algorithm is solved, realizing an efficient data hierarchical transmission strategy and improving the reliability and resource utilization of data transmission.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- JIANGSU SHENGDE ELECTRIC METER
- Filing Date
- 2026-03-18
- Publication Date
- 2026-06-23
Smart Images

Figure CN122268893A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of digital information transmission technology, and in particular to a data layered transmission method and system for an intelligent fusion terminal. Background Technology
[0002] With the widespread adoption of smart grids and new energy vehicles, devices such as multi-rate electricity meters and distributed charging piles mostly achieve intelligent data layering transmission through smart converged terminals. However, in smart grid and new energy scenarios such as factories and outdoor charging stations, the problem of harmonic interference in the power environment is becoming increasingly prominent when smart converged terminals transmit data in a layered manner. Specifically, the 3rd and 5th harmonics can cause distortion of the voltage or current waveform of electricity meters, affecting the accuracy of metering data; while when charging piles are charging at high power, they can exacerbate the noise in the communication channel, leading to increased packet loss rates and excessively high transmission delays for emergency data.
[0003] In terms of data transmission strategies, traditional Q-Learning algorithms have significant shortcomings. When making data layering transmission decisions, traditional Q-Learning algorithms fail to effectively incorporate the direct impact of harmonic interference on data quality (such as distortion risk) and channel quality (such as signal-to-noise ratio and latency). This results in state partitioning often relying on preset subjective thresholds, leading to redundant partitioning rules and a lack of objective data-driven principles. Furthermore, the design of its reward function is not strongly correlated with specific harmonic interference scenarios, failing to effectively balance local optimal transmission actions with global resource utilization efficiency. Ultimately, this results in high-priority data (such as data with high harmonic distortion risk and high communication degradation risk) having its bandwidth squeezed by low-priority data, significantly increasing end-to-end latency and packet loss rate. Summary of the Invention
[0004] To enhance the reliability of data transmission and improve the overall resource utilization of communication channels under harmonic interference scenarios, and to address the shortcomings of traditional Q-Learning algorithms in state partitioning redundancy and the inability to balance local and global optima, this invention provides a data layered transmission method and system for intelligent fusion terminals, the technical solution of which is as follows: In a first aspect, the present invention provides a data layered transmission method for an intelligent fusion terminal, comprising the following steps: acquiring historical multi-dimensional working condition data within a preset time period and preprocessing it to construct a historical state feature vector set; calculating the dynamic weights of each data dimension based on the historical state feature vector set; clustering the historical state feature vector set and weighting the Euclidean distance calculation in the clustering algorithm based on the dynamic weights to generate several transmission state clusters; introducing a contour coefficient to construct a dynamic evaluation and optimization mechanism for clustering quality, and determining in real time whether to update the transmission state clusters; constructing a dynamic reward function to improve the Q-Learning algorithm, and generating a state-action Q-table based on the transmission state clusters; acquiring the current state feature vector corresponding to the current transmission event, matching the corresponding transmission state cluster, and executing a transmission strategy adapted to the current working condition based on the state-action Q-table; Specifically, the K-means++ clustering algorithm is used to cluster the historical state feature vectors in the historical state feature vector set. The elbow method is used to verify the rationality of the preset number of clusters and obtain the optimal number of clusters. During the clustering process, the Euclidean distance calculation is weighted based on the dynamic weights of each data dimension, thereby improving the calculation of the distance function in the K-means++ algorithm. This results in the generation of transmission state clusters with the optimal number of clusters, with each transmission state cluster corresponding to a transmission communication working condition.
[0005] Preferably, starting from the moment the intelligent fusion terminal starts operating, multi-dimensional operating condition data is collected in real time at a fixed sampling frequency and standardized. This data includes seven dimensions of operating condition data: dominant harmonic frequency, dominant harmonic amplitude, total harmonic distortion rate, power consumption, channel signal-to-noise ratio, delay, and packet loss rate. The standardized seven-dimensional operating condition data corresponding to each sampling moment are merged to construct the state feature vector of the corresponding sampling point. A seven-dimensional operating condition data sequence of a preset time period is extracted as a historical data sample, and the historical state feature vector corresponding to each sampling point in the historical data sample is obtained. The transmission timestamp, transmission strategy, and transmission result of each historical transmission event are read from the historical transmission records of the intelligent fusion terminal. Successful transmission results are marked as 1, and failed transmission results are marked as 0. The set of all historical state feature vectors and historical transmission records is used as the historical state feature vector set.
[0006] Preferably, the dominant harmonic frequency, dominant harmonic amplitude, and total harmonic distortion rate are divided into three dimensions: harmonic correlation group, channel signal-to-noise ratio, delay, and packet loss rate, into three dimensions: communication correlation group, and power consumption dimension into bridging group. The time series of each data dimension are extracted from the historical state feature vector set, and the variance is calculated separately. The sum of the variances of the seven data dimensions is taken as the total correlation feature. The ratio between the sum of the variances of the three dimensions in the harmonic correlation group and the total correlation feature is taken as the dynamic weight of the three dimensions in the harmonic correlation group. The ratio between the sum of the variances of the three dimensions in the communication correlation group and the total correlation feature is taken as the dynamic weight of the three dimensions in the communication correlation group. Based on the requirements for transmission and communication quality in actual application scenarios, the weighting factors of the harmonic correlation group and the communication correlation group are set. The sum of the products of the dynamic weights of the two groups and the corresponding weighting factors is taken as the dynamic weight of the power consumption dimension.
[0007] Preferably, based on the standard contour coefficient calculation process, the contour coefficient corresponding to the state feature vector at each sampling moment is calculated in real time to generate a contour coefficient sequence; the maximum value of all total harmonic distortion (THD) and channel signal-to-noise ratio (SNR) at and before a certain sampling moment is extracted respectively, and the ratio between the THD at that sampling moment and the maximum value of the THD is used as the distortion index at that sampling moment; the ratio between the channel SNR at that sampling moment and the maximum value of the channel SNR is calculated, and the value obtained by subtracting the ratio from 1 is used as the channel degradation index at that sampling moment; the product between the distortion index and the channel degradation index is used as the risk value at that sampling moment; similarly, the risk value at each sampling moment is calculated to generate a risk value sequence; the product between the contour coefficient at the same sampling moment and the risk value is used as the risk-oriented contour coefficient, thus obtaining the risk-oriented contour coefficient sequence.
[0008] Preferably, based on the data transmission frequency of the intelligent fusion terminal in the actual application scenario, the lengths of the short-term window and the long-term window are set, and the sliding step size is set to 1. The risk-oriented profile coefficient sequence at the latest sampling moment is captured in real time by means of the sliding window, so as to obtain the short-term window coefficient sequence and the long-term window coefficient sequence. The variance of the short-term window coefficient sequence is used as the state fluctuation degree at the latest sampling moment, and the variance of the long-term window coefficient sequence is used as the state stability benchmark. The value of the state fluctuation degree is used as the numerator, the sum of the state fluctuation degree and the state stability benchmark is used as the denominator, and the ratio of the two is used as the adaptive forgetting factor at the latest sampling moment.
[0009] Preferably, the product of the risk-oriented profile coefficient corresponding to the latest sampling time and the corresponding adaptive forgetting factor is used as the current state contribution value; the value of 1 minus the adaptive forgetting factor is used as the historical state weight; the product of the average value of the long-term window coefficient sequence after removing the risk-oriented profile coefficient of the latest sampling time and the historical state weight is used as the historical state contribution value; and the sum of the current state contribution value and the historical state contribution value is used as the moving average profile coefficient of the latest sampling time. Based on manual experience, an update threshold and triggering conditions are set. When the number of consecutive occurrences of the moving average profile coefficient being less than the update threshold reaches the triggering condition, clustering update is triggered. At this time, with the latest sampling time as the anchor point, the seven-dimensional working condition data within a preset time period before the latest sampling time is used as the new historical data sample, and re-clustering is used to obtain the updated transmission state cluster.
[0010] Preferably, based on all types of transmission strategies in historical transmission records, various execution actions in Q-Learning algorithms are set, and each transmission state cluster is matched with each execution action to form several state-action pairs; historical state feature vectors corresponding to each historical transmission event are extracted, and combined with the label values of the corresponding transmission results to form a training set; any state-action pair is selected as the target pair, and any historical state feature vector corresponding to any historical transmission event is selected as the target vector; the normalized Euclidean distance of the seven-dimensional features between the target vector and the cluster centers of each transmission state cluster is calculated, and the transmission state cluster corresponding to the minimum value is selected as the target cluster to which the target vector belongs, and the value of the minimum normalized Euclidean distance is used as the deviation degree of the target vector from the target cluster, and 1 minus the deviation degree value is used as the feature similarity of the target vector from the target cluster.
[0011] Preferably, a logarithmic function is used to map the sum of the delayed data in the target vector after adding 1. The product between the mapped value and the feature similarity is used as the delay penalty, the product between the packet loss rate data in the target vector and the feature similarity is used as the packet loss penalty, the frequency of the corresponding transmission strategy in the target pair is used as the resource cost penalty, the transmission result label value of the target vector is used as the basic reward, and the difference between the basic reward and the three penalties is used as the value of the dynamic reward function corresponding to the target vector. The value of the dynamic reward function is substituted into the Bellman update equation to initialize the Q value of each state-action pair to 0. The Q value of each state-action pair is iteratively updated based on the training set until convergence. The state-action pair with the largest Q value among the multiple state-action pairs corresponding to each transmission state cluster is selected as the optimal pair for the corresponding transmission state cluster, thereby obtaining the state-action Q table.
[0012] Preferably, for the current transmission event, a current state feature vector corresponding to the current transmission event is first constructed, and the Euclidean distance between the current state feature vector and the cluster centers of each transmission state cluster is calculated. The current state feature vector is then assigned to the transmission state cluster corresponding to the minimum Euclidean distance, thereby executing the corresponding transmission strategy based on the state-action Q-table. After the transmission state cluster is updated, the state-action Q-table is updated synchronously. If the current transmission event occurs during the operation when the state-action Q-table has not been updated, the state-action Q-table before the update is used to execute the corresponding transmission strategy. If the current transmission event occurs after the state-action Q-table has been updated, the updated state-action Q-table is used to execute the corresponding transmission strategy.
[0013] Secondly, the present invention provides a data layered transmission system for an intelligent converged terminal, used to implement the aforementioned data layered transmission method for an intelligent converged terminal, comprising: a processor, a memory, a communication interface, and an intelligent converged terminal, wherein the processor stores computer program instructions for implementing the aforementioned data layered transmission method for an intelligent converged terminal, and the communication interface is communicatively connected to the intelligent converged terminal.
[0014] Compared with the prior art, the beneficial effects of the present invention are as follows: This invention utilizes multi-dimensional feature data of harmonics and communication quality to drive the generation of risk-oriented state partitioning rules, and introduces a dynamic optimization mechanism based on improved profile coefficients. This effectively overcomes the problems of traditional methods relying on subjective thresholds, redundant and rigid state partitioning, and difficulty in adapting to dynamic environmental changes. Simultaneously, by designing a dynamic reward function that integrates data transmission delay, packet loss, and resource cost penalties, and combining it with a discount factor that correlates adaptive learning rate and risk, the Q-Learning algorithm is deeply improved for specific scenarios. This enables the optimization process of the transmission strategy to accurately balance local action optimization and global resource efficiency. Ultimately, an intelligent transmission mechanism of "harmonic perception - dynamic strategy - precise layering" is realized. In environments with strong harmonic interference, this significantly improves the transmission guarantee capability of high-priority data, reduces end-to-end latency and packet loss rate, and simultaneously improves the overall resource utilization of the communication channel. Attached Figure Description
[0015] Figure 1 This is a flowchart illustrating the implementation of a data layered transmission method for an intelligent fusion terminal according to an embodiment of the present invention; Figure 2 This is a structural block diagram of a data layered transmission system for an intelligent fusion terminal according to an embodiment of the present invention. 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 data layered transmission method for 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 historical multidimensional working condition data within a preset time period and preprocess it to construct a historical state feature vector set.
[0018] Specifically, starting from the moment the intelligent fusion terminal starts operating, multi-dimensional operating condition data is collected in real time at a fixed sampling frequency and standardized. This data includes seven dimensions: dominant harmonic frequency, dominant harmonic amplitude, total harmonic distortion rate, power consumption, channel signal-to-noise ratio, delay, and packet loss rate. The standardized seven-dimensional operating condition data corresponding to each sampling moment are merged to construct the state feature vector of the corresponding sampling point. A seven-dimensional operating condition data sequence of a preset time period is extracted as a historical data sample, and the historical state feature vector corresponding to each sampling point in the historical data sample is obtained. The transmission timestamp, transmission strategy, and transmission result of each historical transmission event are read from the historical transmission records of the intelligent fusion terminal. Successful transmission results are marked as 1, and failed transmission results are marked as 0. The set of all historical state feature vectors and historical transmission records is used as the historical state feature vector set.
[0019] The sampling frequency can be set to 1Hz, meaning that seven-dimensional operating condition data is collected once per second. The preset time period can be set to 10 days, meaning that the seven-dimensional operating condition data collected within 10 days is used as historical data samples. Data on the three dimensions of dominant harmonic frequency, dominant harmonic amplitude, and total harmonic distortion rate are obtained through the harmonic analysis module in the intelligent fusion terminal. Power consumption data are obtained through the device connection module of the intelligent fusion terminal connected to the electricity meter or charging pile. Data on the three dimensions of channel signal-to-noise ratio, delay, and packet loss rate are obtained through the communication module of the intelligent fusion terminal.
[0020] Step S2: Calculate the dynamic weights of each data dimension based on the historical state feature vector set.
[0021] Dominant harmonic frequency, dominant harmonic amplitude, and total harmonic distortion rate (THD) are three dimensions related to the quality of transmitted data and can be used as indicators of data distortion risk. Channel signal-to-noise ratio (SNR), latency, and packet loss rate are three dimensions related to the communication quality of transmitted data and can be used as indicators of channel degradation. Data distortion risk indicators and channel degradation indicators can quantify the degree of risk in data transmission from both data quality and communication quality perspectives. Therefore, in the distance function of clustering, the risk contribution ratio of data distortion risk indicators and channel degradation indicators is used as the dynamic weight of the corresponding dimensions. This allows for weighting of the corresponding dimensions in subsequent clustering processes, making the clustering distance more focused on data dimensions with greater risk contribution. Electricity consumption is simultaneously affected by both indicators. A bias factor can be set, and the influence weights of the two indicators can be dynamically adjusted based on the actual application scenario. The bias factor is determined by the type of equipment connected to the smart fusion terminal. For example, the core function of multi-rate electricity meters is high-precision metering, and the actual communication requirements are low in terms of real-time performance and throughput, so more attention is paid to data distortion risk indicators. Distributed charging piles require real-time safety monitoring and control, and have high-frequency, reliable, and low-latency communication requirements, so more attention is paid to channel degradation indicators.
[0022] Specifically, the calculation process for dynamic weights is as follows: The system is divided into three dimensions: dominant harmonic frequency, dominant harmonic amplitude, and total harmonic distortion rate, forming a harmonic correlation group; three dimensions: channel signal-to-noise ratio, delay, and packet loss rate, forming a communication correlation group; and one dimension: power consumption, forming a bridging group. Time series data for each dimension are extracted from the historical state feature vector set, and variances are calculated separately. The sum of the variances of the seven data dimensions is used as the total correlation feature. The ratio of the sum of the variances of the three dimensions within the harmonic correlation group to the total correlation feature is used as the dynamic weight of the three dimensions within the harmonic correlation group. Similarly, the ratio of the sum of the variances of the three dimensions within the communication correlation group to the total correlation feature is used as the dynamic weight of the three dimensions within the communication correlation group. Based on the requirements for transmission and communication quality in practical application scenarios, a weighting factor is set for the harmonic correlation group and the communication correlation group. The sum of the weighting factors of the harmonic correlation group and the communication correlation group is 1. The sum of the products of the dynamic weights of the two groups and their respective weighting factors is used as the dynamic weight of the power consumption dimension.
[0023] Among them, the data in the three dimensions of the harmonic correlation group can quantify the harmonic intensity and cumulative interference of the power grid environment. The higher the data value, the greater the risk of data transmission distortion. The data in the three dimensions of the communication correlation group are used to measure the degree of channel quality degradation. The smaller the channel signal-to-noise ratio and the larger the values of delay and packet loss rate, the stronger the interference and the higher the degree of channel quality degradation during data communication transmission. The larger the variance of the time series corresponding to the three dimensions of the harmonic correlation group, the more unstable the harmonic interference is in the scenario. In other words, the situation of high data distortion risk caused by harmonic interference in this scenario is more complex. It is necessary to amplify the influence of the harmonic group in the clustering process to form more clusters related to data distortion risk. Similarly, the larger the variance of the time series corresponding to the three dimensions of the communication correlation group, the more complex the channel quality degradation is. It is necessary to form more clusters related to transmission degradation risk in the clustering process.
[0024] Using power consumption as a bridging group, the clustering direction is dynamically adjusted according to the different needs of the connected devices, making the clustering process closer to the actual use scenario. The value of the bias factor can be set according to the type of device connected in the actual application scenario. For example, when the device connected to the smart fusion terminal is an electricity meter, the accuracy of data measurement is more important. In this case, based on experience, the bias factor of the harmonic related group can be set to 0.7 and the bias factor of the communication related group can be set to 0.3, so that the clustering is more biased towards the accuracy of data under harmonics. When the device connected to the smart fusion terminal is a charging pile, the real-time performance of data transmission is more important. In this case, based on experience, the bias factor of the communication related group can be set to 0.6 and the bias factor of the harmonic related group can be set to 0.4, so that the clustering is more biased towards the communication quality.
[0025] Step S3: Cluster the historical state feature vector set, and weight the Euclidean distance calculation in the clustering algorithm based on dynamic weights to generate several transmission state clusters.
[0026] Specifically, the K-means++ clustering algorithm is used to cluster the historical state feature vectors in the historical state feature vector set. The elbow method is used to verify the rationality of the preset number of clusters and obtain the optimal number of clusters. During the clustering process, the Euclidean distance calculation is weighted based on the dynamic weights of each data dimension, thereby improving the calculation of the distance function in the K-means++ algorithm. This results in the generation of transmission state clusters with the optimal number of clusters, with each transmission state cluster corresponding to a transmission communication working condition.
[0027] Among them, the historical state feature vector X and the k-th cluster center The weighted Euclidean distance between them is The calculation formula is as follows: In the formula, This represents the data value of the i-th dimension within the historical state feature vector X. Represents the k-th cluster center The data value of the i-th dimension in the corresponding vector. This represents the dynamic weight corresponding to the i-th dimension within the historical state feature vector X.
[0028] By weighting the Euclidean distance calculation based on the dynamic weights of each data dimension, risk-oriented transmission state clusters adapted to actual application scenarios can be generated. That is, each transmission state cluster corresponds to a dominant interference mode, such as a high distortion risk mode or a high channel degradation mode. Moreover, clustering based on weighted Euclidean distance can effectively avoid situations such as "a sample with high harmonic interference may be classified into a low-priority cluster due to good communication quality". The improvement of the clustering distance function in this step can optimize the clustering effect by amplifying the weights of harmonic-related dimensions, and avoid high-risk harmonic data being squeezed out of bandwidth by low-priority data. Thus, in the environment of strong harmonic interference, the transmission guarantee capability of high-priority data is significantly improved, and the latency and packet loss rate of end-to-end transmission data are reduced.
[0029] Step S4: Introduce the silhouette coefficient to construct a dynamic evaluation and optimization mechanism for cluster quality, and determine in real time whether to update the transmission status clusters.
[0030] In practical applications, such as when a new nonlinear load device is connected to the circuit, causing changes in the power grid environment, it is necessary to address the issue that the historical clustering model may have a low degree of matching with the current data distribution over time, and to achieve dynamic optimization of the state partitioning rules. Therefore, this step introduces the silhouette coefficient to construct a dynamic evaluation and optimization mechanism for clustering quality, so as to update the transmission state clusters in a timely manner according to changes in the power grid environment.
[0031] Specifically, based on the standard contour coefficient calculation process, the contour coefficient corresponding to the state feature vector at each sampling moment is calculated in real time, generating a contour coefficient sequence. The maximum values of the total harmonic distortion (THD) and channel signal-to-noise ratio (SNR) at and before a given sampling moment are extracted. The ratio between the THD at that sampling moment and the maximum THD is used as the distortion index for that sampling moment. The ratio between the channel SNR at that sampling moment and the maximum channel SNR is calculated. The value obtained by subtracting this ratio from 1 is used as the channel degradation index for that sampling moment. The product of the distortion index and the channel degradation index is used as the risk value for that sampling moment. Similarly, the risk value for each sampling moment is calculated, generating a risk value sequence. The product of the contour coefficient and the risk value at the same sampling moment is used as the risk-oriented contour coefficient, thus obtaining the risk-oriented contour coefficient sequence.
[0032] The standard silhouette coefficient calculation process is based on existing technology. The silhouette coefficient is an internal indicator for evaluating clustering effectiveness, combining cohesion and separation to measure the reasonableness of sample assignment. Cohesion is the average distance between a sample and other samples in the same cluster, reflecting the tightness within the cluster; separation is the average distance between a sample and all samples in other clusters, reflecting the separation between clusters. The standard silhouette coefficient calculation formula for a single sample is the ratio between the maximum values of cohesion and separation. The silhouette coefficient value range is... A value closer to 1 indicates better clustering results, a value closer to 0 indicates blurred cluster boundaries, and a value closer to -1 indicates that samples may be incorrectly classified.
[0033] The purpose of introducing risk values is to capture the interactive effects of data quality and channel quality risks through quantitative calculation of risk values. Total harmonic distortion (THD) and channel signal-to-noise ratio (SNR) are used as indicators to measure data quality and channel quality, respectively, to quantify the degree of the two risks and map their values to the range of 0 to 1. This distinguishes the silhouette coefficients corresponding to the state feature vectors under different risks, enabling the clustering quality dynamic evaluation and optimization mechanism constructed in this step to detect the decline in clustering quality of high-risk data earlier. Since the channel SNR is inversely proportional to the degree of channel quality degradation, the value obtained by subtracting the ratio between the channel SNR and the maximum value of the channel SNR from 1 is used as the channel degradation indicator.
[0034] Furthermore, based on the data transmission frequency of intelligent fusion terminals in practical application scenarios, the lengths of short-term and long-term windows are set, and the sliding step size is set to 1. The risk-oriented profile coefficient sequence at the latest sampling moment is captured in real time through the sliding window method, resulting in short-term window coefficient sequences and long-term window coefficient sequences. The variance of the short-term window coefficient sequence is used as the state fluctuation degree at the latest sampling moment, and the variance of the long-term window coefficient sequence is used as the state stability benchmark. The value of the state fluctuation degree is used as the numerator, and the sum of the state fluctuation degree and the state stability benchmark is used as the denominator. The ratio of the two is used as the adaptive forgetting factor at the latest sampling moment. The product between the risk-oriented profile coefficient value corresponding to the latest sampling moment and the corresponding adaptive forgetting factor is used as the current state contribution value. The value of 1 minus the adaptive forgetting factor is used as the historical state weight. The product between the average value of the long-term window coefficient sequence after removing the risk-oriented profile coefficient at the latest sampling moment and the historical state weight is used as the historical state contribution value. The sum of the current state contribution value and the historical state contribution value is used as the moving average profile coefficient at the latest sampling moment.
[0035] The short-term window can be set to 100 sampling points and the long-term window to 1000 sampling points. Starting from the time the intelligent fusion terminal starts running, the value of the risk-oriented profile coefficient corresponding to each sampling time is continuously recorded until the accumulation of basic data reference is completed. Then, the moving average profile coefficient is calculated as the basis for triggering cluster update.
[0036] A smaller value for state fluctuation indicates a more stable recent transmission environment, in which case maintaining the original clustering simulation's state partitioning results is sufficient. Conversely, a larger value for state fluctuation indicates a more unstable recent transmission environment, reducing the applicability of the original clustering simulation's state partitioning rules for partitioning new data states, affecting the rationality and adaptability of subsequent matching transmission strategies. In this case, state partitioning needs to pay more attention to the new transmission environment, and the transmission state clusters need to be updated more frequently. Moreover, while focusing on new data, it is necessary to combine historical data benchmarks to enhance stability, avoiding the clustering quality dynamic evaluation and optimization mechanism constructed in this step being too sensitive. Too frequent clustering updates would waste computational resources, while too slow clustering updates would lead to deterioration in transmission performance after long-term operation. Therefore, in this step, the moving average profile coefficient is calculated as the basis for evaluating clustering quality.
[0037] Specifically, the update determination method for transmission state clusters is as follows: Based on manual experience, update thresholds and triggering conditions are set. When the number of consecutive occurrences of the moving average profile coefficient being less than the update threshold reaches the triggering condition, clustering update is triggered. At this time, the latest sampling time is used as the anchor point, and the seven-dimensional working condition data within the preset time period before the latest sampling time is used as the new historical data sample. Based on the new historical data sample, re-clustering is performed to obtain the updated transmission status cluster.
[0038] Among them, the number of consecutive occurrences of the moving average profile coefficient being less than the update threshold in the triggering condition can be set to 10 times, that is, when the sampling frequency is 1Hz, the judgment period is 10 seconds; the update threshold can be adjusted based on the requirements for transmission risk in the actual application scenario. The higher the sensitivity to transmission risk, the larger the update threshold. For example, the update threshold can be set to 0.5; re-clustering means resetting the rules for state division. Afterwards, the Q table needs to be iteratively updated synchronously based on the updated transmission state clusters to dynamically adapt to changes in the data transmission implementation environment.
[0039] Step S5: Construct a dynamic reward function to improve the Q-Learning algorithm, and generate a state-action Q-table based on the transmission state clusters.
[0040] Specifically, based on the transmission channel resources of intelligent fusion terminals in actual application scenarios and all types of transmission strategies in historical transmission records, execution actions in various Q-Learning algorithms are set. Each execution action in the Q-Learning algorithm corresponds to a transmission strategy. Each transmission state cluster is matched with each execution action to form several state-action pairs. The historical state feature vectors corresponding to each historical transmission event are extracted and combined with the label values of the corresponding transmission results to form a training set. Any state-action pair is selected as the target pair, and the historical state feature vector corresponding to any historical transmission event is selected as the target vector. The normalized Euclidean distance of the seven-dimensional features between the target vector and the cluster centers of each transmission state cluster is calculated. The result is obtained by dividing the Euclidean distance value by... We obtain that the values of the normalized Euclidean distance are mapped to... Within the range, the cluster of transmission states corresponding to the minimum value is selected as the target cluster to which the target vector belongs. The value of the minimum normalized Euclidean distance is taken as the deviation of the target vector from the target cluster. The value of 1 minus the deviation is taken as the feature similarity of the target vector from the target cluster.
[0041] The set execution actions need to have corresponding historical transmission records so that they can be used as samples for subsequent calculations. Common transmission strategies include 4G, carrier, 4G+UDP, carrier+TCP, carrier+batch data TCP, etc.
[0042] Furthermore, a logarithmic function is used to map the sum of the delayed data in the target vector after adding 1. The product of the mapped value and the feature similarity is used as the delay penalty, the product of the packet loss rate data in the target vector and the feature similarity is used as the packet loss penalty, the frequency of the corresponding transmission strategy in the target pair is used as the resource cost penalty, the transmission result label value of the target vector is used as the basic reward, and the calculation formula of the basic reward minus the delay penalty, packet loss penalty, and resource cost penalty is used as the dynamic reward function. The difference between the basic reward and the three penalties is used as the value of the dynamic reward function corresponding to the target vector. Similarly, the values of the dynamic reward functions of all historical state feature vectors in the training set are obtained. The values of the dynamic reward functions are substituted into the Bellman update equation to initialize the Q value of each state-action pair to 0. The Q value of each state-action pair is iteratively updated based on the training set until convergence. The state-action pair with the largest Q value among the multiple state-action pairs corresponding to each transmission state cluster is selected as the optimal pair for the corresponding transmission state cluster. The optimal pairs of each transmission state cluster are combined to obtain the state-action Q table.
[0043] The expression for the dynamic reward function R is as follows: In the formula, This represents the base reward, which is the flag value indicating the transmission result of the target vector. The value can be either 0 or 1. Y represents the target vector. Indicates the cluster center of the target cluster. Let represent the normalized Euclidean distance of the seven-dimensional features between the target vector and the cluster centers of the target cluster, where D represents the delay data in the target vector. Let L represent the logarithmic function, L represent the packet loss rate data in the target vector, and C represent the resource cost penalty, i.e., the frequency of the corresponding transmission strategy in the target pair.
[0044] also, This represents the feature similarity of the target vector relative to the target cluster, that is, the similarity between the target vector and its "state". The higher the feature similarity value, the more the target vector matches the transmission risk characteristics of the target cluster. This represents a delay penalty. A logarithmic function is used to flatten the slope when the delay data is large, thus avoiding penalty explosion. Data with a high risk of data distortion is more sensitive to delay. Therefore, in subsequent training, the penalty for historical transmission events with a high risk of data distortion and high latency is increased. The packet loss penalty is used to penalize historical transmission events that blindly retransmit packets multiple times through poor communication channels during subsequent training, ensuring that new transmission events avoid poor communication channels and prevent the waste of resources caused by packet loss and retransmission. The resource cost penalty C is used to balance the overall communication resources. When the frequency of a certain action is too high, the corresponding resource cost penalty is larger, which avoids the selection of the same action for multiple different transmission conditions in the final fitted Q table, which would lead to problems such as congestion, high retransmission rate, and insufficient resource utilization, thereby promoting the global optimal effect.
[0045] Step S6: Obtain the current state feature vector corresponding to the current transmission event, match the corresponding transmission state cluster, and execute the transmission strategy adapted to the current working condition based on the state-action Q table.
[0046] Specifically, for the current transmission event, a current state feature vector corresponding to the current transmission event is first constructed. The Euclidean distance between the current state feature vector and the cluster centers of each transmission state cluster is calculated. The current state feature vector is assigned to the transmission state cluster corresponding to the minimum Euclidean distance, and the corresponding transmission strategy is executed based on the state-action Q-table. After the transmission state cluster is updated, the state-action Q-table is updated synchronously. If the current transmission event occurs during the operation when the state-action Q-table has not been updated, the state-action Q-table before the update is used to execute the corresponding transmission strategy. If the current transmission event occurs after the state-action Q-table has been updated, the updated state-action Q-table is used to execute the corresponding transmission strategy.
[0047] The process of constructing the current state feature vector is the same as in step S1. The current state feature vector is assigned to a certain transmission state cluster. The purpose is to divide the current transmission condition. Then, based on the state-action Q table, the transmission strategy that best suits the current transmission condition can be selected.
[0048] This invention also discloses a data layered transmission system for an intelligent fusion terminal, used to implement the aforementioned data layered transmission 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 an intelligent fusion terminal. The processor stores computer program instructions for implementing the above-mentioned data layered transmission method of the intelligent fusion terminal, and the communication interface is communicatively connected to the intelligent fusion terminal.
[0049] The intelligent fusion terminal includes a harmonic analysis module for acquiring data on the dominant harmonic frequency, dominant harmonic amplitude, and total harmonic distortion rate; a device connection module for acquiring power consumption data; and a communication module for acquiring data on channel signal-to-noise ratio, delay, and packet loss rate. Seven-dimensional operating condition data and historical transmission records can be directly obtained from the intelligent fusion terminal. The intelligent fusion terminal communicates with devices such as multi-rate electricity meters and distributed charging piles in actual application scenarios, as well as with concentrators in communication networks or the master station of the power grid system. It collects data to be transmitted from these devices and executes transmission strategies matched to the corresponding operating conditions to transmit the data to the concentrators in the communication network or the master station of the power grid system.
[0050] The embodiments included in this invention are descriptions of preferred embodiments of the invention and are not limited to the precise structures already described above and shown in the accompanying drawings. Various modifications and changes can be made without departing from the scope of protection. All 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 data layered transmission method for an intelligent fusion terminal, characterized in that: Acquire historical multidimensional working condition data within a preset time period and preprocess it to construct a set of historical state feature vectors; Based on the historical state feature vector set, calculate the dynamic weights of each data dimension; The historical state feature vector set is clustered, and the Euclidean distance calculation in the clustering algorithm is weighted based on dynamic weights to generate several transmission state clusters. A silhouette coefficient is introduced to construct a dynamic evaluation and optimization mechanism for clustering quality, and to determine in real time whether to update the transmission state clusters. A dynamic reward function is constructed to improve the Q-Learning algorithm, and a state-action Q-table is generated based on the transmission state clusters. The current state feature vector corresponding to the current transmission event is obtained, and the corresponding transmission state cluster is matched. Based on the state-action Q-table, a transmission strategy adapted to the current working condition is executed. Specifically, the K-means++ clustering algorithm is used to cluster the historical state feature vectors in the historical state feature vector set. The elbow method is used to verify the rationality of the preset number of clusters and obtain the optimal number of clusters. During the clustering process, the Euclidean distance calculation is weighted based on the dynamic weights of each data dimension, thereby improving the calculation of the distance function in the K-means++ algorithm. This results in the generation of transmission state clusters with the optimal number of clusters, with each transmission state cluster corresponding to a transmission communication working condition.
2. The data layered transmission method for an intelligent fusion terminal according to claim 1, characterized in that, The construction of the historical state feature vector set includes: starting from the operating time of the intelligent fusion terminal, collecting multi-dimensional operating condition data in real time at a fixed sampling frequency and performing standardized processing, including operating condition data in seven dimensions: dominant harmonic frequency, dominant harmonic amplitude, total harmonic distortion rate, power consumption, channel signal-to-noise ratio, delay, and packet loss rate; merging the seven-dimensional operating condition data corresponding to each sampling time after standardized processing to construct the state feature vector of the corresponding sampling point; extracting a seven-dimensional operating condition data sequence of a preset time period as historical data sample, obtaining the historical state feature vector corresponding to each sampling point in the historical data sample; reading the transmission timestamp, transmission strategy, and transmission result of each historical transmission event from the historical transmission records of the intelligent fusion terminal, marking successful transmission results as 1 and failed transmission results as 0, and using the set of all historical state feature vectors and historical transmission records as the historical state feature vector set.
3. The data layered transmission method for an intelligent fusion terminal according to claim 2, characterized in that, The calculation of dynamic weights for each data dimension includes: dividing the dominant harmonic frequency, dominant harmonic amplitude, and total harmonic distortion rate into a harmonic correlation group; dividing the channel signal-to-noise ratio, delay, and packet loss rate into a communication correlation group; and dividing the power consumption dimension into a bridging group. The time series of each data dimension are extracted from the historical state feature vector set, and the variance is calculated separately. The sum of the variances of the seven data dimensions is taken as the total correlation feature. The ratio between the sum of the variances of the three dimensions within the harmonic correlation group and the total correlation feature is taken as the dynamic weight of the three dimensions within the harmonic correlation group. The ratio between the sum of the variances of the three dimensions within the communication correlation group and the total correlation feature is taken as the dynamic weight of the three dimensions within the communication correlation group. Based on the requirements for transmission and communication quality in actual application scenarios, a bias factor is set for the harmonic correlation group and the communication correlation group. The sum of the products of the dynamic weights of both groups and their respective bias factors is taken as the dynamic weight of the power consumption dimension.
4. The data layered transmission method for an intelligent fusion terminal according to claim 2, characterized in that, The mechanism for constructing a dynamic evaluation and optimization of clustering quality by introducing silhouette coefficients includes: a calculation process based on standard silhouette coefficients, real-time calculation of the silhouette coefficients corresponding to the state feature vectors at each sampling time, generating a silhouette coefficient sequence; extracting the maximum values of all total harmonic distortion (THD) and channel signal-to-noise ratio (SNR) at and before a given sampling time, using the ratio between the THD at that sampling time and the maximum THD as the distortion index for that sampling time, calculating the ratio between the channel SNR at that sampling time and the maximum channel SNR, subtracting the ratio from 1 as the channel degradation index for that sampling time, and using the product of the distortion index and the channel degradation index as the risk value for that sampling time. Similarly, the risk value for each sampling time is calculated, generating a risk value sequence; and using the product of the silhouette coefficients and risk values at the same sampling time as the risk-oriented silhouette coefficients, thus obtaining a risk-oriented silhouette coefficient sequence.
5. The data layered transmission method for an intelligent fusion terminal according to claim 4, characterized in that, The proposed mechanism for constructing a dynamic evaluation and optimization of clustering quality by introducing silhouette coefficients further includes: based on the data transmission frequency of intelligent fusion terminals in actual application scenarios, setting the lengths of short-term and long-term windows and setting the sliding step size to 1, and extracting the risk-oriented silhouette coefficient sequence at the latest sampling moment in real time through the sliding window method to obtain the short-term window coefficient sequence and the long-term window coefficient sequence. The variance of the short-term window coefficient sequence is used as the state fluctuation degree at the latest sampling moment, and the variance of the long-term window coefficient sequence is used as the state stability benchmark. The value of the state fluctuation degree is used as the numerator, the sum of the state fluctuation degree and the state stability benchmark is used as the denominator, and the ratio of the two is used as the adaptive forgetting factor at the latest sampling moment.
6. The data layered transmission method for an intelligent fusion terminal according to claim 5, characterized in that, The mechanism for constructing a dynamic evaluation and optimization of clustering quality by introducing a silhouette coefficient further includes: using the product of the risk-oriented silhouette coefficient corresponding to the latest sampling time and the corresponding adaptive forgetting factor as the current state contribution value; using the value of 1 minus the adaptive forgetting factor as the historical state weight; using the product of the average value of the long-term window coefficient sequence after removing the risk-oriented silhouette coefficient at the latest sampling time and the historical state weight as the historical state contribution value; and using the sum of the current state contribution value and the historical state contribution value as the moving average silhouette coefficient at the latest sampling time. An update threshold and triggering conditions are set based on manual experience. When the number of consecutive occurrences of the moving average silhouette coefficient being less than the update threshold reaches the triggering condition, clustering updates are triggered. At this time, using the latest sampling time as the anchor point, the seven-dimensional working condition data within a preset time period before the latest sampling time are used as new historical data samples, and re-clustered to obtain the updated transmission state clusters.
7. The data layered transmission method for an intelligent fusion terminal according to claim 2, characterized in that, The improved Q-Learning algorithm based on the construction of a dynamic reward function includes: setting various execution actions in the Q-Learning algorithm based on all types of transmission strategies in historical transmission records; matching each transmission state cluster with each execution action to form several state-action pairs; extracting historical state feature vectors corresponding to each historical transmission event and combining them with the label values of the corresponding transmission results to form a training set; selecting any state-action pair as the target pair; selecting any historical state feature vector corresponding to any historical transmission event as the target vector; calculating the normalized Euclidean distance between the target vector and the cluster centers of each transmission state cluster using the seven-dimensional features; selecting the transmission state cluster corresponding to the minimum value as the target cluster to which the target vector belongs; using the minimum normalized Euclidean distance value as the deviation degree of the target vector relative to the target cluster; and subtracting the deviation degree value from 1 as the feature similarity of the target vector relative to the target cluster.
8. The data layered transmission method for an intelligent fusion terminal according to claim 7, characterized in that, The improved Q-Learning algorithm by constructing a dynamic reward function further includes: mapping the sum of delayed data plus 1 in the target vector using a logarithmic function; using the product between the mapped value and the feature similarity as a delay penalty; using the product between the packet loss rate data in the target vector and the feature similarity as a packet loss penalty; using the frequency of the corresponding transmission strategy in the target pair as a resource cost penalty; using the transmission result label value of the target vector as a basic reward; and using the difference between the basic reward and the three penalties as the value of the dynamic reward function corresponding to the target vector. The value of the dynamic reward function is substituted into the Bellman update equation to initialize the Q-value of each state-action pair to 0. The Q-value of each state-action pair is iteratively updated based on the training set until convergence. The state-action pair with the largest Q-value among the multiple state-action pairs corresponding to each transmission state cluster is selected as the optimal pairing for the corresponding transmission state cluster, thus obtaining the state-action Q-table.
9. A data layered transmission method for an intelligent fusion terminal according to any one of claims 1 to 8, characterized in that, The process of obtaining the current state feature vector corresponding to the current transmission event, matching the corresponding transmission state clusters, and executing a transmission strategy adapted to the current operating condition based on the state-action Q-table includes: for the current transmission event, first constructing the current state feature vector corresponding to the current transmission event, calculating the Euclidean distance between the current state feature vector and the cluster centers of each transmission state cluster, assigning the current state feature vector to the transmission state cluster corresponding to the minimum Euclidean distance, and thus executing the corresponding transmission strategy based on the state-action Q-table; after the transmission state clusters are updated, the state-action Q-table is updated synchronously. If the current transmission event occurs during operation when the state-action Q-table has not been updated, the state-action Q-table before the update is used to execute the corresponding transmission strategy; if the current transmission event occurs after the state-action Q-table has been updated, the updated state-action Q-table is used to execute the corresponding transmission strategy.
10. A data hierarchical transmission system for an intelligent fusion terminal, characterized in that: The device includes a processor, a memory, a communication interface, and an intelligent fusion terminal. The processor stores computer program instructions for implementing the data layered transmission method of the intelligent fusion terminal according to any one of claims 1 to 9. The communication interface is communicatively connected to the intelligent fusion terminal.