A remote intelligent monitoring method and system for switchgear
By identifying data blocks in the switchgear and calculating importance weights to match error correction codes, and combining interleaving rearrangement and erasure coding to generate redundant fragments, the problem of unstable data transmission in the complex electromagnetic environment of the switchgear is solved, and the reliable transmission and complete reconstruction of key information are realized.
Patent Information
- Application Number
- CN202611288056.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-24
- Publication Date
- 2026-11-17
AI Technical Summary
In the complex electromagnetic interference environment of switchgear, traditional transmission mechanisms cannot guarantee the reliable transmission of high-priority monitoring data. In particular, the risk of losing critical information is high when the network is congested or interfered with. Existing methods cannot adjust the coding strategy in real time to deal with channel errors.
By identifying indivisible data blocks, segmentation and padding alignment are performed to generate data fragments of the same length. Importance weights are calculated based on location index and critical level to match forward error correction coding. The number of verification fragments and span factor are set in combination with historical packet loss rate for interleaving and rearrangement. Redundant fragments are generated using erasure coding. The receiving end adjusts the span factor according to packet loss to reconstruct the original data.
It enables differentiated protection of high-value data in complex electromagnetic environments, reduces resource waste, enhances the system's ability to withstand sudden network congestion, and ensures the complete reconstruction of monitoring data.
Smart Images

Figure CN123123391A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of monitoring, and in particular relates to a remote intelligent monitoring method and system for switchgear. Background Technology
[0002] As a core piece of equipment in a power system, the safe and stable operation of switchgear plays a crucial role in ensuring the reliable power supply of the entire power grid. Monitoring terminals integrate multiple sensors to collect real-time operating status data from inside the switchgear and upload this data to the main control center or cloud platform for analysis and early warning via wireless communication networks. Switchgear typically operates under high voltage and high current conditions, and the equipment is mostly housed in enclosed metal cabinets, resulting in a working environment with strong electromagnetic interference. Wireless communication signals are not only shielded but also prone to fading and distortion. In this complex communication environment, the large amount of status data and alarm information generated by the switchgear monitoring system often needs to be frequently transmitted in the form of small data packets. However, these small data packets are highly susceptible to transmission errors or loss in harsh channel environments, posing a significant challenge to the system's real-time monitoring and safety early warning capabilities.
[0003] Traditional transmission mechanisms struggle to balance the indivisible nature of monitoring data blocks and the varying criticality levels of different data types. This leads to difficulties in prioritizing the transmission of critical data during network congestion or interference, increasing the risk of critical information loss. In the context of strong electromagnetic interference unique to switchgear, channel errors often exhibit sudden and prolonged packet loss. Traditional static parity checking and conventional erasure coding techniques have limited recovery capabilities in the face of large-scale continuous packet loss, failing to provide reliable data recovery. Existing methods lack the ability to perceive historical packet loss patterns and estimate channel error models in real time, and cannot flexibly adjust coding distribution and verification strategies based on actual network conditions. This results in frequent full retransmissions when the channel environment deteriorates, wasting bandwidth resources and causing severe transmission delays. Therefore, overcoming the problem of continuous packet loss in complex electromagnetic environments and ensuring the reliable transmission of high-priority monitoring data has become a critical technical challenge urgently needing to be addressed in the field of remote switchgear monitoring. Summary of the Invention
[0004] To improve the transmission reliability and communication efficiency of switchgear monitoring data in complex network environments, this invention provides a remote intelligent monitoring method and system for switchgear.
[0005] The first aspect of this invention provides a remote intelligent monitoring method for switchgear, comprising the following steps:
[0006] The monitoring terminal identifies indivisible data blocks in the original monitoring data of the switchgear, divides and aligns the original monitoring data with the data block boundaries as constraints, and generates N data fragments of the same length. It reads the index number from the description table associated with the data fragment as the location index and reads the priority number as the key level. It calculates the importance weight based on the location index and key level of each data fragment, and matches the forward error correction code with the importance weight to generate N redundant data fragments. The monitoring terminal establishes a buffer queue to store communication messages to calculate the packet loss rate. Based on the historical packet loss rate, it sets the number of parity fragments K and sets a span factor. It interleaves and rearranges the encoding input order of N redundant data fragments according to the span factor. It uses the rearranged N redundant data fragments to generate K parity fragments through erasure coding. The span factor represents the interval step size of adjacent output fragments in the original fragment index during interleaving and rearranging. The monitoring terminal continuously sends N redundant data fragments and K parity fragments to the receiving end. If the total number of received fragments is less than N when the receiving window is closed, the receiving end generates a fragment receiving status vector containing the starting index and continuous length and returns it to the monitoring terminal. Based on the continuous length statistics in the fragment receiving status vector, it is determined whether there is a long continuous packet loss. If there is a long continuous packet loss, the span factor is increased in the next round. After the receiving end has received at least N fragments, it decodes and reconstructs the original monitoring data.
[0007] A second aspect of the present invention provides a remote intelligent monitoring system for switchgear, comprising the following modules: The generation module is used to monitor the terminal to identify indivisible data blocks in the original monitoring data of the switch cabinet, divide and fill the original monitoring data with the data block boundary as a constraint, generate N data fragments of the same length, read the index number from the description table associated with the data fragment as the location index and read the priority number as the key level, calculate the importance weight based on the location index and key level of each data fragment, match the forward error correction code with the importance weight, and generate N redundant data fragments. The calculation module is used to monitor the terminal to establish a buffer queue to store communication messages to calculate the packet loss rate, set the number of parity fragments K based on the historical packet loss rate, set the span factor, interleave and rearrange the encoding input order of N redundant data fragments according to the span factor, and use the rearranged N redundant data fragments to generate K parity fragments through erasure coding. The span factor represents the interval step size of adjacent output fragments in the original fragment index during interleaving and rearrangement. The monitoring terminal continuously sends N redundant data fragments and K parity fragments to the receiving end. The monitoring module is used to generate a fragment reception status vector containing the starting index and continuous length when the receiving window is closed. If the total number of received fragments is less than N, the monitoring module returns the data to the monitoring terminal. Based on the continuous length statistics in the fragment reception status vector, the monitoring module determines whether there is a long continuous packet loss. If there is a long continuous packet loss, the span factor is increased in the next round. After the receiving end has received at least N fragments, it decodes and reconstructs the original monitoring data.
[0008] This invention ensures the integrity and uninterrupted nature of critical information by segmenting and aligning data using indivisible data block boundaries as constraints. It combines location indexes and critical level-based importance weights to match forward error correction coding, achieving differentiated enhanced protection for high-value data. Based on historical packet loss rates, the number of check fragments and span factor are set, and these factors are used to regulate the distribution of erasure code generation, ensuring that redundant configurations align with network conditions and balancing transmission overhead and anti-interference capabilities. Lost fragments are located and retransmitted using state vectors containing start indices and continuous lengths, reducing resource waste caused by invalid retransmissions. Simultaneously, based on the continuous length of lost packets, a channel error model is estimated, and the span factor is increased specifically for long continuous packet loss cases, enhancing the system's ability to withstand sudden network congestion and ensuring the complete reconstruction of monitoring data. Attached Figure Description
[0009] Figure 1 A flowchart of a remote intelligent monitoring method for switchgear; Figure 2 A diagram illustrating the capacity of valid data and padding data bytes for each data segment; Figure 3 This is a schematic diagram illustrating the frequency of consecutively lost fragment lengths in the experiment. Detailed Implementation
[0010] In this application, the terms "exemplarily" or "for example" are used to indicate that something is being described as an example, illustration, or illustration. Any embodiment or design described as "exemplarily" or "for example" in this application should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of terms such as "exemplarily" or "for example" is intended to present the relevant concepts in a specific manner.
[0011] Example 1 In Embodiment 1 of the present invention, as Figure 1 As shown, a remote intelligent monitoring method for switchgear includes the following steps: S1, the monitoring terminal identifies indivisible data blocks in the original monitoring data of the switch cabinet, divides and aligns the original monitoring data with the data block boundaries as constraints, and generates N data fragments of the same length. It reads the index number from the description table associated with the data fragment as the location index and reads the priority number as the key level. It calculates the importance weight based on the location index and key level of each data fragment, and matches the forward error correction code with the importance weight to generate N redundant data fragments.
[0012] The main control chip of the monitoring terminal calls the CJSON library to parse the raw monitoring data stream, identify the structure definition containing sensor node identifiers and timestamps, and use the definition as the boundary marker of indivisible data blocks. A greedy algorithm is used to package multiple data blocks into the transmission buffer within the maximum transmission unit limit. For portions shorter than the standard length at the end, the MEMSET system function is called to pad with hexadecimal zeros for byte alignment, generating N fixed-length data fragments.
[0013] The read interface opens the configuration description table in Extensible Markup Language (XPATH) format. It then uses XPATH path expressions to extract the node index numbers of the corresponding data shards and the priority numbers from the business identifier field, assigning them respectively to the location index variable and the criticality level variable in memory. A weighted summation algorithm is used to multiply the location index variable by a preset first weight constant to obtain the location weighting base, and multiply the criticality level variable by a preset second weight constant to obtain the content weighting base. Finally, the two are added together to obtain the importance weight.
[0014] Based on the calculated importance weights, the error correction level of the current data fragment is first determined. Then, the corresponding encoding method in the LIBFEC forward error correction open-source library is called according to the error correction level. Specifically, data fragments with importance weights greater than the first weight boundary are determined to be at the first error correction level and are encoded using Reed-Solomon codes. Data fragments with importance weights no greater than the first weight boundary but greater than the second weight boundary are determined to be at the second error correction level and are encoded using Hamming codes. Data fragments with importance weights no greater than the second weight boundary are determined to be at the third error correction level and are transparently transmitted directly. The determined error correction level identifier is written into the corresponding fragment attribute parameter area. The actual length of each fragment after encoding or direct transmission is retained, and the maximum actual length of each fragment or a preset erasure code input length not less than the maximum actual length is used as the unified encoding length. Redundant data fragments with shorter actual lengths are padded with empty bits, so that the N output redundant data fragments have a consistent length before entering the erasure code operation.
[0015] In one embodiment, the monitoring terminal identifies indivisible data blocks in the original monitoring data of the switchgear, divides and aligns the original monitoring data using the data block boundaries as constraints, and generates N data fragments of equal length, including: Create the current data fragment storage area and set the maximum capacity value of the storage area; Traverse the preprocessed raw monitoring data sequentially and read the indivisible data block currently pointed to. Add the data size of the current indivisible data block to the total data size already loaded into the current data fragment storage area; If the total data volume exceeds the capacity limit, the current indivisible data block will not be loaded into the current data fragment storage area. Instead, empty bits will be used to fill and align the current storage area until the capacity limit is reached. The data will then be encapsulated to form a complete independent data fragment, and a new storage area will be opened to store the current indivisible data block. If the limit is not exceeded, the current indivisible data block will be stored in the current storage area; All generated independent data fragments are padded with empty bits to generate N data fragments of the same length.
[0016] The monitoring terminal allocates a RAM segment in memory as a data fragment storage area via a microcontroller, for example, setting the maximum capacity to 128 bytes. For the raw monitoring data from the switchgear, the monitoring data is encapsulated into a structure containing a header, data, and verification fields as indivisible data blocks. After preprocessing, the data size of a single indivisible data block does not exceed the maximum capacity of the storage area. If the data size of a single indivisible data block exceeds the maximum capacity, the indivisible data block is first redefined according to the business field boundaries, or the maximum capacity of the storage area is increased. The microprocessor executes a traversal algorithm to read the current data block length, for example, 8 bytes, and adds this length to the amount of data already stored in the current storage area for evaluation. If the total data size exceeds 128 bytes, it means that the remaining space in the current storage area is insufficient to accommodate the entire data block. The microcontroller then calls functions such as MEMSET to set all the remaining blank bytes in the current storage area to 0x00 or 0xFF as empty bits, so that the data in the storage area reaches the upper limit of 128 bytes and is attached to the sending list to form a complete independent data fragment. A new 128-byte storage area is reallocated in memory to store the current data block that has not yet been loaded.
[0017] If the total data volume does not exceed the upper limit, the current indivisible data block is directly appended to the current offset address of the current storage area using a memory copy function, and the total amount of data already stored is updated. After traversing all the original data, for the last allocated but not yet full storage area, empty bits are filled with 0x00 until the 128-byte upper limit is reached. This operation ensures that the N output data fragments have a consistent physical length at the byte level, guaranteeing that the column vector dimensions corresponding to each data fragment are equal during subsequent erasure coding matrix operations, such as Vandermonde matrix multiplication. This reduces truncation parsing errors caused by splitting the same indivisible data block into multiple fragments and lowers the fragment management overhead of the channel protocol stack.
[0018] In one embodiment, the step of reading index numbers from the description table associated with each data shard as location indexes and reading priority numbers as key levels, and calculating importance weights based on the location indexes and key levels of each data shard, includes: Read the index number representing the ranking order from the description table associated with each data shard; Multiply the index number by a preset first weight constant to obtain the positional weighting base; Read the specified priority number loaded in the description table as the key level; Multiply the priority number by a preset second weight constant to obtain the content weighting base; The location weighting base and the content weighting base are added together, and the combined sum is used as the importance weight of the current data fragment and written into the attribute parameter area.
[0019] In the memory-based fragment description table (structure array), the parser sequentially reads the index number of each data fragment's ranking order. Assume the index numbers of the N fragments range from 0 to 49. The preferred range for the first weight constant is set between -0.5 and -0.1 to reflect the diminishing effect of timeliness. For example, a value of -0.2 multiplies the index number (e.g., 10) by -0.2, resulting in a positional weighting base of -2.0. This means that fragments generated later or located further back in the queue will be weighted less. The priority number representing the monitoring service type is then extracted from the description table. For example, the priority number for partial discharge alarms is set to 5, for ambient temperature data to 3, and for regular heartbeat messages to 1. A preset second weight constant is retrieved and set to a large absolute value to ensure that core alarms receive priority protection. The preferred range is between 2.0 and 5.0; in this example, it is set to 3.5. The processor calculates the content weighting base; for example, the content weighting base for an alarm fragment with priority 5 is 17.5. Adding the location weighting base of -2.0 to the content weighting base of 17.5 yields an importance weight of 15.5 for this partial discharge fragment. This sum is then written into the attribute parameter area corresponding to the data fragment in Float32 or fixed-point format. This transforms the semantic importance of the service and the queue waiting attribute into a recognizable numerical indicator, guiding the selection of a differential forward error correction scheme in the subsequent Unequal Redundancy Algorithm (UEP).
[0020] In one embodiment, the step of matching forward error correction coding to data fragments based on importance weights to generate N redundant data fragments includes: A mapping relationship between error correction levels and encoding methods is pre-established, where the first error correction level corresponds to Reed-Solomon codes, the second error correction level corresponds to Hamming codes, and the third error correction level corresponds to transparent direct transmission without adding redundant bits. Read the importance weights of the data shards, and set a first weight boundary and a second weight boundary that is less than the first weight boundary; If the importance weight is greater than the first weight limit, the current data fragment is determined to be at the first error correction level, and the Reed Solomon code is called to encode the data fragment according to the first error correction level. If the importance weight is not greater than the first weight limit but greater than the second weight limit, then the current data fragment is determined to be the second error correction level, and Hamming code encoding is performed according to the second error correction level; If the importance weight is not greater than the second weight boundary, the current data fragment is determined to be the third error correction level, and transparent direct transmission is applied according to the third error correction level. Write the error correction level identifier corresponding to the current data fragment into the fragment attribute parameter area, and record the actual length of each fragment after encoding or direct transmission. Use the maximum actual length or a preset erasure code input length that is not less than that length as the unified encoding length, and pad the short fragments with empty bits to obtain N equal-length redundant data fragments.
[0021] Three pointers to execution functions are pre-configured: using Finite field multiplication provides the Reed-Solomon RS code algorithm with burst error correction capability, the Hamming code algorithm with lightweight redundancy, and transparent direct transmission operation through memory mapping for copying. A judgment threshold is set; for example, the preferred value for the first weight boundary is 10.0, and the preferred value for the second weight boundary is 5.0. When the importance weight of an alarm segment is read as 15.5, the comparator determines that the weight is greater than 10.0, calls the RS encoding function to add 16 bytes of check bits to the 128-byte basic data block, and encapsulates the 128-byte basic data block with the added 16 bytes of check bits into a 144-byte first error correction level data packet, ensuring that the core parameters of the switchgear are not lost.
[0022] For medium-value fragments, if the calculated importance weight is 8.5, the logic unit determines that the weight falls within the range of 5.0 to 10.0, and then calls the Hamming code encoder to XOR the data of every few bytes of the medium-value fragment to add error correction bits, expanding it into a fragment of, for example, 136 bytes. For low-value heartbeat packets, if the calculated weight is 2.0, since it is below the 5.0 threshold, the 128-byte packet body is transparently transmitted directly through DMA or other means without adding any redundant bits, saving time on the air interface. The actual length information generated after different processing mechanisms is stored in the header fields of the message structure, i.e., retaining the length attribute of 144 bytes, 136 bytes, or 128 bytes. Then, a preset erasure coding input length of 144 bytes or not less than 144 bytes is used as the unified encoding length. Shorter fragments of 136 bytes and 128 bytes are padded with empty bits, ensuring that N redundant data fragments have the same byte length before entering the erasure coding matrix operation. The actual length of 144 bytes, 136 bytes, or 128 bytes is then written into the corresponding fragment attribute area so that the receiving end can remove padding bits and additional parity bits after decoding. This method integrates and outputs N data fragments with unbalanced redundancy ratios, achieving a trade-off between protection level and network overhead in electromagnetic interference environments with high bit error rates. Figure 2 As shown.
[0023] S2, the monitoring terminal establishes a buffer queue to store communication messages to calculate the packet loss rate, sets the number of parity fragments K based on the historical packet loss rate, and sets a span factor. The N redundant data fragments are interleaved and rearranged according to the encoding input order of the span factor. The N redundant data fragments are then used to generate K parity fragments through erasure coding. The span factor represents the interval step size of adjacent output fragments in the original fragment index during interleaving and rearrangement. The monitoring terminal continuously sends N redundant data fragments and K parity fragments to the receiving end.
[0024] The monitoring terminal instantiates a first-in-first-out (FIFO) ring structure as a buffer queue in the random access memory. It calls the ENQUEUE function to store the header of a communication packet with a global sequence number into the queue node. When the background system timer is triggered, it calls the DEQUEUE function to count the total number of missing sequence numbers from the head to the tail of the queue. The total number of missing sequence numbers is divided by the total number of sent packets to calculate the historical packet loss rate of the current network channel. When the historical packet loss rate does not exceed the first security reference value, the number of verification fragments K is determined by using a preset basic verification fragment number or by rounding down the basic verification generation benchmark value obtained from the historical packet loss rate and the total number of fragments N. When the historical packet loss rate exceeds the first security reference value, the historical packet loss rate is multiplied by the total number of fragments N to obtain the basic verification generation benchmark value. This benchmark value is then multiplied by a fixed expansion constant and the integer part is truncated to obtain the enhanced verification fragment number K. The span factor integer variable is initialized based on the sudden error detected by the network protocol stack.
[0025] The span factor is a positive integer not less than 1 and not greater than N-1, used to represent the interval step size of adjacent output fragments in the original fragment index during interleaving and rearrangement. When the span factor is s, the monitoring terminal first selects the fragment index starting from index 0 in the manner of 0, 0+s, 0+2s. After exceeding N-1, it switches to the smallest index that has not yet been selected as the new starting point and continues to select in the same step size until N redundant data fragments are covered, thereby generating the interleaved encoded input sequence.
[0026] The monitoring terminal encodes N equal-length redundant data fragments with erasure codes according to the interleaved coded input sequence, generating K parity check fragments. Through the interleaving rearrangement, the continuous packet loss in the channel is distributed in an intermittent manner on the original fragment index corresponding to the decoding, reducing the concentrated damage of long continuous packet loss to the erasure code recovery process.
[0027] While maintaining the erasure coding input matrix as containing N equal-length column vectors, the erasure coding generation matrix is constructed by calling the Cauchy-Reed-Solomon coding matrix construction interface in the JERASURE open-source erasure coding acceleration library. The erasure coding generation matrix is then used to encode the rearranged fragment sequence, generating K parity fragments. The monitoring terminal calls the SENDTO system call function through low-level socket programming to sequentially encapsulate the N redundant data fragments and the newly generated K parity fragments into the data segment of the User Datagram Protocol (UDP) message. This data is then injected into the network link through the Ethernet controller driver interface for uninterrupted continuous transmission. The monitoring terminal writes the fragment number, fragment type, actual length, number of data fragments N, number of parity fragments K, and current span factor into the header of each redundant data fragment and parity fragment, enabling the receiving end to determine the corresponding decoding matrix row and complete fragment alignment based on the message header information.
[0028] In one embodiment, the monitoring terminal establishes a cache queue to store communication packets to calculate the packet loss rate, and sets the number of verification fragments K based on the historical packet loss rate, including: Establish an independent cache queue to store communication messages sent and received within a fixed observation period; Extract the total number of successfully delivered fragments and the total number of fragments identified as lost from the queue messages; The historical link packet loss rate is calculated by dividing the total number of lost fragments by the total number of sent fragments. Compare the historical link packet loss rate with the preset first security reference value; When the historical link packet loss rate exceeds the first security reference value, the baseline value generated by the basic verification is multiplied by the specified fixed expansion constant, and the integer part of the result is truncated and the integer part is set as the number of verification fragments K. When the historical link packet loss rate does not exceed the first security reference value, the preset number of basic verification fragments or the rounded result of the baseline value generated by the basic verification is set as the number of verification fragments K.
[0029] Above the network driver layer of the system, a sliding window buffer queue with FIFO characteristics is maintained, with a fixed observation period, such as 300 seconds or 500 fragment windows of the most recently sent data. During this period, the monitoring terminal performs statistical analysis on the communication status based on the server's ACK / NACK response data. For example, reading the counter reveals that the total number of sent fragments within the window is 400, of which 360 were successfully acknowledged, while the total number of fragments lost due to exceeding the limit or rejection feedback is 40. Through floating-point division, the 40 lost fragments are divided by the total of 400, calculating the current historical link packet loss rate of the basement or enclosed metal cabinet channel to be 0.10, or 10.0%. The processing unit compares this historical link packet loss rate of 0.10 with a first security reference value stored in Flash memory, preferably between 0.03 and 0.05, for example, a value of 0.05. Since 0.10 is greater than 0.05, an active compensation algorithm is triggered. Using the total number of fragments N, assuming N=50, multiplying by the current packet loss rate of 0.10 yields a baseline value of 5.0 for basic parity generation. Considering the suddenness of network degradation caused by arc pulses in high-voltage environments, a fixed expansion constant is pre-specified, preferably between 1.2 and 2.0, for example, 1.5. The multiplier calculates the product of the baseline value 5.0 and the expansion constant 1.5 to obtain 7.5, which is then rounded down using the Floor function to obtain an integer 7. This 7 is compared with the preset minimum number of parity fragments, and the larger value is taken. This value is then assigned to the number of parity fragments K, and the MDS (Maximum Distance Separable Erasure Code) is constructed accordingly. This MDS adapts to the congestion and fading characteristics of the channel in real time. If the historical link packet loss rate does not exceed the first security reference value, for example, 0.02, the expansion constant amplification process is not enabled. Instead, K is determined by rounding down the baseline value obtained from 0.02 and the total number of fragments N, ensuring a clear parity fragment generation mechanism even in low packet loss scenarios.
[0030] S3, if the total number of received fragments is less than N when the receiving window is closed, the receiving end generates a fragment receiving status vector containing the starting index and continuous length and returns it to the monitoring terminal. Based on the continuous length statistics in the fragment receiving status vector, it is determined whether there is a long continuous packet loss. If there is a long continuous packet loss, the span factor is increased in the next round. After the receiving end receives at least N fragments, it decodes and reconstructs the original monitoring data.
[0031] The receiving system starts a high-precision system tick timer to maintain the sliding receive control window. When the SELECT multiplexing listener function times out and fails to receive new data, triggering a window closing interrupt event, it iterates through the status word records in the underlying receive buffer. If the number of successfully verified valid fragments is less than a threshold N, the run-length encoding algorithm module is started to scan the missing message sequence number space. The receiving end continuously scans the fragment status within the entire receive window. For each consecutive missing segment detected, the first fragment sequence number of that consecutive missing segment is assigned to the start index register, and the total number of consecutive missing segments that follow is assigned to the consecutive length register. When a complete receive flag is encountered, the current segment counting ends, and the scanning continues from the subsequent fragment number positions until all fragment number positions are checked, thus forming a state vector message payload containing one or more data tuples. This payload is assembled into a reverse acknowledgment message by the underlying network protocol stack and sent back to the monitoring terminal. The network interrupt service routine of the monitoring terminal receives the acknowledgment message, unpacks it, and extracts the state vector message payload. The lost fragment with the corresponding sequence number is located in the historical transmission buffer by using a binary search algorithm, and the pointer of the lost fragment is moved into the retransmission ready queue to schedule hardware transmission. At the same time, the historical values of all consecutive length registers are extracted in the main loop.
[0032] The monitoring terminal extracts the continuous length field of each data tuple in the fragmented reception state vector in the main loop to form a continuous packet loss length array, and selects the continuous length with the largest value from the continuous packet loss length array as the first peak number. The first peak number is compared with a preset long continuous packet loss decision threshold. If the first peak number exceeds the long continuous packet loss decision threshold, it is determined that the current channel exhibits long continuous packet loss characteristics. After determining that it is long continuous packet loss, the system reads the current span factor, multiplies the current span factor with the system's preset span amplification coefficient, and rounds the resulting product up. At the same time, the rounded result is compared with the value of the current span factor plus one, and the larger one is taken as the span factor for the next round to ensure that the adjustment result is actually increased relative to the current span factor. The receiving end aligns and splices the retransmitted data fragments with the original receiving buffer content according to the sequence number. When the cumulative number of error-free fragments reaches the threshold N, the Gaussian elimination matrix solution interface in the JERASURE decoding library is called.
[0033] Algebraic recovery is performed using successfully received valid data fragments and parity fragments to reconstruct missing fragments from network transmission. After missing fragment recovery at the erasure coding level, the receiving end reads the error correction level identifier and actual length field from the attribute parameter area of each fragment. For the first error correction level fragments, a Reed-Solomon decoder is called to perform symbol-level checksum and error correction using additional parity bits. For the second error correction level fragments, a Hamming code decoder is called to perform bit-level checksum and error correction using parity bits. For the third error correction level fragments, the transparent direct transmission payload is directly retained, and additional parity bits and null bit stuffing are removed after the corresponding decoding processing is completed. Then, according to the original message sequence number order and based on the actual length field of each fragment, a memory copy function is called to perform binary buffer concatenation of the valid payload of each fragment, reconstructing the complete original monitoring data stream of the switchgear at the application layer.
[0034] In one embodiment, generating a fragmented receive state vector containing a start index and a continuous length and returning it to the monitoring terminal includes: Check the reception status of each segment number position in sequence; When a fault is detected that causes missing fragments, the index location value of the missing position is extracted and filled into the starting index writing area of the data tuple; Create a statistical cumulative variable and assign it an initial value of one; Starting from the number after the current missing position, continuously probe the reception status of the subsequent numbers. During the verification process, if no confirmation is received, increment the cumulative variable by one. The counting of the current consecutively lost data blocks ends when a complete reception flag is detected. The accumulated statistical value is extracted and filled into the continuous length segment area. The subsequent fragment number positions are checked until the checking of all fragment number positions within the reception window is completed, and a fragment reception status vector containing one or more data tuples is generated.
[0035] The receiving end's protocol parsing program uses a memory-mapped bitmap to maintain the fragment reception status in real time, where 1 represents a successful reception and 0 represents a missing fragment. When the reception timeout window closes, the CPU uses a shift probe instruction to traverse the status sequentially, starting from the last bit of the bitmap (fragment number 0). If the first five bits of the false positional bitmap sequence are all 1, but the sixth bit, index 5, shows a bit level flip and is detected as 0, the processor can determine that the first network frame loss has occurred. A memory data tuple for feedback retransmission is generated, and the value 5 is filled into the dedicated storage area for the starting index within this tuple as a uint16 integer. After identifying the starting index, the program declares a statistical accumulation variable named `loss_count` on the local stack and initializes it to 1. The detection logic checks each bit sequentially within the bitmap, starting from index 5 and working its way up. If the corresponding bits at indices 6 and 7 are still 0, the program control flow increments the `loss_count` variable with each check, changing its value to 2 and 3 respectively. When index 8 is reached, the corresponding bit state changes to 1, indicating a complete reception. The program then stops counting the current consecutive missing segments and fills the reserved continuous length area of the tuple with the accumulated sum, forming a state vector tuple like `Start:5, Burst:3`. The program then continues checking the bitmap state starting from index 9. If a new consecutive missing segment is detected, a new `Start` and `Burst` tuple are generated, and multiple tuples are written into the same fragment reception state vector. This allows for recording consecutive packet losses caused by broadband pulse electromagnetic interference with less than 4 bytes of data, facilitating retransmission. Figure 3 As shown.
[0036] In one embodiment, the step of increasing the span factor for the next round if there is a long continuous packet loss includes: Capture the continuous length statistics of each tuple in the fragmented reception state vector; Compare multiple sets of continuous data and select the first peak value with the largest value in the sample; The first peak value is compared with the program's default threshold for handling excessively large block drops. If the number of the first peak exceeds the decision threshold, the current span factor is retrieved, and the current span factor is multiplied by the system's preset span amplification coefficient to obtain the numerical product. Round the product of the numbers up, and compare the rounded result with the value of the current span factor plus one. Take the larger of the two as the span factor for the new cycle.
[0037] After the monitoring terminal receives and decodes the feedback control frame transmitted from the cloud, the firmware system extracts a statistical array of continuous lengths from all tuple records. For example, in a burst fading event, three fragmented loss blocks were generated, with corresponding lengths of 2, 8, and 3 respectively. The processor can find the largest value in this sample group using a fast selection sort algorithm or through a single traversal, which is the number 8 in this example, and assigns this value to a local variable as the first peak value. The microcontroller's system operating constants have a default threshold for determining long continuous packet loss to define channel degradation. Based on engineering measurements, this threshold is typically set between 4 and 6 fragments, for example, a preset threshold of 5.
[0038] The processor logic detects that the first peak value of 8 exceeds the threshold of 5, indicating that the network error is not sporadic random errors, but rather a continuous packet loss caused by a large circuit breaker. The system then reads the current span factor from the internal control parameter register (assuming it's 2) and loads the span amplification factor constructed by the operation and maintenance strategy. The optimal parameter is typically between 1.5 and 2.5; here, we assume a value of 1.8. The FPU hardware multiplication operation yields a product of 3.6, which is rounded up to 4. This product is compared with the current span factor incremented by one (3), and the larger value (4) is used to update the span factor for the new cycle. If the current span factor is 1 and the doubling factor is 1.5, the product is 1.5, rounded up to 2, which matches the current span factor incremented by one (2), ensuring the span factor increases from 1 to 2. By changing the interleaving depth of the error correction code accordingly, and rearranging the data through interleaving at index intervals corresponding to the updated span factor, long strings of errors are dispersed into spaced missing fragments, preventing consecutive error blocks from exceeding the recovery capacity of the erasure code in the next round of transmission.
[0039] Example 2 Embodiment 2 of the present invention proposes a remote intelligent monitoring system for switchgear, comprising the following modules: The generation module is used to monitor the terminal to identify indivisible data blocks in the original monitoring data of the switch cabinet, divide and fill the original monitoring data with the data block boundary as a constraint, generate N data fragments of the same length, read the index number from the description table associated with the data fragment as the location index and read the priority number as the key level, calculate the importance weight based on the location index and key level of each data fragment, match the forward error correction code with the importance weight, and generate N redundant data fragments. The calculation module is used to monitor the terminal to establish a buffer queue to store communication messages to calculate the packet loss rate, set the number of parity fragments K based on the historical packet loss rate, set the span factor, interleave and rearrange the encoding input order of N redundant data fragments according to the span factor, and use the rearranged N redundant data fragments to generate K parity fragments through erasure coding. The span factor represents the interval step size of adjacent output fragments in the original fragment index during interleaving and rearrangement. The monitoring terminal continuously sends N redundant data fragments and K parity fragments to the receiving end. The monitoring module is used to generate a fragment reception status vector containing the starting index and continuous length when the receiving window is closed. If the total number of received fragments is less than N, the monitoring module returns the data to the monitoring terminal. Based on the continuous length statistics in the fragment reception status vector, the monitoring module determines whether there is a long continuous packet loss. If there is a long continuous packet loss, the span factor is increased in the next round. After the receiving end has received at least N fragments, it decodes and reconstructs the original monitoring data.
[0040] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for remote intelligent monitoring of switchgear, characterized in that, Includes the following steps: The monitoring terminal identifies indivisible data blocks in the original monitoring data of the switchgear, divides and aligns the original monitoring data with the data block boundaries as constraints, and generates N data fragments of the same length. It reads the index number from the description table associated with the data fragment as the location index and reads the priority number as the key level. It calculates the importance weight based on the location index and key level of each data fragment, and matches the forward error correction code with the importance weight to generate N redundant data fragments. The monitoring terminal establishes a buffer queue to store communication messages to calculate the packet loss rate. Based on the historical packet loss rate, it sets the number of parity fragments K and sets a span factor. It interleaves and rearranges the encoding input order of N redundant data fragments according to the span factor. It uses the rearranged N redundant data fragments to generate K parity fragments through erasure coding. The span factor represents the interval step size of adjacent output fragments in the original fragment index during interleaving and rearranging. The monitoring terminal continuously sends N redundant data fragments and K parity fragments to the receiving end. If the total number of received fragments is less than N when the receiving window is closed, the receiving end generates a fragment receiving status vector containing the starting index and continuous length and returns it to the monitoring terminal. Based on the continuous length statistics in the fragment receiving status vector, it is determined whether there is a long continuous packet loss. If there is a long continuous packet loss, the span factor is increased in the next round. After the receiving end has received at least N fragments, it decodes and reconstructs the original monitoring data.
2. The method according to claim 1, characterized in that, The monitoring terminal identifies indivisible data blocks in the original monitoring data of the switchgear, divides and aligns the original monitoring data using the data block boundaries as constraints, and generates N data fragments of the same length, including: Create the current data fragment storage area and set the maximum capacity value of the storage area; Traverse the preprocessed raw monitoring data sequentially and read the indivisible data block currently pointed to. Add the data size of the current indivisible data block to the total data size already loaded into the current data fragment storage area; If the total data volume exceeds the capacity limit, the current indivisible data block will not be loaded into the current data fragment storage area. Instead, empty bits will be used to fill and align the current storage area until the capacity limit is reached. The data will then be encapsulated to form a complete independent data fragment, and a new storage area will be opened to store the current indivisible data block. If the limit is not exceeded, the current indivisible data block will be stored in the current storage area; All generated independent data fragments are padded with empty bits to generate N data fragments of the same length.
3. The method according to claim 1 or 2, characterized in that, The step of reading index numbers from the description table associated with each data shard as location indexes and reading priority numbers as key levels, and calculating importance weights based on the location indexes and key levels of each data shard, includes: Read the index number representing the ranking order from the description table associated with each data shard; Multiply the index number by a preset first weight constant to obtain the positional weighting base; Read the specified priority number loaded in the description table as the key level; Multiply the priority number by a preset second weight constant to obtain the content weighting base; The location weighting base and the content weighting base are added together, and the combined sum is used as the importance weight of the current data fragment and written into the attribute parameter area.
4. The method according to claim 1, characterized in that, The step of matching forward error correction coding to data fragments based on importance weights to generate N redundant data fragments includes: A mapping relationship between error correction levels and encoding methods is pre-established, where the first error correction level corresponds to Reed-Solomon codes, the second error correction level corresponds to Hamming codes, and the third error correction level corresponds to transparent direct transmission without adding redundant bits. Read the importance weights of the data shards, and set a first weight boundary and a second weight boundary that is less than the first weight boundary; If the importance weight is greater than the first weight limit, the current data fragment is determined to be at the first error correction level, and the Reed Solomon code is called to encode the data fragment according to the first error correction level. If the importance weight is not greater than the first weight limit but greater than the second weight limit, then the current data fragment is determined to be the second error correction level, and Hamming code encoding is performed according to the second error correction level; If the importance weight is not greater than the second weight boundary, the current data fragment is determined to be the third error correction level, and transparent direct transmission is applied according to the third error correction level. Write the error correction level identifier corresponding to the current data fragment into the fragment attribute parameter area, and record the actual length of each fragment after encoding or direct transmission. Use the maximum actual length or a preset erasure code input length that is not less than that length as the unified encoding length, and pad the short fragments with empty bits to obtain N equal-length redundant data fragments.
5. The method according to claim 1 or 3, characterized in that, The monitoring terminal establishes a buffer queue to store communication packets to calculate the packet loss rate, and sets the number of verification fragments K based on the historical packet loss rate, including: Establish an independent cache queue to store communication messages sent and received within a fixed observation period; Extract the total number of successfully delivered fragments and the total number of fragments identified as lost from the queue messages; The historical link packet loss rate is calculated by dividing the total number of lost fragments by the total number of sent fragments. Compare the historical link packet loss rate with the preset first security reference value; When the historical link packet loss rate exceeds the first security reference value, the baseline value generated by the basic verification is multiplied by the specified fixed expansion constant, and the integer part of the result is truncated and the integer part is set as the number of verification fragments K. When the historical link packet loss rate does not exceed the first security reference value, the preset number of basic verification fragments or the rounded result of the baseline value generated by the basic verification is set as the number of verification fragments K.
6. The method according to claim 1, characterized in that, The process of generating a fragmented receive state vector containing a starting index and a continuous length and returning it to the monitoring terminal includes: Check the reception status of each segment number position in sequence; When a fault is detected that causes missing fragments, the index location value of the missing position is extracted and filled into the starting index writing area of the data tuple; Create a statistical cumulative variable and assign it an initial value of one; Starting from the number after the current missing position, continuously probe the reception status of the subsequent numbers. During the verification process, if no confirmation is received, increment the cumulative variable by one. The counting of the current consecutively lost data blocks ends when a complete reception flag is detected. The accumulated statistical value is extracted and filled into the continuous length segment area. The subsequent fragment number positions are checked until the checking of all fragment number positions within the reception window is completed, and a fragment reception status vector containing one or more data tuples is generated.
7. The method according to claim 1, characterized in that, The statement that if there is a long, continuous packet loss, the span factor for the next round will be increased includes: Capture the continuous length statistics of each tuple in the fragmented reception state vector; Compare multiple sets of continuous data and select the first peak value with the largest value in the sample; The first peak value is compared with the program's default threshold for handling excessively large block drops. If the number of the first peak exceeds the decision threshold, the current span factor is retrieved, and the current span factor is multiplied by the system's preset span amplification coefficient to obtain the numerical product. Round the product of the numbers up, and compare the rounded result with the value of the current span factor plus one. Take the larger of the two as the span factor for the new cycle.
8. A remote intelligent monitoring system for switchgear, characterized in that, Includes the following modules: The generation module is used to monitor the terminal to identify indivisible data blocks in the original monitoring data of the switch cabinet, divide and fill the original monitoring data with the data block boundary as a constraint, generate N data fragments of the same length, read the index number from the description table associated with the data fragment as the location index and read the priority number as the key level, calculate the importance weight based on the location index and key level of each data fragment, match the forward error correction code with the importance weight, and generate N redundant data fragments. The calculation module is used to monitor the terminal to establish a buffer queue to store communication messages to calculate the packet loss rate, set the number of parity fragments K based on the historical packet loss rate, set the span factor, interleave and rearrange the encoding input order of N redundant data fragments according to the span factor, and use the rearranged N redundant data fragments to generate K parity fragments through erasure coding. The span factor represents the interval step size of adjacent output fragments in the original fragment index during interleaving and rearrangement. The monitoring terminal continuously sends N redundant data fragments and K parity fragments to the receiving end. The monitoring module is used to generate a fragment reception status vector containing the starting index and continuous length when the receiving window is closed. If the total number of received fragments is less than N, the monitoring module returns the data to the monitoring terminal. Based on the continuous length statistics in the fragment reception status vector, the monitoring module determines whether there is a long continuous packet loss. If there is a long continuous packet loss, the span factor is increased in the next round. After the receiving end has received at least N fragments, it decodes and reconstructs the original monitoring data.
9. The system according to claim 8, characterized in that, The monitoring terminal identifies indivisible data blocks in the original monitoring data of the switchgear, divides and aligns the original monitoring data using the data block boundaries as constraints, and generates N data fragments of the same length, including: Create the current data fragment storage area and set the maximum capacity value of the storage area; Traverse the preprocessed raw monitoring data sequentially and read the indivisible data block currently pointed to. Add the data size of the current indivisible data block to the total data size already loaded into the current data fragment storage area; If the total data volume exceeds the capacity limit, the current indivisible data block will not be loaded into the current data fragment storage area. Instead, empty bits will be used to fill and align the current storage area until the capacity limit is reached. The data will then be encapsulated to form a complete independent data fragment, and a new storage area will be opened to store the current indivisible data block. If the limit is not exceeded, the current indivisible data block will be stored in the current storage area; All generated independent data fragments are padded with empty bits to generate N data fragments of the same length.
10. The system according to claim 8, characterized in that, The step of reading index numbers from the description table associated with each data shard as location indexes and reading priority numbers as key levels, and calculating importance weights based on the location indexes and key levels of each data shard, includes: Read the index number representing the ranking order from the description table associated with each data shard; Multiply the index number by a preset first weight constant to obtain the positional weighting base; Read the specified priority number loaded in the description table as the key level; Multiply the priority number by a preset second weight constant to obtain the content weighting base; The location weighting base and the content weighting base are added together, and the combined sum is used as the importance weight of the current data fragment and written into the attribute parameter area.
