跳转到内容
产品文档已发布

RAILWISE-TSM 数据采集与自动化流程

详细说明RAILWISE-TSM平台的数据采集流程、自动化调度策略、数据质量控制、实时计算与告警推送机制

复核 2026-07-09入门公开可引用RailWise 技术团队
产品文档

RAILWISE-TSM 数据采集与自动化流程

Section titled “RAILWISE-TSM 数据采集与自动化流程”

TSM 的数据采集流程涵盖从任务触发到结果交付的完整闭环:

触发条件 → 任务调度 → 设备连接 → 测量执行 → 数据回传 → 质量检查 → 平差计算 → 变形分析 → 结果存储 → 告警判断 → 报告更新

整个流程在平台内自动化完成,无需人工干预。工程师可通过 Web 界面实时监控每个环节的状态。


TSM 支持三种采集触发方式,适应不同监测场景需求:

最常用方式,按预设时间周期自动执行采集。

配置示例:

trigger:
type: cron
name: "日常监测任务"
enabled: true
# Cron 表达式: 每日 08:00、14:00、20:00 执行
cron_expression: "0 8,14,20 * * *"
# 时区设置
timezone: "Asia/Shanghai"
# 执行范围
target:
project: "绕城高速管廊工程1标段"
point_groups: ["地表沉降", "支护水平位移"]
exclude_points: ["P-99"]

常用 Cron 表达式参考:

采集频率 Cron 表达式 说明
每 30 分钟 0/30 * * * * 高频监测
每 4 小时 0 0,4,8,12,16,20 * * * 轨道交通高频快报
每 8 小时 0 0,8,16 * * * 常规高频监测
每日 3 次 0 8,14,20 * * * 日常监测
每日 1 次 0 8 * * * 常规监测
每周 1 次 0 8 * * 1 稳定期监测

按固定时间间隔触发,适合需要均匀采样的场景。

trigger:
type: interval
name: "连续监测任务"
enabled: true
# 间隔时间
interval_minutes: 30
# 有效时段(可选)
active_hours:
start: "06:00"
end: "22:00"
# 排除日期(可选)
exclude_dates:
- "2026-01-28" # 春节
- "2026-01-29"

与外部系统联动,在特定事件发生时触发采集。

与盾构机 PLC 联动示例:

trigger:
type: event
name: "盾构穿越联动监测"
enabled: true
# 事件源配置
event_source:
type: plc
connection: "opc.tcp://192.168.1.200:4840"
# 触发条件
conditions:
- variable: "ring_number"
operator: "changed" # 环号变化时触发
- variable: "cutter_torque"
operator: ">"
value: 3000 # 刀盘扭矩超限触发
# 附加动作
actions:
- type: "increase_frequency"
params:
duration: "2h"
new_interval: "10min"

与气象站联动示例:

trigger:
type: event
name: "暴雨加密监测"
event_source:
type: weather_api
endpoint: "https://api.weather.com/..."
conditions:
- variable: "rainfall_1h"
operator: ">"
value: 50 # 1小时降雨量 > 50mm
actions:
- type: "emergency_collect"
params:
points: ["边坡测点组"]
frequency: "1次/30min"
duration: "24h"

TSM 的采集调度器采用分布式设计,核心组件包括:

┌─────────────────────────────────────────────┐
│ 调度器核心 (Scheduler) │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │ 触发器 │ │ 任务队列 │ │ 执行器 │ │
│ │ Trigger │ │ Queue │ │ Executor │ │
│ └──────────┘ └──────────┘ └──────────┘ │
│ ┌──────────┐ ┌──────────┐ │
│ │ 冲突检测 │ │ 资源管理 │ │
│ │ Conflict │ │ Resource │ │
│ └──────────┘ └──────────┘ │
└─────────────────────────────────────────────┘

当多个任务同时触发时,调度器按以下优先级执行:

优先级 任务类型 说明
P0 紧急采集 告警响应、事件触发
P1 高频快报 4h/8h 快报任务
P2 定时采集 日常监测任务
P3 补充测量 人工发起的补测
P4 备份采集 数据校验、冗余测量

当多个任务需要同一台设备时,调度器自动协调:

conflict_resolution:
strategy: "priority_first" # priority_first / queue / merge
# 若选择 merge,可合并多个任务的测点列表
merge_conditions:
- max_points: 50 # 合并后测点数上限
- max_duration: "30min" # 合并后采集时长上限
- point_proximity: "50m" # 测点空间距离限制

measurement_flow:
step_1_connect:
action: "establish_connection"
timeout: 10000 # 连接超时(毫秒)
retry: 3
step_2_initialize:
action: "initialize_device"
operations:
- "check_compensator" # 检查补偿器状态
- "check_battery" # 检查电池电量
- "check_prism_constant" # 检查棱镜常数
- "set_atmospheric" # 设置大气改正参数
step_3_orientation:
action: "station_setup"
method: "resection" # 后方交会 / known_point 已知点
min_targets: 3 # 最少后视目标数
max_residual: 2.0 # 最大残差(mm)

TSM 支持多种测量模式,根据项目需求选择:

测量模式 适用场景 精度 效率
极坐标法 常规监测
后方交会 自由设站
前方交会 双站观测 很高
自动追踪 机器人全站仪 很高
扫描模式 断面扫描 很高

极坐标法配置示例:

measurement:
method: "polar"
# 测站设置
station:
point_id: "GD01" # 工作基点编号
instrument_height: 1.500 # 仪器高(米)
# 后视方向
backsight:
point_id: "BS01"
prism_height: 1.500
# 测量参数
parameters:
rounds: 3 # 测回数
face_change: true # 是否盘左盘右
measurement_mode: "standard" # standard / tracking / fast
# 限差设置
tolerance:
round_diff: 2.0 # 测回差(mm)
horizontal_diff: 5" # 水平角测回差
vertical_diff: 5" # 垂直角测回差

后方交会配置示例:

measurement:
method: "resection"
# 已知控制点(至少 3 个)
control_points:
- point_id: "JZ01"
x: 40512345.678
y: 3312345.678
h: 5.678
- point_id: "JZ02"
x: 40512350.000
y: 3312350.000
h: 5.680
- point_id: "JZ03"
x: 40512355.000
y: 3312340.000
h: 5.675
# 交会参数
parameters:
min_angle: 30 # 交会角最小值(度)
max_angle: 150 # 交会角最大值(度)
max_residual: 2.0 # 最大残差(mm)

对于 Leica TS16、Trimble S9 等机器人全站仪,支持自动追踪棱镜:

measurement:
method: "automatic_tracking"
tracking:
enabled: true
search_mode: "prism" # prism / reflectorless
search_range: "360" # 搜索范围(度)
# 目标列表
targets:
- point_id: "P-01"
prism_type: "360_prism" # 360度棱镜
prism_constant: 0.0
target_height: 1.500
- point_id: "P-02"
prism_type: "mini_prism"
prism_constant: -17.5
target_height: 1.200

采集完成后,系统自动执行以下质量检查:

检查项 检查内容 不合格处理
测回差检查 各测回坐标差是否超限 重测或标记异常
角度检查 水平角/垂直角是否在合理范围 标记异常
距离检查 斜距是否在量程范围内 标记异常
补偿器检查 倾斜补偿值是否超限 告警并暂停采集
气象检查 温度/气压是否异常 提示人工确认

采用统计方法自动识别粗差:

quality_control:
outlier_detection:
method: "3_sigma" # 3σ 准则 / grubbs / dixon
# 3σ 准则参数
sigma_multiplier: 3.0
# 历史数据窗口
history_window: 10 # 最近 10 次观测
# 处理策略
action: "re_measure" # re_measure / flag / discard
max_remeasure: 2 # 最大重测次数
completeness_check:
required_points: 56 # 应测点数
min_completion_rate: 0.95 # 最低完成率 95%
# 未完成测点处理
missing_action: "alarm" # alarm / skip / manual
# 数据时间一致性
time_sync:
max_time_diff: 300 # 最大时间差(秒)
reference: "server_time" # 以服务器时间为准

原始观测数据(水平角、垂直角、斜距)经以下步骤转换为三维坐标:

原始观测值
→ 大气改正(温度、气压、湿度)
→ 加常数改正(棱镜常数、仪器常数)
→ 投影改正(高程归化、高斯投影)
→ 平差计算(最小二乘平差)
→ 三维坐标 (X, Y, H)

Rust 计算引擎核心代码片段:

// 极坐标法坐标计算(简化示意)
pub fn polar_to_cartesian(
station: &Station,
observation: &Observation,
atmosphere: &Atmosphere,
) -> Result<Coordinate, ComputeError> {
// 1. 大气改正
let corrected_distance = apply_atmospheric_correction(
observation.slope_distance,
atmosphere.temperature,
atmosphere.pressure,
atmosphere.humidity,
);
// 2. 加常数改正
let final_distance = corrected_distance
+ observation.prism_constant
+ station.instrument_constant;
// 3. 计算坐标增量
let dx = final_distance * observation.vertical_angle.cos()
* observation.horizontal_angle.sin();
let dy = final_distance * observation.vertical_angle.cos()
* observation.horizontal_angle.cos();
let dh = final_distance * observation.vertical_angle.sin()
+ station.instrument_height
- observation.target_height;
// 4. 计算测点坐标
Ok(Coordinate {
x: station.x + dx,
y: station.y + dy,
h: station.h + dh,
})
}

将当前坐标与初始值对比,计算累计变形量:

// 变形量计算
pub fn compute_deformation(
current: &Coordinate,
initial: &Coordinate,
) -> Deformation {
Deformation {
dx: current.x - initial.x,
dy: current.y - initial.y,
dh: current.h - initial.h,
// 水平位移合成
d_horizontal: ((current.x - initial.x).powi(2)
+ (current.y - initial.y).powi(2)).sqrt(),
// 三维位移合成
d_total: ((current.x - initial.x).powi(2)
+ (current.y - initial.y).powi(2)
+ (current.h - initial.h).powi(2)).sqrt(),
}
}
// 变化速率计算(基于最近 N 次观测)
pub fn compute_rate(
observations: &[TimedObservation],
window_size: usize,
) -> Result<Rate, ComputeError> {
if observations.len() < 2 {
return Err(ComputeError::InsufficientData);
}
let recent = &observations[observations.len().saturating_sub(window_size)..];
let time_diff = recent.last().unwrap().timestamp - recent.first().unwrap().timestamp;
let deformation_diff = recent.last().unwrap().deformation.d_horizontal
- recent.first().unwrap().deformation.d_horizontal;
Ok(Rate {
horizontal_rate: deformation_diff / time_diff.as_days(),
unit: "mm/day",
})
}

alert_logic:
# 累计变形量判断
cumulative:
- level: "注意"
condition: "deformation >= threshold_attention"
- level: "预警"
condition: "deformation >= threshold_warning"
- level: "报警"
condition: "deformation >= threshold_alert"
- level: "控制"
condition: "deformation >= threshold_control"
# 变化速率判断
rate:
- level: "注意"
condition: "rate >= rate_attention"
- level: "预警"
condition: "rate >= rate_warning"
# 趋势判断(基于线性回归)
trend:
enabled: true
prediction_days: 7
confidence: 0.95
notification:
channels:
- type: "sms"
enabled: true
provider: "aliyun"
template: "TSM_ALERT_SMS"
- type: "email"
enabled: true
smtp: "smtp.railwise.cn"
template: "TSM_ALERT_EMAIL"
- type: "wechat_work"
enabled: true
webhook: "https://qyapi.weixin.qq.com/..."
template: "TSM_ALERT_WECHAT"
- type: "app_push"
enabled: true
provider: "jpush"
# 分级通知策略
routing:
- level: "注意"
channels: ["app_push"]
delay: 0
- level: "预警"
channels: ["app_push", "email"]
delay: 0
- level: "报警"
channels: ["app_push", "email", "sms"]
delay: 0
- level: "控制"
channels: ["app_push", "email", "sms", "wechat_work"]
delay: 0
escalation: "call_duty_engineer" # 升级至电话通知
【TSM 监测预警】
项目:绕城高速管廊工程1标段
时间:2025-07-08 14:00:00
⚠️ 预警级别:橙色(报警)
测点信息:
- 测点编号:P-12
- 测点名称:12号墩沉降
- 当前累计变形:32.5 mm
- 报警阈值:30.0 mm
- 超限值:+2.5 mm
- 变化速率:3.2 mm/天
趋势分析:
- 近7天累计变化:12.8 mm
- 预测3天后:41.2 mm(将达到控制值)
建议措施:
1. 立即加密观测频率至 1次/2小时
2. 通知施工单位暂停该断面附近作业
3. 组织专家现场踏勘
查看详情:http://tsm.railwise.cn/projects/RW-2025-001/alerts/P-12

数据类型 存储介质 保留策略 说明
原始观测值 TimescaleDB 永久 水平角、垂直角、斜距
计算坐标 TimescaleDB 永久 X, Y, H
变形量 TimescaleDB 永久 dx, dy, dh, d_horizontal
告警记录 PostgreSQL 5年 告警时间、级别、内容
报告文件 MinIO 5年 PDF、Excel 报告
系统日志 文件系统 1年 调试与审计日志

TimescaleDB 自动执行数据压缩:

-- 查看压缩策略(由系统自动管理)
SELECT * FROM timescaledb_information.compression_settings
WHERE hypertable_name = 'observations';
-- 典型压缩配置:
-- 7 天内的数据:不压缩(快速查询)
-- 7-90 天的数据:中等压缩
-- 90 天以上的数据:高压缩比

在 TSM Web 界面中可实时监控:

左侧导航栏 → 采集监控 → 实时看板

监控指标:

指标 说明 正常范围
任务成功率 成功任务数 / 总任务数 ≥ 95%
平均采集时长 单次采集耗时 ≤ 30 分钟
数据完整率 实际测点数 / 计划测点数 ≥ 98%
设备在线率 在线设备数 / 总设备数 ≥ 99%
告警响应时间 从超限到通知的时间 ≤ 5 分钟
异常类型 自动处理 人工介入
设备离线 重连 3 次后标记离线 检查物理连接
测回差超限 自动重测 检查棱镜/气象参数
补偿器超限 暂停采集并告警 重新整平仪器
网络中断 缓存数据,恢复后补传 检查网络设备
计算异常 标记异常,跳过该测点 检查控制网

文档 路径 说明
TSM 平台概览 ./tsm-overview.md 产品介绍与系统架构
TSM 部署与安装指南 ./tsm-installation.md 环境搭建与部署
全站仪配置与连接设置 ./tsm-station-config.md 设备接入与通信配置
监测项目创建与管理 ./tsm-monitoring-project.md 项目配置与测点管理

# AI 语义标签
semantic_tags:
- data_acquisition
- automated_monitoring
- collection_schedule
- quality_control
- real_time_computation
- adjustment_computation
- deformation_analysis
- alert_notification
- data_storage
- monitoring_operations

📌 版本记录

  • v1.0.0 (2025-07-08) — 初始版本,涵盖采集触发、调度策略、质量控制、实时计算与告警推送

如需技术支持,请联系 RailWise 客户服务团队:support@railwise.cn

引用与复核把知识带回真实工程判断

引用时保留页面与来源线索;涉及标准条文、阈值、频率和项目结论,请回到现行依据与责任人复核。

查看 Agent 使用规则