RAG框架搭建(基于Langchain+Ollama生成级RAG 聊天机器人)
目录
一 Ollama安装
Windows 系统安装
验证安装
二 Langchain安装
2.1 先创建一个虚拟环境
2.2 安装最新版 langchain
三 基于 Langchain+私有模型,构建一个生成级RAG 聊天机器人
3.1 初始化LLM
3.2 增强生成
3.3生成嵌入
3.4 生成并存储嵌入
一 Ollama安装
Ollama 是一个开源的大型语言模型(LLM)平台,旨在让用户能够轻松地在本地运行、管理和与大型语言模型进行交互。
Ollama 支持多种操作系统,包括 macOS、Windows、Linux 以及通过 Docker 容器运行。
Ollama 对硬件要求不高,旨在让用户能够轻松地在本地运行、管理和与大型语言模型进行交互。
- CPU:多核处理器(推荐 4 核或以上)。
- GPU:如果你计划运行大型模型或进行微调,推荐使用具有较高计算能力的 GPU(如 NVIDIA 的 CUDA 支持)。
- 内存:至少 8GB RAM,运行较大模型时推荐 16GB 或更高。
- 存储:需要足够的硬盘空间来存储预训练模型,通常需要 10GB 至数百 GB 的空间,具体取决于模型的大小。
- 软件要求:确保系统上安装了最新版本的 Python(如果打算使用 Python SDK)。
Ollama 官方下载地址:Download Ollama on macOSDownload Ollama for macOShttps://ollama.com/download
Windows 系统安装
打开浏览器,访问 Ollama 官方网站:Download Ollama on macOS,下载适用于 Windows 的安装程序。
下载地址为:https://ollama.com/download/OllamaSetup.exe。
下载完成后,双击安装程序并按照提示完成安装。
验证安装
打开命令提示符或 PowerShell,输入以下命令验证安装是否成功:
ollama --version
如果显示版本号,则说明安装成功。
二 Langchain安装
LangChain 是一个用于开发由语言模型驱动的应用程序的框架。它使得应用程序能够:
- 具有上下文感知能力:将语言模型连接到上下文来源(提示指令,少量的示例,需要回应的内容等)
- 具有推理能力:依赖语言模型进行推理(根据提供的上下文如何回答,采取什么行动等)
2.1 先创建一个虚拟环境
通过终端创建虚拟环境
打开集成终端:
- 按下
Ctrl +
(反引号)
或通过菜单Terminal > New Terminal
打开终端。创建虚拟环境:
python -m venv myenv # 创建名为 "myenv" 的虚拟环境
3.激活虚拟环境
# 进入虚拟环境的 Scripts 目录并激活
.\myenv\Scripts\activate.bat
2.2 安装最新版 langchain
pip install langchain
验证安装
pip show langchain
安装 langchain-community
pip install langchain_community
验证安装 pip list
到这环境基本搞定
三 基于 Langchain+私有模型,构建一个生成级RAG 聊天机器人
3.1 初始化LLM
首先初始化本地大型语言模型,使用Ollama在本地运行该模型。
使用LangChain库将所有内容连接在一起。
from langchain.llms import Ollama
# 初始化 Ollama 模型(确保 Ollama 已安装并运行)
llm = Ollama(model="llama3.2") # 替换为你需要的模型名称
# 测试调用
response = llm("Hello, Ollama!")
print(response)
输出
d:\ai\py\langchain001.py:3: LangChainDeprecationWarning: The class `Ollama` was deprecated in LangChain 0.3.1 and will be removed in 1.0.0. An updated version of the class exists in the :class:`~langchain-ollama package and should be used instead. To use it run `pip install -U :class:`~langchain-ollama` and import as `from :class:`~langchain_ollama import OllamaLLM``.
llm = Ollama(model="llama3.2") # 替换为你需要的模型名称
d:\ai\py\langchain001.py:5: LangChainDeprecationWarning: The method `BaseLLM.__call__` was deprecated in langchain-core 0.1.7 and will be removed in 1.0. Use :meth:`~invoke` instead.
response = llm("Hello, Ollama!")
Nice to meet you! I'm here to help with any questions or topics you'd like to discuss. How's your day going so far?
from langchain_community.llms import Ollamafrom langchain.callbacks.manager import CallbackManagerfrom langchain.callbacks.streaming_stdout import StreamingStdOutCallbackHandler
llm = Ollama(model="llama3.2",callback_manager=CallbackManager([StreamingStdOutCallbackHandler()]),
)llm.invoke("英伟达公布2024二季度营收多少亿美元?")
输出
d:\ai\py\langchain001.py:6: LangChainDeprecationWarning: The class `Ollama` was deprecated in LangChain 0.3.1 and will be removed in 1.0.0. An updated version of the class exists in the :class:`~langchain-ollama package and should be used instead. To use it run `pip install -U :class:`~langchain-ollama` and import as `from :class:`~langchain_ollama import OllamaLLM``.
llm = Ollama(
d:\ai\py\langchain001.py:6: DeprecationWarning: callback_manager is deprecated. Please use callbacks instead.
llm = Ollama(
我不知道你是在问什么年份的信息。但是,2020 年 7 月,NVIDIA 发佈了其第二季度 2020 的财
务报告,其中表明其营收为 5.9 亿美元。
3.2 增强生成
手动增强提示(即增强生成)
LangChain中我们可以使用以下代码构造一个提示,这里我们使用了Langchain的提示词模板:
from langchain.prompts import PromptTemplatetemplate = """你是一个机器人,使用提供的上下文来回答问题。如果你不知道答案,只需简单地说明你不知道。
{context}
Question: {input}"""prompt = PromptTemplate(template=template, input_variables=["context", "input"]
)# 格式化生成提示
formatted_prompt = prompt.format(context="英伟达公布2024财年第二财季季报。二季度营收135.07亿美元",input="英伟达公布2024二季度营收多少亿美元?"
)print(formatted_prompt)
输出
PS D:\ai\py> d:; cd 'd:\ai\py'; & 'd:\Anaconda3\envs\langchain01\python.exe' 'c:\Users\yurzai\.vscode\extensions\ms-python.debugpy-2025.6.0-win32-x64\bundled\libs\debugpy\launcher' '59423' '--' 'd:\ai\py\langchain001.py'
你是一个机器人,使用提供的上下文来回答问题。如果你不知道答案,只需简单地说明你不知道。
英伟达公布2024财年第二财季季报。二季度营收135.07亿美元
Question: 英伟达公布2024二季度营收多少亿美元?
3.3生成嵌入
创建 PDF页面的嵌入。
检索页面 PyPDFLoader。
from langchain.text_splitter import RecursiveCharacterTextSplitterfrom langchain_community.document_loaders import PyPDFLoader
loader = PyPDFLoader(file_path="D:/ai/py/Research_and_application_of_real-time_control_system_for_construction_quality_of_digital_dynamic_compaction.pdf")docs = loader.load()print(len(docs))print(docs[1].page_content)
输出
s\yurzai\.vscode\extensions\ms-python.debugpy-2025.6.0-win32-x64\bundled\libs\debugpy\launcher' '59686' '--' 'd:\ai\py\langchain001.py'
5
parameters and did not see the engineering application of the
monitoring system. Zhan jinlin [9] put forward the idea of the
construction information management system based on GPS to
realize dynamic monitoring of the dynamic compaction
construction process, but also failed to see the engineering
application of this information management system. Wang
Zhongming [10] proposed a platform for the dynamic
compaction quality supervision based on analysis of the
transient Rayleigh wave and the internet detection technology,
to control the dynamic compaction quality of dispersive
projects all over the country. Nevertheless, the platform was
not a compaction construction process supervision platform in
some sense. The technical specification for dynamic
compaction ground treatment in China [11] stipulated that the
construction process of groundwork using dynamic compaction
should be informatized, but a complete construction quality
control scheme covering construction monitoring, data analysis,
early warning and construction navigation has not been
established in China. Related technologies urgently need to be
perfected in engineering applications.
III. OVERALL TECHNOLOGICAL SCHEME
According to the construction quality control procedures
and processes of the dynamic compaction, the Global
Navigation Satellite System (GNSS), wireless network
technology, cloud computing technology and sensor
technology are used. This paper proposes the overall
architecture of the real-time control system for digital dynamic
compaction as shown in Fig. 1, which mainly includes
intelligent monitoring terminal, cloud computing terminal,
wireless communication network, mobile monitoring terminal
and integrated information management terminal (online
management website).
By installing a GNSS antenna on the roof of cab and the
hook of rammer on the machine respectively, the three-
dimensional position information and orientation of the
rammer can be obtained in real time. At the same time, using
the tension sensor installed on the wire rope of the hanging
hammer, the stress state of the wire rope is measured and used
for judging whether the hammer is lifted. After the three-
dimensional position coordinates and stress state collected by
the above-mentioned monitoring terminal are fused in the
integrated controller, the collated data is sent to the database on
the cloud computing terminal through the wireless network.
The cloud-based application program calls the data from the
database and calculates the dynamic construction parameters
such as number of tamping, hammer drop distance, last two-
click settlement, tamping point location and tamping machine
orientation in real time. The calculated parameters are
displayed on the cockpit display terminal, mobile monitoring
terminal and comprehensive management information terminal,
synchronously. Then these construction parameters are
automatically compared with the presupposed construction
control standards to determine whether the number of tamping,
the last two-click settlement and the tamping position
deviations are up to the standard. If there is a deviation beyond
the standard, the background calculation program
automatically calculates the direction and the distance in which
the tamper hammer should be adjusted according to the current
position of the defect, and transmits the command to the
displayer of the cab for the real-time construction navigation
and on-site construction adjustment.
Base station
Monitor terminal of dynamic tamping machine
Internet
GNSS satellite
Tension sensor
GNSS antenna
Locating
information
Machine and
rammer position
coordinates
Cable Stress
status
Cloud computing
Average settlement/
tampping point offset
Cab display
terminal
Integrated information
management terminal
Supervision mobile
monitoring terminal
Tampping number/
Lift distence
Construction
navigation
Integrated information
management terminalFig. 1 Overall technical architecture of the system
IV. KEY TECHNICAL ISSUES AND SOLUTIONS
A. Data Acquisition and Transmission
For the quality control of dynamic construction, the most
important construction information is the real-time location of
hammer. In order to collect the real-time hammer position, this
paper used an overall solution of GNSS location technique plus
tension sensor technique. The real time kinematic (RTK)
positioning technology based on GNSS is used to collect the
hammer position every second, because a GNSS rover is
installed on the side of the rammer hook. The tension sensor is
installed on the cable to monitor the stress status of the cable in
real time. When the force status of the cable changed, the
sensor will send a signal to the integrated controller. The
position information collected by the satellite receiver and the
stress information collected by the tension sensor are fused in
the vehicular integrated controller and send the construction
data to the cloud computing procedure through the wireless
data transmission module. The follow-up data presentation and
analysis are carried out by the cloud service. All devices are
powered by the onboard power supply.
B. Data fusion and analysis
The rammer hook position coordinate is defined as (x, y, z),
and the spatial position coordinate of rammer is defined as ( x’,
y’, z’). At the moment that the hammer is lifted for the nth time,
the tension sensor triggers the maximum threshold and sends
an instruction to the integrated controller. The position of the
GNSS antenna ( x0,n, y0,n, z0,n) is recorded at this time and the
lowest position of hammer (x’0,n, y’0,n, z’0,n) is converted by the
geometrical relationship of hammer (i.e., the space position
where the hammer tamped the foundation for the n-1th time).
When the hammer is raised to the highest point and the rammer
hook is released, the force sensor is subjected to a sudden
decrease in force calibration and triggered a minimum
threshold. At this time, the tension sensor also sends an
instruction to the integrated controller to record the antenna
position coordinate (x1,n, y1,n, z1,n), and then the highest position
coordinate ( x’1,n, y’1,n, z’1,n) of hammer is converted by the
geometrical relationship. The spatial position of the hammer
after the nth drop was defined as (x’0,n+1, y’0,n+1, z’0,n+1), then the
1125
Authorized licensed use limited to: University of Chinese Academy of SciencesCAS. Downloaded on May 04,2025 at 07:05:49 UTC from IEEE Xplore. Restrictions apply.
将把页面分 成块。实现此目的的一种方法是使用 RecursiveCharacterTextSplitter 遍历文本并提取一定长度的 块,每个块之间可以选择重叠:
text_splitter = RecursiveCharacterTextSplitter(chunk_size = 1000,chunk_overlap = 200,length_function = len,is_separator_regex = False,
)data = text_splitter.split_documents(docs)# 验证第一个分块
if len(data) > 0:print("第一个分块的文本内容:")print(data[0].page_content[:500]) # 截取前500字符避免过长输出print("分块数量:", len(data))
else:print("未成功分块,请检查文档内容!")
输出
loaded on May 04,2025 at 07:05:49 UTC from IEEE Xplore. Restrictions apply.
第一个分块的文本内容:
Research and application of real-time control system
for construction quality of digital dynamic
compaction
Zilong Li1*, Lei Liu2, Yichao Sun3, Ruixin Ma1, Guangshuang Ge1
1. Tianjin Research Institute of Water Transport Engineering, Tianjin, China
2. Shandong SWINFO Co. Ltd., Tai’an, China
3. Shandong Bohai Bay Port Group Co. Ltd., Jinan, China
zilonglibaifoshan@163.com, rokeyliu@126.com, 15065310890@163.com, geguangshuang@126.com, maruixin1990@sina.comAbstract—Against the drawb
分块数量: 35
3.4 生成并存储嵌入
使用LangChain的Chroma向量存储来保存文档的嵌入向量.
from langchain.vectorstores import Chroma
from langchain_community.embeddings.fastembed import FastEmbedEmbeddings# 1. 初始化嵌入模型
embeddings = FastEmbedEmbeddings(model_name="BAAI/bge-base-en-v1.5")# 2. 准备文档数据(示例)
data = [{"page_content": "苹果公司发布2023年Q2财报,营收同比增长10%。", "metadata": {"source": "财报"}},{"page_content": "英伟达宣布推出新一代GPU架构Blackwell。", "metadata": {"source": "新闻"}},
]# 3. 创建 Chroma 向量存储
store = Chroma.from_documents(data=data,embedding=embeddings,ids=[f"{item['metadata']['source']}-{i}" for i, item in enumerate(data)],collection_name="Tech-Reports",persist_directory="db",
)# 4. 验证存储
print(f"向量库中文档数量: {len(store.index_to_docstore_id)}")
输出
本地会生成一个db文件夹
相关文章:
RAG框架搭建(基于Langchain+Ollama生成级RAG 聊天机器人)
目录 一 Ollama安装 Windows 系统安装 验证安装 二 Langchain安装 2.1 先创建一个虚拟环境 2.2 安装最新版 langchain 三 基于 Langchain私有模型,构建一个生成级RAG 聊天机器人 3.1 初始化LLM 3.2 增强生成 3.3生成嵌入 3.4 生成并存储嵌入 一 Ol…...
spring cloud gateway(网关)简介
Spring Cloud Gateway 是一个基于 Spring WebFlux 构建的强大且广泛使用的 API 网关。它负责处理所有进入的请求,并将它们路由到相应的后端服务。 Gateway 的主要作用: 统一的入口点 (Single Entry Point): 它为所有的客户端请求提供了一个…...
webrtc 视频直播
webrtc 是一种开源的音视频通信技术,可以不借助中间媒介建立浏览器点对点(peer-to-peer)连接,实现音视频以及其他数据的传输。webrtc具有平台兼容性,低延迟与高实时的优点。今天主要记录一下webrtc的使用记录ÿ…...
【Elastsearch】如何获取已创建的api keys
在Elasticsearch中,可以通过API获取已创建的API密钥(API keys)。以下是具体步骤和示例: 1.使用GET请求获取API密钥 Elasticsearch提供了GETAPI,用于列出当前用户可以访问的所有API密钥。 请求格式 plaintext GET /_se…...
AI Agent开发第57课-AI用在销售归因分析场景中-用随机森林从0构建自己的“小模型”
开篇 在前一篇《机器学习的基础-线性回归如何应用在商业场景中》里,我们说到了如果我们只是简单的分析和预测一下投入广告费用和销售额增长是否存在必然关系,我们用了线性回归法得到了分析,得到的分析结果极其精准,以及提到了:如果当销售因素是非线性的并且有着额外一些如…...
Elasticsearch知识汇总之ElasticSearch部署
五 ElasticSearch部署 部署Elasticsearch,可以在任何 Linux、MacOS 或 Windows 机器上运行 Elasticsearch。在Docker 容器 中运行 Elasticsearch 。使用Elastic Cloud on Kubernetes 设置和管理 Elasticsearch、Kibana、Elastic Agent 以及 Kubernetes 上的 Elasti…...
高等数学第五章---定积分(§5.4反常积分)
5.4 反常积分 前面我们学习了定积分 ∫ a b f ( x ) d x \int_a^b f(x) d x ∫abf(x)dx,其中积分区间 [ a , b ] [a, b] [a,b] 是有限区间,且被积函数 f ( x ) f(x) f(x) 在 [ a , b ] [a, b] [a,b] 上是连续的(或至多有有限个第一类间…...
UE5 ML机械学习肌肉反应与布料反应
在查找Ai过渡动画的过程中,通过米哈游鹿鸣的展示,了解到的机械学习技术 https://dev.epicgames.com/documentation/zh-cn/unreal-engine/using-the-machine-learning-deformer-in-unreal-engine#%E5%85%88%E5%86%B3%E6%9D%A1%E4%BB%B6 https://dev.epicgames.com/documentati…...
UE5 诺伊腾动捕使用笔记
AxisStudio使用说明 诺伊腾动捕有两个软件,分别是AxisStudio和Axis Post 打开软件后选择"工程" 分为两种工程,一种是PN Studio和PN3,这两个工程对于不同的骨骼方式(也可以修改) 以PNStudio的2.0-Carwheel举例 右侧的数据为你的目标骨骼的尺寸,例如我现在是Metahuma…...
【测试开发】概念篇 - 从理解需求到认识常见开发、测试模型
📢博客主页:https://blog.csdn.net/2301_779549673 📢博客仓库:https://gitee.com/JohnKingW/linux_test/tree/master/lesson 📢欢迎点赞 👍 收藏 ⭐留言 📝 如有错误敬请指正! &…...
【2025年】基于电脑的jdk1.8通过idea创建springboot2.x版本(非常简洁快速)
【2025年】基于电脑的jdk1.8通过idea创建springboot2.x版本 提示:帮帮志会陆续更新非常多的IT技术知识,希望分享的内容对您有用。本章分享的是springboot的使用。前后每一小节的内容是存在的有:学习and理解的关联性。【帮帮志系列文章】&…...
在sheel中运行Spark
RDD基本概念 Resilient Distributed Dataset 叫做弹性分布式数据集,是Spark中最基本的数据抽象,是分布式计算的实现载体,代表一个不可变,可分区,里面的元素并行计算的集合。 Dataset: 一个数据集合…...
如何从windows中的cursor打开windows里面的wsl中的项目
解决方法: ✅ 步骤 1:在 Windows 中安装 Cursor 首先,确保你已在 Windows 上安装了 Cursor 编辑器。 安装完成后,打开 Cursor 编辑器。 ✅ 步骤 2:安装并配置 WSL 扩展 为了让 Cursor 与 WSL 集成,需…...
UE5 C++项目实现单例
在 UE5 中,要实现“全局只有一个实例”的单例模式,主要有两种思路:一种是传统 C++ 静态单例,另一种是利用 UE5 提供的Subsystem体系(如 UGameInstanceSubsystem、UWorldSubsystem 等)。下面先给出核心示例代码及对比,随后讨论典型使用场景、优缺点,对常见问题作出诊断并…...
信息论04:从信息熵到互信息——信息共享的数学度量
从信息熵到互信息:信息共享的数学度量 1. 信息论基础概念 1.1 信息熵(Information Entropy) 定义:信息熵由香农提出,用于量化随机变量的不确定性。对于离散随机变量X,其熵定义为: H ( X ) …...
MYSQL的DDL语言和单表查询
MYSQL的DDL语言和单表查询 Mysql介绍 SQL(Structured Query Language)是一种专门用于管理和操作关系型数据库的标准化语言,通过定义、查询、更新和控制数据,为应用程序提供一致且高效的持久化存储方式。它包含数据定义语言&…...
奇瑞依托汽车产业链,实现服务机器人万台下线
近日,奇瑞集团旗下墨甲机器人(MOJA)全球批量交付的消息得到官方确认。这一重大进展不仅标志着奇瑞在服务机器人领域的商业化落地迈出关键一步,更成为国产智能装备进军全球市场的重要里程碑。 墨甲机器人简介 产品定位 墨甲是奇…...
Python Bug 修复案例分析:函数参数传递引发的逻辑错误修复
在 Python 编程学习的过程中,各种意想不到的 Bug 常常会阻碍我们编写的程序的正常运行。这次,我们将围绕一个因函数参数传递导致逻辑错误的案例,深入剖析 Bug 的修复全过程,帮助初学者掌握处理这类问题的方法。 案例背景 最近编写…...
论文阅读笔记——ROBOGROUND: Robotic Manipulation with Grounded Vision-Language Priors
RoboGround 论文 一类中间表征是语言指令,但对于空间位置描述过于模糊(“把杯子放桌上”但不知道放桌上哪里);另一类是目标图像或点流,但是开销大;由此 GeoDEX 提出一种兼具二者的掩码。 相比于 GR-1&#…...
deeplabv3+街景图片语义分割,无需训练模型,看不懂也没有影响,直接使用,cityscapes数据集_23
目录 0、简介1、下载链接1.1、CSDN链接,含权重文件直接使用,建议直接下这个,还不限速。1.2 Github链接: 2、下载代码,下载预训练好的权重3、预测代码4、像素提取,或者说类别提取5、文档部分内容截图6、其他…...
JavaScript性能优化实战:深入探讨性能瓶颈与优化技巧
JavaScript性能优化实战:深入探讨性能瓶颈与优化技巧 引言 在当今快速发展的Web世界中,性能已经成为衡量应用质量的关键指标。随着Web应用复杂度的不断提升,JavaScript作为前端开发的核心语言,其性能优化变得尤为重要。本文旨在全面深入地探讨JavaScript性能优化的各个方…...
第2章——springboot核心机制
一、为何以继承方式引入SpringBoot 1.提出疑问 以前我们在开发项目时,需要什么,引入对应的依赖就行,比如我们需要连接mysql数据,则引入mysql驱动的依赖,如下: <dependency><groupId>com.mys…...
huggingface 热门开源TTS模型Dia-1.6B,支持多人对话生成、情感控制~
简介 Dia-1.6B 是一款由 Nari Labs 开发的开源文本转语音(TTS)模型,专注于生成自然对话。其项目背景和模型架构基于近期可用的网络信息进行了详细分析,以下是全面的报告。 项目背景概述 Dia-1.6B 的开发始于 Nari Labsÿ…...
深入理解West:介绍、使用及与Repo的对比
目录 引言 West简介 West的由来 West的核心功能 West的架构与工作流程 West安装与使用 环境准备与安装 Manifest 文件结构解析 常用命令详解与进阶用法 Tip与Troubleshoot 实践案例:基于West的Zephyr项目管理 初始化与同步 构建与闪存 插件示例:自定义命令 Repo简介 Repo的背…...
力扣-hot100 (矩阵置零)
73. 矩阵置零 中等 给定一个 *m* x *n* 的矩阵,如果一个元素为 0 ,则将其所在行和列的所有元素都设为 0 。请使用 原地 算法。 示例 1: 输入:matrix [[1,1,1],[1,0,1],[1,1,1]] 输出:[[1,0,1],[0,0,0],[1,0,1]] 示…...
OpenKylin安装Elastic Search8
一、环境准备 Java安装 安装过程此处不做赘述,使用以下命令检查是否安装成功。 java -version 注意:Elasticsearch 自 7.0 版本起内置了 OpenJDK,无需单独安装。但如需自定义 JDK,可设置 JAVA_HOME。 二、安装Elasticsearch …...
【JVM】从零开始深度解析JVM
本篇博客给大家带来的是JVM的知识点, 重点在类加载和垃圾回收机制上. 🐎文章专栏: JavaEE初阶 🚀若有问题 评论区见 ❤ 欢迎大家点赞 评论 收藏 分享 如果你不知道分享给谁,那就分享给薯条. 你们的支持是我不断创作的动力 . 王子,公主请阅🚀 …...
制造企业PLM系统成本基准:2025年预算分配与资源成本率的5种优化模型
在 2025 年制造业数字化转型的浪潮中,PLM(产品生命周期管理)系统已成为制造企业提升核心竞争力的关键工具。然而,PLM 系统的实施和运营成本较高,如何有效控制成本、优化预算分配和资源成本率,成为企业关注的…...
【Python】一键提取视频音频并生成MP3的完整指南 by `MoviePy`
摘要 昨天, 我在让一个小朋友给我整理一次培训的视频的时候,我看到他把视频文件放到剪映里面处理。 我以为他要干什么呢, 还很期待,结果他只是为了导出音频而已。 于是就有了今天的这篇博客。 作为音视频处理领域的常用需求&…...
Golang领域Beego框架的中间件开发实战
在Golang的Beego框架中,中间件(Middleware)是一种强大的机制,用于在请求处理的不同阶段插入自定义逻辑。 中间件可以用于处理日志记录、身份验证、错误处理、请求/响应修改等任务。 Beego框架中间件开发的实战指南: …...
Elasticsearch:我们如何在全球范围内实现支付基础设施的现代化?
作者:来自 Elastic Kelly Manrique SWIFT 和 Elastic 如何应对基础设施复杂性、误报问题以及日益增长的合规要求。 金融服务公司在全球范围内管理实时支付方面面临前所未有的挑战。SWIFT(Society for Worldwide Interbank Financial Telecommunication -…...
【LLIE专题】基于 CLIP 的无监督背光增强算法
CLIP-LIT: Iterative Prompt Learning for Unsupervised Backlit Image Enhancement(2023,ICCV) 专题介绍一、研究背景二、CLIP-LIT方法三、实验结果四、总结五、思考 本文将对 CLIP-LIT: Iterative Prompt Learning for Unsupervised Backl…...
深入了解酒店一次性牙刷:材质选择与设计考量全解析
酒店的一次性牙刷是我们住酒店时常见的用品,它方便了很多旅客出行,虽小巧,却对人们口腔清洁有一定作用,扬州卓韵酒店用品在这个领域表现优秀,下面我们就深入了解酒店一次性牙刷。 一次性牙刷的材质相当重要。常见的有…...
[人机交互]理解用户
一.解释什么是认知,以及它对交互设计的重要性 1.1什么是认知 认知是指与knowing相关的能力,行为和过程(考填空) -如何感知物理刺激?如注意、知觉等 -如何认识自我、他人以及环境?如意识、记忆等 -如何…...
css3伸缩盒模型第二章(侧轴相关)
css3伸缩盒模型第二章(侧轴相关) 侧轴对齐方式 侧轴对齐我们需要分两种情况,一种是多行,一种是单行,两种设置方式不同 属性:align-items 单行属性: align-content 多行 单行 align-items flex-start: 侧轴的起点对…...
【WPS】怎么解决“word的复制表格”粘贴到“excel的单元格”变多行单元格的问题
把 word文档复制表格到这个excel表格上面的话,会出现由单个单元格变成多行单元格的情况。 现在,就这个问题怎么解决,提出了一个方案,就是先查找是什么导致了这个换行,然后再将换行的这个字符进行一个整体的替换&#x…...
股指期货深度贴水是什么意思?
如果贴水的幅度特别大,比如股票指数是3000点,但股指期货的价格只有2800点,贴水了200点,这就叫“深度贴水”。简单来说,股指期货贴水就是指股指期货的价格低于其对应的现货指数价格。当这种贴水程度较大时,就…...
GCC编译器安装详细说明(举例arm-2013q3)
比如在官网GNU Arm Embedded Toolchain project files : GNU Arm Embedded Toolchain 下载了一个gcc-arm-none-eabi-4_7-2013q3-20130916-linux.tar.bz2 1 sudo tar -xvf gcc-arm-none-eabi-4_7-2013q3-20130916-linux.tar.bz2 解决了解压 在部署环境,在安装2…...
第十一届蓝桥杯 2020 C/C++组 蛇形填数
目录 题目: 题目描述: 题目链接: 思路: 思路详解: 代码: 代码详解: 题目: 题目描述: 题目链接: 蛇形填数 - 蓝桥云课 思路: 思路详解: 看图找规律…...
https://juejin.cn/editor/drafts/7262346366541070395
.Net Core从零学习搭建权限管理系统教程 推荐一组WPF自定义控件开源项目。 项目简介 这是基于WPF开发的,为开发人员提供了一组方便使用自定义组件,并提供了各种常用的示例。 包含组件:数据表格、属性列表、树形列表、选色器、单选框列表、…...
STL?string!!!
一、引言 在之前的文章中,我们一同学习了有关类和对象、模板、动态内存管理的相关知识,那么接下来一段时间我们将要趁热打铁,一起来手撕C库中最重要的一个库----STL中的一些容器,在手撕它们之前,我将先介绍一下对应的容…...
CentOS 7 安装指定版本 Docker 及镜像加速/配置优化攻略
摘要 本文详述 CentOS 7 系统下安装指定版本 Docker ,涵盖镜像加速配置(实测最快)、存储位置优化、日志轮转等核心配置。 文章目录 一、安装指定版本Docker1.1 卸载旧版本(如有)1.2 安装依赖包1.3 添加Docker仓库&…...
域名别名(CNAME)解析及域名注册操作步骤
以虚拟主机为例,大多网站空间无独立ip,域名打开以别名解析为主,那域名别名(CNAME)如何解析呢?以下以新网为例,别名解析操作步骤: 1.登录域名管理界面,点击管理解析记录; …...
JVM内存模型深度解剖:分代策略、元空间与GC调优实战
堆 堆是Java虚拟机(JVM)内存管理的核心区域,其物理存储可能分散于不同内存页,但逻辑上被视为连续的线性空间。作为JVM启动时创建的第一个内存区域,堆承载着几乎所有的对象实例和数组对象(极少数通过逃逸分…...
Unity_JK框架【1】 框架导入 对象池示例 (资源管理底层)
一、JK框架介绍 主要功能系统: 对象池系统:重复利用GameObject或普通class实例,并且支持设置对象池容量 事件系统:解耦工具,不需要持有引用来进行函数的调用 资源系统 Resources版本:关联对象池进行资源…...
JDK 发展历史及其版本特性
JDK(Java Development Kit,Java开发工具包)是用于开发Java应用程序的核心工具之一。它由Oracle(最初由Sun Microsystems)提供,包含了Java编译器、Java运行环境(JRE)、Java标准类库等…...
B站视频下载到电脑的方法总结
将B站(哔哩哔哩)视频下载到电脑的方法有多种,以下是几种常见且有效的方法,分为 官方工具 和 第三方工具 两类: 一、官方方法(B站客户端或功能) 哔哩哔哩客户端(UWP/PC版)…...
2025 后端自学UNIAPP【项目实战:旅游项目】2、安装下载引用前端UI框架:uview-plus
1、uview-plus官网地址,有详细介绍,感兴趣的可以深入了解学习 介绍 | uview-plus - 全面兼容nvue/鸿蒙/uni-app-x的uni-app生态框架 - uni-app UI框架 2、Hbuilder X 方式安装下载引入uview-plus ①进入该网址,点击 下载插件并导入Hbuild…...
Vue 的双向绑定原理,Vue2 和 Vue3 双向绑定原理的区别
Vue 的双向绑定原理,Vue2 和 Vue3 双向绑定原理的区别 Vue 的双向绑定(Two-way Data Binding)是其核心特性之一,其本质是通过数据劫持结合发布-订阅模式实现的。以下是 Vue2 和 Vue3 在双向绑定原理上的区别和演进: 文…...
RAG_Techniques:探索GitHub热门RAG技术开源项目
RAG_Techniques:探索GitHub热门RAG技术开源项目 引言项目概述RAG技术简介与重要性核心功能详解1. 分类清晰的技术体系2. 前沿技术解析3. 评估工具与方法 安装和使用教程应用场景和实际价值企业知识库和文档检索教育和研究辅助个性化内容推荐 结论 引言 在当今AI领域…...