The invention discloses a data transmission method based on Lora gateway and its system and storage medium. The method comprises the following steps: S1: establishing a communication connection between the Internet of Things node and Lora gateway, sending the data that the Internet of Things node will need to send to the gateway; S2: The Lora gateway processes the data of the Internet of Things node, and detects the network status in real time, and enters the server according to the network status. Line data communication; S3: If the Lora gateway detects that the network state is disconnected or unavailable, it adds the data of the Internet of Things node to the timestamp and stores it in the database; S4: If the Lora gateway detects that the network state is connected and available, it transfers the timestamped Internet of Things node in the database to the server. In the invention, the gateway tries to send the data to the server after preliminary processing, and if the transmission fails, it adds the data to the timestamp and stores it in the database. When the network is restored, the gateway extracts the data from the database and sends the timestamp to the server.
【技术实现步骤摘要】
一种基于Lora网关的数据续传方法及其系统与存储介质
本专利技术涉及物联网数据传输领域,特别涉及一种基于Lora网关的数据续传方法及其系统与存储介质。
技术介绍
随着科学技术的发展,物联网正逐步进入人们的生产生活当中。在当前技术中,由于诸多因素,会出现电力、网络不稳定的问题。因此,网络设施被破坏、电力供应不足而造成网络断开的情况很容易发生。而网络断开时传统物联网设备就不得不被迫下线,重要数据也随之丢失。为了解决上述问题,本专利技术提出一种基于Lora网关的数据续传方法及其系统与存储介质,可使物联网数据传输过程数据安全可靠,在一定限度内不受网络中断的影响。
技术实现思路
为了满足上述要求,本专利技术的一个目的在于提供一种基于Lora网关的数据续传方法,该方法可以处理物联网数据传输过程中网络断开之后,数据能够继续上传交互。本专利技术的第二个目的在于提出一种基于Lora网关的数据续传方法的数据传输系统。本专利技术的第三个目的在于提出一种非临时性计算机可读存储介质,其上存储有计算机程序。为了实现上述目的,本专利技术采用以下技术方案:一种基于Lora网关的数据续传方法,包括以下步骤:S1:物联网节点与Lora网关之间建立通讯连接,物联网节点将需要发送的数据发送至网关;S2:所述Lora网关处理物联网节点数据,并实时检测网络状态,根据网络状态与服务器进行数据通讯;S3:若所述Lora网关检测到网络状态为断开或不可用,则将物联网节点数据加入时间戳存入数据库;S4:若所述Lora网关检测到网络状态为连接并可用,则将所述数据库中附带时间戳的物联网节点数据传输至服务器。进一步技术 ...
【技术保护点】
1.一种基于Lora网关的数据续传方法,其特征在于,包括以下步骤:S1:物联网节点与Lora网关之间建立通讯连接,物联网节点将需要发送的数据发送至网关;S2:所述Lora网关处理物联网节点数据,并实时检测网络状态,根据网络状态与服务器进行数据通讯;S3:若所述Lora网关检测到网络状态为断开或不可用,则将物联网节点数据加入时间戳存入数据库;S4:若所述Lora网关检测到网络状态为连接并可用,则将所述数据库中附带时间戳的物联网节点数据传输至服务器。
【技术特征摘要】
1.一种基于Lora网关的数据续传方法,其特征在于,包括以下步骤:S1:物联网节点与Lora网关之间建立通讯连接,物联网节点将需要发送的数据发送至网关;S2:所述Lora网关处理物联网节点数据,并实时检测网络状态,根据网络状态与服务器进行数据通讯;S3:若所述Lora网关检测到网络状态为断开或不可用,则将物联网节点数据加入时间戳存入数据库;S4:若所述Lora网关检测到网络状态为连接并可用,则将所述数据库中附带时间戳的物联网节点数据传输至服务器。2.根据权利要求1所述的一种基于Lora网关的数据续传方法,其特征在于,所述Lora网关为具有Lora无线通信模块的储存型Lora网关设备;所述Lora网关包括数据转发模块,所述的数据转发模块用于分别与服务器、物联网节点通讯连接;所述数据转发模块包括网络处理程序,所述的网络处理程序用于与服务器通讯、注册入网、数据传输、掉线重连;所述数据转发模块还包括交互服务程序,所述的交互服务程序负责驱动Lora无线通信模块与物联网节点进行数据交互,并且将正确入网的节点配置信息存入数据库,以免掉电数据丢失而造成物联网节点无法识别。3.根据权利要求2所述的一种基于Lora网关的数据续传方法,其特征在于,所述步骤S1还包括,所述物联网节点与Lora网关之间通过Lora无线通信模块进行通讯连接;所述步骤S2还包括,所述Lora网关通过数据转发模块与服务器进行数据传输;所述步骤S3还包括,当所述Lora网关检测到网络状态为断开或不可用时,所述的数据转发模块利用网络处理程序将物联网节点数据加入时间戳存入数据库;所述步骤S4还包括,当所述Lora网关检测到网络状态为连接或可用时,所述的数据转发模块利用网络处理程序从数据库中提取附带时间戳的物联网节点数据,并将其发往服务器。4.根据权利要求2所述的一种基于Lora网关的数据续传方法,其特征在于,所述步骤S2还包括,所述Lora网关接收到物联网节点数据之后由交互服...
【专利技术属性】
技术研发人员:金帆,蒋隽毅,王申辰,陈淀勇,苏利博,王强,
申请(专利权)人:深圳云博智联科技有限公司,
类型:发明
国别省市:广东,44
还没有人留言评论。发表了对其他浏览者有用的留言会获得科技券。