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

Redis JSON介绍和命令大全

Redis JSON介绍和命令大全

  • Redis JSON
    • 先说说`JSON`是什么
    • 再说说`JSON Path`
      • 先推荐两个网站
      • `JSONPath JAVA clents`
    • `Redis JSON` 安装
    • 内存
    • json命令语法
      • 命令url
      • 命令解释
          • `JSON.ARRAPPEND`
          • `JSON.ARRINDEX`
          • `JSON.ARRINSERT`
          • `JSON.ARRLEN`
          • `JSON.ARRPOP`
          • `JSON.ARRTRIM`
          • `JSON.CLEAR`
          • `JSON.DEBUG MEMORY`
          • `JSON.DEBUG`
          • `JSON.DEL`
          • `JSON.FORGET`
          • `JSON.GET`
          • `JSON.MERGE`
          • `JSON.MGET`
          • `JSON.MSET`
          • `JSON.NUMINCRBY`
          • `JSON.OBJKEYS`
          • `JSON.OBJLEN`
          • `JSON.SET`
          • `JSON.STRAPPEND`
          • `JSON.STRLEN`
          • `JSON.TOGGLE`
          • `JSON.TYPE`
    • `redis json`的`clients`
    • `redis json`的使用场景 https://redis.io/docs/latest/develop/data-types/json/use_cases/

Redis JSON

redis在6.x开始支持json
注意:json可以说是在http接口返回值的网红,之所以说是网红,是因为之前不是json,之后当然也就未可知也。
注意我上面只说了在http接口返回值的场景。实际上在内部的rpc调用,也有用json传输的,不过这比较小众。
更多使用在存储数据场景下,也是泛滥的场景,如mysql、es、mongodb、redis中,json似乎包罗万象了。
⚠️注意!这不是好事,灵活性的提升必定伴随着其他如规范性、稳定性等问题的到来,
如果还没有到来,那肯定是时间还不够长、业务还没有增长。

redis官网介绍 https://redis.io/docs/latest/develop/data-types/json/

先说说JSON是什么

JSON 指的是 JavaScript 对象表示法(JavaScript Object Notation)

再说说JSON Path

JSONPath是一种用于从JSON文档中提取信息的查询语言,类似于XML的XPath。

先推荐两个网站

JsonPath语法 https://goessner.net/articles/JsonPath/
JsonPath在线 https://jsonpath.com/
在这里插入图片描述
在这里插入图片描述

在这里插入图片描述

JSONPath JAVA clents

<dependency><groupId>com.jayway.jsonpath</groupId><artifactId>json-path</artifactId><version>2.7.0</version> <!-- 请检查是否有更新的版本 -->
</dependency>

Redis JSON 安装

  1. 使用redis-stack
    docker run -it --name redis-stack -p 6379:6379 redis/redis-stack:latest
  2. 使用redis 6.x及以上,配置loadMoudle
    本文使用redis-stack,如下图,可以看到启动的时候自动加载了json模块,
    除此之外还有timeseries、search等模块

在这里插入图片描述

内存

官网内存 https://redis.io/docs/latest/develop/data-types/json/ram/
在这里插入图片描述
可以看到json的内存还是挺恐怖的,哈哈哈,用不上还是用string吧…
keyvalue都占用内存

json命令语法

json命令大全 https://redis.io/docs/latest/commands/?group=json
在这里插入图片描述

命令url

indexcommandurl
0JSON.ARRAPPENDhttps://redis.io/docs/latest/commands/json.arrappend/
1JSON.ARRINDEXhttps://redis.io/docs/latest/commands/json.arrindex/
2JSON.ARRINSERThttps://redis.io/docs/latest/commands/json.arrinsert/
3JSON.ARRLENhttps://redis.io/docs/latest/commands/json.arrlen/
4JSON.ARRPOPhttps://redis.io/docs/latest/commands/json.arrpop/
5JSON.ARRTRIMhttps://redis.io/docs/latest/commands/json.arrtrim/
6JSON.CLEARhttps://redis.io/docs/latest/commands/json.clear/
7JSON.DEBUGhttps://redis.io/docs/latest/commands/json.debug/
8JSON.DEBUG MEMORYhttps://redis.io/docs/latest/commands/json.debug-memory/
9JSON.DELhttps://redis.io/docs/latest/commands/json.del/
10JSON.FORGEThttps://redis.io/docs/latest/commands/json.forget/
11JSON.GEThttps://redis.io/docs/latest/commands/json.get/
12JSON.MERGEhttps://redis.io/docs/latest/commands/json.merge/
13JSON.MGEThttps://redis.io/docs/latest/commands/json.mget/
14JSON.MSEThttps://redis.io/docs/latest/commands/json.mset/
15JSON.NUMINCRBYhttps://redis.io/docs/latest/commands/json.numincrby/
16JSON.NUMMULTBYhttps://redis.io/docs/latest/commands/json.nummultby/
17JSON.OBJKEYShttps://redis.io/docs/latest/commands/json.objkeys/
18JSON.OBJLENhttps://redis.io/docs/latest/commands/json.objlen/
19JSON.RESPhttps://redis.io/docs/latest/commands/json.resp/
20JSON.SEThttps://redis.io/docs/latest/commands/json.set/
21JSON.STRAPPENDhttps://redis.io/docs/latest/commands/json.strappend/
22JSON.STRLENhttps://redis.io/docs/latest/commands/json.strlen/
23JSON.TOGGLEhttps://redis.io/docs/latest/commands/json.toggle/
24JSON.TYPEhttps://redis.io/docs/latest/commands/json.type/

命令解释

JSON.ARRAPPEND
commandJSON.ARRAPPEND
syntaxJSON.ARRAPPEND key [path] value [value ...]
description

Append the json values into the array at path after the last element in it

time complexityO(1) when path is evaluated to a single value, O(N) when path is evaluated to multiple values, where N is the size of the key
available inRedis Stack / JSON 1.0.0
urlhttps://redis.io/docs/latest/commands/json.arrappend/
JSON.ARRINDEX
commandJSON.ARRINDEX
syntaxJSON.ARRINDEX key path value [start [stop]]
description

Search for the first occurrence of a JSON value in an array

time complexityO(N) when path is evaluated to a single value where N is the size of the array, O(N) when path is evaluated to multiple values, where N is the size of the key
available inRedis Stack / JSON 1.0.0
urlhttps://redis.io/docs/latest/commands/json.arrindex/
JSON.ARRINSERT
commandJSON.ARRINSERT
syntaxJSON.ARRINSERT key path index value [value ...]
description

Insert the json values into the array at path before the index (shifts to the right)

time complexityO(N) when path is evaluated to a single value where N is the size of the array, O(N) when path is evaluated to multiple values, where N is the size of the key
available inRedis Stack / JSON 1.0.0
urlhttps://redis.io/docs/latest/commands/json.arrinsert/
JSON.ARRLEN
commandJSON.ARRLEN
syntaxJSON.ARRLEN key [path]
description

Report the length of the JSON array at path in key

time complexityO(1) where path is evaluated to a single value, O(N) where path is evaluated to multiple values, where N is the size of the key
available inRedis Stack / JSON 1.0.0
urlhttps://redis.io/docs/latest/commands/json.arrlen/
JSON.ARRPOP
commandJSON.ARRPOP
syntaxJSON.ARRPOP key [path [index]]
description

Remove and return an element from the index in the array

time complexityO(N) when path is evaluated to a single value where N is the size of the array and the specified index is not the last element, O(1) when path is evaluated to a single value and the specified index is the last element, or O(N) when path is evaluated to multiple values, where N is the size of the key
available inRedis Stack / JSON 1.0.0
urlhttps://redis.io/docs/latest/commands/json.arrpop/
JSON.ARRTRIM
commandJSON.ARRTRIM
syntaxJSON.ARRTRIM key path start stop
description

Trim an array so that it contains only the specified inclusive range of elements

time complexityO(N) when path is evaluated to a single value where N is the size of the array, O(N) when path is evaluated to multiple values, where N is the size of the key
available inRedis Stack / JSON 1.0.0
urlhttps://redis.io/docs/latest/commands/json.arrtrim/
JSON.CLEAR
commandJSON.CLEAR
syntaxJSON.CLEAR key [path]
description

Clear container values (arrays/objects) and set numeric values to 0

time complexityO(N) when path is evaluated to a single value where N is the size of the values, O(N) when path is evaluated to multiple values, where N is the size of the key
available inRedis Stack / JSON 2.0.0
urlhttps://redis.io/docs/latest/commands/json.clear/
JSON.DEBUG MEMORY
commandJSON.DEBUG MEMORY
syntaxJSON.DEBUG MEMORY key [path]
description

Report a value’s memory usage in bytes

time complexityO(N) when path is evaluated to a single value, where N is the size of the value, O(N) when path is evaluated to multiple values, where N is the size of the key
available inRedis Stack / JSON 1.0.0
urlhttps://redis.io/docs/latest/commands/json.debug-memory/
JSON.DEBUG
commandJSON.DEBUG
syntaxJSON.DEBUG
description

This is a container command for debugging related tasks.

time complexityN/A
available inRedis Stack / JSON 1.0.0
urlhttps://redis.io/docs/latest/commands/json.debug/
JSON.DEL
commandJSON.DEL
syntaxJSON.DEL key [path]
description

Delete a value

time complexityO(N) when path is evaluated to a single value where N is the size of the deleted value, O(N) when path is evaluated to multiple values, where N is the size of the key
available inRedis Stack / JSON 1.0.0
urlhttps://redis.io/docs/latest/commands/json.del/
JSON.FORGET
commandJSON.FORGET
syntaxJSON.FORGET key [path]
description

See JSON.DEL.

time complexityO(N) when path is evaluated to a single value where N is the size of the deleted value, O(N) when path is evaluated to multiple values, where N is the size of the key
available inRedis Stack / JSON 1.0.0
urlhttps://redis.io/docs/latest/commands/json.forget/
JSON.GET
commandJSON.GET
syntaxJSON.GET key [INDENTÂ indent] [NEWLINEÂ newline] [SPACEÂ space] [path [path ...]]
description

Return the value at path in JSON serialized form

time complexityO(N) when path is evaluated to a single value where N is the size of the value, O(N) when path is evaluated to multiple values, where N is the size of the key
available inRedis Stack / JSON 1.0.0
urlhttps://redis.io/docs/latest/commands/json.get/
JSON.MERGE
commandJSON.MERGE
syntaxJSON.MERGE key path value
description

Merge a given JSON value into matching paths. Consequently, JSON values at matching paths are updated, deleted, or expanded with new children.

time complexityO(M+N) when path is evaluated to a single value where M is the size of the original value (if it exists) and N is the size of the new value, O(M+N) when path is evaluated to multiple values where M is the size of the key and N is the size of the new value * the number of original values in the key
available inRedis Stack / JSON 2.6.0
urlhttps://redis.io/docs/latest/commands/json.merge/
JSON.MGET
commandJSON.MGET
syntaxJSON.MGET key [key ...] path
description

Return the values at path from multiple key arguments

time complexityO(M*N) when path is evaluated to a single value where M is the number of keys and N is the size of the value, O(N1+N2+…+Nm) when path is evaluated to multiple values where m is the number of keys and Ni is the size of the i-th key
available inRedis Stack / JSON 1.0.0
urlhttps://redis.io/docs/latest/commands/json.mget/
JSON.MSET
commandJSON.MSET
syntaxJSON.MSET key path value [key path value ...]
description

Set or update one or more JSON values according to the specified key-path-value triplets

time complexityO(K*(M+N)) where k is the number of keys in the command, when path is evaluated to a single value where M is the size of the original value (if it exists) and N is the size of the new value, or O(K*(M+N)) when path is evaluated to multiple values where M is the size of the key and N is the size of the new value * the number of original values in the key
available inRedis Stack / JSON 2.6.0
urlhttps://redis.io/docs/latest/commands/json.mset/
JSON.NUMINCRBY
commandJSON.NUMINCRBY
syntaxJSON.NUMINCRBY key path value
description

Increment the number value stored at path by number

time complexityO(1) when path is evaluated to a single value, O(N) when path is evaluated to multiple values, where N is the size of the key
available inRedis Stack / JSON 1.0.0
urlhttps://redis.io/docs/latest/commands/json.numincrby/
JSON.OBJKEYS
commandJSON.OBJKEYS
syntaxJSON.OBJKEYS key [path]
description

Return the keys in the object that’s referenced by path

time complexityO(N) when path is evaluated to a single value, where N is the number of keys in the object, O(N) when path is evaluated to multiple values, where N is the size of the key
available inRedis Stack / JSON 1.0.0
urlhttps://redis.io/docs/latest/commands/json.objkeys/
JSON.OBJLEN
commandJSON.OBJLEN
syntaxJSON.OBJLEN key [path]
description

Report the number of keys in the JSON object at path in key

time complexityO(1) when path is evaluated to a single value, O(N) when path is evaluated to multiple values, where N is the size of the key
available inRedis Stack / JSON 1.0.0
urlhttps://redis.io/docs/latest/commands/json.objlen/
JSON.SET
commandJSON.SET
syntaxJSON.SET key path value [NX | XX]
description

Set the JSON value at path in key

time complexityO(M+N) when path is evaluated to a single value where M is the size of the original value (if it exists) and N is the size of the new value, O(M+N) when path is evaluated to multiple values where M is the size of the key and N is the size of the new value * the number of original values in the key
available inRedis Stack / JSON 1.0.0
urlhttps://redis.io/docs/latest/commands/json.set/
JSON.STRAPPEND
commandJSON.STRAPPEND
syntaxJSON.STRAPPEND key [path] value
description

Append the json-string values to the string at path

time complexityO(1) when path is evaluated to a single value, O(N) when path is evaluated to multiple values, where N is the size of the key
available inRedis Stack / JSON 1.0.0
urlhttps://redis.io/docs/latest/commands/json.strappend/
JSON.STRLEN
commandJSON.STRLEN
syntaxJSON.STRLEN key [path]
description

Report the length of the JSON String at path in key

time complexityO(1) when path is evaluated to a single value, O(N) when path is evaluated to multiple values, where N is the size of the key
available inRedis Stack / JSON 1.0.0
urlhttps://redis.io/docs/latest/commands/json.strlen/
JSON.TOGGLE
commandJSON.TOGGLE
syntaxJSON.TOGGLE key path
description

Toggle a Boolean value stored at path

time complexityO(1) when path is evaluated to a single value, O(N) when path is evaluated to multiple values, where N is the size of the key
available inRedis Stack / JSON 2.0.0
urlhttps://redis.io/docs/latest/commands/json.toggle/
JSON.TYPE
commandJSON.TYPE
syntaxJSON.TYPE key [path]
description

Report the type of JSON value at path

time complexityO(1) when path is evaluated to a single value, O(N) when path is evaluated to multiple values, where N is the size of the key
available inRedis Stack / JSON 1.0.0
urlhttps://redis.io/docs/latest/commands/json.type/

  • JSON.ARRAPPEND
127.0.0.1:6379> json.set blog $ '{"user":{"id":222078,"nick":"TOM"},"id":1000,"content":"一起学习redis json吧","delete":false,"like":300,"tags":["redis","json"]}'
127.0.0.1:6379> json.arrappend blog $.tags '"backend"' '"midware"'
4
127.0.0.1:6379> json.get blog INDENT "\t" NEWLINE "\n" SPACE " " $
[{"user": {"id": 222078,"nick": "TOM"},"id": 1000,"content": "一起学习redis json吧","delete": false,"like": 300,"tags": ["redis","json","backend","midware"]}
]
127.0.0.1:6379> 
  • JSON.ARRINSERT
  • JSON.STRAPPEND

  • JSON.ARRPOP
  • JSON.ARRTRIM
  • JSON.CLEAR
  • JSON.DEL
  • JSON.FORGET

  • JSON.SET
  • JSON.MSET
  • JSON.NUMINCRBY
  • JSON.NUMMULTBY
  • JSON.MERGE
  • JSON.TOGGLE

  • JSON.ARRLEN
  • JSON.ARRINDEX
    127.0.0.1:6379> JSON.SET tom $ '["black","silver"]'
    OK
    127.0.0.1:6379>
    127.0.0.1:6379>
    127.0.0.1:6379>
    127.0.0.1:6379> JSON.ARRINDEX tom $ '"black"'
    1) (integer) 0127.0.0.1:6379> JSON.ARRINDEX tom $ '"silver"'
    1) (integer) 1
    
  • JSON.DEBUG
  • JSON.DEBUG MEMORY
  • JSON.GET
  • JSON.MGET
  • JSON.OBJKEYS
  • JSON.OBJLEN
  • JSON.RESP (deprecated)
  • JSON.STRLEN
  • JSON.TYPE

redis jsonclients

https://github.com/RedisJSON/RedisJSON?tab=readme-ov-file

redis json的使用场景 https://redis.io/docs/latest/develop/data-types/json/use_cases/

  • 从json中查询或搜索
  • 原子部分更新

相关文章:

Redis JSON介绍和命令大全

Redis JSON介绍和命令大全 Redis JSON先说说JSON是什么再说说JSON Path先推荐两个网站JSONPath JAVA clents Redis JSON 安装内存json命令语法命令url命令解释JSON.ARRAPPENDJSON.ARRINDEXJSON.ARRINSERTJSON.ARRLENJSON.ARRPOPJSON.ARRTRIMJSON.CLEARJSON.DEBUG MEMORYJSON.DE…...

yolo自动化项目实例解析(八)自建UI-键鼠录制回放

项目中关于键鼠的操作&#xff0c;不像我们之前自动化那样一步一步去定义的&#xff0c;而是用C写了一个记录键鼠的操作&#xff0c;通过回放的方法来实现的 一、通讯系统 1、创建websocket服务器 首先通过事件循环asyncio 和websockets&#xff0c;创建一个持久化的服务端进程…...

C++ 面向对象知识汇总(超详细)

学习交流&#xff1a;0voice GitHub 1.什么是类&#xff1f; 在C中&#xff0c;类&#xff08;Class&#xff09; 是一种用户定义的数据类型&#xff0c;用来描述具有相同特征和行为的一组对象。类是面向对象编程&#xff08;OOP&#xff09;的核心概念&#xff0c;它通过将…...

stm32使用SIM900A模块实现MQTT对接远程服务器

SIM900A模块是一种GSM/GPRS无线通信模块,它可以通过SIM卡连接移动通信网络,并通过串口或USB接口与微控制器或计算机进行通信。 SIM900A驱动代码如下: #include "stm32f10x.h" #include "stdio.h" #include "stdlib.h" #include "sim900a…...

MATLAB Simulink (一)直接序列扩频通信系统

MATLAB & Simulink &#xff08;一&#xff09;直接序列扩频通信系统 写在前面1 系统原理1.1 扩频通信系统理论基础1.1.1 基本原理1.1.2 扩频通信系统处理增益和干扰容限1.1.3 各种干扰模式下抗干扰性能 1.2 直接序列扩频通信系统理论基础1.2.1 基本原理1.2.2 物理模型 2 方…...

标准数字隔离器主要特性和应用---腾恩科技

在现代电子系统中&#xff0c;不同电路部分之间需要可靠的隔离&#xff0c;尤其是在高压环境或必须保持敏感信号完整性的情况下。一种这样的解决方案是使用标准数字隔离器。这些组件在电路的不同部分之间提供电气隔离&#xff0c;确保安全、降噪和可靠的信号传输。本文深入探讨…...

Spring事务的七种传播行为

Spring事务的七种传播行为 1.事务的传播行为是什么&#xff1f;2.具体传播行为2.1 REQUIRED &#xff0c;默认&#xff0c;存在事务则加入该事务&#xff0c;不存在则新建一个事务2.2 REQUIRES_NEW&#xff0c;每次新开启事务&#xff0c;新老事务相互独立2.3 NESTED&#xff0…...

win10怎么卸载软件干净?电脑彻底删除软件的方法介绍,一键清理卸载残留!

电脑上经常会下载各种各样的软件来协助我们办公&#xff0c;不同的软件能够满足不同的需求。 但是不少软件可能使用频率没有那么高&#xff0c;甚至完全不使用。这个时候就需要将这些不常用的电脑软件卸载掉了&#xff0c;卸载软件能够释放一定的存储空间&#xff0c;提高电脑…...

excel中,将时间戳(ms或s)转换成yyyy-MM-dd hh:mm.ss或毫秒格式

问题 在一些输出为时间戳的文本中&#xff0c;按照某种格式显示更便于查看。 如下&#xff0c;第一列为时间戳(s)&#xff0c;第二列是转换后的格式。 解决方案&#xff1a; 在公式输入框中输入&#xff1a;yyyy/mm/dd hh:mm:ss TEXT((A18*3600)/8640070*36519, "yyy…...

机房巡检机器人有哪些功能和作用

随着数据量的爆炸式增长和业务的不断拓展&#xff0c;数据中心面临诸多挑战。一方面&#xff0c;设备数量庞大且复杂&#xff0c;数据中心内服务器、存储设备、网络设备等遍布&#xff0c;这些设备需时刻保持良好运行状态&#xff0c;因为任何一个环节出现问题都可能带来严重后…...

Redis Search系列 - 第一讲 创建索引

目录 一、引言二、全文检索基本概念三、创建索引 一、引言 Redis Search 是 Redis 的一个模块&#xff0c;用于提供全文搜索和二级索引功能。它允许在 Redis 数据库中执行复杂的搜索查询&#xff0c;并支持多种数据类型和查询操作。以下是 Redis Search 的一些关键特性&#x…...

bat 重置 Navicat 试用

bat 脚本文件 echo off set dnInfo set dn2ShellFolder set rpHKEY_CURRENT_USER\Software\Classes\CLSID :: reg delete HKEY_CURRENT_USER\Software\PremiumSoft\NavicatPremium\Registration14XCS /f %针对<strong><font color"#FF0000">navicat<…...

【真题笔记】09-12年系统架构设计师要点总结

【真题笔记】09-12年系统架构设计师要点总结 41 视图DSSA&#xff08;特定领域架构&#xff09;集成系统数据库管理设计模式操作符运算符综合布线备份数据库集成工作流技术软件质量保证需求管理需求开发结构化方法企业战略数据模型事务数据库主题数据库系统设计原型开发静态分析…...

Node + HTML搭建自己的ChatGPT [基础版]

文章目录 明明外面的ChatGPT产品那么多了&#xff0c;为什么要在本地搭建自己的ChatGPT呢&#xff1f;整体架构流程1. 获取APIKey1.1 常见的AI模型1.2 为什么选DeepSeek1.3 怎么获取DeepSeek的APIKey1.3.1 注册并登录DeepSeek开放平台1.3.2 选择API keys1.3.3 创建API key1.3.4…...

关于小程序审核需要提交订单列表页面path的修改办法

小程序又又又又又搞事情啦&#xff5e;&#xff5e;&#xff5e; 从12月31号起&#xff0c;所有有订单生成逻辑的小程序在审核过程中&#xff0c;必须要填写订单列表页面的path才可以进行审核 在代码层面上会有一些小的改动&#xff0c;下面就告诉大家怎么去修改吧。 第一步…...

使用 Nginx 在同一端口部署两个前端项目并配置子路径

在现代 Web 开发中&#xff0c;我们经常需要在同一台服务器上部署多个前端项目。这不仅可以节省资源&#xff0c;还可以简化管理。本文将指导你如何使用Nginx在同一端口上部署两个前端项目&#xff0c;并通过配置子路径来区分它们。 环境准备 首先&#xff0c;我们需要准备两…...

怎么选择独立站SEO效果好的wordpress模板

选择独立站SEO效果好的WordPress模板需要考虑多个因素&#xff0c;包括模板的代码质量、加载速度、SEO友好性以及与SEO插件的兼容性。以下是一些具体的建议&#xff1a; 1. 代码简洁&#xff1a;选择代码简洁的WordPress主题&#xff0c;因为干净的代码不仅使网站更加安全可靠…...

深度学习速通系列:超长法律文件隐私过滤(基于预训练模型Bert)

法律文件隐私过滤 网上使用bert的中文模型进行命名识别教程少的可怜,摸索了一周的时间,硬是把法律文书的人名全部识别出来了,目前可以达到98.9999%(开玩笑的,不过准确率保守估计是有90%以上).注意:这个法律文书目前只是针对裁决书,其他还没测试过,可支持超长文本识别 github仓…...

【数据结构与算法】之队列详解

队列&#xff08;Queue&#xff09;是一种重要的线性数据结构&#xff0c;遵循先进先出、后进后出的原则。本文将更详细地介绍队列的概念、特点、Java 实现以及应用场景。 模运算小复习&#xff1a; a % b 的值总是小于b 5 % 4 1 5 % 2 1 1 % 5 1 4 % 5 4 1. 队列…...

python最新h5st4.9.1调用源码(2025-10-25)

废话不多说&#xff0c;直接上源码&#xff0c;需要技术支持的私。 一、调用js方法&#xff1a; # -*- coding: utf-8 -*- """ -------------------------------------------------Author: byc6352File: jdh5st.pyTime: 2024/10/25 08:03Technical Support:by…...

XCTF-web-easyupload

试了试php&#xff0c;php7&#xff0c;pht&#xff0c;phtml等&#xff0c;都没有用 尝试.user.ini 抓包修改将.user.ini修改为jpg图片 在上传一个123.jpg 用蚁剑连接&#xff0c;得到flag...

Prompt Tuning、P-Tuning、Prefix Tuning的区别

一、Prompt Tuning、P-Tuning、Prefix Tuning的区别 1. Prompt Tuning(提示调优) 核心思想:固定预训练模型参数,仅学习额外的连续提示向量(通常是嵌入层的一部分)。实现方式:在输入文本前添加可训练的连续向量(软提示),模型只更新这些提示参数。优势:参数量少(仅提…...

【快手拥抱开源】通过快手团队开源的 KwaiCoder-AutoThink-preview 解锁大语言模型的潜力

引言&#xff1a; 在人工智能快速发展的浪潮中&#xff0c;快手Kwaipilot团队推出的 KwaiCoder-AutoThink-preview 具有里程碑意义——这是首个公开的AutoThink大语言模型&#xff08;LLM&#xff09;。该模型代表着该领域的重大突破&#xff0c;通过独特方式融合思考与非思考…...

【OSG学习笔记】Day 16: 骨骼动画与蒙皮(osgAnimation)

骨骼动画基础 骨骼动画是 3D 计算机图形中常用的技术&#xff0c;它通过以下两个主要组件实现角色动画。 骨骼系统 (Skeleton)&#xff1a;由层级结构的骨头组成&#xff0c;类似于人体骨骼蒙皮 (Mesh Skinning)&#xff1a;将模型网格顶点绑定到骨骼上&#xff0c;使骨骼移动…...

腾讯云V3签名

想要接入腾讯云的Api&#xff0c;必然先按其文档计算出所要求的签名。 之前也调用过腾讯云的接口&#xff0c;但总是卡在签名这一步&#xff0c;最后放弃选择SDK&#xff0c;这次终于自己代码实现。 可能腾讯云翻新了接口文档&#xff0c;现在阅读起来&#xff0c;清晰了很多&…...

深入理解Optional:处理空指针异常

1. 使用Optional处理可能为空的集合 在Java开发中&#xff0c;集合判空是一个常见但容易出错的场景。传统方式虽然可行&#xff0c;但存在一些潜在问题&#xff1a; // 传统判空方式 if (!CollectionUtils.isEmpty(userInfoList)) {for (UserInfo userInfo : userInfoList) {…...

DiscuzX3.5发帖json api

参考文章&#xff1a;PHP实现独立Discuz站外发帖(直连操作数据库)_discuz 发帖api-CSDN博客 简单改造了一下&#xff0c;适配我自己的需求 有一个站点存在多个采集站&#xff0c;我想通过主站拿标题&#xff0c;采集站拿内容 使用到的sql如下 CREATE TABLE pre_forum_post_…...

react-pdf(pdfjs-dist)如何兼容老浏览器(chrome 49)

之前都是使用react-pdf来渲染pdf文件&#xff0c;这次有个需求是要兼容xp环境&#xff0c;xp上chrome最高支持到49&#xff0c;虽然说iframe或者embed都可以实现预览pdf&#xff0c;但为了后续的定制化需求&#xff0c;还是需要使用js库来渲染。 chrome 49测试环境 能用的测试…...

多模态学习路线(2)——DL基础系列

目录 前言 一、归一化 1. Layer Normalization (LN) 2. Batch Normalization (BN) 3. Instance Normalization (IN) 4. Group Normalization (GN) 5. Root Mean Square Normalization&#xff08;RMSNorm&#xff09; 二、激活函数 1. Sigmoid激活函数&#xff08;二分类&…...

Git 使用大全:从入门到精通

Git 是目前最流行的分布式版本控制系统&#xff0c;被广泛应用于软件开发中。本文将全面介绍 Git 的各种功能和使用方法&#xff0c;包含大量代码示例和实践建议。 文章目录 Git 基础概念版本控制系统Git 的特点Git 的三个区域Git 文件状态 Git 安装与配置安装 GitLinuxmacOSWi…...