当前位置: 首页 > news >正文

Bert-vits2最终版Bert-vits2-2.3云端训练和推理(Colab免费GPU算力平台)

在这里插入图片描述

对于深度学习初学者来说,JupyterNoteBook的脚本运行形式显然更加友好,依托Python语言的跨平台特性,JupyterNoteBook既可以在本地线下环境运行,也可以在线上服务器上运行。GoogleColab作为免费GPU算力平台的执牛耳者,更是让JupyterNoteBook的脚本运行形式如虎添翼。

本次我们利用Bert-vits2的最终版Bert-vits2-v2.3和JupyterNoteBook的脚本来复刻生化危机6的人气角色艾达王(ada wong)。

本地调试JupyterNoteBook

众所周知,GoogleColab虽然可以免费提供GPU让用户用于模型训练和推理,但是每一个JupyterNoteBook文件脚本最多只能运行12小时,随后就会被限制,所以为了避免浪费宝贵的GPU使用时间,我们可以在线下调试自己的JupyterNoteBook脚本,调试成功后,就可以把脚本直接上传到GoogleColab平台。

首先通过pip命令进行本地安装:

python3 -m pip install jupyter

随后运行启动命令:

jupyter notebook

此时,访问本地的notebook地址:

随后选择文件-》新建-》Notebook 即可。

输入笔记内容:

#@title 查看显卡  
!nvidia-smi

点击运行单元格:

程序返回:

#@title 查看显卡  
!nvidia-smi  
Wed Dec 27 12:36:10 2023         
+---------------------------------------------------------------------------------------+  
| NVIDIA-SMI 546.17                 Driver Version: 546.17       CUDA Version: 12.3     |  
|-----------------------------------------+----------------------+----------------------+  
| GPU  Name                     TCC/WDDM  | Bus-Id        Disp.A | Volatile Uncorr. ECC |  
| Fan  Temp   Perf          Pwr:Usage/Cap |         Memory-Usage | GPU-Util  Compute M. |  
|                                         |                      |               MIG M. |  
|=========================================+======================+======================|  
|   0  NVIDIA GeForce RTX 4060 ...  WDDM  | 00000000:01:00.0 Off |                  N/A |  
| N/A   50C    P0              20W / 115W |      0MiB /  8188MiB |      0%      Default |  
|                                         |                      |                  N/A |  
+-----------------------------------------+----------------------+----------------------+  +---------------------------------------------------------------------------------------+  
| Processes:                                                                            |  
|  GPU   GI   CI        PID   Type   Process name                            GPU Memory |  
|        ID   ID                                                             Usage      |  
|=======================================================================================|  
|  No running processes found                                                           |  
+---------------------------------------------------------------------------------------+

至此,就可以在本地调试NoteBook了。

安装ffmpeg

新增单元格:

#@title 安装ffmpeg  
import os, uuid, re, IPython  
import ipywidgets as widgets  
import time  from glob import glob  
from google.colab import output, drive  from IPython.display import clear_output  
import os, sys, urllib.request  
HOME = os.path.expanduser("~")  
pathDoneCMD = f'{HOME}/doneCMD.sh'  
if not os.path.exists(f"{HOME}/.ipython/ttmg.py"):  hCode = "https://raw.githubusercontent.com/yunooooo/gcct/master/res/ttmg.py"  urllib.request.urlretrieve(hCode, f"{HOME}/.ipython/ttmg.py")  from ttmg import (  loadingAn,  textAn,  
)  loadingAn(name="lds")  
textAn("Cloning Repositories...", ty='twg')  
!git clone https://github.com/XniceCraft/ffmpeg-colab.git  
!chmod 755 ./ffmpeg-colab/install  
textAn("Installing FFmpeg...", ty='twg')  
!./ffmpeg-colab/install  
clear_output()  
print('Installation finished!')  
!rm -fr /content/ffmpeg-colab  
!ffmpeg -version

由于语音转写需要ffmpeg的参与,所以需要安装ffmpeg的最新版本。

程序返回:

Installation finished!  
c Copyright (c) 2000-2023 the FFmpeg developers  
built with gcc 9 (Ubuntu 9.4.0-1ubuntu1~20.04.1)  
configuration: --prefix=/home/ffmpeg-builder/release --pkg-config-flags=--static --extra-libs=-lm --disable-doc --disable-debug --disable-shared --disable-ffprobe --enable-static --enable-gpl --enable-version3 --enable-runtime-cpudetect --enable-avfilter --enable-filters --enable-nvenc --enable-nvdec --enable-cuvid --toolchain=hardened --disable-stripping --enable-opengl --pkgconfigdir=/home/ffmpeg-builder/release/lib/pkgconfig --extra-cflags='-I/home/ffmpeg-builder/release/include -static-libstdc++ -static-libgcc ' --extra-ldflags='-L/home/ffmpeg-builder/release/lib -fstack-protector -static-libstdc++ -static-libgcc ' --extra-cxxflags=' -static-libstdc++ -static-libgcc ' --extra-libs='-ldl -lrt -lpthread' --enable-ffnvcodec --enable-gmp --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libfdk-aac --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libkvazaar --enable-libmp3lame --enable-libopus --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libshine --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtheora --enable-libvidstab --ld=g++ --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-libzimg --enable-openssl --enable-zlib --enable-nonfree --extra-libs=-lpthread --enable-pthreads --extra-libs=-lgomp  
libavutil      58.  2.100 / 58.  2.100  
libavcodec     60.  3.100 / 60.  3.100  
libavformat    60.  3.100 / 60.  3.100  
libavdevice    60.  1.100 / 60.  1.100  
libavfilter     9.  3.100 /  9.  3.100  
libswscale      7.  1.100 /  7.  1.100  
libswresample   4. 10.100 /  4. 10.100  
libpostproc    57.  1.100 / 57.  1.100

这里安装的是最新版ffmpeg version 6.0

克隆代码库

接着克隆代码库:

#@title 克隆代码仓库  
!git clone https://github.com/v3ucn/Bert-vits2-V2.3.git

程序返回:

Cloning into 'Bert-vits2-V2.3'...  
remote: Enumerating objects: 234, done.  
remote: Counting objects: 100% (234/234), done.  
remote: Compressing objects: 100% (142/142), done.  
remote: Total 234 (delta 80), reused 232 (delta 78), pack-reused 0  
Receiving objects: 100% (234/234), 4.16 MiB | 14.14 MiB/s, done.  
Resolving deltas: 100% (80/80), done.

安装项目依赖

随后进入项目的目录,安装依赖:

#@title 安装所需要的依赖  
%cd /content/Bert-vits2-V2.3  
!pip install -r requirements.txt

下载必要的模型

新增单元格,下载模型:

#@title 下载必要的模型  
!wget -P slm/wavlm-base-plus/ https://huggingface.co/microsoft/wavlm-base-plus/resolve/main/pytorch_model.bin  
!wget -P emotional/clap-htsat-fused/ https://huggingface.co/laion/clap-htsat-fused/resolve/main/pytorch_model.bin  
!wget -P emotional/wav2vec2-large-robust-12-ft-emotion-msp-dim/ https://huggingface.co/audeering/wav2vec2-large-robust-12-ft-emotion-msp-dim/resolve/main/pytorch_model.bin  
!wget -P bert/chinese-roberta-wwm-ext-large/ https://huggingface.co/hfl/chinese-roberta-wwm-ext-large/resolve/main/pytorch_model.bin  
!wget -P bert/bert-base-japanese-v3/ https://huggingface.co/cl-tohoku/bert-base-japanese-v3/resolve/main/pytorch_model.bin  
!wget -P bert/deberta-v3-large/ https://huggingface.co/microsoft/deberta-v3-large/resolve/main/pytorch_model.bin  
!wget -P bert/deberta-v3-large/ https://huggingface.co/microsoft/deberta-v3-large/resolve/main/pytorch_model.generator.bin  
!wget -P bert/deberta-v2-large-japanese/ https://huggingface.co/ku-nlp/deberta-v2-large-japanese/resolve/main/pytorch_model.bin

下载底模文件

接着下载预训练模型的底模:

#@title 下载底模文件  !wget -P Data/ada/models/ https://huggingface.co/OedoSoldier/Bert-VITS2-2.3/resolve/main/DUR_0.pth  
!wget -P Data/ada/models/ https://huggingface.co/OedoSoldier/Bert-VITS2-2.3/resolve/main/D_0.pth  
!wget -P Data/ada/models/ https://huggingface.co/OedoSoldier/Bert-VITS2-2.3/resolve/main/G_0.pth  
!wget -P Data/ada/models/ https://huggingface.co/OedoSoldier/Bert-VITS2-2.3/resolve/main/WD_0.pth

注意2.3版本的底模是4个。

切分数据集

接着把艾达王的音频素材上传到Data/ada/raw/ada.wav

随后新建单元格:

#@title 切分数据集  !python3 audio_slicer.py

素材就会被切分。

转写和标注

此时我们需要把切片素材转写:

#@title 转写和标注  
!pip install git+https://github.com/openai/whisper.git  
!python3 short_audio_transcribe.py

注意这里单独安装whisper,很多人直接用 pip install whisper,其实这不是正确的安装方式,需要单独指定安装源:pip install git+https://github.com/openai/whisper.git,切记,否则会报错。

执行完毕后会在角色目录生成转写文件esd.list:

./Data\ada\wavs\ada_0.wav|ada|EN|I do. The kind you like.  
./Data\ada\wavs\ada_1.wav|ada|EN|Now where's the amber?  
./Data\ada\wavs\ada_10.wav|ada|EN|Leave the girl. She's lost no matter what.  
./Data\ada\wavs\ada_11.wav|ada|EN|You walk away now, and who knows?  
./Data\ada\wavs\ada_12.wav|ada|EN|Maybe you'll live to meet me again.  
./Data\ada\wavs\ada_13.wav|ada|EN|And I might get you that greeting you were looking for.  
./Data\ada\wavs\ada_14.wav|ada|EN|How about we continue this discussion another time?  
./Data\ada\wavs\ada_15.wav|ada|EN|Sorry, nothing yet.  
./Data\ada\wavs\ada_16.wav|ada|EN|But my little helper is creating  
./Data\ada\wavs\ada_17.wav|ada|EN|Quite the commotion.  
./Data\ada\wavs\ada_18.wav|ada|EN|Everything will work out just fine.  
./Data\ada\wavs\ada_19.wav|ada|EN|He's a good boy. Predictable.  
./Data\ada\wavs\ada_2.wav|ada|EN|The deal was, we get you out of here when you deliver the amber. No amber, no protection, Louise.  
./Data\ada\wavs\ada_20.wav|ada|EN|Nothing personal, Leon.  
./Data\ada\wavs\ada_21.wav|ada|EN|Louise and I had an arrangement.  
./Data\ada\wavs\ada_22.wav|ada|EN|Don't worry, I'll take good care of it.  
./Data\ada\wavs\ada_23.wav|ada|EN|Just one question.  
./Data\ada\wavs\ada_24.wav|ada|EN|What are you planning to do with this?  
./Data\ada\wavs\ada_25.wav|ada|EN|So, we're talking millions of casualties?  
./Data\ada\wavs\ada_26.wav|ada|EN|We're changing course. Now.  
./Data\ada\wavs\ada_3.wav|ada|EN|You can stop right there, Leon.  
./Data\ada\wavs\ada_4.wav|ada|EN|wouldn't make me use this.  
./Data\ada\wavs\ada_5.wav|ada|EN|Would you? You don't seem surprised.  
./Data\ada\wavs\ada_6.wav|ada|EN|Interesting.  
./Data\ada\wavs\ada_7.wav|ada|EN|Not a bad move  
./Data\ada\wavs\ada_8.wav|ada|EN|Very smooth. Ah, Leon.  
./Data\ada\wavs\ada_9.wav|ada|EN|You know I don't work and tell.

这里一共27条切片语音,对应27个转写文本,注意语言是英语。

音频重新采样

对素材音频进行重新采样的操作:

#@title 重新采样  
!python3 resample.py --sr 44100 --in_dir ./Data/ada/raw/ --out_dir ./Data/ada/wavs/

预处理标签文件

接着处理转写文件,生成训练集和验证集:

#@title 预处理标签文件  
!python3 preprocess_text.py --transcription-path ./Data/ada/esd.list --t

程序返回:

pytorch_model.bin: 100% 1.32G/1.32G [00:10<00:00, 122MB/s]   
spm.model: 100% 2.46M/2.46M [00:00<00:00, 115MB/s]  
The cache for model files in Transformers v4.22.0 has been updated. Migrating your old cache. This is a one-time only operation. You can interrupt this and resume the migration later on by calling `transformers.utils.move_cache()`.  
0it [00:00, ?it/s]  
[nltk_data] Downloading package averaged_perceptron_tagger to  
[nltk_data]     /root/nltk_data...  
[nltk_data]   Unzipping taggers/averaged_perceptron_tagger.zip.  
[nltk_data] Downloading package cmudict to /root/nltk_data...  
[nltk_data]   Unzipping corpora/cmudict.zip.  
100% 27/27 [00:00<00:00, 4457.63it/s]  
总重复音频数:0,总未找到的音频数:0  
训练集和验证集生成完成!

生成 BERT 特征文件

最后生成bert特征文件:

#@title 生成 BERT 特征文件  
!python3 bert_gen.py --config-path ./Data/ada/configs/config.json

对应27个素材:

100% 27/27 [00:33<00:00,  1.25s/it]  
bert生成完毕!, 共有27个bert.pt生成!

模型训练

万事俱备,开始训练:

#@title 开始训练  
!python3 train_ms.py

模型会在models目录生成,项目默认设置了训练间隔是50步,可以根据自己的需求修改config.json配置文件。

模型推理

一般情况下,训练了50步或者100步左右,可以推理一下查看效果,然后继续训练:

#@title 开始推理  
!python3 webui.py

返回:

| numexpr.utils | INFO | NumExpr defaulting to 2 threads.  
/usr/local/lib/python3.10/dist-packages/torch/nn/utils/weight_norm.py:30: UserWarning: torch.nn.utils.weight_norm is deprecated in favor of torch.nn.utils.parametrizations.weight_norm.  warnings.warn("torch.nn.utils.weight_norm is deprecated in favor of torch.nn.utils.parametrizations.weight_norm.")  
| utils | INFO | Loaded checkpoint 'Data/ada/models/G_150.pth' (iteration 25)  
推理页面已开启!  
Running on local URL:  http://127.0.0.1:7860  
Running on public URL: https://814833a6f477ba151c.gradio.live

点击第二个公网地址进行推理即可。

结语

至此,我们已经完成了基于JupyterNoteBook的数据切分、转写、预处理、训练以及推理流程。最后奉上线上GoogleColab,以飨众乡亲:

https://colab.research.google.com/drive/1-H1DGG5dTy8u_8vFbq1HACXPX9AAM76s?usp=sharing

相关文章:

Bert-vits2最终版Bert-vits2-2.3云端训练和推理(Colab免费GPU算力平台)

对于深度学习初学者来说&#xff0c;JupyterNoteBook的脚本运行形式显然更加友好&#xff0c;依托Python语言的跨平台特性&#xff0c;JupyterNoteBook既可以在本地线下环境运行&#xff0c;也可以在线上服务器上运行。GoogleColab作为免费GPU算力平台的执牛耳者&#xff0c;更…...

Asp .Net Web应用程序(.Net Framework4.8)网站发布到IIS

开启IIS 如果已开启跳过这步 打开控制面板-程序 打开IIS 发布Web程序&#xff08;.Net Framework 4.8 web网页&#xff09; 进入IIS管理器新建一个应用池 新建一个网站 网站创建完毕 为文件夹添加访问权限 如果不添加访问权限&#xff0c;运行时将会得到如下错误 设置权限 勾…...

vue element plus Typography 排版

我们对字体进行统一规范&#xff0c;力求在各个操作系统下都有最佳展示效果。 字体# 字号# LevelFont SizeDemoSupplementary text12px Extra SmallBuild with ElementBody (small)13px SmallBuild with ElementBody14px BaseBuild with ElementSmall Title16px MediumBuild w…...

理论U3 决策树

文章目录 一、决策树算法1、基本思想2、构成1&#xff09;节点3&#xff09;有向边/分支 3、分类步骤1&#xff09;第1步-决策树生成/学习、训练2&#xff09;第2步-分类/测试 4、算法关键 二、信息论基础1、概念2、信息量3、信息熵&#xff1a; 二、ID3 (Iterative Dichotomis…...

Redis 常用操作

一、Redis常用的5种数据类型 字符串&#xff08;String&#xff09;&#xff1a;最基本的数据类型&#xff0c;可以存储字符串、整数或浮点数。哈希&#xff08;Hash&#xff09;&#xff1a;键值对的集合&#xff0c;可以在一个哈希数据结构中存储多个字段和值。列表&#xf…...

c# 使用Null合并操作符例子

在这个示例中&#xff0c;我们定义了两个字符串变量 name 和 defaultName。变量 name 被赋值为 null&#xff0c;而变量 defaultName 被赋值为 “John Doe”。 接下来&#xff0c;我们使用 Null 合并操作符 ?? 来获取一个非空值。如果 name 不为 null&#xff0c;则 result 的…...

【Docker】docker部署conda并激活环境

原文作者&#xff1a;我辈李想 版权声明&#xff1a;文章原创&#xff0c;转载时请务必加上原文超链接、作者信息和本声明。 文章目录 前言一、新建dockerfile文件二、使用build创建镜像1.报错&#xff1a;Your shell has not been properly configured to use conda activate.…...

HarmonyOS@Link装饰器:父子双向同步

Link装饰器&#xff1a;父子双向同步 子组件中被Link装饰的变量与其父组件中对应的数据源建立双向数据绑定。 说明 从API version 9开始&#xff0c;该装饰器支持在ArkTS卡片中使用。 概述 Link装饰的变量与其父组件中的数据源共享相同的值。 装饰器使用规则说明 Link变…...

【idea】idea插件编写教程,博主原创idea插件 欢迎下载

前言&#xff1a;经常使用Objects.equals(a,b)方法的同学 应该或多或少都会因为粗心而传错参&#xff0c; 例如日常开发中 我们使用Objects.equals去比较 status(入参)&#xff0c;statusEnum(枚举), 很容易忘记statusEnum.getCode() 或 statusEnum.getVaule() &#xff0c;再比…...

深入理解 Hadoop (四)HDFS源码剖析

HDFS 集群启动脚本 start-dfs.sh 分析 启动 HDFS 集群总共会涉及到的角色会有 namenode, datanode, zkfc, journalnode, secondaryName 共五种角色。 JournalNode 核心工作和启动流程源码剖析 // 启动 JournalNode 的核心业务方法 public void start() throws IOException …...

【Vue3+React18+TS4】1-1 : 课程介绍与学习指南

本书目录&#xff1a;点击进入 一、为什么做这样一门课程? 二、本门课的亮点有哪些? 2.1、轻松驾驭 2.2、体系系统 2.3、高效快捷 2.4、融合贯通 三、课程内容包括哪些? 四、项目实战 《在线考勤系统》 五、课适合哪些同学? 一、为什么做这样一门课程? 近十年内前端…...

Nacos与Eureka的区别详解

Nacos与Eureka的区别详解 在微服务架构中,服务注册与发现是核心组件之一,它们允许服务实例在启动时自动注册,并且能被其他服务发现,从而实现服务之间的互相通信。Nacos和Eureka都是现代微服务体系中广泛使用的服务注册与发现工具。本文将深入分析二者的区别,并为您提供一…...

【算法刷题】Day28

文章目录 1. 买卖股票的最佳时机 III题干&#xff1a;算法原理&#xff1a;1. 状态表示&#xff1a;2. 状态转移方程3. 初始化4. 填表顺序5. 返回值 代码&#xff1a; 2. Z 字形变换题干&#xff1a;算法原理&#xff1a;1. 模拟2. 找规律 代码&#xff1a; 1. 买卖股票的最佳时…...

深入了解pnpm:一种高效的包管理工具

✨专栏介绍 在当今数字化时代&#xff0c;Web应用程序已经成为了人们生活和工作中不可或缺的一部分。而要构建出令人印象深刻且功能强大的Web应用程序&#xff0c;就需要掌握一系列前端技术。前端技术涵盖了HTML、CSS和JavaScript等核心技术&#xff0c;以及各种框架、库和工具…...

QEMU源码全解析 —— PCI设备模拟(1)

接前一篇文章&#xff1a; 1. PCI设备简介 PCI是用来连接外设的一种局部&#xff08;local&#xff09;总线&#xff0c;其主要功能是连接外部设备。PCI总线规范在20世纪90年代提出以后&#xff0c;其逐渐取代了其它各种总线&#xff0c;被各种处理器所支持。直到现在&#xf…...

Vue-10、Vue键盘事件

1、vue中常见的按键别名 回车 ---------enter <!DOCTYPE html> <html lang"en"> <head><meta charset"UTF-8"><title>键盘事件</title><!--引入vue--><script type"text/javascript" src"h…...

胡圆圆的暑期实习经验分享

背景 实验室一般是在研究生二年级的时候会放实习&#xff0c;在以后的日子就是自己完成毕业工作要求&#xff0c;基本上不再涉及实验室的活了&#xff0c;目前是一月份也是开始准备暑期实习的好时间。实验室每年这个时候都会有学长学姐组织暑期实习经验分享&#xff0c;本着不…...

基于uniapp封装的table组件

数据格式 tableData: [{elcInfo: [{tableData:[1,293021.1,293021.1,293021.1,293021.1,]}]},{elcInfo: [{tableData:[1,293021.1,293021.1,293021.1,293021.1,]}]},{elcInfo: [{tableData:[1,293021.1,293021.1,293021.1,293021.1,]}]},/* {title: "2",elcInfo: [{…...

Git删除远程仓库某次提交记录后的所有提交

1、鼠标右键->git bash here&#xff0c;然后cd切换到代码目录&#xff1b; 2、git log查看提交记录&#xff0c;获取commit id 3、git reset commit id&#xff08;commit id指要保留的最新的提交记录id&#xff09; 4、git push --force&#xff0c;强制push 如果出现…...

强化学习10——免模型控制Q-learning算法

Q-learning算法 主要思路 由于 V π ( s ) ∑ a ∈ A π ( a ∣ s ) Q π ( s , a ) V_\pi(s)\sum_{a\in A}\pi(a\mid s)Q_\pi(s,a) Vπ​(s)∑a∈A​π(a∣s)Qπ​(s,a) &#xff0c;当我们直接预测动作价值函数&#xff0c;在决策中选择Q值最大即动作价值最大的动作&…...

前端倒计时误差!

提示:记录工作中遇到的需求及解决办法 文章目录 前言一、误差从何而来?二、五大解决方案1. 动态校准法(基础版)2. Web Worker 计时3. 服务器时间同步4. Performance API 高精度计时5. 页面可见性API优化三、生产环境最佳实践四、终极解决方案架构前言 前几天听说公司某个项…...

深入浅出:JavaScript 中的 `window.crypto.getRandomValues()` 方法

深入浅出&#xff1a;JavaScript 中的 window.crypto.getRandomValues() 方法 在现代 Web 开发中&#xff0c;随机数的生成看似简单&#xff0c;却隐藏着许多玄机。无论是生成密码、加密密钥&#xff0c;还是创建安全令牌&#xff0c;随机数的质量直接关系到系统的安全性。Jav…...

大语言模型如何处理长文本?常用文本分割技术详解

为什么需要文本分割? 引言:为什么需要文本分割?一、基础文本分割方法1. 按段落分割(Paragraph Splitting)2. 按句子分割(Sentence Splitting)二、高级文本分割策略3. 重叠分割(Sliding Window)4. 递归分割(Recursive Splitting)三、生产级工具推荐5. 使用LangChain的…...

在 Nginx Stream 层“改写”MQTT ngx_stream_mqtt_filter_module

1、为什么要修改 CONNECT 报文&#xff1f; 多租户隔离&#xff1a;自动为接入设备追加租户前缀&#xff0c;后端按 ClientID 拆分队列。零代码鉴权&#xff1a;将入站用户名替换为 OAuth Access-Token&#xff0c;后端 Broker 统一校验。灰度发布&#xff1a;根据 IP/地理位写…...

Axios请求超时重发机制

Axios 超时重新请求实现方案 在 Axios 中实现超时重新请求可以通过以下几种方式&#xff1a; 1. 使用拦截器实现自动重试 import axios from axios;// 创建axios实例 const instance axios.create();// 设置超时时间 instance.defaults.timeout 5000;// 最大重试次数 cons…...

【Java_EE】Spring MVC

目录 Spring Web MVC ​编辑注解 RestController RequestMapping RequestParam RequestParam RequestBody PathVariable RequestPart 参数传递 注意事项 ​编辑参数重命名 RequestParam ​编辑​编辑传递集合 RequestParam 传递JSON数据 ​编辑RequestBody ​…...

Java线上CPU飙高问题排查全指南

一、引言 在Java应用的线上运行环境中&#xff0c;CPU飙高是一个常见且棘手的性能问题。当系统出现CPU飙高时&#xff0c;通常会导致应用响应缓慢&#xff0c;甚至服务不可用&#xff0c;严重影响用户体验和业务运行。因此&#xff0c;掌握一套科学有效的CPU飙高问题排查方法&…...

中医有效性探讨

文章目录 西医是如何发展到以生物化学为药理基础的现代医学&#xff1f;传统医学奠基期&#xff08;远古 - 17 世纪&#xff09;近代医学转型期&#xff08;17 世纪 - 19 世纪末&#xff09;​现代医学成熟期&#xff08;20世纪至今&#xff09; 中医的源远流长和一脉相承远古至…...

return this;返回的是谁

一个审批系统的示例来演示责任链模式的实现。假设公司需要处理不同金额的采购申请&#xff0c;不同级别的经理有不同的审批权限&#xff1a; // 抽象处理者&#xff1a;审批者 abstract class Approver {protected Approver successor; // 下一个处理者// 设置下一个处理者pub…...

安全突围:重塑内生安全体系:齐向东在2025年BCS大会的演讲

文章目录 前言第一部分&#xff1a;体系力量是突围之钥第一重困境是体系思想落地不畅。第二重困境是大小体系融合瓶颈。第三重困境是“小体系”运营梗阻。 第二部分&#xff1a;体系矛盾是突围之障一是数据孤岛的障碍。二是投入不足的障碍。三是新旧兼容难的障碍。 第三部分&am…...