MySQL connection close 后, mysql server上的行为是什么
本文着重讲述的是通过 msql client 连接到 mysql server ,发起 update 、 select 操作(由于数据量非常大,所以 update、select 操作都很耗时,即在结果返回前我们有足够的时间执行一些操作) 。
在客户端分别尝试执行
- ctrl C 结束
- 关闭 mysql client 窗口
- kill -9 mysql client 进程,当然这需要在另一个窗口进行
然后登陆 mysql server 执行 show processlist 和 select * from INNODB_TRX 看现象
用户发起update:
用户 ctrl C 或关闭 mysql client 窗口,mysql server 上的行为是一样的,就是update 事务会立刻会滚,唯一的小区别是 show processlist 的结果:ctrl C 结束的话,show proceslist 中连接还在;关闭 mysql client 窗口的话,连接不存在了
mysql client
mysql> use robertdb;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -ADatabase changed
mysql>
mysql> select count(*) from bigtable;
+----------+
| count(*) |
+----------+
| 10485760 |
+----------+
1 row in set (2.45 sec)
mysql>
mysql> update bigtable set name = concat(name, "a") ;
^C^C -- query aborted
ERROR 1317 (70100): Query execution was interrupted
mysql>
mysql server
- 用户发起 update 操作后, 登录 server 执行 show processlist 和 INNODB_TRX
mysql> show processlist;
+-----+--------+-----------------------+--------------------+---------+------+----------+----------------------------------------------+
| Id | User | Host | db | Command | Time | State | Info |
+-----+--------+-----------------------+--------------------+---------+------+----------+----------------------------------------------+
| 172 | root | localhost | information_schema | Query | 0 | starting | show processlist |
| 175 | robert | 111.202.148.190:20580 | robertdb | Query | 20 | updating | update bigtable set name = concat(name, "a") |
+-----+--------+-----------------------+--------------------+---------+------+----------+----------------------------------------------+
2 rows in set (0.00 sec)
mysql>
mysql> select * from INNODB_TRX \G
*************************** 1. row ***************************trx_id: 48631trx_state: RUNNINGtrx_started: 2025-05-27 13:48:30trx_requested_lock_id: NULLtrx_wait_started: NULLtrx_weight: 1698104trx_mysql_thread_id: 175trx_query: update bigtable set name = concat(name, "a")trx_operation_state: fetching rowstrx_tables_in_use: 1trx_tables_locked: 1trx_lock_structs: 13326trx_lock_memory_bytes: 1499344trx_rows_locked: 1696898trx_rows_modified: 1684778trx_concurrency_tickets: 0trx_isolation_level: REPEATABLE READtrx_unique_checks: 1trx_foreign_key_checks: 1
trx_last_foreign_key_error: NULLtrx_adaptive_hash_latched: 0trx_adaptive_hash_timeout: 0trx_is_read_only: 0
trx_autocommit_non_locking: 0
1 row in set (0.00 sec)
mysql>
2.用户执行 ctrl C 后,登录server 执行show processlist 和 INNODB_TRX: state 从 updating 变为了 query end
mysql> show processlist;
+-----+--------+-----------------------+--------------------+---------+------+-----------+----------------------------------------------+
| Id | User | Host | db | Command | Time | State | Info |
+-----+--------+-----------------------+--------------------+---------+------+-----------+----------------------------------------------+
| 172 | root | localhost | information_schema | Query | 0 | starting | show processlist |
| 175 | robert | 111.202.148.190:20580 | robertdb | Query | 36 | query end | update bigtable set name = concat(name, "a") |
+-----+--------+-----------------------+--------------------+---------+------+-----------+----------------------------------------------+
2 rows in set (0.00 sec)
mysql>
mysql> select * from INNODB_TRX \G
*************************** 1. row ***************************trx_id: 48631trx_state: ROLLING BACKtrx_started: 2025-05-27 13:48:30trx_requested_lock_id: NULLtrx_wait_started: NULLtrx_weight: 684362trx_mysql_thread_id: 175trx_query: update bigtable set name = concat(name, "a")trx_operation_state: rollbacktrx_tables_in_use: 1trx_tables_locked: 1trx_lock_structs: 20191trx_lock_memory_bytes: 2269392trx_rows_locked: 2337715trx_rows_modified: 664171trx_concurrency_tickets: 0trx_isolation_level: REPEATABLE READtrx_unique_checks: 1trx_foreign_key_checks: 1
trx_last_foreign_key_error: NULLtrx_adaptive_hash_latched: 0trx_adaptive_hash_timeout: 0trx_is_read_only: 0
trx_autocommit_non_locking: 0
1 row in set (0.00 sec)mysql>
3.等回滚完后, 执行 show processlist 和 INNODB_TRX, Command 从 Query 变为了 Sleep , Time 继续累加
mysql> show processlist;
+-----+--------+-----------------------+--------------------+---------+------+-----------+----------------------------------------------+
| Id | User | Host | db | Command | Time | State | Info |
+-----+--------+-----------------------+--------------------+---------+------+-----------+----------------------------------------------+
| 172 | root | localhost | information_schema | Query | 0 | starting | show processlist |
| 175 | robert | 111.202.148.190:20580 | robertdb | Query | 41 | query end | update bigtable set name = concat(name, "a") |
+-----+--------+-----------------------+--------------------+---------+------+-----------+----------------------------------------------+
2 rows in set (0.00 sec)
mysql>
mysql> show processlist;
+-----+--------+-----------------------+--------------------+---------+------+----------+------------------+
| Id | User | Host | db | Command | Time | State | Info |
+-----+--------+-----------------------+--------------------+---------+------+----------+------------------+
| 172 | root | localhost | information_schema | Query | 0 | starting | show processlist |
| 175 | robert | 111.202.148.190:20580 | robertdb | Sleep | 45 | | NULL |
+-----+--------+-----------------------+--------------------+---------+------+----------+------------------+
2 rows in set (0.00 sec)
mysql>
mysql> select * from INNODB_TRX;
Empty set (0.00 sec)
mysql>
mysql>
用户在shell控制台执行 kill -9 mysqlclient 进程号, 登陆server 查看:发现最终事物会被执行完并提交
mysql client
mysql> use robertdb;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -ADatabase changed
mysql>
mysql> select count(*) from bigtable;
+----------+
| count(*) |
+----------+
| 10485760 |
+----------+
1 row in set (2.45 sec)
mysql>
mysql> update bigtable set name=concat(name, "a") ;
[1] 3029 killed mysql -h116.196.83.235 -p3306 -urobert -pxxx
➜ ~
mysql server:
mysql> select * from bigtable limit 5;
+----+----------------------+------+--------------------+
| id | name | age | email |
+----+----------------------+------+--------------------+
| 1 | Jone1829488e9aaa | 38 | test1@baomidou.com |
| 2 | Jackb6d920e9d2 | 39 | test2@baomidou.com |
| 3 | Tomc9e5955e81 | 40 | test3@baomidou.com |
| 4 | Sandy8220152054 | 41 | test4@baomidou.com |
| 5 | Billie4de56f25ac | 40 | test5@baomidou.com |
+----+----------------------+------+--------------------+
10 rows in set (0.00 sec)
mysql>
mysql>
mysql> show processlist;
+-----+--------+-----------------------+--------------------+---------+------+----------+--------------------------------------------+
| Id | User | Host | db | Command | Time | State | Info |
+-----+--------+-----------------------+--------------------+---------+------+----------+--------------------------------------------+
| 180 | root | localhost | information_schema | Query | 0 | starting | show processlist |
| 194 | robert | 111.202.148.190:21030 | robertdb | Query | 83 | updating | update bigtable set name=concat(name, "a") |
+-----+--------+-----------------------+--------------------+---------+------+----------+--------------------------------------------+
2 rows in set (0.00 sec)
mysql>
mysql>
mysql> select * from INNODB_TRX \G
*************************** 1. row ***************************trx_id: 48643trx_state: RUNNINGtrx_started: 2025-05-27 14:30:13trx_requested_lock_id: NULLtrx_wait_started: NULLtrx_weight: 7711233trx_mysql_thread_id: 194trx_query: update bigtable set name=concat(name, "a")trx_operation_state: updating or deletingtrx_tables_in_use: 1trx_tables_locked: 1trx_lock_structs: 94482trx_lock_memory_bytes: 10395856trx_rows_locked: 7671547trx_rows_modified: 7616751trx_concurrency_tickets: 0trx_isolation_level: REPEATABLE READtrx_unique_checks: 1trx_foreign_key_checks: 1
trx_last_foreign_key_error: NULLtrx_adaptive_hash_latched: 0trx_adaptive_hash_timeout: 0trx_is_read_only: 0
trx_autocommit_non_locking: 0
1 row in set (0.01 sec)
mysql>
mysql>
mysql> 随着时间推移发现 update 执行完毕了,事务也提交了
mysql>
mysql>
mysql> show processlist;
+-----+------+-----------+----------+---------+------+----------+------------------+
| Id | User | Host | db | Command | Time | State | Info |
+-----+------+-----------+----------+---------+------+----------+------------------+
| 180 | root | localhost | robertdb | Query | 0 | starting | show processlist |
+-----+------+-----------+----------+---------+------+----------+------------------+
1 row in set (0.00 sec)
mysql>
mysql> select * from information_schema.INNODB_TRX \G
Empty set (0.00 sec)
mysql>
mysql> select * from bigtable limit 5;
+----+-----------------------+------+--------------------+
| id | name | age | email |
+----+-----------------------+------+--------------------+
| 1 | Jone1829488e9aaaa | 38 | test1@baomidou.com |
| 2 | Jackb6d920e9d2a | 39 | test2@baomidou.com |
| 3 | Tomc9e5955e81a | 40 | test3@baomidou.com |
| 4 | Sandy8220152054a | 41 | test4@baomidou.com |
| 5 | Billie4de56f25aca | 40 | test5@baomidou.com |
+----+-----------------------+------+--------------------+
5 rows in set (0.00 sec)
mysql>
用户发起 select:
用户 ctrl C 或关闭 mysql client 窗口,mysql server 上的行为是一样的,就是update 事务会立刻会滚,唯一的小区别是 show processlist 的结果:ctrl C 结束的话,show proceslist 中连接还在;关闭 mysql client 窗口的话,连接不存在了
mysql client:
mysql> select count(*) from bigtable;
+----------+
| count(*) |
+----------+
| 10485760 |
+----------+
1 row in set (2.45 sec)
mysql>
mysql> select count(*) from (select distinct(name) from bigtable) as a;
^C^C -- query aborted
ERROR 1317 (70100): Query execution was interrupted
mysql>
mysql>
mysql server:
1.用户发起 select 操作后, 登录 server 执行 show processlist 和 INNODB_TRX
mysql> show processlist;
+-----+--------+-----------------------+----------+---------+------+--------------+------------------------------------------------------------------+
| Id | User | Host | db | Command | Time | State | Info |
+-----+--------+-----------------------+----------+---------+------+--------------+------------------------------------------------------------------+
| 215 | root | localhost | NULL | Query | 0 | starting | show processlist |
| 218 | robert | 111.202.148.190:21049 | robertdb | Query | 7 | Sending data | select count(*) from (select distinct(name) from bigtable) as a |
+-----+--------+-----------------------+----------+---------+------+--------------+------------------------------------------------------------------+
2 rows in set (0.00 sec)mysql> select * from information_schema.INNODB_TRX \G
*************************** 1. row ***************************trx_id: 421631104673616trx_state: RUNNINGtrx_started: 2025-05-27 17:07:36trx_requested_lock_id: NULLtrx_wait_started: NULLtrx_weight: 0trx_mysql_thread_id: 218trx_query: select count(*) from (select distinct(name) from bigtable) as atrx_operation_state: NULLtrx_tables_in_use: 1trx_tables_locked: 0trx_lock_structs: 0trx_lock_memory_bytes: 1136trx_rows_locked: 0trx_rows_modified: 0trx_concurrency_tickets: 0trx_isolation_level: REPEATABLE READtrx_unique_checks: 1trx_foreign_key_checks: 1
trx_last_foreign_key_error: NULLtrx_adaptive_hash_latched: 0trx_adaptive_hash_timeout: 0trx_is_read_only: 1
trx_autocommit_non_locking: 1
1 row in set (0.00 sec)mysql>
2.用户执行 ctrl C 后,登录server 执行show processlist 和 INNODB_TRX: Command 从 Query 变成了 Sleep,也就是说 select 立刻不执行了
mysql>
mysql> show processlist;
+-----+--------+-----------------------+----------+---------+------+----------+------------------+
| Id | User | Host | db | Command | Time | State | Info |
+-----+--------+-----------------------+----------+---------+------+----------+------------------+
| 215 | root | localhost | NULL | Query | 0 | starting | show processlist |
| 218 | robert | 111.202.148.190:21049 | robertdb | Sleep | 13 | | NULL |
+-----+--------+-----------------------+----------+---------+------+----------+------------------+
2 rows in set (0.00 sec)mysql> select * from information_schema.INNODB_TRX \G
Empty set (0.00 sec)mysql>
用户在shell控制台执行 kill -9 mysqlclient 进程号, 登陆server 查看:发现select SQL 语句还会继续执行,直到执行完毕
mysqlclient
mysql> select count(*) from bigtable;+----------+| count(*) |+----------+| 10485760 |+----------+1 row in set (2.45 sec)mysql>
mysql> select count(*) from (select distinct(name) from bigtable) as a;
[1] 15935 killed mysql -h116.196.83.235 -p3306 -urobert -pxxx
➜ ~
mysql server
1.用户发起 select 操作后, 登录 server 执行 show processlist 和 INNODB_TRX
mysql> show processlist;
+-----+--------+-----------------------+----------+---------+------+--------------+------------------------------------------------------------------+
| Id | User | Host | db | Command | Time | State | Info |
+-----+--------+-----------------------+----------+---------+------+--------------+------------------------------------------------------------------+
| 215 | root | localhost | NULL | Query | 0 | starting | show processlist |
| 218 | robert | 111.202.148.190:21049 | robertdb | Query | 17 | Sending data | select count(*) from (select distinct(name) from bigtable) as a |
+-----+--------+-----------------------+----------+---------+------+--------------+------------------------------------------------------------------+
2 rows in set (0.00 sec)mysql> select * from information_schema.INNODB_TRX \G
*************************** 1. row ***************************trx_id: 421631104673616trx_state: RUNNINGtrx_started: 2025-05-27 17:18:15trx_requested_lock_id: NULLtrx_wait_started: NULLtrx_weight: 0trx_mysql_thread_id: 218trx_query: select count(*) from (select distinct(name) from bigtable) as atrx_operation_state: NULLtrx_tables_in_use: 1trx_tables_locked: 0trx_lock_structs: 0trx_lock_memory_bytes: 1136trx_rows_locked: 0trx_rows_modified: 0trx_concurrency_tickets: 0trx_isolation_level: REPEATABLE READtrx_unique_checks: 1trx_foreign_key_checks: 1
trx_last_foreign_key_error: NULLtrx_adaptive_hash_latched: 0trx_adaptive_hash_timeout: 0trx_is_read_only: 1
trx_autocommit_non_locking: 1
1 row in set (0.00 sec)mysql>
2.用户在shell控制台执行 kill -9 mysqlclient 进程号, 登陆server 查看: 发现 SQL 还在继续执行
mysql> show processlist;
+-----+--------+-----------------------+----------+---------+------+--------------+------------------------------------------------------------------+
| Id | User | Host | db | Command | Time | State | Info |
+-----+--------+-----------------------+----------+---------+------+--------------+------------------------------------------------------------------+
| 215 | root | localhost | NULL | Query | 0 | starting | show processlist |
| 218 | robert | 111.202.148.190:21049 | robertdb | Query | 89 | Sending data | select count(*) from (select distinct(name) from bigtable) as a |
+-----+--------+-----------------------+----------+---------+------+--------------+------------------------------------------------------------------+
2 rows in set (0.00 sec)mysql> select * from information_schema.INNODB_TRX \G
*************************** 1. row ***************************trx_id: 421631104673616trx_state: RUNNINGtrx_started: 2025-05-27 17:18:15trx_requested_lock_id: NULLtrx_wait_started: NULLtrx_weight: 0trx_mysql_thread_id: 218trx_query: select count(*) from (select distinct(name) from bigtable) as atrx_operation_state: NULLtrx_tables_in_use: 1trx_tables_locked: 0trx_lock_structs: 0trx_lock_memory_bytes: 1136trx_rows_locked: 0trx_rows_modified: 0trx_concurrency_tickets: 0trx_isolation_level: REPEATABLE READtrx_unique_checks: 1trx_foreign_key_checks: 1
trx_last_foreign_key_error: NULLtrx_adaptive_hash_latched: 0trx_adaptive_hash_timeout: 0trx_is_read_only: 1
trx_autocommit_non_locking: 1
1 row in set (0.00 sec)
mysql>
mysql>
mysql> 随着时间推移,直到 select SQL 执行完毕
mysql>
mysql>
mysql> show processlist;
+-----+------+-----------+------+---------+------+----------+------------------+
| Id | User | Host | db | Command | Time | State | Info |
+-----+------+-----------+------+---------+------+----------+------------------+
| 215 | root | localhost | NULL | Query | 0 | starting | show processlist |
+-----+------+-----------+------+---------+------+----------+------------------+
1 row in set (0.00 sec)mysql> select * from information_schema.INNODB_TRX \G
Empty set (0.01 sec)mysql>
结论:
对于mysql client 的 ctrl C 结束 或 关闭 mysql client 窗口, mysql server 会立刻感知到这个行为,从而对 update SQL进行回滚、对 select SQL立刻就不执行了;
但是对于 kill -9 mysqclient 进程,mysql server会继续执行正在执行的SQL,对 update SQL 会继续执行直到提交 、对 select SQL会继续执行直到结束。
相关文章:
MySQL connection close 后, mysql server上的行为是什么
本文着重讲述的是通过 msql client 连接到 mysql server ,发起 update 、 select 操作(由于数据量非常大,所以 update、select 操作都很耗时,即在结果返回前我们有足够的时间执行一些操作) 。 在客户端分别尝试执行 ctrl C 结束关闭 mysql c…...

RabbitMQ vs MQTT:深入比较与最新发展
RabbitMQ vs MQTT:深入比较与最新发展 引言 在消息队列和物联网(IoT)通信领域,RabbitMQ 和 MQTT 是两种备受瞩目的技术,各自针对不同的需求和场景提供了强大的解决方案。随着 2025 年的到来,这两项技术都…...

金砖国家人工智能高级别论坛在巴西召开,华院计算应邀出席并发表主题演讲
当地时间5月20日,由中华人民共和国工业和信息化部,巴西发展、工业、贸易与服务部,巴西公共服务管理和创新部以及巴西科技创新部联合举办的金砖国家人工智能高级别论坛,在巴西首都巴西利亚举行。 中华人民共和国工业和信息化部副部…...

【KWDB 创作者计划】_再热垃圾发电汽轮机仿真与监控系统:KaiwuDB 批量插入10万条数据性能优化实践
再热垃圾发电汽轮机仿真与监控系统:KaiwuDB 批量插入10万条数据性能优化实践 我是一台N25-3.82/390型汽轮机,心脏在5500转/分的轰鸣中跳动。垃圾焚烧炉是我的胃,将人类遗弃的残渣转化为金色蒸汽,沿管道涌入我的胸腔。 清晨&#x…...
CentOS 7 安装docker缺少slirp4netnsy依赖解决方案
CentOS 7安装docker缺少slirp4netnsy依赖解决方案 Error: Package: docker-ce-rootless-extras-26.1.4-1.el7.x86_64 (docker-ce-stable) Requires: slirp4netns > 0.4 Error: Package: docker-ce-rootless-extras-26.1.4-1.el7.x86_64 (docker-ce-stable) 解决方案 若wge…...

Android第十一次面试多线程篇
面试官: “你在项目里用过Handler吗?能说说它是怎么工作的吗?” 候选人: “当然用过!比如之前做下载功能时,需要在后台线程下载文件,然后在主线程更新进度条。这时候就得用Handler来切…...

安全,稳定可靠的政企即时通讯数字化平台
在当今数字化时代,政企机构面临着复杂多变的业务需求和日益增长的沟通协作挑战。BeeWorks作为一款安全,稳定可靠的政企即时通讯数字化平台,凭借其安全可靠、功能强大的特性,为政企提供了高效、便捷的沟通协作解决方案,…...
craw4ai 抓取实时信息,与 mt4外行行情结合实时交易,基本面来觉得趋势方向,搞一个外汇交易策略
结合实时信息抓取、MT4行情数据、基本面分析的外汇交易策略框架,旨在通过多维度数据融合提升交易决策质量:行不行不知道先试试,理论是对的,只要基本面方向没错 策略名称:Tri-Sync 外汇交易系统 核心理念 「基本面定方…...
Linux之守护进程
在Linux系统中,进程一般分为前台进程、后台进程和守护进程3类。 一 守护进程 定义: 1.守护进程是在操作系统后台运行的一种特殊类型的进程,它独立于前台用户界面,不与任何终端设备直接关联。这些进程通常在系统启动时启动,并持…...

LiquiGen流体导入UE
导出ABC 导出贴图 ABC导入Houdini UE安装SideFX_Labs插件 C:\Users\Star\Documents\houdini20.5\SideFXLabs\unreal\5.5 参考: LiquiGenHoudiniUE血液流程_哔哩哔哩_bilibili...
使用react进行用户管理系统
今天通了一遍使用react进行用户管理系统的文档,以及跟随步骤实现了一遍,我大概梳理一下实现思路。 首先我们构建基本用户管理应用,需要数据库存储个人资料,我们先去supabase注册然后创建自己的数据库然后设置密码,然后…...
SpringBoot的java应用中,慢sql会导致CPU暴增吗
是的,在 Spring Boot 的 Java 应用中,慢 SQL 同样可能导致 CPU 暴增。虽然数据库服务器的 CPU 通常是主要压力点,但应用服务器(Java 进程)的 CPU 也可能间接受到影响,具体原因和机制如下: 1. 数…...

Ubuntu下编译mininim游戏全攻略
目录 一、安装mininim 软件所依赖的库(重点是allegro游戏引擎库)二、编译mininim 软件三、将mininim打包给另一个Ubuntu系统使用四、安卓手机运行mininim 一、安装mininim 软件所依赖的库(重点是allegro游戏引擎库) 1. 用apt-get…...

uniapp uni-id Error: Invalid password secret
common文件夹下uni-config-center文件夹下新建uni-id,新建config.json文件 复制粘贴以下代码,不要自己改,格式容易错 {"passwordSecret": [{"type": "hmac-sha256","version": 1}], "passwordStrength&qu…...
用 Appuploader,让 iOS 上架流程真正“可交接、可记录、可复用”:我们是这样实现的
你可能听说过这样一类人:上线必找他,证书只有他有,Transporter 密码在他电脑上,描述文件什么时候过期,只有他知道。 如果你团队里有这样一位“发布大师”,他可能是个英雄——但也是个单点风险源。 我们团…...

第十二节:第三部分:集合框架:List系列集合:特点、方法、遍历方式、ArrayList集合的底层原理
List系列集合特点 List集合的特有方法 List集合支持的遍历方式 ArrayList集合的底层原理 ArrayList集合适合的应用场景 代码:List系列集合遍历方式 package com.itheima.day19_Collection_List;import java.util.ArrayList; import java.util.Iterator; import jav…...

【办公类-18-07】20250527屈光检查PDF文件拆分成多个pdf(两页一份,用幼儿班级姓名命名文件)
背景需求: 今天春游,上海海昌公园。路上保健老师收到前几天幼儿的屈光视力检查单PDF。 她说:所有孩子的通知都做在一个PDF里,我没法单独发给班主任。你有什么办法拆开来? 我说:“没问题,问deep…...

AI Agent的“搜索大脑“进化史:从Google API到智能搜索生态的技术变革
AI Agent搜索革命的时代背景 2025年agent速度发展之快似乎正在验证"2025年是agent元年"的说法,而作为agent最主要的应用工具之一(另外一个是coding),搜索工具也正在呈现快速的发展趋势。Google在2024年12月推出Gemini Deep Research࿰…...

Arduino学习-跑马灯
1、效果 2、代码 /**** 2025-5-30 跑马灯的小程序 */ //时间间隔 int intervaltime200; //初始化函数 void setup() {// put your setup code here, to run once://设置第3-第7个引脚为输出模式for(int i3;i<8;i){pinMode(i,OUTPUT);} }//循环执行 void loop() {// put you…...
python创建args命令行分析
这段代码是一个使用 Python 的 argparse 模块创建命令行界面的示例。它定义了一系列的命令行参数和子命令,通常用于构建和管理软件项目或版本控制系统中的操作。以下是对代码的逐行分析: 1初始化 ArgumentParser parser argparse.ArgumentParser(forma…...

2. 手写数字预测 gui版
2. 手写数字预测 gui版 背景1.界面绘制2.处理图片3. 加载模型4. 预测5.结果6.一点小问题 背景 做了手写数字预测的模型,但是老是跑模型太无聊了,就配合pyqt做了一个可视化界面出来玩一下 源代码可以去这里https://github.com/Leezed525/pytorch_toy拿 …...
js数据类型有哪些?它们有什么区别?
js数据类型共有8种,分别是undefined,null,boolean,number,string,Object,symbol,bigint symbol和bigint是es6中提出来的数据类型 symbol创建后独一无二不可变的数据类型,它主要是为了解决出现全局变量冲突的问题 bigint 是一种数字类型的数据,它可以表示任意精度格式的整数,…...
大模型应用开发第五讲:成熟度模型:从ChatGPT(L2)到未来自主Agent(L4)
大模型应用开发第五讲:成熟度模型:从ChatGPT(L2)到未来自主Agent(L4) 资料取自《大模型应用开发:动手做AI Agent 》。 查看总目录:学习大纲 关于DeepSeek本地部署指南可以看下我之…...

特别篇-产品经理(三)
一、市场与竞品分析—竞品分析 1. 课后总结 案例框架:通过"小新吃蛋糕"案例展示行业分析方法,包含四个关键步骤: 明确目标行业调研确定竞品分析竞争策略输出结论 1)行业背景分析方法 PEST分析法:从四个…...
IP地址扫描 网络状态监测 企业网络管理 免安装,企业级 IP 监控防未授权接入
各位网络小卫士们!今天咱来聊聊一款超厉害的局域网IP地址扫描工具——IPScaner V1.22。这玩意儿就像网络世界的大侦探,能快速识别网络里设备的状态和资源分布。下面咱就好好唠唠它的那些事儿。 软件获取夸克网盘下载 先说说它的核心功能。第一个是IP…...

【unity游戏开发——编辑器扩展】AssetDatabase公共类在编辑器环境中管理和操作项目中的资源
注意:考虑到编辑器扩展的内容比较多,我将编辑器扩展的内容分开,并全部整合放在【unity游戏开发——编辑器扩展】专栏里,感兴趣的小伙伴可以前往逐一查看学习。 文章目录 前言一、AssetDatabase常用API1、创建资源1.1 API1.2 示例 …...

BLE协议全景图:从0开始理解低功耗蓝牙
BLE(Bluetooth Low Energy)作为一种针对低功耗场景优化的通信协议,已经广泛应用于智能穿戴、工业追踪、智能家居、医疗设备等领域。 本文是《BLE 协议实战详解》系列的第一篇,将从 BLE 的发展历史、协议栈结构、核心机制和应用领域出发,为后续工程实战打下全面认知基础。 …...

【机器学习基础】机器学习入门核心算法:GBDT(Gradient Boosting Decision Tree)
机器学习入门核心算法:GBDT(Gradient Boosting Decision Tree) 1. 算法逻辑2. 算法原理与数学推导2.1 目标函数2.2 负梯度计算2.3 决策树拟合2.4 叶子权重计算2.5 模型更新 3. 模型评估评估指标防止过拟合 4. 应用案例4.1 金融风控4.2 推荐系…...

基于开源AI大模型AI智能名片S2B2C商城小程序源码的销售环节数字化实现路径研究
摘要:在数字化浪潮下,企业销售环节的转型升级已成为提升竞争力的核心命题。本文基于清华大学全球产业研究院《中国企业数字化转型研究报告(2020)》提出的“提升销售率与利润率、打通客户数据、强化营销协同、构建全景用户画像、助…...

Spring Cache核心原理与快速入门指南
文章目录 前言一、Spring Cache核心原理1.1 架构设计思想1.2 运行时执行流程1.3 核心组件协作1.4 关键机制详解1.5 扩展点设计1.6 与Spring事务的协同 二、快速入门实战三、局限性3.1 多级缓存一致性缺陷3.2 分布式锁能力缺失3.3 事务集成陷阱 总结 前言 在当今高并发、低延迟…...