[go: up one dir, main page]

CN114666406A - Object model-based power internet of things data compression method and device - Google Patents

Object model-based power internet of things data compression method and device Download PDF

Info

Publication number
CN114666406A
CN114666406A CN202210172089.4A CN202210172089A CN114666406A CN 114666406 A CN114666406 A CN 114666406A CN 202210172089 A CN202210172089 A CN 202210172089A CN 114666406 A CN114666406 A CN 114666406A
Authority
CN
China
Prior art keywords
format
data
compression
data message
dictionary file
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
CN202210172089.4A
Other languages
Chinese (zh)
Other versions
CN114666406B (en
Inventor
侯继鑫
赵京虎
吴子栋
乔柱
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NARI Technology Co Ltd
Original Assignee
NARI Technology Co Ltd
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 NARI Technology Co Ltd filed Critical NARI Technology Co Ltd
Priority to CN202210172089.4A priority Critical patent/CN114666406B/en
Publication of CN114666406A publication Critical patent/CN114666406A/en
Application granted granted Critical
Publication of CN114666406B publication Critical patent/CN114666406B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16YINFORMATION AND COMMUNICATION TECHNOLOGY SPECIALLY ADAPTED FOR THE INTERNET OF THINGS [IoT]
    • G16Y10/00Economic sectors
    • G16Y10/35Utilities, e.g. electricity, gas or water
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16YINFORMATION AND COMMUNICATION TECHNOLOGY SPECIALLY ADAPTED FOR THE INTERNET OF THINGS [IoT]
    • G16Y10/00Economic sectors
    • G16Y10/75Information technology; Communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/04Protocols for data compression, e.g. ROHC

Landscapes

  • Engineering & Computer Science (AREA)
  • Computing Systems (AREA)
  • Economics (AREA)
  • Business, Economics & Management (AREA)
  • General Business, Economics & Management (AREA)
  • Development Economics (AREA)
  • Accounting & Taxation (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Computer Security & Cryptography (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

本发明公开了一种基于物模型的电力物联网数据压缩方法及装置。在物联管理平台和边缘代理之间增加压缩和解压缩模块,由物联管理平台根据物模型文件自动生成压缩字典文件并同步在边缘代理保存,在数据传输时根据压缩字典完成自动压缩和解压,该方法对基于智慧物联体系的业务系统完全透明,既保障了系统交互过程中采用JSON格式的简单、灵活性,又提升了数据传输效率。

Figure 202210172089

The invention discloses a method and device for data compression of the Internet of Things in electric power based on an object model. A compression and decompression module is added between the IoT management platform and the edge agent. The IoT management platform automatically generates a compression dictionary file according to the object model file and saves it on the edge agent synchronously. Automatic compression and decompression are completed according to the compression dictionary during data transmission. This method is completely transparent to the business system based on the intelligent IoT system, which not only ensures the simplicity and flexibility of using the JSON format in the system interaction process, but also improves the efficiency of data transmission.

Figure 202210172089

Description

一种基于物模型的电力物联网数据压缩方法及装置A method and device for data compression of power internet of things based on object model

技术领域technical field

本发明属于电力物联网领域,涉及一种基于物模型的电力物联网数据压缩方法及装置,尤指一种适用于海量、实时、高频短小数据报文的高效压缩。The invention belongs to the field of the power Internet of things, and relates to a data compression method and device for the power Internet of things based on an object model, in particular to an efficient compression suitable for massive, real-time, high-frequency, short and small data packets.

背景技术Background technique

国网公司在2019年提出建设智慧物联体系,为发、输、配、变用各专业提供统一的物联管理服务,对下统筹各领域物联和感知需求,并基于物模型实现统一物联管理和终端标准化接入;对上为中台及业务系统提供标准的数据服务,形成跨专业数据共享共用的生态。该体系已经在江苏、山东等实现了规模化接入,成为电力物联网数据采集的基础平台。In 2019, State Grid proposed to build a smart IoT system to provide unified IoT management services for all majors in development, transmission, distribution, and transformation, coordinate IoT and perception needs in various fields, and realize unified IoT based on the IoT model. Link management and terminal standardized access; provide standard data services for middle-office and business systems to form an ecosystem of cross-professional data sharing and sharing. The system has achieved large-scale access in Jiangsu, Shandong, etc., and has become the basic platform for data collection of the power Internet of Things.

在智慧物联体系架构中,云边传输的报文具有长度小、传输频度高的特点,主要采用JSON格式组织数据,该方式简单、易用、自描述能力强,便于业务系统间数据交互,但是存在数据传输效率低的问题,以配电领域交采应用为例,其数据有效率不足40%。在智慧物联体系规模化应用后,数据传输效率低造成带宽浪费,大幅增加了生产成本。In the smart IoT architecture, the messages transmitted by the cloud edge have the characteristics of small length and high transmission frequency. The data is mainly organized in JSON format. This method is simple, easy to use, and has strong self-describing ability, which facilitates data interaction between business systems. , but there is a problem of low data transmission efficiency. Taking the application of power distribution in the field of power distribution as an example, the data efficiency is less than 40%. After the large-scale application of the smart IoT system, the low data transmission efficiency results in wasted bandwidth and greatly increases production costs.

在传统电力规约中,通过点号映射减少描述信息传输,提升传输效率,但是点号配置和维护需要耗费大量人力且容易出错。In traditional power regulations, the transmission of descriptive information is reduced through point ID mapping and the transmission efficiency is improved, but the configuration and maintenance of point IDs require a lot of manpower and are prone to errors.

发明内容SUMMARY OF THE INVENTION

本发明的目的在于提出一种基于物模型的电力物联网数据压缩方法及装置,以解决电力物联网规模化应用中采用JSON格式报文传输数据时,存在由于长度短、传输频度高的海量实时数据无法有效压缩导致云边信息传输效率低、带宽资源浪费严重等问题。The purpose of the present invention is to propose a method and device for compressing data of the Internet of Things in electric power based on the object model, so as to solve the problem that when the JSON format message is used to transmit data in the large-scale application of the Internet of Things in the electric power, there is a large amount of data due to short length and high transmission frequency. Real-time data cannot be effectively compressed, resulting in low cloud-side information transmission efficiency and serious waste of bandwidth resources.

为解决上述问题,本发明采用如下技术方案:In order to solve the above problems, the present invention adopts the following technical solutions:

一方面,一种基于物模型的电力物联网数据压缩方法,包括:In one aspect, a data compression method for the Internet of Things in electric power based on an object model includes:

根据预先生成并保存在物联管理平台上的压缩字典文件,对物联管理平台向边缘代理发送的第一格式的数据报文进行压缩,生成第二格式的数据报文,将第二格式的数据报文传输至边缘代理;以及,According to the compression dictionary file pre-generated and saved on the IoT management platform, compress the data message in the first format sent by the IoT management platform to the edge agent, generate a data message in the second format, and compress the data message in the second format. The datagram is transmitted to the edge proxy; and,

根据所述压缩字典文件,对物联管理平台接收的第二格式的数据报文进行解压缩,生成第一格式的数据报文;According to the compression dictionary file, decompress the data message in the second format received by the IoT management platform to generate the data message in the first format;

其中,所述压缩字典文件是根据设备物模型文件自动生成的,每个物模型文件对应一个压缩字典文件。The compression dictionary file is automatically generated according to the device object model file, and each object model file corresponds to a compression dictionary file.

进一步地,物联管理平台上生成的压缩字典文件同步保存在边缘代理上,所述基于物模型的电力物联网数据压缩方法,还包括:Further, the compression dictionary file generated on the IoT management platform is synchronously stored on the edge agent, and the method for compressing data on the Internet of Things in electric power based on the object model further includes:

根据同步保存在边缘代理上的压缩字典文件,对边缘代理向物联管理平台发送的第一格式的数据报文进行压缩,生成第二格式的数据报文,将第二格式的数据报文传输至物联管理平台;以及,According to the compression dictionary file synchronously saved on the edge agent, compress the data packets in the first format sent by the edge agent to the IoT management platform, generate data packets in the second format, and transmit the data packets in the second format. to the IoT Management Platform; and,

根据所述压缩字典文件,对边缘代理接收的第二格式的数据报文进行解压缩,生成第一格式的数据报文。According to the compression dictionary file, the data message in the second format received by the edge agent is decompressed to generate the data message in the first format.

进一步地,所述压缩字典文件根据以下方法生成:Further, the compression dictionary file is generated according to the following method:

将物模型文件中的数据分为字符串类型、数字类型、枚举类型和复合类型;Divide the data in the object model file into string types, numeric types, enumeration types and composite types;

字符串类型采用常量存储或者直接存储,常量存储方式为在字段名编码后直接存储字符串常量的ID,每个物模型文件对应一个字符串常量字典,所述字符串常量字典对每个常量进行编码;直接存储方式为首先存储字段名编码,然后存储字符串长度,最后存储字符串内容;The string type adopts constant storage or direct storage. The constant storage method is to directly store the ID of the string constant after the field name is encoded. Each object model file corresponds to a string constant dictionary. Encoding; the direct storage method is to first store the field name encoding, then store the length of the string, and finally store the content of the string;

数字类型和枚举类型在压缩时在字段名编码后直接存储数值内容;Numerical types and enumeration types directly store the numeric content after the field name is encoded during compression;

复合类型压缩时首先存储字段名编码,然后存储“子成员数量”,子成员对象随后按序排列,子成员之间用分隔符隔离。When the composite type is compressed, the field name code is first stored, and then the "number of sub-members" is stored. The sub-member objects are then arranged in order, and the sub-members are separated by separators.

进一步地,所述物联管理平台保存设备ID和字典文件的映射关系,当物联管理平台向边缘代理发送第一格式的数据报文时,对第一格式的数据报文进行拦截并从中解析出设备ID,根据设备ID查找对应的压缩字典文件,根据压缩字典文件对第一格式的数据报文进行压缩;当物联管理平台接收到第二格式的数据报文时,对接收到的第二格式的数据报文进行拦截并从中解析出设备ID,根据设备ID查找对应的压缩字典文件,根据压缩字典文件对第二格式的数据报文进行解压缩。Further, the IOT management platform saves the mapping relationship between the device ID and the dictionary file, and when the IOT management platform sends a data message in the first format to the edge agent, it intercepts and parses the data message in the first format. Get the device ID, look up the corresponding compression dictionary file according to the device ID, and compress the data message in the first format according to the compression dictionary file; when the IoT management platform receives the data message in the second format, it will The data message in the second format is intercepted and the device ID is parsed therefrom, the corresponding compression dictionary file is searched according to the device ID, and the data message in the second format is decompressed according to the compression dictionary file.

进一步地,所述边缘代理同步保存设备ID和字典文件的映射关系,当边缘代理向物联管理平台发送第一格式的数据报文时,对第一格式的数据报文进行拦截并从中解析出设备ID,根据设备ID查找对应的压缩字典文件,根据压缩字典文件对第一格式的数据报文进行压缩;当边缘代理接收第二格式的数据报文时,对接收到的第二格式的数据报文进行拦截并从中解析出设备ID,根据设备ID查找对应的压缩字典文件,根据压缩字典文件对第二格式的数据报文进行解压缩。Further, the edge agent synchronously saves the mapping relationship between the device ID and the dictionary file, and when the edge agent sends the data message in the first format to the IoT management platform, it intercepts the data message in the first format and parses it out. Device ID, find the corresponding compression dictionary file according to the device ID, and compress the data message in the first format according to the compression dictionary file; when the edge agent receives the data message in the second format, the received data in the second format is The packet is intercepted, the device ID is parsed from it, the corresponding compression dictionary file is searched according to the device ID, and the data packet in the second format is decompressed according to the compression dictionary file.

另一方面,一种基于物模型的电力物联网数据压缩装置,包括:部署在物联管理平台上的第一数据压缩模块和第一数据解压缩模块,In another aspect, a data compression device for the Internet of Things in electric power based on an object model includes: a first data compression module and a first data decompression module deployed on an IoT management platform,

所述第一数据压缩模块,用于根据预先生成并保存在物联管理平台上的压缩字典文件,对物联管理平台向边缘代理发送的第一格式的数据报文进行压缩,生成第二格式的数据报文,将第二格式的数据报文传输至边缘代理;The first data compression module is used to compress the data message in the first format sent by the IoT management platform to the edge agent according to the compression dictionary file pre-generated and stored on the IoT management platform, and generate a second format. The data message in the second format is transmitted to the edge agent;

所述第一数据解压缩模块,用于根据所述压缩字典文件,对物联管理平台接收的第二格式的数据报文进行解压缩,生成第一格式的数据报文;The first data decompression module is configured to decompress the data message in the second format received by the IoT management platform according to the compression dictionary file, and generate the data message in the first format;

其中,所述压缩字典文件是根据设备物模型文件自动生成的,每个物模型文件对应一个压缩字典文件。The compression dictionary file is automatically generated according to the device object model file, and each object model file corresponds to a compression dictionary file.

进一步地,所述的一种基于物模型的电力物联网数据压缩装置,还包括:部署在边缘代理上的第二数据压缩模块和第二数据解压缩模块,Further, the described device for data compression of the Internet of Things in electric power based on the object model further includes: a second data compression module and a second data decompression module deployed on the edge agent,

所述第二数据压缩模块,用于根据同步保存在边缘代理上的压缩字典文件,对边缘代理向物联管理平台发送的第一格式的数据报文进行压缩,生成第二格式的数据报文,将第二格式的数据报文传输至物联管理平台;The second data compression module is used for compressing the data message in the first format sent by the edge agent to the IoT management platform according to the compression dictionary file synchronously stored on the edge agent to generate the data message in the second format , transmit the data message in the second format to the IoT management platform;

所述第二数据解压缩模块,用于根据所述压缩字典文件,对边缘代理接收的第二格式的数据报文进行解压缩,生成第一格式的数据报文。The second data decompression module is configured to decompress the data message in the second format received by the edge agent according to the compression dictionary file, and generate the data message in the first format.

进一步地,所述的一种基于物模型的电力物联网数据高效传输系统,还包括:字典生成模块,所述字典生成模块部署在物联管理平台上,用于根据设备物模型文件生成压缩字典文件。Further, the described system for efficient data transmission based on the object model of the power Internet of Things further includes: a dictionary generation module, the dictionary generation module is deployed on the IOT management platform, and is used for generating a compression dictionary according to the device object model file document.

进一步地,所述的一种基于物模型的电力物联网数据高效传输系统,还包括:部署在物联管理平台上的第一字典同步模块和部署在边缘代理上的第二字典同步模块,所述第一字典同步模块用于将字典生成模块生成的字典文件的描述信息发送至边缘代理,第二字典同步模块用于根据所述描述信息下载字典文件。Further, the described system for efficient data transmission of the Internet of Things in electric power based on the object model further includes: a first dictionary synchronization module deployed on the IoT management platform and a second dictionary synchronization module deployed on the edge agent, so The first dictionary synchronization module is used to send the description information of the dictionary file generated by the dictionary generation module to the edge agent, and the second dictionary synchronization module is used to download the dictionary file according to the description information.

相比于现有技术,本发明的有益技术效果:本发明支持业务交互采用JSON格式,由物联管理平台根据物模型文件自动生成压缩字典并同步在边缘代理保存,在数据传输时根据压缩字典完成自动压缩和解压缩,在保障业务交互简单易用前提下有效提升了数据传输效率,降低了生产成本,为智慧物联体系在电力领域的规模化应用提供有力支撑。Compared with the prior art, the beneficial technical effects of the present invention are as follows: the present invention supports the use of JSON format for business interaction, and the IOT management platform automatically generates a compression dictionary according to the object model file and synchronously saves it on the edge agent. During data transmission, according to the compression dictionary Complete automatic compression and decompression, effectively improve data transmission efficiency and reduce production costs under the premise of ensuring business interaction is simple and easy to use, providing strong support for the large-scale application of smart IoT systems in the power field.

附图说明Description of drawings

图1是本发明实施例的一种基于物模型的电力物联网数据压缩方法流程图;FIG. 1 is a flowchart of a method for compressing data of the Internet of Things in electric power based on an object model according to an embodiment of the present invention;

图2是本发明另一实施例的一种基于物模型的电力物联网数据压缩方法流程图;FIG. 2 is a flow chart of a method for compressing data of the Internet of Things in electric power based on an object model according to another embodiment of the present invention;

图3是字符串直接存储示意图;Figure 3 is a schematic diagram of direct storage of strings;

图4是数字和枚举类型存储示意图;Fig. 4 is a schematic diagram of digital and enumeration type storage;

图5是复合类型存储示意图;Fig. 5 is a composite type storage schematic diagram;

图6是本发明实施例的一种基于物模型的电力物联网数据压缩装置结构图。FIG. 6 is a structural diagram of a data compression device for the Internet of Things in electric power based on an object model according to an embodiment of the present invention.

具体实施方式Detailed ways

下面结合具体实施例对本发明作进一步描述。以下实施例仅用于更加清楚地说明本发明的技术方案,而不能以此来限制本发明的保护范围。The present invention will be further described below in conjunction with specific embodiments. The following examples are only used to illustrate the technical solutions of the present invention more clearly, and cannot be used to limit the protection scope of the present invention.

如前所述,电力物联网规模化应用中采用JSON格式报文传输数据时,存在由于长度短、传输频度高的海量实时数据无法有效压缩导致云边信息传输效率低、带宽资源浪费严重等问题。为此,本发明提出了一种基于物模型的报文数据压缩方法。As mentioned above, when using JSON format messages to transmit data in the large-scale application of the Internet of Things in electric power, there are problems such as low cloud-side information transmission efficiency and serious waste of bandwidth resources due to the inability to effectively compress massive real-time data with short length and high transmission frequency. question. To this end, the present invention proposes a message data compression method based on an object model.

如图1所示,一种基于物模型的电力物联网数据压缩方法,包括:As shown in Figure 1, a data compression method for the Internet of Things in electric power based on the object model includes:

根据预先生成并保存在物联管理平台上的压缩字典文件,对物联管理平台向边缘代理发送的第一格式的数据报文进行压缩,生成第二格式的数据报文,将第二格式的数据报文传输至边缘代理;According to the compression dictionary file pre-generated and saved on the IoT management platform, compress the data message in the first format sent by the IoT management platform to the edge agent, generate a data message in the second format, and compress the data message in the second format. The data message is transmitted to the edge proxy;

根据所述压缩字典文件,对物联管理平台接收的第二格式的数据报文进行解压缩,生成第一格式的数据报文。According to the compression dictionary file, the data message in the second format received by the IoT management platform is decompressed to generate the data message in the first format.

其中,第一格式可以为JSON格式。The first format may be JSON format.

其中,压缩字典文件是根据设备物模型文件自动生成的,每个物模型文件对应一个压缩字典文件。The compression dictionary file is automatically generated according to the device object model file, and each object model file corresponds to a compression dictionary file.

具体的,压缩字典文件根据CABM压缩法(Data compression algorithm based onobject model)生成,CABM压缩法具体包括:Specifically, the compression dictionary file is generated according to the CABM compression method (Data compression algorithm based on object model). The CABM compression method specifically includes:

1.数据类型编码1. Data type encoding

将电力物联网领域中常用的String、float、int、数组、结构体、枚举等数据类型分为四类,在压缩字典文件中用“VALUE_TYPE”表示,如表1所示。The commonly used data types such as String, float, int, array, structure, and enumeration in the field of power Internet of Things are divided into four categories, which are represented by "VALUE_TYPE" in the compression dictionary file, as shown in Table 1.

表1数据类型编码Table 1 Data Type Coding

Figure BDA0003517801490000071
Figure BDA0003517801490000071

2.字符串类型编码2. String type encoding

字符串类型存储时可采用常量存储或者直接存储,在字典文件中用"CODE_TYPE"表示字符串存储方式。The string type can be stored by constant storage or directly. In the dictionary file, "CODE_TYPE" is used to represent the string storage method.

常量存储时,在key_id后直接存储字符串常量的ID,每个物模型对应一个字符串常量字典,该字典对每个常量进行编码,其格式定义为:When storing constants, the ID of the string constant is directly stored after the key_id. Each object model corresponds to a string constant dictionary, which encodes each constant. The format is defined as:

Figure BDA0003517801490000072
Figure BDA0003517801490000072

其中,"CONST_STR_LEN"表示存储常量编码所需的长度,单位为字节,"CONST_STR_CODE"中记录了每个常量及其对应的编码。Among them, "CONST_STR_LEN" represents the length required to store the constant encoding, in bytes, and "CONST_STR_CODE" records each constant and its corresponding encoding.

直接存储方式首先存储字段名编码,然后存储字符串长度,最后存储字符串内容,其形式如图3所示。The direct storage method first stores the field name code, then stores the length of the string, and finally stores the content of the string, as shown in Figure 3.

其中,字符串长度字段采用变长编码方式,最小为1字节,最大为4个字节,每个字节的最高bit位为1时表示下一个字节仍存储长度,编码范围如表2所示。Among them, the string length field adopts variable-length encoding, the minimum is 1 byte, and the maximum is 4 bytes. When the highest bit of each byte is 1, it means that the next byte still stores the length. The encoding range is shown in Table 2. shown.

表2字符串长度范围Table 2 String length range

Figure BDA0003517801490000081
Figure BDA0003517801490000081

例如,某数据类型为STRING的数据项“devId”,采用直接存储方式,则该数据项在字典文件中的定义为:For example, if a data item "devId" whose data type is STRING is directly stored, the definition of the data item in the dictionary file is:

Figure BDA0003517801490000082
Figure BDA0003517801490000082

3.数字类型和枚举类型编码3. Encoding of numeric types and enumeration types

数字类型和枚举类型在压缩时直接存储数值内容,如4图所示。Numeric types and enumeration types directly store numeric content when compressed, as shown in Figure 4.

在字典文件中,用"VALUE_LEN"表示存储数据项所需的字节数。例如,某数据项“temp”的数据类型为数字类型,它在字段在压缩字典文件中定义为:In the dictionary file, use "VALUE_LEN" to represent the number of bytes required to store the data item. For example, the data type of a data item "temp" is numeric, and it is defined in the field in the compression dictionary file as:

Figure BDA0003517801490000083
Figure BDA0003517801490000083

Figure BDA0003517801490000091
Figure BDA0003517801490000091

4.复合类型编码4. Composite type encoding

复合类型指报文由1个或多个子成员构成的组合结构体,每个子成员可以为字符串、数字、枚举等基础类型或者复合类型。A composite type refers to a combined structure composed of one or more sub-members. Each sub-member can be a basic type such as a string, a number, or an enumeration or a composite type.

复合类型数据压缩时,首先存储字段名编码,然后存储“子成员数量”,子成员对象随后按序排列,子成员之间用分隔符隔离,如图5所示。When the composite type data is compressed, the field name code is stored first, and then the "number of sub-members" is stored. The sub-member objects are then arranged in order, and the sub-members are separated by separators, as shown in Figure 5.

其中,子成员数量采用变长编码方式,最长为4个字节。例如,某数据项字段名为“devs”,数据类型为复合类型,则该数据项在压缩字典文件中定义为:Among them, the number of sub-members adopts variable-length encoding, and the maximum length is 4 bytes. For example, if the field name of a data item is "devs" and the data type is a composite type, the data item is defined in the compression dictionary file as:

Figure BDA0003517801490000092
Figure BDA0003517801490000092

复合类型报文压缩算法如表3所示:The compression algorithm of compound type message is shown in Table 3:

表3复合类型压缩算法Table 3 Composite Type Compression Algorithms

Figure BDA0003517801490000093
Figure BDA0003517801490000093

Figure BDA0003517801490000101
Figure BDA0003517801490000101

在具体实施方式中,物联管理平台在接收到一个新的物模型文件时,将按照上述方法自动生成压缩字典文件,自动压缩的文件内容为一个JSON格式对象,包含属性字段、常量字典等信息。In a specific embodiment, when receiving a new object model file, the IoT management platform will automatically generate a compressed dictionary file according to the above method, and the content of the automatically compressed file is a JSON format object, including attribute fields, constants dictionary and other information .

物联管理平台生成压缩字典文件后,将压缩字典文件的描述信息发送至边缘代理,边缘代理根据描述信息下载并保存压缩字典文件。After the IoT management platform generates the compression dictionary file, it sends the description information of the compression dictionary file to the edge agent, and the edge agent downloads and saves the compression dictionary file according to the description information.

其中,压缩字典文件描述信息包括:字典文件名、对应的设备ID、物模型文件标识、字典文件大小、字典文件的MD5值、字典文件的下载URL。The compressed dictionary file description information includes: dictionary file name, corresponding device ID, object model file identifier, dictionary file size, MD5 value of the dictionary file, and download URL of the dictionary file.

物联管理平台和边缘代理还需要保存设备ID和字典文件的映射关系,以便后续压缩和解压时查询字典文件。The IoT management platform and the edge agent also need to save the mapping relationship between the device ID and the dictionary file, so that the dictionary file can be queried during subsequent compression and decompression.

当物联管理平台向边缘代理发送第一格式的数据报文时,对第一格式的数据报文进行拦截并从中解析出设备ID,根据设备ID查找对应的压缩字典文件,根据压缩字典文件对第一格式的数据报文进行压缩。When the IoT management platform sends a data message in the first format to the edge agent, it intercepts the data message in the first format and parses the device ID from it, searches for the corresponding compression dictionary file according to the device ID, and compares the corresponding compression dictionary file according to the compression dictionary file. The data packets in the first format are compressed.

当物联管理平台接收到第二格式的数据报文时,对接收到的第二格式的数据报文进行拦截并从中解析出设备ID,根据设备ID查找对应的压缩字典文件,根据压缩字典文件对第二格式的数据报文进行解压缩。When the IoT management platform receives the data message in the second format, it intercepts the received data message in the second format and parses the device ID from it, searches for the corresponding compression dictionary file according to the device ID, and searches the corresponding compression dictionary file according to the compression dictionary file. Decompress the data packet in the second format.

在另一实施例中,如图2所示,一种基于物模型的电力物联网数据压缩方法,还包括:In another embodiment, as shown in FIG. 2 , a method for compressing data for the Internet of Things in electric power based on an object model further includes:

根据同步保存在边缘代理上的压缩字典文件,对边缘代理向物联管理平台发送的第一格式的数据报文进行压缩,生成第二格式的数据报文,将第二格式的数据报文传输至物联管理平台;According to the compression dictionary file synchronously saved on the edge agent, compress the data packets in the first format sent by the edge agent to the IoT management platform, generate data packets in the second format, and transmit the data packets in the second format. to the IoT management platform;

根据所述压缩字典文件,对边缘代理接收的第二格式的数据报文进行解压缩,生成第一格式的数据报文。According to the compression dictionary file, the data message in the second format received by the edge agent is decompressed to generate the data message in the first format.

基于边缘代理同步保存的设备ID和字典文件的映射关系,当边缘代理向物联管理平台发送第一格式的数据报文时,对第一格式的数据报文进行拦截,从中解析出设备ID,根据设备ID查找对应的压缩字典文件,根据压缩字典文件对第一格式的数据报文进行压缩。Based on the mapping relationship between the device ID and the dictionary file stored synchronously by the edge agent, when the edge agent sends a data packet in the first format to the IoT management platform, it intercepts the data packet in the first format, and parses the device ID from it. The corresponding compression dictionary file is searched according to the device ID, and the data message in the first format is compressed according to the compression dictionary file.

当边缘代理接收第二格式的数据报文时,对接收到的第二格式的数据报文进行拦截并从中解析出设备ID,根据设备ID查找对应的压缩字典文件,根据压缩字典文件对第二格式的数据报文进行解压缩。When the edge agent receives the data packet in the second format, it intercepts the received data packet in the second format and parses the device ID from it, searches for the corresponding compression dictionary file according to the device ID, and parses the second format according to the compression dictionary file. formatted data packets are decompressed.

在另一实施例,一种基于物模型的电力物联网数据压缩装置,如图6所示,包括:部署在物联管理平台上的第一数据压缩模块和第一数据解压缩模块。In another embodiment, an object model-based data compression device for the Internet of Things in electric power, as shown in FIG. 6 , includes: a first data compression module and a first data decompression module deployed on an IoT management platform.

第一数据压缩模块,用于根据预先生成并保存在物联管理平台上的压缩字典文件,对物联管理平台向边缘代理发送的第一格式的数据报文进行压缩,生成第二格式的数据报文,将第二格式的数据报文传输至边缘代理;The first data compression module is used for compressing the data message in the first format sent by the IoT management platform to the edge agent according to the compression dictionary file pre-generated and saved on the IoT management platform, and generating data in the second format message, transmitting the data message in the second format to the edge agent;

第一数据解压缩模块,用于根据所述压缩字典文件,对物联管理平台接收的第二格式的数据报文进行解压缩,生成第一格式的数据报文。The first data decompression module is configured to decompress the data message in the second format received by the IoT management platform according to the compression dictionary file, and generate the data message in the first format.

在具体实施方式中,第一数据压缩模块,在物联管理平台向边缘代理发送第一格式的数据报文之前,首先对该第一格式的数据报文进行拦截并从中解析出设备ID,然后根据设备ID查找对应的字典文件,如果内存中不存在该字典文件,则要进行加载;接着,根据该字典文件,完成数据自动压缩,并将压缩后的第二格式的数据传输到边缘代理。如果本地未保存对应的字典文件,则采用原始未压缩方式直接传输。In a specific embodiment, the first data compression module, before the IoT management platform sends the data message in the first format to the edge agent, first intercepts the data message in the first format and parses the device ID from it, and then Find the corresponding dictionary file according to the device ID. If the dictionary file does not exist in the memory, it needs to be loaded; then, according to the dictionary file, the data is automatically compressed, and the compressed data in the second format is transmitted to the edge agent. If the corresponding dictionary file is not saved locally, it will be directly transmitted in the original uncompressed way.

第一数据解压缩模块,在物联管理平台接收到第二格式的数据报文时,对该第二格式的数据报文进行拦截并从中解析出设备ID,根据设备ID查找对应的字典文件,如果内存中不存在该字典文件,则要进行加载;接着,根据该字典文件,完成数据的自动解压缩,并将解压缩后的第一格式的数据传输到业务系统/业务中台。同样,如果本地未保存对应的字典文件,则采用原始未压缩方式直接传输。The first data decompression module, when the IoT management platform receives the data message in the second format, intercepts the data message in the second format and parses the device ID from it, and searches for the corresponding dictionary file according to the device ID, If the dictionary file does not exist in the memory, it needs to be loaded; then, according to the dictionary file, the automatic decompression of the data is completed, and the decompressed data in the first format is transmitted to the business system/business center. Similarly, if the corresponding dictionary file is not saved locally, it will be directly transmitted in the original uncompressed way.

在另一实施例中,如图6所示,一种基于物模型的电力物联网数据压缩装置,还包括:部署在边缘代理上的第二数据压缩模块和第二数据解压缩模块,In another embodiment, as shown in FIG. 6 , a data compression device for the Internet of Things in electric power based on an object model further includes: a second data compression module and a second data decompression module deployed on the edge agent,

第二数据压缩模块,用于根据同步保存在边缘代理上的压缩字典文件,对边缘代理向物联管理平台发送的第一格式的数据报文进行压缩,生成第二格式的数据报文,将第二格式的数据报文传输至物联管理平台。The second data compression module is used for compressing the data message in the first format sent by the edge agent to the IoT management platform according to the compression dictionary file synchronously saved on the edge agent, generating the data message in the second format, and compressing the data message in the second format. The data message in the second format is transmitted to the IoT management platform.

第二数据解压缩模块,用于根据所述压缩字典文件,对边缘代理接收的第二格式的数据报文进行解压缩,生成第一格式的数据报文。The second data decompression module is configured to decompress the data message in the second format received by the edge agent according to the compression dictionary file, and generate the data message in the first format.

在具体实施方式中,第二数据压缩模块,在边缘代理向物联管理平台发送第一格式的数据报文之前,首先对该第一格式的数据报文进行拦截并从中解析出设备ID,然后根据设备ID查找对应的字典文件,如果内存中不存在该字典文件,则要进行加载;接着,根据该字典文件,完成数据自动压缩,并将压缩后的第二格式的数据传输到物联管理平台。如果本地未保存该字典文件,则采用原始未压缩方式直接传输。In a specific embodiment, the second data compression module, before the edge agent sends the data message in the first format to the IoT management platform, first intercepts the data message in the first format and parses the device ID from it, and then Find the corresponding dictionary file according to the device ID. If the dictionary file does not exist in the memory, it must be loaded; then, according to the dictionary file, the automatic data compression is completed, and the compressed data in the second format is transmitted to the IoT management platform. If the dictionary file is not saved locally, it will be transmitted directly in the original uncompressed way.

第二数据解压缩模块,在边缘代理接收到第二格式的数据报文时,对该第二格式的数据报文进行拦截并从中解析出设备ID,根据设备ID查找对应的字典文件,如果内存中不存在该字典文件,则要进行加载;接着,根据该字典文件,完成数据的自动解压缩,并将解压缩后的第一格式的数据传输到端设备。同样,如果本地未保存该字典文件,则采用原始未压缩方式直接传输。The second data decompression module, when the edge agent receives the data message in the second format, intercepts the data message in the second format and parses the device ID from it, and searches for the corresponding dictionary file according to the device ID. If the dictionary file does not exist in the dictionary, it needs to be loaded; then, according to the dictionary file, the automatic decompression of the data is completed, and the decompressed data in the first format is transmitted to the end device. Likewise, if the dictionary file is not saved locally, it is transferred directly in the original uncompressed way.

在另一实施例中,如图6所示,一种基于物模型的电力物联网数据压缩装置,还包括:字典生成模块。In another embodiment, as shown in FIG. 6 , an apparatus for compressing data of the Internet of Things in electric power based on an object model further includes: a dictionary generation module.

字典生成模块主要部署在物联管理平台上,用于根据设备物模型文件自动解析并生成压缩字典文件,物模型文件与字典文件一一对应。The dictionary generation module is mainly deployed on the IoT management platform, which is used to automatically parse and generate a compressed dictionary file according to the device object model file, and the object model file corresponds to the dictionary file one by one.

在另一实施例中,如图6所示,一种基于物模型的电力物联网数据压缩装置,还包括:第一字典同步模块和第二字典同步模块。In another embodiment, as shown in FIG. 6 , an apparatus for compressing data of the Internet of Things in electric power based on the object model further includes: a first dictionary synchronization module and a second dictionary synchronization module.

其中,第一字典同步模块部署在物联管理平台上,第二字典同步模块部署在边缘代理上,第一字典同步模块和第二字典同步模块用于将物联管理平台上生成的压缩字典文件同步保存在边缘代理。Among them, the first dictionary synchronization module is deployed on the IoT management platform, the second dictionary synchronization module is deployed on the edge agent, and the first dictionary synchronization module and the second dictionary synchronization module are used to compress the dictionary files generated on the IoT management platform. Synchronization is kept at the edge proxy.

物联管理平台生成字典文件后,利用第一字典同步模块将字典文件的描述信息发送至边缘代理,边缘代理的第二字典同步模块根据描述信息下载字典文件,并将其保存在边缘代理上;同时,物联管理平台和边缘代理还需同步保存设备ID和字典文件的映射关系。After the IOT management platform generates the dictionary file, the first dictionary synchronization module is used to send the description information of the dictionary file to the edge agent, and the second dictionary synchronization module of the edge agent downloads the dictionary file according to the description information, and saves it on the edge agent; At the same time, the IoT management platform and the edge agent need to simultaneously save the mapping relationship between the device ID and the dictionary file.

本发明整个工作流程如下:The whole work flow of the present invention is as follows:

1)字典文件生成1) Dictionary file generation

物联管理平台在接收到一个新的物模型文件时,将根据CABM压缩法自动生成一个压缩字典文件。When the IoT management platform receives a new object model file, it will automatically generate a compression dictionary file according to the CABM compression method.

2)字典文件同步2) Dictionary file synchronization

物联管理平台生成字典文件后,将字典文件的描述信息发送至边缘代理,边缘代理根据描述信息下载字典文件;物联管理平台和边缘代理均保存设备ID和字典文件的映射关系。After the IoT management platform generates the dictionary file, it sends the description information of the dictionary file to the edge agent, and the edge agent downloads the dictionary file according to the description information; both the IoT management platform and the edge agent save the mapping relationship between the device ID and the dictionary file.

3)数据压缩3) Data compression

对于物联管理平台,第一数据压缩模块首先拦截物联平台发送的数据并解析出设备ID,然后根据设备ID查找对应的字典文件;接着,该模块根据查找到的字典文件完成数据自动压缩,并将压缩后的数据传输至边缘代理。For the IoT management platform, the first data compression module first intercepts the data sent by the IoT platform and parses the device ID, and then searches for the corresponding dictionary file according to the device ID; then, the module completes automatic data compression according to the found dictionary file, And transmit the compressed data to the edge proxy.

对于边缘代理,第二数据压缩模块首先拦边缘代理发送的数据并解析出设备ID,然后根据设备ID查找对应的字典文件;接着,该模块根据查找到的字典文件完成数据自动压缩,并将压缩后的数据传输至物联管理平台。For the edge agent, the second data compression module first intercepts the data sent by the edge agent and parses out the device ID, and then searches for the corresponding dictionary file according to the device ID; then, the module automatically compresses the data according to the found dictionary file, and compresses the The latter data is transmitted to the IoT management platform.

4)数据解压缩4) Data decompression

对于物联管理平台,第一数据解压缩模块首先拦截物联平台接收的压缩数据并解析出设备ID,然后根据设备ID查找对应的字典文件;接着,根据查找到的字典文件完成数据自动解压缩,并将解压缩后的数据传输至业务系统/业务中台。For the IoT management platform, the first data decompression module first intercepts the compressed data received by the IoT platform and parses the device ID, and then searches the corresponding dictionary file according to the device ID; then, automatically decompresses the data according to the found dictionary file. , and transmit the decompressed data to the business system/business center.

对于边缘代理,第二数据解压缩模块首先拦边缘代理接收的数据并解析出设备ID,然后根据设备ID查找对应的字典文件;接着,根据查找到的字典文件完成数据自动解压缩,并将解压缩后的数据传输至端设备。For the edge agent, the second data decompression module first intercepts the data received by the edge agent and parses out the device ID, and then searches for the corresponding dictionary file according to the device ID; The compressed data is transmitted to the end device.

本发明通过在物联管理平台和边缘代理之间增加压缩和解压缩模块,由物联管理平台根据物模型文件自动生成压缩字典并同步在边缘代理保存,在数据传输时根据压缩字典完成自动压缩和解压。该过程对基于智慧物联体系的业务系统完全透明,既满足了业务交互对于简单易用的JSON数据格式要求,又提升了数据传输效率,解决了生产环境中传输效率低造成的流量费用增加的问题。In the present invention, a compression and decompression module is added between the IoT management platform and the edge agent, and the IoT management platform automatically generates a compression dictionary according to the object model file and synchronously saves it on the edge agent, and completes automatic compression and decompression according to the compression dictionary during data transmission. unzip. This process is completely transparent to the business system based on the smart IoT system, which not only meets the requirements of the business interaction for the simple and easy-to-use JSON data format, but also improves the data transmission efficiency and solves the problem of increased traffic costs caused by low transmission efficiency in the production environment. question.

本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。As will be appreciated by those skilled in the art, the embodiments of the present application may be provided as a method, a system, or a computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.

本申请是参照根据本申请实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present application. It will be understood that each flow and/or block in the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to the processor of a general purpose computer, special purpose computer, embedded processor or other programmable data processing device to produce a machine such that the instructions executed by the processor of the computer or other programmable data processing device produce Means for implementing the functions specified in a flow or flow of a flowchart and/or a block or blocks of a block diagram.

这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory result in an article of manufacture comprising instruction means, the instructions The apparatus implements the functions specified in the flow or flow of the flowcharts and/or the block or blocks of the block diagrams.

这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded on a computer or other programmable data processing device to cause a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process such that The instructions provide steps for implementing the functions specified in the flow or blocks of the flowcharts and/or the block or blocks of the block diagrams.

以上已以较佳实施例公布了本发明,然其并非用以限制本发明,凡采取等同替换或等效变换的方案所获得的技术方案,均落在本发明的保护范围内。The present invention has been disclosed above with preferred embodiments, but it is not intended to limit the present invention, and all technical solutions obtained by adopting equivalent replacement or equivalent transformation schemes all fall within the protection scope of the present invention.

Claims (9)

1.一种基于物模型的电力物联网数据压缩方法,其特征在于,包括:1. A method for compressing data of the Internet of Things in electric power based on a thing model, is characterized in that, comprises: 根据预先生成并保存在物联管理平台上的压缩字典文件,对物联管理平台向边缘代理发送的第一格式的数据报文进行压缩,生成第二格式的数据报文,将第二格式的数据报文传输至边缘代理;以及,According to the compression dictionary file pre-generated and saved on the IoT management platform, compress the data message in the first format sent by the IoT management platform to the edge agent, generate a data message in the second format, and compress the data message in the second format. The datagram is transmitted to the edge proxy; and, 根据所述压缩字典文件,对物联管理平台接收的第二格式的数据报文进行解压缩,生成第一格式的数据报文;According to the compression dictionary file, decompress the data message in the second format received by the IoT management platform to generate the data message in the first format; 其中,所述压缩字典文件是根据设备物模型文件自动生成的,每个物模型文件对应一个压缩字典文件。The compression dictionary file is automatically generated according to the device object model file, and each object model file corresponds to a compression dictionary file. 2.根据权利要求1所述的一种基于物模型的电力物联网数据压缩方法,其特征在于,物联管理平台上生成的压缩字典文件同步保存在边缘代理上,所述方法还包括:2. The method for compressing data of the Internet of Things in electric power based on the object model according to claim 1, wherein the compression dictionary file generated on the Internet of Things management platform is synchronously stored on the edge agent, and the method further comprises: 根据同步保存在边缘代理上的压缩字典文件,对边缘代理向物联管理平台发送的第一格式的数据报文进行压缩,生成第二格式的数据报文,将第二格式的数据报文传输至物联管理平台;以及,According to the compression dictionary file synchronously saved on the edge agent, compress the data packets in the first format sent by the edge agent to the IoT management platform, generate data packets in the second format, and transmit the data packets in the second format. to the IoT Management Platform; and, 根据所述压缩字典文件,对边缘代理接收的第二格式的数据报文进行解压缩,生成第一格式的数据报文。According to the compression dictionary file, the data message in the second format received by the edge agent is decompressed to generate the data message in the first format. 3.根据权利要求1所述的一种基于物模型的电力物联网数据压缩方法,其特征在于,所述压缩字典文件根据以下方法生成:3. The method for compressing data of the Internet of Things in electric power based on the object model according to claim 1, wherein the compression dictionary file is generated according to the following method: 将物模型文件中的数据分为字符串类型、数字类型、枚举类型和复合类型;Divide the data in the object model file into string types, numeric types, enumeration types and composite types; 字符串类型采用常量存储或者直接存储,常量存储方式为在字段名编码后直接存储字符串常量的ID,每个物模型文件对应一个字符串常量字典,所述字符串常量字典对每个常量进行编码;直接存储方式为首先存储字段名编码,然后存储字符串长度,最后存储字符串内容;The string type adopts constant storage or direct storage. The constant storage method is to directly store the ID of the string constant after the field name is encoded. Each object model file corresponds to a string constant dictionary. Encoding; the direct storage method is to first store the field name encoding, then store the length of the string, and finally store the content of the string; 数字类型和枚举类型在压缩时在字段名编码后直接存储数值内容;Numerical types and enumeration types directly store the numeric content after the field name is encoded during compression; 复合类型压缩时首先存储字段名编码,然后存储“子成员数量”,子成员对象随后按序排列,子成员之间用分隔符隔离。When the composite type is compressed, the field name code is first stored, and then the "number of sub-members" is stored. The sub-member objects are then arranged in order, and the sub-members are separated by separators. 4.根据权利要求1所述的一种基于物模型的电力物联网数据压缩方法,其特征在于,所述物联管理平台保存设备ID和字典文件的映射关系,当物联管理平台向边缘代理发送第一格式的数据报文时,对第一格式的数据报文进行拦截并从中解析出设备ID,根据设备ID查找对应的压缩字典文件,根据压缩字典文件对第一格式的数据报文进行压缩;当物联管理平台接收到第二格式的数据报文时,对接收到的第二格式的数据报文进行拦截并从中解析出设备ID,根据设备ID查找对应的压缩字典文件,根据压缩字典文件对第二格式的数据报文进行解压缩。4. The method for compressing data of the Internet of Things in electric power based on the object model according to claim 1, wherein the IOT management platform saves the mapping relationship between the device ID and the dictionary file, and when the IOT management platform sends the edge agent When sending a data message in the first format, intercept the data message in the first format and parse out the device ID from the data message, search for the corresponding compression dictionary file according to the device ID, and perform the data message in the first format according to the compression dictionary file. Compression; when the IoT management platform receives a data message in the second format, it intercepts the received data message in the second format and parses the device ID from it, searches for the corresponding compression dictionary file according to the device ID, and The dictionary file decompresses the data message in the second format. 5.根据权利要求1所述的一种基于物模型的电力物联网数据压缩方法,其特征在于,所述边缘代理同步保存设备ID和字典文件的映射关系,当边缘代理向物联管理平台发送第一格式的数据报文时,对第一格式的数据报文进行拦截并从中解析出设备ID,根据设备ID查找对应的压缩字典文件,根据压缩字典文件对第一格式的数据报文进行压缩;当边缘代理接收第二格式的数据报文时,对接收到的第二格式的数据报文进行拦截并从中解析出设备ID,根据设备ID查找对应的压缩字典文件,根据压缩字典文件对第二格式的数据报文进行解压缩。5. A kind of power Internet of Things data compression method based on the object model according to claim 1, is characterized in that, described edge agent synchronously saves the mapping relationship between device ID and dictionary file, when edge agent sends to IOT management platform When the data message is in the first format, intercept the data message in the first format and parse the device ID from it, look up the corresponding compression dictionary file according to the device ID, and compress the data message in the first format according to the compression dictionary file. ; When the edge agent receives the data message of the second format, it intercepts the received data message of the second format and parses the device ID from it, searches for the corresponding compression dictionary file according to the device ID, and parses the data message of the second format according to the device ID. The data packets in the second format are decompressed. 6.一种基于物模型的电力物联网数据压缩装置,其特征在于,包括:部署在物联管理平台上的第一数据压缩模块和第一数据解压缩模块,6. A power Internet of Things data compression device based on an object model, characterized in that it comprises: a first data compression module and a first data decompression module deployed on the Internet of Things management platform, 所述第一数据压缩模块,用于根据预先生成并保存在物联管理平台上的压缩字典文件,对物联管理平台向边缘代理发送的第一格式的数据报文进行压缩,生成第二格式的数据报文,将第二格式的数据报文传输至边缘代理;The first data compression module is used to compress the data message in the first format sent by the IoT management platform to the edge agent according to the compression dictionary file pre-generated and stored on the IoT management platform, and generate a second format. The data message in the second format is transmitted to the edge agent; 所述第一数据解压缩模块,用于根据所述压缩字典文件,对物联管理平台接收的第二格式的数据报文进行解压缩,生成第一格式的数据报文;The first data decompression module is configured to decompress the data message in the second format received by the IoT management platform according to the compression dictionary file, and generate the data message in the first format; 其中,所述压缩字典文件是根据设备物模型文件自动生成的,每个物模型文件对应一个压缩字典文件。The compression dictionary file is automatically generated according to the device object model file, and each object model file corresponds to a compression dictionary file. 7.根据权利要求6所述的一种基于物模型的电力物联网数据压缩装置,其特征在于,还包括:部署在边缘代理上的第二数据压缩模块和第二数据解压缩模块,7 . The device for data compression of the Internet of Things in electric power based on the object model according to claim 6 , further comprising: a second data compression module and a second data decompression module deployed on the edge agent, 8 . 所述第二数据压缩模块,用于根据同步保存在边缘代理上的压缩字典文件,对边缘代理向物联管理平台发送的第一格式的数据报文进行压缩,生成第二格式的数据报文,将第二格式的数据报文传输至物联管理平台;The second data compression module is used for compressing the data message in the first format sent by the edge agent to the IoT management platform according to the compression dictionary file synchronously stored on the edge agent, and generating the data message in the second format , transmit the data message in the second format to the IoT management platform; 所述第二数据解压缩模块,用于根据所述压缩字典文件,对边缘代理接收的第二格式的数据报文进行解压缩,生成第一格式的数据报文。The second data decompression module is configured to decompress the data message in the second format received by the edge agent according to the compression dictionary file, and generate the data message in the first format. 8.根据权利要求7所述的一种基于物模型的电力物联网数据压缩装置,其特征在于,还包括:字典生成模块,所述字典生成模块部署在物联管理平台上,用于根据设备物模型文件生成压缩字典文件。8 . The device for data compression of the Internet of Things in electric power based on the object model according to claim 7 , further comprising: a dictionary generation module, wherein the dictionary generation module is deployed on the IoT management platform, and is used for according to the device. 9 . The object model file generates a compressed dictionary file. 9.根据权利要求8所述的一种基于物模型的电力物联网数据压缩装置,其特征在于,还包括:部署在物联管理平台上的第一字典同步模块和部署在边缘代理上的第二字典同步模块,所述第一字典同步模块用于将字典生成模块生成的字典文件的描述信息发送至边缘代理,第二字典同步模块用于根据所述描述信息下载字典文件。9 . The device for data compression of the Internet of Things in electric power based on the object model according to claim 8 , further comprising: a first dictionary synchronization module deployed on the IoT management platform and a first dictionary synchronization module deployed on the edge agent. 10 . Two dictionary synchronization modules, the first dictionary synchronization module is used to send the description information of the dictionary file generated by the dictionary generation module to the edge agent, and the second dictionary synchronization module is used to download the dictionary file according to the description information.
CN202210172089.4A 2022-02-24 2022-02-24 A data compression method and device for electric power Internet of Things based on object model Active CN114666406B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210172089.4A CN114666406B (en) 2022-02-24 2022-02-24 A data compression method and device for electric power Internet of Things based on object model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210172089.4A CN114666406B (en) 2022-02-24 2022-02-24 A data compression method and device for electric power Internet of Things based on object model

Publications (2)

Publication Number Publication Date
CN114666406A true CN114666406A (en) 2022-06-24
CN114666406B CN114666406B (en) 2023-11-21

Family

ID=82028206

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210172089.4A Active CN114666406B (en) 2022-02-24 2022-02-24 A data compression method and device for electric power Internet of Things based on object model

Country Status (1)

Country Link
CN (1) CN114666406B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116455916A (en) * 2023-04-21 2023-07-18 国网江苏省电力有限公司信息通信分公司 Cloud edge cooperation-based electric power Internet of things data processing method and system
CN119316451A (en) * 2024-10-11 2025-01-14 广州格物安全科技有限公司 A secure communication method for power Internet of Things system

Citations (24)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6247015B1 (en) * 1998-09-08 2001-06-12 International Business Machines Corporation Method and system for compressing files utilizing a dictionary array
CN1425986A (en) * 2003-01-17 2003-06-25 清华大学 Automatic compressing/decompressing file system and its compressing algorithm
CN101540613A (en) * 2009-04-10 2009-09-23 深圳市新飞扬数码技术有限公司 Data compression method and device thereof
CN101729075A (en) * 2008-10-10 2010-06-09 英华达(上海)电子有限公司 Data compression method, data compression device, data decompression method and data decompression device
CN102546740A (en) * 2011-06-24 2012-07-04 奇智软件(北京)有限公司 Method, device and system used for compression and uncompression and based on cloud compression file
CN103268299A (en) * 2013-05-10 2013-08-28 哈尔滨工业大学 Universal data compression intellectual property (IP) core for PXI Express bus test system
CN103716056A (en) * 2012-09-29 2014-04-09 华为技术有限公司 Data compression method, data decompression method and devices
CN104216958A (en) * 2014-08-20 2014-12-17 深圳市邦彦信息技术有限公司 Transmission method and device based on structured data
CN104378234A (en) * 2014-11-19 2015-02-25 北京数迅科技有限公司 Cross-data-center data transmission processing method and system
CN104462524A (en) * 2014-12-24 2015-03-25 福建江夏学院 Data compression storage method for Internet of Things
CN104572964A (en) * 2014-12-30 2015-04-29 北京奇虎科技有限公司 A method and device for decompressing compressed files
US20150142818A1 (en) * 2013-11-21 2015-05-21 Colin FLORENDO Paged column dictionary
CN104734722A (en) * 2013-12-23 2015-06-24 深圳市国微电子有限公司 Data compression method and data decompression device
CN107994907A (en) * 2017-12-01 2018-05-04 北京奇艺世纪科技有限公司 A kind of method and device for generating compression dictionary
CN108091338A (en) * 2017-12-29 2018-05-29 江苏惠通集团有限责任公司 The data processing method and device of voice telecontrol system and its host side
CN108092956A (en) * 2017-12-01 2018-05-29 北京奇艺世纪科技有限公司 A kind of method and apparatus for obtaining compression dictionary
CN109450450A (en) * 2018-10-17 2019-03-08 杭州费尔斯通科技有限公司 A kind of compression of JSON data real non-destructive and decompressing method
CN109800182A (en) * 2019-01-18 2019-05-24 深圳忆联信息系统有限公司 It is a kind of to reduce the data storage handling method and its system for writing amplification
CN110532235A (en) * 2019-08-06 2019-12-03 苏州浪潮智能科技有限公司 A kind of compressing file, decompression method and device
CN110781155A (en) * 2019-10-18 2020-02-11 赛尔网络有限公司 Data storage reading method, system, equipment and medium based on IPFS
CN111949621A (en) * 2020-07-22 2020-11-17 金钱猫科技股份有限公司 Scene switching-based file compression storage method and terminal
US20200403633A1 (en) * 2019-06-21 2020-12-24 Sap Se Advanced database compression
CN112187400A (en) * 2019-07-03 2021-01-05 大唐移动通信设备有限公司 Data transmission method and device
CN112332981A (en) * 2020-11-17 2021-02-05 珠海大横琴科技发展有限公司 Data processing method and device

Patent Citations (24)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6247015B1 (en) * 1998-09-08 2001-06-12 International Business Machines Corporation Method and system for compressing files utilizing a dictionary array
CN1425986A (en) * 2003-01-17 2003-06-25 清华大学 Automatic compressing/decompressing file system and its compressing algorithm
CN101729075A (en) * 2008-10-10 2010-06-09 英华达(上海)电子有限公司 Data compression method, data compression device, data decompression method and data decompression device
CN101540613A (en) * 2009-04-10 2009-09-23 深圳市新飞扬数码技术有限公司 Data compression method and device thereof
CN102546740A (en) * 2011-06-24 2012-07-04 奇智软件(北京)有限公司 Method, device and system used for compression and uncompression and based on cloud compression file
CN103716056A (en) * 2012-09-29 2014-04-09 华为技术有限公司 Data compression method, data decompression method and devices
CN103268299A (en) * 2013-05-10 2013-08-28 哈尔滨工业大学 Universal data compression intellectual property (IP) core for PXI Express bus test system
US20150142818A1 (en) * 2013-11-21 2015-05-21 Colin FLORENDO Paged column dictionary
CN104734722A (en) * 2013-12-23 2015-06-24 深圳市国微电子有限公司 Data compression method and data decompression device
CN104216958A (en) * 2014-08-20 2014-12-17 深圳市邦彦信息技术有限公司 Transmission method and device based on structured data
CN104378234A (en) * 2014-11-19 2015-02-25 北京数迅科技有限公司 Cross-data-center data transmission processing method and system
CN104462524A (en) * 2014-12-24 2015-03-25 福建江夏学院 Data compression storage method for Internet of Things
CN104572964A (en) * 2014-12-30 2015-04-29 北京奇虎科技有限公司 A method and device for decompressing compressed files
CN108092956A (en) * 2017-12-01 2018-05-29 北京奇艺世纪科技有限公司 A kind of method and apparatus for obtaining compression dictionary
CN107994907A (en) * 2017-12-01 2018-05-04 北京奇艺世纪科技有限公司 A kind of method and device for generating compression dictionary
CN108091338A (en) * 2017-12-29 2018-05-29 江苏惠通集团有限责任公司 The data processing method and device of voice telecontrol system and its host side
CN109450450A (en) * 2018-10-17 2019-03-08 杭州费尔斯通科技有限公司 A kind of compression of JSON data real non-destructive and decompressing method
CN109800182A (en) * 2019-01-18 2019-05-24 深圳忆联信息系统有限公司 It is a kind of to reduce the data storage handling method and its system for writing amplification
US20200403633A1 (en) * 2019-06-21 2020-12-24 Sap Se Advanced database compression
CN112187400A (en) * 2019-07-03 2021-01-05 大唐移动通信设备有限公司 Data transmission method and device
CN110532235A (en) * 2019-08-06 2019-12-03 苏州浪潮智能科技有限公司 A kind of compressing file, decompression method and device
CN110781155A (en) * 2019-10-18 2020-02-11 赛尔网络有限公司 Data storage reading method, system, equipment and medium based on IPFS
CN111949621A (en) * 2020-07-22 2020-11-17 金钱猫科技股份有限公司 Scene switching-based file compression storage method and terminal
CN112332981A (en) * 2020-11-17 2021-02-05 珠海大横琴科技发展有限公司 Data processing method and device

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
JI TU; MEISONG ZHENG; ZILONG WANG; LIJIAN LI; JUNYE WANG: "Clustered Multi-dictionary Code Compression for Embedded Systems", 《2015 DATA COMPRESSION CONFERENCE》 *
余兴阁;: "无损数据压缩与解压算法的介绍与实现", 信息与电脑(理论版), no. 01 *
梁捷;蒋雯倩;李金瑾;: "基于动态字典和差分编码的计量数据压缩研究", 信息技术, no. 10 *
符海东;顾进广: "HDVM:基于关系矩阵的关联数据压缩查询模型", 电子学报, no. 03 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116455916A (en) * 2023-04-21 2023-07-18 国网江苏省电力有限公司信息通信分公司 Cloud edge cooperation-based electric power Internet of things data processing method and system
CN119316451A (en) * 2024-10-11 2025-01-14 广州格物安全科技有限公司 A secure communication method for power Internet of Things system

Also Published As

Publication number Publication date
CN114666406B (en) 2023-11-21

Similar Documents

Publication Publication Date Title
CN102571966B (en) Network transmission method for large extensible markup language (XML) document
CN103379140A (en) Log processing rule synchronization method and relative device and system
CN114666406B (en) A data compression method and device for electric power Internet of Things based on object model
CN113238912B (en) Aggregation processing method for network security log data
CN115408350A (en) Log compression method, log recovery method, log compression device, log recovery device, computer equipment and storage medium
CN111967244A (en) FAST protocol decoding method, device and equipment based on FPGA
CN115914409A (en) A method and device for efficient transmission and storage of WAF security protection logs
CN110535846A (en) A data frame compression method and system based on DL/T698.45 protocol
CN116455916A (en) Cloud edge cooperation-based electric power Internet of things data processing method and system
CN104636377A (en) Data compression method and equipment
CN115801018A (en) Power distribution station data compression reconstruction method and system based on compressed sensing
CN104767710B (en) The transmission payload extracting method of HTTP block transmissions coding based on DFA
CN104899311A (en) WebGIS (Web Geographic Information System) vector data high-efficiency transmission method
CN111614438B (en) Data fusion system and method based on power line carrier communication
WO2023019712A1 (en) Zlib compression algorithm-based cloud computing resource manager communication delay optimization method
CN103929447B (en) A kind of method of the parsing HTTP chunked coded datas based on PEEK operations
CN118612297A (en) Mobile communication data optimization storage method, device, equipment and storage medium
CN116302178B (en) Acceleration processing method and device for column storage data
CN114024952B (en) A file compression and transmission method based on DL/T 698.45-2007 protocol
CN113986820B (en) Method for converting LZ4 format file into GZIP format file
CN114025024B (en) A data transmission method and device
CN115865274A (en) Data compression method, data decompression method and data compression device
CN112417843A (en) IDcode identification analysis system and implementation method thereof
CN118018615B (en) Telemetry data real-time compression method and system based on in-band network telemetry
CN114006619B (en) A method for converting GZIP format files to LZ4 format files

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant