Variable-Length Message Header Compression for IoT Process Communication

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In the industrial field, particularly in IoT, there is a challenge in efficiently utilizing limited hardware resources for communication between processes due to the overhead of operating systems, where conventional message structures waste bytes in message headers, especially when message lengths are short, leading to inefficient use of memory resources.

Innovation Solution

A method is proposed where the length of the message header is compressed based on the message header and body lengths, using the shortest bit sequence to indicate the message body length, reducing the header size and memory occupation by eliminating unnecessary bytes in the message header.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Ease of manufacture

If a fixed-length message header (4 bytes) is used to store message length, then the message structure is simple and easy to implement, but bytes are wasted in the message header when message lengths are short, leading to inefficient memory resource utilization

Engineering Contradiction:
Improveease of implementationVSAvoidmemory resource waste
Core Design Contradiction:
Ease of manufactureVSLoss of substance

Solution Approach 1:

The message header length is made dynamic rather than fixed. The system determines the appropriate header length (1-4 bytes) based on the actual message body length, allowing the header structure to adapt to different message sizes. This resolves the contradiction by enabling efficient memory utilization for short messages while maintaining the ability to handle long messages through longer headers.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The message header length parameter is changed from a fixed value (4 bytes) to a variable value (1-4 bytes) based on the message body length. This parameter change allows the system to optimize memory usage by using only the necessary number of bytes for the header, thereby reducing waste while maintaining implementation simplicity through standardized compression rules.

Inventive Principle:
Principle #35Parameter changes

2Loss of substance

If the message header length is compressed to reduce memory occupation, then memory resource efficiency is improved, but the complexity of message structure and processing increases

Engineering Contradiction:
Improvememory resource efficiencyVSAvoidmessage structure complexity
Core Design Contradiction:
Loss of substanceVSDevice complexity

Solution Approach 1:

The message header is segmented into variable-length components based on the message body length. The header is divided into different byte segments (1-4 bytes) with specific bit allocations for different purposes (length indication, message body length). This segmentation allows efficient memory usage while maintaining structured organization that simplifies processing through clear bit-level definitions.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

Different parts of the message header have different functions and lengths tailored to the specific message size. The header structure assigns different bit patterns to different byte positions based on the required precision for length indication. This local quality approach optimizes each part of the header for its specific function, reducing overall complexity while improving efficiency.

Inventive Principle:
Principle #3Local quality

3Loss of substance

If variable-length message headers are used to reduce waste, then memory resource utilization is improved, but the difficulty of detecting and measuring message structure increases

Engineering Contradiction:
Improvememory resource utilizationVSAvoidmessage structure detection
Core Design Contradiction:
Loss of substanceVSDifficulty of detecting and measuring

Solution Approach 1:

The message header is designed with preliminary indicators that specify the length and structure of the header itself. The first byte or specific bit patterns in the header pre-indicate the total header length or the distribution of bits across bytes. This preliminary information makes detection and measurement straightforward by providing advance guidance on the message structure before processing begins.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The message header acts as an intermediary that contains metadata about the message structure. Specific bits and bytes in the header serve as mediators that encode information about the header's own length and the message body length. This intermediary structure simplifies detection by providing a standardized interface for interpreting variable-length messages.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS11216320B2Method and apparatus for communication between processes
Publication Date: 2022.01.04 CLOUD INTELLIGENCE ASSETS HOLDING (SINGAPORE) PTE LTD
  • US11216320B2 patent drawing
  • US11216320B2 patent drawing
  • US11216320B2 patent drawing

AI summary

Methods and an apparatus for communication between processes are provided. A first process obtains an original message to be sent, where the original message includes a message header and a message body. The first process determines the length of the message header and the length of the message body of the original message to be sent. The first process compresses the length of the message header according to the length of the message header and the length of the message body to obtain a compressed message. The first process adds the compressed message to a message queue pre-created for a second process, where the second process is configured to obtain the compressed message from the message queue.