ID generation method and device

Yin Chuanwen,Wu Feng,Guo Wei
2019-01-01
Abstract:The invention discloses an ID generation method and device. The method comprises the steps of receiving a request initiated by a client; Determining a first receiving order value corresponding to therequest; Determining a first node ID of the server receiving the request; Receiving time information of the request; And determining the ID corresponding to the request according to the first receiving order value, the first node ID and the time information. The purpose of obtaining the ID corresponding to the request through the first receiving sequence value, the first node ID and the time information is achieved, and therefore it can be guaranteed that the ID has 100% uniqueness in the Internet application scene. Meanwhile, the first receiving order value, the first node ID and the time information occupy 1-10bit, 1-12bit and 1-41bit of data , the reddish ID corresponding to the request occupies 63 bits at most, so that compared with the condition that 64 bits are needed by the ID in the prior art, the resource occupation can be greatly reduced in the aspects of calculation, storage and network transmission.
What problem does this paper attempt to address?