{"id":47640,"date":"2023-09-28T22:35:49","date_gmt":"2023-09-28T14:35:49","guid":{"rendered":"\/\/www.viralrail.com\/?p=47640"},"modified":"2023-09-28T22:35:49","modified_gmt":"2023-09-28T14:35:49","slug":"cjymjsgs","status":"publish","type":"post","link":"\/\/www.viralrail.com\/blog\/47640.html","title":{"rendered":"CRC\u6821\u9a8c\u7801\u8ba1\u7b97\u516c\u5f0f"},"content":{"rendered":"
CRC\u6821\u9a8c\u7801\uff08Cyclic Redundancy Check\uff09\u662f\u4e00\u79cd\u68c0\u6d4b\u7ea0\u9519\u6280\u672f\uff0c\u5b83\u53ef\u4ee5\u68c0\u6d4b\u6570\u636e\u5728\u4f20\u8f93\u8fc7\u7a0b\u4e2d\u662f\u5426\u53d1\u751f\u4e86\u9519\u8bef\u3002CRC\u6821\u9a8c\u7801\u53ef\u4ee5\u68c0\u6d4b\u51fa\u6570\u636e\u4e2d\u7684\u9519\u8bef\uff0c\u4ece\u800c\u5e2e\u52a9\u7cfb\u7edf\u786e\u4fdd\u6570\u636e\u7684\u5b8c\u6574\u6027\u548c\u6b63\u786e\u6027\u3002<\/p>\n
CRC\u6821\u9a8c\u7801\u662f\u57fa\u4e8e\u6570\u636e\u4f20\u8f93\u4e2d\u7684\u5dee\u9519\u68c0\u6d4b\u6280\u672f\uff0c\u5b83\u662f\u4e00\u79cd\u7ea0\u9519\u7f16\u7801\u7684\u7b97\u6cd5\uff0c\u5b83\u53ef\u4ee5\u68c0\u6d4b\u51fa\u6570\u636e\u4e2d\u7684\u9519\u8bef\u3002\u5b83\u7684\u539f\u7406\u662f\uff0c\u5728\u6570\u636e\u4f20\u8f93\u8fc7\u7a0b\u4e2d\uff0c\u5c06\u6570\u636e\u8fdb\u884c\u5206\u7ec4\uff0c\u6bcf\u7ec4\u6570\u636e\u90fd\u4f1a\u88ab\u8ba1\u7b97\u51fa\u4e00\u4e2a\u6821\u9a8c\u7801\uff0c\u7136\u540e\u5c06\u8fd9\u4e9b\u6821\u9a8c\u7801\u53d1\u9001\u5230\u63a5\u6536\u7aef\u3002\u63a5\u6536\u7aef\u6536\u5230\u6570\u636e\u540e\uff0c\u4f1a\u5bf9\u6536\u5230\u7684\u6570\u636e\u548c\u6821\u9a8c\u7801\u8fdb\u884c\u6821\u9a8c\uff0c\u5982\u679c\u68c0\u9a8c\u901a\u8fc7\uff0c\u5219\u8868\u660e\u6570\u636e\u6ca1\u6709\u53d1\u751f\u9519\u8bef\uff0c\u5982\u679c\u68c0\u9a8c\u4e0d\u901a\u8fc7\uff0c\u5219\u8868\u660e\u6570\u636e\u53d1\u751f\u4e86\u9519\u8bef\uff0c\u8fd9\u65f6\u63a5\u6536\u7aef\u5c31\u53ef\u4ee5\u91cd\u65b0\u53d1\u9001\u6570\u636e\uff0c\u4ee5\u786e\u4fdd\u6570\u636e\u7684\u6b63\u786e\u6027\u3002<\/p>\n
CRC\u6821\u9a8c\u7801\u7684\u8ba1\u7b97\u516c\u5f0f\u662f\u4e00\u79cd\u7ea0\u9519\u7f16\u7801\u7684\u8ba1\u7b97\u65b9\u6cd5\uff0c\u5b83\u53ef\u4ee5\u6839\u636e\u6570\u636e\u7684\u957f\u5ea6\u3001\u4f4d\u6570\u3001\u6821\u9a8c\u7801\u7684\u957f\u5ea6\u6765\u8ba1\u7b97\u51fa\u4e00\u4e2a\u6821\u9a8c\u7801\u3002\u5176\u516c\u5f0f\u5982\u4e0b\uff1a<\/p>\n
CRC\u6821\u9a8c\u7801\u7684\u8ba1\u7b97\u516c\u5f0f\u662f\uff1a
CRC = (Data x 2^n) mod (2^m-1)
\u5176\u4e2d\uff1a
Data\uff1a\u8868\u793a\u8981\u8ba1\u7b97\u6821\u9a8c\u7801\u7684\u6570\u636e\uff1b
n\uff1a\u8868\u793a\u6570\u636e\u7684\u4f4d\u6570\uff1b<\/p>\n
m\uff1a\u8868\u793a\u6821\u9a8c\u7801\u7684\u4f4d\u6570\u3002<\/p>\n
CRC\u6821\u9a8c\u7801\u7684\u8ba1\u7b97\u8fc7\u7a0b\u4e3b\u8981\u5206\u4e3a\u4ee5\u4e0b\u51e0\u4e2a\u6b65\u9aa4\uff1a
1.\u5c06\u6570\u636e\u8f6c\u6362\u4e3a\u4e8c\u8fdb\u5236\uff1b
2.\u5c06\u6570\u636e\u7684\u4e8c\u8fdb\u5236\u6570\u636e\u4e58\u4ee52^n\uff1b
3.\u5c06\u4e58\u4ee52^n\u540e\u7684\u7ed3\u679c\u4e0e2^m-1\u53d6\u6a21\uff1b<\/p>\n
4.\u5c06\u53d6\u6a21\u540e\u7684\u7ed3\u679c\u8f6c\u6362\u4e3a\u5341\u516d\u8fdb\u5236\uff0c\u5373\u4e3a\u6700\u7ec8\u7684CRC\u6821\u9a8c\u7801\u3002<\/p>\n
CRC\u6821\u9a8c\u7801\u662f\u4e00\u79cd\u68c0\u6d4b\u7ea0\u9519\u6280\u672f\uff0c\u5b83\u53ef\u4ee5\u68c0\u6d4b\u51fa\u6570\u636e\u5728\u4f20\u8f93\u8fc7\u7a0b\u4e2d\u662f\u5426\u53d1\u751f\u4e86\u9519\u8bef\uff0c\u4ece\u800c\u786e\u4fdd\u6570\u636e\u7684\u5b8c\u6574\u6027\u548c\u6b63\u786e\u6027\u3002<\/strong>CRC\u6821\u9a8c\u7801\u7684\u8ba1\u7b97\u516c\u5f0f\u662f\uff1aCRC = (Data x 2^n) mod (2^m-1)\uff0c\u5176\u8ba1\u7b97\u8fc7\u7a0b\u4e3b\u8981\u5206\u4e3a\u5c06\u6570\u636e\u8f6c\u6362\u4e3a\u4e8c\u8fdb\u5236\uff0c\u5c06\u6570\u636e\u7684\u4e8c\u8fdb\u5236\u6570\u636e\u4e58\u4ee52^n\uff0c\u5c06\u4e58\u4ee52^n\u540e\u7684\u7ed3\u679c\u4e0e2^m-1\u53d6\u6a21\uff0c\u5c06\u53d6\u6a21\u540e\u7684\u7ed3\u679c\u8f6c\u6362\u4e3a\u5341\u516d\u8fdb\u5236\uff0c\u5373\u4e3a\u6700\u7ec8\u7684CRC\u6821\u9a8c\u7801\u3002<\/p>\n","protected":false},"excerpt":{"rendered":" CRC\u6821\u9a8c\u7801\uff08CyclicRedundancyCheck\uff09\u662f\u4e00\u79cd\u68c0\u6d4b\u7ea0\u9519\u6280\u672f\uff0c\u5b83\u53ef\u4ee5\u68c0\u6d4b\u6570\u636e\u5728\u4f20\u8f93\u8fc7\u7a0b\u4e2d\u662f\u5426\u53d1\u751f\u4e86\u9519\u8bef\u3002CRC\u6821\u9a8c\u7801\u53ef\u4ee5\u68c0\u6d4b\u51fa\u6570\u636e\u4e2d\u7684\u9519\u8bef\uff0c\u4ece\u800c\u5e2e\u52a9\u7cfb<\/p>\n","protected":false},"author":1,"featured_media":4132,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"default","ast-global-header-display":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","footnotes":""},"categories":[36],"tags":[151],"class_list":["post-47640","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog","tag-crc"],"_links":{"self":[{"href":"\/\/www.viralrail.com\/wp-json\/wp\/v2\/posts\/47640","targetHints":{"allow":["GET"]}}],"collection":[{"href":"\/\/www.viralrail.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"\/\/www.viralrail.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"\/\/www.viralrail.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"\/\/www.viralrail.com\/wp-json\/wp\/v2\/comments?post=47640"}],"version-history":[{"count":0,"href":"\/\/www.viralrail.com\/wp-json\/wp\/v2\/posts\/47640\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"\/\/www.viralrail.com\/wp-json\/wp\/v2\/media\/4132"}],"wp:attachment":[{"href":"\/\/www.viralrail.com\/wp-json\/wp\/v2\/media?parent=47640"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"\/\/www.viralrail.com\/wp-json\/wp\/v2\/categories?post=47640"},{"taxonomy":"post_tag","embeddable":true,"href":"\/\/www.viralrail.com\/wp-json\/wp\/v2\/tags?post=47640"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}