HTTPS 规范

HTTPS 是将 ELS 数据从手机传输到端点的可用格式之一。HTTPS 协议非常标准,本文档不会详细介绍该协议本身。端点应接收 POST 消息,其中将在以下字段中包含紧急位置信息。

请注意,当数据可用时,应尽最大努力填充尽可能多的字段,尤其是以下字段:timelocation_latitudelocation_longitudelocation_accuracy。如果没有此类数据,ELS 消息几乎毫无用处。不过,最终所有字段都被视为可选字段。端点通常应能够处理缺少字段/字段格式有误的消息,而不会出现错误。

端点应在成功接收消息时返回 2XX 成功代码。如果处理消息时出现问题,或者消息必须因其他原因而被丢弃,端点仍应返回 2XX 成功代码。可以使用不同的 2XX 成功代码来跟踪端点对消息的具体处理情况。

数据格式基于最新的 ETSI AML 规范。以下部分最相关:

内容

字段规范

密钥 单位 示例
v 版本 - 1
emergency_number 拨打的紧急电话号码 - 911
source 激活来源(通话、短信) - 致电
thunderbird_version Thunderbird 模块的版本号 - 2800
time 通话开始时间的时间戳 毫秒(Unix 时间) 1438101600123
location_latitude 纬度 37.4217845
location_longitude 经度 -122.0847413
location_time 位置信息修正的时间戳 毫秒(Unix 时间) 1438102600123
location_altitude 海拔高度 (WGS84) 4
location_altitude_msl 海拔(平均海平面) 4
location_floor 楼层标签(如电梯按钮楼层标签 - 可能为非数字) - 2
location_source 位置信息来源(GPS、WLAN、移动网络、未知) - gps
location_accuracy 准确率 20
location_vertical_accuracy 垂直精度 2.5
location_vertical_accuracy_msl 垂直精度(平均海平面) 2.5
location_confidence 位置信息精确度方面的信心 百分比 (0-1) 0.6827
location_bearing 方向角 156.7
location_speed 速度 米/秒 1.2
device_number 设备电话号码(已尽力采用 E.164 电话号码格式) - +1438101600
device_model 设备型号(通常采用“设备制造商”后跟“设备型号名称”的形式) - Motorola Nexus 6
device_imsi IMSI - 310260579377451
device_imei IMEI - 355458061005220
device_iccid ICCID - 89148000001466362977
cell_home_mcc 主 MCC - 310
cell_home_mnc Home MNC - 260
cell_network_mcc 网络 MCC - 310
cell_network_mnc 网络 MNC - 260
hmac 消息认证码 -

位置信息为 null

设备数量

在某些情况下,可能不会始终指定 device_number 字段。ELS 会尝试从各种来源获取电话号码,但可能无法获取。我们建议:除了发送 HTTPS 消息之外,还发送一条短信;在收到这两条消息时,通过 IMEI 和时间(通话开始的时间戳)进行匹配,以推断设备号码;或者与 MNO 合作,使用 IMEI/IMSI 检索电话号码。

我们会尽可能将电话号码格式设置为 E.164 格式,即包含加号和国家/地区拨号代码前缀,后跟用户号码(不得包含空格或括号)+1438101600。如果我们无法推断出国家/地区代码,因此无法设置号码格式,则会按来源提供的原始号码发送。

海拔高度(Z 轴)

在所有传送给 ELS 端点的 ELS HTTPS 位置信息中,ELS 都会报告 z 轴位置。海拔高度以高于平均海平面 (MSL) 的米数 (location_altitude_msl) 和高于 WGS84 参考椭球的米数 (location_altitude) 来报告(WGS 是 GPS 使用的参考世界大地测量系统)。

ELS 还会报告两种海拔测量值的垂直精确度(以米为单位):location_vertical_accuracylocation_vertical_accuracy_msl。垂直准确度的定义与位置信息准确度相同,置信度百分位由合作伙伴设置。默认置信度为 68%。如需了解详情,请参阅 Android 文档中有关 getVerticalAccuracyMeters()getMslAltitudeAccuracyMeters() 的说明。

有了用户高于平均海平面 (MSL) 的海拔高度,现在可以使用服务器端 API 获取地形海拔高度 MSL,从而推断用户高于地面的高度。

其他急救信息

ELS 支持除位置信息之外的其他字段,这些字段统称为“其他紧急信息”(AEI)。这些字段默认情况下不会提供,并且分为四类,每类都需要合作伙伴明确选择接受:

  • 常规(设备语言、紧急情况类型、紧急呼叫触发器相关信息,包括车祸和跌倒检测时间戳)
  • 医疗信息
  • 紧急情况联系人
  • 直播视频

请提交配置更改请求以启用这些字段,如有疑问,请与 ELS 团队联系

限制和注意事项

此数据可能不是最新数据,也可能不准确。医疗信息和紧急联系人信息来自用户设备上的紧急情况应用。此应用由手机制造商提供,由他们决定支持哪些信息,以及提供格式化信息还是自由格式信息。此外,这些数据由用户直接输入。通常,必须对这些数据进行清理。

对于自由格式的“字符串”字段,数据由 ELS 传递,不会进行修改,因此无法保证格式和有效性。对于结构化字段,ELS 会以特定格式发送其值,但不保证此数据的有效性。示例:

  • 时间戳:保证为数字,并且对于符合规范的实现,预计包含自 UNIX 纪元以来的毫秒时间戳。对于不符合规范的实现,必须能够妥善处理无效值(例如 -1)。
  • 日期:保证采用 ISO 8601 YYYY-MM-DD 格式。如果实现不符合规范,必须能够妥善处理无效日期(例如 2020-22-22)。

常规

密钥 单位 示例
adr_carcrash_time 车祸时间戳 毫秒(Unix 时间) 1438101600123
device_languages BCP 47 语言标记(以英文逗号分隔),按优先级从高到低排列 - en-US、fr-FR
emergency_type 紧急情况类型(如果用户在辅助紧急拨号期间选择) MEDICAL/FIRE/POLICE 之一 发射
fall_detection_time 检测到跌倒时的时间戳 毫秒(Unix 时间) 1438101600124
loss_of_pulse_time 检测到脉搏消失事件时的时间戳 毫秒(Unix 时间) 1438101600125

紧急情况联系人

密钥 单位 示例
econtact_[0-12]_name 第 [0-12]个紧急情况联系人的姓名 - John Doe
econtact_[0-12]_phone_number 第 [0-12]位紧急联系人的电话号码 不保证是有效的电话号码 +123 456789
econtact_[0-12]_relationship 用户与第 [0-12]位紧急情况联系人的关系 - 姐妹

医疗信息

密钥 单位 示例
med_info_last_updated_time 医疗信息上次更新的时间戳 毫秒(Unix 时间,不保证有效) 1438101600124
med_info_name 用户的名称 - Alex Smith
med_info_date_of_birth_gregorian 出生日期 ISO 8601 YYYY-MM-DD(不保证是有效日期,例如 2020-22-22) 1990-01-03
med_info_date_of_birth_other 出生日期(自由格式) - 2000 年 1 月 1 日
med_info_height 高度 - 180 厘米
med_info_weight 重量 - 10 英石
med_info_sex 生理性别(预定义) UNKNOWN / MALE / FEMALE / INTERSEX / OTHER 之一 INTERSEX
med_info_sex_extra 生理性别(自由格式,可能补充 med_info_sex) - 从“女性”改用“男性”
med_info_gender 性别 - 非二元性别
med_info_home_address 家庭住址 - 123 Halifax Avenue,
Alexandria 12345
med_info_blood_type_abo 血型(预定义) UNKNOWN / O_POSITIVE / O_NEGATIVE / O_UNKNOWN / A_POSITIVE / A_NEGATIVE / A_UNKNOWN / B_POSITIVE / B_NEGATIVE / B_UNKNOWN / AB_POSITIVE / AB_NEGATIVE / AB_UNKNOWN / H_H 之一 B_NEGATIVE
med_info_blood_type_other 血型(自由格式) - Le(a-b-)
med_info_allergies 过敏反应 - 乳胶
med_info_medications 用药情况 - 阿司匹林
med_info_conditions_history 病史 - 高血压
med_info_devices_mobility_requirements 医疗器械或行动不便要求 - Pacemaker
med_info_pregnancy_status 怀孕状况 UNKNOWN / PREGNANT / NOT_PREGNANT 之一 怀孕
med_info_pregnancy_due_date 预产期 ISO 8601 YYYY-MM-DD(不保证是有效日期,例如 2020-22-22) 2022-10-10
med_info_pregnancy_info 怀孕信息 可能补充 med_info_pregnancy_statusmed_info_pregnancy_due_date 计划剖腹产
med_info_organ_donor 器官捐赠人(预定义) UNKNOWN / NO / YES 之一
med_info_organ_donor_extra 器官捐赠人(自由格式) 可能补充 med_info_organ_donor 仅限心脏和肺
med_info_advanced_directives 高级指令 - DNS
med_info_physician_info 主治医生的信息 - John Doe, 34 Rainbow street, +123 456789
med_info_other 其他医疗信息 - 自费投保,保险 ID 为 123-ABC-987

实时视频

ELS 支持实时视频,有助于从用户设备发起视频流。 如果启用,当用户的手机支持该功能(Android 8+ Oreo)时,您将在 HTTPS ELS 消息中收到 live_video_token 字段。如需了解详情,请参阅直播视频

密钥 单位 示例
live_video_token 6 个随机大写字母数字字符 - ABC123

示例

无位置信息,但有设备号码(例如:164 格式):

v=1&thunderbird_version=220512054&emergency_number=911&source=CALL&time=1643650654147&location_latitude=%2B00.00000&location_longitude=%2B000.00000&location_time=1643650654147&location_altitude=0&location_accuracy=0&location_confidence=0&location_source=unknown&device_number=%2B1234567890&device_model=Google+Pixel+6+Pro&device_imei=123456789012345&device_imsi=234159876543210&device_iccid=12345678901234567890&cell_home_mcc=234&cell_home_mnc=15&cell_network_mcc=234&cell_network_mnc=15

没有位置信息,没有设备编号:

v=1&thunderbird_version=220512054&emergency_number=911&source=CALL&time=1643650654147&location_latitude=%2B00.00000&location_longitude=%2B000.00000&location_time=1643650654147&location_altitude=0&location_accuracy=0&location_confidence=0&location_source=unknown&device_model=Google+Pixel+6+Pro&device_imei=123456789012345&device_imsi=234159876543210&device_iccid=12345678901234567890&cell_home_mcc=234&cell_home_mnc=15&cell_network_mcc=234&cell_network_mnc=15

计算出的位置,包含设备编号(例如:164 格式):

v=1&thunderbird_version=220512054&emergency_number=911&source=CALL&time=1643648829301&location_latitude=51.5332125&location_longitude=-0.1260139&location_time=1643648838875&location_altitude=77.5999985&location_altitude_msl=67.5999985&location_vertical_accuracy=0.9868233&location_vertical_accuracy_msl=0.8868233&location_accuracy=14.9460001&location_bearing=306.3276367&location_speed=0.0783991&location_confidence=0.6826895&location_source=wifi&device_number=%2B1234567890&device_model=Google+Pixel+6+Pro&device_imei=123456789012345&device_imsi=234159876543210&device_iccid=12345678901234567890&cell_home_mcc=234&cell_home_mnc=15&cell_network_mcc=234&cell_network_mnc=15

计算出的位置,包含设备编号(非 E. 164 格式):

v=1&thunderbird_version=220512054&emergency_number=911&source=CALL&time=1643648829301&location_latitude=51.5332125&location_longitude=-0.1260139&location_time=1643648838875&location_altitude=77.5999985&location_altitude_msl=67.5999985&location_vertical_accuracy=0.9868233&location_vertical_accuracy_msl=0.8868233&location_accuracy=14.9460001&location_bearing=306.3276367&location_speed=0.0783991&location_confidence=0.6826895&location_source=wifi&device_number=01234567890&device_model=Google+Pixel+6+Pro&device_imei=123456789012345&device_imsi=234159876543210&device_iccid=12345678901234567890&cell_home_mcc=234&cell_home_mnc=15&cell_network_mcc=234&cell_network_mnc=15

位置信息已计算,但没有设备编号:

v=1&thunderbird_version=220512054&emergency_number=911&source=CALL&time=1643648829301&location_latitude=51.5332125&location_longitude=-0.1260139&location_time=1643648838875&location_altitude=77.5999985&location_altitude_msl=67.5999985&location_vertical_accuracy=0.9868233&location_vertical_accuracy_msl=0.8868233&location_accuracy=14.9460001&location_bearing=306.3276367&location_speed=0.0783991&location_confidence=0.6826895&location_source=wifi&device_model=Google+Pixel+6+Pro&device_imei=123456789012345&device_imsi=234159876543210&device_iccid=12345678901234567890&cell_home_mcc=234&cell_home_mnc=15&cell_network_mcc=234&cell_network_mnc=15

已计算位置信息,包含一般性额外紧急情况信息:

v=1&thunderbird_version=220512054&emergency_number=911&source=CALL&time=1643648829301&location_latitude=51.5332125&location_longitude=-0.1260139&location_time=1643648838875&location_altitude=77.5999985&location_altitude_msl=67.5999985&location_vertical_accuracy=0.9868233&location_vertical_accuracy_msl=0.8868233&location_accuracy=14.9460001&location_bearing=306.3276367&location_speed=0.0783991&location_confidence=0.6826895&location_source=wifi&device_number=%2B1234567890&device_model=Google+Pixel+6+Pro&device_imei=123456789012345&device_imsi=234159876543210&device_iccid=12345678901234567890&cell_home_mcc=234&cell_home_mnc=15&cell_network_mcc=234&cell_network_mnc=15&adr_carcrash_time=1643648829100&fall_detection_time=1643648829200&loss_of_pulse_time=1643648829201&emergency_type=MEDICAL

已计算位置信息,并显示实时视频:

v=1&thunderbird_version=220512054&emergency_number=911&source=CALL&time=1643648829301&location_latitude=51.5332125&location_longitude=-0.1260139&location_time=1643648838875&location_altitude=77.5999985&location_altitude_msl=67.5999985&location_vertical_accuracy=0.9868233&location_vertical_accuracy_msl=0.8868233&location_accuracy=14.9460001&location_bearing=306.3276367&location_speed=0.0783991&location_confidence=0.6826895&location_source=wifi&device_number=%2B1234567890&device_model=Google+Pixel+6+Pro&device_imei=123456789012345&device_imsi=234159876543210&device_iccid=12345678901234567890&cell_home_mcc=234&cell_home_mnc=15&cell_network_mcc=234&cell_network_mnc=15&live_video_token=ABC123

计算出的位置信息,包含医疗信息和紧急情况联系人(假设紧急情况应用运行正常,可提供结构化数据):

v=1&thunderbird_version=220512054&emergency_number=911&source=CALL&time=1643648829301&location_latitude=51.5332125&location_longitude=-0.1260139&location_time=1643648838875&location_altitude=77.5999985&location_altitude_msl=67.5999985&location_vertical_accuracy=0.9868233&location_vertical_accuracy_msl=0.8868233&location_accuracy=14.9460001&location_bearing=306.3276367&location_speed=0.0783991&location_confidence=0.6826895&location_source=wifi&device_number=%2B1234567890&device_model=Google+Pixel+6+Pro&device_imei=123456789012345&device_imsi=234159876543210&device_iccid=12345678901234567890&cell_home_mcc=234&cell_home_mnc=15&cell_network_mcc=234&cell_network_mnc=15&med_info_name=Alex+Smith&med_info_date_of_birth_gregorian=1990-01-03&med_info_height=6+ft&med_info_weight=100+kg&med_info_home_address=Test+Street+5%2C+80636+Munich&med_info_blood_type_abo=H_H&med_info_allergies=Peanuts&med_info_medications=Zestril&med_info_pregnancy_status=PREGNANT&med_info_pregnancy_due_date=2023-10-31&med_info_organ_donor=YES&med_info_other=Insurance+id%3A+12345

计算出的位置信息,包含医疗信息和紧急情况联系人(假设紧急情况应用运行正常,可提供非结构化数据并设置所有可能的字段):

v=1&thunderbird_version=220512054&emergency_number=911&source=CALL&time=1643648829301&location_latitude=51.5332125&location_longitude=-0.1260139&location_time=1643648838875&location_altitude=77.5999985&location_altitude_msl=67.5999985&location_vertical_accuracy=0.9868233&location_vertical_accuracy_msl=0.8868233&location_accuracy=14.9460001&location_bearing=306.3276367&location_speed=0.0783991&location_confidence=0.6826895&location_source=wifi&device_number=%2B1234567890&device_model=Google+Pixel+6+Pro&device_imei=123456789012345&device_imsi=234159876543210&device_iccid=12345678901234567890&cell_home_mcc=234&cell_home_mnc=15&cell_network_mcc=234&cell_network_mnc=15&med_info_last_updated_time=1438101600000&med_info_name=Alex+Smith&med_info_date_of_birth_other=On+the+first+day+of+year+2000&med_info_height=180+cm&med_info_weight=10+stones&med_info_sex=INTERSEX&med_info_sex_extra=Transitioning+from+FEMALE+to+MALE&med_info_gender=non-binary&med_info_home_address=123+Halifax+Avenue%2C+Alexandria+12345&med_info_blood_type_other=Le%28a-b-%29&med_info_allergies=Latex&med_info_medications=Aspirin&med_info_conditions_history=ADHD&med_info_devices_mobility_requirements=Pacemaker&med_info_pregnancy_status=PREGNANT&med_info_pregnancy_due_date=2022-10-10&med_info_pregnancy_info=Planned+c-section&med_info_organ_donor=YES&med_info_organ_donor_extra=Only+heart+and+lungs&med_info_advanced_directives=DNS&med_info_physician_info=John+Doe%2C+34+Rainbow+street%2C+%2B123+456789&med_info_other=Privately+insured%2C+insurance+ID+123-ABC-987&econtact_0_name=John+Doe&econtact_0_phone_number=000+000&econtact_0_relationship=Father&econtact_1_name=Jane+Doe&econtact_1_phone_number=111+111&econtact_1_relationship=Mother&econtact_2_name=Alice+Smith&econtact_2_phone_number=222+222&econtact_2_relationship=Sister&econtact_3_name=Bob+Smith&econtact_3_phone_number=333+333&econtact_3_relationship=Brother&econtact_4_name=Charlie+Smith&econtact_4_phone_number=444+444&econtact_4_relationship=Brother&econtact_5_name=Dan+Smith&econtact_5_phone_number=555+555&econtact_5_relationship=Cousin&econtact_6_name=Eve+Smith&econtact_6_phone_number=666+666&econtact_6_relationship=Grandmother&econtact_7_name=Mallory+Smith&econtact_7_phone_number=777+777&econtact_7_relationship=Aunt&econtact_8_name=Trent+Smith&econtact_8_phone_number=888+888&econtact_8_relationship=Uncle&econtact_9_name=Xenia+Smith&econtact_9_phone_number=999+999&econtact_9_relationship=Sister&econtact_10_name=Yara+Smith&econtact_10_phone_number=10+10+10&econtact_10_relationship=Cousin&econtact_11_name=Zane+Smith&econtact_11_phone_number=11+11+11&econtact_11_relationship=Cousin&econtact_12_name=%28truncated%29

计算出的位置信息,包含医疗信息(假设最糟糕的紧急情况应用提供无效、无界限且非结构化的数据):

v=1&thunderbird_version=220512054&emergency_number=911&source=CALL&time=1643648829301&location_latitude=51.5332125&location_longitude=-0.1260139&location_time=1643648838875&location_altitude=77.5999985&location_altitude_msl=67.5999985&location_vertical_accuracy=0.9868233&location_vertical_accuracy_msl=0.8868233&location_accuracy=14.9460001&location_bearing=306.3276367&location_speed=0.0783991&location_confidence=0.6826895&location_source=wifi&device_number=%2B1234567890&device_model=Google+Pixel+6+Pro&device_imei=123456789012345&device_imsi=234159876543210&device_iccid=12345678901234567890&cell_home_mcc=234&cell_home_mnc=15&cell_network_mcc=234&cell_network_mnc=15&med_info_last_updated_time=-1000&med_info_date_of_birth_gregorian=0000-00-00&med_info_sex_extra=Transitioning+from+FEMALE+to+MALE&med_info_blood_type_other=Le%28a-b-%29&med_info_pregnancy_due_date=3000-22-22&med_info_organ_donor_extra=Only+heart+and+lungs&med_info_other=Lorem+ipsum+dolor+sit+amet%2C+consetetur+sadipscing+elitr%2C+sed+diam+nonumy+eirmod+tempor+invidunt+ut+labore+et+dolore+magna+aliquyam+erat%2C+sed+diam+voluptua.+At+vero+eos+et+accusam+et+justo+duo+dolores+et+ea+rebum.+Stet+clita+kasd+gubergren%2C+no+sea+takimata+sanctus+est+Lorem+ipsum+dolor+sit+amet.+Lorem+ipsum+dolor+sit+amet%2C+consetetur+sadipscing+elitr%2C+sed+diam+nonumy+eirmod+tempor+invidunt+ut+labore+et+dolore+magna+aliquyam+erat%2C+sed+diam+voluptua.+At+vero+eos+et+accusam+et+justo+duo+dolores+et+ea+rebum.+Stet+clita+kasd+gubergren%2C+no+sea+takimata+sanctus+est+Lorem+ipsum+dolor+sit+amet.+Lorem+ipsum+dolor+sit+amet%2C+consetetur+sadipscing+elitr%2C+sed+diam+nonumy+eirmod+tempor+invidunt+ut+labore+et+dolore+magna+aliquyam+erat%2C+sed+diam+voluptua.+At+vero+eos+et+accusam+et+justo+duo+dolores+et+ea+rebum.+Stet+clita+kasd+gubergren%2C+no+sea+takimata+sanctus+est+Lorem+ipsum+dolor+sit+amet.+%0A%0ADuis+autem+vel+eum+iriure+dolor+in+hendrerit+in+vulputate+velit+esse+molestie+consequat%2C+vel+illum+dolore+eu+feugiat+nulla+facilisis+at+vero+eros+et+accumsan+et+iusto+odio+dignissim+qui+blandit+praesent+luptatum+zzril+delenit+augue+duis+dolore+te+feugait+nulla+facilisi.+Lorem+ipsum+dolor+sit+amet%2C+consectetuer+adipiscing+elit%2C+sed+diam+nonummy+nibh+euismod+tincidunt+ut+laoreet+dolore+magna+aliquam+erat+volutpat.+%0A%0AUt+wisi+enim+ad+minim+veniam%2C+quis+nostrud+exerci+tation+ullamcorper+suscipit+lobortis+nisl+ut+aliquip+ex+ea+commodo+consequat.+Duis+autem+vel+eum+iriure+dolor+in+hendrerit+in+vulputate+velit+esse+molestie+consequat%2C+vel+illum+dolore+eu+feugiat+nulla+facilisis+at+vero+eros+et+accumsan+et+iusto+odio+dignissim+qui+blandit+praesent+luptatum+zzril+delenit+augue+duis+dolore+te+feugait+nulla+facilisi.+%0A%0ANam+liber+tempor+cum+soluta+nobis+eleifend+option+congue+nihil+imperdiet+doming+id+quod+mazim+placerat+facer+possim+assum.+Lorem+ipsum+dolor+sit+amet%2C+consectetuer+adipiscing+elit%2C+sed+diam+nonummy+nibh+euismod+tincidunt+ut+laoreet+dolore+magna+aliquam+erat+volutpat.+Ut+wisi+enim+ad+minim+v%28truncated%29