A method for dynamically selecting an electric energy data transmission path for a smart meter
By constructing a historical pattern library and optimizing the ant colony algorithm, we have achieved the prediction and confidence quantification of future communication quality, solved the problem of unstable transmission path selection in dynamic networks, and improved the reliability and stability of data transmission.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- JIANGYIN CHANGYI GRP CO LTD
- Filing Date
- 2026-05-22
- Publication Date
- 2026-06-19
AI Technical Summary
In dynamic wireless multi-hop ad hoc networks, existing technologies rely on instantaneous assessment of link quality, leading to unstable transmission path selection and making it difficult to guarantee the reliability of data transmission.
A historical pattern library is constructed. By recording the status characteristics of related links and the actual communication quality in historical communication records, the communication quality estimate and confidence level for future time windows are generated, and the ant colony algorithm is used to optimize and select the optimal transmission path.
It improves the accuracy of path decision-making and the reliability of data transmission, can avoid links that are about to deteriorate, and enhances the scientific nature of the system's decision-making and overall stability when facing network uncertainties and state fluctuations.
Smart Images

Figure CN122247917A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of communication technology. More specifically, this invention relates to a method for dynamically selecting power data transmission paths for smart meters. Background Technology
[0002] In the field of power data transmission, especially in wireless multi-hop ad hoc networks composed of a large number of data acquisition terminals (such as power meter reading terminals and environmental monitoring nodes), data generated by the terminals is forwarded hop-by-hop from the source node through multiple intermediate nodes and finally converges to the aggregation node. These networks are usually deployed in complex environments, and their wireless link quality is easily affected by factors such as obstacles, electromagnetic interference, and node micro-movements, exhibiting significant time-varying and uncertainties.
[0003] To address the dynamic nature of links, existing technologies typically employ path selection methods based on historical or instantaneous link status measurements (such as packet loss rate and Received Signal Strength Indication (RSSI)). This involves quantitatively evaluating the link status and selecting the transmission path based on the evaluation results.
[0004] However, when evaluating the quality of a link based on the aforementioned existing technologies, the reliability of the evaluation result (such as a packet loss rate value) itself fluctuates with the dynamic changes in the network environment. This makes it easy to choose a path consisting of several links that "seem to be of good quality but are actually unreliable in evaluation," thus making the final path decision lack robustness in time-varying environments and making it difficult to guarantee the reliability of data transmission. Summary of the Invention
[0005] To address the technical problem of unstable performance of selected transmission paths in dynamic networks due to insufficient reliability of link quality assessment results, the present invention provides the following technical solution.
[0006] A method for dynamically selecting power data transmission paths for smart meters, comprising: Historical communication records of communication links in the network are collected, and a historical pattern library is constructed based on the historical communication records. This historical pattern library is used to associate the historical state characteristics of the links with the actual communication quality measured immediately following the historical state characteristics. For each link involved in path decision-making, the current state characteristics of each link are obtained, and by matching and fusion with the historical pattern library, the communication quality estimate and corresponding confidence level of each link in a preset future time window are generated. Based on the estimated communication quality and the estimated confidence level of each link, a fitness function is constructed to comprehensively evaluate the merits of each candidate path from the source node to the sink node. Using an optimization algorithm, the optimal transmission path is selected from all candidate paths from the source node to the sink node based on the fitness function.
[0007] Preferably, the process of constructing the historical pattern library includes: Successfully determined historical communication records; A preset analysis window is set up, and the analysis window is slid on the timeline to count the communication records that fall into each window and extract the historical status features of the links in each window. A historical experience record is formed by combining the historical state characteristics of a link in a single window, the end time of that window, and the actual communication quality measured for that link in the next window. The historical pattern library is obtained by storing the historical experience records formed by each window and the corresponding formation time.
[0008] Preferably, the historical state features include the average received signal strength, the standard deviation of the received signal strength, and the packet loss rate within the corresponding window for successful communication records; the communication quality is the packet loss rate.
[0009] Preferably, generating the estimated communication quality of each link within a preset future time window and the corresponding estimated confidence level includes: Obtain the current state features of the current link within the most recent window; retrieve several historical experience records from the historical pattern library whose similarity to the current state features meets preset conditions; The fusion weight of each retrieved historical experience record is calculated based on the similarity between each retrieved historical experience record and the current state feature, as well as the termination time recorded in the historical experience record. Using the fusion weight, the actual measured communication quality in the next window stored in each retrieved historical experience record is weighted and summed to obtain the estimated communication quality. The estimated confidence level is calculated based on the distribution of similarity between the retrieved historical experience records and the current state features.
[0010] Preferably, the calculation process of the fusion weight includes: The calculated similarity weights are combined with the time decay weights in a weighted manner; The similarity weight is determined based on the cosine similarity between the current state features and the historical state features in each retrieved historical experience record. The time decay weight is determined based on the time difference between the current moment and the termination time recorded in each retrieved historical experience record.
[0011] Preferably, the process of constructing the fitness function includes: For any candidate path, the communication quality prediction of each link is weighted based on the estimated confidence of each link on the candidate path to obtain the comprehensive quality prediction of the candidate path. The minimum estimated confidence level of all links on the candidate path is selected as the overall confidence level of the candidate path. The fitness of the candidate path is calculated based on the comprehensive quality prediction and comprehensive confidence score.
[0012] Preferably, the optimization algorithm is the ant colony algorithm.
[0013] Preferably, the optimization process includes: Ants explore the complete path from the source node to the sink node based on the pheromone concentration and heuristic information along the path; For each path explored by an ant, the fitness of the path is calculated based on the estimated communication quality and confidence level of each link on the path. The pheromone concentration of each path is updated based on its fitness. The exploration and update are performed iteratively, and the path with the highest fitness among all iterations is finally output as the optimal transmission path.
[0014] The beneficial effects of this invention are: On the one hand, this invention constructs and utilizes a historical pattern library to match the real-time state characteristics of the link with historical patterns, thereby enabling the prediction of communication quality in future time windows. This changes the limitations of traditional methods that rely solely on past or instantaneous states, making path selection more forward-looking and more effectively avoiding links that are about to deteriorate, fundamentally improving the accuracy of path decisions and the reliability of data transmission in dynamic environments.
[0015] On the other hand, this invention not only estimates link quality but also quantifies the confidence level of the estimate, and deeply integrates the quality estimate and confidence level into the path fitness function and optimization algorithm. This allows the path selection process to simultaneously weigh the expected link quality against the predictive certainty, avoiding the selection of a path composed of several seemingly high-quality but unreliable links, significantly enhancing the scientific nature and overall stability of the system's decision-making in the face of network uncertainty and state fluctuations. Attached Figure Description
[0016] Figure 1 This is a flowchart of steps S1-S4 in a method for dynamically selecting power data transmission paths for smart meters according to an embodiment of the present invention. Detailed Implementation
[0017] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are some embodiments of the present invention, but not all embodiments.
[0018] In the wireless multi-hop ad hoc network addressed in this invention, multiple data acquisition terminals generate data as source nodes. This data needs to be relayed through intermediate nodes to eventually reach one or more aggregation nodes, constituting a data transmission task. A communication link is formed between any two nodes capable of direct communication. Any feasible transmission path from a single source node to an aggregation node consists of a series of interconnected communication links. Therefore, the quality of a path fundamentally depends on the communication quality of each link it contains.
[0019] Reference Figure 1 A method for dynamically selecting power data transmission paths for smart meters includes steps S1-S4, as detailed below: S1: Collect historical communication records of communication links in the network and build a historical pattern library based on the historical communication records.
[0020] The system collects communication records generated by each communication link within a historical time period. For each link, denoted as link L, each complete communication record consists of a data packet transmission record and its corresponding acknowledgment packet reception record. Data packet transmission record: generated when the starting node of link L sends a data packet to the ending node, and includes at least the transmission timestamp, the ending node identifier, and the packet sequence number.
[0021] Acknowledgment packet reception record: This record is generated when the starting node of link L receives an acknowledgment packet from the ending node within a specified time. The record mainly includes the RSSI (Received Signal Strength Indicator) of the acknowledgment packet measured by the wireless receiver of the starting node, and at least includes the reception timestamp, the ending node identifier, and the sequence number of the acknowledgment packet.
[0022] If no acknowledgment packet is received within the preset timeout period, the communication record is considered a failure. The RSSI in a successful communication record is the direct data source for subsequent feature extraction.
[0023] A fixed-duration analysis window (e.g., 30 seconds) is preset, and the window slides along the time axis of the aforementioned historical time period in increments shorter than this fixed duration (e.g., 10 seconds). Because the step size is smaller than the window length, there is temporal overlap between adjacent windows. This causes some communication records to fall into multiple consecutive windows and be analyzed repeatedly. The aim is to capture the continuous evolution of the link state with higher temporal resolution and avoid losing important state transition patterns due to window jumps.
[0024] To build a historical pattern library, perform the following operations independently for link L: First, based on the link L identifier, all communication records belonging to link L are filtered out. For the first window formed by sliding, all communication records falling within the window are counted. These communication records constitute the complete set of communication records for link L within the window. Based on this complete set of communication records, the historical state features of link L are calculated and extracted to quantify the communication state of link L within the window.
[0025] The historical state characteristics of the aforementioned link L include at least the following: The average RSSI value of the acknowledgment packets corresponding to all successful communications on link L within this window; The standard deviation of RSSI within this window; The packet loss rate of link L within this window is obtained by comparing the number of communication records judged as failed within this window with the total number of communication records within this window.
[0026] Then, continue to observe the next complete window immediately following the first window, and count the actual packet loss rate of link L within that window. This is taken as the actual communication quality of link L following the historical state characteristics. Save the historical state characteristics, the actual communication quality of link L in the next window after the first window, and the termination time of the first window as a historical experience record.
[0027] Perform the above operations on all windows to collect all historical experience records formed by link L, forming the historical pattern library of link L. Similarly, the historical pattern libraries of other links can be obtained.
[0028] Each record in the constructed historical pattern library does not record the link state at a specific historical moment in isolation, but rather explicitly associates a historical state characteristic with an actual measured communication quality immediately following that state. This paired record structure of "state-subsequent quality" makes it possible to perform communication quality trend analysis based on link state. Specifically, when the system learns the current or recent state characteristics of a link, it can query this historical pattern library to find records with similar state characteristics in the past and refer to the associated subsequent communication quality in these records, thereby providing data to assess the communication situation that the link may face in the next time window.
[0029] S2: For each link involved in path decision-making, obtain the current state characteristics of each link, and generate the communication quality estimate and corresponding confidence level of each link in the preset future time window by matching and fusion with the historical pattern library.
[0030] Based on the historical pattern library constructed by S1 above, for each candidate link that may participate in this transmission, its communication quality within a preset time window is inferred according to its current communication status, and the reliability of the inference is quantified.
[0031] Specifically, for the link to be evaluated, its communication records within the most recent complete window are collected, and the current state characteristics of the link are calculated according to the same window definition and feature calculation method as S1 above.
[0032] For the current link mentioned above, the cosine similarity between the current state features and the historical state features contained in each historical experience record is calculated from its dedicated historical pattern library (the calculation of cosine similarity is an existing technology and will not be elaborated here). At least the top 10 historical experience records with the highest cosine similarity are retrieved to form a candidate set.
[0033] For each historical experience record in the candidate set, although they all share some similarity with the current state characteristics of the current link, their similarity to the current state characteristics varies, and their formation time (the freshness of the experience) also differs. Therefore, it is necessary to assign an independent weight to each historical experience record in the candidate set. The specific process is as follows: The ratio of the cosine similarity of each historical experience record in the candidate set to the sum of the cosine similarities of all historical experience records is calculated and used as the similarity weight of the corresponding historical experience record.
[0034] In addition, the absolute value of the difference between the current time and the termination time recorded in each historical experience record is calculated, and the time decay weight of the historical experience records is obtained by calculating the exponential function, which can be expressed as: In the formula, For the time decay weights mentioned above, This is the time decay factor (for example, a value of 0.001, which can be dynamically adjusted according to the network environment). It is the absolute value of the difference between the current moment and the end time recorded in a single historical experience record.
[0035] After obtaining the similarity weights and time decay weights for each historical experience record, in order to achieve a balance between the two dimensions of similarity and timeliness, a fusion weight is obtained by linearly combining the above similarity weights and time decay weights, which can be expressed by the following relational formula: In the formula, The fusion weight for a single historical experience record, This is the weighting balance coefficient. For the above similarity weights, The above refers to the time decay weight.
[0036] The preferred approach is to assign a weight balance coefficient with a high similarity weight, such as 0.7, to ensure that the prediction results are primarily dominated by historical experiences most similar to the current state, thereby guaranteeing the core accuracy of the assessment of future communication quality of the link. Simultaneously, a weight balance coefficient of 0.3 is assigned to the time decay weight to make necessary corrections and suppress overly outdated or potentially invalid historical experience records, thus enabling a gentle adaptation to the long-term, slow evolution of the network. The specific value of this weight balance coefficient can be fine-tuned according to the dynamics of different network scenarios.
[0037] The calculated fusion weights are then normalized to ensure that the sum of the weights of all historical experience records is 1 (e.g., the fusion weight of a single historical experience record is divided by the sum of the fusion weights of all historical experience records), thus obtaining the final fusion weights of each historical experience record.
[0038] Through the above-mentioned fusion weight design based on two-factor weighting, the system can automatically and adaptively adjust the contribution of each historical experience, so that the communication quality assessment will focus more on those historical experience records that are most similar to the current state and have the smallest time difference.
[0039] The communication quality measured in the next window is further weighted and summed using the historical experience records stored in the candidate set to obtain the estimated communication quality of the current link in the future time window (the same size as the window mentioned above).
[0040] In addition, the ratio of the mean of the cosine similarity of all historical experience records in the candidate set to the standard deviation of the cosine similarity is calculated to obtain the estimated confidence level of the communication quality.
[0041] In summary, for each candidate link that may participate in this transmission, a communication quality estimate for a future time window and a predicted confidence level that quantifies its reliability are generated. This set of outputs elevates link evaluation from a reflection of the past / current situation to a forward-looking judgment with reliability measures for the future, providing core input for path-level decision-making.
[0042] S3: Based on the communication quality prediction and confidence level of each link, construct a fitness function to comprehensively evaluate the merits of each candidate path from the source node to the sink node.
[0043] After obtaining the estimated communication quality and confidence level of each candidate link, the link-level evaluation needs to be scientifically aggregated into a comprehensive evaluation index at the path level in order to compare and select different candidate paths.
[0044] For any candidate path from the source node to the sink node, construct its fitness function: First, the estimated communication quality values of each link on the candidate path are weighted and summed to obtain the overall quality estimate of the entire candidate path. Normalization is achieved by dividing the estimated confidence value of a single link by the sum of the estimated confidence values of all links.
[0045] Then, the minimum estimated confidence level of all links on the candidate path is selected as the overall confidence level of the candidate path. The minimum estimated confidence level is chosen because if there is a link in the path whose future behavior is highly unstable (i.e., the estimated confidence level is low), even if the estimates of other links are very accurate, the performance of the entire candidate path in actual transmission still has uncertainties.
[0046] Finally, based on the comprehensive quality prediction and comprehensive confidence level of the candidate path, the fitness of the candidate path is defined as follows: In the formula, The fitness of this candidate path, The overall confidence level of this candidate path. The overall quality estimate for this candidate path is given.
[0047] A higher fitness value indicates that the candidate path is better in terms of both higher predicted communication quality and greater prediction certainty.
[0048] S4: Using an optimization algorithm, the optimal transmission path is selected from all candidate paths from the source node to the sink node based on the fitness function.
[0049] In dynamic multi-hop networks, the number of feasible path combinations between the source node and the sink node is enormous, requiring efficient swarm intelligence optimization algorithms for intelligent search. This invention employs an improved ant colony optimization algorithm to achieve this goal. This algorithm simulates the intelligent foraging behavior of ants, guiding the search through a positive feedback mechanism of virtual "pheromones." Its core improvement lies in deeply integrating the pheromone update mechanism with the fitness function of the path generated by S3, which incorporates communication quality predictions and prediction confidence levels. This allows the algorithm to adaptively converge to robust paths with expected superior performance and high reliability within future transmission periods. The specific process is as follows: Step 1, Algorithm Initialization: Initialize the pheromone concentration (e.g., 1) for each directed candidate link in the network, and set the number of ants (e.g., 20), the pheromone evaporation coefficient (e.g., 0.1), the pheromone heuristic factor, the expected heuristic factor, and the maximum number of iterations. These parameters can be dynamically adjusted according to the network size.
[0050] Step 2: Ant Path Exploration In each round of iterative search, all artificial ants start simultaneously from the starting node (source node) of this data transmission task, independently exploring and advancing towards the target node (sink node). At each network node encountered along the way, each ant needs to choose the next neighbor node to visit. This choice is not random, but based on a probability calculated from two aspects: the first is the current pheromone concentration accumulated on the connection link; the higher the concentration, the greater the likelihood that the link has been used by many high-quality paths recently, and therefore the stronger its attraction; the second is a simple heuristic guidance, such as the reciprocal of the estimated distance from the current neighbor node to the target node. This information guides the ants to generally move in the direction of the target, avoiding blind searching. Through this probability-based decision-making mechanism, each ant eventually discovers a complete path from the source node to the sink node and records it.
[0051] Step 3: Path Assessment and Pheromones Update After all ants have completed their path exploration, the system evaluates the results and updates the virtual pheromone distribution across the entire network accordingly. This is crucial for the algorithm to achieve collective learning and positive feedback. This update process involves two consecutive operations with different functions: First, the pheromone concentration on all links in the network is globally reduced according to the preset pheromone evaporation coefficient. This operation simulates the phenomenon of pheromone evaporation over time in nature. Its core function is to gradually reduce the influence of outdated experience and prevent the algorithm from getting stuck in local optima due to the accidental reinforcement of certain paths in the early stages, thus preserving space and possibility for continuous exploration of new and potentially better paths. Subsequently, based on the quality of the path explored by each ant, the pheromone on the path is enhanced differently. Specifically, for each ant, the system calculates the overall fitness of its explored path according to the fitness function defined in S3 above. The higher the value, the better the expected future performance of the path and the greater the predictability. Then, a certain amount of pheromone is added to each link of the entire path traversed by this ant. The amount of added pheromone is directly proportional to the fitness value of the path. This means that a path that is prospectively evaluated as "high-quality and reliable" will receive greater pheromone rewards for each link. Through this mechanism, the pheromone system is no longer just a historical record of how frequently a path is used, but has evolved into a dynamic "future path value map," which intuitively identifies which links in the network are more likely to constitute high-quality and reliable future transmission channels.
[0052] Step 4: Iterative convergence and optimal path decision: The ant path exploration and pheromone update process described above constitutes a complete iterative loop. The algorithm will repeat this loop multiple times. During the iteration process, high-fitness, high-quality paths become more attractive due to continuous pheromone enhancement, attracting more subsequent ants to choose them, forming a strong positive feedback loop, thus gradually highlighting high-quality paths from numerous possibilities. At the same time, the pheromone evaporation mechanism ensures that this enhancement does not lead to algorithm rigidity, maintaining the necessary exploration capability. The iteration stops when the preset maximum number of iterations is reached, or when the optimal path output by the algorithm remains stable. Finally, the algorithm selects the path with the highest fitness value from all paths explored in all iterations, officially determining it as the optimal transmission path for this data transmission task from the source node to the sink node.
[0053] In summary, the improved ant colony algorithm of this invention, within a collective memory space composed of pheromones, not only considers the geometric length or instantaneous state of the path, but also performs intelligent navigation and decision-making based on a forward-looking assessment of future communication quality and reliability. This ensures that the ultimately selected optimal transmission path is not only theoretically superior, but also a robust choice whose superiority is highly likely to be realized during future transmission periods. Thus, from the algorithmic level of path optimization, it provides a core guarantee for the high reliability of end-to-end data transmission in dynamic and uncertain network environments.
[0054] It should be noted that those skilled in the art can make various modifications and improvements without departing from the inventive concept, and these all fall within the scope of protection of this invention. Therefore, the scope of protection of this patent should be determined by the appended claims.
Claims
1. A method for dynamically selecting power data transmission paths for smart meters, characterized in that, include: Historical communication records of communication links in the network are collected, and a historical pattern library is constructed based on the historical communication records. This historical pattern library is used to associate the historical state characteristics of the links with the actual communication quality measured immediately following the historical state characteristics. For each link involved in path decision-making, the current state characteristics of each link are obtained, and by matching and fusion with the historical pattern library, the communication quality estimate and corresponding confidence level of each link in a preset future time window are generated. Based on the estimated communication quality and the estimated confidence level of each link, a fitness function is constructed to comprehensively evaluate the merits of each candidate path from the source node to the sink node. Using an optimization algorithm, the optimal transmission path is selected from all candidate paths from the source node to the sink node based on the fitness function.
2. The method for dynamic selection of power data transmission path for smart meters according to claim 1, characterized in that, The construction process of the historical pattern library includes: Successfully determined historical communication records; A preset analysis window is set up, and the analysis window is slid on the timeline to count the communication records that fall into each window and extract the historical status features of the links in each window. A historical experience record is formed by combining the historical state characteristics of a link in a single window, the end time of that window, and the actual communication quality measured for that link in the next window. The historical experience records formed by each window are stored to obtain the historical pattern library.
3. The method for dynamic selection of power data transmission path for smart meters according to claim 2, characterized in that, The historical state features include the average received signal strength, the standard deviation of the received signal strength, and the packet loss rate within the corresponding window for successful communication records; the communication quality is the packet loss rate.
4. The method for dynamic selection of power data transmission path for smart meters according to claim 2, characterized in that, The generation of communication quality estimates and corresponding confidence levels for each link within a preset future time window includes: Obtain the current state features of the current link within the most recent window; retrieve several historical experience records from the historical pattern library whose similarity to the current state features meets preset conditions; The fusion weight of each retrieved historical experience record is calculated based on the similarity between each retrieved historical experience record and the current state feature, as well as the termination time recorded in the historical experience record. Using the fusion weight, the actual measured communication quality in the next window stored in each retrieved historical experience record is weighted and summed to obtain the estimated communication quality. The estimated confidence level is calculated based on the distribution of similarity between the retrieved historical experience records and the current state features.
5. The method for dynamic selection of power data transmission path for smart meters according to claim 4, characterized in that, The calculation process of the fusion weight includes: The calculated similarity weights are combined with the time decay weights in a weighted manner; The similarity weight is determined based on the cosine similarity between the current state features and the historical state features in each retrieved historical experience record. The time decay weight is determined based on the time difference between the current moment and the termination time recorded in each retrieved historical experience record.
6. The method for dynamic selection of power data transmission path for smart meters according to claim 1, characterized in that, The process of constructing the fitness function includes: For any candidate path, the communication quality prediction of each link is weighted based on the estimated confidence of each link on the candidate path to obtain the comprehensive quality prediction of the candidate path. The minimum estimated confidence level of all links on the candidate path is selected as the overall confidence level of the candidate path. The fitness of the candidate path is calculated based on the comprehensive quality prediction and comprehensive confidence score.
7. The method for dynamic selection of power data transmission path for smart meters according to claim 1, characterized in that, The optimization algorithm is the ant colony algorithm.
8. A method for dynamically selecting power data transmission paths for smart meters according to claim 7, characterized in that, The optimization process includes: Ants explore the complete path from the source node to the sink node based on the pheromone concentration and heuristic information along the path; For each path explored by an ant, the fitness of the path is calculated based on the estimated communication quality and confidence level of each link on the path. The pheromone concentration of each path is updated based on its fitness. The exploration and update are performed iteratively, and the path with the highest fitness among all iterations is finally output as the optimal transmission path.