A dual-mode adaptive communication method based on wM-Bus and LoRaWAN and a smart meter
By adopting a dual-mode communication method that adaptively switches operating modes and dynamically adjusts channel parameters, the communication problem between wM-Bus and LoRaWAN in complex environments is solved, realizing efficient and low-power smart meter communication and meeting the requirements of wide coverage and high reliability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- QINGDAO ITECHENE TECH CO LTD
- Filing Date
- 2026-04-29
- Publication Date
- 2026-05-29
AI Technical Summary
Existing dual-mode communication solutions combining WM-Bus and LoRaWAN cannot adapt to dynamic changes in channel quality and service types in complex installation environments and dense node deployments. This results in decreased communication success rate, increased power consumption, and shortened battery life, failing to meet the comprehensive requirements of wide coverage, high reliability, and low power consumption.
An adaptive communication method is adopted, including adaptive switching of working mode, anti-collision mechanism and dynamic threshold update. The channel idle state is evaluated through LBT mechanism, and the working mode and channel parameters are adjusted to adapt to environmental changes. A dual-mode adaptive communication method for wM-Bus and LoRaWAN is designed.
It improves the quality of communication links, reduces redundant power consumption, enhances channel utilization and data packet success rate, and ensures the lifespan of smart meters and the success rate of meter reading.
Smart Images

Figure CN122120646A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of dual-mode communication technology, and particularly relates to a dual-mode adaptive communication method and smart meter based on wM-Bus and LoRaWAN. Background Technology
[0002] Smart meters (such as water meters, gas meters, and heat meters), as core terminals for IoT utility metering, need to simultaneously meet the comprehensive requirements of wide coverage, high reliability, low power consumption, and large-scale dense deployment under battery power conditions. Currently, wM-Bus and LoRaWAN dual-mode communication technologies have been widely used in scenarios such as residential meter reading, DMA zone leakage metering, and urban and rural water and gas supply network monitoring. The lightweight and low-power characteristics of wM-Bus and the long-distance strong penetration capability of LoRaWAN are highly compatible with the core requirements of smart meters, such as battery power supply, complex installation scenarios, and long maintenance-free cycles. In dual-mode smart meter communication based on wM-Bus and LoRaWAN, factors such as complex installation environments, dense node deployment, low power consumption constraints of battery power supply, and diversified service types will cause dynamic changes in the quality, channel occupancy status, and transmission and reception timing of the two communication links.
[0003] Most existing dual-mode communication solutions rely on fixed link switching or simple primary / backup redundancy mechanisms, selecting communication links based on preset fixed strategies or failure trigger conditions. When external channel environments, node density, or service loads change, the same switching strategies and transmission / reception mechanisms become unsuitable for the current communication state. Furthermore, once the scheduling strategy fails, communication success rate, power consumption, and real-time performance all deteriorate. If a single link experiences conflict or scheduling mismatch, or if the two links are out of sync with each other, resulting in overlapping transmission and reception times, the actual communication success rate, power consumption, and latency will deviate significantly from design specifications. This deviation will be further amplified by channel quality and node density, directly leading to incomplete meter readings, lost alarms, and untimely control. Moreover, frequency domain interference, time domain overlap, and network layer resource contention can occur between the two links, similarly causing a decrease in overall communication efficiency, excessive power consumption, and shortened battery life, failing to simultaneously meet the comprehensive requirements of smart meters for wide coverage, high reliability, low power consumption, and large-scale dense deployment. Summary of the Invention
[0004] To address the problems existing in the prior art, this invention provides a dual-mode adaptive communication method based on wM-Bus and LoRaWAN, comprising the following steps: Step S1: Configure and initialize the working mode, which includes wM-Bus priority mode, LoRaWAN priority mode or dual-link concurrent mode; Step S2: Initialize the operating parameters for the current working mode, including wM-Bus operating parameters and LoRaWAN operating parameters; Step S3: Perform RTC wake-up and verify whether the wM-Bus transmission interval or LoRaWAN network access time has been reached; Step S4: If the collision is reached, execute the anti-collision mechanism sub-process, which includes: S411: Initialize the current channel idle assessment threshold, which includes the RSSI threshold and the SNR threshold; S412: Execute the LBT mechanism, collect the real-time RSSI and SNR of the current working channel, and determine whether RSSI≤RSSI threshold and SNR≥SNR threshold are satisfied at the same time; S413: If the condition is met, the channel is determined to be idle, meter reading data is sent, and the RSSI threshold and SNR threshold are updated based on the difference between the historical detection value and the threshold after the data is sent. S414: If not satisfied, the channel is determined to be busy, and the current backoff count is checked to see if it is less than the preset maximum backoff count; S415: If it is less than the current protocol parameters, calculate the transmission time slot, generate a random multiple backoff duration, and return to step S412; if it is greater than the current protocol parameters, check whether the number of consecutive ignores exceeds the maximum number of ignores. If it does, automatically relax the RSSI threshold and SNR threshold. Step S5: Adjust the working mode adaptively or manually according to the LoRaWAN network access status or wM-Bus communication requirements.
[0005] Furthermore, step S5 specifically includes: In wM-Bus priority mode, if LoRaWAN successfully joins the network, it switches to LoRaWAN priority mode; in LoRaWAN priority mode, if the number of consecutive days of failed network access exceeds a preset threshold, it switches to wM-Bus priority mode; in dual-link concurrent mode, if LoRaWAN has no network for a long time, it adaptively switches to wM-Bus priority working mode; if there is no wM-Bus communication requirement, it can adaptively or manually switch to LoRaWAN priority working mode.
[0006] Preferably, when the working mode of step S1 is wM-Bus priority mode, the method includes: S201: Initialize wM-Bus operating parameters, which include wM-Bus daily working hours, transmission interval, random interval value, LoRaWAN network access attempt cycle, and reporting time window; S301: After the RTC wake-up, check whether the wM-Bus transmission interval has been reached. If it has not been reached, check whether the LoRaWAN network access attempt period has been reached. S401: If the wM-Bus transmission interval is reached, execute the wM-Bus anti-collision mechanism sub-process and send wM-Bus data; If the LoRaWAN network access attempt period is reached, execute the LoRaWAN anti-collision mechanism sub-process to report the network access; S501: If LoRaWAN network access is successful, automatically switch to LoRaWAN working mode.
[0007] Preferably, when the operating mode of step S1 is LoRaWAN priority mode, the method includes: S202: Initialize LoRaWAN operating parameters, which include the maximum number of consecutive failed network accesses, reporting frequency, network access request interval, random value of interval, and reporting time window; S302: After the RTC wake-up, check whether the network entry reporting time has been reached; S402: If the network access reporting time is reached, randomly generate the next day's reporting time within the reporting time window, execute the LoRaWAN anti-collision mechanism sub-process, and complete the network access request or data reporting; S502: Counts the number of consecutive failed network access days. If it exceeds the maximum number of consecutive failed network access days, it is determined that there is no valid LoRaWAN and automatically switches to wM-Bus working mode.
[0008] Preferably, when the working mode of step S1 is dual-link concurrent mode, the method includes: S203: Synchronously initialize wM-Bus operating parameters and LoRaWAN operating parameters; S303: After the RTC wake-up, check whether the wM-Bus transmission interval has been reached. If it has not been reached, check whether the LoRaWAN network access reporting time has been reached. S403: If the wM-Bus transmission interval is reached, execute the wM-Bus anti-collision mechanism sub-process and send wM-Bus data; If the LoRaWAN network access reporting time is reached, execute the LoRaWAN anti-collision mechanism sub-process to report the network access. S503: If LoRaWAN has no network for a long time, it will automatically switch to wM-Bus priority mode. If there is no wM-Bus communication requirement, it can automatically or manually switch to LoRaWAN priority mode.
[0009] Based on the above scheme, the wM-Bus anti-collision mechanism sub-process is as follows: S421: Initialize the wM-Bus channel idle assessment threshold, which includes the RSSI threshold and the SNR threshold; S422: Execute the LBT mechanism, collect the real-time RSSI and SNR of the current working channel, and determine whether RSSI≤RSSI threshold and SNR≥SNR threshold are satisfied at the same time; S423: If the condition is met, the channel is determined to be idle, meter reading data is sent, and the RSSI threshold and SNR threshold are updated based on the difference between the historical detection value and the threshold after the data is sent. S424: If not satisfied, the channel is determined to be busy, and the wM-Bus backoff count is checked to see if it is less than the preset maximum backoff count. S425: If less than, calculate the transmission time slot based on the wM-Bus communication frequency and the number of data packet bytes, give back a random multiple of the transmission time slot duration, and return to step S422; if greater than, ignore this transmission, check whether the number of consecutive ignoring exceeds the maximum number of ignoring, and if it exceeds, automatically relax the RSSI threshold and SNR threshold.
[0010] Based on the above scheme, the LoRaWAN anti-collision mechanism sub-process is as follows: S431: Initialize the LoRaWAN channel idle assessment threshold, which includes the RSSI threshold and the SNR threshold; S432: Execute the LBT mechanism, collect the real-time RSSI and SNR of the current LoRaWAN working channel, and determine whether RSSI≤RSSI threshold and SNR≥SNR threshold are satisfied at the same time; S433: If the condition is met, the channel is determined to be idle, a LoRaWAN network access request or data report is sent, and the RSSI threshold and SNR threshold are updated according to the difference between the historical detection value and the threshold after the data is sent. S434: If not satisfied, the channel is determined to be busy, and the current LoRaWAN backoff count is checked to see if it is less than the preset maximum backoff count; S435: If it is less than, calculate the transmission time slot based on the LoRaWAN communication frequency, data rate and data packet byte count, give back a random multiple of the transmission time slot duration, and return to step S432; if it is greater than, check whether the number of consecutive non-compliance exceeds the maximum number of non-compliances. If it does, automatically relax the RSSI threshold and SNR threshold.
[0011] Specifically, the RSSI threshold and SNR threshold are updated based on the difference between historical detection values and the threshold. Specifically, when the difference between the historical detection value and the current threshold exceeds the preset deviation for j consecutive preset times, the current threshold is automatically adjusted so that the difference between the current threshold and the detection value is less than the preset deviation.
[0012] On the other hand, the present invention provides a smart meter, including: a metering module, a storage module and a communication module, wherein the communication module adopts the dual-mode adaptive communication method of wM-Bus and LoRaWAN as described above.
[0013] Compared with the prior art, the present invention has the following beneficial effects: By adaptively switching working modes, the device can automatically switch to the optimal mode according to the actual deployment scenario and link quality, which can not only ensure the quality of the communication link, but also avoid redundant power consumption caused by dual connectivity working at the same time, thus ensuring the service life of the smart meter. For dual-mode communication, an anti-collision mechanism was designed, including dual-threshold idle channel assessment and random multiple time slot backoff, which effectively solves the problem of insufficient theoretical channel utilization of the native pure ALOHA mechanism of LoRaWAN, as well as the problem of mutual interference between the wM-Bus timed broadcast mechanism and LoRaWAN random access, and greatly improves channel utilization and the probability of successful data packet transmission and reception. By dynamically updating the thresholds, the device can adjust the RSSI and SNR thresholds in real time based on historical channel detection results, automatically adapting to dynamic factors such as channel quality fluctuations, environmental obstruction, and interference changes, effectively improving the meter reading success rate. Attached Figure Description
[0014] Figure 1 This is a flowchart of the communication method of the present invention; Figure 2 This is a flowchart of the wM-Bus priority mode workflow of the present invention; Figure 3 Here is a flowchart of the wM-Bus anti-collision mechanism. Figure 4 Here is a flowchart of the LoRaWAN anti-collision mechanism. Figure 5 This is a flowchart of the LoRaWAN priority mode workflow of the present invention; Figure 6 This is a flowchart of the dual-link concurrent mode workflow. Detailed Implementation
[0015] The invention will be further described below with reference to specific embodiments.
[0016] like Figure 1 As shown, this invention provides a dual-mode adaptive communication method based on WM-Bus and LoRaWAN, comprising the following steps: Step S1: Configure and initialize the working mode, which includes wM-Bus priority mode, LoRaWAN priority mode and dual-link concurrent mode; Step S2: Initialize the operating parameters for the current working mode, including wM-Bus operating parameters and LoRaWAN operating parameters; Step S3: Perform RTC wake-up and verify whether the wM-Bus transmission interval or LoRaWAN network access time has been reached; Step S4: If the collision occurs, execute the anti-collision mechanism sub-process. The anti-collision mechanism sub-process includes: performing an idle detection on the current working channel; if the idle condition is met, execute data transmission. The specific sub-processes of the anti-conflict mechanism include: S411: Initialize the current channel idle assessment threshold, which includes the RSSI threshold and the SNR threshold; S412: Execute the LBT mechanism, collect the real-time RSSI and SNR of the current working channel, and determine whether RSSI≤RSSI threshold and SNR≥SNR threshold are satisfied at the same time; S413: If the condition is met, the channel is determined to be idle, meter reading data is sent, and the RSSI threshold and SNR threshold are updated based on the difference between the historical detection value and the threshold after the data is sent. S414: If not satisfied, the channel is determined to be busy, and the current backoff count is checked to see if it is less than the preset maximum backoff count; S415: If it is less than the current protocol parameters, calculate the transmission time slot, generate a random multiple backoff duration, and return to step S412; if it is greater than the current protocol parameters, check whether the number of consecutive ignores exceeds the maximum number of ignores. If it does, automatically relax the RSSI threshold and SNR threshold.
[0017] Step S5: Based on the LoRaWAN network access status or wM-Bus communication requirements, adaptively or manually adjust the working mode. The network access status includes whether the LoRaWAN network access was successful and whether the maximum number of consecutive network access failures has been reached.
[0018] In the wM-Bus priority mode, if LoRaWAN network access is successful, the system switches to the LoRaWAN priority mode; in the LoRaWAN priority mode, if the number of consecutive network access failures exceeds a preset threshold, the system switches to the wM-Bus priority mode. The preset threshold is set in the LoRaWAN operating parameters, specifically the maximum number of consecutive network access failures in this embodiment of the invention.
[0019] In dual-link concurrent mode, if LoRaWAN has no network access for a long time (network access failure), it will adaptively switch to wM-Bus priority mode. If there is no wM-Bus communication requirement, it can be adaptively or manually switched to LoRaWAN priority mode.
[0020] Example 1 like Figure 2As shown, this invention provides a dual-mode adaptive communication method based on wM-Bus and LoRaWAN. Step S1 operates in wM-Bus priority mode. The device enters this mode after power-on, initializing the radio frequency and protocol stack to wM-Bus priority mode. This method is suitable for low-power daily meter reading scenarios without LoRaWAN wide-area coverage. The method includes: S201: Initialize wM-Bus operating parameters, including wM-Bus daily working time Start_Time, transmission interval SI, interval random value RSI, LoRaWAN network access attempt period JFreq and reporting time window Report_Window; In this embodiment, Start_Time is set to 8:00-18:00 every day, and the radio frequency is turned off during non-working hours to reduce power consumption; SI is set to 15s, with a value range of 1-60s; RSI is set to 3s, with a value range of 3-10s; JFreq is set to 7 days, with a value range of 3-15 days; and Report_Window is set to 0-6, which can be configured within 24 hours of a day.
[0021] S301: After the RTC wakes up, check whether the wM-Bus transmission interval SI has been reached. If it has not been reached, check whether the LoRaWAN network access attempt period JFreq has been reached. S401: If the wM-Bus transmission interval SI is reached, execute the wM-Bus anti-collision mechanism sub-process, send wM-Bus data, and then return to the main process; In this embodiment, upon receiving the wM-Bus sending command, the anti-collision mechanism sub-process is initiated, such as... Figure 3 As shown, the wM-Bus anti-collision mechanism sub-process is as follows: S421: Initialize wM-Bus channel idle assessment thresholds, which include RSSI threshold R_Lim and SNR threshold S_Lim; According to this embodiment, R_Lim is set to -87dBm, and the possible values are -80dBm to -95dBm; S_Lim is set to 8dB, and the possible values are 0dB to 10dB; by setting the channel idle assessment threshold, a compliance judgment benchmark is provided for channel detection, and the idle status of the working channel is assessed.
[0022] S422: Execute the Listen Before Talk (LBT) mechanism, collect the real-time Received Signal Strength Indicator (RSSI) and Signal-to-Noise Ratio (SNR) of the current working channel, and determine whether the idle conditions of RSSI≤R_Lim and SNR≥S_Lim are satisfied at the same time; S423: If the condition is met, the channel is determined to be idle, and the meter reading data transmission stage is entered. Data transmission is completed in the idle time slot. After data transmission, the RSSI threshold and SNR threshold are updated according to the difference between the historical detection value and the threshold. In this embodiment, the RSSI and SNR thresholds are updated based on the difference between historical detection values and the threshold. When the difference remains excessively large, the thresholds are automatically updated to adapt to the channel environment. If the difference is reasonable, the wM-Bus anti-collision mechanism sub-process ends. Preferably, when the difference between the historical detection value and the current threshold exceeds a preset deviation for j consecutive preset times, the current threshold is automatically adjusted so that the difference between the current threshold and the detection value is less than the preset deviation. In this embodiment, j is set to 7 times, but it can also be adjusted according to actual needs.
[0023] S424: If the idle condition is not met, the channel is determined to be busy and the backoff count verification step is entered to verify whether the current wM-Bus backoff count is less than the preset maximum backoff count Max1; wherein, the maximum backoff count is set to 4 times, which can be adjusted by those skilled in the art according to experience or actual working scenario.
[0024] S425: If the number of backoffs is less than the maximum number of backoffs, calculate the transmission time slot based on the wM-Bus communication frequency, data rate, and number of data packet bytes, backoff the transmission time slot by a random multiple of the duration, and return to step S422 to perform channel detection again; if the number of backoffs exceeds the maximum number of backoffs, proceed to the transmission ignore and threshold update stage. The process of sending ignore and threshold update is as follows: after the number of backoff attempts reaches the upper limit, record the current send ignore, and check whether the number of consecutive ignores exceeds the maximum number of ignores Max2. If it does, automatically relax the RSSI threshold and SNR threshold.
[0025] In this embodiment, the maximum number of times to ignore is set to 3. Those skilled in the art can adjust it according to experience or actual working scenarios. By recording the number of times to ignore after the number of times to give way reaches the upper limit, the threshold is automatically relaxed when the number of times to ignore exceeds the preset maximum number of times to ignore, which solves the problem of not being able to send in extreme environments. After updating the threshold, the process returns to the main process.
[0026] If the LoRaWAN network access attempt period is reached, the LoRaWAN anti-collision mechanism sub-process is executed to report the network access. After the network access report is completed, the reporting time for the next day is randomly generated. In this embodiment, when a LoRaWAN network access or reporting command is received, the LoRaWAN anti-collision mechanism sub-process is activated, such as... Figure 4 As shown, the LoRaWAN anti-collision mechanism sub-process is as follows: S431: Initialize the LoRaWAN channel idle assessment threshold, which includes the RSSI threshold R_Lim and the SNR threshold S_Lim; R_Lim is set to -80dBm, and can take values from -72dBm to -95dBm; S_Lim is set to -5dB, and can take values from -9dB to 5dB, providing a reliable judgment benchmark for LoRaWAN channel detection.
[0027] S432: Execute the LBT mechanism, collect the real-time RSSI and SNR of the current LoRaWAN working channel, and determine whether the idle conditions of RSSI≤R_Lim and SNR≥S_Lim are met simultaneously. S433: If the condition is met, the channel is determined to be idle, and the data transmission phase begins. In the idle time slot, a LoRaWAN network access request or data report is sent, and after the data transmission is completed, the RSSI threshold and SNR threshold are updated based on the difference between the historical detection value and the threshold. In this embodiment, the RSSI and SNR thresholds are updated based on the difference between historical detection values and the threshold. When the difference remains excessively large, the thresholds are automatically updated to adapt to the channel environment. If the difference is reasonable, the LoRaWAN anti-collision mechanism sub-process ends. Preferably, when the difference between the historical detection value and the current threshold exceeds a preset deviation for j consecutive times, the current threshold is automatically adjusted so that the difference between the current threshold and the detection value is less than the preset deviation. In this embodiment, j is set to 7 times, but it can also be adjusted according to actual needs.
[0028] S434: If the idle condition is not met, the channel is determined to be busy, and the current LoRaWAN backoff count is checked to see if it is less than the preset maximum backoff count Max3; wherein, the maximum backoff count is set to 4 times, which can be adjusted by those skilled in the art based on experience or actual working scenarios.
[0029] S435: If the number of backoffs is less than the maximum number of backoffs, calculate the transmission time slot based on the LoRaWAN communication frequency, data rate, and number of data packet bytes, and backoff the transmission time slot by a random multiple of the duration, then return to step S412; if the number of consecutive non-compliances exceeds the maximum number of non-compliances Max4, then automatically relax the RSSI threshold and SNR threshold to solve the problem of being unable to transmit in extreme environments such as strong obstruction and underground wells. After the update is completed, the sub-process ends and returns to the main process.
[0030] S501: If LoRaWAN network access is successful, it will automatically switch to LoRaWAN working mode to achieve adaptive wide-area coverage; if the LoRaWAN network access attempt cycle has not been reached or the network access fails, it will enter a low-power sleep state and continue to be in wM-Bus working mode.
[0031] Example 2 like Figure 5 As shown, this invention provides a dual-mode adaptive communication method based on WM-Bus and LoRaWAN. Step S1 operates in LoRaWAN priority mode; the device enters LoRaWAN operating mode after power-on. The communication method is as follows: S202: Initialize LoRaWAN operating parameters. LoRaWAN operating parameters include the maximum number of consecutive network failures (Max_Join_Fail_Days), the reporting period (Report_Freq), the network access request interval (JR_Interval), the random interval value (JR_Jitter), and the reporting time window (Report_Window). In this embodiment, Max_Join_Fail_Days is set to 30 days, with a possible value range of 1-60 days. A mode switch is triggered when there is no network access for 30 consecutive days. Report_Freq is set to 24h, with a possible value range of 1-24h, reporting once every 24 hours. JR_Interval is set to 15s, with a possible value range of 10-30s. JR_Jitter is set to 3s, with a possible value range of 3-10s, achieving random network access anti-collision within 12-18 seconds. Those skilled in the art should understand that JR_Jitter is a random interval value; a value of 3s means the interval is randomly selected within the range [-3s, 3s], thus achieving network access anti-collision within 12-18 seconds. Report_Window is configurable within a 24-hour period. Initializing the operating parameters provides a benchmark for communication timing scheduling and fault rollback.
[0032] S302: After the RTC wakes up, it is checked whether the network entry reporting time has been reached. The network entry reporting time is obtained based on the reporting time window. S402: If the network access reporting time is reached, the next day's reporting time in the Report_Window is randomly generated, and the LoRaWAN anti-collision mechanism sub-process is executed to complete the network access request or data reporting. If the time is not reached, the hibernation control phase is entered. The LoRaWAN anti-collision mechanism sub-process in this embodiment is the same as the steps in embodiment 1, and will not be described again here.
[0033] S502: After completing the reporting, count the number of consecutive network access failure days. If the number of consecutive network access failure days exceeds the maximum number of consecutive network access failure days, it is determined that there is no effective LoRaWAN coverage at present, and automatically switches to wM-Bus working mode and enters low power sleep state.
[0034] This embodiment automatically switches the working mode based on the number of consecutive failed network access days, ensuring uninterrupted meter reading services and improving the meter reading success rate.
[0035] Example 3 like Figure 6 As shown, this invention provides a dual-mode adaptive communication method based on WM-Bus and LoRaWAN. Step S1 operates in a dual-link concurrent mode, which the device enters after power-on. The method is as follows: S203: Synchronously initialize wM-Bus operating parameters and LoRaWAN operating parameters, and initialize the radio frequency and protocol stack to dual-link simultaneous working mode; S303: After the RTC wake-up, check whether the wM-Bus transmission interval has been reached. If it has not been reached, check whether the LoRaWAN network access reporting time has been reached. S403: If the wM-Bus transmission interval is reached, the process jumps to execute the wM-Bus anti-collision mechanism sub-process, sends wM-Bus data, and returns to the main process after the data transmission is completed. If the LoRaWAN network access reporting time is reached, the process will jump to the LoRaWAN anti-collision mechanism sub-process to perform network access reporting. After the reporting is completed, the reporting time for the next day will be randomly generated. The wM-Bus anti-collision mechanism sub-process of this embodiment is the same as the LoRaWAN anti-collision mechanism sub-process in embodiment 1, and will not be described again here.
[0036] S503: If LoRaWAN has no network access for an extended period, it will adaptively switch to the wM-Bus priority mode. If there is no wM-Bus communication requirement, it can adaptively or manually switch to the LoRaWAN priority mode. If neither of these conditions applies, it will remain in a dual-communication enabled working state, allowing both meter reading methods to be used simultaneously for a high meter reading success rate.
[0037] Based on the same technical concept, the present invention also provides a smart meter, including: a metering module, a storage module and a communication module, wherein the communication module adopts the dual-mode adaptive communication method of wM-Bus and LoRaWAN as described in the above embodiments.
[0038] It should be noted that the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, program segment, or portion of code containing at least one executable instruction for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0039] In general, various exemplary embodiments of the present invention can be implemented in hardware or dedicated circuitry, software, firmware, logic, or any combination thereof. Some aspects can be implemented in hardware, while others can be implemented in firmware or software that can be executed by a controller, microprocessor, or other computing device. When aspects of embodiments of the present invention are illustrated or described as block diagrams, flowcharts, or represented using certain other images, it will be understood that the blocks, apparatuses, systems, techniques, or methods described herein can be implemented as non-limiting examples in hardware, software, firmware, dedicated circuitry or logic, general-purpose hardware or controllers or other computing devices, or certain combinations thereof.
[0040] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
[0041] While the specific embodiments of the present invention have been described above, they are not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art without creative effort based on the technical solutions of the present invention are still within the scope of protection of the present invention.
Claims
1. A dual-mode adaptive communication method based on WM-Bus and LoRaWAN, characterized in that, Includes the following steps: Step S1: Configure and initialize the working mode, which includes wM-Bus priority mode, LoRaWAN priority mode or dual-link concurrent mode; Step S2: Initialize the operating parameters for the current working mode, including wM-Bus operating parameters and LoRaWAN operating parameters; Step S3: Perform RTC wake-up and verify whether the wM-Bus transmission interval or LoRaWAN network access time has been reached; Step S4: If the collision is reached, execute the anti-collision mechanism sub-process, which includes: S411: Initialize the current channel idle assessment threshold, which includes the RSSI threshold and the SNR threshold; S412: Execute the LBT mechanism, collect the real-time RSSI and SNR of the current working channel, and determine whether RSSI≤RSSI threshold and SNR≥SNR threshold are satisfied at the same time; S413: If the condition is met, the channel is determined to be idle, meter reading data is sent, and the RSSI threshold and SNR threshold are updated based on the difference between the historical detection value and the threshold after the data is sent. S414: If not satisfied, the channel is determined to be busy, and the current backoff count is checked to see if it is less than the preset maximum backoff count; S415: If it is less than the current protocol parameters, calculate the transmission time slot, generate a random multiple backoff duration, and return to step S412; if it is greater than the current protocol parameters, check whether the number of consecutive ignores exceeds the maximum number of ignores. If it does, automatically relax the RSSI threshold and SNR threshold. Step S5: Adjust the working mode adaptively or manually according to the LoRaWAN network access status or wM-Bus communication requirements.
2. The dual-mode adaptive communication method based on WM-Bus and LoRaWAN according to claim 1, characterized in that, Step S5 specifically includes: In wM-Bus priority mode, if LoRaWAN successfully joins the network, switch to LoRaWAN priority mode; In LoRaWAN priority mode, if the number of consecutive network access failures exceeds a preset threshold, the system will switch to wM-Bus priority mode. In dual-link concurrent mode, if LoRaWAN has no network for a long time, it will adaptively switch to wM-Bus priority working mode. If there is no wM-Bus communication requirement, it will adaptively or manually switch to LoRaWAN priority working mode.
3. The dual-mode adaptive communication method based on WM-Bus and LoRaWAN according to claim 1, characterized in that, When the operating mode of step S1 is wM-Bus priority mode, the method includes: S201: Initialize wM-Bus operating parameters, which include wM-Bus daily working hours, transmission interval, random interval value, LoRaWAN network access attempt cycle, and reporting time window; S301: After the RTC wake-up, check whether the wM-Bus transmission interval has been reached. If it has not been reached, check whether the LoRaWAN network access attempt period has been reached. S401: If the wM-Bus transmission interval is reached, execute the wM-Bus anti-collision mechanism sub-process and send wM-Bus data; If the LoRaWAN network access attempt period is reached, execute the LoRaWAN anti-collision mechanism sub-process to report the network access; S501: If LoRaWAN network access is successful, automatically switch to LoRaWAN working mode.
4. The dual-mode adaptive communication method based on WM-Bus and LoRaWAN according to claim 1, characterized in that, When the operating mode of step S1 is LoRaWAN priority mode, the method includes: S202: Initialize LoRaWAN operating parameters, which include the maximum number of consecutive failed network accesses, reporting frequency, network access request interval, random value of interval, and reporting time window; S302: After the RTC wake-up, check whether the network entry reporting time has been reached; S402: If the network access reporting time is reached, randomly generate the next day's reporting time within the reporting time window, execute the LoRaWAN anti-collision mechanism sub-process, and complete the network access request or data reporting; S502: Counts the number of consecutive failed network access days. If it exceeds the maximum number of consecutive failed network access days, it is determined that there is no valid LoRaWAN and automatically switches to wM-Bus working mode.
5. The dual-mode adaptive communication method based on WM-Bus and LoRaWAN according to claim 1, characterized in that, When the working mode of step S1 is dual-link concurrent mode, the method includes: S203: Synchronously initialize wM-Bus operating parameters and LoRaWAN operating parameters; S303: After the RTC wake-up, check whether the wM-Bus transmission interval has been reached. If it has not been reached, check whether the LoRaWAN network access reporting time has been reached. S403: If the wM-Bus transmission interval is reached, execute the wM-Bus anti-collision mechanism sub-process and send wM-Bus data; If the LoRaWAN network access reporting time is reached, execute the LoRaWAN anti-collision mechanism sub-process to report the network access. S503: If LoRaWAN has no network for a long time, it will adaptively switch to wM-Bus priority working mode. If there is no wM-Bus communication requirement, it will adaptively or manually switch to LoRaWAN priority working mode.
6. The dual-mode adaptive communication method based on WM-Bus and LoRaWAN according to claim 3, characterized in that, The wM-Bus anti-collision mechanism sub-process is as follows: S421: Initialize the wM-Bus channel idle assessment threshold, which includes the RSSI threshold and the SNR threshold; S422: Execute the LBT mechanism, collect the real-time RSSI and SNR of the current working channel, and determine whether RSSI≤RSSI threshold and SNR≥SNR threshold are satisfied at the same time; S423: If the condition is met, the channel is determined to be idle, meter reading data is sent, and the RSSI threshold and SNR threshold are updated based on the difference between the historical detection value and the threshold after the data is sent. S424: If not satisfied, the channel is determined to be busy, and the wM-Bus backoff count is checked to see if it is less than the preset maximum backoff count. S425: If less than, calculate the transmission time slot based on the wM-Bus communication frequency and the number of data packet bytes, give back a random multiple of the transmission time slot duration, and return to step S422; if greater than, ignore this transmission, check whether the number of consecutive ignoring exceeds the maximum number of ignoring, and if it exceeds, automatically relax the RSSI threshold and SNR threshold.
7. The dual-mode adaptive communication method based on WM-Bus and LoRaWAN according to claim 4, characterized in that, The LoRaWAN anti-collision mechanism sub-process is as follows: S431: Initialize the LoRaWAN channel idle assessment threshold, which includes the RSSI threshold and the SNR threshold; S432: Execute the LBT mechanism, collect the real-time RSSI and SNR of the current LoRaWAN working channel, and determine whether RSSI≤RSSI threshold and SNR≥SNR threshold are satisfied at the same time; S433: If the condition is met, the channel is determined to be idle, a LoRaWAN network access request or data report is sent, and the RSSI threshold and SNR threshold are updated according to the difference between the historical detection value and the threshold after the data is sent. S434: If not satisfied, the channel is determined to be busy, and the current LoRaWAN backoff count is checked to see if it is less than the preset maximum backoff count; S435: If it is less than, calculate the transmission time slot based on the LoRaWAN communication frequency, data rate and data packet byte count, give back a random multiple of the transmission time slot duration, and return to step S432; if it is greater than, check whether the number of consecutive non-compliance exceeds the maximum number of non-compliances. If it does, automatically relax the RSSI threshold and SNR threshold.
8. The dual-mode adaptive communication method based on WM-Bus and LoRaWAN according to claim 1, characterized in that, The RSSI threshold and SNR threshold are updated based on the difference between historical detection values and the threshold. Specifically, when the difference between the historical detection value and the current threshold exceeds the preset deviation for j consecutive preset times, the current threshold is automatically adjusted so that the difference between the current threshold and the detection value is less than the preset deviation.
9. A smart watch, characterized in that, include: The device includes a metering module, a storage module, and a communication module, wherein the communication module employs the dual-mode adaptive communication method of wM-Bus and LoRaWAN as described in any one of claims 1-8.