- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在从事一个我需要了解的对象存储项目 Reed Solomon纠错算法,我经历过这个 Doc作为入门和一些论文。
1. content.sakai.rutgers.edu
2. theseus.fi
但我似乎无法理解单位矩阵(红色框)的下半部分,它来自哪里。这个计算是如何完成的?
谁能解释一下。
最佳答案
编码矩阵是一个 6 x 4 Vandermonde 矩阵,使用经过修改的评估点 {0 1 2 3 4 5},以便矩阵的上部 4 x 4 部分是单位矩阵。要创建矩阵,会生成一个 6 x 4 Vandermonde 矩阵(其中 matrix[r][c] = pow(r,c) ),然后乘以矩阵上部 4 x 4 部分的逆矩阵以生成编码矩阵。这相当于您在上面链接到的维基百科文章中提到的 Reed Solomon 的“原始观点”的“系统编码”,它不同于链接 1. 和 2. 引用的 Reed Solomon 的“BCH 观点”。维基百科的示例系统编码矩阵是问题中使用的编码矩阵的转置版本。
https://en.wikipedia.org/wiki/Vandermonde_matrix
生成编码矩阵的代码在这个github源文件的底部附近:
Vandermonde inverse upper encoding
matrix part of matrix matrix
01 00 00 00 01 00 00 00
01 01 01 01 01 00 00 00 00 01 00 00
01 02 04 08 x 7b 01 8e f4 = 00 00 01 00
01 03 05 0f 00 7a f4 8e 00 00 00 01
01 04 10 40 7a 7a 7a 7a 1b 1c 12 14
01 05 11 55 1c 1b 14 12
解码分两步进行。首先,恢复任何丢失的数据行,然后使用现在恢复的数据重新生成任何丢失的奇偶校验行。
对于2行缺失数据,去掉编码矩阵对应的2行,将4×4子矩阵倒置,用4行非缺失数据和奇偶校验相乘,恢复2行缺失数据的。如果只有 1 行数据缺失,则选择第二个数据行,就好像它缺失一样,以生成倒置矩阵。实际的数据再生只需要将倒矩阵的对应行进行一次矩阵乘法即可。
恢复数据后,将使用编码矩阵的相应行从现在恢复的数据中重新生成任何丢失的奇偶校验行。
根据显示的数据,数学基于有限域 GF(2^8) 模 0x11D。例如,使用编码矩阵的最后一行和数据矩阵的最后一列进行编码是 (0x1c·0x44)+(0x1b·0x48)+(0x14·0x4c)+(0x12·0x50) = 0x25(使用有限域数学)。
问题示例没有明确说明 6 x 4 编码矩阵可以编码 4 x n 矩阵,其中 n 是每行的字节数。 n == 8 的示例:
encode data encoded data
01 00 00 00 31 32 33 34 35 36 37 38
00 01 00 00 31 32 33 34 35 36 37 38 41 42 43 44 45 46 47 48
00 00 01 00 x 41 42 43 44 45 46 47 48 = 49 4a 4b 4c 4d 4e 4f 50
00 00 00 01 49 4a 4b 4c 4d 4e 4f 50 51 52 53 54 55 56 57 58
1b 1c 12 14 51 52 53 54 55 56 57 58 e8 eb ea ed ec ef ee dc
1c 1b 14 12 f5 f6 f7 f0 f1 f2 f3 a1
assume rows 0 and 4 are erasures and deleted from the matrices:
00 01 00 00 41 42 43 44 45 46 47 48
00 00 01 00 49 4a 4b 4c 4d 4e 4f 50
00 00 00 01 51 52 53 54 55 56 57 58
1c 1b 14 12 f5 f6 f7 f0 f1 f2 f3 a1
invert encode sub-matrix:
inverse encode identity
46 68 8f a0 00 01 00 00 01 00 00 00
01 00 00 00 x 00 00 01 00 = 00 01 00 00
00 01 00 00 00 00 00 01 00 00 01 00
00 00 01 00 1c 1b 14 12 00 00 00 01
reconstruct data using sub-matrices:
inverse encoded data restored data
46 68 8f a0 41 42 43 44 45 46 47 48 31 32 33 34 35 36 37 38
01 00 00 00 x 49 4a 4b 4c 4d 4e 4f 50 = 41 42 43 44 45 46 47 48
00 01 00 00 51 52 53 54 55 56 57 58 49 4a 4b 4c 4d 4e 4f 50
00 00 01 00 f5 f6 f7 f0 f1 f2 f3 a1 51 52 53 54 55 56 57 58
The actual process only uses the rows of the matrices that correspond
to the erased rows that need to be reconstructed.
First data is reconstructed:
sub-inverse encoded data reconstructed data
41 42 43 44 45 46 47 48
46 68 8f a0 x 49 4a 4b 4c 4d 4e 4f 50 = 31 32 33 34 35 36 37 38
51 52 53 54 55 56 57 58
f5 f6 f7 f0 f1 f2 f3 a1
Once data is reconstructed, reconstruct parity
sub-encode data reconstruted parity
31 32 33 34 35 36 37 38
1b 1c 12 14 x 41 42 43 44 45 46 47 48 = e8 eb ea ed ec ef ee dc
49 4a 4b 4c 4d 4e 4f 50
51 52 53 54 55 56 57 58
此方法的一个替代方法是使用 BCH view Reed Solomon。对于奇数个奇偶校验,例如RS(20,17)(3个奇偶校验),编码需要2次矩阵乘法和1次异或,而对于单删除只需要异或。对于 e>1 删除,执行 (e-1) 乘以 n 矩阵,然后执行 XOR。对于偶数个奇偶校验,如果使用 XOR 作为编码的一部分,则需要一个 e x n 矩阵乘法来校正,或者使用 e x n 矩阵进行编码,允许一个 XOR 进行校正。
另一种选择是 Raid 6,其中“综合症”附加到数据矩阵,但没有形成正确的代码字。其中一个综合征行,称为 P,只是 XOR,另一行称为 Q,是 GF(2^8) 中 2 的连续幂。对于 3 奇偶校验 Raid 6,第三行称为 R,是 GF(2^8) 中 4 的连续幂。与标准 BCH View 不同,如果 Q 或 R 行丢失,则必须重新计算(而不是使用 XOR 来更正它)。通过使用对角线模式,如果 n 个磁盘中有 1 个发生故障,则在更换磁盘时仅需要重新生成 1/n 的 Q 和 R。
http://alamos.math.arizona.edu/RTG16/ECC/raid6.pdf
请注意,此 pdf 文件的替代方法使用与上述方法相同的有限域 GF(2^8) mod 0x11D,这可能更容易比较这些方法。
关于math - 你能解释一下 Reed Solomon 编码部分的单位矩阵吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59929677/
我有 2 张 table ; item_in(item_id,unit) item_out(item_id,unit) 现在假设我想知道为每个项目插入了多少个单元,我只是查询 select sum(u
API 浏览器中有 3 个速率限制类别: 如果我使用 Youtube 数据 API(其中跟随 implicit OAuth grant flow)创建客户端 Web 应用程序,我是否仍被限制为总共 1
我正在使用一个 postgresql 表,该表包含许多带有 GEOMETRY(Point, 4326) 的行。使用 ST_SnapToGrid 函数和 DISTINCT 选择,我只根据显示的 map
我对 C++ 和 Cppunit 都很陌生。我正在尝试编译一个小的 cppunit 测试。但是,我没有成功。 qwerty@qwerty:~/chessgame/src$ g++ -Wall Coor
我注意到 REM 单位可用于元素的大小,而不仅仅是字体大小。并且对 HTML 字体大小属性非常有用。 html { font-size:1vw } @media all and (max-width:
我试图在 Shapely 中找到线串的长度(以米为单位),但似乎无法达到预期的结果。几乎可以肯定我在坐标系方面犯了一些错误,但我无法弄清楚。 这是单行的一些简化代码: from shapely.geo
对于大量的物种数据集,我试图计算给定月份集的圆形平均值,例如对于从 3 月到 7 月开花的物种,我想知道开花的平均月份(即 5 月),以及围绕平均值的方差。 给定月份是循环的,因此 12 月到 2 月
我还应该在单元测试中释放对象吗? 我注意到在Apple的“iPhoneUnitTests”示例项目中,设置方法中的对象是[[object alloc] init],但从未在单元测试中的任何地方发布?
我目前正在使用 OpenGL 进行开发,并使用米作为我自己的单位,即 20 厘米宽的三角形为 0.2。然而 OpenGL 似乎对这些数字进行了舍入,最终的形状并不完全符合我的意愿。这在 OpenGL
我的问题与对信号进行频谱分析或将信号放入 FFT 并使用合适的数值包解释结果的物理意义有关, 具体: 获取一个信号,例如时变电压 v(t) 将其放入 FFT 中(您将得到复数序列) 现在取模 (abs
在深入研究代码后,我意识到 Fabricjs Text 对象的 fontSize 是在 PIXELS 中测量的。在我的项目中,有时我需要使用点而不是像素。 当指定单位时,我只在代码中找到一个位置,此片
在我的应用程序中,我尝试使用,RentModel.find({prop_location : { $near : [msg.lat, msg.lng],$maxDistance : 500}},函数(
我正在开发我的第一个 LibGdx (Scene2d + Box2d) 游戏,这对我来说是一个全新的领域,但仍然对一些事情感到有点困惑,尤其是关于单位。已经看到了几种不同的处理方法,但仍然不确定哪种方
我正在寻找一个 MySQL 查询(子查询很好),它将以下列格式获取过去一年中每个订单的单位分布: units_per_order | number_of_orders |
我正在使用 Highcharts生成折线图。 我遇到了 numberFormat 的问题: var test = 15975000; numberFormat(test, 0,',','.'); 结果
我正在尝试创建一些用户定义的类型来表示单位,以便我可以强类型化函数参数。例如,长度为毫米,速度为毫米每秒,加速度为毫米每秒等。 到目前为止我已经这样做了: template struct Value
谁能解释一下最低精度的 ULP 单位?我有如下定义,但还是不清楚 “表示分数时的误差大小与存储的数字大小成正比。ULP 或最小精度单位定义了存储数字时可以获得的最大误差。存储的数字越大,ULP 越大”
我有一张卡片图像,我需要重复它 30 次,每次我想申请一张特定卡片的左侧位置时,它会与卡片重叠,然后再停留在一副牌的位置上。 问题是,当我将左侧位置应用于图像卡片时,它会将相同的左侧位置应用于所有卡片
有没有办法用php代码更改每个滚动条的大小。 说明:当我向下滚动时,它会下降x(50~)像素,我想将x改为20。 编辑:这是我的代码。。。 Excel "; $i=1; wh
我不知道下面的想法是否可行或不能概括它,但我想将每个计算值四舍五入到 100 单位四舍五入。 例子: double x; int x_final; ... if (x<400) x_final=400
我是一名优秀的程序员,十分优秀!