From cf49e3b8cf1b9ba934f3e2c2a928ce4327eda9b5 Mon Sep 17 00:00:00 2001 From: LemontreeN <2305465291@qq.com> Date: Sun, 22 Sep 2024 15:08:56 +0800 Subject: [PATCH] Site updated: 2024-09-22 15:08:56 --- .../index.html" | 4 +- .../index.html" | 4 +- .../index.html" | 4 +- .../index.html" | 4 +- .../AQS/index.html" | 4 +- .../ArrayList/index.html" | 4 +- .../index.html" | 235 +++++++++++++++++ .../index.html" | 4 +- 2024/09/21/README/index.html | 2 +- .../index.html" | 4 +- .../index.html" | 4 +- .../index.html" | 4 +- .../index.html" | 4 +- .../index.html" | 218 ++++++++++++++++ .../index.html" | 244 ++++++++++++++++++ .../index.html" | 242 +++++++++++++++++ .../index.html" | 22 +- archives/2022/05/index.html | 8 +- archives/2022/index.html | 8 +- archives/2024/09/index.html | 8 +- archives/2024/09/page/2/index.html | 8 +- archives/2024/index.html | 8 +- archives/2024/page/2/index.html | 8 +- archives/index.html | 8 +- archives/page/2/index.html | 8 +- categories/Java/index.html | 8 +- categories/NLP/index.html | 8 +- categories/Redis/index.html | 8 +- categories/Redis/page/2/index.html | 179 +++++++++++++ categories/index.html | 6 +- .../image-20240922140827310.png" | Bin 0 -> 72844 bytes .../image-20240922143114798.png" | Bin 0 -> 79253 bytes .../image-20240922143318545.png" | Bin 0 -> 193252 bytes .../image-20240922145225898.png" | Bin 0 -> 304645 bytes .../image-20240922150726316.png" | Bin 0 -> 95594 bytes index.html | 8 +- page/2/index.html | 8 +- search.xml | 124 ++++++++- tags/ArrayList/index.html | 8 +- tags/JVM/index.html | 179 +++++++++++++ tags/NLP/index.html | 8 +- tags/Redis/index.html | 8 +- tags/Redis/page/2/index.html | 8 +- tags/index.html | 6 +- 44 files changed, 1517 insertions(+), 120 deletions(-) create mode 100644 "2024/09/20/Java\346\272\220\347\240\201/JVM\345\236\203\345\234\276\345\233\236\346\224\266/index.html" create mode 100644 "2024/09/22/Redis\346\272\220\347\240\201/\346\225\260\346\215\256\347\261\273\345\236\213_2_List/index.html" create mode 100644 "2024/09/22/Redis\346\272\220\347\240\201/\346\225\260\346\215\256\347\261\273\345\236\213_3_Set/index.html" create mode 100644 "2024/09/22/Redis\346\272\220\347\240\201/\346\225\260\346\215\256\347\261\273\345\236\213_4_ZSet/index.html" rename "2024/09/21/Redis\346\272\220\347\240\201/\346\225\260\346\215\256\347\261\273\345\236\213_2_List/index.html" => "2024/09/22/Redis\346\272\220\347\240\201/\346\225\260\346\215\256\347\261\273\345\236\213_5_Hash/index.html" (50%) create mode 100644 categories/Redis/page/2/index.html create mode 100644 "images/\346\225\260\346\215\256\347\261\273\345\236\213_2_List/image-20240922140827310.png" create mode 100644 "images/\346\225\260\346\215\256\347\261\273\345\236\213_3_Set/image-20240922143114798.png" create mode 100644 "images/\346\225\260\346\215\256\347\261\273\345\236\213_3_Set/image-20240922143318545.png" create mode 100644 "images/\346\225\260\346\215\256\347\261\273\345\236\213_4_ZSet/image-20240922145225898.png" create mode 100644 "images/\346\225\260\346\215\256\347\261\273\345\236\213_4_ZSet/image-20240922150726316.png" create mode 100644 tags/JVM/index.html diff --git "a/2022/05/26/\345\200\222\346\216\222\347\264\242\345\274\225/index.html" "b/2022/05/26/\345\200\222\346\216\222\347\264\242\345\274\225/index.html" index 57b4e99b..d110688f 100644 --- "a/2022/05/26/\345\200\222\346\216\222\347\264\242\345\274\225/index.html" +++ "b/2022/05/26/\345\200\222\346\216\222\347\264\242\345\274\225/index.html" @@ -174,7 +174,7 @@ document.addEventListener('pjax:send', () => { preloader.initLoading() }) document.addEventListener('pjax:complete', () => { preloader.endLoading() }) } -})()

倒排索引的Python实现

+})()

倒排索引的Python实现

索引保存了每个词出现的文章编号以及出现的次数

未保存更详细的位置信息等

实现了通过倒排索引检索文档,不过效果上略差于BM25检索

@@ -182,7 +182,7 @@
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
"""
coding:UTF-8
author:LemontreeN
date:2022-05-08
"""
import json
import math

import tqdm
from ltp import LTP

ltp = LTP(path="base")# base模型
# ltp = LTP()# small小模型


class PreProcessed:
def __init__(self):
self.stop_words = None
self.cnt = 0
self.index_path = 'data/inverted_index.txt'
self.word_dict = {}
self.cnts = []

def read_stop_words(self, file_path: str):
with open(file_path, 'r', encoding='utf-8') as fp:
self.stop_words = set(fp.read().split('\n'))

def generate_index(self, input_path: str):
progress_read_index = tqdm.tqdm(range(14768), f'建立索引中,目前进度')
with open(input_path, 'r', encoding='utf-8') as js:
for line in js.readlines():
data = json.loads(line)
pid = data.get('pid')
seg_list = data.get('document')
seg = ltp.seg(seg_list)
data['document'] = [' '.join(item) for item in seg[0]]
word_cnt = 0
for item in seg[0]:
word_cnt += len(item)
for word in item:
flag = 0
if word in self.stop_words:
pass
elif word not in self.word_dict:
self.word_dict[word] = []
self.word_dict[word].append([pid, 1])
else:
index_list = self.word_dict[word]
for index in index_list:
if index[0] == pid:
index[1] += 1
flag = 1
if flag == 0:
self.word_dict[word].append([pid, 1])
progress_read_index.update(1)
self.cnts.append(word_cnt)
with open(self.index_path, 'w', encoding='utf-8') as index_output:
for key, value in self.word_dict.items():
index_output.write(str(key) + ';;;')
for i in value:
index_output.write(str(i) + '.')
index_output.write('\n')
with open('data/words.txt', 'w', encoding='utf-8') as fp:
for item in self.cnts:
fp.write('%d\n' % item)
exit(0)

def read_index(self):
progress_read_index = tqdm.tqdm(range(355109), f'读取索引中,目前进度')
with open('data/words.txt', 'r', encoding='utf-8') as fp:
self.cnts = fp.read().split('\n')
with open(self.index_path, 'r', encoding='utf-8') as fp:
for line in fp.readlines():
line = line.split(';;;')# 注意挑选合适的分隔符
if len(line) != 2:
print('error')
pass
word, index = line[0], line[1]
pid_list = index[:-2].split('.')
self.word_dict[word] = pid_list
progress_read_index.update(1)
print('-----***索引读取完毕***-----')
# print('输入查询文本,输入 !quit 退出')

def search(self, conds: str) -> list:
"""
检索TOP3相关文档
:param conds: 查询条件
:return: 可能的文档列表: list
"""
seg, hidden = ltp.seg([conds])
conds = '||'.join(seg[0])
if conds != '!quit':
if '&&' in conds:
conds = conds.split('&&')
pid_list = self.word_dict.get(conds[0])
for i in range(1, len(conds)):
merge_list = self.word_dict.get(conds[i])
temp_list = []
for item in merge_list:
if item in pid_list:
temp_list.append(item)
pid_list = temp_list
elif '||' in conds:
conds = conds.split('||')
pid_list = []
weight = []
for cond in conds:
merge_list = self.word_dict.get(cond)
if merge_list is not None:
df = len(merge_list)
idf = 1 / df
for item in merge_list:
item = item.split(',')
pid = int(item[0][1:])
fre = int(item[1][:-1])
tf=math.log(fre+3)
tf_idf = tf * idf# 参数自己设置
if pid not in pid_list:
pid_list.append(pid)
weight.append(tf_idf)
else:
for i in range(len(pid_list)):
if pid_list[i] == pid:
weight[i] += tf_idf
break
else:
pid_list = self.word_dict.get(conds)
if not pid_list:
print('None!')
return [-1]
else:
pid_weight = sorted([(w, p) for w, p in zip(weight, pid_list)], reverse=True)
print(pid_weight[0])
if len(pid_weight)==1:
return [pid_weight[0][1]]
elif len(pid_weight)==2:
return [pid_weight[0][1], pid_weight[1][1]]
else:
return [pid_weight[0][1],pid_weight[1][1],pid_weight[2][1]]



if __name__ == "__main__":
pre = PreProcessed()
choice = input('\n****Inverted Index IR System****\nChoice:\n1. 读取文件建立索引\n2. 使用已有索引查询')
if choice == '1':
pre.read_stop_words('data/stopwords.txt')
pre.generate_index('data/passages_multi_sentences.json')
elif choice == '2':
pre.read_index()
pre.search('家||中国')
exit(0)

-
文章作者: LemontreeN
文章链接: http://example.com/2022/05/26/%E5%80%92%E6%8E%92%E7%B4%A2%E5%BC%95/
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 LemontreeN's
公告
Welcome to my hood!
公告
Welcome to my hood!

Redis数据结构_1_SDS

SDS 详解

[toc]

+})()

Redis数据结构_1_SDS

SDS 详解

[toc]

为什么Redis没有使用C语言中的字符串?

  • 获取字符串长度需要运算
  • @@ -213,7 +213,7 @@
sds API

//TODO

-
文章作者: LemontreeN
文章链接: http://example.com/2024/09/13/Redis%E6%BA%90%E7%A0%81/%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84_1_SDS/
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 LemontreeN's

Redis数据结构_2_intset

Inset详解

[toc]

+})()

Redis数据结构_2_intset

Inset详解

[toc]

Intset:顾名思义,它是整数的集合,是Redis中set的一种实现方式,基于整数数组实现,具有长度可变、有序等特征。

特点:

    @@ -215,7 +215,7 @@
    intset扩容
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    static intset *intsetUpgradeAndAdd(intset *is, int64_t value) {	// 扩容并插入元素
    uint8_t curenc = intrev32ifbe(is->encoding); // 扩容前的encoding
    uint8_t newenc = _intsetValueEncoding(value); // value的编码,用于判断升级到哪种编码
    int length = intrev32ifbe(is->length); // 元素个数
    int prepend = value < 0 ? 1 : 0; // 判断新元素放在队首还是队尾

    // 更改intset的encoding
    is->encoding = intrev32ifbe(newenc);
    // 调整数组大小
    is = intsetResize(is,intrev32ifbe(is->length)+1);

    // 逆序遍历,调整元素位置
    while(length--)
    _intsetSet(is,length+prepend,_intsetGetEncoded(is,length,curenc));

    // 插入新元素,由于新元素超出编码范围,因此不是插入队头就是队尾,由prepend决定
    if (prepend)
    _intsetSet(is,0,value);
    else
    _intsetSet(is,intrev32ifbe(is->length),value);
    // 修改数组长度
    is->length = intrev32ifbe(intrev32ifbe(is->length)+1);
    return is;
    }
    intset查找

    因为intset存储是有序的,因此采用了典型的二分查找。

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    static uint8_t intsetSearch(intset *is, int64_t value, uint32_t *pos) {
    int min = 0, max = intrev32ifbe(is->length)-1, mid = -1;
    int64_t cur = -1;

    /* The value can never be found when the set is empty */
    if (intrev32ifbe(is->length) == 0) {
    if (pos) *pos = 0;
    return 0;
    } else {
    /* Check for the case where we know we cannot find the value,
    * but do know the insert position. */
    if (value > _intsetGet(is,max)) {
    if (pos) *pos = intrev32ifbe(is->length);
    return 0;
    } else if (value < _intsetGet(is,0)) {
    if (pos) *pos = 0;
    return 0;
    }
    }

    while(max >= min) {
    mid = ((unsigned int)min + (unsigned int)max) >> 1;
    cur = _intsetGet(is,mid);
    if (value > cur) {
    min = mid+1;
    } else if (value < cur) {
    max = mid-1;
    } else {
    break;
    }
    }

    if (value == cur) {
    if (pos) *pos = mid;
    return 1;
    } else {
    if (pos) *pos = min;
    return 0;
    }
    }
    -
文章作者: LemontreeN
文章链接: http://example.com/2024/09/19/Redis%E6%BA%90%E7%A0%81/%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84_2_Set/
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 LemontreeN's

Redis数据结构_3_Dict

Dict详解

[toc]

+})()

Redis数据结构_3_Dict

Dict详解

[toc]

Dict:一个key-value型的数据结构。我们知道Redis就是键值对型的数据库,它正是基于Dict来实现的。

Dict和Entry结构体
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
struct dict {
dictType *type; // dict类型,内置了不同的哈希函数(不同场景使用不同函数,拓展性强)

dictEntry **ht_table[2]; // 指向dictEntry数组,两个表一个是当前数据,另一个为空,rehash时使用
unsigned long ht_used[2]; // 哈希表当前负载

long rehashidx; // rehash的进度,-1表示未进行rehash

/* Keep small vars at end for optimal (minimal) struct padding */
unsigned pauserehash : 15; // 指示rehash是否暂停,可以防止哈希不一致

unsigned useStoredKeyApi : 1; /* See comment of storedHashFunction above */
signed char ht_size_exp[2]; // 哈希表大小的指数位:例如若为4,则表大小size = 2 ^ 4 = 16
int16_t pauseAutoResize; //用于控制自动Resize
void *metadata[]; // 存储额外的元数据
};

Entry:键值对,v是联合体中的任意一种

@@ -235,7 +235,7 @@
文章作者: LemontreeN
文章链接: http://example.com/2024/09/19/Redis%E6%BA%90%E7%A0%81/%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84_3_Dict/
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 LemontreeN's

AQS原理

AQS详解

[toc]

+})()

AQS原理

AQS详解

[toc]

AQS - AbstractQueuedSynchronizer,抽象队列同步器,构建锁和其他同步组件的基础框架。提供了共享锁和排它锁。

AQS常见的实现类:

文章作者: LemontreeN
文章链接: http://example.com/2024/09/20/Java%E6%BA%90%E7%A0%81/AQS/
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 LemontreeN's

ArrayList详解

ArrayList详解

[toc]

+})()

ArrayList详解

ArrayList详解

[toc]

ArrayList具有以下特点:

-
文章作者: LemontreeN
文章链接: http://example.com/2024/09/20/Java%E6%BA%90%E7%A0%81/ArrayList/
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 LemontreeN's
加载中...

JVM垃圾回收详解

JVM垃圾回收详解

[toc]

+

首先要明确的是,JVM垃圾回收器主要工作区域是堆,目前垃圾收集器都采用了分代垃圾回收算法,因此Java堆被划分成了多个不同的区域。

+

本文介绍JDK1.8以后的版本:堆分为新生代、老年代,永久代已被元空间(MetaSpace)代替,且不再存在于堆上。

+
堆的结构

事实上,不同的垃圾回收器所使用的堆模型的具体划分是不同的。但总体分为新生代和老年代,新生代分为Eden区和S(Survivor)区。

+

以下是传统的

+
    +
  • G1之前,大对象存放在Old区,但G1开始单独划分了Humongous区存放大对象。
  • +
+
如何判断哪些对象需要回收
1. 引用计数法

就是给对象增加一个引用计数器:

+
    +
  • 每有一个地方引用该对象,计数器+1
  • +
  • 每当一个引用失效,计数器-1
  • +
  • 计数器的值为0,说明对象不被引用,可以回收
  • +
+
+

缺陷:如果有两个对象相互引用,它们的计数器永不为0,也就是说无论是否有用,它们永远都不会被回收。

+
+
2. 可达性分析
引用类型
    +
  • 强引用:
  • +
  • 弱引用:
  • +
  • 虚引用:
  • +
  • 软引用:
  • +
+
垃圾收集算法
CMS收集器
G1收集器
ZGC收集器
文章作者: LemontreeN
文章链接: http://example.com/2024/09/20/Java%E6%BA%90%E7%A0%81/JVM%E5%9E%83%E5%9C%BE%E5%9B%9E%E6%94%B6/
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 LemontreeN's
\ No newline at end of file diff --git "a/2024/09/20/Redis\346\272\220\347\240\201/\346\225\260\346\215\256\347\273\223\346\236\204_4_ZipList/index.html" "b/2024/09/20/Redis\346\272\220\347\240\201/\346\225\260\346\215\256\347\273\223\346\236\204_4_ZipList/index.html" index 56446d0b..925c5ac7 100644 --- "a/2024/09/20/Redis\346\272\220\347\240\201/\346\225\260\346\215\256\347\273\223\346\236\204_4_ZipList/index.html" +++ "b/2024/09/20/Redis\346\272\220\347\240\201/\346\225\260\346\215\256\347\273\223\346\236\204_4_ZipList/index.html" @@ -174,7 +174,7 @@ document.addEventListener('pjax:send', () => { preloader.initLoading() }) document.addEventListener('pjax:complete', () => { preloader.endLoading() }) } -})()

Redis数据结构_4_Ziplist

ZipList详解

[toc]

+})()

Redis数据结构_4_Ziplist

文章作者: LemontreeN
文章链接: http://example.com/2024/09/20/Redis%E6%BA%90%E7%A0%81/%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84_4_ZipList/
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 LemontreeN's

README

文章作者: LemontreeN
文章链接: http://example.com/2024/09/21/README/
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 LemontreeN's
公告
Welcome to my hood!

README

文章作者: LemontreeN
文章链接: http://example.com/2024/09/21/README/
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 LemontreeN's
公告
Welcome to my hood!

Redis数据类型_1_String

String详解

[toc]

+})()

Redis数据类型_1_String

String详解

[toc]

String是Redis中最常用的数据类型之一,它的编码方式如下:

  • 基本编码方式为RAW,基于SDS实现,存储上限为512M
  • @@ -194,7 +194,7 @@

image-20240921145811029

-
文章作者: LemontreeN
文章链接: http://example.com/2024/09/21/Redis%E6%BA%90%E7%A0%81/%E6%95%B0%E6%8D%AE%E7%B1%BB%E5%9E%8B_1_String/
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 LemontreeN's
公告
Welcome to my hood!

Redis数据结构_5_QuickList

QuickList详解

[toc]

+})()

Redis数据结构_5_QuickList

QuickList详解

[toc]

ZipList虽然节省空间,但它申请的内存必须是连续的,如果内存占用过多,就会导致申请内存的效率很低。

  • 所以必须限制ZipList的长度和Entry大小
  • @@ -214,7 +214,7 @@
    QuickList源码分析(基于ZipList)

    Redis-6.0.19

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    typedef struct quicklist {
    quicklistNode *head; // 头指针
    quicklistNode *tail; // 尾指针
    unsigned long count; // 总Entry数量
    unsigned long len; // 总节点ZipList数量
    int fill : QL_FILL_BITS; // 控制ZipList的上限
    unsigned int compress : QL_COMP_BITS; // 控制QuickList压缩
    unsigned int bookmark_count: QL_BM_BITS; // 内存重分配时使用的书签数量和数组
    quicklistBookmark bookmarks[];
    } quicklist;

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    typedef struct quicklistNode {
    struct quicklistNode *prev; // 前指针
    struct quicklistNode *next; // 后指针
    unsigned char *zl; // 当前节点的ZipList指针
    unsigned int sz; // 当前Ziplist大小,按字节计
    unsigned int count : 16; // 当前Ziplist的Entry数
    unsigned int encoding : 2; // 编码方式:1,ZipList ; 2,LZF压缩模式
    unsigned int container : 2; // 容器类型:1,预留 ; 2,ZipList
    unsigned int recompress : 1; // 是否被解压缩:1,解压状态,可能需要重新压缩
    unsigned int attempted_compress : 1;
    unsigned int extra : 10; // 预留字段
    } quicklistNode;
    -
文章作者: LemontreeN
文章链接: http://example.com/2024/09/21/Redis%E6%BA%90%E7%A0%81/%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84_5_QuickList/
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 LemontreeN's

Redis数据结构_6_SkipList

SkipList详解

[toc]

+})()

Redis数据结构_6_SkipList

文章作者: LemontreeN
文章链接: http://example.com/2024/09/21/Redis%E6%BA%90%E7%A0%81/%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84_6_SkipList/
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 LemontreeN's

Redis数据结构_7_RedisObject

RedisObject详解

[toc]

+})()

Redis数据结构_7_RedisObject

RedisObject详解

[toc]

Redis中任意数据类型的键和值都会被封装成一个RedisObject,也叫作Redis对象,结构如下

1
2
3
4
5
6
7
8
// server.h
struct redisObject {
unsigned type:4; // 对象类型
unsigned encoding:4; // 编码类型
unsigned lru:LRU_BITS; // lru时间,用于内存回收
int refcount; // 引用计数器,用于判断是否可以回收
void *ptr; // 指针,指向存放实际数据的空间
};
    @@ -184,7 +184,7 @@
    1
    2
    3
    4
    5
    6
    // server.h
    #define OBJ_STRING 0 /* String object. */
    #define OBJ_LIST 1 /* List object. */
    #define OBJ_SET 2 /* Set object. */
    #define OBJ_ZSET 3 /* Sorted set object. */
    #define OBJ_HASH 4 /* Hash object. */

    Encoding:

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    // server.h
    #define OBJ_ENCODING_RAW 0 /* Raw representation */
    #define OBJ_ENCODING_INT 1 /* Encoded as integer */
    #define OBJ_ENCODING_HT 2 /* Encoded as hash table */
    #define OBJ_ENCODING_ZIPMAP 3 /* No longer used: old hash encoding. */
    #define OBJ_ENCODING_LINKEDLIST 4 /* No longer used: old list encoding. */
    #define OBJ_ENCODING_ZIPLIST 5 /* No longer used: old list/hash/zset encoding. */
    #define OBJ_ENCODING_INTSET 6 /* Encoded as intset */
    #define OBJ_ENCODING_SKIPLIST 7 /* Encoded as skiplist */
    #define OBJ_ENCODING_EMBSTR 8 /* Embedded sds string encoding */
    #define OBJ_ENCODING_QUICKLIST 9 /* Encoded as linked list of listpacks */
    #define OBJ_ENCODING_STREAM 10 /* Encoded as a radix tree of listpacks */
    #define OBJ_ENCODING_LISTPACK 11 /* Encoded as a listpack */
    #define OBJ_ENCODING_LISTPACK_EX 12 /* Encoded as listpack, extended with metadata */
    -
文章作者: LemontreeN
文章链接: http://example.com/2024/09/21/Redis%E6%BA%90%E7%A0%81/%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84_7_RedisObject/
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 LemontreeN's
公告
Welcome to my hood!
加载中...

Redis数据类型_2_List

List详解

[toc]

+

在Redis3.2之后,它采用QuickList来实现List。

+

Redis7之前,QuickList底层是ZipList,7之后底层是listpack。

+

image-20240922140827310

+

PUSH操作底层都是由pushGenericCommand()函数来完成,只是参数不同。

+
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// t_list.c
/* 实现了LPUSH/RPUSH/LPUSHX/RPUSHX. */
void pushGenericCommand(client *c, int where, int xx) { // 如果xx为true,那么仅在key存在时才Push
int j;

robj *lobj = lookupKeyWrite(c->db, c->argv[1]); // 查找列表对象
if (checkType(c,lobj,OBJ_LIST)) return; // 检查类型是否为List
if (!lobj) { // 处理不存在的列表
if (xx) { // 列表不存在且xx为true,返回
addReply(c, shared.czero);
return;
}

lobj = createListListpackObject(); // 列表不存在且xx为false,可以插入,创建一个list,初始只有一个listpack
dbAdd(c->db,c->argv[1],lobj); // 添加元素
}

listTypeTryConversionAppend(lobj,c->argv,2,c->argc-1,NULL,NULL); // 尝试转换为更高效的格式(如果需要的话)
for (j = 2; j < c->argc; j++) {
listTypePush(lobj,c->argv[j],where);
server.dirty++; // 脏数据计数器,用于跟踪数据修改
}

addReplyLongLong(c, listTypeLength(lobj)); // 更新状态和回复

char *event = (where == LIST_HEAD) ? "lpush" : "rpush"; // 发送通知
signalModifiedKey(c,c->db,c->argv[1]);
notifyKeyspaceEvent(NOTIFY_LIST,event,c->argv[1],c->db->id);
}
+
文章作者: LemontreeN
文章链接: http://example.com/2024/09/22/Redis%E6%BA%90%E7%A0%81/%E6%95%B0%E6%8D%AE%E7%B1%BB%E5%9E%8B_2_List/
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 LemontreeN's
公告
Welcome to my hood!
\ No newline at end of file diff --git "a/2024/09/22/Redis\346\272\220\347\240\201/\346\225\260\346\215\256\347\261\273\345\236\213_3_Set/index.html" "b/2024/09/22/Redis\346\272\220\347\240\201/\346\225\260\346\215\256\347\261\273\345\236\213_3_Set/index.html" new file mode 100644 index 00000000..355dec13 --- /dev/null +++ "b/2024/09/22/Redis\346\272\220\347\240\201/\346\225\260\346\215\256\347\261\273\345\236\213_3_Set/index.html" @@ -0,0 +1,244 @@ +Redis数据类型_3_Set | LemontreeN's + + + + + + + + + + + + +
加载中...

Redis数据类型_3_Set

Set详解

[toc]

+

Set是Redis中的单列集合,具有以下特点:

+
    +
  • 无序
  • +
  • 元素唯一
  • +
  • 支持交集、差集、并集
  • +
+

Set的底层是哈希表,也就是Dict数据结构。

+
    +
  • Dict中的key用来存储元素,value一律设为null(Redis6)
      +
    • Redis7中,若元素数量不多,使用listpack
    • +
    +
  • +
  • 当存储的所有数据都是整数,且元素数量不超过set-max-intset-entries时,Set会采用intset编码,节省内存。
      +
    • 当插入元素时Redis会进行检查,如果不满足条件,编码将转换为HT(listpack / intset -> HT)
    • +
    +
  • +
+
示例:

以下是基于Redis6的示例图。

+

空Set插入三个整数5、10、20。由于插入的都是整数,且数量较少,因此采用intset编码。

+

image-20240922143114798

+

之后插入了字符串,不满足条件,编码由intset转为HT。

+

image-20240922143318545

+
源码
    +
  • Redis6:
  • +
+
1
2
3
4
5
6
// t_set.c
robj *setTypeCreate(sds value) {
if (isSdsRepresentableAsLongLong(value,NULL) == C_OK) // 都是整数且满足条件,使用intset
return createIntsetObject();
return createSetObject(); // 否则使用HT
}
+
    +
  • Redis7:
  • +
+
1
2
3
4
5
6
7
8
9
10
11
12
13
// t_set.c
robj *setTypeCreate(sds value, size_t size_hint) {
if (isSdsRepresentableAsLongLong(value,NULL) == C_OK && size_hint <= server.set_max_intset_entries)
return createIntsetObject(); // 都是整数且满足条件,使用intset
if (size_hint <= server.set_max_listpack_entries) // 否则使用listpack或dict
return createSetListpackObject();

/* We may oversize the set by using the hint if the hint is not accurate,
* but we will assume this is acceptable to maximize performance. */
robj *o = createSetObject();
dictExpand(o->ptr, size_hint);
return o;
}
+
1
2
3
4
5
6
7
8
// t_set.c
void setTypeMaybeConvert(robj *set, size_t size_hint) {
if ((set->encoding == OBJ_ENCODING_LISTPACK && size_hint > server.set_max_listpack_entries)
|| (set->encoding == OBJ_ENCODING_INTSET && size_hint > server.set_max_intset_entries))
{
setTypeConvertAndExpand(set, OBJ_ENCODING_HT, size_hint, 1);
}
}
+
文章作者: LemontreeN
文章链接: http://example.com/2024/09/22/Redis%E6%BA%90%E7%A0%81/%E6%95%B0%E6%8D%AE%E7%B1%BB%E5%9E%8B_3_Set/
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 LemontreeN's
\ No newline at end of file diff --git "a/2024/09/22/Redis\346\272\220\347\240\201/\346\225\260\346\215\256\347\261\273\345\236\213_4_ZSet/index.html" "b/2024/09/22/Redis\346\272\220\347\240\201/\346\225\260\346\215\256\347\261\273\345\236\213_4_ZSet/index.html" new file mode 100644 index 00000000..bee2ee14 --- /dev/null +++ "b/2024/09/22/Redis\346\272\220\347\240\201/\346\225\260\346\215\256\347\261\273\345\236\213_4_ZSet/index.html" @@ -0,0 +1,242 @@ +Redis数据类型_4_ZSet | LemontreeN's + + + + + + + + + + + + +
加载中...

Redis数据类型_4_ZSet

ZSet详解

[toc]

+

ZSet - Sorted Set,每一个元素必须指定score值和member值,集合内的元素实际值为member,并按照score值排序。

+
    +
  • member必须唯一(相当于key)
  • +
  • 按照score值排序
  • +
  • 可以根据member查询score
  • +
+

可以看出,ZSet的特点是键值对存储(member - score对)、键唯一、可排序,因此采用了Dict(HT)编码 + SkipList的结构

+
    +
  • SkipList跳表满足键值存储和可排序,但实现满足键唯一、以及根据member查询score困难
  • +
  • Dict(HT)是键值对存储、满足键唯一,但不可排序。
  • +
+
+

由于编码只能写一个,Redis中ZSet的encoding是SkipList

+
+
1
2
3
4
5
// server.h
typedef struct zset {
dict *dict;
zskiplist *zsl;
} zset;
+

image-20240922145225898

+

可以看出,ZSet是一个很消耗内存的数据类型,因此在数据量不多时,ZSet会采用ZipList(Redis6)或Listpack(Redis7)结构来节约内存。

+
    +
  • 需要元素数量小于zset_max_ziplist_entries且每个元素都小于zset_max_ziplist_value (Redis6, 7类似)

    +
  • +
  • 当不满足条件时会自动进行编码转换

    +
  • +
+

ZipList和Listpack本身没有排序功能,且没有键值对的概念,因此需要其他代码辅助实现功能。

+
    +
  • ZipList是连续内存,因此element和score值存储为两个相邻的entry,element在前,score在后。
  • +
  • score越小越接近队首,按照score值升序排列。
  • +
+

image-20240922150726316

+
文章作者: LemontreeN
文章链接: http://example.com/2024/09/22/Redis%E6%BA%90%E7%A0%81/%E6%95%B0%E6%8D%AE%E7%B1%BB%E5%9E%8B_4_ZSet/
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 LemontreeN's
公告
Welcome to my hood!
\ No newline at end of file diff --git "a/2024/09/21/Redis\346\272\220\347\240\201/\346\225\260\346\215\256\347\261\273\345\236\213_2_List/index.html" "b/2024/09/22/Redis\346\272\220\347\240\201/\346\225\260\346\215\256\347\261\273\345\236\213_5_Hash/index.html" similarity index 50% rename from "2024/09/21/Redis\346\272\220\347\240\201/\346\225\260\346\215\256\347\261\273\345\236\213_2_List/index.html" rename to "2024/09/22/Redis\346\272\220\347\240\201/\346\225\260\346\215\256\347\261\273\345\236\213_5_Hash/index.html" index bfa8b35a..9b942a3e 100644 --- "a/2024/09/21/Redis\346\272\220\347\240\201/\346\225\260\346\215\256\347\261\273\345\236\213_2_List/index.html" +++ "b/2024/09/22/Redis\346\272\220\347\240\201/\346\225\260\346\215\256\347\261\273\345\236\213_5_Hash/index.html" @@ -1,17 +1,17 @@ -Redis数据类型_2_List TODO | LemontreeN's +Redis数据类型_4_ZSet | LemontreeN's - - + + - + - - + + -

Redis数据类型_2_List TODO

List详解

[toc]

-
文章作者: LemontreeN
文章链接: http://example.com/2024/09/21/Redis%E6%BA%90%E7%A0%81/%E6%95%B0%E6%8D%AE%E7%B1%BB%E5%9E%8B_2_List/
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 LemontreeN's

Redis数据类型_4_ZSet

Hash详解

[toc]

+
文章作者: LemontreeN
文章链接: http://example.com/2024/09/22/Redis%E6%BA%90%E7%A0%81/%E6%95%B0%E6%8D%AE%E7%B1%BB%E5%9E%8B_5_Hash/
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 LemontreeN's
公告
Welcome to my hood!
文章总览 - 1
2022
倒排索引的Python实现
倒排索引的Python实现
公告
Welcome to my hood!
最新文章
+})()
文章总览 - 1
2022
倒排索引的Python实现
倒排索引的Python实现
公告
Welcome to my hood!
最新文章
分类
网站资讯
文章数目 :
13
已运行时间 :
本站总字数 :
7.4k
本站访客数 :
本站总访问量 :
最后更新时间 :
\ No newline at end of file +
  • Java3
  • NLP1
  • Redis12
  • +
    网站资讯
    文章数目 :
    17
    已运行时间 :
    本站总字数 :
    8.7k
    本站访客数 :
    本站总访问量 :
    最后更新时间 :
    \ No newline at end of file diff --git a/archives/2022/index.html b/archives/2022/index.html index b7c2b99d..cff7c3d8 100644 --- a/archives/2022/index.html +++ b/archives/2022/index.html @@ -51,7 +51,7 @@ isHome: false, isHighlightShrink: false, isToc: false, - postUpdate: '2024-09-21 15:31:58' + postUpdate: '2024-09-22 15:08:53' }
    文章总览 - 1
    2022
    倒排索引的Python实现
    倒排索引的Python实现
    公告
    Welcome to my hood!
    最新文章
    +})()
    文章总览 - 1
    2022
    倒排索引的Python实现
    倒排索引的Python实现
    公告
    Welcome to my hood!
    最新文章
    分类
    网站资讯
    文章数目 :
    13
    已运行时间 :
    本站总字数 :
    7.4k
    本站访客数 :
    本站总访问量 :
    最后更新时间 :
    \ No newline at end of file +
  • Java3
  • NLP1
  • Redis12
  • +
    网站资讯
    文章数目 :
    17
    已运行时间 :
    本站总字数 :
    8.7k
    本站访客数 :
    本站总访问量 :
    最后更新时间 :
    \ No newline at end of file diff --git a/archives/2024/09/index.html b/archives/2024/09/index.html index a48defa8..811a0b8f 100644 --- a/archives/2024/09/index.html +++ b/archives/2024/09/index.html @@ -51,7 +51,7 @@ isHome: false, isHighlightShrink: false, isToc: false, - postUpdate: '2024-09-21 15:31:58' + postUpdate: '2024-09-22 15:08:53' }
    公告
    Welcome to my hood!
    最新文章
    +})()
    公告
    Welcome to my hood!
    最新文章
    分类
    网站资讯
    文章数目 :
    13
    已运行时间 :
    本站总字数 :
    7.4k
    本站访客数 :
    本站总访问量 :
    最后更新时间 :
    \ No newline at end of file +
  • Java3
  • NLP1
  • Redis12
  • +
    网站资讯
    文章数目 :
    17
    已运行时间 :
    本站总字数 :
    8.7k
    本站访客数 :
    本站总访问量 :
    最后更新时间 :
    \ No newline at end of file diff --git a/archives/2024/09/page/2/index.html b/archives/2024/09/page/2/index.html index 43be8c82..88daf111 100644 --- a/archives/2024/09/page/2/index.html +++ b/archives/2024/09/page/2/index.html @@ -51,7 +51,7 @@ isHome: false, isHighlightShrink: false, isToc: false, - postUpdate: '2024-09-21 15:31:58' + postUpdate: '2024-09-22 15:08:53' }
    文章总览 - 12
    2024
    Redis数据结构_2_intset
    Redis数据结构_2_intset
    Redis数据结构_1_SDS
    Redis数据结构_1_SDS
    公告
    Welcome to my hood!
    最新文章
    +})()
    公告
    Welcome to my hood!
    最新文章
    分类
    网站资讯
    文章数目 :
    13
    已运行时间 :
    本站总字数 :
    7.4k
    本站访客数 :
    本站总访问量 :
    最后更新时间 :
    \ No newline at end of file +
  • Java3
  • NLP1
  • Redis12
  • +
    网站资讯
    文章数目 :
    17
    已运行时间 :
    本站总字数 :
    8.7k
    本站访客数 :
    本站总访问量 :
    最后更新时间 :
    \ No newline at end of file diff --git a/archives/2024/index.html b/archives/2024/index.html index 54940e0e..cb1ff7a7 100644 --- a/archives/2024/index.html +++ b/archives/2024/index.html @@ -51,7 +51,7 @@ isHome: false, isHighlightShrink: false, isToc: false, - postUpdate: '2024-09-21 15:31:58' + postUpdate: '2024-09-22 15:08:53' }
    公告
    Welcome to my hood!
    最新文章
    +})()
    公告
    Welcome to my hood!
    最新文章
    分类
    网站资讯
    文章数目 :
    13
    已运行时间 :
    本站总字数 :
    7.4k
    本站访客数 :
    本站总访问量 :
    最后更新时间 :
    \ No newline at end of file +
  • Java3
  • NLP1
  • Redis12
  • +
    网站资讯
    文章数目 :
    17
    已运行时间 :
    本站总字数 :
    8.7k
    本站访客数 :
    本站总访问量 :
    最后更新时间 :
    \ No newline at end of file diff --git a/archives/2024/page/2/index.html b/archives/2024/page/2/index.html index 8a0cc9ba..d15b729b 100644 --- a/archives/2024/page/2/index.html +++ b/archives/2024/page/2/index.html @@ -51,7 +51,7 @@ isHome: false, isHighlightShrink: false, isToc: false, - postUpdate: '2024-09-21 15:31:58' + postUpdate: '2024-09-22 15:08:53' }
    文章总览 - 12
    2024
    Redis数据结构_2_intset
    Redis数据结构_2_intset
    Redis数据结构_1_SDS
    Redis数据结构_1_SDS
    公告
    Welcome to my hood!
    最新文章
    +})()
    公告
    Welcome to my hood!
    最新文章
    分类
    网站资讯
    文章数目 :
    13
    已运行时间 :
    本站总字数 :
    7.4k
    本站访客数 :
    本站总访问量 :
    最后更新时间 :
    \ No newline at end of file +
  • Java3
  • NLP1
  • Redis12
  • +
    网站资讯
    文章数目 :
    17
    已运行时间 :
    本站总字数 :
    8.7k
    本站访客数 :
    本站总访问量 :
    最后更新时间 :
    \ No newline at end of file diff --git a/archives/index.html b/archives/index.html index f8cc74a7..dfa5bf74 100644 --- a/archives/index.html +++ b/archives/index.html @@ -51,7 +51,7 @@ isHome: false, isHighlightShrink: false, isToc: false, - postUpdate: '2024-09-21 15:31:58' + postUpdate: '2024-09-22 15:08:53' }
    公告
    Welcome to my hood!
    最新文章
    +})()
    公告
    Welcome to my hood!
    最新文章
    分类
    网站资讯
    文章数目 :
    13
    已运行时间 :
    本站总字数 :
    7.4k
    本站访客数 :
    本站总访问量 :
    最后更新时间 :
    \ No newline at end of file +
  • Java3
  • NLP1
  • Redis12
  • +
    网站资讯
    文章数目 :
    17
    已运行时间 :
    本站总字数 :
    8.7k
    本站访客数 :
    本站总访问量 :
    最后更新时间 :
    \ No newline at end of file diff --git a/archives/page/2/index.html b/archives/page/2/index.html index cb2e0591..d8aa9026 100644 --- a/archives/page/2/index.html +++ b/archives/page/2/index.html @@ -51,7 +51,7 @@ isHome: false, isHighlightShrink: false, isToc: false, - postUpdate: '2024-09-21 15:31:58' + postUpdate: '2024-09-22 15:08:53' }
    文章总览 - 13
    2024
    Redis数据结构_2_intset
    Redis数据结构_2_intset
    Redis数据结构_1_SDS
    Redis数据结构_1_SDS
    2022
    倒排索引的Python实现
    倒排索引的Python实现
    公告
    Welcome to my hood!
    最新文章
    +})()
    公告
    Welcome to my hood!
    最新文章
    分类
    网站资讯
    文章数目 :
    13
    已运行时间 :
    本站总字数 :
    7.4k
    本站访客数 :
    本站总访问量 :
    最后更新时间 :
    \ No newline at end of file +
  • Java3
  • NLP1
  • Redis12
  • +
    网站资讯
    文章数目 :
    17
    已运行时间 :
    本站总字数 :
    8.7k
    本站访客数 :
    本站总访问量 :
    最后更新时间 :
    \ No newline at end of file diff --git a/categories/Java/index.html b/categories/Java/index.html index a9bb2148..0845df0c 100644 --- a/categories/Java/index.html +++ b/categories/Java/index.html @@ -51,7 +51,7 @@ isHome: false, isHighlightShrink: false, isToc: false, - postUpdate: '2024-09-21 15:31:58' + postUpdate: '2024-09-22 15:08:53' }
    分类 - Java
    2024
    ArrayList详解
    ArrayList详解
    AQS原理
    AQS原理
    公告
    Welcome to my hood!
    最新文章
    +})()
    分类 - Java
    2024
    ArrayList详解
    ArrayList详解
    AQS原理
    AQS原理
    JVM垃圾回收详解
    JVM垃圾回收详解
    公告
    Welcome to my hood!
    最新文章
    分类
    网站资讯
    文章数目 :
    13
    已运行时间 :
    本站总字数 :
    7.4k
    本站访客数 :
    本站总访问量 :
    最后更新时间 :
    \ No newline at end of file +
  • Java3
  • NLP1
  • Redis12
  • +
    网站资讯
    文章数目 :
    17
    已运行时间 :
    本站总字数 :
    8.7k
    本站访客数 :
    本站总访问量 :
    最后更新时间 :
    \ No newline at end of file diff --git a/categories/NLP/index.html b/categories/NLP/index.html index f9a33e24..e2935c91 100644 --- a/categories/NLP/index.html +++ b/categories/NLP/index.html @@ -51,7 +51,7 @@ isHome: false, isHighlightShrink: false, isToc: false, - postUpdate: '2024-09-21 15:31:58' + postUpdate: '2024-09-22 15:08:53' }
    分类 - NLP
    2022
    倒排索引的Python实现
    倒排索引的Python实现
    公告
    Welcome to my hood!
    最新文章
    +})()
    分类 - NLP
    2022
    倒排索引的Python实现
    倒排索引的Python实现
    公告
    Welcome to my hood!
    最新文章
    分类
    网站资讯
    文章数目 :
    13
    已运行时间 :
    本站总字数 :
    7.4k
    本站访客数 :
    本站总访问量 :
    最后更新时间 :
    \ No newline at end of file +
  • Java3
  • NLP1
  • Redis12
  • +
    网站资讯
    文章数目 :
    17
    已运行时间 :
    本站总字数 :
    8.7k
    本站访客数 :
    本站总访问量 :
    最后更新时间 :
    \ No newline at end of file diff --git a/categories/Redis/index.html b/categories/Redis/index.html index a7ca2c9d..98c0dca4 100644 --- a/categories/Redis/index.html +++ b/categories/Redis/index.html @@ -51,7 +51,7 @@ isHome: false, isHighlightShrink: false, isToc: false, - postUpdate: '2024-09-21 15:31:58' + postUpdate: '2024-09-22 15:08:53' }
    公告
    Welcome to my hood!
    最新文章
    +})()
    公告
    Welcome to my hood!
    最新文章
    分类
    网站资讯
    文章数目 :
    13
    已运行时间 :
    本站总字数 :
    7.4k
    本站访客数 :
    本站总访问量 :
    最后更新时间 :
    \ No newline at end of file +
  • Java3
  • NLP1
  • Redis12
  • +
    网站资讯
    文章数目 :
    17
    已运行时间 :
    本站总字数 :
    8.7k
    本站访客数 :
    本站总访问量 :
    最后更新时间 :
    \ No newline at end of file diff --git a/categories/Redis/page/2/index.html b/categories/Redis/page/2/index.html new file mode 100644 index 00000000..71dc744e --- /dev/null +++ b/categories/Redis/page/2/index.html @@ -0,0 +1,179 @@ +分类: Redis | LemontreeN's + + + + + + + +
    加载中...
    分类 - Redis
    2024
    Redis数据结构_2_intset
    Redis数据结构_2_intset
    Redis数据结构_1_SDS
    Redis数据结构_1_SDS
    公告
    Welcome to my hood!
    最新文章
    + + 分类 + +
    +
    网站资讯
    文章数目 :
    17
    已运行时间 :
    本站总字数 :
    8.7k
    本站访客数 :
    本站总访问量 :
    最后更新时间 :
    \ No newline at end of file diff --git a/categories/index.html b/categories/index.html index 11c20368..2b153558 100644 --- a/categories/index.html +++ b/categories/index.html @@ -171,14 +171,14 @@ document.addEventListener('pjax:send', () => { preloader.initLoading() }) document.addEventListener('pjax:complete', () => { preloader.endLoading() }) } -})()
    公告
    Welcome to my hood!
    最新文章
    +})()
    公告
    Welcome to my hood!
    最新文章
    分类
    网站资讯
    文章数目 :
    13
    已运行时间 :
    本站总字数 :
    7.4k
    本站访客数 :
    本站总访问量 :
    最后更新时间 :
    README
    Redis数据类型_1_String
    Redis数据类型_2_List TODO
    Redis数据结构_7_RedisObject
    Redis数据结构_6_SkipList
    Redis数据结构_5_QuickList
    ArrayList详解
    AQS原理
    Redis数据结构_4_Ziplist
    Redis数据结构_3_Dict
    公告
    Welcome to my hood!
    最新文章
    +})()
    README
    Redis数据类型_4_ZSet
    Redis数据类型_4_ZSet
    Redis数据类型_3_Set
    Redis数据类型_2_List
    Redis数据类型_1_String
    Redis数据结构_7_RedisObject
    Redis数据结构_6_SkipList
    Redis数据结构_5_QuickList
    ArrayList详解
    公告
    Welcome to my hood!
    最新文章
    分类
    网站资讯
    文章数目 :
    13
    已运行时间 :
    本站总字数 :
    7.4k
    本站访客数 :
    本站总访问量 :
    最后更新时间 :
    Redis数据结构_2_intset
    Redis数据结构_1_SDS
    倒排索引的Python实现
    公告
    Welcome to my hood!
    最新文章
    +})()
    AQS原理
    JVM垃圾回收详解
    Redis数据结构_4_Ziplist
    Redis数据结构_3_Dict
    Redis数据结构_2_intset
    Redis数据结构_1_SDS
    倒排索引的Python实现
    公告
    Welcome to my hood!
    最新文章
    分类
    网站资讯
    文章数目 :
    13
    已运行时间 :
    本站总字数 :
    7.4k
    本站访客数 :
    本站总访问量 :
    最后更新时间 :
    标签 - ArrayList
    2024
    ArrayList详解
    ArrayList详解
    公告
    Welcome to my hood!
    最新文章
    +})()
    标签 - ArrayList
    2024
    ArrayList详解
    ArrayList详解
    公告
    Welcome to my hood!
    最新文章
    分类
    网站资讯
    文章数目 :
    13
    已运行时间 :
    本站总字数 :
    7.4k
    本站访客数 :
    本站总访问量 :
    最后更新时间 :
    \ No newline at end of file +
  • Java3
  • NLP1
  • Redis12
  • +
    网站资讯
    文章数目 :
    17
    已运行时间 :
    本站总字数 :
    8.7k
    本站访客数 :
    本站总访问量 :
    最后更新时间 :
    \ No newline at end of file diff --git a/tags/JVM/index.html b/tags/JVM/index.html new file mode 100644 index 00000000..8c4ffdef --- /dev/null +++ b/tags/JVM/index.html @@ -0,0 +1,179 @@ +标签: JVM | LemontreeN's + + + + + + + +
    加载中...
    标签 - JVM
    2024
    JVM垃圾回收详解
    JVM垃圾回收详解
    公告
    Welcome to my hood!
    最新文章
    + + 分类 + +
    +
    网站资讯
    文章数目 :
    17
    已运行时间 :
    本站总字数 :
    8.7k
    本站访客数 :
    本站总访问量 :
    最后更新时间 :
    \ No newline at end of file diff --git a/tags/NLP/index.html b/tags/NLP/index.html index 9c7a8283..74e29f0a 100644 --- a/tags/NLP/index.html +++ b/tags/NLP/index.html @@ -51,7 +51,7 @@ isHome: false, isHighlightShrink: false, isToc: false, - postUpdate: '2024-09-21 15:31:58' + postUpdate: '2024-09-22 15:08:53' }
    标签 - NLP
    2022
    倒排索引的Python实现
    倒排索引的Python实现
    公告
    Welcome to my hood!
    最新文章
    +})()
    标签 - NLP
    2022
    倒排索引的Python实现
    倒排索引的Python实现
    公告
    Welcome to my hood!
    最新文章
    分类
    网站资讯
    文章数目 :
    13
    已运行时间 :
    本站总字数 :
    7.4k
    本站访客数 :
    本站总访问量 :
    最后更新时间 :
    \ No newline at end of file +
  • Java3
  • NLP1
  • Redis12
  • +
    网站资讯
    文章数目 :
    17
    已运行时间 :
    本站总字数 :
    8.7k
    本站访客数 :
    本站总访问量 :
    最后更新时间 :
    \ No newline at end of file diff --git a/tags/Redis/index.html b/tags/Redis/index.html index 017cfaeb..873f6ff4 100644 --- a/tags/Redis/index.html +++ b/tags/Redis/index.html @@ -51,7 +51,7 @@ isHome: false, isHighlightShrink: false, isToc: false, - postUpdate: '2024-09-21 15:31:58' + postUpdate: '2024-09-22 15:08:53' }
    公告
    Welcome to my hood!
    最新文章
    +})()
    公告
    Welcome to my hood!
    最新文章
    分类
    网站资讯
    文章数目 :
    13
    已运行时间 :
    本站总字数 :
    7.4k
    本站访客数 :
    本站总访问量 :
    最后更新时间 :
    \ No newline at end of file +
  • Java3
  • NLP1
  • Redis12
  • +
    网站资讯
    文章数目 :
    17
    已运行时间 :
    本站总字数 :
    8.7k
    本站访客数 :
    本站总访问量 :
    最后更新时间 :
    \ No newline at end of file diff --git a/tags/Redis/page/2/index.html b/tags/Redis/page/2/index.html index 30f7161d..c433a112 100644 --- a/tags/Redis/page/2/index.html +++ b/tags/Redis/page/2/index.html @@ -51,7 +51,7 @@ isHome: false, isHighlightShrink: false, isToc: false, - postUpdate: '2024-09-21 15:31:58' + postUpdate: '2024-09-22 15:08:53' }
    标签 - Redis
    2024
    Redis数据结构_1_SDS
    Redis数据结构_1_SDS
    公告
    Welcome to my hood!
    最新文章
    +})()
    公告
    Welcome to my hood!
    最新文章
    分类
    网站资讯
    文章数目 :
    13
    已运行时间 :
    本站总字数 :
    7.4k
    本站访客数 :
    本站总访问量 :
    最后更新时间 :
    \ No newline at end of file +
  • Java3
  • NLP1
  • Redis12
  • +
    网站资讯
    文章数目 :
    17
    已运行时间 :
    本站总字数 :
    8.7k
    本站访客数 :
    本站总访问量 :
    最后更新时间 :
    \ No newline at end of file diff --git a/tags/index.html b/tags/index.html index 0d4e9ae2..a6f8eb45 100644 --- a/tags/index.html +++ b/tags/index.html @@ -171,14 +171,14 @@ document.addEventListener('pjax:send', () => { preloader.initLoading() }) document.addEventListener('pjax:complete', () => { preloader.endLoading() }) } -})()
    公告
    Welcome to my hood!
    最新文章
    +})()
    公告
    Welcome to my hood!
    最新文章
    分类
    网站资讯
    文章数目 :
    13
    已运行时间 :
    本站总字数 :
    7.4k
    本站访客数 :
    本站总访问量 :
    最后更新时间 :