Yuav ua li cas thiaj muaj kev sib tsoo GUID?
Yuav ua li cas thiaj muaj kev sib tsoo GUID?

Video: Yuav ua li cas thiaj muaj kev sib tsoo GUID?

Video: Yuav ua li cas thiaj muaj kev sib tsoo GUID?
Video: Muaj Yis hauv Xib tes yuav Qhia tau Txoj Hmoo li cas 2024, Kaum ib hlis
Anonim

Piv txwv tias yog qhov zoo tshaj plaws ntawm entropy ntawm txhua lub tshuab tsim random GUIDs , muaj 50% caij nyoog ntawm kev sib tsoo tom qab 2.7e18 random GUIDs tau tsim tawm. Qhov ntawd yog ntau tshaj 2.7 lab lab lab. Qhov ntawd ntau heev.

Ntxiv mus, yuav ua li cas thiaj tsim tau tib GUID?

Lub sij hawm GUID feem ntau yog siv los ntawm cov neeg tsim khoom ua haujlwm nrog Microsoft thev naus laus zis, thaum UUID siv txhua qhov chaw. 128-ntsis yog qhov loj txaus thiab tiam algorithm yog qhov tshwj xeeb uas yog 1, 000, 000, 000 GUIDs ib ob yog generated rau 1 xyoo lub qhov tshwm sim ntawm ib tug duplicate yuav tsuas yog 50%.

Ib yam li ntawd, GUID yog siv rau dab tsi? A GUID (lub ntiaj teb cim cim) yog ib lo lus siv los ntawm Microsoft rau ib tus lej uas nws cov programming tsim los tsim kom muaj tus kheej tshwj xeeb rau ib qho chaw xws li Worddocument. GUIDs yog dav siv hauv Microsoft cov khoom lag luam txhawm rau txheeb xyuas qhov sib cuam tshuam, cov txheej txheem replica, cov ntaub ntawv, thiab lwm yam khoom.

Xav txog qhov no, muaj pes tsawg GUID kev sib txuas?

Tsim GUID Tsis paub: " Nyob ntawd yog 122 random khoom (128 - 2 forvariant - 4 rau version) yog li qhov no suav rau 2^122 lossis 5, 316, 911, 983, 139, 663, 491, 615, 228, 241, 121, 400, kev sib xyaw ua ke ."

Puas yog GUIDs random?

GUIDs yog tsim los kom muaj qhov tshwj xeeb, tsis yog random . Cov GUID tiam algorithm yog tsim los rau uniqueness. Nws tsis yog tsim los rau randomness lossis forunpredictability. Tseeb, yog tias koj saib ntawm kev sib tham ua ntej, koj tuaj yeem pom tias qhov hu ua Algorithm 1 tsis yog- random thiab tag nrho kwv yees.

Pom zoo: