WO2018170773A1 - Internet of things gateway data management method and internet of things gateway - Google Patents

Internet of things gateway data management method and internet of things gateway Download PDF

Info

Publication number
WO2018170773A1
WO2018170773A1 PCT/CN2017/077628 CN2017077628W WO2018170773A1 WO 2018170773 A1 WO2018170773 A1 WO 2018170773A1 CN 2017077628 W CN2017077628 W CN 2017077628W WO 2018170773 A1 WO2018170773 A1 WO 2018170773A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
internet
column family
internet protocol
converting
Prior art date
Application number
PCT/CN2017/077628
Other languages
French (fr)
Chinese (zh)
Inventor
刘强
李成功
黄龑
Original Assignee
深圳中兴力维技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳中兴力维技术有限公司 filed Critical 深圳中兴力维技术有限公司
Priority to PCT/CN2017/077628 priority Critical patent/WO2018170773A1/en
Publication of WO2018170773A1 publication Critical patent/WO2018170773A1/en

Links

Definitions

  • the present invention relates to the field of Internet of Things technologies, and in particular, to an Internet of Things gateway data management method and an Internet of Things gateway.
  • the IoT gateway is the transportation center between the Internet of Things and the big data platform.
  • the big data platform connects to many sensing devices through the IoT gateway, resulting in continuous and large amounts of information.
  • the big data platform performs the approach calculation and trend judgment by receiving a large amount of collected data.
  • the main object of the present invention is to provide an Internet of Things gateway data management method and an Internet of Things gateway, which are intended to improve data transmission and processing efficiency.
  • the present invention provides an Internet of Things gateway data management method, and the data management method includes the following steps:
  • the sensing device accessing the Internet of Things gateway parses the data transmitted by the heterogeneous protocol to obtain the data information of the sensing device;
  • the step of converting the fragment data into internet protocol data comprises:
  • the step of converting the column family data into internet protocol data comprises:
  • the step of converting the package into internet protocol data comprises:
  • the method before the step of converting the compressed data into internet protocol data according to a preset network rule, the method further includes:
  • the compressed data is backed up and stored.
  • the present invention also provides an Internet of Things gateway, where the Internet of Things gateway includes:
  • a parsing module configured to parse data sent by the heterogeneous protocol for the sensing device accessing the Internet of Things gateway to obtain data information of the sensing device;
  • a first data processing module configured to perform data fragmentation on the data information according to a preset fragmentation rule, and obtain score piece data;
  • the data information includes attributes of the data;
  • a second data processing module configured to package the fragment data into Internet Protocol data
  • a data sending module configured to send the internet protocol data.
  • the second data processing module is specifically configured to:
  • the step of converting, by the second data processing module, the column family data block into internet protocol data comprises: [0032] performing block processing on the block data of the column family data according to a preset rule, and obtaining partition column family data in which the block data has a logical partition;
  • the step of converting the packet of the second data processing module into Internet protocol data comprises: [0035] cleaning data according to a preset cleaning rule, and compressing the cleaned data to obtain compressed data;
  • the Internet of Things gateway further includes:
  • a backup module configured to perform backup storage of the compressed data before the step of converting, by the second data processing module, the compressed data into Internet protocol data according to a preset network rule.
  • the IoT gateway data management method and the Internet of Things gateway provided by the present invention convert the real data stream into batch data by performing the fragmentation operation on the data information, which can increase each processing in the subsequent processing process.
  • the amount of data reduces the number of processing, thereby improving the efficiency of data transmission and processing, and facilitating the rapid storage and data analysis of the big data platform that subsequently receives data.
  • FIG. 1 is a flowchart of a first embodiment of a method for managing an Internet of Things gateway data according to the present invention
  • FIG. 2 is a flowchart of a second embodiment of a method for managing an Internet of Things gateway data according to the present invention
  • FIG. 3 is a flowchart of a third embodiment of a method for managing an Internet of Things gateway data according to the present invention.
  • FIG. 4 is a flowchart of a fourth embodiment of an Internet of Things gateway data management method according to the present invention.
  • FIG. 5 is a flowchart of a fifth embodiment of an Internet of Things gateway data management method according to the present invention.
  • FIG. 6 is a schematic diagram showing a data hierarchical structure of the data processing method of the Internet of Things gateway shown in FIG. 5; 7 is a schematic diagram of a logical architecture of an existing big data platform;
  • FIG. 9 is a schematic block diagram of an embodiment of an Internet of Things gateway according to the present invention.
  • a first embodiment of a network switching method according to the present invention includes the following steps:
  • Step S100 The sensing device accessing the Internet of Things gateway performs data parsing through the heterogeneous protocol to obtain data information of the sensing device.
  • there are multiple sensing devices connected to the IoT gateway and usually include multiple types.
  • Each type of device will transmit data to the IoT gateway through a heterogeneous protocol.
  • the data transmitted through the heterogeneous protocol includes at least two parts, one of which is related data obtained by the sensing device during the monitoring process, and the other is the type of protocol used by the sensing device to transmit data.
  • the Internet of Things gateway can parse the related data according to the protocol type in the data information.
  • Step S101 performing data fragmentation on the data information according to a preset fragmentation rule in the IoT gateway, and obtaining fragment data;
  • the data information includes attributes of the data, for example: a sensing device The type of protocol used and other attributes.
  • the fixed inter-frame interval may be a slice unit, or the size of the buffer data may be a slice unit.
  • Step S102 Packetizing the fragment data into Internet Protocol data.
  • the Internet Protocol data is used to interconnect the front-end aware device with the network.
  • Step S103 sending the internet protocol data.
  • the real data stream is converted into batch data, which can increase the amount of data processed in each subsequent processing process, and reduce the number of processing times. Therefore, the effect of improving data transmission and processing efficiency is achieved, which facilitates rapid storage and data analysis of a big data platform that subsequently receives data.
  • a second embodiment of the network switching method of the present invention is based on the first embodiment.
  • Step S101 is described in detail. details as follows:
  • Step S200 is the same as step S100 in the first embodiment, and details are not described herein again.
  • Step S201 is the same as step S101 in the first embodiment, and details are not described herein again.
  • Step S202 Set a column family of data according to the data attribute of the fragment data.
  • Step S203 the fragment data is divided into blocks according to the column family, and column family data corresponding to the fragment data is obtained.
  • data segmentation is performed according to a fixed inter-turn interval 30s; data is included in each slice data: temperature, humidity, current, voltage, position, and device ID; then this embodiment will be established
  • the column family of data including temperature, humidity, current, voltage, position, and device ID; further put together the data of the same column family of the same piece of data, that is, the columnar storage logic of the sliced data is realized.
  • Step S204 The column family data is packaged and converted into Internet Protocol data.
  • Step S205 is the same as step S103 in the first embodiment, and details are not described herein again.
  • a third embodiment of the network switching method of the present invention is based on the second embodiment.
  • Step S204 is described in detail. details as follows:
  • Step S300 is the same as step S200 in the second embodiment, and details are not described herein again.
  • Step S301 is the same as step S201 in the second embodiment, and details are not described herein again.
  • Step S302 is the same as step S202 in the second embodiment, and details are not described herein again.
  • Step S303 is the same as step S203 in the second embodiment, and details are not described herein again.
  • Step S304 the block data of the column family data is partitioned according to a preset rule, and the partition column family data whose block data has a logical partition is obtained.
  • the method of partitioning the column family data can hash the column family data by using hash Hash or user designation. Please refer to Figure 6.
  • the storage mode of the voltage column family is exemplified, and the voltage column family is divided into N partitions.
  • Step S305 packetizing the partition column family data into Internet Protocol data.
  • Step S306 is the same as step S205 in the second embodiment, and details are not described herein again.
  • the block data can be hashed into different partitions, so that the block data can be distributed and stored, and the data tilt problem can be solved, and the data reading capability can be improved.
  • distributed storage is the basis of distributed computing, and the logical architecture diagram of the platform is shown in Figure 7. If the column family data is not partitioned, it will be concentrated on a certain disk in the storage process, which will form a read/write bottleneck during the calculation process, which will affect the distributed computing performance. By partitioning the column family data, the column group data can be allocated to multiple disks in a partitioned manner, and multiple disk 1/0 can be used to improve data reading capability, which is beneficial to the back-end big data platform to perform distributed computing on data. .
  • a fourth embodiment of the network switching method of the present invention is provided.
  • the present embodiment is based on the third embodiment, and step S305 is described in detail. details as follows:
  • Step S400 is the same as step S300 in the third embodiment, and details are not described herein again.
  • Step S401 is the same as step S301 in the third embodiment:
  • Step S402 is the same as step S302 in the third embodiment:
  • Step S403 is the same as step S303 in the third embodiment:
  • Step S404 is the same as step S304 in the third embodiment:
  • Step S405 Clean the partition column family data according to a preset cleanup rule, and compress the cleaned data to obtain compressed data.
  • the cleaning rule may be to perform data cleaning on the duplicate and abnormal data under the same device in the partition information;
  • the compression method may be compressed by a compression algorithm such as GZIP, LZO, and Snappy. It can also be encrypted in compression or encrypted after compression, such as MD5, RSA and other encryption methods.
  • Step S406 Convert the compressed data into Internet Protocol data according to a preset network rule.
  • Step S407 is the same as step S306 in the third embodiment, and details are not described herein again.
  • a fifth embodiment of the network switching method of the present invention is based on the fourth embodiment, and a new step is added. details as follows:
  • Step S500 is the same as step S400 in the third embodiment, and details are not described herein again.
  • Step S501 is the same as step S401 in the third embodiment, and details are not described herein again.
  • Step S502 is the same as step S402 in the third embodiment, and details are not described herein again.
  • Step S503 is the same as step S403 in the third embodiment, and details are not described herein again.
  • Step S504 is the same as step S404 in the third embodiment, and details are not described herein again.
  • Step S505 is the same as step S405 in the third embodiment, and details are not described herein again.
  • Step S506 The compressed data is backed up and stored.
  • Step S507 is the same as step S406 in the third embodiment, and details are not described herein again.
  • Step S508 is the same as step S407 in the third embodiment, and details are not described herein again.
  • the compressed data is backed up, so that data retransmission, search, and the like are performed in the event of a network failure.
  • the maximum backup period of data can be calculated and confirmed according to the amount of data processed by the IoT gateway every day and the capacity of the storage module. Users can set it themselves, but it cannot exceed the maximum backup period.
  • the recommended backup period is 1 to 3 months. .
  • the present invention also provides an Internet of Things gateway.
  • the sensing device 1, the sensing device 2, the sensing device 3, and the sensing device 4 of the IoT gateway are accessed.
  • Each sensing device is used to detect a battery pack that is used to form a battery matrix.
  • the Internet of Things Gateway connects to the network, with clients and big data platforms connected to the other ends of the network.
  • the Internet of Things gateway includes:
  • the parsing module 1000 is configured to obtain, by the sensing device accessing the Internet of Things gateway, the data sent by the heterogeneous protocol, and obtain the data information of the sensing device; wherein, the sensing device accessing the Internet of Things gateway has Multiple, and usually include multiple types. Each type of device will transmit data to the IoT gateway through heterogeneous protocols.
  • the data transmitted through the heterogeneous protocol includes at least two parts, one of which is related data obtained by the sensing device during the monitoring process, and the other of which is the type of protocol used by the sensing device to transmit data.
  • the Internet of Things gateway can parse the related data according to the protocol type in the data information.
  • the first data processing module 1100 is configured to perform data fragmentation on the data information according to a preset fragmentation rule to obtain fragmentation data; the data information includes attributes of the data, for example: used by the sensing device Protocol type and other attributes.
  • the fixed inter-frame interval may be a slice unit, or the size of the cache data may be a slice unit.
  • the second data processing module 1200 is configured to package the fragment data into Internet Protocol data.
  • the data sending module 1300 is configured to send the internet protocol data.
  • the Internet Protocol data is used to implement the interconnection between the front-end sensing device and the network.
  • the real data stream is converted into batch data, which can increase the amount of data processed in each subsequent processing process, and reduce the number of processing times. Therefore, the effect of improving data transmission and processing efficiency is achieved, which facilitates rapid storage and data analysis of a big data platform that subsequently receives data.
  • the second data processing module 1200 is specifically configured to:
  • the column family of data is set according to the data attribute of the slice data.
  • the fragment data is divided according to the column family, and column family data corresponding to the fragment data is obtained.
  • data segmentation is performed according to a fixed inter-turn interval 30s; data is included in each slice data: temperature, humidity, current, voltage, position, and device ID; then this embodiment will be established
  • the column family of data including temperature, humidity, current, voltage, position, and device ID; further put together the data of the same column family of the same piece of data, that is, the columnar storage logic of the sliced data is realized.
  • the step of converting, by the second data processing module 1200, the column family data block into the internet protocol data comprises:
  • the storage mode of the voltage family is exemplified, and the voltage column family is divided into N partitions.
  • the block data can be hashed into different partitions, so that the block data can be distributed and stored, and the data tilt problem can be solved, and the data reading capability can be improved.
  • distributed storage is the basis of distributed computing, and the logical architecture diagram of its platform is as Figure 7 shows. If the column family data is not partitioned, it will be concentrated on a certain disk in the storage process, which will form a read-write bottleneck during the calculation process, which affects the distributed computing performance. By partitioning the column family data, the column group data can be allocated to multiple disks in a partitioned manner, and multiple disk I/Os can be used to improve data reading capability, which is beneficial to the back-end big data platform to perform distributed computing on data. .
  • the step of converting the packet of the second data processing module 1200 into internet protocol data comprises:
  • the data is cleaned according to the preset cleaning rule, and the cleaned data is compressed to obtain compressed data;
  • the cleaning rule may be data cleaning of duplicate and abnormal data under the same device in the partition information;
  • Compression can be performed using compression algorithms such as GZIP, LZO, and Snappy. It can also be encrypted in compression or encrypted after compression, such as MD5, RSA and other encryption methods.
  • the Internet of Things gateway further includes:
  • the backup module 1400 is configured to perform backup storage on the compressed data before the step of converting the compressed data into Internet protocol data according to the preset network rule by the second data processing module 1200.
  • the compressed data is backed up, so as to perform data retransmission, search, and the like in the event of a network failure.
  • the maximum backup period of data can be calculated and confirmed according to the amount of data processed by the IoT gateway every day and the capacity of the storage module. Users can set it themselves, but it cannot exceed the maximum backup period.
  • the recommended backup period is 1 to 3 months. .
  • the technical solution of the present invention which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk,
  • a storage medium such as ROM/RAM, disk
  • the optical disc includes a number of instructions for causing a terminal device (which may be a mobile terminal, a computer, a server, an air conditioner, or a network device, etc.) to perform the methods described in various embodiments of the present invention.
  • the IoT gateway data management method and the Internet of Things gateway provided by the present invention convert the real data stream into batch data by performing the fragmentation operation on the data information, which can increase each processing in the subsequent processing process.
  • the amount of data reduces the number of processing, thereby improving the efficiency of data transmission and processing, and facilitating the rapid storage and data analysis of the big data platform that subsequently receives data.

Abstract

Disclosed are an Internet of Things gateway data management method and an Internet of Things gateway. The Internet of Things gateway data management method comprises the steps of: parsing data that is transmitted by means of a heterogeneous protocol by a sensing device accessing the Internet of Things gateway to obtain data information about the sensing device; carrying out data fragmentation on the data information according to a pre-set fragmentation rule in the Internet of Things gateway to obtain fragmented data, wherein the data information includes the attribute of the data; packing the fragmented data and converting same into Internet protocol data; and sending the Internet protocol data. The present invention has the effect of improving data transmission and processing efficiency.

Description

物联网网关数据管理方法和物联网网关 技术领域  IoT gateway data management method and IoT gateway
[0001] 本发明涉及物联网技术领域, 特别涉及物联网网关数据管理方法和物联网网关 背景技术  [0001] The present invention relates to the field of Internet of Things technologies, and in particular, to an Internet of Things gateway data management method and an Internet of Things gateway.
[0002] 在物联网以及大数据平台的结合吋, 物联网网关是物联网和大数据平台之间的 交通中心。 大数据平台通过物联网网关连接众多感知设备, 从而获得连续和大 量的信息。 大数据平台通过接收采集到的大量数据, 来进行趋近计算以及趋势 判断等。  [0002] In the combination of the Internet of Things and big data platforms, the IoT gateway is the transportation center between the Internet of Things and the big data platform. The big data platform connects to many sensing devices through the IoT gateway, resulting in continuous and large amounts of information. The big data platform performs the approach calculation and trend judgment by receiving a large amount of collected data.
[0003] 但是, 现有的物联网网关所采用的数据传输方法并不能很好的满足海量的信息 传递, 以及不利于大数据平台的快速存储以及数据分析。  [0003] However, the data transmission methods adopted by the existing IoT gateways are not well suited for mass information transfer, and are not conducive to fast storage and data analysis of big data platforms.
技术问题  technical problem
[0004] 本发明的主要目的是提供物联网网关数据管理方法和物联网网关, 旨在提高数 据传输以及处理效率。  The main object of the present invention is to provide an Internet of Things gateway data management method and an Internet of Things gateway, which are intended to improve data transmission and processing efficiency.
问题的解决方案  Problem solution
技术解决方案  Technical solution
[0005] 为实现上述目的, 本发明提出的一种物联网网关数据管理方法, 所述数据管理 方法包括步骤:  [0005] In order to achieve the above object, the present invention provides an Internet of Things gateway data management method, and the data management method includes the following steps:
[0006] 针对接入物联网网关的感知设备通过异构协议传入的数据进行解析, 而获得所 述感知设备的数据信息;  [0006] The sensing device accessing the Internet of Things gateway parses the data transmitted by the heterogeneous protocol to obtain the data information of the sensing device;
[0007] 在所述物联网网关中按预设分片规则对所述数据信息进行数据分片, 而获得分 片数据; 所述数据信息中包含数据的属性; [0007] performing data fragmentation on the data information according to a preset fragmentation rule in the Internet of Things gateway to obtain fragmentation data; and the data information includes attributes of the data;
[0008] 将所述分片数据打包转换为互联网协议数据; [0008] converting the fragment data into internet protocol data;
[0009] 将所述互联网协议数据发出。 [0009] transmitting the internet protocol data.
[0010] 优选的, 所述将所述分片数据打包转换为互联网协议数据的步骤包括:  [0010] Preferably, the step of converting the fragment data into internet protocol data comprises:
[0011] 根据所述分片数据的数据属性设置数据的列族; [0012] 将所述分片数据按照所述列族进行分块, 而获得对应所述分片数据的列族数据 [0013] 将所述列族数据打包转换为互联网协议数据。 [0011] setting a column family of data according to a data attribute of the slice data; [0012] dividing the fragment data according to the column family to obtain column family data corresponding to the fragment data [0013] packetizing the column family data into internet protocol data.
[0014] 优选的, 所述将所述列族数据打包转换为互联网协议数据的步骤包括:  [0014] Preferably, the step of converting the column family data into internet protocol data comprises:
[0015] 按预设规则将所述列族数据的块数据进行分区处理, 而获得块数据具有逻辑分 区的分区列族数据;  [0015] performing block processing on the block data of the column family data according to a preset rule, and obtaining partition column family data in which the block data has a logical partition;
[0016] 将所述分区列族数据打包转换为互联网协议数据。 [0016] packaging the partitioned column family data into internet protocol data.
[0017] 优选的, 所述打包转换为互联网协议数据的步骤包括: [0017] Preferably, the step of converting the package into internet protocol data comprises:
[0018] 按照预设清理规则对数据进行清理, 并且将清理后的数据进行压缩而获得压缩 数据;  [0018] cleaning the data according to a preset cleaning rule, and compressing the cleaned data to obtain compressed data;
[0019] 将所述压缩数据按照预设网络规则转换为互联网协议数据。  [0019] converting the compressed data into internet protocol data according to a preset network rule.
[0020] 优选的, 所述将所述压缩数据按照预设网络规则转换为互联网协议数据的步骤 之前还包括:  [0020] Preferably, before the step of converting the compressed data into internet protocol data according to a preset network rule, the method further includes:
[0021] 将所述压缩数据进行备份储存。 [0021] The compressed data is backed up and stored.
[0022] 本发明还提供了一种物联网网关, 所述物联网网关包括:  [0022] The present invention also provides an Internet of Things gateway, where the Internet of Things gateway includes:
[0023] 解析模块, 用于针对接入物联网网关的感知设备通过异构协议传入的数据进行 解析, 而获得所述感知设备的数据信息;  [0023] a parsing module, configured to parse data sent by the heterogeneous protocol for the sensing device accessing the Internet of Things gateway to obtain data information of the sensing device;
[0024] 第一数据处理模块, 用于按预设分片规则对所述数据信息进行数据分片, 而获 得分片数据; 所述数据信息中包含数据的属性; [0024] a first data processing module, configured to perform data fragmentation on the data information according to a preset fragmentation rule, and obtain score piece data; the data information includes attributes of the data;
[0025] 第二数据处理模块, 用于将所述分片数据打包转换为互联网协议数据; [0025] a second data processing module, configured to package the fragment data into Internet Protocol data;
[0026] 数据发送模块, 用于将所述互联网协议数据发出。 [0026] a data sending module, configured to send the internet protocol data.
[0027] 优选的, 所述第二数据处理模块具体用于: [0027] Preferably, the second data processing module is specifically configured to:
[0028] 根据所述分片数据的数据属性设置数据的列族; [0028] setting a column family of data according to a data attribute of the slice data;
[0029] 将所述分片数据按照所述列族进行分块, 而获得对应所述分片数据的列族数据 [0030] 将所述列族数据块打包转换为互联网协议数据。  And [0030] obtaining the column family data corresponding to the fragment data according to the column family, and converting the column family data block into internet protocol data.
[0031] 优选的, 所述第二数据处理模块的将所述列族数据块打包转换为互联网协议数 据的步骤包括: [0032] 按预设规则将所述列族数据的块数据进行分区处理, 而获得块数据具有逻辑分 区的分区列族数据; [0031] Preferably, the step of converting, by the second data processing module, the column family data block into internet protocol data comprises: [0032] performing block processing on the block data of the column family data according to a preset rule, and obtaining partition column family data in which the block data has a logical partition;
[0033] 将所述分区列族数据打包转换为互联网协议数据。 [0033] packaging the partitioned column family data into internet protocol data.
[0034] 优选的, 所述第二数据处理模块的打包转换为互联网协议数据的步骤包括: [0035] 按照预设清理规则对数据进行清理, 并且将清理后的数据进行压缩而获得压缩 数据;  [0034] Preferably, the step of converting the packet of the second data processing module into Internet protocol data comprises: [0035] cleaning data according to a preset cleaning rule, and compressing the cleaned data to obtain compressed data;
[0036] 将所述压缩数据按照预设网络规则转换为互联网协议数据。  [0036] converting the compressed data into internet protocol data according to a preset network rule.
[0037] 优选的, 所述物联网网关还包括: [0037] Preferably, the Internet of Things gateway further includes:
[0038] 备份模块, 用于在所述第二数据处理模块在所述将所述压缩数据按照预设网络 规则转换为互联网协议数据的步骤之前, 将所述压缩数据进行备份储存。  And a backup module, configured to perform backup storage of the compressed data before the step of converting, by the second data processing module, the compressed data into Internet protocol data according to a preset network rule.
发明的有益效果  Advantageous effects of the invention
有益效果  Beneficial effect
[0039] 本发明所提供的物联网网关数据管理方法和物联网网关, 通过将数据信息进行 分片操作, 则将实吋数据流转换为分批数据, 可以增大后续处理过程中每次处 理的数据量, 减少处理次数, 从而达到提高数据的传输和处理效率的效果, 利 于后续接收数据的大数据平台的快速存储以及数据分析。  [0039] The IoT gateway data management method and the Internet of Things gateway provided by the present invention convert the real data stream into batch data by performing the fragmentation operation on the data information, which can increase each processing in the subsequent processing process. The amount of data reduces the number of processing, thereby improving the efficiency of data transmission and processing, and facilitating the rapid storage and data analysis of the big data platform that subsequently receives data.
对附图的简要说明  Brief description of the drawing
附图说明  DRAWINGS
[0040] 为了更清楚地说明本发明实施例或现有技术中的技术方案, 下面将对实施例或 现有技术描述中所需要使用的附图作简单地介绍, 显而易见地, 下面描述中的 附图仅仅是本发明的一些实施例, 对于本领域普通技术人员来讲, 在不付出创 造性劳动的前提下, 还可以根据这些附图示出的结构获得其他的附图。  [0040] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings to be used in the embodiments or the prior art description will be briefly described below, and obviously, in the following description The drawings are only some of the embodiments of the present invention, and those skilled in the art can obtain other drawings according to the structures shown in the drawings without any creative work.
[0041] 图 1为本发明物联网网关数据管理方法第一实施例的流程图; 1 is a flowchart of a first embodiment of a method for managing an Internet of Things gateway data according to the present invention;
[0042] 图 2为本发明物联网网关数据管理方法第二实施例的流程图; 2 is a flowchart of a second embodiment of a method for managing an Internet of Things gateway data according to the present invention;
[0043] 图 3为本发明物联网网关数据管理方法第三实施例的流程图; 3 is a flowchart of a third embodiment of a method for managing an Internet of Things gateway data according to the present invention;
[0044] 图 4为本发明物联网网关数据管理方法第四实施例的流程图; 4 is a flowchart of a fourth embodiment of an Internet of Things gateway data management method according to the present invention;
[0045] 图 5为本发明物联网网关数据管理方法第五实施例的流程图; 5 is a flowchart of a fifth embodiment of an Internet of Things gateway data management method according to the present invention;
[0046] 图 6为图 5所示物联网网关数据管理方法的数据分层结构示意图; [0047] 图 7为现有的大数据平台逻辑架构示意图; 6 is a schematic diagram showing a data hierarchical structure of the data processing method of the Internet of Things gateway shown in FIG. 5; 7 is a schematic diagram of a logical architecture of an existing big data platform;
[0048] 图 8为现有的物联网网关系统结构图;  8 is a structural diagram of an existing IoT gateway system;
[0049] 图 9为本发明物联网网关一实施例的模块示意图。  9 is a schematic block diagram of an embodiment of an Internet of Things gateway according to the present invention.
[0050] 本发明目的的实现、 功能特点及优点将结合实施例, 参照附图做进一步说明。  [0050] The implementation, functional features, and advantages of the present invention will be further described with reference to the accompanying drawings.
本发明的实施方式 Embodiments of the invention
[0051] 应当理解, 此处所描述的具体实施例仅仅用以解释本发明, 并不用于限定本发 明。  The specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0052] 请参看图 1, 本发明网络切换方法第一实施例, 所述物联网网关数据管理方法 包括步骤:  Referring to FIG. 1, a first embodiment of a network switching method according to the present invention, the method for managing an Internet of Things gateway includes the following steps:
[0053] 步骤 S 100, 针对接入物联网网关的感知设备通过异构协议传入的数据进行解析 , 而获得所述感知设备的数据信息。 其中, 接入物联网网关的感知设备有多个 , 并且通常包括多种类型。 每一种类型感知设备都将通过异构协议来传输数据 至物联网网关。 通过异构协议传输的数据至少包括两个部分, 其中之一为感知 设备在监控过程中获得的相关数据, 其中之另一为感知设备传输数据所采用的 协议类型。 则物联网网关在接收到所述数据信息吋, 可以根据所述数据信息中 的协议类型对相关数据进行解析。  [0053] Step S100: The sensing device accessing the Internet of Things gateway performs data parsing through the heterogeneous protocol to obtain data information of the sensing device. Among them, there are multiple sensing devices connected to the IoT gateway, and usually include multiple types. Each type of device will transmit data to the IoT gateway through a heterogeneous protocol. The data transmitted through the heterogeneous protocol includes at least two parts, one of which is related data obtained by the sensing device during the monitoring process, and the other is the type of protocol used by the sensing device to transmit data. After receiving the data information, the Internet of Things gateway can parse the related data according to the protocol type in the data information.
[0054] 步骤 S101, 在所述物联网网关中按预设分片规则对所述数据信息进行数据分片 , 而获得分片数据; 所述数据信息中包含数据的属性, 例如: 感知设备所采用 的协议类型及其他属性。 具体分片方法, 可以以固定吋间间隔为分片单位、 或 以缓存数据的大小为分片单位。  [0054] Step S101, performing data fragmentation on the data information according to a preset fragmentation rule in the IoT gateway, and obtaining fragment data; the data information includes attributes of the data, for example: a sensing device The type of protocol used and other attributes. For the specific fragmentation method, the fixed inter-frame interval may be a slice unit, or the size of the buffer data may be a slice unit.
[0055] 步骤 S102, 将所述分片数据打包转换为互联网协议数据。 其中, 互联网协议数 据用于实现前端感知设备与网络的互联。  [0055] Step S102: Packetizing the fragment data into Internet Protocol data. The Internet Protocol data is used to interconnect the front-end aware device with the network.
[0056] 步骤 S103, 将所述互联网协议数据发出。  [0056] Step S103, sending the internet protocol data.
[0057] 本实施例, 通过对物联网网关内的数据信息进行分片操作, 则将实吋数据流转 换为分批数据, 可以增大后续处理过程中每次处理的数据量, 减少处理次数, 从而达到提高数据的传输和处理效率的效果, 利于后续接收数据的大数据平台 的快速存储以及数据分析。 [0058] 请参看图 2, 本发明网络切换方法第二实施例, 本实施例以第一实施例为基础[0057] In this embodiment, by performing a fragmentation operation on the data information in the Internet of Things gateway, the real data stream is converted into batch data, which can increase the amount of data processed in each subsequent processing process, and reduce the number of processing times. Therefore, the effect of improving data transmission and processing efficiency is achieved, which facilitates rapid storage and data analysis of a big data platform that subsequently receives data. Referring to FIG. 2, a second embodiment of the network switching method of the present invention is based on the first embodiment.
, 对其中的步骤 S101进行了详细说明。 具体如下: Step S101 is described in detail. details as follows:
[0059] 步骤 S200, 与第一实施例中的步骤 S100相同, 在此不再赘述。 [0059] Step S200 is the same as step S100 in the first embodiment, and details are not described herein again.
[0060] 步骤 S201 , 与第一实施例中的步骤 S101相同, 在此不再赘述。 [0060] Step S201 is the same as step S101 in the first embodiment, and details are not described herein again.
[0061] 步骤 S202, 根据所述分片数据的数据属性设置数据的列族。 [0061] Step S202: Set a column family of data according to the data attribute of the fragment data.
[0062] 步骤 S203 , 将所述分片数据按照所述列族进行分块, 而获得对应所述分片数据 的列族数据。 请结合参看图 6, 例如, 根据固定的吋间间隔 30s来进行数据分片; 每一分片数据当中都包括数据: 温度、 湿度、 电流、 电压、 位置和设备 ID; 则 本实施例将设立包括温度、 湿度、 电流、 电压、 位置和设备 ID的数据的列族; 进一步将同一分片数据的同一列族的数据放在一起, 即实现了分片数据的列式 存储逻辑。 [0062] Step S203, the fragment data is divided into blocks according to the column family, and column family data corresponding to the fragment data is obtained. Referring to FIG. 6, for example, data segmentation is performed according to a fixed inter-turn interval 30s; data is included in each slice data: temperature, humidity, current, voltage, position, and device ID; then this embodiment will be established The column family of data including temperature, humidity, current, voltage, position, and device ID; further put together the data of the same column family of the same piece of data, that is, the columnar storage logic of the sliced data is realized.
[0063] 步骤 S204, 将所述列族数据打包转换为互联网协议数据。  [0063] Step S204: The column family data is packaged and converted into Internet Protocol data.
[0064] 步骤 S205 , 与第一实施例中的步骤 S103相同, 在此不再赘述。 [0064] Step S205 is the same as step S103 in the first embodiment, and details are not described herein again.
[0065] 本实施例, 通过将分片数据按照列族进行分块, 则可以获得相同属性的数据放 置在一起的效果。 进一步, 因为相同属性数据之间的相似性, 相同数据属性更 有利于提高数据的压缩能力, 从而也降低了网络传输带宽。 同吋, 在后端大数 据平台中也方便于做列式存储、 数据处理等工作。 [0065] In this embodiment, by dividing the fragment data into columns according to the column family, the effect that the data of the same attribute is placed together can be obtained. Further, because of the similarity between the same attribute data, the same data attribute is more conducive to improving the data compression capability, thereby reducing the network transmission bandwidth. At the same time, it is also convenient to do column storage, data processing, etc. in the back-end big data platform.
[0066] 请参看图 3, 本发明网络切换方法第三实施例, 本实施例以第二实施例为基础Referring to FIG. 3, a third embodiment of the network switching method of the present invention is based on the second embodiment.
, 对其中的步骤 S204进行了详细说明。 具体如下: Step S204 is described in detail. details as follows:
[0067] 步骤 S300, 与第二实施例中的步骤 S200相同, 在此不再赘述。 [0067] Step S300 is the same as step S200 in the second embodiment, and details are not described herein again.
[0068] 步骤 S301, 与第二实施例中的步骤 S201相同, 在此不再赘述。 [0068] Step S301 is the same as step S201 in the second embodiment, and details are not described herein again.
[0069] 步骤 S302, 与第二实施例中的步骤 S202相同, 在此不再赘述。 [0069] Step S302 is the same as step S202 in the second embodiment, and details are not described herein again.
[0070] 步骤 S303, 与第二实施例中的步骤 S203相同, 在此不再赘述。 [0070] Step S303 is the same as step S203 in the second embodiment, and details are not described herein again.
[0071] 步骤 S304, 按预设规则将所述列族数据的块数据进行分区处理, 而获得其块数 据具有逻辑分区的分区列族数据。 其中, 对列族数据进行分区的方法可以通过 使用散列 Hash或用户指定等方法对列族数据进行散列。 请结合参看图 6, 该举例 中, 对电压列族的保存方式进行了示例, 其电压列族被分为了 N个分区。 [0071] Step S304, the block data of the column family data is partitioned according to a preset rule, and the partition column family data whose block data has a logical partition is obtained. Among them, the method of partitioning the column family data can hash the column family data by using hash Hash or user designation. Please refer to Figure 6. In this example, the storage mode of the voltage column family is exemplified, and the voltage column family is divided into N partitions.
[0072] 步骤 S305, 将所述分区列族数据打包转换为互联网协议数据。 [0073] 步骤 S306, 与第二实施例中的步骤 S205相同, 在此不再赘述。 [0072] Step S305, packetizing the partition column family data into Internet Protocol data. [0073] Step S306 is the same as step S205 in the second embodiment, and details are not described herein again.
[0074] 本实施例, 通过对块数据进行散列处理, 可以使块数据散列到不同的分区中, 使得块数据可以分散进行存储, 可以解决数据的倾斜问题, 提升数据读取能力 。 在大数据平台中, 分布式存储是分布式计算的基础, 其平台的逻辑架构图如 图 7所示。 如果未对列族数据进行分区操作, 在存储过程中会集中在某一个磁盘 上, 在计算过程中会形成读写瓶颈, 影响分布式计算性能。 通过对列族数据进 行分区, 可以将列组数据按照分区方式分配到多个磁盘上, 利用多个磁盘 1/0, 提升数据读取能力, 有利于后端大数据平台对数据进行分布式运算。 [0074] In this embodiment, by performing hash processing on the block data, the block data can be hashed into different partitions, so that the block data can be distributed and stored, and the data tilt problem can be solved, and the data reading capability can be improved. In the big data platform, distributed storage is the basis of distributed computing, and the logical architecture diagram of the platform is shown in Figure 7. If the column family data is not partitioned, it will be concentrated on a certain disk in the storage process, which will form a read/write bottleneck during the calculation process, which will affect the distributed computing performance. By partitioning the column family data, the column group data can be allocated to multiple disks in a partitioned manner, and multiple disk 1/0 can be used to improve data reading capability, which is beneficial to the back-end big data platform to perform distributed computing on data. .
[0075] 请参看图 4, 本发明网络切换方法第四实施例, 本实施例以第三实施例为基础 , 对其中的步骤 S305进行了详细说明。 具体如下:  Referring to FIG. 4, a fourth embodiment of the network switching method of the present invention is provided. The present embodiment is based on the third embodiment, and step S305 is described in detail. details as follows:
[0076] 步骤 S400, 与第三实施例中的步骤 S300相同, 在此不再赘述。  [0076] Step S400 is the same as step S300 in the third embodiment, and details are not described herein again.
[0077] 步骤 S401 , 与第三实施例中的步骤 S301相同: 在此不再赘述 [0077] Step S401 is the same as step S301 in the third embodiment:
[0078] 步骤 S402, 与第三实施例中的步骤 S302相同: 在此不再赘述 [0078] Step S402 is the same as step S302 in the third embodiment:
[0079] 步骤 S403 , 与第三实施例中的步骤 S303相同: 在此不再赘述 [0079] Step S403 is the same as step S303 in the third embodiment:
[0080] 步骤 S404, 与第三实施例中的步骤 S304相同: 在此不再赘述 [0080] Step S404 is the same as step S304 in the third embodiment:
[0081] 步骤 S405 , 按照预设清理规则对所述分区列族数据进行清理, 并且将清理后的 数据进行压缩而获得压缩数据。 其中, 清理规则可以是对分区信息中相同设备 下的重复、 异常数据进行数据清理; 压缩方法可以采用 GZIP、 LZO以及 Snappy 等压缩算法进行压缩。 并且还可以在压缩吋进行加密或者对压缩后文件进行加 密, 例如 MD5、 RSA等加密方法。 [0081] Step S405: Clean the partition column family data according to a preset cleanup rule, and compress the cleaned data to obtain compressed data. The cleaning rule may be to perform data cleaning on the duplicate and abnormal data under the same device in the partition information; the compression method may be compressed by a compression algorithm such as GZIP, LZO, and Snappy. It can also be encrypted in compression or encrypted after compression, such as MD5, RSA and other encryption methods.
[0082] 步骤 S406, 将所述压缩数据按照预设网络规则转换为互联网协议数据。  [0082] Step S406: Convert the compressed data into Internet Protocol data according to a preset network rule.
[0083] 步骤 S407 , 与第三实施例中的步骤 S306相同, 在此不再赘述。 [0083] Step S407 is the same as step S306 in the third embodiment, and details are not described herein again.
[0084] 本实施例, 通过对数据进行清理再压缩, 则有利于最大化压缩, 减小网络传输 带宽。 [0084] In this embodiment, by cleaning and re-compressing data, it is advantageous to maximize compression and reduce network transmission bandwidth.
[0085] 请参看图 5, 本发明网络切换方法第五实施例, 本实施例以第四实施例为基础 , 新增一步骤。 具体如下:  Referring to FIG. 5, a fifth embodiment of the network switching method of the present invention is based on the fourth embodiment, and a new step is added. details as follows:
[0086] 步骤 S500, 与第三实施例中的步骤 S400相同, 在此不再赘述。  [0086] Step S500 is the same as step S400 in the third embodiment, and details are not described herein again.
[0087] 步骤 S501, 与第三实施例中的步骤 S401相同, 在此不再赘述。 [0088] 步骤 S502 与第三实施例中的步骤 S402相同, 在此不再赘述。 [0087] Step S501 is the same as step S401 in the third embodiment, and details are not described herein again. [0088] Step S502 is the same as step S402 in the third embodiment, and details are not described herein again.
[0089] 步骤 S503 与第三实施例中的步骤 S403相同, 在此不再赘述。  [0089] Step S503 is the same as step S403 in the third embodiment, and details are not described herein again.
[0090] 步骤 S504 与第三实施例中的步骤 S404相同, 在此不再赘述。  [0090] Step S504 is the same as step S404 in the third embodiment, and details are not described herein again.
[0091] 步骤 S505 与第三实施例中的步骤 S405相同, 在此不再赘述。  [0091] Step S505 is the same as step S405 in the third embodiment, and details are not described herein again.
[0092] 步骤 S506 将所述压缩数据进行备份储存。  [0092] Step S506: The compressed data is backed up and stored.
[0093] 步骤 S507 与第三实施例中的步骤 S406相同, 在此不再赘述。  [0093] Step S507 is the same as step S406 in the third embodiment, and details are not described herein again.
[0094] 步骤 S508 与第三实施例中的步骤 S407相同, 在此不再赘述。  [0094] Step S508 is the same as step S407 in the third embodiment, and details are not described herein again.
[0095] 本实施例 通过对压缩数据进行备份, 以备在网络出现故障吋做数据重传、 査 找等。 数据最长备份期限可以依据物联网网关每天经过处理后的数据量大小和 存储模块的容量进行计算确认, 用户可以自己设定, 但不能超过最长备份期限 , 推荐备份期限为 1到 3个月。  [0095] In this embodiment, the compressed data is backed up, so that data retransmission, search, and the like are performed in the event of a network failure. The maximum backup period of data can be calculated and confirmed according to the amount of data processed by the IoT gateway every day and the capacity of the storage module. Users can set it themselves, but it cannot exceed the maximum backup period. The recommended backup period is 1 to 3 months. .
[0096] 本发明还提供了一种物联网网关, 请参看图 8, 在该物联网网关应用实例中, 接入该物联网网关的感知设备 1、 感知设备 2、 感知设备 3、 感知设备 4, 每一感 知设备都用于检测一个蓄电池组, 这些蓄电池组用于组成蓄电池矩阵。 物联网 网关与网络连接, 在网络的另外两端连接有客户端和大数据平台。 The present invention also provides an Internet of Things gateway. Referring to FIG. 8, in the IoT gateway application example, the sensing device 1, the sensing device 2, the sensing device 3, and the sensing device 4 of the IoT gateway are accessed. Each sensing device is used to detect a battery pack that is used to form a battery matrix. The Internet of Things Gateway connects to the network, with clients and big data platforms connected to the other ends of the network.
[0097] 请参看图 9, 所述物联网网关包括: [0097] Referring to FIG. 9, the Internet of Things gateway includes:
[0098] 解析模块 1000, 用于针对接入物联网网关的感知设备通过异构协议传入的数据 进行解析, 而获得所述感知设备的数据信息; 其中, 接入物联网网关的感知设 备有多个, 并且通常包括多种类型。 每一种类型感知设备都将通过异构协议来 传输数据至物联网网关。 通过异构协议传输的数据至少包括两个部分, 其中之 一为感知设备在监控过程中获得的相关数据, 其中之另一为感知设备传输数据 所采用的协议类型。 则物联网网关在接收到所述数据信息吋, 可以根据所述数 据信息中的协议类型对相关数据进行解析。  [0098] The parsing module 1000 is configured to obtain, by the sensing device accessing the Internet of Things gateway, the data sent by the heterogeneous protocol, and obtain the data information of the sensing device; wherein, the sensing device accessing the Internet of Things gateway has Multiple, and usually include multiple types. Each type of device will transmit data to the IoT gateway through heterogeneous protocols. The data transmitted through the heterogeneous protocol includes at least two parts, one of which is related data obtained by the sensing device during the monitoring process, and the other of which is the type of protocol used by the sensing device to transmit data. After receiving the data information, the Internet of Things gateway can parse the related data according to the protocol type in the data information.
[0099] 第一数据处理模块 1100, 用于按预设分片规则对所述数据信息进行数据分片, 而获得分片数据; 所述数据信息中包含数据的属性, 例如: 感知设备所采用的 协议类型及其他属性。 具体分片方法, 可以以固定吋间间隔为分片单位、 或以 缓存数据的大小为分片单位。  [0099] The first data processing module 1100 is configured to perform data fragmentation on the data information according to a preset fragmentation rule to obtain fragmentation data; the data information includes attributes of the data, for example: used by the sensing device Protocol type and other attributes. For the specific fragmentation method, the fixed inter-frame interval may be a slice unit, or the size of the cache data may be a slice unit.
[0100] 第二数据处理模块 1200, 用于将所述分片数据打包转换为互联网协议数据; [0101] 数据发送模块 1300, 用于将所述互联网协议数据发出。 其中, 互联网协议数据 用于实现前端感知设备与网络的互联。 [0100] The second data processing module 1200 is configured to package the fragment data into Internet Protocol data. [0101] The data sending module 1300 is configured to send the internet protocol data. The Internet Protocol data is used to implement the interconnection between the front-end sensing device and the network.
[0102] 本实施例, 通过对物联网网关内的数据信息进行分片操作, 则将实吋数据流转 换为分批数据, 可以增大后续处理过程中每次处理的数据量, 减少处理次数, 从而达到提高数据的传输和处理效率的效果, 利于后续接收数据的大数据平台 的快速存储以及数据分析。 [0102] In this embodiment, by performing a fragmentation operation on the data information in the Internet of Things gateway, the real data stream is converted into batch data, which can increase the amount of data processed in each subsequent processing process, and reduce the number of processing times. Therefore, the effect of improving data transmission and processing efficiency is achieved, which facilitates rapid storage and data analysis of a big data platform that subsequently receives data.
[0103] 优选的, 所述第二数据处理模块 1200具体用于: [0103] Preferably, the second data processing module 1200 is specifically configured to:
[0104] 根据所述分片数据的数据属性设置数据的列族。 [0104] The column family of data is set according to the data attribute of the slice data.
[0105] 将所述分片数据按照所述列族进行分块, 而获得对应所述分片数据的列族数据 。 请结合参看图 6, 例如, 根据固定的吋间间隔 30s来进行数据分片; 每一分片数 据当中都包括数据: 温度、 湿度、 电流、 电压、 位置和设备 ID; 则本实施例将 设立包括温度、 湿度、 电流、 电压、 位置和设备 ID的数据的列族; 进一步将同 一分片数据的同一列族的数据放在一起, 即实现了分片数据的列式存储逻辑。  [0105] The fragment data is divided according to the column family, and column family data corresponding to the fragment data is obtained. Referring to FIG. 6, for example, data segmentation is performed according to a fixed inter-turn interval 30s; data is included in each slice data: temperature, humidity, current, voltage, position, and device ID; then this embodiment will be established The column family of data including temperature, humidity, current, voltage, position, and device ID; further put together the data of the same column family of the same piece of data, that is, the columnar storage logic of the sliced data is realized.
[0106] 将所述列族数据块打包转换为互联网协议数据。  [0106] Converting the column family data block into internet protocol data.
[0107] 本实施例, 通过将分片数据按照列族进行分块, 则可以获得相同属性的数据放 置在一起的效果。 进一步, 因为相同属性数据之间的相似性, 相同数据属性更 有利于提高数据的压缩能力, 从而也降低了网络传输带宽。 同吋, 在后端大数 据平台中也方便于做列式存储、 数据处理等工作。  [0107] In this embodiment, by dividing the slice data into columns by the column family, the effect that the data of the same attribute is placed together can be obtained. Further, because of the similarity between the same attribute data, the same data attribute is more conducive to improving the data compression capability, thereby reducing the network transmission bandwidth. At the same time, it is also convenient to do column storage, data processing, etc. in the back-end big data platform.
[0108] 优选的, 所述第二数据处理模块 1200的将所述列族数据块打包转换为互联网协 议数据的步骤包括:  [0108] Preferably, the step of converting, by the second data processing module 1200, the column family data block into the internet protocol data comprises:
[0109] 按预设规则将所述列族数据的块数据进行分区处理, 而获得块数据具有逻辑分 区的分区列族数据; 其中, 对列族数据进行分区的方法可以通过使用散列 Hash 或用户指定等方法对列族数据进行散列。 请结合参看图 6, 该举例中, 对电压列 族的保存方式进行了示例, 其电压列族被分为了 N个分区。  [0109] partitioning the block data of the column family data according to a preset rule to obtain partition column family data of the block data having a logical partition; wherein the method of partitioning the column family data may be performed by using a hash hash or User-specified methods and other methods hash the column family data. Please refer to Figure 6. In this example, the storage mode of the voltage family is exemplified, and the voltage column family is divided into N partitions.
[0110] 将所述分区列族数据打包转换为互联网协议数据。  [0110] packaging the partitioned column family data into internet protocol data.
[0111] 本实施例, 通过对块数据进行散列处理, 可以使块数据散列到不同的分区中, 使得块数据可以分散进行存储, 可以解决数据的倾斜问题, 提升数据读取能力 。 在大数据平台中, 分布式存储是分布式计算的基础, 其平台的逻辑架构图如 图 7所示。 如果未对列族数据进行分区操作, 在存储过程中会集中在某一个磁盘 上, 在计算过程中会形成读写瓶颈, 影响分布式计算性能。 通过对列族数据进 行分区, 可以将列组数据按照分区方式分配到多个磁盘上, 利用多个磁盘 I/O, 提升数据读取能力, 有利于后端大数据平台对数据进行分布式运算。 [0111] In this embodiment, by performing hash processing on the block data, the block data can be hashed into different partitions, so that the block data can be distributed and stored, and the data tilt problem can be solved, and the data reading capability can be improved. In the big data platform, distributed storage is the basis of distributed computing, and the logical architecture diagram of its platform is as Figure 7 shows. If the column family data is not partitioned, it will be concentrated on a certain disk in the storage process, which will form a read-write bottleneck during the calculation process, which affects the distributed computing performance. By partitioning the column family data, the column group data can be allocated to multiple disks in a partitioned manner, and multiple disk I/Os can be used to improve data reading capability, which is beneficial to the back-end big data platform to perform distributed computing on data. .
[0112] 优选的, 所述第二数据处理模块 1200的打包转换为互联网协议数据的步骤包括 [0112] Preferably, the step of converting the packet of the second data processing module 1200 into internet protocol data comprises:
[0113] 按照预设清理规则对数据进行清理, 并且将清理后的数据进行压缩而获得压缩 数据; 其中, 清理规则可以是对分区信息中相同设备下的重复、 异常数据进行 数据清理; 压缩方法可以采用 GZIP、 LZO以及 Snappy等压缩算法进行压缩。 并 且还可以在压缩吋进行加密或者对压缩后文件进行加密, 例如 MD5、 RSA等加 密方法。 [0113] the data is cleaned according to the preset cleaning rule, and the cleaned data is compressed to obtain compressed data; wherein, the cleaning rule may be data cleaning of duplicate and abnormal data under the same device in the partition information; Compression can be performed using compression algorithms such as GZIP, LZO, and Snappy. It can also be encrypted in compression or encrypted after compression, such as MD5, RSA and other encryption methods.
[0114] 将所述压缩数据按照预设网络规则转换为互联网协议数据。  [0114] converting the compressed data into internet protocol data according to a preset network rule.
[0115] 本实施例, 通过对数据进行清理再压缩, 则有利于最大化压缩, 减小网络传输 带宽。  [0115] In this embodiment, by cleaning and re-compressing data, it is advantageous to maximize compression and reduce network transmission bandwidth.
[0116] 优选的, 所述物联网网关还包括:  [0116] Preferably, the Internet of Things gateway further includes:
[0117] 备份模块 1400, 用于在所述第二数据处理模块 1200在所述将所述压缩数据按照 预设网络规则转换为互联网协议数据的步骤之前, 将所述压缩数据进行备份储 存。  [0117] The backup module 1400 is configured to perform backup storage on the compressed data before the step of converting the compressed data into Internet protocol data according to the preset network rule by the second data processing module 1200.
[0118] 本实施例, 通过对压缩数据进行备份, 以备在网络出现故障吋做数据重传、 査 找等。 数据最长备份期限可以依据物联网网关每天经过处理后的数据量大小和 存储模块的容量进行计算确认, 用户可以自己设定, 但不能超过最长备份期限 , 推荐备份期限为 1到 3个月。  [0118] In this embodiment, the compressed data is backed up, so as to perform data retransmission, search, and the like in the event of a network failure. The maximum backup period of data can be calculated and confirmed according to the amount of data processed by the IoT gateway every day and the capacity of the storage module. Users can set it themselves, but it cannot exceed the maximum backup period. The recommended backup period is 1 to 3 months. .
[0119] 需要说明的是, 在本文中, 术语"包括"、 "包含 "或者其任何其他变体意在涵盖 非排他性的包含, 从而使得包括一系列要素的过程、 方法、 物品或者装置不仅 包括那些要素, 而且还包括没有明确列出的其他要素, 或者是还包括为这种过 程、 方法、 物品或者装置所固有的要素。 在没有更多限制的情况下, 由语句 "包 括一个 ...... "限定的要素, 并不排除在包括该要素的过程、 方法、 物品或者装置 中还存在另外的相同要素。 [0120] 上述本发明实施例序号仅仅为了描述, 不代表实施例的优劣。 [0119] It is to be noted that the terms "comprising", "including", or any other variants thereof are intended to encompass a non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes Those elements, but also other elements not explicitly listed, or elements that are inherent to such a process, method, item or device. An element that is defined by the phrase "comprising a ..." does not exclude the presence of additional elements in the process, method, article, or device that comprises the element. [0120] The foregoing serial numbers of the embodiments of the present invention are merely for the description, and do not represent the advantages and disadvantages of the embodiments.
[0121] 通过以上的实施方式的描述, 本领域的技术人员可以清楚地了解到上述实施例 方法可借助软件加必需的通用硬件平台的方式来实现, 当然也可以通过硬件, 但很多情况下前者是更佳的实施方式。 基于这样的理解, 本发明的技术方案本 质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来, 该计 算机软件产品存储在一个存储介质 (如 ROM/RAM、 磁碟、 光盘) 中, 包括若干 指令用以使得一台终端设备 (可以是移动终端, 计算机, 服务器, 空调器, 或 者网络设备等) 执行本发明各个实施例所述的方法。 [0121] Through the description of the above embodiments, those skilled in the art can clearly understand that the foregoing embodiment method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be through hardware, but in many cases, the former It is a better implementation. Based on such understanding, the technical solution of the present invention, which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk, The optical disc includes a number of instructions for causing a terminal device (which may be a mobile terminal, a computer, a server, an air conditioner, or a network device, etc.) to perform the methods described in various embodiments of the present invention.
[0122] 以上仅为本发明的优选实施例, 并非因此限制本发明的专利范围, 凡是利用本 发明说明书及附图内容所作的等效结构或等效流程变换, 或直接或间接运用在 其他相关的技术领域, 均同理包括在本发明的专利保护范围内。 The above are only the preferred embodiments of the present invention, and are not intended to limit the scope of the present invention, and the equivalent structure or equivalent process transformations made by the description of the present invention and the contents of the drawings may be directly or indirectly applied to other related The technical field is equally included in the scope of patent protection of the present invention.
工业实用性  Industrial applicability
[0123] 本发明所提供的物联网网关数据管理方法和物联网网关, 通过将数据信息进行 分片操作, 则将实吋数据流转换为分批数据, 可以增大后续处理过程中每次处 理的数据量, 减少处理次数, 从而达到提高数据的传输和处理效率的效果, 利 于后续接收数据的大数据平台的快速存储以及数据分析。  [0123] The IoT gateway data management method and the Internet of Things gateway provided by the present invention convert the real data stream into batch data by performing the fragmentation operation on the data information, which can increase each processing in the subsequent processing process. The amount of data reduces the number of processing, thereby improving the efficiency of data transmission and processing, and facilitating the rapid storage and data analysis of the big data platform that subsequently receives data.

Claims

权利要求书 Claim
一种物联网网关数据管理方法, 所述数据管理方法包括步骤: 针对接入物联网网关的感知设备通过异构协议传入的数据进行解析, 而获得所述感知设备的数据信息; An IoT gateway data management method, the data management method includes the steps of: obtaining, by the sensing device accessing the Internet of Things gateway, the data transmitted by the heterogeneous protocol, and obtaining the data information of the sensing device;
在所述物联网网关中按预设分片规则对所述数据信息进行数据分片, 而获得分片数据; 所述数据信息中包含数据的属性; Performing data fragmentation on the data information according to a preset fragmentation rule in the Internet of Things gateway to obtain fragmentation data; the data information includes attributes of the data;
将所述分片数据打包转换为互联网协议数据; Converting the fragmented data into internet protocol data;
将所述互联网协议数据发出。 The internet protocol data is sent.
如权利要求 1所述的物联网网关数据管理方法, 其中, 所述将所述分 片数据打包转换为互联网协议数据的步骤包括: The method of managing the Internet of Things gateway data according to claim 1, wherein the step of converting the fragmented data into Internet Protocol data comprises:
根据所述分片数据的数据属性设置数据的列族; Setting a column family of data according to a data attribute of the slice data;
将所述分片数据按照所述列族进行分块, 而获得对应所述分片数据的 列族数据; And dividing the fragment data according to the column family to obtain column family data corresponding to the fragment data;
将所述列族数据打包转换为互联网协议数据。 The column family data is packaged and converted into internet protocol data.
如权利要求 2所述的物联网网关数据管理方法, 其中, 所述将所述列 族数据打包转换为互联网协议数据的步骤包括: The IoT gateway data management method according to claim 2, wherein the step of converting the column family data into Internet Protocol data comprises:
按预设规则将所述列族数据的块数据进行分区处理, 而获得块数据具 有逻辑分区的分区列族数据; The block data of the column family data is partitioned according to a preset rule, and the partition column family data of the block data having the logical partition is obtained;
将所述分区列族数据打包转换为互联网协议数据。 The partitioned column family data is packaged and converted into internet protocol data.
如权利要求 1所述的物联网网关数据管理方法, 其中, 所述打包转换 为互联网协议数据的步骤包括: The method for managing an Internet of Things gateway data according to claim 1, wherein the step of converting the package into Internet Protocol data comprises:
按照预设清理规则对数据进行清理, 并且将清理后的数据进行压缩而 获得压缩数据; The data is cleaned according to a preset cleaning rule, and the cleaned data is compressed to obtain compressed data;
将所述压缩数据按照预设网络规则转换为互联网协议数据。 Converting the compressed data into Internet Protocol data according to a preset network rule.
如权利要求 4所述的物联网网关数据管理方法, 其中, 所述将所述压 缩数据按照预设网络规则转换为互联网协议数据的步骤之前还包括: 将所述压缩数据进行备份储存。 The method for managing the Internet of Things gateway data according to claim 4, wherein the step of converting the compressed data into the Internet Protocol data according to the preset network rule further comprises: backing up the compressed data.
一种物联网网关, 所述物联网网关包括: 解析模块, 用于针对接入物联网网关的感知设备通过异构协议传入的 数据进行解析, 而获得所述感知设备的数据信息; An IoT gateway, the IoT gateway includes: a parsing module, configured to parse the data sent by the heterogeneous protocol for the sensing device accessing the Internet of Things gateway to obtain the data information of the sensing device;
第一数据处理模块, 用于按预设分片规则对所述数据信息进行数据分 片, 而获得分片数据; 所述数据信息中包含数据的属性; a first data processing module, configured to perform data fragmentation on the data information according to a preset fragmentation rule, to obtain fragmentation data; where the data information includes attributes of the data;
第二数据处理模块, 用于将所述分片数据打包转换为互联网协议数据 数据发送模块, 用于将所述互联网协议数据发出。 And a second data processing module, configured to package the fragment data into an internet protocol data data sending module, configured to send the internet protocol data.
如权利要求 6所述的物联网网关, 其中, 所述第二数据处理模块具体 用于: The IoT gateway according to claim 6, wherein the second data processing module is specifically configured to:
根据所述分片数据的数据属性设置数据的列族; Setting a column family of data according to a data attribute of the slice data;
将所述分片数据按照所述列族进行分块, 而获得对应所述分片数据的 列族数据; And dividing the fragment data according to the column family to obtain column family data corresponding to the fragment data;
将所述列族数据块打包转换为互联网协议数据。 The column family data block is packaged and converted into internet protocol data.
如权利要求 7所述的物联网网关, 其中, 所述第二数据处理模块的将 所述列族数据块打包转换为互联网协议数据的步骤包括: The IoT gateway according to claim 7, wherein the step of converting, by the second data processing module, the column family data block into internet protocol data comprises:
按预设规则将所述列族数据的块数据进行分区处理, 而获得块数据具 有逻辑分区的分区列族数据; The block data of the column family data is partitioned according to a preset rule, and the partition column family data of the block data having the logical partition is obtained;
将所述分区列族数据打包转换为互联网协议数据。 The partitioned column family data is packaged and converted into internet protocol data.
如权利要求 6所述的物联网网关, 其中, 所述第二数据处理模块的打 包转换为互联网协议数据的步骤包括: The IoT gateway according to claim 6, wherein the step of converting the packet of the second data processing module into Internet Protocol data comprises:
按照预设清理规则对数据进行清理, 并且将清理后的数据进行压缩而 获得压缩数据; The data is cleaned according to a preset cleaning rule, and the cleaned data is compressed to obtain compressed data;
将所述压缩数据按照预设网络规则转换为互联网协议数据。 Converting the compressed data into Internet Protocol data according to a preset network rule.
如权利要求 9所述的物联网网关, 其中, 所述物联网网关还包括: 备份模块, 用于在所述第二数据处理模块在所述将所述压缩数据按照 预设网络规则转换为互联网协议数据的步骤之前, 将所述压缩数据进 行备份储存。 The IoT gateway of claim 9, wherein the IoT gateway further comprises: a backup module, configured to: in the second data processing module, convert the compressed data into an internet according to a preset network rule The compressed data is backed up and stored before the step of the protocol data.
PCT/CN2017/077628 2017-03-22 2017-03-22 Internet of things gateway data management method and internet of things gateway WO2018170773A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2017/077628 WO2018170773A1 (en) 2017-03-22 2017-03-22 Internet of things gateway data management method and internet of things gateway

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2017/077628 WO2018170773A1 (en) 2017-03-22 2017-03-22 Internet of things gateway data management method and internet of things gateway

Publications (1)

Publication Number Publication Date
WO2018170773A1 true WO2018170773A1 (en) 2018-09-27

Family

ID=63584863

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/077628 WO2018170773A1 (en) 2017-03-22 2017-03-22 Internet of things gateway data management method and internet of things gateway

Country Status (1)

Country Link
WO (1) WO2018170773A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101795480A (en) * 2009-11-10 2010-08-04 王晓喃 Route implementing system for total IP communication of wireless sensor network and IPv6 network
CN101958835A (en) * 2010-09-28 2011-01-26 深圳中兴力维技术有限公司 Data transmission method and logic network adapter
CN104507076A (en) * 2014-11-19 2015-04-08 哈尔滨工程大学 Practical Internet of things application platform based on Contiki system and 61br system
US20150347555A1 (en) * 2014-05-31 2015-12-03 Linkedin Corporation Waterwheel sharding
CN105393251A (en) * 2013-06-12 2016-03-09 甲骨文国际公司 An in-database sharded queue

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101795480A (en) * 2009-11-10 2010-08-04 王晓喃 Route implementing system for total IP communication of wireless sensor network and IPv6 network
CN101958835A (en) * 2010-09-28 2011-01-26 深圳中兴力维技术有限公司 Data transmission method and logic network adapter
CN105393251A (en) * 2013-06-12 2016-03-09 甲骨文国际公司 An in-database sharded queue
US20150347555A1 (en) * 2014-05-31 2015-12-03 Linkedin Corporation Waterwheel sharding
CN104507076A (en) * 2014-11-19 2015-04-08 哈尔滨工程大学 Practical Internet of things application platform based on Contiki system and 61br system

Similar Documents

Publication Publication Date Title
JP6106901B2 (en) Data processing method and device in distributed file storage system
US9430336B2 (en) Dispersed storage network with metadata generation and methods for use therewith
US8447898B2 (en) Task offload to a peripheral device
US10860245B2 (en) Method and apparatus for optimizing data storage based on application
US8601210B2 (en) Cache memory allocation process based on TCPIP network and/or storage area network array parameters
US20120209967A1 (en) Scalable distributed storage and delivery
US20070104118A1 (en) Determining, transmitting, and receiving performance information with respect to an operation performed locally and at remote nodes
JP5554817B2 (en) Data transmission apparatus and method
US20070098010A1 (en) Offloading processing tasks to a peripheral device
US20070101023A1 (en) Multiple task offload to a peripheral device
WO2013178155A1 (en) Storage method and apparatus for distributed file system
CN104714905A (en) Method and system for performing a failover operation from the first adapter to the second adapter
CN114201421B (en) Data stream processing method, storage control node and readable storage medium
WO2023279912A1 (en) Data processing method, apparatus and system, computer device, readable storage medium, and computer program product
US10521317B1 (en) Compressing data to be replicated utilizing a compression method selected based on network behavior
WO2006074064A2 (en) Method and apparatus for managing data object size in a multi-user environment
US11762557B2 (en) System and method for data compaction and encryption of anonymized datasets
CN102843284B (en) ISCSI memory node, framework and reading, wiring method
CN107422989A (en) A kind of more copy read methods of Server SAN systems and storage architecture
US8676928B1 (en) Method and system for writing network data
WO2018170773A1 (en) Internet of things gateway data management method and internet of things gateway
US20180067820A1 (en) Method and system for using pre-existing connections in a dispersed storage network
CN102006285B (en) A kind of message processing method for Network Security Device and device
WO2013086867A1 (en) Information processing method and equipment
CN115617760A (en) Method for rapidly uploading large-batch files

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17902420

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17902420

Country of ref document: EP

Kind code of ref document: A1