A local real-time communication method and system based on a LoRaWAN network
By switching to an independent extended frequency point for channel activity detection and long preamble wake-up during the sleep period of the LoRaWAN network, the problem of terminal devices being unable to communicate in real time under Class A mode is solved, enabling real-time data query and maintenance of terminal devices.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HEXING ELECTRICAL CO LTD
- Filing Date
- 2026-04-08
- Publication Date
- 2026-07-31
AI Technical Summary
In LoRaWAN networks, in Class A mode, terminal devices cannot communicate in real time when the gateway signal is not covered or when they are offline, which makes data reading and device maintenance difficult and prevents users from controlling the terminal devices in real time.
During the sleep period of the LoRaWAN protocol, it switches to an independent extended frequency point for radio frequency configuration and detects channel activity. When no signal is detected, it briefly sleeps and then detects again. When a downlink request is received, it sends a long preamble to wake up the terminal, receives and verifies the data frame, and returns to sleep after completing the instruction.
It enables real-time communication between terminal devices in Class A mode, adds human-computer interaction functions, and allows users to query the operating status and parameters of terminal nodes at any time, thereby improving real-time performance and maintenance efficiency.
Smart Images

Figure CN122496894A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of Internet of Things (IoT) communication technology, and in particular to a local real-time communication method and system based on a LoRaWAN network. Background Technology
[0002] In recent years, with the widespread application of LoRaWAN technology, it has been extensively used in the Internet of Things (IoT) field. However, in scenarios with power consumption requirements (such as battery-powered water meters and gas meters), Class A mode is mostly used. In this mode, two receiving windows are only opened after the terminal device pushes data; communication is not possible at other times. This prevents immediate execution in applications that require switching on and off, and also does not support end users in querying terminal device data at any time.
[0003] LoRaWAN has three modes: Class A, Class B, and Class C. In Class A mode, data can only be transmitted after the terminal device reports the data, resulting in poor real-time performance. In Class B mode, the terminal needs to synchronize time-slot beacons with the gateway. If synchronization fails, the terminal automatically switches to Class A mode. Furthermore, in Class B mode, the time-slot reception window for each ping is 30ms, which is longer than the CAD detection time. Class C operates continuously, resulting in higher power consumption, and is generally not used in battery-powered scenarios.
[0004] However, in existing technologies, when the gateway signal cannot reach the area or the device is offline, the terminal device will remain in Class A mode. In this situation, it is impossible to read data from or control the terminal device, and maintenance is also very difficult. Furthermore, when customers have business needs and require immediate valve opening, the real-time performance of Class A mode is relatively poor, preventing users from reading data from the terminal device in real time. Summary of the Invention
[0005] To address the problems existing in the prior art, embodiments of the present invention provide a local real-time communication method and system based on a LoRaWAN network.
[0006] Firstly, embodiments of this specification provide a local real-time communication method based on a LoRaWAN network, the method comprising: During the sleep period of the target terminal in the LoRaWAN protocol, switch to an independent extended frequency point and complete the radio frequency configuration; Channel activity detection is performed at the independent extended frequency point. When no signal is detected, the system enters a short sleep period and then performs channel activity detection again. This process is repeated until a wake-up signal is detected or the next uplink cycle is reached. When a downlink request is received, the HHU / CIU uses a radio frequency configuration that matches the target terminal to send a long preamble to wake up the target terminal. The duration of the long preamble covers the channel activity detection period, and the long preamble is followed by a downlink data frame. When a wake-up signal is detected, the loop detection mode is exited and the receiving mode is entered. The downlink data frame is received and verified. After the verification is successful, the corresponding instruction is executed and the execution result is fed back to the HHU / CIU. After the command is completed, the independent extended frequency point is turned off, the system returns to the sleep period, and waits for the next uplink cycle.
[0007] Secondly, embodiments of this specification provide a local real-time communication system based on a LoRaWAN network, the system comprising: The switching module is used to switch to an independent extended frequency point and complete the radio frequency configuration when the target terminal enters the sleep period in the LoRaWAN protocol; The detection module is used to perform channel activity detection at the independent extended frequency point. When no signal is detected, it enters a short sleep period and then performs channel activity detection again, repeating the cycle until a wake-up signal is detected or the next uplink cycle is reached. The wake-up module is used to wake up the target terminal by sending a long preamble when a downlink request is received, using a radio frequency configuration that matches the target terminal. The duration of the long preamble covers the channel activity detection period, and the long preamble is followed by a downlink data frame. The execution module is used to exit the loop detection mode and enter the receiving mode when a wake-up signal is detected. It receives and verifies the downlink data frame. After the verification is successful, it executes the corresponding instruction and feeds back the execution result to the HHU / CIU. The return module is used to shut down the independent extended frequency point after the instruction is completed, return to the sleep period, and wait for the next uplink cycle.
[0008] Thirdly, embodiments of this specification provide an electronic device, including a processor and a memory; The processor is connected to the memory; The memory is used to store executable program code; The processor runs a program corresponding to the executable program code stored in the memory to perform the methods described in one or more embodiments.
[0009] Fourthly, embodiments of this specification provide a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the aforementioned local real-time communication method based on a LoRaWAN network.
[0010] In view of the above, the beneficial effects of the technical solutions provided by some embodiments of this specification include at least the following: In one or more embodiments of this specification, when the target terminal enters the sleep period in the LoRaWAN protocol, it switches to an independent extended frequency point and completes RF configuration. Channel activity detection is performed on the independent extended frequency point. If no signal is detected, it enters a short sleep period and then performs channel activity detection again, looping until a wake-up signal is detected or the next uplink cycle is reached. When a downlink request is received, the HHU / CIU uses an RF configuration matched to the target terminal and sends a long preamble to wake up the target terminal. The duration of the long preamble covers the channel activity detection cycle, and the long preamble is followed by a downlink data frame. When a wake-up signal is detected, it exits the loop detection mode and enters the receiving mode to receive and verify the downlink data frame. After successful verification, it executes the corresponding instruction and sends the execution result back to the HHU / CIU. After the instruction is completed, the independent extended frequency point is turned off, and the terminal returns to the sleep period, waiting for the next uplink cycle. By extending communication during Class A sleep, performing channel detection, and receiving data from the CIU / HHU, the technical effect of querying the operating status and parameters of the terminal node at any time is achieved, increasing real-time human-machine interaction functionality, and enabling real-time maintenance of the terminal equipment. Attached Figure Description
[0011] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0012] Figure 1 This is a flowchart illustrating a local real-time communication method based on a LoRaWAN network, as provided in one embodiment of this specification.
[0013] Figure 2 This is a schematic diagram of the structure of a local real-time communication system based on a LoRaWAN network, provided in one embodiment of this specification.
[0014] Figure 3 This is a schematic diagram of the structure of an electronic device provided in one embodiment of this specification. Detailed Implementation
[0015] The subject matter described herein will now be discussed with reference to exemplary embodiments. It should be understood that these embodiments are discussed merely to enable those skilled in the art to better understand and implement the subject matter described herein, and are not intended to limit the scope, applicability, or examples set forth in the claims. The function and arrangement of the elements discussed may be changed without departing from the scope of this specification. Various processes or components may be omitted, substituted, or added as needed in the various examples. For example, the described methods may be performed in a different order than described, and steps may be added, omitted, or combined. Furthermore, features described in some examples may be combined in other examples.
[0016] As used herein, the term "comprising" and its variations are open terms meaning "including but not limited to". The term "based on" means "at least partially based on". The terms "one embodiment" and "an embodiment" mean "at least one embodiment". The term "another embodiment" means "at least one other embodiment". The terms "first", "second", etc., may refer to different or the same objects. Other definitions, whether explicit or implicit, may be included below. Unless explicitly indicated by the context, the definition of a term shall remain consistent throughout the specification.
[0017] Please see Figure 1 , Figure 1 This document presents an overall flowchart of a local real-time communication method based on a LoRaWAN network, as provided in an embodiment of this specification.
[0018] like Figure 1 As shown, this local real-time communication method based on a LoRaWAN network includes at least the following steps: Step S102: When the target terminal enters the sleep period in the LoRaWAN protocol, switch to the independent extended frequency point and complete the radio frequency configuration.
[0019] Specifically, Class A is a working mode for the terminal, meaning that the terminal spends most of its time in a low-power state, only receiving or collecting downlink data and reporting it when reporting data, and then returning to sleep mode. When the target terminal enters Class A mode, it collects the service data that needs to be reported (such as cumulative water consumption, valve status, battery voltage, device fault codes, etc.), and completes the encapsulation of uplink data frames (including MAC header, device address, encrypted payload, MIC checksum, etc.) according to the LoRaWAN standard protocol specifications. It then switches to the standard operating frequency band specified by the LoRaWAN protocol to complete the transmission of the encapsulated uplink data. After the uplink data is transmitted, it sequentially opens two fixed-length downlink receiving windows (Rx1 window and Rx2 window) according to the timing specified by the LoRaWAN Class A protocol to listen for downlink data sent by the gateway.
[0020] After both downlink receive windows of Class A are closed, the terminal shuts down the RF circuitry of the LoRaWAN standard band, completing the native Class A process and entering the sleep period specified by the LoRaWAN protocol before the next uplink. During this stage, Class A mode enters deep sleep, with only the clock and wake-up circuits running. Then, the LoRa RF chip is switched from the LoRaWAN standard band to a dedicated independent frequency for extended communication, and RF configuration is completed according to preset extended communication parameters, including bandwidth, spreading factor, preamble length, and CAD detection parameters. After configuration, the RF chip enters standby mode, ready to start the channel activity detection (CAD) loop.
[0021] Step S104: Perform channel activity detection at the independent extended frequency point. When no signal is detected, enter a short sleep period and then perform channel activity detection again. Repeat this process until a wake-up signal is detected or the next uplink cycle is reached.
[0022] Specifically, the terminal controls the LoRa RF chip to perform channel activity detection, i.e., a single CAD (Channel Activity Detection) process. The RF chip completes a channel scan of the extended communication frequency points in a very short time, detecting whether a signal (the LoRa preamble signal matching the current spreading factor) exists in the channel. If the detection result is that no valid signal is detected: the terminal immediately shuts down the CAD detection circuit of the RF chip and enters a low-power sleep state. The sleep duration can be the preset CAD sampling period minus the duration of this CAD detection. If the detection result is that a valid signal is detected: the terminal immediately exits the CAD detection loop, stops the sleep timer, and prepares to switch to receive mode.
[0023] Furthermore, entering sleep mode immediately when there is no signal minimizes the operating time of the RF chip, reducing power consumption per cycle to a minimum and ensuring the overall power consumption of the extension mechanism is significantly lower than in Class B mode (where the terminal and network management system synchronize at fixed times, with synchronization duration much longer than Class A reporting time). After the terminal's low-power sleep period ends, the LoRa RF chip is controlled to execute the channel activity detection cycle again until the CAD detects a wake-up signal, at which point the downlink data reception process begins. Alternatively, upon reaching the wake-up time of the next Class A uplink cycle, the extension mechanism exits, and the process returns to Class A uplink flow.
[0024] Step S106: When a downlink request is received, the HHU (Handheld Operation Unit) / CIU (User Interface Unit) adopts a radio frequency configuration that matches the target terminal and sends a long preamble to wake up the target terminal. The transmission duration of the long preamble covers the channel activity detection period, and the long preamble is followed by a downlink data frame.
[0025] Specifically, during the CAD detection loop of the terminal, upon receiving a downlink request (which could be a user opening a valve after recharging, on-site maintenance reading equipment, or a user initiating a real-time data query), the HHU / CIU device is operated to output the extended communication parameters of the target terminal, including the extended frequency point, bandwidth, spreading factor, and CAD sampling period. Based on the input parameters, the HHU / CIU automatically completes the RF parameter configuration and preamble calculation before wake-up, ensuring complete consistency between the RF parameters of the HHU / CIU and the target terminal. This establishes the foundation for physical layer communication and avoids signal detection failures due to parameter mismatches. Furthermore, the transmission duration of the long preamble covers the channel activity detection period; that is, the length of the long preamble is precisely calculated using a formula to ensure that the transmission duration completely covers the terminal's CAD sampling period. This guarantees that regardless of when the terminal performs CAD detection during the sampling period, it can scan the transmitting preamble signal, fundamentally solving the downlink synchronization problem during the terminal's sleep period.
[0026] After the HHU / CIU completes parameter configuration, the RF transmission circuit is activated and continuously transmits a preset number of long preamble signals according to the configured parameters. During the transmission of long preambles, the RF transmission circuit remains operational and transmits without interruption until all preset number of preambles have been transmitted. Upon completion of the long preamble transmission, preamble transmission immediately stops without switching RF parameters, and the circuit enters the preparation state for transmitting valid data frames, awaiting the transmission of encapsulated downlink service data frames (such as valve opening commands, real-time data query commands, device parameter configuration commands, etc.).
[0027] Step S108: When a wake-up signal is detected, exit the loop detection mode and enter the receiving mode. Receive and verify the downlink data frame. After successful verification, execute the corresponding instruction and send the execution result back to the HHU / CIU.
[0028] Specifically, after recognizing the wake-up signal (i.e., a valid preamble signal) during CAD detection, the terminal controls the LoRa RF chip to exit CAD detection mode and switch to Rx continuous reception mode. The RF receiving circuit remains on throughout, continuously monitoring signals on the extended communication frequency and receiving valid downlink task data frames sent by the HHU / CIU. The reception mode remains on until a complete data frame is received or the preset reception timeout period is reached. After the received data frame passes legality verification (including address matching, MIC verification, encryption / decryption, etc.), the service instructions in the data frame are parsed, and the corresponding hardware operations and service processing are executed. If the verification fails, the data frame is discarded, and the CAD detection loop is returned.
[0029] After the terminal completes the downlink command processing, it sends a response data frame to the HHU / CIU via the extended communication frequency. After transmission, the RF transmitting circuit is shut down. Additionally, after sending the response data frame, the Rx receive window can be briefly reopened to listen for subsequent downlink commands from the HHU / CIU. If so, the data parsing and execution process, followed by the transmission of the response frame, is repeated. If the extended communication is not deemed complete, the extended communication mechanism is exited.
[0030] Step S110: After the instruction is completed, the independent extended frequency point is turned off, the sleep period is returned, and the system waits for the next uplink cycle.
[0031] Specifically, after the terminal determines that the extended communication is complete, it shuts down the RF transceiver circuit of the extended communication frequency, clears the temporary configuration parameters and cached data used during the communication process, and restores the LoRa RF chip to its initial state before entering the extended mechanism to avoid residual parameters interfering with the subsequent Class A standard process. Then it returns to the sleep period and waits for the timer of the next Class A uplink cycle to end. After waking up, it re-executes the standard Class A uplink process.
[0032] Furthermore, if the preset Class A uplink cycle wake-up time is reached during the execution of extended communication (including the CAD loop, data reception, and command execution phases), the terminal immediately suspends the current extended communication process and prioritizes the execution of the Class A uplink process. Only after the entire Class A uplink process is completed and the terminal enters a sleep period will the unfinished extended communication process resume, or the CAD detection loop be restarted. This ensures that Class A standard services are prioritized, guaranteeing the stability and priority of standard meter reading services and preventing extended communication from interfering with the normal operation of core services.
[0033] This invention provides a local real-time communication method based on a LoRaWAN network. When the target terminal enters the sleep period of the LoRaWAN protocol, it switches to an independent extended frequency point and completes RF configuration. Channel activity detection is performed on the independent extended frequency point. If no signal is detected, it enters a short sleep period and then performs channel activity detection again, looping until a wake-up signal is detected or the next uplink cycle is reached. When a downlink request is received, the HHU / CIU uses an RF configuration matched to the target terminal and sends a long preamble to wake up the target terminal. The duration of the long preamble covers the channel activity detection cycle, and the long preamble is followed by a downlink data frame. When a wake-up signal is detected, the loop detection mode is exited, and the receiving mode is entered. The downlink data frame is received and verified. After successful verification, the corresponding instruction is executed, and the execution result is fed back to the HHU / CIU. After the instruction is completed, the independent extended frequency point is turned off, and the terminal returns to the sleep period, waiting for the next uplink cycle. By extending communication during Class A sleep, performing channel detection, and receiving data from the CIU / HHU, the technical effect of querying the operating status and parameters of the terminal node at any time is achieved, increasing real-time human-machine interaction functionality, and enabling real-time maintenance of the terminal device.
[0034] In another embodiment, the data used in a local real-time communication method based on a LoRaWAN network can be as follows: Example 1: Lorawan terminal equipment uses the CN470 band, with extended communication using a frequency of 500MHz, a bandwidth of 125kHz, a spreading factor of 9, a preamble of 8, and a sampling period of 3 seconds. The calculated CAD detection time is: Tsymbol=2SF / BW= 29 / 125000=0.004096(s), TCAD=Tsymbol+32 / BW=0.004096+32 / 125000=0.004352(s)=4.352ms, The detection time for CAD is only 4.352ms, which is smaller than the 30ms reception window for each ping in Class B mode, and therefore the power consumption is lower than that of Class B.
[0035] For the HHU / CIU to wake up the terminal device, the preamble time needs to cover the sampling period of the terminal device. The preamble transmission formula is as follows: Tpreamble=(nPreamble+4.25)×Tsymbol, The number of preambles needed for 3 seconds can be calculated: nPreamble=3 / 0.004096-4.25=729, When transmitting, the HHU / CIU uses a bandwidth of 125KHz, a spreading factor of 9, and a preamble of 729. When receiving, it uses a bandwidth of 125KHz, a spreading factor of 9, and a preamble of 8 to communicate with the terminal device.
[0036] Example 2: Lorawan terminal equipment uses the EU868 frequency band, with extended communication using a frequency of 866MHz, a bandwidth of 125kHz, a spreading factor of 9, a preamble of 8, and a sampling period of 4 seconds. The calculated CAD detection time is: Tsymbol=2SF / BW=29 / 125000=0.004096(s), TCAD=Tsymbol+32 / BW=0.004096+32 / 125000=0.004352(s)=4.352ms, For the HHU / CIU to wake up the terminal device, the preamble time needs to cover the sampling period of the terminal device. The preamble transmission formula is as follows: Tpreamble=(nPreamble+4.25)×Tsymbol, The number of preambles needed for 4 seconds can be calculated: nPreamble=4 / 0.004096-4.25=973, When transmitting, the HHU / CIU uses a bandwidth of 125KHz, a spreading factor of 9, and a preamble of 973. When receiving, it uses a bandwidth of 125KHz, a spreading factor of 9, and a preamble of 8 to communicate with the terminal device.
[0037] Example 3: Lorawan terminal equipment uses the AU915 band, with extended communication using a frequency of 920MHz, a bandwidth of 125kHz, a spreading factor of 9, a preamble of 8, and a sampling period of 5 seconds. The calculated CAD detection time is: Tsymbol=2SF / BW=29 / 125000=0.004096(s), TCAD=Tsymbol+32 / BW=0.004096+32 / 125000=0.004352(s)=4.352ms, For the HHU / CIU to wake up the terminal device, the preamble time needs to cover the sampling period of the terminal device. The preamble transmission formula is as follows: Tpreamble=(nPreamble+4.25)×Tsymbol, It can calculate the number of preambles needed for 5 seconds: nPreamble=5 / 0.004096-4.25=1217, When transmitting, the HHU / CIU uses a bandwidth of 125KHz, a spreading factor of 9, and a preamble of 1217. When receiving, it uses a bandwidth of 125KHz, a spreading factor of 9, and a preamble of 8 to communicate with the terminal device.
[0038] Please refer to the following. Figure 2 , Figure 2 This diagram illustrates the structure of a local real-time communication system based on a LoRaWAN network, as provided in an embodiment of this specification. It should be noted that... Figure 2 The local real-time communication system based on the LoRaWAN network shown is used to execute this specification. Figure 1 The methods shown in the embodiments are illustrated for ease of explanation, showing only the parts related to the embodiments of this specification. For specific technical details not disclosed, please refer to this specification. Figure 1 The example shown.
[0039] like Figure 2 As shown, this local real-time communication system based on the LoRaWAN network may include at least: The switching module S202 is used to switch to an independent extended frequency point and complete the radio frequency configuration when the target terminal enters the sleep period in the LoRaWAN protocol. The detection module S204 is used to perform channel activity detection at the independent extended frequency point. When no signal is detected, it enters a short sleep period and then performs channel activity detection again, repeating the cycle until a wake-up signal is detected or the next uplink cycle is reached. The wake-up module S206 is used to wake up the target terminal by sending a long preamble when a downlink request is received, using a radio frequency configuration that matches the target terminal. The transmission duration of the long preamble covers the channel activity detection period, and the long preamble is followed by a downlink data frame. The execution module S208 is used to exit the loop detection mode and enter the receiving mode when a wake-up signal is detected, receive and verify the downlink data frame, execute the corresponding instruction after the verification is successful, and feed back the execution result to the HHU / CIU. The return module S210 is used to shut down the independent extended frequency point after the instruction is completed, return to the sleep period, and wait for the next uplink cycle.
[0040] In another embodiment, a local real-time communication system based on a LoRaWAN network further includes: The sleep module is used to allow the target terminal to enter the protocol's sleep period after completing the standard process of sending Class A uplink data and receiving calls in the native two downlink receiving windows of the LoRaWAN network.
[0041] In another embodiment, a local real-time communication system based on a LoRaWAN network further includes: The downlink receive window module is used to stop channel activity detection and execute the standard procedure of Class A uplink data transmission and native two downlink receive window answering when the next uplink cycle is reached during the channel activity detection process.
[0042] Those skilled in the art will clearly understand that the technical solutions of the embodiments in this specification can be implemented by means of software and / or hardware. In this specification, "unit" and "module" refer to software and / or hardware capable of independently performing or cooperating with other components to perform a specific function. The hardware may be, for example, a Field-Programmable Gate Array (FPGA), an Integrated Circuit (IC), etc.
[0043] Each processing unit and / or module in the embodiments of this specification can be implemented by an analog circuit that implements the functions described in the embodiments of this specification, or by software that executes the functions described in the embodiments of this specification.
[0044] See Figure 3 It shows a schematic diagram of the structure of an electronic device according to an embodiment of this specification, which can be used to implement... Figure 1 The method in the illustrated embodiment. (As shown) Figure 3 As shown, the electronic device 300 may include: at least one central processing unit 301, at least one network interface 304, user interface 303, memory 305, and at least one communication bus 302.
[0045] The communication bus 302 is used to enable communication between these components.
[0046] The user interface 303 may include a display screen and a camera. Optionally, the user interface 303 may also include a standard wired interface and a wireless interface.
[0047] The network interface 304 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface).
[0048] The processor 301 may include one or more processing cores. The processor 301 connects to various parts within the electronic device 300 using various interfaces and lines, and performs various functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in the memory 305, and by calling data stored in the memory 305. Optionally, the processor 301 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor 301 may integrate one or a combination of several of the following: a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), and a modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the content required for display on the screen; and the modem handles wireless communication. It is understood that the modem may also not be integrated into the processor 301 and may be implemented as a separate chip.
[0049] The memory 305 may include random access memory (RAM) or read-only memory. Optionally, the memory 305 may include a non-transitory computer-readable storage medium. The memory 305 can be used to store instructions, programs, code, code sets, or instruction sets. The memory 305 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as touch function, sound playback function, image playback function, etc.), instructions for implementing the above-described method embodiments, etc.; the data storage area may store data involved in the above-described method embodiments, etc. Optionally, the memory 305 may also be at least one storage system located remotely from the aforementioned processor 301. Figure 3 As shown, the memory 305, which serves as a computer storage medium, may include an operating system, a network communication module, a user interface module, and program instructions.
[0050] exist Figure 3 In the illustrated electronic device 300, the user interface 303 is mainly used to provide an input interface for the user and to acquire user input data; while the processor 301 can be used to call the image-based interactive application stored in the memory 305 and specifically perform the following operations: During the sleep period of the target terminal in the LoRaWAN protocol, switch to an independent extended frequency point and complete the radio frequency configuration; Channel activity detection is performed at the independent extended frequency point. When no signal is detected, the system enters a short sleep period and then performs channel activity detection again. This process is repeated until a wake-up signal is detected or the next uplink cycle is reached. When a downlink request is received, the HHU / CIU uses a radio frequency configuration that matches the target terminal to send a long preamble to wake up the target terminal. The duration of the long preamble covers the channel activity detection period, and the long preamble is followed by a downlink data frame. When a wake-up signal is detected, the loop detection mode is exited and the receiving mode is entered. The downlink data frame is received and verified. After the verification is successful, the corresponding instruction is executed and the execution result is fed back to the HHU / CIU. After the command is completed, the independent extended frequency point is turned off, the system returns to the sleep period, and waits for the next uplink cycle.
[0051] As an optional embodiment of this specification, the sleep period during which the target terminal enters the LoRaWAN protocol includes: After the target terminal completes the standard process of sending Class A uplink data and receiving calls in the native two downlink receiving windows of the LoRaWAN network, it enters the protocol's sleep period.
[0052] As an optional embodiment of this specification, the method further includes: When the channel activity detection process reaches the next uplink cycle, the channel activity detection is stopped, and the standard procedure of Class A uplink data transmission and native two downlink receive windows is executed.
[0053] As an optional embodiment of this specification, the step of re-performing channel activity detection after entering a brief sleep period includes: When the detection result is that no valid signal is detected, the CAD detection circuit of the RF chip is turned off and enters a low-power sleep state; When the detection result indicates that a valid signal has been detected, the detection loop is exited, the sleep timer is stopped, and the receiver mode is switched.
[0054] As an optional embodiment of this specification, the step of sending a long preamble to wake up the target terminal includes: Based on the aforementioned radio frequency configuration, a long preamble signal is transmitted cyclically, and after the long preamble signal is transmitted, the encapsulated downlink service data frame is transmitted.
[0055] This specification also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described method. The computer-readable storage medium may include, but is not limited to, any type of disk, including floppy disks, optical disks, DVDs, CD-ROMs, microdrives, as well as magneto-optical disks, ROMs, RAMs, EPROMs, EEPROMs, DRAMs, VRAMs, flash memory devices, magnetic cards or optical cards, nanosystems (including molecular memory ICs), or any type of medium or device suitable for storing instructions and / or data.
[0056] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this specification is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this specification. Furthermore, those skilled in the art should also understand that the embodiments described in this specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this specification.
[0057] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0058] In the embodiments provided in this specification, it should be understood that the disclosed system can be implemented in other ways. For example, the system embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some service interface; the indirect coupling or communication connection between systems or units may be electrical or other forms.
[0059] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0060] Furthermore, the functional units in the various embodiments of this specification can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0061] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage device (CMD). Based on this understanding, the technical solution of this specification, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this specification. The aforementioned memory includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0062] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, which may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc.
[0063] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.
Claims
1. A local real-time communication method based on a LoRaWAN network, the method comprising: During the sleep period of the target terminal in the LoRaWAN protocol, switch to an independent extended frequency point and complete the radio frequency configuration; Channel activity detection is performed at the independent extended frequency point. When no signal is detected, the system enters a short sleep period and then performs channel activity detection again. This process is repeated until a wake-up signal is detected or the next uplink cycle is reached. When a downlink request is received, the HHU / CIU uses a radio frequency configuration that matches the target terminal to send a long preamble to wake up the target terminal. The duration of the long preamble covers the channel activity detection period, and the long preamble is followed by a downlink data frame. When a wake-up signal is detected, the loop detection mode is exited and the receiving mode is entered. The downlink data frame is received and verified. After the verification is successful, the corresponding instruction is executed and the execution result is fed back to the HHU / CIU. After the command is completed, the independent extended frequency point is turned off, the system returns to the sleep period, and waits for the next uplink cycle.
2. The method according to claim 1, characterized in that, The sleep period during which the target terminal enters the LoRaWAN protocol includes: After the target terminal completes the standard process of sending Class A uplink data and receiving calls in the native two downlink receiving windows of the LoRaWAN network, it enters the protocol's sleep period.
3. The method according to claim 2, characterized in that, The method further includes: When the channel activity detection process reaches the next uplink cycle, the channel activity detection stops, and the standard procedure of Class A uplink data transmission and native two downlink receive windows is executed.
4. The method according to claim 1, characterized in that, The process of re-performing channel activity detection after entering a brief sleep period includes: When the detection result is that no valid signal is detected, the CAD detection circuit of the RF chip is turned off and enters a low-power sleep state; When the detection result indicates that a valid signal has been detected, the detection loop is exited, the sleep timer is stopped, and the receiver mode is switched.
5. The method according to claim 1, characterized in that, The step of sending a long preamble to wake up the target terminal includes: Based on the aforementioned radio frequency configuration, a long preamble signal is transmitted cyclically, and after the long preamble signal is transmitted, the encapsulated downlink service data frame is transmitted.
6. A local real-time communication system based on a LoRaWAN network, characterized in that, The system includes; The switching module is used to switch to an independent extended frequency point and complete the radio frequency configuration when the target terminal enters the sleep period of the LoRaWAN protocol; The detection module is used to perform channel activity detection at the independent extended frequency point. When no signal is detected, it enters a short sleep period and then performs channel activity detection again, repeating the cycle until a wake-up signal is detected or the next uplink cycle is reached. The wake-up module is used to wake up the target terminal by sending a long preamble when a downlink request is received, using a radio frequency configuration that matches the target terminal. The duration of the long preamble covers the channel activity detection period, and the long preamble is followed by a downlink data frame. The execution module is used to exit the loop detection mode and enter the receiving mode when a wake-up signal is detected. It receives and verifies the downlink data frame. After the verification is successful, it executes the corresponding instruction and feeds back the execution result to the HHU / CIU. The return module is used to shut down the independent extended frequency point after the instruction is completed, return to the sleep period, and wait for the next uplink cycle.
7. The method according to claim 6, characterized in that, The system also includes: The sleep module is used to allow the target terminal to enter the protocol's sleep period after completing the standard process of sending Class A uplink data and receiving calls in the native two downlink receiving windows of the LoRaWAN network.
8. The method according to claim 7, characterized in that, The system also includes: The downlink receive window module is used to stop channel activity detection and execute the standard procedure of Class A uplink data transmission and native two downlink receive windows when the next uplink cycle is reached during the channel activity detection process.
9. An electronic device, comprising a processor and a memory; The processor is connected to the memory; The memory is used to store executable program code; The processor runs a program corresponding to the executable program code stored in the memory to perform the method as described in any one of claims 1-6.
10. A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method as described in any one of claims 1-6.