Communication timeout exception handling method for intelligent electric energy meter
Through real-time monitoring and calculation of link quality evaluation values, combined with adaptive two-layer dynamic timeout detection and intelligent reconnection strategies, the problems of communication timeout and data loss of smart power meters in complex network environments are solved, achieving higher data reliability and integrity.
Patent Information
- Application Number
- CN202510266987.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-07
- Publication Date
- 2025-04-04
- Estimated Expiration
- 2045-03-07
AI Technical Summary
Smart energy meters have problems such as communication timeout response, reconnection failure, data loss and insufficient adaptability of link fluctuations in complex network environments, which affect the reliability and integrity of data.
By monitoring the communication parameters of the power meter in real time, calculating the link quality evaluation value, and introducing adaptive double-layer dynamic timeout detection and intelligent reconnection strategies, accurate evaluation of communication status and accurate compensation of data are achieved.
It effectively reduces the risk of misjudgment and response delay, improves the accuracy of timeout judgment, and ensures the integrity and credibility of the metrological data through data correction and compensation.
Smart Images

Figure CN119766696A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of data exception processing, and in particular relates to a method for processing communication timeout exceptions of a smart electric energy meter in full performance detection. Background Art
[0002] In traditional communication systems, when electric energy meters encounter unstable communication links, excessive network delays, or low signal quality, they often lack real-time monitoring and accurate evaluation of link status, resulting in the inability to detect communication anomalies in a timely manner, and thus unable to respond effectively to timeouts. At the same time, traditional methods usually use fixed reconnection intervals and transmission parameters. When the network environment fluctuates frequently, frequent reconnection attempts can easily lead to a waste of resources, and it is difficult to guarantee the reconnection success rate when the network status is poor.
[0003] In addition, traditional electric energy meter systems are often unable to accurately compensate for missing data during communication interruptions in data processing after communication is restored, resulting in damage to the continuity and integrity of electric energy data. Insufficient adaptability to link fluctuations and sudden anomalies makes electric energy meters prone to data mutations, link instability, and timeout misjudgments in complex network environments. These problems will affect reliability and data accuracy in large-scale electric energy meter remote management and real-time data monitoring applications, increasing operating costs and maintenance difficulties. Smart electric energy meters have technical problems such as communication timeout response, reconnection failure, data loss, and insufficient adaptability to link fluctuations in complex network environments. Summary of the invention
[0004] The present invention aims to address the technical problems existing in the prior art and provide a method for handling communication timeout exceptions of smart electric energy meters, which can accurately evaluate the communication status under different network states, reduce the risks of misjudgment and response delays, improve the accuracy of timeout determination, provide a comprehensive data compensation mechanism for smart electric energy meters, and ensure the integrity of metering data.
[0005] In order to achieve the above technical objectives, the present invention adopts the following technical solutions: A method for handling a communication timeout exception of a smart electric energy meter comprises the following steps: S1. Real-time monitoring and collection and analysis of communication parameters of the electric energy meter, calculation of link quality evaluation value, adaptive dual-layer dynamic timeout detection based on the link quality evaluation value, obtaining communication status signal and timeout type, obtaining processing strategy based on communication signal status and timeout type, and entering link quality evaluation value, communication signal status, timeout type and processing strategy into communication abnormality processing signal; S2. Obtain a communication exception processing signal, start an intelligent reconnection strategy according to the communication exception processing signal, and trigger a communication recovery signal. When the communication recovery signal is triggered, perform data correction and compensation processing on the abnormal data generated by the real-time data stream of the electric energy meter when the communication is interrupted to obtain a corrected complete data stream.
[0006] Preferably, in step S1, the communication parameters of the electric energy meter include communication delay, packet loss rate, signal strength, number of reconnection failures, basic reconnection interval, default transmission power, electric energy reading before the electric energy meter is disconnected, and timestamp.
[0007] Preferably, in step S1, communication delay, packet loss rate and signal strength are extracted from the collected communication parameters of the electric energy meter, and cumulative recursive calculation is performed based on the current communication delay, packet loss rate and signal strength to obtain the link fluctuation feedback value and form link status fluctuation feedback.
[0008] Preferably, in step S1, based on the feedback of link state fluctuation, the cumulative deviation value of the link is calculated, and the link quality evaluation value is further calculated.
[0009] Preferably, in step S1, based on the link quality evaluation value, an adaptive dual-layer dynamic timeout detection algorithm is introduced to perform adaptive dual-layer dynamic timeout detection.
[0010] Preferably, in step S1, based on the link quality evaluation value and the adaptive dual-layer dynamic timeout detection, the short-term mutation characteristics and the cumulative fluctuation characteristics are further calculated, the communication status signal is analyzed and obtained, the timeout type is determined, and the processing strategy is obtained.
[0011] Preferably, in step S2, the number of reconnection failures is extracted from the collected communication parameters of the electric energy meter, and according to the processing strategy in the communication exception processing signal, an intelligent reconnection strategy algorithm is introduced to start the intelligent reconnection strategy, and according to the link quality evaluation value in the communication exception processing signal, the optimal reconnection interval time and reconnection transmission power are calculated.
[0012] Preferably, in step S2, a reconnection request is initiated according to the optimal reconnection interval and reconnection transmission power. If the reconnection fails, the number of failures is recorded and the optimal reconnection interval is recalculated and the reconnection transmission power is readjusted until a communication recovery signal is triggered.
[0013] Preferably, in step S2, when the communication recovery signal is triggered, the electric energy reading and timestamp before the electric energy meter interruption are extracted from the collected communication parameters of the electric energy meter, and an adaptive data correction and dynamic trend compensation algorithm is introduced to perform data correction and compensation processing on the abnormal data generated by the real-time data stream of the electric energy meter when the communication is interrupted, so as to obtain a corrected complete data stream.
[0014] Compared with the prior art, the beneficial effects of the present invention are: (1) The present invention forms an accurate link quality evaluation value through real-time monitoring and cumulative recursive calculation of link status. The link quality evaluation value is generated by a nonlinear combination of communication delay, packet loss rate and signal strength, and can sensitively respond to short-term fluctuations and long-term trends of the link. This link quality evaluation method effectively enhances the adaptability to complex network environments, enables accurate evaluation of communication status under different network conditions, and reduces the risk of misjudgment and response delay; (2) The present invention introduces an adaptive dual-layer dynamic timeout detection algorithm. Through progressive timeout detection of the basic layer and the dynamic control layer, it is not only suitable for stable network environments, but can also effectively improve the accuracy of timeout judgment in communication links with large fluctuations; (3) The present invention introduces an adaptive data correction and dynamic trend compensation algorithm to perform data correction and compensation processing on the abnormal data generated by the real-time data stream of the electric energy meter when the communication is interrupted, thereby effectively solving the problem of data loss during the communication interruption. By extracting the time distribution error factor and the data deviation error factor and calculating the comprehensive error correction value, it is ensured that the data after the communication is restored has a high degree of accuracy and continuity; and the trend deviation modeling is performed through the comprehensive error correction value, the dynamic data trend model is calculated, and the cross compensation coefficient is introduced, so that the data can be accurately compensated after recovery to prevent data mutation or anomaly. This correction method improves the credibility of the data, provides a comprehensive data compensation mechanism for the smart electric energy meter, and ensures the integrity of the metering data. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 The present invention is a flowchart of a method for handling a communication timeout exception of a smart electric energy meter according to an embodiment of the present invention. DETAILED DESCRIPTION
[0016] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the technical scheme in the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiment of the present invention. Obviously, the described embodiment is only a part of the embodiment of the present invention, not all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0017] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0018] Example 1 Combination Figure 1 As shown, an embodiment of the present invention provides a method for handling a communication timeout exception of a smart electric energy meter, comprising the following steps: S1. Real-time monitoring and collection and analysis of communication parameters of the electric energy meter, calculation of link quality evaluation value, adaptive dual-layer dynamic timeout detection based on the link quality evaluation value, obtaining communication status signal and timeout type, obtaining processing strategy based on communication signal status and timeout type, and entering link quality evaluation value, communication signal status, timeout type and processing strategy into communication abnormality processing signal; S2. Obtain a communication exception processing signal, start an intelligent reconnection strategy according to the communication exception processing signal, and trigger a communication recovery signal. When the communication recovery signal is triggered, perform data correction and compensation processing on the abnormal data generated by the real-time data stream of the electric energy meter when the communication is interrupted to obtain a corrected complete data stream.
[0019] Example 2 Combination Figure 1 As shown, an embodiment of the present invention provides a method for handling a communication timeout exception of a smart electric energy meter, comprising the following steps: S1. Real-time monitoring and collection and analysis of communication parameters of the electric energy meter, calculation of link quality evaluation value, adaptive dual-layer dynamic timeout detection based on the link quality evaluation value, obtaining communication status signal and timeout type, obtaining processing strategy based on communication signal status and timeout type, and entering link quality evaluation value, communication signal status, timeout type and processing strategy into communication abnormality processing signal; S2. Obtain a communication abnormality processing signal, start an intelligent reconnection strategy according to the communication abnormality processing signal, trigger a communication recovery signal, and when the communication recovery signal is triggered, perform data correction and compensation processing on the abnormal data generated by the real-time data stream of the electric energy meter when the communication is interrupted to obtain a corrected complete data stream; On this basis, in this embodiment, in step S1, the communication parameters of the electric energy meter include communication delay, packet loss rate, signal strength, number of reconnection failures, basic reconnection interval, default transmission power, electric energy reading before the electric energy meter is interrupted, and timestamp.
[0020] Example 3 Combination Figure 1 As shown, an embodiment of the present invention provides a method for handling a communication timeout exception of a smart electric energy meter, comprising the following steps: S1. Real-time monitoring and collection and analysis of communication parameters of the electric energy meter, calculation of link quality evaluation value, adaptive dual-layer dynamic timeout detection based on the link quality evaluation value, obtaining communication status signal and timeout type, obtaining processing strategy based on communication signal status and timeout type, and entering link quality evaluation value, communication signal status, timeout type and processing strategy into communication abnormality processing signal; S2. Obtain a communication abnormality processing signal, start an intelligent reconnection strategy according to the communication abnormality processing signal, trigger a communication recovery signal, and when the communication recovery signal is triggered, perform data correction and compensation processing on the abnormal data generated by the real-time data stream of the electric energy meter when the communication is interrupted to obtain a corrected complete data stream; In step S1, the communication parameters of the electric energy meter include communication delay, packet loss rate, signal strength, number of reconnection failures, basic reconnection interval, default transmission power, electric energy reading before the electric energy meter is disconnected, and timestamp; On this basis, in this embodiment, the communication delay, packet loss rate and signal strength are extracted from the collected communication parameters of the electric energy meter, and cumulative recursive calculation is performed based on the current communication delay, packet loss rate and signal strength to obtain the link fluctuation feedback value, thereby forming the link state fluctuation feedback; Specifically, the calculation formula of the link fluctuation feedback value is as follows: , in, It is The fluctuation feedback value of the link at the iteration; It is The link fluctuation feedback value at the iteration describes the fluctuation characteristics of the current link status, including a comprehensive reflection of the influence of multiple factors such as communication delay, packet loss rate, and signal strength; It is The communication delay at the iteration It is Packet loss rate at iteration 1; It is The signal strength at the iteration; is the nonlinear feedback term, It is a small value that prevents the denominator from being zero. It is used to increase the sensitivity of fluctuation feedback, making it more sensitive to link fluctuations when the amplitude increases. It is the number of iterations, which indicates the iteration stage of the current calculation. Each time new data is input (usually in seconds or shorter time intervals), Increase by 1 so that all variable values in the formula are based on the new link state; is the weight adjustment factor of communication delay, is the weight adjustment factor of the packet loss rate is the weight adjustment factor of signal strength, The weight adjustment factor of the nonlinear feedback item is set according to the expert experience method, reflecting the influence of each sub-item indicator on the link fluctuation feedback; when hour, , in, is the fluctuation feedback value of the link in the first iteration, represents the communication delay before iteration, Indicates the packet loss rate before iteration. Indicates the signal strength before iteration; The main purpose of the above formula is to reflect the nonlinear impact of link delay, packet loss rate and signal strength on real-time communication quality through recursive fluctuation feedback, thereby generating a fluctuation feedback value of a sensitive link.
[0021] Example 4 Combination Figure 1 As shown, an embodiment of the present invention provides a method for handling a communication timeout exception of a smart electric energy meter, comprising the following steps: S1. Real-time monitoring and collection and analysis of communication parameters of the electric energy meter, calculation of link quality evaluation value, adaptive dual-layer dynamic timeout detection based on the link quality evaluation value, obtaining communication status signal and timeout type, obtaining processing strategy based on communication signal status and timeout type, and entering link quality evaluation value, communication signal status, timeout type and processing strategy into communication abnormality processing signal; S2. Obtain a communication abnormality processing signal, start an intelligent reconnection strategy according to the communication abnormality processing signal, trigger a communication recovery signal, and when the communication recovery signal is triggered, perform data correction and compensation processing on the abnormal data generated by the real-time data stream of the electric energy meter when the communication is interrupted to obtain a corrected complete data stream; In step S1, the communication parameters of the electric energy meter include communication delay, packet loss rate, signal strength, number of reconnection failures, basic reconnection interval, default transmission power, electric energy reading before the electric energy meter is disconnected, and timestamp; The communication delay, packet loss rate and signal strength are extracted from the collected communication parameters of the electric energy meter, and the fluctuation feedback value of the link is obtained by cumulative recursive calculation based on the current communication delay, packet loss rate and signal strength, so as to form the link status fluctuation feedback; On this basis, in this embodiment, based on the feedback of link state fluctuation, the cumulative deviation value of the link is calculated, and the link quality evaluation value is further calculated; Specifically, based on the real-time feedback iteration of link status fluctuations, the cumulative deviation value of the link is further calculated by the cumulative recursive formula: In order to capture the long-term change trend of link fluctuations, the purpose of cumulative deviation value calculation is to identify the long-term changes and continuous fluctuation characteristics of link quality. The calculation formula of cumulative deviation value is as follows: , in, It is The cumulative deviation value at the iteration; It is The cumulative deviation value at the iteration represents the cumulative characteristics of link fluctuations. It calculates the fluctuation feedback of the current and all previous iteration cycles and reflects the long-term fluctuation trend of the link. and It is the adjustment factor of the cumulative deviation, which is used to adjust the contribution of the feedback value and the fluctuation value to the cumulative deviation; The product of signal strength and packet loss rate is normalized and compared with the previous Communication delay at iterations Finally, the cumulative deviation value is introduced as a feedback item to ensure that the cumulative value generated by each fluctuation feedback can reflect the long-term stability and instantaneous disturbance of the overall link. Through this cumulative deviation, the cumulative effect of link fluctuations can be identified for subsequent adaptive dual-layer dynamic timeout detection.
[0022] based on and The nonlinear combination of is used to calculate the link quality evaluation value and generate the link quality evaluation result. The calculation formula of the link quality evaluation value is as follows: , in, It is the link quality assessment value, which is used to determine whether the link is normal or timed out; , , , is the weight adjustment factor, which is set according to the expert experience method; It is a factor that adjusts the link quality responsiveness. It is set according to the expert experience method so that the quality assessment results can be smoothly adjusted under different fluctuation environments. The term is used to smooth the impact of the accumulated deviation value on the quality assessment, so that it can dynamically respond to the accumulated fluctuation feedback, thereby showing a decreasing effect on the quality assessment when the network fluctuation is large; The above formula calculates a complex link quality assessment value through nonlinear and asymmetric feedback , in order to provide sensitive and accurate input basis for the next timeout detection process.
[0023] Example 5 Combination Figure 1 As shown, an embodiment of the present invention provides a method for handling a communication timeout exception of a smart electric energy meter, comprising the following steps: S1. Real-time monitoring and collection and analysis of communication parameters of the electric energy meter, calculation of link quality evaluation value, adaptive dual-layer dynamic timeout detection based on the link quality evaluation value, obtaining communication status signal and timeout type, obtaining processing strategy based on communication signal status and timeout type, and entering link quality evaluation value, communication signal status, timeout type and processing strategy into communication abnormality processing signal; S2. Obtain a communication abnormality processing signal, start an intelligent reconnection strategy according to the communication abnormality processing signal, trigger a communication recovery signal, and when the communication recovery signal is triggered, perform data correction and compensation processing on the abnormal data generated by the real-time data stream of the electric energy meter when the communication is interrupted to obtain a corrected complete data stream; In step S1, the communication parameters of the electric energy meter include communication delay, packet loss rate, signal strength, number of reconnection failures, basic reconnection interval, default transmission power, electric energy reading before the electric energy meter is disconnected, and timestamp; The communication delay, packet loss rate and signal strength are extracted from the collected communication parameters of the electric energy meter, and the fluctuation feedback value of the link is obtained by cumulative recursive calculation based on the current communication delay, packet loss rate and signal strength, so as to form the link status fluctuation feedback; Based on the feedback of link status fluctuation, the cumulative deviation value of the link is calculated, and the link quality evaluation value is further calculated; On this basis, in this embodiment, based on the link quality evaluation value, an adaptive dual-layer dynamic timeout detection algorithm is introduced to perform adaptive dual-layer dynamic timeout detection; the adaptive dual-layer dynamic timeout detection includes basic layer timeout detection and dynamic control layer timeout detection; Specifically, after obtaining the link quality evaluation value, the adaptive double-layer dynamic timeout determination process is entered, and an adaptive double-layer dynamic timeout detection algorithm is introduced. Dynamically adjust the timeout threshold to ensure that the timeout threshold is increased when the network fluctuates to adapt to real-time communication detection in complex environments. The two-layer dynamic timeout detection includes basic layer timeout detection and dynamic control layer timeout detection, which is hierarchical and progressive. The specific implementation process and formula are as follows: First, a fixed initial timeout threshold for basic layer timeout detection is set based on expert experience. , and based on a fixed initial timeout threshold Make a preliminary judgment on the link status and quickly identify the timeout status. The detection formula is: , In this formula, The term is used to adjust the impact of the link fluctuation feedback value on the fixed initial timeout threshold of the basic layer; It controls the adjustment rate of the fixed initial timeout threshold, and is used to adjust the influence of the fluctuation feedback value on the fixed initial timeout threshold of the basic layer, so that the dynamic adaptability of the fixed initial timeout threshold can be effectively adjusted when detecting the link status; Under the above judgment formula, when When it is higher than the adjusted fixed initial timeout threshold, the basic layer timeout detection is determined as "timeout"; When the basic layer timeout detection is judged as timeout, the fluctuation feedback threshold is set according to the expert experience method. , and the fluctuation feedback value and fluctuation feedback threshold After comparison, if the fluctuation feedback value is greater than the fluctuation feedback threshold, a timeout determination is further performed through the dynamic adjustment layer timeout detection, and the dynamic adjustment layer increases the timeout threshold according to the link feedback; Setting the dynamic timeout threshold for dynamic control layer timeout detection based on expert experience , and compare the dynamic timeout threshold with the quality assessment value of the link, and The link status is judged to identify the timeout status of the dynamic control layer. The calculation formula of the dynamic timeout threshold is as follows: , in, The coefficient for controlling the adjustment range of the dynamic timeout threshold. Through this coefficient, the adjustment range of the dynamic timeout threshold of the dynamic control layer can better adapt to the fluctuation of the current link, thereby improving the tolerance when the network fluctuates greatly. It is a smoothing control parameter of the dynamic timeout threshold, which is used for nonlinear adjustment of the dynamic timeout threshold of the dynamic control layer, and controls the smoothness of the relationship between the accumulated deviation and the fluctuation feedback, so that the dynamic timeout threshold can be adjusted smoothly when the link fluctuation is large; Used to smooth the accumulated deviation value and fluctuation feedback value nonlinear effects.
[0024] Through the above formula, the dynamic timeout threshold is adaptively adjusted according to the fluctuation feedback value and the accumulated deviation value, which can improve the threshold tolerance when the link fluctuation is large; when Exceed When the dynamic control layer timeout detection is determined to be "timeout".
[0025] Example 6 Combination Figure 1 As shown, an embodiment of the present invention provides a method for handling a communication timeout exception of a smart electric energy meter, comprising the following steps: S1. Real-time monitoring and collection and analysis of communication parameters of the electric energy meter, calculation of link quality evaluation value, adaptive dual-layer dynamic timeout detection based on the link quality evaluation value, obtaining communication status signal and timeout type, obtaining processing strategy based on communication signal status and timeout type, and entering link quality evaluation value, communication signal status, timeout type and processing strategy into communication abnormality processing signal; S2. Obtain a communication abnormality processing signal, start an intelligent reconnection strategy according to the communication abnormality processing signal, trigger a communication recovery signal, and when the communication recovery signal is triggered, perform data correction and compensation processing on the abnormal data generated by the real-time data stream of the electric energy meter when the communication is interrupted to obtain a corrected complete data stream; In step S1, the communication parameters of the electric energy meter include communication delay, packet loss rate, signal strength, number of reconnection failures, basic reconnection interval, default transmission power, electric energy reading before the electric energy meter is disconnected, and timestamp; The communication delay, packet loss rate and signal strength are extracted from the collected communication parameters of the electric energy meter, and the fluctuation feedback value of the link is obtained by cumulative recursive calculation based on the current communication delay, packet loss rate and signal strength, so as to form the link status fluctuation feedback; Based on the feedback of link status fluctuation, the cumulative deviation value of the link is calculated, and the link quality evaluation value is further calculated; Based on the link quality evaluation value, an adaptive dual-layer dynamic timeout detection algorithm is introduced to perform adaptive dual-layer dynamic timeout detection; the adaptive dual-layer dynamic timeout detection includes basic layer timeout detection and dynamic control layer timeout detection; On this basis, in this embodiment, based on the link quality evaluation value and the adaptive dual-layer dynamic timeout detection, the short-term mutation characteristics and the cumulative fluctuation characteristics are further calculated, the communication status signal is analyzed, the timeout type is determined, and the processing strategy is obtained; Specifically, the communication status signal includes normal, short timeout, and long timeout, and the timeout type includes mild short timeout, moderate short timeout, severe short timeout, mild long timeout, moderate long timeout, and severe long timeout; Based on link quality and double-layer timeout detection, short-term mutation and cumulative fluctuation characteristics are further analyzed to have higher sensitivity and responsiveness to link anomalies; In order to capture short-term mutation characteristics, when the link status fluctuates violently, the mutation situation is captured by calculating the short-term mutation characteristics. as follows: , in, It is a short-term mutation characteristic quantity, indicating the instantaneous abnormal amplitude; is the delay change rate, which is used to determine the magnitude of the mutation; is the variation of packet loss rate; It is a factor to adjust the impact of packet loss rate variation on mutation.
[0026] The above formula achieves high sensitivity judgment on sudden changes by calculating the delay change rate and the packet loss rate change range, so as to adapt to instantaneous anomalies in complex link states.
[0027] In particular, when When , it is a short timeout caused by slight network fluctuations and does not require immediate intervention; when When , it is a medium short timeout, indicating that there is obvious sudden interference. In this case, you can choose to record and monitor the frequency; when When , it is a serious short-term timeout, indicating that there is a large fluctuation in the network, and temporary recovery measures may need to be taken according to the timeout frequency; , It is the proportionality coefficient set according to the expert experience method; For the cumulative deviation aggregation and long-term timeout judgment, based on the short-term mutation feature quantity, the cumulative deviation aggregation feature of the link state is further judged to detect the long-term timeout; if the cumulative deviation value If the amplification factor of the long-term mutation trigger is exceeded, the link state is considered to be in a long-term timeout. The judgment formula is as follows:
[0028] in, is the cumulative deviation value; is the amplification factor of the long-term mutation trigger; It is the proportional coefficient of long-term timeout judgment, which is set according to the expert experience method and is used to control the proportional relationship between the cumulative deviation value and the short-term mutation feature value; When the accumulated deviation value is higher than the amplification factor of the long-term mutation trigger value, the communication is judged to be a long-term timeout; In particular, when When , it is a mild long timeout, indicating that the communication status is unstable but has not yet caused a serious impact. You can temporarily observe it to determine whether it is a persistent problem; when When , it is a medium-long timeout, indicating that the stability of the communication link is poor, and it may be necessary to increase reconnection or adjust communication parameters; when When the link state cannot maintain normal communication, an alarm should be triggered or a high-level fault handling should be performed. , It is the proportionality coefficient set according to the expert experience method.
[0029] Through the above process, the communication status signal (normal, short timeout, long timeout) and the timeout type are obtained; at the same time, based on the communication status signal and the timeout type, the processing strategy is obtained to obtain the communication abnormality processing signal, which is the timeout type and processing strategy. Specifically, the handling strategy is formulated based on expert experience combined with link quality assessment results, and based on communication status signals (i.e., whether the link is normal, whether a short or long timeout occurs, etc.) and timeout types (short timeout degree or long timeout degree). It involves determining the emergency measures to be taken, mainly including: Reconnection strategy: For reconnection failure or timeout types, the system calculates the optimal reconnection interval and reconnection transmission power through an adaptive reconnection strategy.
[0030] Temporary recovery strategy: If a short timeout occurs, that is, if a short-term sudden fluctuation occurs, the system chooses to temporarily record and monitor the frequency, or take mild intervention measures, such as adjusting the collection frequency of the communication parameters of the power meter.
[0031] Fault handling: If it is determined to be a long timeout, that is, a serious communication problem occurs, the system will initiate a higher level of fault handling strategy, including high-level alarms, modifying network parameters or performing equipment maintenance.
[0032] Example 7 Combination Figure 1 As shown, an embodiment of the present invention provides a method for handling a communication timeout exception of a smart electric energy meter, comprising the following steps: S1. Real-time monitoring and collection and analysis of communication parameters of the electric energy meter, calculation of link quality evaluation value, adaptive dual-layer dynamic timeout detection based on the link quality evaluation value, obtaining communication status signal and timeout type, obtaining processing strategy based on communication signal status and timeout type, and entering link quality evaluation value, communication signal status, timeout type and processing strategy into communication abnormality processing signal; S2. Obtain a communication abnormality processing signal, start an intelligent reconnection strategy according to the communication abnormality processing signal, trigger a communication recovery signal, and when the communication recovery signal is triggered, perform data correction and compensation processing on the abnormal data generated by the real-time data stream of the electric energy meter when the communication is interrupted to obtain a corrected complete data stream; In step S1, the communication parameters of the electric energy meter include communication delay, packet loss rate, signal strength, number of reconnection failures, basic reconnection interval, default transmission power, electric energy reading before the electric energy meter is disconnected, and timestamp; On this basis, in this embodiment, in step S2, the number of reconnection failures is extracted from the collected communication parameters of the electric energy meter, and according to the processing strategy in the communication abnormality processing signal, an intelligent reconnection strategy algorithm is introduced, and according to the link quality evaluation value in the communication abnormality processing signal, the optimal reconnection interval time and the reconnection transmission power are calculated; Further, according to the optimal reconnection interval and reconnection transmission power, a reconnection request is initiated. If the reconnection fails, the number of failures is recorded and the optimal reconnection interval is recalculated and the reconnection transmission power is readjusted until a communication recovery signal is triggered; The specific implementation process of the intelligent reconnection strategy algorithm is as follows: When a communication abnormality processing signal is received, based on the current link quality evaluation value The optimal reconnection interval is calculated intelligently based on the number of reconnection failures. The optimal reconnection interval calculation formula is as follows: , in, is the optimal reconnection interval, indicating the waiting reconnection interval; is the basic reconnection interval, which is the default reconnection interval under normal conditions; is the reconnection interval increment coefficient, which is set according to the expert experience method and is used to control the magnification ratio of the optimal reconnection interval relative to the basic interval; It is a sensitivity parameter, which is set according to expert experience and is used to adjust the link quality assessment value. The degree of impact on the increase in reconnection interval; is the number of reconnection failures; After the optimal reconnection interval is calculated, the reconnection parameter optimization phase begins. In order to improve the reconnection success rate, especially when the signal quality is low, the possibility of connection is increased by dynamically adjusting the transmission power reconnection parameter. The optimization formula is as follows: , in, is the reconnection transmission power, which indicates the signal transmission strength during the reconnection process; is the default transmission power, which is the standard power set under normal communication conditions; is the power regulation gain factor, which is set according to the expert experience method and is used to increase the transmission power when the link quality is poor; is the power regulation balance constant, which is set according to the expert experience method and is used to prevent the power regulation from being too high when the link quality is poor; In the above formula, when the link quality is poor (that is, when the timeout type is mild short timeout, moderate short timeout, severe short timeout, mild long timeout, moderate long timeout, and severe long timeout), the transmission power will be appropriately increased to enhance the signal strength and improve the probability of communication recovery; when the link quality is good, the default power will be maintained to avoid unnecessary power consumption; To obtain the optimal reconnection interval and reconnection transmission power After that, it enters the reconnection control phase. In this phase, a reconnection request is initiated according to the calculated optimal reconnection interval and reconnection transmission power. If the reconnection attempt is successful, the communication recovery signal will be triggered to start the data correction operation after the communication is restored; if the reconnection attempt fails, the number of failures will be recorded and the optimal reconnection interval will be recalculated. The power adjustment gain coefficient and power adjustment balance constant will be reset according to the expert experience method, and the reconnection transmission power will be readjusted until the reconnection is successful, thereby triggering the communication recovery signal.
[0033] Example 8 Combination Figure 1 As shown, an embodiment of the present invention provides a method for handling a communication timeout exception of a smart electric energy meter, comprising the following steps: S1. Real-time monitoring and collection and analysis of communication parameters of the electric energy meter, calculation of link quality evaluation value, adaptive dual-layer dynamic timeout detection based on the link quality evaluation value, obtaining communication status signal and timeout type, obtaining processing strategy based on communication signal status and timeout type, and entering link quality evaluation value, communication signal status, timeout type and processing strategy into communication abnormality processing signal; S2. Obtain a communication abnormality processing signal, start an intelligent reconnection strategy according to the communication abnormality processing signal, trigger a communication recovery signal, and when the communication recovery signal is triggered, perform data correction and compensation processing on the abnormal data generated by the real-time data stream of the electric energy meter when the communication is interrupted to obtain a corrected complete data stream; In step S1, the communication parameters of the electric energy meter include communication delay, packet loss rate, signal strength, number of reconnection failures, basic reconnection interval, default transmission power, electric energy reading before the electric energy meter is disconnected, and timestamp; In step S2, the number of reconnection failures is extracted from the collected communication parameters of the electric energy meter, and an intelligent reconnection strategy algorithm is introduced according to the processing strategy in the communication abnormality processing signal, and the optimal reconnection interval time and reconnection transmission power are calculated according to the link quality evaluation value in the communication abnormality processing signal; On this basis, in this embodiment, when the communication recovery signal is triggered, the electric energy reading and timestamp before the electric energy meter is interrupted are extracted from the collected communication parameters of the electric energy meter, and an adaptive data correction and dynamic trend compensation algorithm is introduced to perform data correction and compensation processing on the abnormal data generated by the real-time data stream of the electric energy meter when the communication is interrupted, so as to obtain a corrected complete data stream; Specifically, the adaptive data correction and dynamic trend compensation algorithm extracts multiple error factors from the energy readings and timestamps before the energy meter is interrupted. The error factors specifically include time distribution error factors and data deviation error factors, which constitute dynamic correction values. Then, the data trend deviation is compensated layer by layer based on the correction value. Finally, the final correction data stream is formed through cross calculation to ensure the integrity and accuracy of the compensation. The specific implementation process is as follows: In order to accurately compensate for the data loss during communication interruption, it is first necessary to extract the error factor from the energy reading and timestamp before the power meter interruption, and establish a comprehensive error correction value based on the error factor as the basis for subsequent trend correction; The energy reading and timestamp before the energy meter interruption are extracted, and the time distribution error factor is calculated for each data point before the energy meter interruption. The calculation formula is: , in, is the time distribution error factor, which quantifies the distribution characteristics in time; is the total number of data points before the energy meter is disconnected; is the current timestamp; It is the data point before the energy meter is interrupted. The timestamp of each data point; It is The value of the energy reading for each data point; It is The value of the energy reading for each data point; It is the average energy reading value of the data point before the energy meter is interrupted; The above formula is used to comprehensively calculate the characteristics of the data points before the electric energy meter is interrupted in terms of timestamp and the change in the value of the electric energy reading, and obtain a quantitative time distribution error factor.
[0034] Next, calculate the data deviation error factor, the calculation formula is: , in, is the data deviation error factor, which is used to quantify the deviation characteristics of historical electric energy values; It is the data point before the energy meter is interrupted. The timestamp of each data point; It is The value of the energy reading for each data point; It is The value of the energy reading for each data point; The above formula is used to capture the numerical deviation characteristics of the electric energy reading before the electric energy meter is interrupted, and provide a measured value of the data deviation for subsequent trend compensation.
[0035] Calculate the comprehensive error correction value using the time distribution error factor and the data deviation error factor , the formula is: , in, and is a weight parameter, which is set according to the expert experience method and is used to balance the weight coefficients of the two error factors to ensure that the influence of time distribution and data deviation is reasonably reflected in the final correction value, and is applicable to different communication anomaly situations; Furthermore, based on the comprehensive error correction value , correct the data trend deviation to improve the accuracy of the correction process. Specifically, the dynamic trend model is used to perform hierarchical correction on the trend deviation of the data stream to obtain the trend compensation value. The comprehensive error correction value based on the time distribution error and data deviation error , calculate dynamic data trend model , the calculation formula is as follows: , in, It is a dynamic data trend model that captures the trend of historical data changes; It is The electric energy reading value of the data point before the electric energy meter is interrupted; It is The electric energy reading value of the data point before the electric energy meter is interrupted; It is The timestamp of the data point before the power meter interruption; The above formula uses logarithmic and sine functions to synthesize the trend characteristics of data changes before the electricity meter is interrupted, so as to achieve accurate modeling of the trend, which not only includes the temporal change information, but also reflects the fluctuation trend of the data in terms of value.
[0036] The above dynamic data trend model is used to further generate dynamic trend deviation correction values ; , The above formula adjusts the trend compensation value according to the error factor to ensure that the intensity of trend correction is improved when the data error is large, so that the data deviation is compensated more accurately.
[0037] Furthermore, to ensure the integrity of the final correction data stream, the comprehensive error correction value Correction value for deviation from dynamic trend Combine them to get the cross-correction coefficient, and use this coefficient to compensate the data stream to form complete correction data. Calculate the data cross-compensation coefficient , the calculation formula is as follows: , The above formula combines the comprehensive error correction value and the dynamic trend deviation correction value, and uses cross calculation to introduce the interaction between error and trend during data correction, so that the accuracy of correction is further improved.
[0038] Finally, using the data cross compensation coefficient Generate corrected data values , and its calculation formula is: , in, is the corrected data value, compensating for the missing part in the data stream; It is an estimate generated to fill in the data gap after communication timeout, obtained through existing technology, such as combining historical data and trend characteristics; The above formula is the result of comprehensive error correction and trend compensation, which generates the final corrected data value and performs multiple compensations on the missing data, so that the data during the communication interruption can be accurately corrected, ensuring the continuity and integrity of the data.
[0039] The order of the embodiments of the invention is for description only and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0040] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.
[0041] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that the technical solutions described in the above embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention.
Claims
1. A method for handling communication timeout exceptions of a smart electric energy meter, characterized in that: The following steps are involved: S1. Real-time monitoring and collection and analysis of communication parameters of the electric energy meter, calculation of link quality evaluation value, adaptive dual-layer dynamic timeout detection based on the link quality evaluation value, obtaining communication status signal and timeout type, obtaining processing strategy based on communication signal status and timeout type, and entering link quality evaluation value, communication signal status, timeout type and processing strategy into communication abnormality processing signal; S2. Obtain a communication exception processing signal, start an intelligent reconnection strategy according to the communication exception processing signal, and trigger a communication recovery signal. When the communication recovery signal is triggered, perform data correction and compensation processing on the abnormal data generated by the real-time data stream of the electric energy meter when the communication is interrupted to obtain a corrected complete data stream.
2. The method for handling communication timeout exception of a smart electric energy meter according to claim 1, characterized in that: In step S1, the communication parameters of the electric energy meter include communication delay, packet loss rate, signal strength, number of reconnection failures, basic reconnection interval, default transmission power, electric energy reading before the electric energy meter is disconnected, and timestamp.
3. The method for handling communication timeout exception of a smart electric energy meter according to claim 2, characterized in that: In step S1, the communication delay, packet loss rate and signal strength are extracted from the collected communication parameters of the electric energy meter, and cumulative recursive calculation is performed based on the current communication delay, packet loss rate and signal strength to obtain the link fluctuation feedback value and form link status fluctuation feedback.
4. The method for handling communication timeout exception of a smart electric energy meter according to claim 3, characterized in that: In step S1, based on the feedback of link state fluctuation, the cumulative deviation value of the link is calculated, and the link quality evaluation value is further calculated.
5. The method for handling communication timeout exception of a smart electric energy meter according to claim 4, characterized in that: In step S1, based on the link quality evaluation value, an adaptive dual-layer dynamic timeout detection algorithm is introduced to perform adaptive dual-layer dynamic timeout detection.
6. The method for handling communication timeout exception of a smart electric energy meter according to claim 5, characterized in that: In step S1, the adaptive dual-layer dynamic timeout detection includes basic layer timeout detection and dynamic control layer timeout detection.
7. The method for handling communication timeout exception of a smart electric energy meter according to claim 6, characterized in that: In step S1, based on the link quality evaluation value and the adaptive dual-layer dynamic timeout detection, the short-term mutation characteristics and the cumulative fluctuation characteristics are further calculated, the communication status signal is analyzed and obtained, the timeout type is determined, and the processing strategy is obtained.
8. The method for handling communication timeout exception of a smart electric energy meter according to claim 2, characterized in that: In step S2, the number of reconnection failures is extracted from the collected communication parameters of the electric energy meter, and according to the processing strategy in the communication abnormality processing signal, an intelligent reconnection strategy algorithm is introduced to start the intelligent reconnection strategy, and according to the link quality evaluation value in the communication abnormality processing signal, the optimal reconnection interval time and reconnection transmission power are calculated.
9. The method for handling communication timeout exception of a smart electric energy meter according to claim 8, characterized in that: In step S2, a reconnection request is initiated according to the optimal reconnection interval and reconnection transmission power. If the reconnection fails, the number of failures is recorded and the optimal reconnection interval is recalculated and the reconnection transmission power is readjusted until a communication recovery signal is triggered.
10. The method for handling communication timeout exception of a smart electric energy meter according to claim 9, characterized in that: In step S2, when the communication recovery signal is triggered, the electric energy reading and timestamp before the electric energy meter interruption are extracted from the collected communication parameters of the electric energy meter, and an adaptive data correction and dynamic trend compensation algorithm is introduced to perform data correction and compensation processing on the abnormal data generated by the real-time data stream of the electric energy meter when the communication is interrupted, so as to obtain a corrected complete data stream.
Citation Information
Patent Citations
Optimal configuration method and system based on power distribution network
CN116611608A
Fault processing method and embedded system
CN116820824A
Intelligent electric energy meter data acquisition and analysis system based on 5G network
CN117792872A
Signal I / O control device based on multiple protocols and data transmission method thereof
CN119363853A
Timeout parameter determination method and apparatus and communication device
WO2024016622A1
Cited By
Data key dynamic adjustment method and device for electric power information security protection
CN119966629A
Internet of Things system and device based on fifth generation mobile communication technology, and medium
CN120342910A
Electric power communication big data anomaly prediction and intelligent regulation and control system based on artificial intelligence
CN121396746A