SOME/IP-SD -- 协议英文原文讲解3
前言
SOME/IP协议越来越多的用于汽车电子行业中,关于协议详细完全的中文资料却没有,所以我将结合工作经验并对照英文原版协议做一系列的文章。基本分三大块:
1. SOME/IP协议讲解
2. SOME/IP-SD协议讲解
3. python/C++举例调试讲解
5.1.2.4 Options Format
Options are used to transport additional information to the entries. This includes for
instance the information how a service instance is reachable (IP-Address, Transport
Protocol, Port Number).
配置是 entries的 附加信息 ,说明了连接的方式:IP、传输协议、port
[PRS_SOMEIPSD_00273]
Upstream requirements: RS_SOMEIPSD_00006
In order to identify the option type every option shall start with:
• Length [uint16]: Specifies the length of the option in Bytes.
• Type [uint8]: Specifying the type of the option.
• Discardable Flag [1 bit]: Specifies, if this option can be discarded.
设置为1 :接收端不支持此option
---》体现了设计的灵活性---》比如 client的两个订阅包 向不同的IP订阅不同的 serviceID 有很多options是相同的 有个别的不同。则这个包组好后可以共用发送,只需要把差异点标记为discard 并同时修改options_index就行。
• Bit 1 to bit 7 are reserved and shall be 0.
[PRS_SOMEIPSD_00275]
Upstream requirements: RS_SOMEIPSD_00006
The discardable flag shall be set to 1 if the option can be discarded by a receiving
ECU that does not support this option.
丢弃标志位设置为1 表示 对方可丢弃 可不丢弃,具体是如果不支持就丢弃,否则解析使用。
下图是我截图实车报文中的一条offer报文展示 -- 为了保密 做了打码
5.1.2.4.1 Configuration Option
The configuration option is used to transport arbitrary configuration strings. This allows
to encode additional information like the name of a service or its configuration. In additional, the configuration option allows to offer non-SOME/IP services with SOME/IP-SD.
offfer的报文中 option 可以传输 string 信息 ,这个信息是是SOME/IP-SD格式
[PRS_SOMEIPSD_00276]
Upstream requirements: RS_SOMEIPSD_00006
The format of the Configuration Option shall be as follows:
传输 string , type要设置为1 ,
按照下面格式 序列化
• Length [uint16]: Shall be set to the total number of bytes occupied by the configuration option, excluding the 16 bit length field and the 8 bit type flag.
• Type [uint8]: Shall be set to 0x01.
• Discardable Flag [1 bit]: Shall be set to 1 if the Option can be discarded by the
receiver.
• Bit 1 to bit 7 are reserved and shall be 0.
• ConfigurationString [dynamic length]: Shall carry the configuration string.
[PRS_SOMEIPSD_00277]
Upstream requirements: RS_SOMEIPSD_00006, RS_SOMEIPSD_00009
The Configuration Option shall specify a set of name-value-pairs based on the DNS
TXT and DNS-SD format. [2] [3]
建议:可以像这样 设置一个键值对
DNS-Based Service Discovery
https://www.rfc-editor.org/rfc/rfc6763
[PRS_SOMEIPSD_00278]
Upstream requirements: RS_SOMEIPSD_00006
The format of the configuration string shall start with a single byte length field that describes the number of bytes following this length field. After the length field a character
sequence with the specified length shall follow.
string的长度段 只占一个字节 且描述的长度不包含自己本身,
=----- 我觉得有点多余 option中的长度指定可以推断出这个长度
[PRS_SOMEIPSD_00279]
Upstream requirements: RS_SOMEIPSD_00006
After each character sequence another length field and a following character sequence are expected until a length field shall be set to 0x00.
它描述了一种数据格式,其中包含一个字符序列(character sequence),后面跟着一个长度字段(length field),然后又是另一个字符序列,直到长度字段被设置为 0x00 为止。
简单举例:(不是真正的例子,真正使用格式是key=value)
05 48 65 6C 6C 6F 04 57 6F 72 6C 64 00
解析过程:
第一个长度字段:05,表示接下来的字符序列长度为 5。
字符序列:48 65 6C 6C 6F → 解码为 "Hello"。
第二个长度字段:04,表示接下来的字符序列长度为 4。
字符序列:57 6F 72 6C 64 → 解码为 "World"。
第三个长度字段:00,表示结束。
最终解析结果为:"Hello" 和 "World"。
[PRS_SOMEIPSD_00280]
Upstream requirements: RS_SOMEIPSD_00006
After a length field is set to 0x00 no characters shall follow.
上条有讲
[PRS_SOMEIPSD_00281]
Upstream requirements: RS_SOMEIPSD_00006
A character sequence shall encode a key and optionally a value.
[PRS_SOMEIPSD_00282]
Upstream requirements: RS_SOMEIPSD_00006
The character sequences shall contain an equal character ("=", 0x3D) to divide key
and value.
字符序列应该是 key=value的格式
字符串必须包含一个 = 号分割 键值
key=value
当然 是两者都存在的情况
[PRS_SOMEIPSD_00283]
Upstream requirements: RS_SOMEIPSD_00006
The key shall not include an equal character and shall be at least one non-whitespace
character. The characters of "Key" shall be printable US-ASCII values (0x20-0x7E),
excluding ’=’ (0x3D).
Key 是编码的核心部分,不能包含=,必须是可见字符,至少包含一个非空白字符
[PRS_SOMEIPSD_00284]
Upstream requirements: RS_SOMEIPSD_00006
The "=" shall not be the first character of the sequence.
key不能为空 即=不能在最前面
[PRS_SOMEIPSD_00285]
Upstream requirements: RS_SOMEIPSD_00006
For a character sequence without an ’=’ that key shall be interpreted as present.
如果字串中 没有 = 号 则认为整个都是key
[PRS_SOMEIPSD_00286]
Upstream requirements: RS_SOMEIPSD_00006
For a character sequence ending on an ’=’ that key shall be interpreted as present
with empty value.
如果字串结尾是 = 号,表示只有key ,没有value
[PRS_SOMEIPSD_00287]
Upstream requirements: RS_SOMEIPSD_00006
Multiple entries with the same key in a single Configuration Option shall be supported.
多条 entry 公用一个 key ’Configuration Option‘ 是允许的。
5.1.2.4.2 Load Balancing Option
The Load Balancing option is used to prioritize different instances of the same service, so that a client can choose the service instance dynamically. This option will be
referenced by Offer Service entries.
负载平衡选项:
offer报文中 同一个serviceID 有多个 instance,
offer报文中可能会携带 负载平衡选项(优先级选项),值越小 优先级越大。还有个权重选项 值越大权重越大
具体报文格式 见下面
client端 可以根据优先级来订阅需要的实例
---- 一般不会有这种情况 客户会在矩阵表中 指定好订阅关系
[PRS_SOMEIPSD_00542]
Upstream requirements: RS_SOMEIPSD_00011
The Load Balancing Option shall carry a Priority and Weight like the DNS-SRV
records, which shall be used for load balancing different service instances. [4]
[PRS_SOMEIPSD_00711]
Upstream requirements: RS_SOMEIPSD_00011
When looking for all service instances of a service (Service Instance set to 0xFFFF),
the client shall choose the service instance with highest priority that also matches client
specific criteria.
Note: Client specific criteria may be applied by the client application when choosing
one of the offered service instances. They are not defined in this specification, and
could e.g. restrict the range of appropriate instance IDs.
这个报文 是针对 find报文 设置为0xffff
表示查找这个服务的所有Instance,
如果有多个 怎么选择 这个选择的策略 协议中没有定义,需要客户在应用层字节设计
当然可以选择订阅一个 多个 或全部
[PRS_SOMEIPSD_00712]
Upstream requirements: RS_SOMEIPSD_00011
When having more than one service instance with highest priority (lowest value in
Priority field) the service instance shall be chosen randomly based on the weights
of the service instances. The probability of choosing a service instance shall be the
weight of a service instance divided by the sum of the weights of all considered service
instances.
[PRS_SOMEIPSD_00713]
Upstream requirements: RS_SOMEIPSD_00011
If an Offer Service entry references no Load Balancing option and several service
instances are offered, the client shall handle the service instances without Load Balancing option as though they had the lowest priority.
如果offer中没有携带 instance 优先级选项,则client端 就不能依赖优先级来选择订阅了,要依赖自己的策略了。
---- 一般不会有这种情况 客户会在矩阵表中 指定好订阅关系
[PRS_SOMEIPSD_00714]
Upstream requirements: RS_SOMEIPSD_00011
When looking for a specific service instances of a service (Service Instance set to
any value other than 0xFFFF), the evaluation of the Load Balancing Option does not
apply.
如果想要find 确定的实例 就要把instanceID 设置为指定的值,此时 “负载平衡”选项就不起作用了
具体options格式如下
[PRS_SOMEIPSD_00544]
Upstream requirements: RS_SOMEIPSD_00011
The Format of the Load Balancing Option shall be as follows:
• Length [uint16]: Shall be set to 0x0005.
• Type [uint8]: Shall be set to 0x02.
• Discardable Flag [1 bit]: Shall be set to 1 if the Option can be discarded by the
receiver.
• Bit 1 to bit 7 are reserved and shall be 0.
• Priority [uint16]: Carries the Priority of this instance. Lower value means higher
priority.
• Weight [uint16]: Carries the Weight of this instance. Large value means higher
probability to be chosen.
5.1.2.4.3 IPv4 Endpoint Option
The IPv4 Endpoint Option is used by a SOME/IP-SD instance to signal the relevant
endpoint(s). Endpoints include the local IP address, the transport layer protocol (e.g.
UDP or TCP), and the port number of the sender. These ports are used for the events
and notification events as well.
ipv4端口选项---》端口 协议 和IP
用于 基于这些 发送event 和 method
[PRS_SOMEIPSD_00305]
Upstream requirements: RS_SOMEIPSD_00006, RS_SOMEIPSD_00010
The IPv4 Endpoint Option shall use the Type 0x04.
Type 设置为 0x04
[PRS_SOMEIPSD_00306]
Upstream requirements: RS_SOMEIPSD_00006, RS_SOMEIPSD_00010
The IPv4 Endpoint Option shall specify the IPv4-Address, the transport layer protocol
(ISO/OSI layer 4) used, and its Port Number.
IPv4 Endpoint Option 用于指定 IPv4地址
[PRS_SOMEIPSD_00307] ipv4 配置 如下 简单容易理解
Upstream requirements: RS_SOMEIPSD_00006, RS_SOMEIPSD_00010
The Format of the IPv4 Endpoint Option shall be as follows:
• Length [uint16]: Shall be set to 0x0009.
• Type [uint8]: Shall be set to 0x04.
• Discardable Flag [1 bit]: Shall be set to 0.
• Bit 1 to bit 7 are reserved and shall be 0.
• IPv4-Address [uint32]: Shall transport the unicast IP-Address as four Bytes.
• Reserved [uint8]: Shall be set to 0x00.
• Transport Protocol (L4-Proto) [uint8]: Shall be set to the transport layer protocol
(ISO/OSI layer 4) based on the IANA/IETF types (0x06: TCP, 0x11: UDP).
• Transport Protocol Port Number (L4-Port) [uint16]: Shall be set to the port of the
layer 4 protocol.
[PRS_SOMEIPSD_00310]
Upstream requirements: RS_SOMEIPSD_00006, RS_SOMEIPSD_00010
The server shall use the IPv4 Endpoint Option with Offer Service entries to signal the
endpoints it serves the service instance on. That is up to one UDP endpoint and up to
one TCP endpoint.
服务器在提供服务实例时,使用 IPv4 Endpoint Option 来通知客户端其服务实例的端点信息时,每个服务实例最多可以提供一个 UDP 端点和一个 TCP 端点。
[PRS_SOMEIPSD_00380]
Upstream requirements: RS_SOMEIPSD_00006, RS_SOMEIPSD_00010
The endpoints the server referenced with an Offer Service entry shall also be used as
source of events. That is source IP address and source port numbers for the transport
protocols in the endpoint option.
[PRS_SOMEIPSD_00807]
Upstream requirements: RS_SOMEIPSD_00006, RS_SOMEIPSD_00010
The client shall use the IPv4 Endpoint Option with Subscribe Eventgroup entries to
signal the IP address and the UDP and/or TCP port numbers, on which it is ready to
receive the events.
Note: The client is ready to receive the events, if sockets are already opened, and any
security associations required by the network security protocols (IPsec, MACsec, or
other security protocols) are already established and fully operational.
client 根据配置把sokcet建立好,配置好mac通过 路由规则 防火墙规则,就可以正常接收事件了
[PRS_SOMEIPSD_00835]
Upstream requirements: RS_SOMEIPSD_00006, RS_SOMEIPSD_00010
Different provided service instances of the same service on the same ECU shall use
different endpoints, so that they can be differentiated by the endpoints. Different services may share the same endpoints.
端点:IP+PORT
不同的serviceID可以使用相同的 端点
相同serviceID不同实例 不用使用相同端点
5.1.2.4.4 IPv6 Endpoint Option
功能和ipv4 一样
用在offer/sub 报文中
The IPv6 Endpoint Option is used by a SOME/IP-SD instance to signal the relevant
endpoint(s). Endpoints include the local IP address, the transport layer protocol (e.g.
UDP or TCP), and the port number of the sender. These ports are used for the events
and notification events as well.
[PRS_SOMEIPSD_00314]
Upstream requirements: RS_SOMEIPSD_00006, RS_SOMEIPSD_00010
The IPv6 Endpoint Option shall use the Type 0x06.
[PRS_SOMEIPSD_00315]
Upstream requirements: RS_SOMEIPSD_00006, RS_SOMEIPSD_00010
The Format of the IPv6 Endpoint Option shall be as follows:
格式如下 容易理解
• Length [uint16]: Shall be set to 0x0015.
• Type [uint8]: Shall be set to 0x06.
• Discardable Flag [1 bit]: Shall be set to 0.
• Bit 1 to bit 7 are reserved and shall be 0.
• IPv6-Address [uint128]: Shall transport the unicast IP-Address as 16 Bytes.
• Reserved [uint8]: Shall be set to 0x00.
• Transport Protocol (L4-Proto) [uint8]: Shall be set to the transport layer protocol
(ISO/OSI layer 4) based on the IANA/IETF types (0x06: TCP, 0x11: UDP).
• Transport Protocol Port Number (L4-Port) [uint16]: Shall be set to the transport
layer port(e.g. 30490).
SOME/IP-SD IPv6 Endpoint Option shall be as shown in Figure 5.10
[PRS_SOMEIPSD_00319]
Upstream requirements: RS_SOMEIPSD_00006, RS_SOMEIPSD_00010
The server shall use the IPv6 Endpoint Option with Offer Service entries to signal the
endpoints the services is available on. That is upto one UDP endpoint and upto one
TCP endpoint.
服务器在提供服务实例时,使用 IPv6 Endpoint Option 来通知客户端其服务实例的端点信息时,每个服务实例最多可以提供一个 UDP 端点和一个 TCP 端点。
[PRS_SOMEIPSD_00320]
Upstream requirements: RS_SOMEIPSD_00006, RS_SOMEIPSD_00010
The endpoints the server referenced with an Offer Service entry shall also be used as
source of events. That is source IP address and source port numbers for the transport
protocols in the endpoint option.
[PRS_SOMEIPSD_00321]
Upstream requirements: RS_SOMEIPSD_00006, RS_SOMEIPSD_00010
The client shall use the IPv6 Endpoint Option with Subscribe Eventgroup entries to
signal the IP address and the UDP and/or TCP port numbers, on which it is ready to
receive the events.
options中指定 源IP和Port 表示event是从哪里发出的
Note:
• The client is ready to receive the events, if sockets are already opened, and any
security associations required by the network security protocols (IPsec, MACsec
or other security protocols) are already established and fully operational
• Security association status monitoring and its implications towards Service discovery shall apply for all Service Instances using secured ports.
在这段描述中,提到的安全条件是确保客户端能够在安全的网络环境下接收事件,并且这些安全措施需要在客户端和网络之间的通信中生效。我们可以进一步细分这些安全条件:
### 1. **安全关联(Security Association,SA)**
- **定义**:安全关联是指两端通信(如客户端和服务器)之间的安全配置,它包括加密、身份验证等信息,确保通信的机密性、完整性和可用性。
- **协议支持**:SA通常涉及到网络安全协议,例如 **IPsec**(用于IP层的加密和认证)、**MACsec**(用于数据链路层的加密和完整性校验)等。
- **作用**:这些协议可以保护通信中的数据,防止被篡改、监听或伪造。
### 2. **网络安全协议**:
- **IPsec**:IPsec是用于IPv6(及IPv4)网络中,通过加密和认证保护IP通信的协议。它通过两种模式工作:
- **传输模式(Transport Mode)**:仅加密传输层数据,不加密IP头部。
- **隧道模式(Tunnel Mode)**:加密整个IP数据包,包括头部和数据部分,通常用于VPN。
- **MACsec**:MACsec用于局域网中的数据链路层加密,提供防止数据篡改、重放攻击的能力。它通过在以太网帧上加密来保护数据。
### 3. **客户端准备接收事件的条件**:
- 客户端首先需要打开相关的**socket**。这些socket是用来接收事件数据的通信端口。
- 然后,客户端还必须确保所需要的安全协议(如IPsec、MACsec等)的**安全关联已经建立并且完全工作**。如果这些安全措施没有正确配置或未建立,客户端就无法保证通信的安全性,进而无法确保事件数据的正确接收。
### 4. **安全关联的监控与服务发现**:
- **安全关联状态监控**:客户端和网络系统需要实时监控安全关联的状态,确保所有的安全配置和加密通道在需要时都能正常工作。如果安全关联出现问题,可能会影响事件接收的安全性。
- **服务发现**:在基于安全端口的服务实例中,服务发现过程需要考虑安全关联的状态。如果安全关联不可用或不完全,客户端可能无法发现或与服务实例建立安全的连接。
### 5. **应用场景**:
- 在一些高安全要求的网络环境中,例如金融、电力、政府等领域,数据通信必须经过加密保护,这时就会使用到这些安全协议。通过确保安全关联已建立,客户端可以避免潜在的安全威胁,如数据泄露或身份冒充。
### 总结:
- 客户端准备好接收事件并非仅仅依赖于端口和IP的配置,还需要网络安全协议的支持,以确保在安全的环境下传输数据。
- 安全协议的实施包括加密、身份验证等,而安全关联的监控则确保这些协议在实际通信过程中始终有效。
[PRS_SOMEIPSD_00836]
Upstream requirements: RS_SOMEIPSD_00006, RS_SOMEIPSD_00010
Different service instances of the same service on the same ECU shall use different
endpoints, so that they can be distinguished by the endpoints. Different services may
share the same endpoints.
端点:IP+PORT
不同的serviceID可以使用相同的 端点
相同serviceID不同实例 不用使用相同端点
相关文章:

SOME/IP-SD -- 协议英文原文讲解3
前言 SOME/IP协议越来越多的用于汽车电子行业中,关于协议详细完全的中文资料却没有,所以我将结合工作经验并对照英文原版协议做一系列的文章。基本分三大块: 1. SOME/IP协议讲解 2. SOME/IP-SD协议讲解 3. python/C举例调试讲解 5.1.2.4…...

软件测试八股文,软件测试常见面试合集【附答案】
PS:加上参考答案有几十万字,答案就没有全部放上来了,高清打印版本超过400多页,评论区留言直接获取 1、你的测试职业发展是什么? 2、你认为测试人员需要具备哪些素质 3、你为什么能够做测试这一行 4、测试的目的是什么? 5、…...

数据结构秘籍(一)线性数据结构
1.数组 数组(Array)是一种很常见的数据结构。它由相同类型的元素(element)组成,并且是使用一块连续的内存来存储。 我们直接可以利用元素的索引(index)计算出该元素对应的存储地址。 数组的特…...

TFChat:腾讯大模型知识引擎(DeepSeek R1)+飞书机器人实现AI智能助手
效果 TFChat项目地址 https://github.com/fish2018/TFChat 腾讯大模型知识引擎用的是DeepSeek R1,项目为sanic和redis实现,利用httpx异步处理流式响应,同时使用buffer来避免频繁调用飞书接口更新卡片的网络耗时。为了进一步减少网络IO消耗&…...

使用消息队列怎样防止消息重复?
大家好,我是君哥。 使用消息队列时,我们经常会遇到一个可能对业务产生影响的问题,消息重复。在订单、扣款、对账等对幂等有要求的场景,消息重复的问题必须解决。 那怎样应对重复消息呢?今天来聊一聊这个话题。 1.三…...
MySQL安装多版本与版本切换
起因 今天在将一个项目部署到本地,想着是先找到一个功能差不多的开源项目,再在这基础之上进行改动,找到的这个项目使用的MySQL版本是MySQL5.7,应该是比较古早的项目了,但是我现在装的是8.4版本的,所以涉及…...

Docker02 - 深入理解Docker
深入理解Docker 文章目录 深入理解Docker一:Docker镜像原理1:镜像加载原理1.1:unionFS1.2:加载原理 2:分层理解 二:容器数据卷详解1:什么是容器数据卷2:使用数据卷3:具名…...
检查SSH安全配置-sshd服务端未认证连接最大并发量配置
介绍 MaxStartups参数指到SSH守护进程的未经身份验证的最大并发连接数。 逻辑依据 为防止系统因大量待处理的身份验证连接尝试而出现拒绝服务的情况,请使用 MaxStartups 的速率限制功能来保护 sshd 登录的可用性,并防止守护进程不堪重负。 检查方法 …...

HarmonyOS Design 介绍
HarmonyOS Design 介绍 文章目录 HarmonyOS Design 介绍一、HarmonyOS Design 是什么?1. 设计系统(Design System)2. UI 框架的支持3. 设计工具和资源4. 开发指南5. 与其他设计系统的对比总结 二、HarmonyOS Design 特点 | 应用场景1. Harmon…...
C++中的多重继承
在 C 中,多重继承是一种允许一个类同时继承多个基类的特性。这意味着派生类可以继承多个基类的属 性和方法。 多重继承增加了语言的灵活性,但同时也引入了额外的复杂性,特别是当多个基类具有相同 的成员时。 基本概念 在多重继承中ÿ…...

Java基础第14天-坦克大战【1】
Java绘图坐标体系 像素 计算机在屏幕上显示的内容都是由屏幕上的每一个像素组成的。如,计算机显示器的分辨率是800x600,表示计算机屏幕上的每一行由800个点组成,共有600行,整个计算机屏幕共有480000个像素。像素是一个密度单位。…...

Java线程池入门04
1. 提交任务的两种方式 executorsubmit 2. executor executor位于Executor接口中 public interface Executor {void executor(Runnable command); }executor提交的是无返回值的任务 下面是一个具体的例子 package LearnThreadPool; import java.util.concurrent.ExecutorSe…...

【论文笔记-ECCV 2024】AnyControl:使用文本到图像生成的多功能控件创建您的艺术作品
AnyControl:使用文本到图像生成的多功能控件创建您的艺术作品 图1 AnyControl的多控制图像合成。该研究的模型支持多个控制信号的自由组合,并生成与每个输入对齐的和谐结果。输入到模型中的输入控制信号以组合图像显示,以实现更好的可视化。 …...
计算机毕业设计 ——jspssm519Springboot 的幼儿园管理系统
作者:程序媛9688 开发技术:SpringBoot、SSM、Vue、MySQL、JSP、ElementUI、Python、小程序等。 🌟文末获取源码数据库🌟 感兴趣的可以先收藏起来,还有大家在毕设选题(免费咨询指导选题)…...

山东大学软件学院人工智能导论实验之知识库推理
目录 实验目的: 实验代码: 实验内容: 实验结果 实验目的: 输入相应的条件,根据知识库推理得出相应的知识。 实验代码: def find_data(input_process_data_list):for epoch, data_process in enumerat…...

【Uniapp-Vue3】点击将内容复制到剪切板
具体使用方法在官网: uni-app官网https://uniapp.dcloud.net.cn/api/system/clipboard.html大致使用方法如下: // value是需要复制的值 function copyValue (value) { uni.setClipboardData({data: value,success: res>{// 复制成功逻辑},fail:err&…...

英伟达 Isaac Sim仿真平台体验【2】
一、产品基础信息 仿真平台:NVIDIA Isaac Sim 4.1.0硬件配置:NVIDIA RTX 4090 2 (24GB显存)核心特性: Omniverse内核的多GPU物理加速原生PyTorch/TensorFlow集成支持基于USD的场景构建体系 二、GPU加速仿真实战 ▶ 多球体跌落测试 操作步…...
低代码与开发框架的一些整合[3]
1.基本说明 审批流程是企业内部运营的运行流程,与业务板块进行关联,在企业数智化过程中启动业务串联的作用,与AI业务模型及业务agent整合后,将大大提升企业的运行效率以及降低运营风险。 近期对开源的近40个携带流程平台的项目进…...

deepseek-r1-centos-本地服务器配置方法
参考: 纯小白 Centos 部署DeepSeek指南_centos部署deepseek-CSDN博客 https://blog.csdn.net/xingxin550/article/details/145574080 手把手教大家如何在Centos7系统中安装Deepseek,一文搞定_centos部署deepseek-CSDN博客 https://blog.csdn.net/soso67…...
C语言实现通讯录项目
一、通讯录功能 实现一个可以存放100个人的信息的通讯录(这里采用静态版本),每个人的信息有姓名、性别、年龄、电话、地址等。 通讯录可以执行的操作有添加联系人信息、删除指定联系人、查找指定联系人信息、修改指定联系人信息、显示联系人信…...

Lombok 的 @Data 注解失效,未生成 getter/setter 方法引发的HTTP 406 错误
HTTP 状态码 406 (Not Acceptable) 和 500 (Internal Server Error) 是两类完全不同的错误,它们的含义、原因和解决方法都有显著区别。以下是详细对比: 1. HTTP 406 (Not Acceptable) 含义: 客户端请求的内容类型与服务器支持的内容类型不匹…...

python打卡day49
知识点回顾: 通道注意力模块复习空间注意力模块CBAM的定义 作业:尝试对今天的模型检查参数数目,并用tensorboard查看训练过程 import torch import torch.nn as nn# 定义通道注意力 class ChannelAttention(nn.Module):def __init__(self,…...

vscode(仍待补充)
写于2025 6.9 主包将加入vscode这个更权威的圈子 vscode的基本使用 侧边栏 vscode还能连接ssh? debug时使用的launch文件 1.task.json {"tasks": [{"type": "cppbuild","label": "C/C: gcc.exe 生成活动文件"…...

DAY 47
三、通道注意力 3.1 通道注意力的定义 # 新增:通道注意力模块(SE模块) class ChannelAttention(nn.Module):"""通道注意力模块(Squeeze-and-Excitation)"""def __init__(self, in_channels, reduction_rat…...

从零实现STL哈希容器:unordered_map/unordered_set封装详解
本篇文章是对C学习的STL哈希容器自主实现部分的学习分享 希望也能为你带来些帮助~ 那咱们废话不多说,直接开始吧! 一、源码结构分析 1. SGISTL30实现剖析 // hash_set核心结构 template <class Value, class HashFcn, ...> class hash_set {ty…...
Pinocchio 库详解及其在足式机器人上的应用
Pinocchio 库详解及其在足式机器人上的应用 Pinocchio (Pinocchio is not only a nose) 是一个开源的 C 库,专门用于快速计算机器人模型的正向运动学、逆向运动学、雅可比矩阵、动力学和动力学导数。它主要关注效率和准确性,并提供了一个通用的框架&…...
基于Java Swing的电子通讯录设计与实现:附系统托盘功能代码详解
JAVASQL电子通讯录带系统托盘 一、系统概述 本电子通讯录系统采用Java Swing开发桌面应用,结合SQLite数据库实现联系人管理功能,并集成系统托盘功能提升用户体验。系统支持联系人的增删改查、分组管理、搜索过滤等功能,同时可以最小化到系统…...

【iOS】 Block再学习
iOS Block再学习 文章目录 iOS Block再学习前言Block的三种类型__ NSGlobalBlock____ NSMallocBlock____ NSStackBlock__小结 Block底层分析Block的结构捕获自由变量捕获全局(静态)变量捕获静态变量__block修饰符forwarding指针 Block的copy时机block作为函数返回值将block赋给…...

CMS内容管理系统的设计与实现:多站点模式的实现
在一套内容管理系统中,其实有很多站点,比如企业门户网站,产品手册,知识帮助手册等,因此会需要多个站点,甚至PC、mobile、ipad各有一个站点。 每个站点关联的有站点所在目录及所属的域名。 一、站点表设计…...
P10909 [蓝桥杯 2024 国 B] 立定跳远
# P10909 [蓝桥杯 2024 国 B] 立定跳远 ## 题目描述 在运动会上,小明从数轴的原点开始向正方向立定跳远。项目设置了 $n$ 个检查点 $a_1, a_2, \cdots , a_n$ 且 $a_i \ge a_{i−1} > 0$。小明必须先后跳跃到每个检查点上且只能跳跃到检查点上。同时࿰…...