【MySQL基礎篇】:MySQL常用內置函數以及實用示例

?感謝您閱讀本篇文章,文章內容是個人學習筆記的整理,如果哪里有誤的話還請您指正噢?
? 個人主頁:余輝zmh–CSDN博客
? 文章所屬專欄:MySQL篇–CSDN博客

在這里插入圖片描述

文章目錄

  • 內置函數
    • 一.日期函數
    • 二.字符串函數
    • 三.數學函數
    • 四.其他函數

內置函數

一.日期函數

1.相關函數

  • current_date():當前日期,年-月-日
mysql> SELECT current_date();
+----------------+
| current_date() |
+----------------+
| 2025-07-31     |
+----------------+
1 row in set (0.00 sec)
  • current_time():當前時間,時-分-秒
mysql> SELECT current_time();
+----------------+
| current_time() |
+----------------+
| 17:52:46       |
+----------------+
1 row in set (0.00 sec)
  • current_timestamp():當前時間戳,年-月-日 時-分-秒
mysql> SELECT current_timestamp();
+---------------------+
| current_timestamp() |
+---------------------+
| 2025-07-31 17:53:11 |
+---------------------+
1 row in set (0.00 sec)
  • date(datetime):返回datemtime類型參數的日期部分
mysql> SELECT date('1945-10-01 10:00:00');
+-----------------------------+
| date('1945-10-01 10:00:00') |
+-----------------------------+
| 1945-10-01                  |
+-----------------------------+
1 row in set (0.00 sec)
  • now():當前日期時間
mysql> SELECT now();
+---------------------+
| now()               |
+---------------------+
| 2025-07-31 17:56:58 |
+---------------------+
1 row in set (0.00 sec)
  • date_add(date, interval d_value_type)

在日期date的基礎上添加日期或時間,interval后的數值單位可以是年,日,分,秒;

-- 當前日期加上10天
mysql> SELECT date_add(now(), interval 10 day);
+----------------------------------+
| date_add(now(), interval 10 day) |
+----------------------------------+
| 2025-08-10 17:55:38              |
+----------------------------------+
1 row in set (0.00 sec)-- 當前日期加上10分鐘
mysql> SELECT date_add(now(), interval 10 minute);
+-------------------------------------+
| date_add(now(), interval 10 minute) |
+-------------------------------------+
| 2025-07-31 18:06:16                 |
+-------------------------------------+
1 row in set (0.00 sec)
  • date_sub(date, interval d_value_type)

在日期date的基礎上減去日期或時間,interval后的數值單位可以是年,日,分,秒;

-- 當前日期減去1年
mysql> SELECT date_sub(now(), interval 1 year);
+----------------------------------+
| date_sub(now(), interval 1 year) |
+----------------------------------+
| 2024-07-31 17:58:07              |
+----------------------------------+
1 row in set (0.00 sec)-- 當前日期減去10秒
mysql> SELECT date_sub(now(), interval 10 second);
+-------------------------------------+
| date_sub(now(), interval 10 second) |
+-------------------------------------+
| 2025-07-31 17:58:53                 |
+-------------------------------------+
1 row in set (0.00 sec)
  • datediff(date1, date2):兩個日期相差多少天date1-dat2
mysql> SELECT datediff(now(), '1945-10-01');
+-------------------------------+
| datediff(now(), '1945-10-01') |
+-------------------------------+
|                         29158 |
+-------------------------------+
1 row in set (0.00 sec)mysql> SELECT datediff('1945-10-01', now());
+-------------------------------+
| datediff('1945-10-01', now()) |
+-------------------------------+
|                        -29158 |
+-------------------------------+
1 row in set (0.00 sec)

2.示例

  • 創建一個留言表
mysql> CREATE TABLE msg(-> id int unsigned PRIMARY KEY AUTO_INCREMENT,-> message varchar(100) NOT NULL,-> sendtime datetime NOT NULL-> );
Query OK, 0 rows affected (0.05 sec)
  • 插入測試數據
mysql> INSERT INTO msg (message, sendtime) values -> ('你好', now()),-> ('你也好', now());
Query OK, 2 rows affected (0.01 sec)
Records: 2  Duplicates: 0  Warnings: 0mysql> INSERT INTO msg(message, sendtime) values ('你是誰', now());
Query OK, 1 row affected (0.01 sec)mysql> SELECT * FROM msg;
+----+-----------+---------------------+
| id | message   | sendtime            |
+----+-----------+---------------------+
|  1 | 你好      | 2025-07-31 18:19:59 |
|  2 | 你也好    | 2025-07-31 18:19:59 |
|  3 | 你是誰    | 2025-07-31 18:25:43 |
+----+-----------+---------------------+
3 rows in set (0.00 sec)
  • 顯示所有留言信息,發布日期只顯示日期,不用顯示時間
mysql> SELECT id, message, date(sendtime) FROM msg;
+----+-----------+----------------+
| id | message   | date(sendtime) |
+----+-----------+----------------+
|  1 | 你好      | 2025-07-31     |
|  2 | 你也好    | 2025-07-31     |
|  3 | 你是誰    | 2025-07-31     |
+----+-----------+----------------+
3 rows in set (0.00 sec)
  • 查詢五分鐘內發布的貼子
-- 當前時間減去五分后后要小于發布的時間
mysql> SELECT * FROM msg WHERE date_sub(now(), interval 5 minute) < sendtime;
+----+-----------+---------------------+
| id | message   | sendtime            |
+----+-----------+---------------------+
|  3 | 你是誰    | 2025-07-31 18:25:43 |
+----+-----------+---------------------+
1 row in set (0.00 sec)-- 當前發布的時間加上五分鐘后要大于當前時間
mysql> SELECT * FROM msg WHERE date_add(sendtime, interval 5 minute) > now();
+----+-----------+---------------------+
| id | message   | sendtime            |
+----+-----------+---------------------+
|  3 | 你是誰    | 2025-07-31 18:25:43 |
+----+-----------+---------------------+
1 row in set (0.00 sec)

二.字符串函數

  • charset(str):返回字符串字符集
mysql> SELECT charset('abcd');
+-----------------+
| charset('abcd') |
+-----------------+
| utf8mb4         |
+-----------------+
1 row in set (0.00 sec)
  • concat(string1, string2, ...):連接字符集
mysql> SELECT concat('a', 'b', 'c', 1, 2);
+-----------------------------+
| concat('a', 'b', 'c', 1, 2) |
+-----------------------------+
| abc12                       |
+-----------------------------+
1 row in set (0.00 sec)
  • instr(string, substring):返回substringstring中出現的位置,沒有返回0
mysql> SELECT instr('abcdefg123', 'def');
+----------------------------+
| instr('abcdefg123', 'def') |
+----------------------------+
|                          4 |
+----------------------------+
1 row in set (0.00 sec)mysql> SELECT instr('abcdefg123', 'zmh');
+----------------------------+
| instr('abcdefg123', 'zmh') |
+----------------------------+
|                          0 |
+----------------------------+
1 row in set (0.00 sec)
  • ucase(string):轉為成大寫
mysql> SELECT ucase('abcdABCD123');
+----------------------+
| ucase('abcdABCD123') |
+----------------------+
| ABCDABCD123          |
+----------------------+
1 row in set (0.01 sec)
  • lcase(string):轉換成小寫
mysql> SELECT lcase('abcdABCD123');
+----------------------+
| lcase('abcdABCD123') |
+----------------------+
| abcdabcd123          |
+----------------------+
1 row in set (0.01 sec)
  • left(string, length):從字符串的左邊起取length個字符
mysql> SELECT left('abcdefg', 4);
+--------------------+
| left('abcdefg', 4) |
+--------------------+
| abcd               |
+--------------------+
1 row in set (0.00 sec)
  • length(string):字符串的長度
mysql> SELECT length('abcdefg');
+-------------------+
| length('abcdefg') |
+-------------------+
|                 7 |
+-------------------+
1 row in set (0.00 sec)
  • replace(str, search_str, replace_str):在str中用replace_str替換search_str字符
mysql> SELECT replace('abcdabcdabcd', 'a', 'A');
+-----------------------------------+
| replace('abcdabcdabcd', 'a', 'A') |
+-----------------------------------+
| AbcdAbcdAbcd                      |
+-----------------------------------+
1 row in set (0.00 sec)
  • strcmp(string1, string2):逐字符比較兩個字符串的大小
mysql> SELECT strcmp('abcd', 'abcd');
+------------------------+
| strcmp('abcd', 'abcd') |
+------------------------+
|                      0 |
+------------------------+
1 row in set (0.01 sec)mysql> SELECT strcmp('abcd', 'a');
+---------------------+
| strcmp('abcd', 'a') |
+---------------------+
|                   1 |
+---------------------+
1 row in set (0.00 sec)
  • substring(str, position, length):從strposition位置開始取length個字符
mysql> SELECT substring('abcdefg', 2, 3);
+----------------------------+
| substring('abcdefg', 2, 3) |
+----------------------------+
| bcd                        |
+----------------------------+
1 row in set (0.00 sec)mysql> SELECT substring('abcdefg', 3);
+-------------------------+
| substring('abcdefg', 3) |
+-------------------------+
| cdefg                   |
+-------------------------+
1 row in set (0.01 sec)
  • ltrim(string) rtrim(string) trim(string):去除前空格或后空格
-- 測試字符串 左邊3個空格+hello+中間兩個空格+world+右邊3個空格 = 18
mysql> SELECT ltrim('   hello  world   ');
+-----------------------------+
| ltrim('   hello  world   ') |
+-----------------------------+
| hello  world                |
+-----------------------------+
1 row in set (0.00 sec)
-- 去除左邊3個長度變為15
mysql> SELECT length(ltrim('   hello  world   '));
+-------------------------------------+
| length(ltrim('   hello  world   ')) |
+-------------------------------------+
|                                  15 |
+-------------------------------------+
1 row in set (0.00 sec)-- 去除右邊的,但是這里效果不明顯(可能是因為 MySQL 命令行工具輸出表格時自動補齊的,不是字符串本身的內容。)
mysql> SELECT rtrim('   hello  world   ');
+-----------------------------+
| rtrim('   hello  world   ') |
+-----------------------------+
|    hello  world             |
+-----------------------------+
1 row in set (0.00 sec)
-- 打印長度,也是變為15
mysql> SELECT length(rtrim('   hello  world   '));
+-------------------------------------+
| length(rtrim('   hello  world   ')) |
+-------------------------------------+
|                                  15 |
+-------------------------------------+
1 row in set (0.00 sec)-- 兩邊都去除,但效果也不明顯
mysql> SELECT trim('   hello  world   ');
+----------------------------+
| trim('   hello  world   ') |
+----------------------------+
| hello  world               |
+----------------------------+
1 row in set (0.00 sec)
-- 打印長度,變為12
mysql> SELECT length(trim('   hello  world   '));
+------------------------------------+
| length(trim('   hello  world   ')) |
+------------------------------------+
|                                 12 |
+------------------------------------+
1 row in set (0.00 sec)

三.數學函數

  • abs(number):絕對值函數
mysql> SELECT abs(-100);
+-----------+
| abs(-100) |
+-----------+
|       100 |
+-----------+
1 row in set (0.00 sec)mysql> SELECT abs(100);
+----------+
| abs(100) |
+----------+
|      100 |
+----------+
1 row in set (0.01 sec)
  • bin(decimal_number):十進制轉換為二進制
mysql> SELECT bin(10);
+---------+
| bin(10) |
+---------+
| 1010    |
+---------+
1 row in set (0.00 sec)
  • hex(number):十進制轉為十六進制
mysql> SELECT hex(10);
+---------+
| hex(10) |
+---------+
| A       |
+---------+
1 row in set (0.01 sec)
  • conv(number, from_base, to_base):進制轉換
-- 10從十進制轉換為二進制
mysql> SELECT conv(10, 10, 2);
+-----------------+
| conv(10, 10, 2) |
+-----------------+
| 1010            |
+-----------------+
1 row in set (0.00 sec)-- 10從十進制轉換為十六進制
mysql> SELECT conv(10, 10, 16);
+------------------+
| conv(10, 10, 16) |
+------------------+
| A                |
+------------------+
1 row in set (0.00 sec)
  • ceiling(number):向上取整
mysql> SELECT ceiling(3.1);
+--------------+
| ceiling(3.1) |
+--------------+
|            4 |
+--------------+
1 row in set (0.01 sec)mysql> SELECT ceiling(3.9);
+--------------+
| ceiling(3.9) |
+--------------+
|            4 |
+--------------+
1 row in set (0.00 sec)mysql> SELECT ceiling(-3.1);
+---------------+
| ceiling(-3.1) |
+---------------+
|            -3 |
+---------------+
1 row in set (0.01 sec)mysql> SELECT ceiling(-3.9);
+---------------+
| ceiling(-3.9) |
+---------------+
|            -3 |
+---------------+
1 row in set (0.00 sec)
  • floor(number):向下取整
mysql> SELECT floor(3.1);
+------------+
| floor(3.1) |
+------------+
|          3 |
+------------+
1 row in set (0.00 sec)mysql> SELECT floor(3.9);
+------------+
| floor(3.9) |
+------------+
|          3 |
+------------+
1 row in set (0.00 sec)mysql> SELECT floor(-3.1);
+-------------+
| floor(-3.1) |
+-------------+
|          -4 |
+-------------+
1 row in set (0.00 sec)mysql> SELECT floor(-3.9);
+-------------+
| floor(-3.9) |
+-------------+
|          -4 |
+-------------+
1 row in set (0.00 sec)
  • format(number, decimal_places):格式化,保留小數位數
mysql> SELECT format(3.1415926, 2);
+----------------------+
| format(3.1415926, 2) |
+----------------------+
| 3.14                 |
+----------------------+
1 row in set (0.01 sec)mysql> SELECT format(3.1415926, 3);
+----------------------+
| format(3.1415926, 3) |
+----------------------+
| 3.142                |
+----------------------+
1 row in set (0.00 sec)mysql> SELECT format(3.1415926, 4);
+----------------------+
| format(3.1415926, 4) |
+----------------------+
| 3.1416               |
+----------------------+
1 row in set (0.00 sec)
  • rand():返回隨機浮點數,范圍[0.0-1.0]
mysql> SELECT rand();
+---------------------+
| rand()              |
+---------------------+
| 0.03627621851514673 |
+---------------------+
1 row in set (0.01 sec)mysql> SELECT rand()*1000;
+-------------------+
| rand()*1000       |
+-------------------+
| 478.7169121938915 |
+-------------------+
1 row in set (0.00 sec)mysql> SELECT format(rand()*1000, 4);
+------------------------+
| format(rand()*1000, 4) |
+------------------------+
| 284.7559               |
+------------------------+
1 row in set (0.00 sec)
  • mod(number, denominator):取模,求余
mysql> SELECT mod(10, 3);
+------------+
| mod(10, 3) |
+------------+
|          1 |
+------------+
1 row in set (0.01 sec)mysql> SELECT mod(10, -3);
+-------------+
| mod(10, -3) |
+-------------+
|           1 |
+-------------+
1 row in set (0.00 sec)mysql> SELECT mod(-10, -3);
+--------------+
| mod(-10, -3) |
+--------------+
|           -1 |
+--------------+
1 row in set (0.00 sec)mysql> SELECT mod(-10, 3);
+-------------+
| mod(-10, 3) |
+-------------+
|          -1 |
+-------------+
1 row in set (0.00 sec)

四.其他函數

  • user():查詢當前用戶
mysql> SELECT user();
+-----------------+
| user()          |
+-----------------+
| zmh_1@localhost |
+-----------------+
1 row in set (0.00 sec)
  • md5(str):對一個字符串進行md5摘要,摘要后得到一個32位字符串
mysql> SELECT md5('abcdefg');
+----------------------------------+
| md5('abcdefg')                   |
+----------------------------------+
| 7ac66c0f148de9519b8bd264312c4d64 |
+----------------------------------+
1 row in set (0.00 sec)mysql> SELECT md5('a');
+----------------------------------+
| md5('a')                         |
+----------------------------------+
| 0cc175b9c0f1b6a831c399e269772661 |
+----------------------------------+
1 row in set (0.00 sec)
  • database():顯示當前正在使用的是哪個數據庫
mysql> SELECT database();
+------------+
| database() |
+------------+
| test1      |
+------------+
1 row in set (0.00 sec)
  • password():MySQL數據庫使用該函數對用戶加密

但是這個函數在新版本 MySQL 已經不能用了,所以這里也沒辦法做演示,就了解一下吧。

  • ifnull(val1, val2):如果val1為空,返回val2,否則返回val1
mysql> SELECT ifnull(NULL, 100);
+-------------------+
| ifnull(NULL, 100) |
+-------------------+
|               100 |
+-------------------+
1 row in set (0.00 sec)mysql> SELECT ifnull(200, 100);
+------------------+
| ifnull(200, 100) |
+------------------+
|              200 |
+------------------+
1 row in set (0.00 sec)-- 只考慮第一個值是否為空,不考慮第二個值
mysql> SELECT ifnull(200, NULL);
+-------------------+
| ifnull(200, NULL) |
+-------------------+
|               200 |
+-------------------+
1 row in set (0.00 sec)

以上就是關于MySQL常用內置函數的講解,如果哪里有錯的話,可以在評論區指正,也歡迎大家一起討論學習,如果對你的學習有幫助的話,點點贊關注支持一下吧!!!

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/bicheng/92341.shtml
繁體地址,請注明出處:http://hk.pswp.cn/bicheng/92341.shtml
英文地址,請注明出處:http://en.pswp.cn/bicheng/92341.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

Mirror學習筆記

Mirror官方案例操作 一、導入Mirror 在unity商城訂閱Mirror https://assetstore.unity.com/packages/tools/network/mirror-129321 使用unity創建工程 &#xff08;推薦版本&#xff1a;目前建議使用 Unity 2020 或 2021 LTS 版本&#xff1b;超出這些版本的可能可以運行…

R4周打卡——Pytorch實現 LSTM火災預測

&#x1f368; 本文為&#x1f517;365天深度學習訓練營 中的學習記錄博客&#x1f356; 原作者&#xff1a;K同學啊 一、準備工作 1.1導入數據 1.2數據集可視化 二、構建數據集 2.1數據集預處理 2.2設置X、Y 2.3檢查數據集中有沒有空值 2.4劃分數據集 三、構建模型 3.1定義訓…

【視覺識別】Ubuntu 22.04 上編譯安裝OPENCV 4.12.0 魯班貓V5

系列文章目錄 提示&#xff1a;這里可以添加系列文章的所有文章的目錄&#xff0c;目錄需要自己手動添加 例如&#xff1a;第一章 Python 機器學習入門之pandas的使用 提示&#xff1a;寫完文章后&#xff0c;目錄可以自動生成&#xff0c;如何生成可參考右邊的幫助文檔 文章目…

基于vue的財務管理系統/基于php的財務管理系統

基于vue的財務管理系統/基于php的財務管理系統

機器學習技術在訂單簿大單檢測中的應用研究

訂單簿數據的特點 訂單簿&#xff08;Order Book&#xff09;是記錄市場上所有未成交買賣訂單的數據結構&#xff0c;通常包括價格、數量、買賣方向等信息。訂單簿數據具有以下特點&#xff1a; 高頻率&#xff1a;訂單簿數據更新速度極快&#xff0c;通常以毫秒甚至微秒為單位…

Spring MVC框架中DispatcherServlet詳解

1. DispatcherServlet概述1.1 什么是DispatcherServlet&#xff1f;DispatcherServlet是Spring MVC框架的核心組件&#xff0c;它本質上是一個Java Servlet&#xff0c;作為前端控制器(Front Controller)負責接收所有HTTP請求&#xff0c;并根據特定規則將請求分發到相應的處理…

DBA急救手冊:拆解Oracle死鎖圖,ORA-00060錯誤秒級定位終極指南

關于“死鎖圖”&#xff08;Deadlock Graph&#xff09;的一點淺見 當 Oracle 檢測到死鎖時&#xff0c;檢測到死鎖的會話中的當前 SQL 將被取消&#xff0c;并執行“語句級回滾”&#xff0c;以釋放資源并避免阻塞所有活動。 檢測到死鎖的會話仍然“存活”&#xff0c;并且事務…

C++中的默認函數學習

今天在學習QT別人的項目時看到有個函數在聲明和調用時參數個數不一樣&#xff0c;查了下是c中的一種函數類型&#xff0c;這個類型的函數可以讓代碼更簡潔、靈活。定義&#xff1a;在函數聲明時&#xff0c;給某些參數預先設定一個默認值。調用函數時&#xff0c;如果省略這些參…

HBase分片技術實現

HBase分片技術實現概述HBase是基于Hadoop的分布式、可擴展的NoSQL數據庫&#xff0c;采用列族存儲模型。HBase的分片機制通過Region自動分割和負載均衡實現水平擴展&#xff0c;支持PB級數據存儲和高并發訪問。HBase架構核心組件HMaster: 集群管理節點&#xff0c;負責Region分…

Python爬蟲實戰:研究awesome-python工具,構建技術資源采集系統

1. 引言 1.1 研究背景 Python 憑借語法簡潔、生態豐富等特點,已成為全球最受歡迎的編程語言之一。截至 2024 年,PyPI(Python Package Index)上的第三方庫數量已突破 45 萬個,涵蓋從基礎工具到前沿技術的全領域需求。然而,海量資源也帶來了 "信息過載" 問題 —…

【實時Linux實戰系列】實時視頻監控系統的開發

隨著技術的不斷發展&#xff0c;實時視頻監控系統在安防、交通管理、工業自動化等領域得到了廣泛應用。實時Linux系統因其高效的實時性和穩定性&#xff0c;成為開發高性能視頻監控系統的理想選擇。掌握基于實時Linux的視頻監控系統開發技能&#xff0c;對于開發者來說不僅能夠…

力扣-11.盛最多水的容器

題目鏈接 11.盛最多水的容器 class Solution {public int maxArea(int[] height) {int res 0;for (int i 0, j height.length - 1; i < j; ) {res Math.max(res, Math.min(height[i], height[j]) * (j - i));if (height[i] < height[j]) {i;} else {j--;}}return r…

大型音頻語言模型論文總結

大型音頻語言模型&#xff08;Large Audio Language Model, LALM&#xff09;是一類基于深度學習的智能系統&#xff0c;專門針對音頻信號&#xff08;如語音、音樂、環境聲等&#xff09;進行理解、生成、轉換和推理。它借鑒了大型語言模型&#xff08;LLM&#xff09;的“預訓…

如何解決網頁視頻課程進度條禁止拖動?

function skip() {let video document.getElementsByTagName(video)for (let i0; i<video.length; i) {video[i].currentTime video[i].duration} } setInterval(skip,6666)無法拖動視頻進度。 使用F12啟動調試模式。 function skip() {let video document.getElements…

基于deepSeek的流式數據自動化規則清洗案例【數據治理領域AI帶來的改變】

隨著AI大模型的大量普及&#xff0c;對于傳統代碼模式產生了不小的影響&#xff0c;特別是對于大數據領域&#xff0c;傳統的規則引擎驅動的數據治理已經無法滿足數據增長帶來的治理需求。因此主動型治理手段逐漸成為主流&#xff0c;因此本文介紹一個基于deepSeek的流式數據自…

【論文分析】【Agent】SEW: Self-Evolving Agentic Workflows for Automated Code Generatio

1.論文信息標題&#xff1a;SEW: Self-Evolving Agentic Workflows for Automated Code Generatio&#xff1a;用于自動代碼生成的自我進化的代理工作流程收錄的會議/期刊&#xff1a;作者信息&#xff1a;arxiv&#xff1a;&#x1f517;github網站&#xff1a;&#x1f517;g…

MCP 協議:AI 時代的 “萬能轉接頭”,從 “手動粘貼” 到 “萬能接口”:MCP 協議如何重構 AI 工具調用規則?

注&#xff1a;此文章內容均節選自充電了么創始人&#xff0c;CEO兼CTO陳敬雷老師的新書《GPT多模態大模型與AI Agent智能體》&#xff08;跟我一起學人工智能&#xff09;【陳敬雷編著】【清華大學出版社】 清華《GPT多模態大模型與AI Agent智能體》書籍配套視頻課程【陳敬雷…

VUE本地構建生產環境版本用于局域網訪問

&#x1f680;構建生產環境版本用于局域網訪問&#xff08;適用于 Vue 項目&#xff09; 在開發 Vue 項目的過程中&#xff0c;很多人使用 yarn serve 啟動開發服務器進行調試。但開發模式存在以下問題&#xff1a; 訪問速度慢&#xff0c;特別是局域網訪問&#xff1b;熱更新頻…

【密碼學】5. 公鑰密碼

這里寫自定義目錄標題公鑰密碼密碼學中的常用數學知識群、環、域素數和互素數模運算模指數運算費爾馬定理、歐拉定理、卡米歇爾定理素性檢驗歐幾里得算法中國剩余定理&#xff08;CRT&#xff09;離散對數二次剩余循環群循環群的選取雙線性映射計算復雜性公鑰密碼體制的基本概念…

VINS-Fusion+UWB輔助算法高精度實現

VINS-FusionUWB輔助算法高精度實現 摘要 本文詳細介紹了基于VINS-Fusion框架結合UWB輔助的高精度定位算法實現。通過將視覺慣性里程計(VIO)與超寬帶(UWB)測距技術融合&#xff0c;顯著提高了復雜環境下的定位精度和魯棒性。本文首先分析了VINS-Fusion和UWB各自的技術特點&#…