SOME/IP--协议英文原文讲解8
前言
SOME/IP协议越来越多的用于汽车电子行业中,关于协议详细完全的中文资料却没有,所以我将结合工作经验并对照英文原版协议做一系列的文章。基本分三大块:
1. SOME/IP协议讲解
2. SOME/IP-SD协议讲解
3. python/C++举例调试讲解
4.2 Specification of SOME/IP Protocol
This chapter describes the Remote Procedure Call(RPC), Event Notifications and Error
Handling of SOME/IP.
4.2.1 Transport Protocol Bindings
In order to transport SOME/IP messages different transport protocols may be used.
SOME/IP currently supports UDP and TCP. Their bindings are explained in the following sections,
while Chapter 6 discusses which transport protocol to choose.
SOME/IP支持TCP/UDP传输 第6章讲怎么选择
[PRS_SOMEIP_00138]
Upstream requirements: RS_SOMEIP_00015
If a server runs different instances of the same service, messages belonging to different
service instances shall be mapped to the service instance by the transport protocol
port on the server side.
For details of see Chapter 4.2.1.3
不同的服务实例在不同的server上要用port区分
什么是 服务实例?
服务 是给一组或一种功能 编的号码。如果多个设备同时都提供这个服务,那怎么区分呢?
就在服务ID的基础上 再进一步区分实例ID,实例就是实现这个服务的不同设备。给这些设备编上不同ID,这个ID就是实例ID。
[PRS_SOMEIP_00535]
Upstream requirements: RS_SOMEIP_00010
All Transport Protocol Bindings shall support transporting more than one SOME/IP
message in a Transport Layer PDU (i.e. UDP packet or TCP segment).
TCP UDP 都应支持SOME/IP的聚包发送 -- 单条UDP/TCP消息中有多条SOME/IP消息组合在一起
[PRS_SOMEIP_00142]
Upstream requirements: RS_SOMEIP_00010
The receiving SOME/IP implementation shall be capable of receiving unaligned
SOME/IP messages transported by UDP or TCP.
传输层过来的多条消息长度不同的SOMEIP消息 要能够拆分解析
Rationale:
When transporting multiple SOME/IP payloads in UDP or TCP the alignment of the
payloads can be only guaranteed, if the length of every payloads is a multiple of the
alignment size (e.g. 32 bits).
[PRS_SOMEIP_00140]
Upstream requirements: RS_SOMEIP_00010
The header format allows transporting more than one SOME/IP message in a single
packet. The SOME/IP implementation shall identify the end of a SOME/IP message by
means of the SOME/IP length field. Based on the packet length field, SOME/IP shall
determine if there are additional SOME/IP messages in the packet. This shall apply for
UDP and TCP transport.
SOMEIP header的长度字段 就能解析和拆分多条消息。
[PRS_SOMEIP_00141]
Upstream requirements: RS_SOMEIP_00010, RS_SOMEIP_00027
Each SOME/IP payload shall have its own SOME/IP header.
每个payload都对应 自己的 header
[PRS_SOMEIP_00940]
Upstream requirements: RS_SOMEIP_00010, RS_SOMEIP_00027
One Service-Instance can use the following setup for its communication of all the
methods, events, and notifications:
• up to one TCP connection
• up to one UDP unicast connection
• up to one UDP multicast connection -- 只能用于events/notify
服务的方法、事件、通知功能 可以通过TCP UDP单播/多播 通信。不包含UDP广播
具体下面有讲,不能一概而论
4.2.1.1 UDP Binding
[PRS_SOMEIP_00139]
Upstream requirements: RS_SOMEIP_00010
The UDP binding of SOME/IP shall be achieved by transporting SOME/IP messages
in UDP packets.
[PRS_SOMEIP_00137]
Upstream requirements: RS_SOMEIP_00010
SOME/IP protocol shall not restrict the usage of UDP fragmentation.
不能限制 UDP协议在IP层默认的分包功能
[PRS_SOMEIP_00943]
Upstream requirements: RS_SOMEIP_00010
The client and server shall use a single UDP unicast connection for all methods,
events, and notifications of a Service-Instance which are configured to be communicated using UDP unicast.
方法 事件 和 通知 都可以用单播
[PRS_SOMEIP_00942]
Upstream requirements: RS_SOMEIP_00010
The client and server shall use a single UDP multicast address combination ("connection") per eventgroup,
which is configured to be communicated using UDP multicast.
这个意思是每个事件组 只能绑定在一个组播地址上 ,但是多个事件组可以绑定在一个组播地址上
If the same multicast address is shared between different service instances of the same
service, then the port number of the UDP multicast address combination used for each
of these service instances shall be different, at least on server side.
同一个服务的不同实例对象共享同一个组播地址则需要用端口号做区分
4.2.1.2 TCP Binding
The TCP binding of SOME/IP is heavily based on the UDP binding. In contrast to the
UDP binding, the TCP binding allows much bigger SOME/IP messages and uses the
robustness features of TCP (coping with loss, reorder, duplication, etc.).
In order to lower latency and reaction time, Nagle’s algorithm should be turned off
(TCP_NODELAY).
通过 setsockopt(sockfd, IPPROTO_TCP, TCP_NODELAY, &flag, sizeof(int)) 关闭了 Nagle's Algorithm,参数 flag 设置为 1 以启用 TCP_NODELAY。防止TCP组包延迟
[PRS_SOMEIP_00706]
Upstream requirements: RS_SOMEIP_00010
When the TCP connection is lost, pending requests shall be handled if a timeout
occurred.
编程指导:当TCP连接断开时 则需要处理挤压的待发送的请求或回复
Since TCP handles reliability, additional means of reliability are not needed.
TCP处理 不要SOMEIP层做额外的可靠性传输动作
[PRS_SOMEIP_00707]
Upstream requirements: RS_SOMEIP_00010
The client and server shall use a single TCP connection for all methods, events, and
notifications of a Service-Instance which are configured to be communicated using
TCP.
一个server 一个client 之间的所有服务相关的方法事件通知 可以用一个tcp连接进行通信。
[PRS_SOMEIP_00708]
Upstream requirements: RS_SOMEIP_00010
The TCP connection shall be opened by the client, when the first method call shall be
transported or the client tries to receive the first notifications.
tcp的连接 应该由 client端发起,
当client 第一次发起method获取 准备接收nofiy时
The client is responsible for re-establishing the TCP connection whenever it fails.
当TCP 连接断开时,client有义务重新发起连接
[PRS_SOMEIP_00709]
Upstream requirements: RS_SOMEIP_00010
The TCP connection shall be closed by the client, when the TCP connection is not
required anymore.
TCP的断开 应该由client发起,当client不在需要时 或不能拥有时。
[PRS_SOMEIP_00710]
Upstream requirements: RS_SOMEIP_00010
The TCP connection shall be closed by the client, when all Services using the TCP
connections are not available anymore (stopped or timed out).
server端发起stop offer 或 offer的TTL超时 ,应该由client发起断链
[PRS_SOMEIP_00711]
Upstream requirements: RS_SOMEIP_00010
The server shall not stop the TCP connection when stopping all services. Give the
client enough time to process the control data to shutdown the TCP connection itself.
server发送stop offer后 应该留时间等待client断链
Rational:
When the server closes the TCP connection before the client recognized that the TCP
is not needed anymore, the client will try to reestablish the TCP connection.
就算server发起了断链,当client发现server服务继续有效时 应该继续发起连接
Allowing resync to TCP stream using Magic Cookies
下面 展示了server和client 发送Magic Cookies消息的固定格式和内容。
对方收到这个报文后不需要回复 这是一个边界消息。
比如TP消息(后面讲:UDP的SOME/IP分片功能) 发送最后一包后 这个可以用作进一步确认是最后一包。
[PRS_SOMEIP_00154]
Upstream requirements: RS_SOMEIP_00010
In order to allow testing tools to identify the boundaries of SOME/IP Message
transported via TCP, the SOME/IP Magic Cookie Message may be inserted into the
SOME/IP messages over TCP message stream at regular distances.
[PRS_SOMEIP_00160]
Upstream requirements: RS_SOMEIP_00010
The layout of the Magic Cookie Messages shall consist of the followign fields:
• for communincation from Client to Server:
– Message ID (Service ID/Method ID): 0xFFFF 0000
– Length: 0x0000 0008
– Request ID (Client ID/Session ID): 0xDEAD BEEF
– Protocol Version: 0x01
– Interface Version: 0x01
– Message Type: 0x01
– Return Code: 0x00
• for communincation from Server to Client:
– Message ID (Service ID/Method ID): 0xFFFF 8000
– Length: 0x0000 0008
– Request ID (Client ID/Session ID): 0xDEAD BEEF
– Protocol Version: 0x01
– Interface Version: 0x01
– Message Type: 0x02
– Return Code: 0x00
4.2.1.3 Multiple Service-Instances
[PRS_SOMEIP_00162]
Upstream requirements: RS_SOMEIP_00015
Service-Instances of the same Service are identified through different Instance IDs. It
shall be supported that multiple Service-Instances reside on different ECUs as well as
multiple Service-Instances of one or more Services reside on one single ECU.
不同的实例 应该有不同的实例ID。
多个实例 可以部署在不同的ECU 或 单个ECU上
[PRS_SOMEIP_00163]
Upstream requirements: RS_SOMEIP_00015
While several Service-Instances of different Services shall be able to share the same
port number of the transport layer protocol used on both the provided/server and the
consumed/client side, multiple Service-Instances of the same Service on the provided/server
side on one single ECU shall use different port numbers per ServiceInstance. Multiple
Service-Instances of the same Service on the required/client side
on one single ECU may use the same port number per Service-Instance.
1. 不同服务的多个实例 可以使用同一个port(不管是client还是server)
2. server端 单个服务的多个实例 要用不同的Port区分
3. client端 单个服务的多个实例可以使用一个port
Rationale: Normal SOME/IP (not SOME/IP-SD) messages do not carry the ServiceInstance
ID as a dedicated field in the SOME/IP header. - Thus port numbers (and perhaps
the transport protocol) need to be used to distinguish different Service-Instance
of the same Service of a single ECU. This way a Service-Instance can be identified
through the combination of the Service ID combined with the endpoint information (i.e.,
IP-address, transport protocol (UDP/TCP), and port number). It is sufficient to use
different port numbers for the different Service-Instances of the same Service on either
the server or the client side, since only a single difference in the 4-tuple <src IP, src
port, dst IP, dst port > is sufficient as a distinguishing criterion. As the server is the
one actually providing the different Service-Instances, the server is also the natural
place to handle the distinction. = > The server shall use different port numbers for
providing different Service-Instances of the same Service.
不同的实例 肯定处于不同的TCP/UDP连接中,否则区分实例就没意义了。
不同的连接 就要依赖四元组来区分。
由于 client端 IP+prot 同一组可以接收不同实例的数据,就不能用client的IP和port来区分实例连接。
另外同一个ECU(IP)也可以有不同的实例,那就只能通过server的prt来区分不同的实例了。
Recommendation: It is recommended that instances use the same port number for
UDP and TCP. If a Service-Instance uses UDP port x, only this Service-Instance of the
Service and not another Service-Instance of the same Service should use exactly TCP
port x for its Service provision.
建议:对于同一个服务的同一个实例 server端或client端的UDP和TCP协议可以用同一个端口号。(同一个服务 不同event/method可以使用不同的协议)
相关文章:
SOME/IP--协议英文原文讲解8
前言 SOME/IP协议越来越多的用于汽车电子行业中,关于协议详细完全的中文资料却没有,所以我将结合工作经验并对照英文原版协议做一系列的文章。基本分三大块: 1. SOME/IP协议讲解 2. SOME/IP-SD协议讲解 3. python/C举例调试讲解 4.2 Speci…...
JUC并发—7.AQS源码分析三
大纲 1.等待多线程完成的CountDownLatch介绍 2.CountDownLatch.await()方法源码 3.CountDownLatch.coutDown()方法源码 4.CountDownLatch总结 5.控制并发线程数的Semaphore介绍 6.Semaphore的令牌获取过程 7.Semaphore的令牌释放过程 8.同步屏障CyclicBarrier介绍 9.C…...
避坑:过早的文件结束符(EOF):解决“git clone龙蜥OS源码失败”的失败过程
避坑:过早的文件结束符(EOF):解决“git clone龙蜥OS源码失败”的失败过程 安装Anolis OS 8.9 下载AnolisOS-8.9-x86_64-dvd.iso并安装。 使用uname -a查看内核版本为5.10.134-18.an8.x86_64。 [rootlocalhost cloud-kernel]# c…...
基于知识图谱的问答系统:后端Python+Flask,数据库Neo4j,前端Vue3(提供源码)
基于知识图谱的问答系统:后端PythonFlask,数据库Neo4j,前端Vue3 引言 随着人工智能技术的不断发展,知识图谱作为一种结构化的知识表示方式,逐渐成为问答系统的重要组成部分。本文将介绍如何构建一个基于知识图谱的问答…...
日做力扣题2--215. 数组中的第K个最大元素
这道题我在做北京的一家教育公司的笔试时出现过,且题目里直接要求使用快排做,所以我也使用快排做的。 题目: 给定整数数组 nums 和整数 k,请返回数组中第 k 个最大的元素。 请注意,你需要找的是数组排序后的第 k 个最…...
centos8 使用yum安装程序出现报错
在执行yum指令出现源更新不了Could not resolve host: mirrorlist.centos.org; Unknown error问题 yum -y update结果 Errors during downloading metadata for repository appstream: - Curl error (6): Couldnt resolve host name for http://mirrorlist.centos…...
linux系统搭建DNS服务器、详细知识讲解
DNS服务器系统为rocky9.5, 1、安装DNS dnf -y install bind bind-utilsbind软件包 BIND 是一个开源的 DNS 服务器软件,广泛用于域名解析服务。 配置管理: 权威 DNS 服务器(Authoritative DNS):为特定域名…...
【部署优化篇四】《DeepSeek移动端优化:CoreML/TFLite实战对比》
手机里的AI助手能秒速回答你的问题,游戏人物能实时追踪你的表情变化,这些酷炫功能的背后都离不开移动端机器学习框架的支撑。今天我们就来撕开两个当红炸子鸡框架CoreML和TFLite的神秘面纱,看看它们在模型优化这件事上到底藏着哪些独门绝技。 一、移动端优化的生存法则 在…...
DeepSeek联网搜索
deepseek 0、前言1、未联网2、联网2.1 SerpAPI2.2 SerpAPIDeepseek 0、前言 为获取最新消息,需给deepseek联网 1、未联网 from dotenv import load_dotenv from langchain_deepseek import ChatDeepSeekload_dotenv()# 1、模型 model ChatDeepSeek(model"d…...
pt100 2线和3线的区别?
3线比2线更稳定一些; 在电路中,b和c是不连接在一起的; 测试的时候,b和c是接在一起的,也就是说pt100中b和c是连接在一起的 3线比2线多一个反馈; 平时测试的时候,测试一下ab或者ac 都是一样的…...
ollama-chat-ui-vue,一个可以用vue对接ollama的开源项目,可接入deepSeek
ollama-chat-ui-vue 使用vue3 vite elementUi 搭建的前端chat,通过ollama可与模型对话,目前支持独立思考,切换模型(联网查询后续支持) github地址:ollama-chat-ui-vue 制作不易github点点star,谢谢 前置工作 安装ollama,ollama官网地址 安装完olla…...
hot100-3、438、560、239、240、160、234(2简3中1难)
滑窗问题↓ 3. 无重复字符的最长子串(中等) 方法一、滑动窗口 数组结合哈希表ascii码,滑动出口。其实可以优化为left Math.max(left,map.get(s.charAt(i)) 1),数组的话就是全部初始化为-1,用来计算最新下标而不是…...
深入理解 Java 反射机制:获取类信息与动态操作
在 Java 编程中,反射(Reflection)是一种强大的机制,允许程序在运行时动态地获取类的信息并操作类的属性、方法和构造器。反射是 Java 动态语言特性的核心,广泛应用于框架开发、插件系统、序列化和反序列化等领域。本文…...
Redis 主从复制
概念 在分布式系统中为了解决单点问题,通常会把数据复制多个副本部署到其他服务器,满⾜故障恢复和负载均衡等需求。Redis 也是如此,它提供了复制的功能,实现了相同数据的多个 Redis 副本,通过一个主节点(ma…...
Unity中NavMesh的使用 及其 导出给java服务端进行寻路
1.先添加 AI Navigation组件 2.Windows-->AI-->Navigation(Obsolete) 这样子就可以看到烘焙按钮 3.将物体标记为行走和不可行走 4.添加一个Plane和一些球体,并把需要形成NavMesh的物体选择为静态 // 因为只能烘焙静态的 之后可以看出烘焙后,看着被…...
【含文档+PPT+源码】基于微信小程序的猎兔汽车保养维修美容服务平台的设计与实现
项目介绍 本课程演示的是一款基于微信小程序的猎兔汽车保养维修美容服务平台的设计与实现,主要针对计算机相关专业的正在做毕设的学生与需要项目实战练习的 Java 学习者。 1.包含:项目源码、项目文档、数据库脚本、软件工具等所有资料 2.带你从零开始部…...
iOS App的启动与优化
App的启动流程 App启动分为冷启动和热启动 冷启动:从0开始启动App热启动:App已经在内存中,但是后台还挂着,再次点击图标启动App。 一般对App启动的优化都是针对冷启动。 App冷启动可分为三个阶段: dyld:…...
一周学会Flask3 Python Web开发-request请求钩子(Hook)
锋哥原创的Flask3 Python Web开发 Flask3视频教程: 2025版 Flask3 Python web开发 视频教程(无废话版) 玩命更新中~_哔哩哔哩_bilibili 有时候我们业务需求对请求做一些鉴权,日志,统计分析等功能,这时候可以对请求进行预处理( …...
git clone
方法一(替换URL) git clone https://gitclone.com/github.com/tendermint/tendermint.git 方法二(设置git参数) git config --global url."https://gitclone.com/".insteadOf https:// git clone https://github.co…...
nginx ngx_http_module(8) 指令详解
nginx ngx_http_module(8) 指令详解 nginx 模块目录 nginx 全指令目录 一、目录 1.1 模块简介 ngx_http_ssi_module:服务器端包含(SSI)模块,允许在HTML页面中插入其他内容或动态生成的内容。通过特殊的SSI指令(如 …...
Apache Struts RCE (CVE-2024-53677)
前言 对目前的Apache Struts RCE (CVE-2024-53677)的poc进行总结,由于只能单个ip验证,所以自己更改一下代码,实现:多线程读取url验证并保存,更改为中文解释 免责声明 请勿利用文章内的相关技术从事非法测试…...
windows系统本地部署DeepSeek-R1全流程指南:Ollama+Docker+OpenWebUI
本文将手把手教您使用OllamaDockerOpenWebUI三件套在本地部署DeepSeek-R1大语言模型,实现私有化AI服务搭建。 一、环境准备 1.1 硬件要求 CPU:推荐Intel i7及以上(需支持AVX2指令集) 内存:最低16GB,推荐…...
前端:最简单封装nmp插件(组件)过程。
一、nmp使用 1、注册nmp账号:npm | Home 2、创建插件名称文件夹,如: vue3-components 3、初始化一个package.json文件:nmp init npm init package.json配置用处介绍,如下: {// 包名,必须…...
百度搜索融合 DeepSeek 满血版,开启智能搜索新篇
百度搜索融合 DeepSeek 满血版,开启智能搜索新篇 🚀 🔹 一、百度搜索全量接入 DeepSeek 🔹 百度搜索迎来重要升级,DeepSeek 满血版全面上线!🎉 用户在百度 APP 搜索后,点击「AI」即…...
导出指定文件夹下的文件结构 工具模块-Python
python模块代码 import os import json import xml.etree.ElementTree as ET from typing import List, Optional, Dict, Union from pathlib import Path class DirectoryTreeExporter:def __init__(self,root_path: str,output_file: str,fmt: str txt,show_root: boo…...
V4L2驱动之UVC
以下是关于V4L2摄像头驱动框架与UVC协议的关联分析,从内核驱动到用户空间的完整视角: 1. V4L2驱动框架核心架构 关键组件: 核心层 (V4L2 Core) v4l2_device:设备的总入口,管理所有子组件video_device:对应…...
【Linux】匿名管道的应用场景-----管道进程池
目录 一、池化技术 二、简易进程池的实现: Makefile task.h task.cpp Initchannel函数: 创建任务: 控制子进程: 子进程执行任务: 清理收尾: 三、全部代码: 前言: 对于管…...
umi react+antd 判断渲染消息提示、input搜索、多选按钮组
记得map里返回的每层遍历结构都要带上key(图里没加,最近在接手react,熟悉中......
Windows桌面系统管理5:Windows 10操作系统注册表
Windows桌面系统管理0:总目录-CSDN博客 Windows桌面系统管理1:计算机硬件组成及组装-CSDN博客 Windows桌面系统管理2:VMware Workstation使用和管理-CSDN博客 Windows桌面系统管理3:Windows 10操作系统部署与使用-CSDN博客 Wi…...
华为昇腾 910B 部署 DeepSeek-R1 蒸馏系列模型详细指南
本文记录 在 华为昇腾 910B(65GB) * 8 上 部署 DeepSeekR1 蒸馏系列模型(14B、32B)全过程与测试结果。 NPU:910B3 (65GB) * 8 (910B 有三个版本 910B1、2、3) 模型:DeepSeek-R1-Distill-Qwen-14B、DeepSeek…...
文献阅读 250219-Global water availability boosted by vegetation-driven changes (1)
Global water availability boosted by vegetation-driven changes in atmospheric moisture transport 来自 <https://www.nature.com/articles/s41561-022-01061-7> ## Abstract: 全球水资源的可用性是气候变化研究中的重要议题,尤其是随着气候变化的加剧&a…...
蓝桥杯篇---超声波距离测量频率测量
文章目录 简介第一部分:超声波的简介工作原理1.发射超声波2.接收反射波3.计算时间差4.计算距离 硬件连接1.Trig2.Echo 示例代码代码说明注意事项1.声速2.延时精度3.硬件连接 第二部分:频率测量简介频率测量原理1.信号输入2.计数3.计算频率 硬件连接示例代…...
【玩转 Postman 接口测试与开发2_020】(完结篇)DIY 实战:随书示例 API 项目本地部署保姆级搭建教程(含完整调试过程)
《API Testing and Development with Postman》最新第二版封面 文章目录 最新版《Postman 接口测试与开发实战》示例 API 项目本地部署保姆级搭建教程1 前言2 准备工作3 具体部署3.1 将项目 Fork 到自己名下3.2 创建虚拟环境并安装依赖3.3 初始运行与项目调试 4 示例项目的用法…...
LearnOpenGL——高级OpenGL(下)
教程地址:简介 - LearnOpenGL CN 高级数据 原文链接:高级数据 - LearnOpenGL CN 在OpenGL中,我们长期以来一直依赖缓冲来存储数据。本节将深入探讨一些操作缓冲的高级方法。 OpenGL中的缓冲本质上是一个管理特定内存块的对象,它…...
wangEditor 编辑器 Vue 2.0 + Nodejs 配置
资料 Vue2.0 版本的安装:https://www.wangeditor.com/v5/for-frame.html#%E4%BD%BF%E7%94%A8上传图片配置:https://www.wangeditor.com/v5/menu-config.html#%E4%B8%8A%E4%BC%A0%E5%9B%BE%E7%89%87 安装步骤 1.安装界面基础部分 <!-- 富文本编辑器…...
机器学习·数据处理
前言 对于大规模数据,我们经常会使用python内置函数或者编写脚本进行批量化处理,从而提高后续使用算法的效率。 1. 正则表达式 定义:用于检索、替换符合某个模式的文本,是文本预处理常用技术。基本语法 符号描述.匹配除换行符 …...
如何在Bigemap Pro中用线分割面、挖空
有时候需要以一条线为界对面元素进行分割或者是需要在一个面元素里面挖空一个面形状的洞,对此需求可以使用bigemap pro工具实现,这里为你介绍一下具体的操作方法。 【一】画线分割面 第一步:现在这是一个不规则多边形,想要以手动…...
网络安全入门攻击与防御实战(四)
漏洞利用:永恒之蓝(MS17-010)与同类漏洞解析 1 永恒之蓝(MS17-010)漏洞背景 (1)漏洞信息 CVE编号:CVE-2017-0143 ~ CVE-2017-0148 影响范围:Windows XP ~ Windows 201…...
DeepSeek 接入PyCharm实现AI编程!(支持本地部署DeepSeek及官方DeepSeek接入)
前言 在当今数字化时代,AI编程助手已成为提升开发效率的利器。DeepSeek作为一款强大的AI模型,凭借其出色的性能和开源免费的优势,成为许多开发者的首选。今天,就让我们一起探索如何将DeepSeek接入PyCharm,实现高效、智…...
CF1801D
CF1801D 题目大意: n n n 个顶点, m m m 条边的图。你一开始在起点 1,拥有 P P P 枚硬币,通过每条 ( i , j ) (i,j) (i,j) 边都需要花费一定的硬币 s ( i , j ) s(i,j) s(i,j)。但你在每个城市 i i i 都可以打工赚硬币 w i w…...
大厂算法面试常见问题总结:高频考点与备战指南
在大厂算法面试中,数据结构与算法是必考的核心内容。 无论是校招还是社招,算法题的表现往往决定了面试的成败。 为了帮助大家更好地备战,本文总结了大厂算法面试中的高频考点,并提供了详细的备战建议,助你轻松应对面…...
【R语言】主成分分析与因子分析
一、主成分分析 主成分分析(Principal Component Analysis, PCA)是一种常用的无监督数据降维技术,广泛应用于统计学、数据科学和机器学习等领域。它通过正交化线性变换将(高维)原始数据投影到一个新的坐标系ÿ…...
解锁 AIoT 无限可能,乐鑫邀您共赴 Embedded World 2025
2025 年 3 月 11-13 日,全球规模最大的嵌入式展览会——Embedded World 2025 将在德国纽伦堡盛大开幕。作为物联网和嵌入式技术领域的领先企业,乐鑫信息科技 (688018.SH) 将展示在 AI LLM、HMI、双频 Wi-Fi 6、低功耗 MCU 和 Matter 等领域的最新技术及解…...
人工智能基础之数学基础:01高等数学基础
函数 极限 按照一定次数排列的一列数:“,“,…,"…,其中u 叫做通项。 对于数列{Un}如果当n无限增大时,其通项无限接近于一个常数A,则称该数列以A为极限或称数列收敛于A,否则称数列为发散, 极限值 左…...
【从0做项目】Java搜索引擎(8) 停用词表 正则
阿华代码,不是逆风,就是我疯 你们的点赞收藏是我前进最大的动力!! 希望本文内容能够帮助到你!! 目录 文章导读 零:项目结果展示 一:前引 二:停用词表 1:…...
线程和进程的区别
如果说一个服务器同一时刻收到了许多请求,针对每一个请求,操作系统都会产生一个进程,从而给这个请求提供一些服务 ,返回响应,如果请求处理完了,这个进程就要销毁了!如果请求很多的话,…...
深入理解 QObject的作用
QObject 作为 Qt 库中所有对象的基类,其地位无可替代。几乎 Qt 框架内的每一个类,无论是负责构建用户界面的 QWidget,还是专注于数据处理与呈现的 QAbstractItemModel,均直接或间接继承自 QObject。这种继承体系赋予 Qt 类库高度的…...
解码 NLP:从萌芽到蓬勃的技术蜕变之旅
内容概况: 主要讲述NLP专栏的内容和NLP的发展及其在现代生活中的广泛应用。课程强调实践为主、理论为辅的学习方法,并通过多个生活场景展示了NLP技术的实际应用,如对话机器人、搜索引擎、翻译软件、电商推荐和智能客服等。 这边我就不多做自我…...
【核心算法篇十五】《深度解析DeepSeek遗传算法:让超参数调优从“玄学”变“科学”的终极指南》
引言:超参数调优的“炼丹困局”与破局之路 在机器学习的世界里,调参工程师常被戏称为"炼丹师"——面对动辄几十个超参数的复杂模型,我们就像古代术士守着炼丹炉,不断尝试各种参数组合,期待偶然炼出"仙丹"。传统网格搜索(Grid Search)需要遍历所有可…...
Python—变量、基本数据类型、类型的转换
文章目录 Python—变量、基本数据类型1 格式化输出2 号的使用3 变量的数据类型4 type() 函数的使用5 数据类型的基本介绍5.1 int 整型5.2 float 浮点类型5.3 bool 布尔类型5.4 str 字符串类型5.5 字符串驻留机制5.6 数据类型的转换(1)隐式转换ÿ…...