# SOME/IP

**SOME/IP**（Scalable service-Oriented MiddlewarE over IP，基于 IP 的可扩展面向服务中间件）是一种中间件协议，用于汽车电子控制单元之间通过以太网和 IP 进行面向服务的通信，在 AUTOSAR 联盟内完成标准化。服务器提供服务，服务由方法、事件和字段组成；客户端动态发现并调用这些服务，在构建时不存在任何静态绑定。<sup>[1](https://github.com/autoas/as/blob/master/doc/EN/SOMEIP-SD.md)</sup> 它运行于汽车以太网的应用层（OSI 第 7 层），遵循面向服务的架构（SOA）原则。<sup>[2](https://elib.uni-stuttgart.de/bitstreams/89a93074-ca52-49cf-ae97-e49d27a7b5e2/download)</sup>

| 关键事实 | 详情 |
|---|---|
| 全称 | Scalable service-Oriented MiddlewarE over IP；AUTOSAR 制定的基于以太网/IP 的面向服务通信标准<sup>[1](https://github.com/autoas/as/blob/master/doc/EN/SOMEIP-SD.md)</sup> |
| 通信模型 | 服务器提供服务（方法、事件、字段）；客户端动态发现并调用，构建时无静态绑定<sup>[1](https://github.com/autoas/as/blob/master/doc/EN/SOMEIP-SD.md)</sup> |
| 服务发现 | SOME/IP-SD，配套的控制协议，提供服务发现与发布/订阅<sup>[3](https://some-ip.com/details.shtml)</sup> |
| 传输 | UDP 与 TCP；对延迟有严苛要求（低于 100 毫秒）时推荐 UDP，载荷大于 1400 字节且出错时延迟不关键时使用 TCP<sup>[4](https://some-ip.com/papers/drafts/2012-07-12-SOMEIP_Specification_Draft__ReRelease.pdf)</sup> |
| 报文格式 | 16 字节固定头部加变长载荷<sup>[5](https://www.mdpi.com/2076-3417/16/17/8609)</sup> |
| 序列化 | 二进制、非描述性格式，默认按网络字节序（大端）编码，也可采用小端编码<sup>[3](https://some-ip.com/details.shtml)</sup> |
| 标准化 | AUTOSAR 基础文档中的协议规范；ISO 17215-2:2014 定义了基本功能，序列化规则有限<sup>[6](https://some-ip.com/standards.shtml)</sup> |
| 开源实现 | vsomeip，由 COVESA 托管，至少在线格式层面与 AUTOSAR 兼容<sup>[7](https://github.com/COVESA/vsomeip/wiki/vsomeip-in-10-minutes)</sup> |

## 起源与标准化

最初的规范草案日期为 2012 年 7 月 12 日，由宝马集团（BMW Group）提交给 ISO、GENIVI、AUTOSAR 及其他组织。<sup>[4](https://some-ip.com/papers/drafts/2012-07-12-SOMEIP_Specification_Draft__ReRelease.pdf)</sup> SOME/IP 规范的[版权](https://www.edgepedia.org/zh/copyright)由巴伐利亚发动机制造厂股份有限公司（Bayerische Motoren Werke Aktiengesellschaft，BMW）持有，年份为 2011 年至 2017 年。<sup>[8](https://some-ip.com/open-someip-specification/open_someip_specification_2025-12.pdf)</sup>

SOME/IP 现纳入 AUTOSAR 标准化框架。AUTOSAR 基础文档（AUTOSAR Foundation）包含《SOME/IP 协议规范》和《SOME/IP 服务发现协议规范》，从 1.0.0 到 R25-11 的各个基础版本中陆续发布。<sup>[6](https://some-ip.com/standards.shtml)</sup> 经典平台（Classic Platform）载有相关文档，如《SOME/IP 转换器规范》和《SOME/IP 传输协议规范》（SOME/IP-TP）。<sup>[6](https://some-ip.com/standards.shtml)</sup> 在 ISO 标准化方面，ISO 17215-2:2014 定义了 SOME/IP 的基本功能，序列化规则有限，因为载荷是静态定义的。<sup>[6](https://some-ip.com/standards.shtml)</sup>

2025 年 12 月，首个开放 SOME/IP 规范发布，以宽松许可证涵盖 SOME/IP 的全部核心特性，允许开源使用，需求与源码发布在 GitHub 上。<sup>[6](https://some-ip.com/standards.shtml)</sup> 未来版本正在讨论的特性包括轻量级 SOME/IP 安全与密钥交换、与现有安全协议的交互、传统总线帧和 PDU 的处理，以及服务接口编写指南。<sup>[6](https://some-ip.com/standards.shtml)</sup>

## 工作原理

**服务与发现。** SOME/IP 系统围绕服务实例组织，服务实例由服务标识符和实例标识符标识；同一服务提供多个实例时，通过服务实例 ID（Service Instance ID）加以区分。<sup>[2](https://elib.uni-stuttgart.de/bitstreams/89a93074-ca52-49cf-ae97-e49d27a7b5e2/download)</sup> 配套协议 SOME/IP-SD 是控制协议，让服务器和客户端在运行时相互发现，同时提供发布/订阅功能。<sup>[1](https://github.com/autoas/as/blob/master/doc/EN/SOMEIP-SD.md)</sup><sup> • </sup><sup>[3](https://some-ip.com/details.shtml)</sup> 一条 SD 报文携带一个长度定界的条目块，后跟一个长度定界的选项块。<sup>[3](https://some-ip.com/details.shtml)</sup>

**传输。** SOME/IP 直接运行在互联网最常用的两种传输协议 UDP 和 TCP 之上。UDP 精简，提供多路复用，并通过校验和进行错误检测；TCP 增加可靠性，处理分段、丢失、重复、乱序和拥塞。2012 年规范的指导原则是：当出错时延迟要求极为严苛（低于 100 毫秒）时使用 UDP；仅当必须传输超过 1400 字节的大块数据且出错时无硬性延迟要求时才使用 TCP。对于周期性数据，等待下一次传输往往优于修复上一次传输。传输协议在接口规范中按报文指定，方法、事件和字段通常应使用同一种传输协议。<sup>[4](https://some-ip.com/papers/drafts/2012-07-12-SOMEIP_Specification_Draft__ReRelease.pdf)</sup>

**大报文。** 由于 UDP 不处理分段，未经扩展的 SOME/IP 在 UDP 上传输时仅限于较小的数据块。<sup>[4](https://some-ip.com/papers/drafts/2012-07-12-SOMEIP_Specification_Draft__ReRelease.pdf)</sup> SOME/IP 报文自身可以对 UDP 载荷分段，从而无需 [IP 分片](https://www.edgepedia.org/zh/ip-fragmentation)即可通过 UDP 传输大型 SOME/IP 报文。<sup>[3](https://some-ip.com/details.shtml)</sup> SOME/IP 传输协议（SOME/IP-TP）进一步使传输超过 1400 字节 UDP 载荷上限的报文成为可能。<sup>[9](https://github.com/COVESA/vsomeip/blob/master/documentation/vsomeipConfiguration.md)</sup>

**序列化。** 序列化格式的设计目标是占用最少的 RAM 和 CPU 资源，采用二进制、非描述性的布局，参数一个接一个写入；许多情况下线格式与紧凑结构体的内存表示一致。默认编码为网络字节序（大端），也可使用小端编码。支持的基本数据类型包括布尔型（8 位字段，仅编码 0 或 1）、uint8、uint16、uint32、uint64，以及 sint8、sint16 和更多有符号及无符号整数类型。<sup>[3](https://some-ip.com/details.shtml)</sup>

## AUTOSAR 集成

SOME/IP 被称为已知唯一为集成到 AUTOSAR 4.x 版本而设计的中间件。支持随版本逐步推进：AUTOSAR 4.0 提供对 SOME/IP 报文的基本支持；4.1 增加对 SOME/IP-SD 及发布/订阅的支持；4.2 增加用于序列化的转换器及其他优化；4.3 修复转换器缺陷，增加对 SOME/IP-TP 大 UDP 报文的支持，并对 SOME/IP-SD 进行优化。<sup>[3](https://some-ip.com/details.shtml)</sup>

AUTOSAR 版本会加入专有特性，通常并非每种实现都支持；例如 TLV 扩展、SD 中的可丢弃标志（Discardable Flag），以及 SD 客户端发送组播端点。<sup>[6](https://some-ip.com/standards.shtml)</sup> 服务发现规范本身也在演进：R21-11 版本移除了显式初始数据控制标志（Explicit Initial Data Control Flag）和初始数据请求标志（Initial Data Requested Flag），引入了对 ClientService 预定义组播地址的可选订阅，增加了对安全关联连接状态的考虑，并将规范条目移入基础文档 AUTOSAR_FO_PRS_SOMEIPServiceDiscoveryProtocol。<sup>[10](https://www.autosar.org/fileadmin/standards/R24-11/FO/AUTOSAR_FO_PRS_SOMEIPServiceDiscoveryProtocol.pdf)</sup>

## 实现

**vsomeip** 是由 COVESA 项目（原 GENIVI）托管的开源实现。它针对典型汽车用例设计，并至少在线格式层面与 AUTOSAR 兼容；它涵盖 SOME/IP 协议和服务发现，而 CommonAPI 的 SOME/IP 绑定提供更高层接口。<sup>[7](https://github.com/COVESA/vsomeip/wiki/vsomeip-in-10-minutes)</sup> 目前未知有 vsomeip 的独立规范文档；它实现宝马集团发布的公开 SOME/IP 规范。<sup>[6](https://some-ip.com/standards.shtml)</sup> 其他开源工具也已存在，例如 someipy Python 库，但尚未支持 SOME/IP 和 SOME/IP-SD 规范的全部特性。<sup>[11](https://someipy.readthedocs.io/en/v2.1.2/index.html)</sup>

SOME/IP 也用于经典车载网络之外：安卓车载操作系统（Android Automotive OS）在其软件定义汽车工作中将其用作与汽车 ECU 通信的外部通道，并提到其 AUTOSAR 标准化和服务发现支持。<sup>[12](https://source.android.com/docs/automotive/sdv/core-areas/some-ip?hl=en)</sup>

## 安全

SOME/IP 为封闭的车载网络设计，缺乏原生安全机制，如认证、完整性保护、机密性和重放防护，这些职责被委托给传输层。<sup>[13](https://pmc.ncbi.nlm.nih.gov/articles/PMC12412969/)</sup><sup> • </sup><sup>[5](https://www.mdpi.com/2076-3417/16/17/8609)</sup> 弥补这一缺口的研究方案包括 Secure SOME/IP，它提供双向认证、策略执行和对称密钥共享，但每个客户端都需要单独握手，对于车载网络中常见的组播配置而言效率不高。<sup>[5](https://www.mdpi.com/2076-3417/16/17/8609)</sup> 提出的分层设计将 AUTOSAR 的 SecOC 报文认证与 MACsec 链路层保护结合起来，用于以太网上的 SOME/IP。<sup>[5](https://www.mdpi.com/2076-3417/16/17/8609)</sup> 轻量级安全与密钥交换是开放规范正在讨论的特性之一。<sup>[6](https://some-ip.com/standards.shtml)</sup>

## 采用与展望

研究文献将 SOME/IP 描述为汽车面向服务架构中部署最广泛的实现。<sup>[14](https://arxiv.org/abs/2303.13903)</sup> 它常与汽车 SOA 中使用的另一种中间件 DDS（[数据分发服务](https://www.edgepedia.org/zh/data-distribution-service)，Data Distribution Service）相比较：SOME/IP 遵循以服务为中心的 RPC 风格模型，通过 SOME/IP-SD 发现，仅提供基本粒度的服务质量控制；而 DDS 是以数据为中心、基于主题的发布/订阅，具有丰富的 QoS 策略；两者分别由 AUTOSAR 和 OMG 标准化。<sup>[15](https://gengini.com/blog/someip-vs-dds)</sup> 已有在 TCP 和 UDP 上对两种协议进行实验性比较的研究，用以评估它们在汽车系统中的特性。<sup>[16](https://link.springer.com/article/10.1007/s11227-025-07635-7)</sup>

汽车制造商继续扩展其应用。雷诺集团（Renault Group）在汽车以太网大会上展示的 2024 年路线图描述了一个横跨 AUTOSAR Adaptive、AUTOSAR Classic 和 POSIX 系统的[面向服务架构](https://www.edgepedia.org/zh/service-oriented-architecture)，具有分层服务定义以及特性、逻辑、传感器和执行器的解耦，投产时伴随约 150 个 SOME/IP 服务，迈向软件定义汽车，到 2026 年覆盖所有车载域。<sup>[17](https://some-ip.com/papers/2024-AEC_Ampere_TechnicaEngineering_-_SOMEIP-next-10-years_final_v1.1a.pdf)</sup>

## References

1. [AUTOSAR SOME/IP and SOME/IP-SD, autoas documentation](https://github.com/autoas/as/blob/master/doc/EN/SOMEIP-SD.md)
2. [SOME/IP: An application-layer protocol on Automotive Ethernet, University of Stuttgart](https://elib.uni-stuttgart.de/bitstreams/89a93074-ca52-49cf-ae97-e49d27a7b5e2/download)
3. [Scalable service-Oriented MiddlewarE over IP (SOME/IP), Details](https://some-ip.com/details.shtml)
4. [SOME/IP Specification Draft 2012-07-12 (BMW Group reprint)](https://some-ip.com/papers/drafts/2012-07-12-SOMEIP_Specification_Draft__ReRelease.pdf)
5. [Enhancing Communication Security in Automotive Software: A Hybrid SecOC and MACsec Integration for SOME/IP over Ethernet, Applied Sciences (MDPI)](https://www.mdpi.com/2076-3417/16/17/8609)
6. [Scalable service-Oriented MiddlewarE over IP (SOME/IP), Standards](https://some-ip.com/standards.shtml)
7. [vsomeip in 10 minutes, COVESA/vsomeip Wiki](https://github.com/COVESA/vsomeip/wiki/vsomeip-in-10-minutes)
8. [Open SOME/IP Specification 2025-12](https://some-ip.com/open-someip-specification/open_someip_specification_2025-12.pdf)
9. [vsomeip Configuration documentation, COVESA/vsomeip](https://github.com/COVESA/vsomeip/blob/master/documentation/vsomeipConfiguration.md)
10. [AUTOSAR FO PRS SOME/IP Service Discovery Protocol Specification, R24-11](https://www.autosar.org/fileadmin/standards/R24-11/FO/AUTOSAR_FO_PRS_SOMEIPServiceDiscoveryProtocol.pdf)
11. [someipy documentation](https://someipy.readthedocs.io/en/v2.1.2/index.html)
12. [Use SOME/IP for external communications, Android Open Source Project](https://source.android.com/docs/automotive/sdv/core-areas/some-ip?hl=en)
13. [A domain key-based secure SOME/IP protocol, PMC](https://pmc.ncbi.nlm.nih.gov/articles/PMC12412969/)
14. [Dynamic Service-Orientation for Software-Defined In-Vehicle Networks, arXiv](https://arxiv.org/abs/2303.13903)
15. [SOME/IP vs DDS: Practical Comparison for Automotive Middleware, Gengini](https://gengini.com/blog/someip-vs-dds)
16. [Safety measures in automotive operating system: a comprehensive review, Journal of Supercomputing](https://link.springer.com/article/10.1007/s11227-025-07635-7)
17. [SOME/IP Roadmap @ Renault Group, Automotive Ethernet Congress 2024](https://some-ip.com/papers/2024-AEC_Ampere_TechnicaEngineering_-_SOMEIP-next-10-years_final_v1.1a.pdf)

---
*Initially written Oct 15, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 网络与安全 › Ethernet

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/some-ip

English original: https://www.edgepedia.org/some-ip
