Redis JSON介绍和命令大全

news2024/10/20 10:15:09

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) 0
       127.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中查询或搜索
  • 原子部分更新

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/2219211.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

Java 入门基础篇15 - java构造方法以及认识新的关键字

一 今日目标 构造方法static关键字代码块math类package关键字import关键字 二 构造方法概述 2.1 构造方法描述 构造方法是一个特殊方法&#xff0c;作用是创建对象&#xff0c;对对象进行初始化。 ​ 如&#xff1a; 对对象中的成员进行初始化值 2.1 构造方法的特征 1、方…

C/C++每日一练:编写一个栈数据结构

通过编写栈&#xff08;Stack&#xff09;数据结构&#xff0c;提升对基本数据结构的理解和运用。这也是掌握更复杂数据结构与算法的基础。栈是计算机科学中的一个重要概念&#xff0c;经常出现在许多算法和应用中。 栈&#xff08;Stack&#xff09; 栈是一种后进先出&#x…

【初阶数据结构】计数排序 :感受非比较排序的魅力

文章目录 前言1. 什么是计数排序&#xff1f;2. 计数排序的算法思路2.1 绝对位置和相对位置2.2 根据计数数组的信息来确认 3. 计数排序的代码4. 算法分析5. 计数排序的优缺点6.计数排序的应用场景 前言 如果大家仔细思考的话&#xff0c;可能会发现这么一个问题。我们学的七大…

【C语言】原码 反码 补码

为什么要有原码 反码 补码的概念&#xff1f; 因为在计算机中最终只能识别机器码&#xff0c;是以 0000 0000 二进制作为表示形式&#xff0c;对于一个数&#xff0c;计算机要使用一定的编码方式进行存储&#xff0c;原码 反码 补码是机器存储一个数值的编码方式&#xff0c;最…

技术分享:A-23OH型树脂在汽车涂装废溶剂回收中的应用

在当今汽车制造业竞争激烈的环境下&#xff0c;提高生产效率、降低成本的同时&#xff0c;满足环保要求已成为各制造商追求的核心目标。水性涂料因其环保、节能等多重优势&#xff0c;在汽车涂装领域的应用日益广泛。然而&#xff0c;随之而来的喷涂废溶剂处理问题也日益凸显。…

2024年软件设计师中级(软考中级)详细笔记【7】面向对象技术(下)23种设计模式(分值10+)

目录 前言阅读前必看 第七章 面向对象技术&#xff08;下&#xff09;7.3 设计模式&#xff08;固定4分&#xff09;7.3.1 设计模式的要素7.3.2 创建型设计模式7.3.2.1 Abstract Factory&#xff08;抽象工厂&#xff09;7.3.2.2 Builder&#xff08;生成器&#xff09;7.3.2.3…

调整奇数偶数的顺序

//调整奇数偶数的顺序 //输入一个整数数组&#xff0c;实现一个函数 //使得数组中所有的奇数位于数组的前半部分&#xff0c;所有的偶数位于数组的后半部分 #include<stdio.h> void tz(int a[],int sz) {int i 0;int j 0;int q 0;int c[100] { 0 };int b[100] { 0 …

Qt第十三天:网络编程:TCP和UDP的使用

我发现了有些人喜欢静静看博客不聊天呐&#xff0c; 但是ta会点赞。 这样的人呢帅气低调有内涵&#xff0c; 美丽大方很优雅。 说的就是你&#xff0c; 不用再怀疑哦 ❤️TCP&#xff1a; 一、创建项目&#xff0c;命名为Server&#xff0c;继承QWidget 二、添加Qt设计师…

Axure重要元件三——中继器添加数据

亲爱的小伙伴&#xff0c;在您浏览之前&#xff0c;烦请关注一下&#xff0c;在此深表感谢&#xff01; 本节课&#xff1a;中继器添加数据 课程内容&#xff1a;添加数据项、自动添加序号、自动添加数据汇总 应用场景&#xff1a;表单数据的添加 案例展示&#xff1a; 步骤…

算法: 模拟题目练习

文章目录 模拟替换所有的问号提莫攻击Z 字形变换外观数列数青蛙 总结 模拟 替换所有的问号 按照题目的要求写代码即可~ public String modifyString(String ss) {int n ss.length();if (n 1) {return "a";}char[] s ss.toCharArray();for (int i 0; i < n; i…

【华为HCIP实战课程十三】OSPF网络中3类LSA及区域间负载均衡,网络工程师

一、ABR SW1查看OSPF ABR为R4而非R3,因为R4连接骨干区域0,R3没有连接到区域0 R6查看OSPF路由: 二、查看3类LSA,由于R6不是ABR因此自身不会产生3类LSA 但是有区域间路由就可以看到3类LSA

分布式介绍

CAP理论 CAP理论是分布式架构中提出来的一种设计思想模型&#xff0c;全称是由Consistency、Availability、Partition Tolerance三个词组成。 C(Consistency&#xff0c;一致性):总能读到最新的写操作的结果A(Availability&#xff0c;可用性):每个请求都要在合理的时间内给出…

Spring Boot知识管理:跨平台集成方案

4系统概要设计 4.1概述 本系统采用B/S结构(Browser/Server,浏览器/服务器结构)和基于Web服务两种模式&#xff0c;是一个适用于Internet环境下的模型结构。只要用户能连上Internet,便可以在任何时间、任何地点使用。系统工作原理图如图4-1所示&#xff1a; 图4-1系统工作原理…

后渗透利用之vcenter

目录 vcenter介绍环境搭建历史漏洞版本信息1、直接访问2、请求接⼝ 打点CVE_2021_21972漏洞描述&#xff1a;POC&#xff1a; 后渗透获取vCenter后台重置密码Cookie登录创建管理员 获取虚拟机Hash分析快照挂载磁盘 获取Esxi 后台获取解密key获取数据库账号密码查询Esxi加密密码…

ESP32-IDF 分区表

目录 一、基本介绍1、配置结构体1.1 esp_partition_t1.2 esp_partition_iterator_t 2、常用 API2.1 esp_partition_find2.2 esp_partition_find_first2.3 esp_partition_get2.4 esp_partition_next2.5 esp_partition_iterator_release2.6 esp_partition_verify2.7 esp_partitio…

使用WPF写一个简单的开关控件

<Window x:Class"WPF练习.MainWindow"xmlns"http://schemas.microsoft.com/winfx/2006/xaml/presentation"xmlns:x"http://schemas.microsoft.com/winfx/2006/xaml"xmlns:d"http://schemas.microsoft.com/expression/blend/2008"xm…

适用于 vue react Es6 jQuery 等等的组织架构图(组织结构图)

我这里找的是 OrgChart 插件; 地址: GitHub - dabeng/OrgChart: Its a simple and direct organization chart plugin. Anytime you want a tree-like chart, you can turn to OrgChart. 这里面能满足你对组织架构图的一切需求! ! ! 例: 按需加载 / 拖拽 / 编辑 / 自定义 / …

【玉米病害识别】Python+卷积神经网络算法+人工智能+深度学习+计算机课设项目+TensorFlow+模型训练

一、介绍 玉米病害识别系统&#xff0c;本系统使用Python作为主要开发语言&#xff0c;通过收集了8种常见的玉米叶部病害图片数据集&#xff08;‘矮花叶病’, ‘健康’, ‘灰斑病一般’, ‘灰斑病严重’, ‘锈病一般’, ‘锈病严重’, ‘叶斑病一般’, ‘叶斑病严重’&#x…

使用JMeter进行Spring Boot接口的压力测试

使用 Apache JMeter 对接口进行压力测试是一个相对简单的过程。以下是详细的步骤&#xff0c;包括安装、配置和执行测试计划。 1. 下载和安装 JMeter 下载 JMeter 从 JMeter 官方网站https://jmeter.apache.org/download_jmeter.cgi 下载最新版本的 JMeter。 解压缩 将下载的 …

【AIGC】ChatGPT与人类理解力的共鸣:人机交互中的心智理论(ToM)探索

博客主页&#xff1a; [小ᶻZ࿆] 本文专栏: AIGC | ChatGPT 文章目录 &#x1f4af;前言&#x1f4af;心智理论(Theory of Mind,ToM)心智理论在心理学与神经科学中的重要性心智理论对理解同理心、道德判断和社交技能的重要性结论 &#x1f4af;乌得勒支大学研究对ChatGPT-4…