The timeout interpolation node is designed to maintain data continuity by filling gaps with predetermined values during data reporting interruptions, making it ideal for applications that require uninterrupted data sequences.
Scenarios
Consider a thermostat temperature sensor that reports data sporadically, signaling only when temperature changes occur. If no data is reported, the temperature is presumed constant. The timeout interpolation node can be utilized to ensure minute-level data monitoring for such sensors.
Prerequisites
Ensure that data calculation expressions or data filtering filters are set up. For more information, see Configure data computing and data filtering.
Background information
For an overview of the data parsing feature, refer to Usage Notes.
For guidance on navigating the data parsing workspace, see Data Parsing Workspace Instructions.
Procedure
In the middle canvas, click the add
icon following the current node.In the pop-up node list, single click the Timeout Interpolation node.
On the canvas, single click the Timeout Interpolation node. In the configuration panel on the right, set up the timeout interpolation according to the following table:
Configuration Item
Parameter
Description
Example
Basic Configuration
Interpolation Time Type
Choose from:
Relative Time: Interpolates at regular intervals based on the data parsing task's start time. Set the Relative Time Compensation Period with options such as 10s, 15s, 30s, 1min, 5min, 15min, 30min.
Absolute Time: Uses Java (Quartz) standard Crontab expressions to define absolute interpolation times. Set the Absolute Time Compensation Period. For more information, see Appendix: Crontab Expression.
Referencing the "Scenarios" section: For minute-level monitoring, select from two interpolation time types.
Relative Time: Choose Relative Time Compensation Period as 1min.
Absolute Time: Set the Crontab expression to
0 */1 * * * ?.
Interpolation Data Type
Options include:
Previous Real Data: Uses the last reported real data for interpolation.
Preset Data: Employs predefined data for interpolation. The message content should be in JSON format.
Following the "Scenarios" section: Choose Previous Real Data.
Advanced Configuration
Message Partition Key
Optional, specifies the dimension for timeout interpolation, often used to distinguish messages from different devices.
If not set, the IoT Platform system defaults to using ProductKey and DeviceName as the partition key.
In the "Scenarios" example: Use the thermostat's identity ID, the boxId field, as the partition key.
Latency Toleration
Specifies the delay in seconds before interpolating messages to prevent unnecessary interpolation due to real message transmission delays.
Adopt the default settings.
Time-to-Live
Defines the maximum duration in seconds to continue interpolation if a topic has not reported messages for an extended period. The minimum purge time is 1 minute, and the maximum is 7 days, with the default being 1 day. The timer resets with each received message.
Maintain the default settings.
Here is a detailed configuration example based on the "Scenarios" section:
To finalize the configuration of the timeout interpolation node, single click Save in the upper right corner of the data parsing workspace.
ImportantNote: The output fields of this node are identical to those of the preceding node.
What to do next
Following the configuration of the timeout interpolation node, proceed to set up additional processing nodes or configure the target node to complete the data parsing task.
Appendix: Crontab Expression
The Java (Quartz) standard Crontab expression is detailed below:
Example:
# Last day of each month
@Scheduled(cron = "0 0 18 * * ?")
public void doAtLastDayOfMonth() {
// do something here...
}
Explanation:
Java(Quartz)
* * * * * * *
- - - - - - -
| | | | | | |
| | | | | | + year [optional]
| | | | | +----- day of week (1 - 7) SUN,MON,TUE,WED,THU,FRI,SAT
| | | | +---------- month (1 - 12) OR JAN,FEB,MAR,APR ...
| | | +--------------- day of month (1 - 31)
| | +-------------------- hour (0 - 23)
| +------------------------- min (0 - 59)
+------------------------------ second (0 - 59)Field | Required | Value Range (Integer) | Allowed Special Characters |
second | Yes | 0~59 |
|
minute | Yes | 0~59 | |
hour | Yes | 0~23 | |
day of month | Yes | 1~31 |
|
month | Yes | 1~12 or JAN~DEC Correspondence: 1 for January (JAN), 2 for February (FEB), 3 for March (MAR), 4 for April (APR), 5 for May (MAY), 6 for June (JUN), 7 for July (JUL), 8 for August (AUG), 9 for September (SEP), 10 for October (OCT), 11 for November (NOV), 12 for December (DEC). | Asterisk (*): Represents all possible values in the field. |
day of week | Yes | 0~7 or SUN~SAT Correspondence: 0 (SUN), 1 (MON), 2 (TUE), 3 (WED), 4 (THU), 5 (FRI), 6 (SAT). Note that both 0 and 7 represent Sunday (SUN). | Asterisk (*), question mark (?): Used to specify 'no specific value' or 'any value' in the field. |
year | No | 1970~2099 | Asterisk (*): Represents all possible values in the field. |