M-BUS intelligent electricity utilization information acquisition system and method based on AI driving signal processing
By using an AI-driven signal processing system that combines a hardware acquisition layer and an embedded processing layer, and by employing a lightweight convolutional network with multi-feature fusion and an adaptive timing window strategy, the problem of decoding M-BUS bus signals in complex environments is solved. This achieves efficient and stable signal decoding and system robustness, adapting to various interference and fault scenarios.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- YANTAI DONGFANG WISDOM ELECTRIC
- Filing Date
- 2025-12-31
- Publication Date
- 2026-04-10
AI Technical Summary
Existing M-BUS bus signals are susceptible to physical layer failures and external environmental interference during transmission, leading to data decoding failures and reduced meter reading success rates. Traditional anti-interference and error correction schemes lack dynamic adaptive capabilities in complex scenarios, making it difficult to guarantee the robustness and stability of the system.
An AI-driven signal processing system is adopted, which combines a hardware acquisition layer and an embedded processing layer. It utilizes a lightweight convolutional network with multi-feature fusion and an adaptive timing window strategy to achieve adaptive identification and parsing of M-BUS bus signals. Combined with CRC check and code guessing correction process, the signal decoding accuracy and system robustness are improved.
It significantly improves the accuracy of signal decoding and the stability of the system in complex environments, reduces the decoding failure rate and data packet loss rate, realizes the stable and reliable operation of the intelligent electricity information collection system in large-scale deployment, and enhances the system's adaptability and long-term adaptability to new scenarios through online training and correction processes.
Smart Images

Figure CN121833408A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent data acquisition and communication technology, specifically to an M-BUS intelligent electricity consumption information acquisition system and an M-BUS intelligent electricity consumption information acquisition method. Background Technology
[0002] With the popularization and development of intelligent electricity information collection systems, remote automatic meter reading technology has become a core support in the field of energy metering such as water, electricity, gas, and heat. In this system, the M-BUS bus, with its advantages of integrated power supply and communication, simple wiring, anti-reverse polarity connection, and support for multi-node long-distance transmission, has gradually become one of the mainstream communication methods for wired meter reading and is widely used in the centralized data collection of various smart meters.
[0003] However, in actual deployment and operation, the M-BUS bus signal is prone to anomalies during transmission, leading to data decoding failures or a decrease in meter reading success rate. These anomalies mainly stem from two aspects: First, physical layer faults, such as mismatched cable specifications, oxidation or poor contact of wiring terminals, and excessive bus voltage drop, can cause signal attenuation and waveform distortion. Second, complex external environmental interference, including electromagnetic radiation generated by high-voltage lines and frequency converters, as well as common-mode interference caused by ground loops, can superimpose on the bus signal, causing distortion of the M-BUS modulated current signal, which in turn leads to an increase in the bit error rate during decoding.
[0004] To address the aforementioned signal anomaly issues, various anti-interference and error correction schemes have been proposed in existing technologies. For example, Chinese invention patent application CN117789437A discloses a wired M-BUS water meter reading device and method, which employs hardware filtering combined with software secondary filtering to identify and filter out interference abrupt signals through a fixed slope threshold, thereby improving meter reading accuracy under current disturbance environments. However, this type of method relies on preset fixed thresholds and filtering parameters, lacking dynamic adaptive capabilities when facing diverse interference types and fault modes. In real-world complex scenarios, the characteristics of interference signals and the manifestations of physical layer faults are often coupled and change over time. Fixed threshold processing methods are difficult to flexibly adapt to different field conditions, especially when interference modes are varied or multiple faults coexist. Their identification accuracy and robustness remain insufficient, limiting the system reliability and stability under large-scale, multi-scenario deployments. Summary of the Invention
[0005] This invention proposes an M-BUS intelligent electricity information acquisition system and method based on AI-driven signal processing. Its purpose is to provide a solution that can adaptively identify and analyze the distortion characteristics of M-BUS bus signals in complex environments, thereby effectively improving the accuracy of signal decoding, the overall robustness and adaptability of the system, and ensuring the stable and reliable operation of large-scale intelligent meter reading networks under practical challenges such as variable interference and parameter mismatch.
[0006] The technical solution of this invention is as follows:
[0007] An M-BUS intelligent electricity information acquisition system based on AI-driven signal processing includes a hardware acquisition layer, which includes a resistor current detection module, a hardware filtering module, and an ADC sampling module connected in sequence; it also includes an embedded processing layer for intelligent decoding, verification, and correction of the digital signal output by the hardware acquisition layer.
[0008] The embedded processing layer includes a control and arithmetic unit, an AI coprocessor, a CRC check hardware accelerator, and memory;
[0009] The control and operation unit is connected to the memory, hardware acquisition layer, AI coprocessor and CRC check hardware accelerator respectively. It is used to cooperate with the memory to store and manage the digital signals output by the hardware acquisition layer, extract signal segments based on the timing window matching strategy, construct a hybrid feature vector based on the signal segments and send it to the AI coprocessor, receive the signal segment recognition results returned by the AI coprocessor, assemble the recognition results of the same frame into a data frame and send it to the CRC check hardware accelerator for verification.
[0010] The AI coprocessor is connected to the control and computing unit and the memory. It is used to run a lightweight convolutional network with multi-feature fusion, identify the mixed feature vector sent by the control and computing unit, and output the confidence probability of three bit recognition categories for each signal segment. The three bit recognition categories are: bit "0", bit "1" and invalid signal "NA". The category with the highest confidence probability is the recognition result.
[0011] The CRC check hardware accelerator is connected to the control and arithmetic unit and is used to perform cyclic redundancy check calculations on the data frames sent by the control and arithmetic unit.
[0012] The memory is used to store system programs, model parameters of the multi-feature fusion lightweight convolutional network, and runtime data buffers.
[0013] As a further improvement to the M-BUS intelligent electricity information collection system based on AI-driven signal processing:
[0014] The memory is also used to store the online training sample set;
[0015] The control and computation unit is also used to initiate the code guessing and correction process based on confidence probability sorting when the verification fails, and to update the online training sample set in the memory based on the verification and correction results, and to perform online training on the multi-feature fusion lightweight convolutional network based on the online training sample set.
[0016] This invention also provides an M-BUS intelligent electricity consumption information collection method based on AI-driven signal processing, comprising the following steps:
[0017] Step S1. Acquire analog signals on the M-BUS bus, obtain digital signal sequences after analog-to-digital conversion, and extract multiple signal segments from the digital signal sequence through a sliding window mechanism. Each signal segment corresponds to the transmission duration of one bit. Then, preprocess the extracted signal segments respectively.
[0018] All preprocessed signal segments are processed sequentially according to steps S2 and S3:
[0019] Step S2. Construct a hybrid feature vector based on the preprocessed signal segments;
[0020] Step S3. Input the hybrid feature vector constructed in step S2 into the multi-feature fusion lightweight convolutional network to obtain the recognition result of the signal segment, and process it according to the recognition result to obtain the bit value of the signal segment;
[0021] Step S4. Assemble the bit values obtained from processing all signal segments in step S3 into a complete data frame in chronological order. Then, the CRC check hardware accelerator is used to... A CRC check is performed. If the check passes, the frame data is deemed valid and sent to other devices via the communication interface.
[0022] As a further improvement to the M-BUS intelligent electricity consumption information collection method based on AI-driven signal processing, step S1 specifically includes:
[0023] Step S1.1. Convert the acquired analog signal into a digital signal sequence and send it into the circular data buffer in real time;
[0024] Step S1.2. Extract signal segments from the circular data buffer using an adaptive timing window based on transition detection;
[0025] Step S1.3. Preprocess each extracted signal segment to eliminate the influence of dimensions and DC offset.
[0026] As a further improvement to the AI-driven signal processing-based M-BUS intelligent electricity information acquisition method: the transition detection in step S1.2 refers to: reading the digital signal sequence from the circular data buffer and calculating the difference between adjacent sampling points in real time to monitor signal transitions; when the absolute value of the detected difference exceeds a preset threshold... When this occurs, it is determined to be a valid signal transition point and marked as the boundary start point of the bit;
[0027] The size of the adaptive timing window is set as follows: first, based on the known ADC sampling frequency... Nominal baud rate for M-BUS communication Calculate the theoretical number of sampling points contained in a single bit period. Then, based on the theoretical number of sampling points... And the fixed length of the preset front and rear redundancy point calculation window : Set to be in Based on this, add two sets of fixed redundancy points. ,Right now ;
[0028] The adaptive timing window based on jump detection extracts signal segments from the circular data buffer as follows:
[0029] a) Frame start determination and first window extraction: When the system detects the first valid transition point after a continuous preset time period without any transitions in a silent state, this point is taken as the starting point of a frame of data; based on this transition point, the data is truncated forward. Each sampling point is truncated backwards. _ sampling points, together forming a length of _ The signal segment; this segment is marked as the frame start signal segment of the current frame;
[0030] b) Synchronization of continuous window sliding and jumping: After extracting the first window, with a step size... Slide backward to extract the next signal segment; during the sliding process, transition detection is continuously performed synchronously; if a new transition point is detected within a certain window and that transition point is related to the first transition point in the window... If the points do not correspond, the fixed step size sliding is immediately interrupted, and the new jump point is used as the reference to move forward. Point, take backwards Reposition the current window to ensure that the first window in the window is repositioned. Each point is always aligned with the bit boundary;
[0031] c) Frame end determination: When the number of windows acquired is equal to the number of bits in the data frame, the current frame transmission is determined to be over, window extraction is stopped, and the system waits for the arrival of the next data frame.
[0032] As a further improvement to the M-BUS intelligent electricity consumption information collection method based on AI-driven signal processing: in step S2, the dimension of the hybrid feature vector is... , The length of the signal segment;
[0033] The hybrid feature vector is composed of time-domain feature vectors and frequency-domain feature vectors:
[0034] The time-domain feature vector consists of the following three parts:
[0035] 1) Normalized sampled value feature vector: This is the feature vector generated from the preprocessed signal segment. Directly used as the feature vector of normalized sampled values ;
[0036] 2) Local slope eigenvector: Calculates the signal segment The instantaneous rate of change at each point in the equation; for the th... Internal points , Its instantaneous rate of change Approximate calculation using the three-point central difference method:
[0037] ;
[0038] For the two endpoints and Its instantaneous rate of change is set to 0; thus, a length of is obtained. slope sequence Then, mean pooling is performed on the sequence to reduce dimensionality and smooth noise: the sequence Sequential division into Groups are formed, and the arithmetic mean of the instantaneous rate of change within each group is calculated, ultimately forming... 3D local slope eigenvector ;
[0039] 3) Local variance eigenvectors: Set the window length sliding step size ,from Starting from the initial point, each time take The variance is calculated for each consecutive point, and the window slides until it covers the entire point. A total of Each variance value, ,from Select the largest value from the variance values. These constitute the local variance eigenvectors. ;
[0040] Frequency domain feature vector: a preprocessed signal segment Perform a Fast Fourier Transform to obtain its spectrum. Select the pre-specified The amplitude at each frequency point constitutes the frequency domain feature vector. ;
[0041] The time-domain feature vector and the frequency-domain feature vector are concatenated to form the final... 3D hybrid feature vector :
[0042] .
[0043] As a further improvement to the AI-driven signal processing-based M-BUS intelligent electricity information collection method: In step S3, the process by which the multi-feature fusion lightweight convolutional network infers the recognition result based on the input hybrid feature vector is as follows:
[0044] a) Input Recombination and Structured Injection: First, the mixed feature vectors of the input are recombined into a multi-channel tensor;
[0045] b) Feature fusion and abstraction: The recombined multichannel tensor passes through the following layers in sequence:
[0046] bi) Feature fusion layer: A one-dimensional convolutional layer is used to fuse multi-channel tensors, followed by batch normalization and ReLU activation function processing;
[0047] b-ii) Two-level depthwise separable convolutional modules: Each module contains a depthwise convolution and a pointwise convolution;
[0048] b-iii) Bottleneck compression layer and aggregation layer: Use a 1x1 convolution to compress the number of channels, and then input it into an adaptive average pooling layer;
[0049] c) Classification output: Expand the feature vector output from the adaptive average pooling layer, and then pass it through two fully connected layers to obtain 3D features. Finally, the Softmax function is used to... Convert to probability distribution , , , These represent the confidence probabilities of determining the current signal segment as bit "0", bit "1", or invalid signal "NA", respectively. The category with the highest confidence probability among the three bit identification categories is selected. As a result of the identification.
[0050] As a further improvement to the M-BUS intelligent electricity information collection method based on AI-driven signal processing: In step S3, the output of the multi-feature fusion lightweight convolutional network is the confidence probability of three categories of bit "0", bit "1" or invalid signal "NA". The category with the highest confidence probability among the three bit identification categories is selected. As the identification result;
[0051] The process of processing the recognition results to obtain the bit values of the signal segments is as follows:
[0052] If the recognition result If the bit is "0" or "1", then the bit value is directly used as the bit value of the current signal segment;
[0053] If the recognition result If the signal is invalid "NA", then proceed as follows:
[0054] Case 1: If the current signal segment is marked as the first frame signal segment, the current frame is discarded directly with a prompt, then the frame is reset and the system waits for the next frame.
[0055] Case 2: If the current signal segment is not the first signal segment of the frame, compare the confidence probabilities of bits "0" and bits "1" output by the multi-feature fusion lightweight convolutional network, and take the category with the higher confidence probability as the bit value of the current signal segment.
[0056] As a further improvement to the M-BUS intelligent electricity consumption information collection method based on AI-driven signal processing, the method further includes the following steps:
[0057] Step S5. Automatically collect and label samples based on CRC check results, and construct and update the online training sample set;
[0058] Step S6. Fine-tune the training of the lightweight convolutional network for multi-feature fusion based on the online training sample set.
[0059] As a further improvement to the M-BUS intelligent electricity consumption information collection method based on AI-driven signal processing, step S5 specifically includes:
[0060] If the current data frame If the CRC check passes, the hybrid feature vector and its bit value of each signal segment in the data frame are taken as positive samples and added to the online training sample set.
[0061] If the current data frame If the CRC check fails, the code guessing and correction process is initiated to attempt to fix the error and generate a negative sample and add it to the online training sample set.
[0062] The specific process of the code-guessing and correction procedure is as follows:
[0063] (1) Assess the current data frame according to confidence probability. Sort the bits by bits;
[0064] Extract the components of the current data frame The confidence probability corresponding to each bit; if the initial recognition result of the multi-feature fusion lightweight convolutional network corresponding to a certain bit is an invalid signal "NA", then the confidence probability is set to a preset value. For other bits, directly take the confidence probability of the corresponding recognition result; then, sort all bits in order of confidence probability from low to high.
[0065] (2) Flip the first N bits after sorting in a permutation and combination manner, where N is greater than or equal to 1, to obtain a candidate frame set;
[0066] (3) Perform CRC check on all candidate frames in the candidate frame set. If a candidate frame passes the check, the mixed feature vector of the original signal segment corresponding to the bit that has been flipped in the candidate frame and its flipped bit value are taken as the first type of negative sample and added to the online training sample set. If a candidate frame still fails the check, the original signal segment corresponding to the bit that has been flipped in the candidate frame is added to the unprocessed set.
[0067] (4) Manually judge all the original signal segments in the set to be processed, and judge whether the recognition result is bit "0", bit "1" or invalid signal "NA". Based on the mixed feature vector of the original signal segments and its manual judgment result, construct the second type of negative sample and add it to the online training sample set.
[0068] Compared with the prior art, the present invention has the following advantages:
[0069] 1. This invention adopts a two-tier architecture of "hardware acquisition layer - embedded processing layer," integrating a dedicated AI coprocessor and a CRC check hardware accelerator in the embedded processing layer. This achieves integrated processing of the entire process, from signal acquisition and intelligent decoding to real-time verification and online learning. This design not only frees the system from strong dependence on host computers or remote servers, reducing deployment complexity and network environment requirements, but also ensures efficient execution of complex AI inference and correction processes on embedded microcontrollers through the combination of AI network models and dedicated hardware. This reduces overall system power consumption and cost, facilitating the widespread adoption and application of this technology in various smart terminals.
[0070] 2. This invention replaces the traditional signal processing method that relies on fixed threshold filtering with an AI-driven signal processing network model. It adaptively identifies and analyzes the distortion characteristics of M-BUS bus signals in complex environments, effectively improving the accuracy of signal decoding and system robustness. Specifically, this scheme utilizes a lightweight convolutional network with multi-feature fusion to perform end-to-end identification of signal segments, directly outputting bit values and their confidence levels. Combined with an adaptive timing window strategy for transition detection, it ensures precise alignment of signal truncation with bit boundaries. This significantly reduces decoding failure rates and data loss caused by signal distortion in diverse scenarios such as physical layer faults, electromagnetic interference, and parameter mismatches, ensuring the stable and reliable operation of the intelligent electricity information collection system in large-scale deployments.
[0071] 3. The code-guessing correction process proposed in this invention, which combines model confidence ranking with CRC check, can automatically attempt to flip low-confidence bits to try and pass the check when data frame verification fails. This mechanism not only improves the success rate of single communication but also automatically generates high-quality correction samples (Type I negative samples) and labels samples that are difficult to correct automatically (Type II negative samples), providing an efficient and low-cost data source for continuous model optimization. This method breaks through the bottleneck of traditional model training relying on a large amount of manual annotation, realizing a semi-automated closed loop of data collection, annotation, and model optimization, greatly improving the system's ability to evolve over a long period and adapt to new scenarios.
[0072] 4. The hybrid feature vector extraction method designed in this invention integrates multi-dimensional information such as the original time-domain waveform, local slope, local variance, and key frequency band energy, providing AI models with more discriminative input features. This feature engineering strategy structurally injects prior knowledge from the field of signal processing (such as the sensitivity of slope to abrupt changes) into the model, enabling lightweight networks to learn and distinguish normal signals from various distortion and interference patterns more effectively in resource-constrained embedded environments. This achieves high-precision signal recognition while ensuring real-time processing efficiency.
[0073] 5. This invention establishes a long-term, fully closed-loop optimization mechanism through the construction of an online training sample set and periodic fine-tuning of the model. During operation, the system continuously uses positive samples generated in real-world scenarios and negative samples obtained through code guessing correction and manual annotation to iteratively update the deployed model. This allows the system to continuously learn and adapt to changes in the field environment and new interference patterns, achieving a shift from "one-time deployment" to "continuous evolution." This maintains and improves decoding performance over the long term and reduces the need for manual intervention in later maintenance. Attached Figure Description
[0074] Figure 1This is a hardware architecture diagram of the M-BUS intelligent electricity information collection system based on AI-driven signal processing.
[0075] Figure 2 This is a flowchart of the signal processing for the M-BUS intelligent electricity information acquisition method based on AI-driven signal processing.
[0076] Figure 3 This is a schematic diagram of the architecture of a lightweight convolutional network that fuses multiple features. Detailed Implementation
[0077] The technical solution of the present invention will now be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.
[0078] like Figure 1 As shown, an M-BUS intelligent electricity information acquisition system based on AI-driven signal processing includes a hardware acquisition layer and an embedded processing layer.
[0079] 1. The hardware acquisition layer is used to physically acquire signals from the M-BUS bus and perform preliminary conditioning. Specifically, it includes a resistor current sensing module, a hardware filtering module, and an ADC sampling module.
[0080] in:
[0081] The resistor current sensing module is used to sense current signals from the M-BUS bus.
[0082] The hardware filtering module, connected to the resistor current sensing module, is used to perform preliminary filtering on the induced signal collected by the resistor current sensing module to suppress some high-frequency noise.
[0083] The ADC sampling module, connected to the hardware filtering module, is used to convert the filtered analog signal output by the hardware filtering module into a digital signal and transmit it to the embedded processing layer. ADC stands for "Analog-to-Digital Conversion".
[0084] 2. The embedded processing layer, as the intelligent processing hub of the system, is integrated into the microcontroller (MCU) and is used to intelligently decode, verify and correct the digital signals output by the hardware acquisition layer. Specifically, it includes a control and arithmetic unit (CPU), an AI coprocessor (NPU / GPU), a CRC check hardware accelerator and memory (Flash / RAM).
[0085] in:
[0086] The control and processing unit is connected to the memory, hardware acquisition layer, AI coprocessor and CRC check hardware accelerator respectively. It is used to cooperate with the memory to store, manage and preprocess the digital signals output by the hardware acquisition layer, extract signal segments based on the timing window matching strategy, construct a hybrid feature vector based on the signal segments and send it to the AI coprocessor, receive the signal segment recognition results returned by the AI coprocessor, assemble the recognition results of the same frame into a data frame and send it to the CRC check hardware accelerator for verification.
[0087] The AI coprocessor connects to the control and computation unit and memory to efficiently run a lightweight convolutional network that fuses multiple features after lightweight processing. It identifies the mixed feature vectors sent by the control and computation unit and outputs the confidence probability of three bit recognition categories for each signal segment. The three bit recognition categories are: bit "0", bit "1", and invalid signal "NA". The category with the highest confidence probability is the recognition result.
[0088] The CRC check hardware accelerator is connected to the control and arithmetic unit and is used to perform cyclic redundancy check calculations on the data frames sent by the control and arithmetic unit at high speed.
[0089] The memory is used to store system programs, model parameters of lightweight convolutional networks with multi-feature fusion, and runtime data buffers.
[0090] The embedded processing layer also includes a system bus (such as AHB / APB), which is connected to the control and arithmetic unit, AI coprocessor, CRC check hardware accelerator and memory respectively, to ensure high-speed flow of data and control commands.
[0091] Furthermore, the memory can also be used to store the online training sample set. The control and operation unit is also used to initiate the code guessing correction process based on confidence probability sorting when the verification fails, and to update the online training sample set in the memory based on the verification and correction results, and to periodically train the multi-feature fusion lightweight convolutional network online based on the online training sample set.
[0092] The embedded processing layer also connects to a host computer or data aggregation system via a communication interface to output the final decoded and verified electricity consumption information data.
[0093] like Figure 2 As shown, an M-BUS intelligent electricity consumption information collection method based on AI-driven signal processing is described. This method, based on the aforementioned system or other similar hardware environment, specifically includes the following steps:
[0094] Step S1. Acquire analog signals on the M-BUS bus, obtain digital signal sequences after analog-to-digital conversion, and extract multiple signal segments from the digital signal sequence through a sliding window mechanism. Each signal segment corresponds to the transmission duration of one bit. Then, preprocess the extracted signal segments respectively.
[0095] Step S1.1. Convert the acquired analog signal into a digital signal sequence and send it into the circular data buffer in real time.
[0096] Step S1.2. Use an adaptive timing window based on transition detection to extract signal segments from the circular data buffer.
[0097] Specifically, the transition detection refers to: reading a digital signal sequence from a circular data buffer and calculating the difference between adjacent sampling points in real time to monitor signal transitions; when the absolute value of the detected difference exceeds a preset threshold... When the signal transition point is determined to be valid, it is marked as the starting point of the bit boundary.
[0098] The size of the adaptive timing window is set as follows: first, based on the known ADC sampling frequency... Nominal baud rate for M-BUS communication (Unit: bps) Calculate the theoretical number of sampling points contained in a single bit period. .
[0099] Then based on the theoretical number of sampling points And the fixed length of the preset front and rear redundancy point calculation window To ensure that the window can completely cover a bit period and include the necessary context information before and after it, Set to be in Based on this, add two sets of fixed redundancy points. ,Right now For example, when , (8 o'clock before and after) .
[0100] The adaptive timing window based on jump detection extracts signal segments from the circular data buffer as follows:
[0101] a) Frame start determination and first window extraction: When the system detects the first valid transition point after a period of silence (i.e., no transitions within a preset time), this point is taken as the starting point of a frame of data. Based on this transition point, data is extracted forward. Each sampling point (e.g., the first 8 points) is truncated to the next point. _ sampling points, together forming a length of _ This is a signal segment. This segment is marked as the beginning-of-frame signal segment of the current frame.
[0102] b) Synchronization of continuous window sliding and jumping: After extracting the first window, use the default step size. Slide backward to extract the next signal segment. During the sliding process, transition detection is continuously performed synchronously. If a new transition point is detected within a window and this transition point is related to the first transition point in the window... If the points do not correspond, the fixed step size sliding is immediately interrupted, and the new jump point is used as the reference to move forward. Point, take backwards Reposition the current window to ensure that the first window in the window is repositioned. Each point is always aligned with the bit boundary. This mechanism achieves dynamic synchronization between window partitioning and the actual bit boundary.
[0103] c) Frame end determination: When the number of windows acquired is equal to the number of bits in the data frame, the current frame transmission is determined to be over, window extraction is stopped, and the system waits for the arrival of the next data frame.
[0104] Step S1.3. For each extracted signal segment Preprocessing is performed separately to eliminate the effects of dimensions and DC offset, preparing for feature extraction. Specifically, this includes:
[0105] Step S1.3.1. DC offset removal: Calculate the theoretical maximum value of the sampling points. and minimum value median value Then, each sampling point is centered:
[0106] ;
[0107] In the above formula, Indicates the number after DC offset Each sample value.
[0108] Step S1.3.2. Amplitude Normalization: For the signal segment after DC removal... Perform maximum and minimum value normalization, scaling its magnitude to... Interval:
[0109]
[0110] In the above formula, Represents the normalized i-th Each sample value is obtained. This step yields a preprocessed standard signal segment. .
[0111] All preprocessed signal segments are processed sequentially according to steps S2 and S3.
[0112] Step S2. Based on the preprocessed signal segments, construct a hybrid feature vector with dimension [missing information]. It consists of time-domain feature vectors and frequency-domain feature vectors.
[0113] The time-domain feature vector consists of the following three parts:
[0114] 1) Normalized sampled value feature vector ( Dimension: Preprocessed signal segments Directly used as the feature vector of normalized sampled values .
[0115] 2) Local slope feature vector ( Dimension): Calculate signal segments The instantaneous rate of change at each point in the matrix. For interior points... Its instantaneous rate of change Approximate calculation using the three-point central difference method:
[0116] ;
[0117] For the two endpoints and Its instantaneous rate of change is set to 0. This yields a length of... slope sequence The sequence is then subjected to mean pooling to reduce dimensionality and smooth noise: the sequence... Sequential division into Groups are formed, and the arithmetic mean of the instantaneous rate of change within each group is calculated, ultimately forming... 3D local slope eigenvector .
[0118] 3) Local variance eigenvectors ( Dimension: To characterize the intensity of signal fluctuations, an overlapping sliding window is used for calculation. The local variance. Set the window length. sliding step size .from Starting from the initial point, each time take The variance is calculated for each consecutive point, and the window slides until it covers the entire point. A total of Each variance value, From this Select the largest value from the variance values. These constitute the local variance eigenvectors. .
[0119] Frequency domain eigenvectors ( (Dimensional): Used to capture periodic interference components in a signal. Extraction method: [Extracting the preprocessed signal segment...] Perform a Fast Fourier Transform (FFT) to obtain its spectrum. Within the critical interference frequency band of 10Hz to 1kHz, select a pre-specified frequency band. The amplitude at each frequency point constitutes the frequency domain feature vector. .
[0120] Finally, the time-domain feature vector and the frequency-domain feature vector are concatenated to form the final result. 3D hybrid feature vector :
[0121] ;
[0122] In the above formula, This is the hybrid feature vector used as the model input; in this embodiment, its dimension is 128.
[0123] Step S3. Develop the hybrid feature vector from step S2. The input is a lightweight convolutional network that fuses at most multiple features to obtain the recognition result of the signal segment. The recognition result is then processed to obtain the bit value of the signal segment.
[0124] like Figure 3 As shown, the process by which a lightweight convolutional network with multi-feature fusion performs inference based on the input mixed feature vector to obtain the recognition result is as follows:
[0125] a) Input Recombination and Structured Injection: The network input is a 128-dimensional hybrid feature vector. First, the mixed feature vector is recombined into a vector with 4 channels, each channel... A multi-channel tensor for each feature point. These four channels correspond to: channels 1 and 2 carrying the reconstructed 64-dimensional normalized sampled value features (32 dimensions per channel), channel 3 carrying the 32-dimensional local slope features, and channel 4 carrying the concatenated 8-dimensional local variance features and 24-dimensional frequency domain features (a total of 32 dimensions). This design directly injects prior knowledge of signal processing (such as the slope's sensitivity to abrupt changes) into the network input.
[0126] b) Feature fusion and abstraction: The recombined multichannel tensor passes through the following layers in sequence:
[0127] bi) Feature fusion layer: A one-dimensional convolutional layer (Conv1d) with a kernel size of 5 is used to fuse multi-channel tensors, and then batch normalization (BatchNorm) and ReLU activation function are performed.
[0128] b-ii) Two-stage depthwise separable convolutional modules: Each stage module contains a depthwise convolution and a pointwise convolution. In this embodiment, the first-stage module compresses the time dimension from 32 to 16 while expanding the number of channels from 16 to 32; the second-stage module compresses the time dimension from 16 to 8 while expanding the number of channels from 32 to 64. Depthwise separable convolution significantly reduces the number of parameters and computational cost.
[0129] b-iii) Bottleneck compression layer and aggregation layer: Use a 1x1 convolution to compress the number of channels from 64 to 32, and then input it into an adaptive average pooling layer.
[0130] c) Classification output: Expand the feature vector output from the adaptive average pooling layer, and then pass it through two fully connected layers to obtain 3D features. Finally, the Softmax function is used to... Convert to probability distribution , , , These represent the confidence probabilities of determining the current signal segment as bit "0", bit "1", or invalid signal "NA", respectively. The category with the highest confidence probability among the three bit identification categories is selected. As a result of the identification.
[0131] Furthermore, the process of processing the recognition results to obtain the bit values of the signal segments is as follows:
[0132] If the recognition result If the bit is "0" or "1", then that bit value is directly used as the bit value of the current signal segment.
[0133] If the recognition result If the signal is invalid "NA", then proceed as follows:
[0134] Case 1: If the current signal segment is marked as the first signal segment of the frame, the current frame is discarded directly and a prompt is given due to the lack of a reliable starting reference. Then, the frame is reset and the frame waits for the start transition of the next frame.
[0135] Case 2: If the current signal segment is not the first segment of the frame, compare the confidence probabilities of bits "0" and "1", and use the category with the higher confidence probability as the bit value of the current signal segment. This mechanism aims to deal with local interference within the frame and maintain the continuity of the decoding process as much as possible.
[0136] Step S4. Assemble the bit values obtained from processing all signal segments in step S3 into a complete data frame in chronological order. Then, the CRC check hardware accelerator is used to... Perform a CRC check. If the check passes, the data frame is deemed valid and is sent to the host computer or data aggregation system via the communication interface.
[0137] Furthermore, the method also includes the following optimization and self-learning steps:
[0138] Step S5. Automatically collect and label samples based on CRC check results, and construct and update the online training sample set.
[0139] The specific method is as follows:
[0140] If the current data frame If the CRC check passes, the frame is marked as a valid frame. The hybrid feature vector and its bit value (i.e., the truth label) of each signal segment in the frame are added as positive samples to the online training sample set.
[0141] If the current data frame If the CRC check fails, the code guessing and correction process is initiated to attempt to fix the error and generate a negative sample to be added to the online training sample set.
[0142] The specific process of the code-guessing and correction procedure is as follows:
[0143] (1) Assess the current data frame according to confidence probability. The bits are sorted.
[0144] Extract the components of the current data frame The confidence probability corresponds to each bit. If the initial identification result of the multi-feature fusion lightweight convolutional network corresponding to a certain bit is an invalid signal "NA", then it is marked as a suspect bit, and the confidence probability is set to a preset value. (For example For other bits, the confidence probability of the corresponding recognition result is directly taken. Then, all bits are sorted in ascending order of confidence probability.
[0145] (2) Flip the first N bits after sorting in a permutation and combination manner, where N is greater than or equal to 1, to obtain a candidate frame set.
[0146] For example, a candidate frame can be obtained by flipping only the bit with the lowest confidence probability from 0 to 1.
[0147] For example, the two bits with the lowest confidence probability are flipped in all possible combinations to generate three candidate frames (total). (A combination of these).
[0148] (3) Perform CRC check on all candidate frames in the candidate frame set. If a candidate frame passes the check, add the mixed feature vector of the original signal segment corresponding to all the flipped bits in the candidate frame and its flipped bit value as the first type of negative sample to the online training sample set. If a candidate frame still fails the check, add all the original signal segments corresponding to all the flipped bits in the candidate frame to the unprocessed set.
[0149] (4) Manually judge all the original signal segments in the set to be processed (by professionals using offline signal analysis tools, combined with M-BUS communication protocol and waveform features), and judge whether the identification result is bit "0", bit "1" or invalid signal "NA". Based on the mixed feature vector of the original signal segments and its manual judgment result, construct the second type of negative sample and add it to the online training sample set.
[0150] Step S6. Fine-tune the training of the lightweight convolutional network for multi-feature fusion based on the online training sample set.
[0151] The control and computation unit periodically checks the size of the online training sample set. When the cumulative number of newly added negative samples (including Class I and Class II samples) in the set reaches a preset threshold, the unit will take action. (For example When a training session is initiated, an online training loop is activated, using all samples in the current online training sample set to fine-tune the deployed multi-feature fusion lightweight convolutional network. Training employs a small learning rate and fewer epochs (e.g., 5 epochs) to avoid "catastrophic forgetting." After training, the updated model parameters are synchronized to memory, replacing the old parameters, thereby achieving adaptive optimization and continuous performance improvement of the multi-feature fusion lightweight convolutional network in specific deployment environments.
[0152] In addition, the aforementioned multi-feature fusion lightweight convolutional network needs to undergo complete offline training and lightweighting before its initial deployment. The specific steps are as follows:
[0153] Step T1. Construct an offline training sample set. Collect a massive amount of raw M-BUS signals covering different interference types (electromagnetic interference, common-mode interference) and fault modes (cable attenuation, poor contact) in laboratory settings and various typical field environments (industrial, civilian, commercial). Construct the dataset using a semi-automated process: For signal segments that pass CRC checksum verification on the first attempt, preprocess and extract mixed feature vectors to construct "positive samples"; for signal segments that fail checksum verification but are successfully corrected through bit flipping (using the same algorithm as before, considering flipping all bits), construct "Type I negative samples"; for those that cannot be automatically corrected, manually annotate them using experts to construct "Type II negative samples." The total dataset should contain no fewer than 100,000 samples, randomly divided into training, validation, and test sets in a 7:2:1 ratio.
[0154] Step T2. Using the training set, train the model using the Adam optimizer with cross-entropy as the loss function. Set the initial learning rate to 0.001 and use cosine annealing to decay the learning rate. Set the batch size to 32 and the total training epochs to 50. Use the validation set to monitor model performance during training to prevent overfitting.
[0155] Step T3. After training, perform structured pruning on the model, removing convolutional and fully connected layers whose absolute values are less than a threshold. (For example Redundant weights were removed, and the overall pruning rate was kept below 30%. The pruned model was retrained to restore accuracy. Finally, the model was quantized using INT8, converting weights and activation values from floating-point numbers to 8-bit integers, significantly reducing model size and inference computation.
[0156] Step T4. The quantized model is evaluated on an independent test set, requiring an overall recognition accuracy of over 99% and a recall rate of over 98.5% for both the "0" and "1" categories to ensure its generalization ability. After meeting the performance requirements, the final model parameter file is stored in the embedded processing layer's memory, completing the initial deployment.
[0157] Through the implementation of the aforementioned system and method, a complete process from physical signal acquisition, intelligent feature extraction, AI model recognition, dynamic verification and correction to closed-loop self-learning was achieved. This system and method significantly improve the decoding success rate and data integrity of the M-BUS bus in complex interference environments, and possess strong field adaptability and low maintenance costs.
[0158] It should be noted that, as will be apparent to those skilled in the art, the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics thereof. The scope of the present invention is defined by the claims rather than the foregoing description.
Claims
1. An M-BUS intelligent electricity information acquisition system based on AI-driven signal processing, comprising a hardware acquisition layer, wherein the hardware acquisition layer includes a resistor current detection module, a hardware filtering module, and an ADC sampling module connected in sequence, characterized in that: It also includes an embedded processing layer for intelligent decoding, verification, and correction of the digital signals output by the hardware acquisition layer; The embedded processing layer includes a control and arithmetic unit, an AI coprocessor, a CRC check hardware accelerator, and memory; The control and operation unit is connected to the memory, hardware acquisition layer, AI coprocessor and CRC check hardware accelerator respectively. It is used to cooperate with the memory to store and manage the digital signals output by the hardware acquisition layer, extract signal segments based on the timing window matching strategy, construct a hybrid feature vector based on the signal segments and send it to the AI coprocessor, receive the signal segment recognition results returned by the AI coprocessor, assemble the recognition results of the same frame into a data frame and send it to the CRC check hardware accelerator for verification. The AI coprocessor is connected to the control and computing unit and the memory. It is used to run a lightweight convolutional network with multi-feature fusion, identify the mixed feature vector sent by the control and computing unit, and output the confidence probability of three bit recognition categories for each signal segment. The three bit recognition categories are: bit "0", bit "1" and invalid signal "NA". The category with the highest confidence probability is the recognition result. The CRC check hardware accelerator is connected to the control and arithmetic unit and is used to perform cyclic redundancy check calculations on the data frames sent by the control and arithmetic unit. The memory is used to store system programs, model parameters of the multi-feature fusion lightweight convolutional network, and runtime data buffers.
2. The M-BUS intelligent electricity information collection system based on AI-driven signal processing as described in claim 1, characterized in that: The memory is also used to store the online training sample set; The control and computation unit is also used to initiate the code guessing and correction process based on confidence probability sorting when the verification fails, and to update the online training sample set in the memory based on the verification and correction results, and to perform online training on the multi-feature fusion lightweight convolutional network based on the online training sample set.
3. A method for collecting M-BUS intelligent electricity consumption information based on AI-driven signal processing, characterized in that... Includes the following steps: Step S1. Acquire analog signals on the M-BUS bus, obtain digital signal sequences after analog-to-digital conversion, and extract multiple signal segments from the digital signal sequence through a sliding window mechanism. Each signal segment corresponds to the transmission duration of one bit. Then, preprocess the extracted signal segments respectively. All preprocessed signal segments are processed sequentially according to steps S2 and S3: Step S2. Construct a hybrid feature vector based on the preprocessed signal segments; Step S3. Input the hybrid feature vector constructed in step S2 into the multi-feature fusion lightweight convolutional network to obtain the recognition result of the signal segment, and process it according to the recognition result to obtain the bit value of the signal segment; Step S4. Assemble the bit values obtained from processing all signal segments in step S3 into a complete data frame in chronological order. Then, the CRC check hardware accelerator is used to... A CRC check is performed. If the check passes, the frame data is deemed valid and sent to other devices via the communication interface.
4. The M-BUS intelligent electricity consumption information collection method based on AI-driven signal processing as described in claim 3, characterized in that, Step S1 specifically includes: Step S1.
1. Convert the acquired analog signal into a digital signal sequence and send it into the circular data buffer in real time; Step S1.
2. Extract signal segments from the circular data buffer using an adaptive timing window based on transition detection; Step S1.
3. Preprocess each extracted signal segment to eliminate the influence of dimensions and DC offset.
5. The M-BUS intelligent electricity consumption information collection method based on AI-driven signal processing as described in claim 4, characterized in that: The transition detection in step S1.2 refers to: reading the digital signal sequence from the circular data buffer and calculating the difference between adjacent sampling points in real time to monitor signal transitions; when the absolute value of the detected difference exceeds a preset threshold... When this occurs, it is determined to be a valid signal transition point and marked as the boundary start point of the bit; The size of the adaptive timing window is set as follows: first, based on the known ADC sampling frequency... Nominal baud rate for M-BUS communication Calculate the theoretical number of sampling points contained in a single bit period. Then, based on the theoretical number of sampling points... And the fixed length of the preset front and rear redundancy point calculation window : Set to be in Based on this, add two sets of fixed redundancy points. ,Right now ; The adaptive timing window based on jump detection extracts signal segments from the circular data buffer as follows: a) Frame start determination and first window extraction: When the system detects the first valid transition point after no transition within a continuous preset time period in a silent state, the point is taken as the starting point of a frame of data. Using this jump point as a reference, intercept forward. Each sampling point is truncated backwards. _ sampling points, together forming a length of _ The signal segment; this segment is marked as the frame start signal segment of the current frame; b) Synchronization of continuous window sliding and jumping: After extracting the first window, with a step size... Slide backward to extract the next signal segment; during the sliding process, transition detection is continuously performed synchronously; if a new transition point is detected within a certain window and that transition point is related to the first transition point in the window... If the points do not correspond, the fixed step size sliding is immediately interrupted, and the new jump point is used as the reference to move forward. Point, take backwards Reposition the current window to ensure that the first window in the window is repositioned. Each point is always aligned with the bit boundary; c) Frame end determination: When the number of windows acquired is equal to the number of bits in the data frame, the current frame transmission is determined to be over, window extraction is stopped, and the system waits for the arrival of the next data frame.
6. The M-BUS intelligent electricity consumption information collection method based on AI-driven signal processing as described in claim 3, characterized in that: In step S2, the dimension of the mixed feature vector is , The length of the signal segment; The hybrid feature vector is formed by concatenating time-domain feature vectors and frequency-domain feature vectors. composition: The time-domain feature vector consists of the following three parts: 1) Normalized sampled value feature vector: This is the feature vector generated from the preprocessed signal segment. Directly used as the feature vector of normalized sampled values ; 2) Local slope eigenvector: Calculate the signal segment The instantaneous rate of change at each point in the equation; for the th... Internal points , Its instantaneous rate of change Approximate calculation using the three-point central difference method: ; For the two endpoints and Its instantaneous rate of change is set to 0; thus, a length of is obtained. slope sequence Then, mean pooling is performed on the sequence to reduce dimensionality and smooth noise: the sequence Sequential division into Groups are formed, and the arithmetic mean of the instantaneous rate of change within each group is calculated, ultimately forming... 3D local slope eigenvector ; 3) Local variance eigenvectors: Set the window length Sliding step size ,from Starting from the initial point, each time... The variance is calculated for each consecutive point, and the window slides until it covers the entire point. A total of Each variance value, ,from Select the largest value from the variance values. These constitute the local variance eigenvectors. ; Frequency domain feature vector: a preprocessed signal segment Perform a Fast Fourier Transform to obtain its spectrum. Select the pre-specified The amplitude at each frequency point constitutes the frequency domain feature vector. ; The time-domain feature vector and the frequency-domain feature vector are concatenated to form the final... 3D hybrid feature vector : 。 7. The M-BUS intelligent electricity consumption information collection method based on AI-driven signal processing as described in claim 3, characterized in that: In step S3, the process by which the lightweight convolutional network using multi-feature fusion infers the recognition result based on the input mixed feature vector is as follows: a) Input Recombination and Structured Injection: First, the mixed feature vectors of the input are recombined into a multi-channel tensor; b) Feature fusion and abstraction: The recombined multichannel tensor passes through the following layers in sequence: bi) Feature fusion layer: A one-dimensional convolutional layer is used to fuse multi-channel tensors, followed by batch normalization and ReLU activation function processing; b-ii) Two-level depthwise separable convolutional modules: Each module contains a depthwise convolution and a pointwise convolution; b-iii) Bottleneck compression layer and aggregation layer: Use a 1x1 convolution to compress the number of channels, and then input it into an adaptive average pooling layer; c) Classification output: Expand the feature vector output from the adaptive average pooling layer, and then pass it through two fully connected layers to obtain 3D features. Finally, the Softmax function is used to... Convert to probability distribution , , , These represent the confidence probabilities of determining the current signal segment as bit "0", bit "1", or invalid signal "NA", respectively. The category with the highest confidence probability among the three bit identification categories is selected. As a result of the identification.
8. The M-BUS intelligent electricity consumption information collection method based on AI-driven signal processing as described in claim 3, characterized in that: In step S3, the output of the multi-feature fusion lightweight convolutional network is the confidence probability of three categories: bit "0", bit "1", or invalid signal "NA". The category with the highest confidence probability among these three bit categories is then identified. As the identification result; The process of processing the recognition results to obtain the bit values of the signal segments is as follows: If the recognition result If it is a bit "0" or a bit "1", then that bit value is directly used as the bit value of the current signal segment; If the recognition result If the signal is invalid "NA", then proceed as follows: Case 1: If the current signal segment is marked as the first frame signal segment, the current frame is discarded directly with a prompt, then the frame is reset and the system waits for the next frame. Case 2: If the current signal segment is not the first signal segment of the frame, compare the confidence probabilities of bits "0" and bits "1" output by the multi-feature fusion lightweight convolutional network, and take the category with the higher confidence probability as the bit value of the current signal segment.
9. The M-BUS intelligent electricity consumption information collection method based on AI-driven signal processing as described in claim 3, characterized in that, It also includes the following steps: Step S5. Automatically collect and label samples based on CRC check results, and construct and update the online training sample set; Step S6. Fine-tune the training of the lightweight convolutional network for multi-feature fusion based on the online training sample set.
10. The M-BUS intelligent electricity consumption information collection method based on AI-driven signal processing as described in claim 9, characterized in that, Step S5 specifically includes: If the current data frame If the CRC check passes, the hybrid feature vector and its bit value of each signal segment in the data frame are taken as positive samples and added to the online training sample set. If the current data frame If the CRC check fails, the code guessing and correction process is initiated to attempt to fix the error and generate a negative sample and add it to the online training sample set. The specific process of the code-guessing and correction procedure is as follows: (1) Assess the current data frame according to confidence probability. Sort the bits by bits; Extract the components of the current data frame The confidence probability corresponding to each bit; if the initial recognition result of the multi-feature fusion lightweight convolutional network corresponding to a certain bit is an invalid signal "NA", then the confidence probability is set to a preset value. For other bits, directly take the confidence probability of the corresponding recognition result; then, sort all bits in order of confidence probability from low to high. (2) Flip the first N bits after sorting in a permutation and combination manner, where N is greater than or equal to 1, to obtain a candidate frame set; (3) Perform CRC check on all candidate frames in the candidate frame set. If a candidate frame passes the check, the mixed feature vector of the original signal segment corresponding to the bit that has been flipped in the candidate frame and its flipped bit value are taken as the first type of negative sample and added to the online training sample set. If a candidate frame still fails the check, the original signal segment corresponding to the bit that has been flipped in the candidate frame is added to the unprocessed set. (4) Manually judge all the original signal segments in the set to be processed, and judge whether the recognition result is bit "0", bit "1" or invalid signal "NA". Based on the mixed feature vector of the original signal segments and its manual judgment result, construct the second type of negative sample and add it to the online training sample set.
Citation Information
Patent Citations
Wired M-BUS water meter reading equipment and method
CN117789437A