LoRa data transmission method, device, equipment and storage medium
By setting the delay time for the node in ClassB mode of LoRaWAN, the opening time of its first reception window is greater than the time spent on downlink packet transmission, the problem of downlink frame disorder is solved, ensuring the correctness of the frame number, and avoiding packet loss and MIC verification failure.
Patent Information
- Application Number
- CN201910505303.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-06-12
- Publication Date
- 2025-04-04
- Estimated Expiration
- 2039-06-12
AI Technical Summary
In the ClassB mode of LoRaWAN, downlink frames may have out-of-order problems, resulting in errors in deduplication logic on the device side, resulting in packet loss or wrong packets, and even inconsistent downlink frame counts between the device side and the network server, resulting in failure of MIC verification.
By calculating the time spent between sending downstream messages from the network server to receiving downstream messages from the node, it is determined that the delay time between the node sending upstream messages and opening the first reception window, and ensure that the delay time is greater than the time spent. Then, a delay time is sent to the node, so that the node can set the first reception window according to the delay time. When the time interval between the time when the node wants to open the ClassB reception window and the current time is greater than the time spent, the downlink message is sent to the downlink base station after a predetermined time is delayed so that the downlink message is sent to the node by the downlink base station.
By setting the delay time of the node's first reception window is greater than the time spent in downlink packet transmission, the problem of out-of-order downlink frames in ClassB mode is solved, ensuring the correctness of frame numbers received by the device, and avoiding packet loss, wrong packets and MIC verification failures.
Smart Images

Figure CN112087399B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of data transmission, and in particular to a LoRa data transmission method, device, equipment and storage medium. Background Art
[0002] LoRaWAN is a low-power wide-area IoT solution, a low-power wide-area network (LPWAN) standard based on an open source MAC layer protocol launched by the LoRa Alliance. This technology can provide a low-power, scalable, long-range wireless network for battery-powered wireless devices.
[0003] In LoRaWAN, the working modes of terminal devices are divided into three types: ClassA, ClassB and ClassC. If the network server (NS) needs to send data to a device (i.e., a node) working in ClassB mode, it needs to calculate the opening time of the device window first, and then send the data packet to the base station. The data packet will first queue up at the base station, and after the specified time, the base station will send the data packet to the device. If the time interval between the NS sending the data packet to the base station and the actual sending of the data packet by the base station is too long, the device may upload data and receive the next frame of data at Rx1 during this period, which may cause the sequence numbers of the two frames of data received by the device to be disordered, that is, the downlink frames are out of order.
[0004] like Figure 1 As shown, assuming that NS starts to send downlink data packets at time t1, the frame number fcnt of the downlink data packets is x, and the node (Node) receives the downlink data packets at time t4. If at time t2 between t1 and t4, the node starts uplink data, and at time t3 between t1 and t4, the node receives downlink data for the uplink data (whose frame number is x+1), then the frame number of the data packet received first (at time t3) will be greater than the frame number of the data packet received later (at time t4), resulting in a disorder problem.
[0005] Downlink frame disorder can cause deduplication logic errors on the device side, resulting in packet loss or packet errors. More seriously, it may cause page turning logic errors on the device side, resulting in inconsistent downlink frame counts between the device side and NS, thereby causing subsequent downlink data packet MIC check failure.
[0006] Therefore, a data transmission solution is needed to solve the above-mentioned disorder problem. Summary of the invention
[0007] A technical problem to be solved by the present disclosure is to provide a LoRa data transmission solution to solve the disorder problem that may occur in Class B mode.
[0008] According to a first aspect of the present disclosure, a LoRa data transmission method is proposed, including: based on the time consumed between a network server starting to send a downlink message and a node receiving the downlink message, determining a delay time from when the node completes sending an uplink message to when a first receiving window is opened, the delay time being greater than the time consumed, wherein the first receiving window is a receiving window opened for the first time after the node completes sending an uplink message; sending the delay time to the node so that the node sets the first receiving window according to the delay time; when the working mode of the node is Class B mode and a downlink message needs to be sent to the node, determining whether the time interval between the time when the node is about to open the Class B receiving window and the current time is greater than the time consumed; when the time interval is greater than the time consumed, sending the downlink message to a downlink base station after a predetermined delay, so that the downlink base station sends the downlink message to the node.
[0009] Optionally, Rxdelay≥Txdelay+T1, wherein Rxdelay is the delay time, Txdelay is the time consumption, and T1 is a first duration parameter, which is used to characterize the time required for the node to complete the reception from receiving the downlink message.
[0010] Optionally, T4=T3-Txdelay, wherein T4 is a predetermined duration, T3 is a time interval, and Txdelay is the time consumed.
[0011] Optionally, delay+T5≤Txdelay≤delay+T2, wherein delay is the link transmission delay between the network server and the base station, Txdelay is the time consumption, T2 is the second duration parameter, and T5 is the third duration parameter.
[0012] Optionally, the step of determining whether the time interval between the time when the node is about to open the ClassB receiving window and the current time is greater than the time consumption includes: determining whether the time interval between the time when the node is about to open the ClassB receiving window and the current time is greater than delay+T5; and / or when the time interval is greater than delay+T5, further determining whether the time interval is greater than delay+T2.
[0013] Optionally, when delay+T5≤T3≤delay+T2, the downlink message is sent to the downlink base station, so that the downlink base station sends the downlink message to the node; or when T3>delay+T2, the downlink message is sent to the downlink base station after a predetermined delay, so that the downlink base station sends the downlink message to the node, wherein T4=T3-delay-T2, T4 is the predetermined duration, and T3 is the time interval.
[0014] Optionally, the method further includes: when the time interval is less than the time consumption, determining whether the time interval between the time when the node will open the ClassB receiving window next time and the current time is greater than the time consumption.
[0015] According to the second aspect of the present disclosure, a LoRa data transmission method is also proposed, including: based on the time consumed between the network server starting to send a downlink message and the node receiving the downlink message, determining the delay time from the node sending the uplink message to opening the first receiving window, the delay time is greater than the time consumed, wherein the first receiving window is the receiving window opened for the first time after the node sends the uplink message; sending the delay time to the node so that the node sets the first receiving window according to the delay time.
[0016] According to the third aspect of the present disclosure, a LoRa data transmission method is also proposed, including: in response to receiving a network access request sent by a node through a base station, calculating the time taken for the network server to start sending a downlink message to the node receiving the downlink message; based on the time taken, determining the delay time from the node completing sending the uplink message to opening the first receiving window, the delay time being greater than the time taken; and sending the delay time to the node so that the node sets the first receiving window according to the delay time.
[0017] According to the fourth aspect of the present disclosure, a LoRa data transmission method is also proposed, including: when the working mode of the node is ClassB mode and a downlink message needs to be sent to the node, judging whether the time interval between the time when the node is about to open the ClassB receiving window and the current time is greater than the time consumption, and the time consumption is the time between the network server starting to send the downlink message and the node receiving the downlink message; when the time interval is greater than the time consumption, the downlink message is sent to the downlink base station after a predetermined delay, so that the downlink base station sends the downlink message to the node.
[0018] According to the fifth aspect of the present disclosure, a LoRa data transmission method is also proposed, including: receiving an instruction sent by a network server; setting a delay time from sending an uplink message to opening a first receiving window according to a duration parameter in the instruction, wherein the duration parameter is determined based on the time taken between the network server starting to send a downlink message and the node receiving the downlink message, the duration represented by the duration parameter is greater than the time taken, and the first receiving window is the receiving window opened for the first time after the node sends the uplink message.
[0019] According to the sixth aspect of the present disclosure, a LoRa data transmission device is also proposed, including: a determination module, which is used to determine the delay time from the node sending the uplink message to opening the first receiving window based on the time consumed between the network server starting to send the downlink message and the node receiving the downlink message, and the delay time is greater than the time consumed, wherein the first receiving window is the receiving window opened for the first time after the node sends the uplink message; a sending module, which is used to send the delay time to the node so that the node sets the first receiving window according to the delay time; a judgment module, which is used to judge whether the time interval between the time when the node is about to open the ClassB receiving window and the current time is greater than the time consumed when the working mode of the node is ClassB mode and a downlink message needs to be sent to the node. When the judgment module determines that the time interval is greater than the time consumed, the sending module is also used to send the downlink message to the downlink base station after a predetermined delay, so that the downlink base station sends the downlink message to the node.
[0020] According to the seventh aspect of the present disclosure, a LoRa data transmission device is also proposed, including: a determination module, used to determine the delay time from the node sending the uplink message to opening the first receiving window based on the time consumed between the network server starting to send the downlink message and the node receiving the downlink message, the delay time is greater than the time consumed, wherein the first receiving window is the receiving window opened for the first time after the node sends the uplink message; a sending module, used to send the delay time to the node, so that the node sets the first receiving window according to the delay time.
[0021] According to the eighth aspect of the present disclosure, a LoRa data transmission device is also proposed, including: a receiving module, used to receive a network access request sent by a node through a base station; a calculating module, used to calculate the time taken between the network server starting to send a downlink message and the node receiving the downlink message in response to the receiving module receiving the network access request; a determining module, used to determine the delay time from the node completing the sending of the uplink message to the opening of the first receiving window based on the time taken, the delay time being greater than the time taken; and a sending module, used to send the delay time to the node, so that the node sets the first receiving window according to the delay time.
[0022] According to the ninth aspect of the present disclosure, a LoRa data transmission device is also proposed, including: a judgment module, used to judge whether the time interval between the time when the node is about to open the ClassB receiving window and the current time is greater than the time consumption when the working mode of the node is ClassB mode and a downlink message needs to be sent to the node, and the time consumption is the time between the network server starting to send the downlink message and the node receiving the downlink message; a sending module, used to send the downlink message to the downlink base station after a delay of a predetermined time when the judgment module determines that the time interval is greater than the time consumption, so that the downlink base station can send the downlink message to the node.
[0023] According to the tenth aspect of the present disclosure, a LoRa data transmission device is also proposed, including: a receiving module for receiving an instruction sent by a network server; a setting module for setting the delay time from sending an uplink message to opening a first receiving window according to a duration parameter in the instruction, wherein the duration parameter is determined based on the time taken between the network server starting to send a downlink message and the node receiving the downlink message, the duration represented by the duration parameter is greater than the time taken, and the first receiving window is the receiving window opened for the first time after the node sends the uplink message.
[0024] According to the eleventh aspect of the present disclosure, a computing device is also proposed, comprising: a processor; and a memory on which executable code is stored, and when the executable code is executed by the processor, the processor executes the method described in any one of the first to fifth aspects of the present disclosure.
[0025] According to the twelfth aspect of the present disclosure, a non-temporary machine-readable storage medium is also proposed, on which executable code is stored. When the executable code is executed by a processor of an electronic device, the processor executes the method described in any one of the first to fifth aspects of the present disclosure.
[0026] The present disclosure can solve the disorder problem that may exist in Class B mode by setting the delay time Rxdelay from the node sending the uplink message to opening the first receiving window, so that Rxdelay is greater than the time interval between the NS starting to send the downlink message and the node receiving the downlink message. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] The above and other objects, features and advantages of the present disclosure will become more apparent through a more detailed description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, wherein like reference numerals generally represent like components in the exemplary embodiments of the present disclosure.
[0028] Figure 1 A schematic diagram showing the phenomenon of downlink frame disorder in Class B mode.
[0029] Figure 2 A schematic diagram of the implementation principle of the LoRa data transmission solution disclosed in the present invention is shown.
[0030] Figure 3 A schematic block diagram showing the structure of a LoRa data transmission device according to an embodiment of the present disclosure is shown.
[0031] Figure 4 A schematic block diagram showing the structure of a LoRa data transmission device according to another embodiment of the present disclosure is shown.
[0032] Figure 5A schematic block diagram showing the structure of a LoRa data transmission device according to another embodiment of the present disclosure is shown.
[0033] Figure 6 A schematic block diagram showing the structure of a computing device according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0034] The preferred embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the preferred embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided to make the present disclosure more thorough and complete, and to fully convey the scope of the present disclosure to those skilled in the art.
[0035]
Solution Overview
[0036] The present disclosure proposes that the above disorder problem can be solved by setting the delay time Rxdelay from when a node (Node) finishes sending an uplink message to when a first receiving window is opened.
[0037] The first receiving window refers to the receiving window opened for the first time after the node sends the uplink message, that is, Rx1. According to the LoRaWAN protocol, the node will also open the second receiving window Rx2 after sending the uplink message. For example, if the first receiving window Rx1 does not receive the downlink message sent by the NS for the uplink message, the second receiving window Rx2 will be opened after the first receiving window Rx1. The present disclosure mainly sets the delay time of Rx1. For Rx2, please refer to the prior art. For example, the delay time of Rx2 can be adaptively modified according to the delay time of Rx1 set by the present disclosure, which will not be elaborated in the present disclosure.
[0038] Figure 2 A schematic diagram of the implementation principle of the LoRa data transmission solution disclosed in the present invention is shown.
[0039] In the present disclosure, Txdelay may be used to represent the time taken between a network server starting to send a downlink message and a node receiving the downlink message.
[0040] If Rxdelay>Txdelay, it can be guaranteed that there will be no disorder phenomenon that the frame number received earlier by the node is larger than the frame number received later.
[0041] Furthermore, in order to ensure that the node opens the Rx1 receiving window after receiving the downlink message sent by the NS, the time required for the node to complete the reception from receiving the downlink message can also be considered when setting Rxdelay. In other words, Rxdelay can be set to Rxdelay≥Txdelay+T1, where T1 is a time parameter (for ease of distinction, it can be called the first time parameter), and T1 is used to ensure that the node opens the Rx1 receiving window after receiving the downlink message sent by the NS, so T1 can be used to characterize the time required for the node to complete the reception from receiving the downlink message.
[0042] If T1 is too small, the Rx1 receiving window may fail to open, resulting in data frame loss. Figure 2 As shown, at time t3 the node starts to receive the downlink message forwarded by the base station. If T1 is too small and the node has not finished receiving the downlink message at time t4, the window opening at time t4 will fail, resulting in the loss of the data frame at that time.
[0043] In the present disclosure, T1 can be set according to actual conditions. For example, the time required for a node to complete reception of a downlink message can be counted or estimated, and T1 can be set accordingly. For another example, T1 can also be set to a fixed value, such as 1s, based on experience.
[0044] As mentioned above, Rxdelay>Txdelay. Therefore, after the Rxdelay of the node is set, when the NS sends a downlink message to the node working in ClassB mode through the base station (Gateway), it can control the time interval T3 between the time when the NS starts sending the downlink message and the targeted ClassB receiving window, so that the time interval T3 is equal to Txdelay, thereby ensuring that the out-of-order problem of the frame sequence number received by the node first being greater than the frame sequence number received later will not occur.
[0045] In summary, the data transmission scheme disclosed in the present invention mainly includes two parts. The first part is the setting of Rxdelay at the node end, and the second part is the determination of the sending timing of the downlink message when the NS sends the downlink message to the node working in Class B mode. The following describes these two parts in detail.
[0046] [Node-side Rxdelay settings]
[0047] As described above, Rxdelay can be set to be greater than Txdelay. Optionally, Rxdelay≥Txdelay+T1. For T1, please refer to the above description, which will not be repeated here. The following mainly illustrates the calculation process of Txdelay.
[0048] Generally speaking, Txdelay is equal to the sum of the link transmission delay between the network server and the base station (which can be expressed as delay) and the transmission delay between the base station and the node. In practical applications, the transmission delay between the base station and the node is small and can be ignored, so Txdelay can be determined based on the link transmission delay delay between the network server and the base station.
[0049] The base station mentioned here may refer to a downlink base station suitable for sending downlink messages to the node, for example, it may be a downlink base station determined by the NS for sending downlink messages to the node, or it may be a base station that has previously served as a downlink base station to send downlink messages to the node.
[0050] In addition, the base station mentioned here may also refer to the base station through which the node previously sent the uplink message. For example, one or more base stations can be selected from all the base stations through which the node sent the uplink message, and for each selected base station, the link transmission delay between the base station and the NS is calculated.
[0051] When calculating the link transmission delays between multiple base stations and NS, the calculated multiple link transmission delays can be averaged, and the result obtained after the processing can be used as the final delay to participate in determining Txdelay.
[0052] The link transmission delay can characterize the link transmission time between the base station and the NS. For example, the link transmission time between the base station and the NS determined most recently can be used as the link transmission delay. In addition, the link transmission delay can also be obtained by statistically analyzing one or more link transmission times between the base station and the NS determined within a predetermined time. For example, it can be determined by averaging, weighted averaging, tp99, tp999, and other methods.
[0053] As an example, the link transmission delay can be obtained by processing the link transmission time between the base station and the NS determined most recently based on the sliding average algorithm. The calculation formula is as follows: delta′(t)=alpha*delta+(1-alpha)*delta′(t-1), where alpha is a coefficient with a value range of 0 to 1, delta is the link transmission time between the base station and the NS determined most recently, delta′(t) is the predicted value of the currently calculated link transmission time, and delta′(t-1) is the predicted value of the link transmission time calculated last time.
[0054] In the present disclosure, Txdelay can be a certain value or a range of values. For example, Txdelay can be defined as Txdelay=delay, or Txdelay=delay+t, where t is a duration parameter, and the value of t can be set according to actual conditions, for example, t can be 200ms. For another example, considering that there is a certain jitter in the link transmission quality between the base station and the network server, and there is more or less a certain delay between the base station and the node, Txdelay can also be a range of values. Optionally, the value range of Txdelay can be defined as [delay+T5, delay+T2], where T5 and T2 are both duration parameters. For ease of distinction, T2 can be called the second duration parameter, and T5 can be called the third duration parameter. The values of T5 and T2 can be set according to actual conditions, for example, T5 can be 0, and T2 can be 200ms.
[0055] In the present disclosure, the NS can maintain the link transmission delay from the NS to each base station, and the NS can calculate a suitable Rxdelay for the node based on the above method. The calculation method of Rxdelay can refer to the above related description, which will not be repeated here.
[0056] Optionally, when finally determining Rxdelay, you can also refer to the LoRaWAN protocol specification applicable to the node. For example, the existing LoRaWAN protocol stipulates that Rxdelay can only be between 1 and 15 seconds and must be an integer, so the final delay time Rxdelay′=ceil(min(15,max(1,Rxdelay))). Among them, t is the calculated time. The meaning of this formula is that if the calculated Rxdelay is less than 1s, then Rxdelay=1s, if Rxdelay is greater than 1s and less than 15s, then Rxdelay′=ceil(Rxdelay), if Rxdelay is greater than 15s, then Rxdelay′=15s. Among them, ceil(Rxdelay) means rounding up Rxdelay.
[0057] After obtaining Rxdelay, NS can send Rxdelay to the node so that the node sets Rx1 according to Rxdelay.
[0058] As an example, when a node joins the network, a suitable Rxdelay can be set for the node, and the determined Rxdelay can be sent to the node so that the node sets Rx1 according to Rxdelay, thereby providing an implementation basis for solving the disorder problem that may exist in Class B mode. For example, in response to receiving a network access request sent by a node through a base station, the time taken between the network server starting to send a downlink message and the node receiving the downlink message can be calculated, and based on the time taken, the delay time from the node sending the uplink message to opening the first receiving window is determined, and the delay time is sent to the node so that the node sets the first receiving window according to the delay time.
[0059] In addition, a default Rxdelay can be uniformly set for the nodes according to the existing solution, and the Rxdelay of the nodes can be adjusted during data transmission between the nodes and the network server to solve the disorder problem that may exist in the Class B mode.
[0060] Optionally, after setting Rxdelay for a node, if the link transmission delay between the base station and the NS fluctuates greatly (such as greater than a preset threshold), Rxdelay can be recalculated, and the Rxdelay of the node can be adjusted by sending a MAC instruction to the node.
[0061] For a node, it can receive instructions sent by a network server and set the Rxdelay of Rx1 according to the duration parameter in the instruction. The duration parameter mentioned here is determined by the time taken for the NS to start sending a downlink message based on the network server to the node receiving the downlink message. For the specific calculation process of the duration parameter, please refer to the relevant description above, which will not be repeated here.
[0062] [Sending downlink messages]
[0063] When the NS needs to send a downlink message to a node working in ClassB mode, it can first calculate the opening time of the ClassB receiving window closest to the current time, and then compare the time interval T3 between the opening time and the current time with the Txdelay referenced when setting the Rxdelay for the node.
[0064] If T3<Txdelay, then if a downlink message is sent for the ClassB receiving window, the downlink message will miss the ClassB receiving window of the node when it arrives at the node. Therefore, if T3<Txdelay, it means that the ClassB receiving window closest to the current one is unavailable, and you can postpone one window and recalculate whether the time interval T3 between the opening time of the next ClassB receiving window and the current time is greater than Txdelay.
[0065] For the ClassB receiving window whose time interval T3 between the found opening time and the current time is greater than Txdelay, the downlink message can be sent to the downlink base station after a predetermined delay, so that the downlink base station can send the downlink message to the node. Among them, the predetermined time length T4 = T3-Txdelay. The reason for delaying the predetermined time length here is to make the time interval between the time of sending the downlink message and the ClassB receiving window equal to the Txdelay referenced when setting Rxdelay for the node before, so as to ensure that there will be no disorder problem that the frame sequence number received by the node first is greater than the frame sequence number received later.
[0066] Taking Txdelay as a value range, and the value range of Txdelay is [delay+T5, delay+T2] as an example, it can be determined whether the time interval T3 between the time when the node is about to open the ClassB receiving window and the current time is greater than delay+T5. When T3<delay+T5, it can continue to be determined whether the time interval between the time when the node is about to open the ClassB receiving window next time and the current time is greater than delay+T5.
[0067] In the case of T3>delay+T5, it can be further determined whether T3 is greater than delay+T2.
[0068] In the case that T3≤delay+T2, the downlink message may be sent to the downlink base station, so that the downlink base station sends the downlink message to the node.
[0069] In the case of T3>delay+T2, the downlink message may be sent to the downlink base station after a predetermined delay, so that the downlink base station sends the downlink message to the node. Wherein, the predetermined time length T4=T3-delay-T2.
[0070]
Data transmission device
[0071] Figures 3 to 5 A schematic block diagram showing the structure of a LoRa data transmission device according to different embodiments of the present disclosure is shown.
[0072] The functional modules of the LoRa data transmission device can be implemented by hardware, software, or a combination of hardware and software that implements the principles of the present invention. It can be understood by those skilled in the art that Figures 3 to 5 The functional modules described in the various figures can be combined or divided into sub-modules to implement the principles of the above invention. Therefore, the description herein can support any possible combination, division, or further limitation of the functional modules described herein.
[0073] The following is a brief description of the functional modules that the LoRa data transmission device can have and the operations that each functional module can perform. For the details involved, please refer to the above description and will not be repeated here.
[0074] Figure 3 The LoRa data transmission device 300 shown can be set at the network server end. Figure 3 The LoRa data transmission device 300 includes a determination module 310 and a sending module 320 .
[0075] The determination module 310 is used to determine the delay time from when the node completes sending the uplink message to when the first receiving window is opened based on the time taken for the network server to start sending the downlink message to when the node receives the downlink message, and the delay time is greater than the time taken, wherein the first receiving window is the receiving window opened for the first time after the node completes sending the uplink message.
[0076] For the time consumption Txdelay and the delay time Rxdelay, please refer to the relevant description above and will not be repeated here.
[0077] The sending module 320 is used to send the delay time to the node, so that the node sets the first receiving window according to the delay time.
[0078] Optionally, the LoRa data transmission device 300 also includes a judgment module 330 .
[0079] The judgment module 330 is used to judge whether the time interval between the time when the node is about to open the ClassB receiving window and the current time is greater than the time consumption when the working mode of the node is ClassB mode and a downlink message needs to be sent to the node.
[0080] When the judging module 330 determines that the time interval is greater than the time consumption, the sending module 320 may also send the downlink message to the downlink base station after a predetermined delay, so that the downlink base station sends the downlink message to the node.
[0081] When the determination module 330 determines that the time interval is less than the time consumption, it may continue to determine whether the time interval between the time when the ClassB receiving window is to be opened next time and the current time is greater than the time consumption.
[0082] Taking Txdelay as a value range and the value range of Txdelay is [delay+T5, delay+T2] as an example, the judgment module 330 can determine whether the time interval T3 between the time when the node is about to open the ClassB receiving window and the current time is greater than delay+T5. When T3<delay+T5, the judgment module 330 can continue to determine whether the time interval between the time when the node is about to open the ClassB receiving window next time and the current time is greater than delay+T5.
[0083] In the case of T3>delay+T5, the determination module 330 may further determine whether T3 is greater than delay+T2.
[0084] In the case that T3≤delay+T2, the sending module 320 may send the downlink message to the downlink base station, so that the downlink base station sends the downlink message to the node.
[0085] In the case of T3>delay+T2, the sending module 320 may send the downlink message to the downlink base station after a predetermined delay, so that the downlink base station sends the downlink message to the node. Wherein, the predetermined time length T4=T3-delay-T2.
[0086] Figure 4 The LoRa data transmission device 400 shown can be set at the network server end. Figure 4 The LoRa data transmission device 400 includes a receiving module 410, a calculating module 420, a determining module 430 and a sending module 440.
[0087] The receiving module 410 is used to receive a network access request sent by a node through a base station.
[0088] The calculation module 420 is used to calculate the time taken between the network server starting to send the downlink message and the node receiving the downlink message in response to the receiving module receiving the network access request. The calculation method of the time Txdelay can refer to the above description, which will not be repeated here.
[0089] The determination module 430 is used to determine the delay time from when the node sends the uplink message to when the first receiving window is opened based on the time consumption, and the delay time is greater than the time consumption. For the specific relationship between the delay time Rxdelay and the time consumption Txdelay, please refer to the above related description, which will not be repeated here.
[0090] The sending module 440 is used to send the delay time to the node, so that the node sets the first receiving window according to the delay time.
[0091] Figure 5The LoRa data transmission device 500 shown can be set at the node end. Figure 5 The LoRa data transmission device 500 includes a receiving module 510 and a setting module 520 .
[0092] The receiving module 510 is used to receive instructions sent by the network server.
[0093] The setting module 520 is used to set the delay time from sending the uplink message to opening the first receiving window according to the duration parameter in the instruction, wherein the duration parameter is determined based on the time taken between the network server starting to send the downlink message and the node receiving the downlink message, the duration represented by the duration parameter is greater than the time taken, and the first receiving window is the receiving window opened for the first time after the node sends the uplink message.
[0094] Figure 6 A schematic diagram of the structure of a computing device that can be used to implement the LoRa data transmission method according to an embodiment of the present invention is shown.
[0095] See also Figure 6 , the computing device 1000 includes a memory 1010 and a processor 1020 .
[0096] The processor 1020 may be a multi-core processor or may include multiple processors. In some embodiments, the processor 1020 may include a general-purpose main processor and one or more special coprocessors, such as a graphics processing unit (GPU), a digital signal processor (DSP), etc. In some embodiments, the processor 1020 may be implemented using a customized circuit, such as an application-specific integrated circuit (ASIC) or a field programmable gate array (FPGA).
[0097] The memory 1010 may include various types of storage units, such as system memory, read-only memory (ROM), and permanent storage devices. Among them, ROM can store static data or instructions required by the processor 1020 or other modules of the computer. The permanent storage device may be a readable and writable storage device. The permanent storage device may be a non-volatile storage device that does not lose the stored instructions and data even after the computer is powered off. In some embodiments, the permanent storage device uses a large-capacity storage device (such as a magnetic or optical disk, flash memory) as a permanent storage device. In some other embodiments, the permanent storage device may be a removable storage device (such as a floppy disk, optical drive). The system memory may be a readable and writable storage device or a volatile readable and writable storage device, such as a dynamic random access memory. The system memory may store some or all instructions and data required by the processor at run time. In addition, the memory 1010 may include any combination of computer-readable storage media, including various types of semiconductor memory chips (DRAM, SRAM, SDRAM, flash memory, programmable read-only memory), and disks and / or optical disks may also be used. In some embodiments, the memory 1010 may include a readable and / or writable removable storage device, such as a laser disc (CD), a read-only digital versatile disc (such as a DVD-ROM, a double-layer DVD-ROM), a read-only Blu-ray disc, an ultra-density optical disc, a flash memory card (such as an SD card, a mini SD card, a Micro-SD card, etc.), a magnetic floppy disk, etc. The computer-readable storage medium does not include carrier waves and transient electronic signals transmitted wirelessly or wired.
[0098] The memory 1010 stores executable codes. When the executable codes are processed by the processor 1020, the processor 1020 can execute the LoRa data transmission method mentioned above.
[0099] The LoRa data transmission method, device and apparatus according to the present invention have been described in detail above with reference to the accompanying drawings.
[0100] In addition, the method according to the present invention may also be implemented as a computer program or a computer program product, which includes computer program code instructions for executing the above steps defined in the above method of the present invention.
[0101] Alternatively, the present invention may also be implemented as a non-temporary machine-readable storage medium (or computer-readable storage medium, or machine-readable storage medium) on which executable code (or computer program, or computer instruction code) is stored. When the executable code (or computer program, or computer instruction code) is executed by a processor of an electronic device (or computing device, server, etc.), the processor executes the various steps of the above-mentioned method according to the present invention.
[0102] Those skilled in the art will further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the disclosure herein may be implemented as electronic hardware, computer software, or a combination of both.
[0103] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system and method according to multiple embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0104] The embodiments of the present invention have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terms used herein are selected to best explain the principles of the embodiments, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.
Claims
1. A LoRa data transmission method, characterized in that: include: Determine the delay time from when the node finishes sending the uplink message to when the first receiving window is opened based on the time taken for the network server to start sending the downlink message and for the node to receive the downlink message, the delay time being greater than the time taken, wherein the first receiving window is the receiving window opened for the first time after the node finishes sending the uplink message; sending the delay time to the node so that the node sets the first receiving window according to the delay time; When the working mode of the node is ClassB mode and a downlink message needs to be sent to the node, determining whether the time interval between the time when the node is about to open the ClassB receiving window and the current time is greater than the time consumption; In the case where the time interval is greater than the time consumption, sending the downlink message to the downlink base station after a predetermined delay, so that the downlink base station sends the downlink message to the node; The method further comprises: T4 = T3 - Txdelay, Among them, T4 is the predetermined duration, T3 is the time interval, and Txdelay is the time consumption.
2. The LoRa data transmission method according to claim 1, wherein Rxdelay≥Txdelay+T1, Among them, Rxdelay is the delay time, Txdelay is the time consumption, T1 is a first duration parameter, and the first duration parameter is used to characterize the time required for the node to complete the reception from receiving the downlink message.
3. The LoRa data transmission method according to claim 1, wherein delay+T5≤Txdelay≤delay+T2, Among them, delay is the link transmission delay between the network server and the base station, Txdelay is the time consumption, T2 is the second duration parameter, and T5 is the third duration parameter.
4. The LoRa data transmission method according to claim 3, characterized in that The step of determining whether the time interval between the time when the node is about to open the ClassB receiving window and the current time is greater than the time consumption comprises: Determine whether the time interval between the time when the node is about to open the ClassB receiving window and the current time is greater than delay+T5; and When the time interval is greater than delay+T5, it is further determined whether the time interval is greater than delay+T2.
5. The LoRa data transmission method according to claim 4, characterized in that In the case where delay+T5≤T3≤delay+T2, sending the downlink message to a downlink base station, so that the downlink base station sends the downlink message to the node; or In the case of T3>delay+T2, the downlink message is sent to the downlink base station after a predetermined delay, so that the downlink base station sends the downlink message to the node, Among them, T4= T3 - delay - T2, T4 is the predetermined duration, and T3 is the time interval.
6. The LoRa data transmission method according to claim 1, characterized in that: Also includes: When the time interval is less than the time consumption, it is determined whether the time interval between the time when the node is to open the ClassB receiving window next time and the current time is greater than the time consumption.
7. A LoRa data transmission method, characterized in that: include: Determine the delay time from when the node finishes sending the uplink message to when the first receiving window is opened based on the time taken for the network server to start sending the downlink message and for the node to receive the downlink message, the delay time being greater than the time taken, wherein the first receiving window is the receiving window opened for the first time after the node finishes sending the uplink message; The delay time is sent to the node so that the node sets the first receiving window according to the delay time.
8. A LoRa data transmission method, characterized in that: include: In response to receiving a network access request sent by a node through a base station, calculating the time taken between when a network server starts sending a downlink message and when the node receives the downlink message; Based on the time consumption, determining a delay time from when the node completes sending the uplink message to when a first receiving window is opened, the delay time being greater than the time consumption; the first receiving window is a receiving window opened for the first time after the node completes sending the uplink message; and The delay time is sent to the node so that the node sets the first receiving window according to the delay time.
9. A LoRa data transmission method, characterized in that: include: When the working mode of the node is ClassB mode and a downlink message needs to be sent to the node, determine whether the time interval between the time when the node is about to open the ClassB receiving window and the current time is greater than the time consumption, where the time consumption is the time between the network server starting to send the downlink message and the node receiving the downlink message; The delay time from when the node sends the uplink message to when the first receiving window is opened is set to be greater than the time consumption; the first receiving window is the receiving window opened for the first time after the node sends the uplink message; In the case where the time interval is greater than the time consumption, sending the downlink message to the downlink base station after a predetermined delay, so that the downlink base station sends the downlink message to the node; The method further comprises: T4 = T3 - Txdelay, Among them, T4 is the predetermined duration, T3 is the time interval, and Txdelay is the time consumption.
10. A LoRa data transmission method, characterized in that: include: Receive instructions sent by the network server; According to the duration parameter in the instruction, the delay time from sending the uplink message to opening the first receiving window is set, wherein the duration parameter is determined based on the time taken between the network server starting to send the downlink message and the node receiving the downlink message, the duration represented by the duration parameter is greater than the time taken, and the first receiving window is the receiving window opened for the first time after the node sends the uplink message.
11. A LoRa data transmission device, characterized in that: include: A determination module, configured to determine a delay time from when a node finishes sending an uplink message to when a first receiving window is opened based on a time taken from when a network server starts sending a downlink message to when a node receives the downlink message, wherein the delay time is greater than the time taken, wherein the first receiving window is a receiving window opened for the first time after the node finishes sending an uplink message; A sending module, configured to send the delay time to the node, so that the node sets the first receiving window according to the delay time; a judgment module, configured to judge whether the time interval between the time when the node is about to open the ClassB receiving window and the current time is greater than the time consumption when the working mode of the node is the ClassB mode and a downlink message needs to be sent to the node; When the judgment module determines that the time interval is greater than the time consumption, the sending module is further used to send the downlink message to the downlink base station after a predetermined delay, so that the downlink base station sends the downlink message to the node; The determination module is further specifically used to execute T4= T3 - Txdelay; wherein T3 is the time interval and Txdelay is the time consumption.
12. A LoRa data transmission device, characterized in that: include: A determination module, configured to determine a delay time from when a node finishes sending an uplink message to when a first receiving window is opened based on a time taken from when a network server starts sending a downlink message to when a node receives the downlink message, wherein the delay time is greater than the time taken, wherein the first receiving window is a receiving window opened for the first time after the node finishes sending an uplink message; A sending module is used to send the delay time to the node, so that the node sets the first receiving window according to the delay time.
13. A LoRa data transmission device, characterized in that: include: A receiving module, used for receiving a network access request sent by a node through a base station; A calculation module, configured to calculate the time taken between when the network server starts to send a downlink message and when the node receives the downlink message in response to the receiving module receiving the network access request; A determination module, configured to determine, based on the time consumption, a delay time from when the node completes sending the uplink message to when the first receiving window is opened, wherein the delay time is greater than the time consumption; the first receiving window is a receiving window opened for the first time after the node completes sending the uplink message; as well as A sending module is used to send the delay time to the node, so that the node sets the first receiving window according to the delay time.
14. A LoRa data transmission device, characterized in that: include: A judgment module, used for judging whether the time interval between the time when the node is about to open the ClassB receiving window and the current time is greater than the time consumption when the working mode of the node is ClassB mode and a downlink message needs to be sent to the node, wherein the time consumption is the time length between the network server starting to send the downlink message and the node receiving the downlink message; The delay time from when the node sends the uplink message to when the first receiving window is opened is set to be greater than the time consumption; the first receiving window is the receiving window opened for the first time after the node sends the uplink message; A sending module, configured to send the downlink message to a downlink base station after a delay of a predetermined time if the judging module determines that the time interval is greater than the time consumption, so that the downlink base station sends the downlink message to the node; The determination module is further specifically used to execute T4= T3 - Txdelay; wherein T3 is the time interval and Txdelay is the time consumption.
15. A LoRa data transmission device, characterized in that: include: A receiving module, used for receiving instructions sent by a network server; A setting module is used to set the delay time from sending an uplink message to opening a first receiving window according to a duration parameter in the instruction, wherein the duration parameter is determined based on the time taken between the network server starting to send a downlink message and the node receiving the downlink message, the duration represented by the duration parameter is greater than the time taken, and the first receiving window is the receiving window opened for the first time after the node sends the uplink message.
16. A computing device comprising: processor; as well as A memory having executable codes stored thereon, which, when executed by the processor, causes the processor to perform the method according to any one of claims 1 to 10. 17 . A non-transitory machine-readable storage medium having executable codes stored thereon, which, when executed by a processor of an electronic device, causes the processor to execute the method according to claim 1 .
Citation Information
Patent Citations
Mobile network sending rate control method, device and system
CN104580006A
Relays in a lpwan-type communication system
WO2018069284A1