WO2017211077A1 - Cross-platform interlinked document id generating method - Google Patents

Cross-platform interlinked document id generating method Download PDF

Info

Publication number
WO2017211077A1
WO2017211077A1 PCT/CN2017/000307 CN2017000307W WO2017211077A1 WO 2017211077 A1 WO2017211077 A1 WO 2017211077A1 CN 2017000307 W CN2017000307 W CN 2017000307W WO 2017211077 A1 WO2017211077 A1 WO 2017211077A1
Authority
WO
WIPO (PCT)
Prior art keywords
information
time
random number
system time
document
Prior art date
Application number
PCT/CN2017/000307
Other languages
French (fr)
Chinese (zh)
Inventor
颜银森
静楷
Original Assignee
福建福昕软件开发股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 福建福昕软件开发股份有限公司 filed Critical 福建福昕软件开发股份有限公司
Publication of WO2017211077A1 publication Critical patent/WO2017211077A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • G06F16/2255Hash tables

Definitions

  • the present invention relates to the field of document network applications, and in particular to a method for generating an interconnected document ID across platforms.
  • This ID is a key indicator if the uuID generated by each platform is used as the interconnection.
  • PDF ID such as Windows operating system using uudCreate, Unix/Linux environment has a small tool called uuIDgen, MacOSX can use CFUUID or CFUUIDCreate and other methods, the platform is different, the generated ID is different, the length of the ID is also different, due to The interconnected PDF service system needs to be fully platform-connected, and the ID generation specifications must be the same. All clients must use the same ID generation method, and need to solve cross-platform problems.
  • ID repetition probability must be low enough, ID length can not be too , So most of the operating system can not be generated uuID as PDF interconnection of ID, ID must have a method of generating a unified cross-platform, this method ensures that the ID is the world's only support the definition of the identity of large amounts of data interconnected documents.
  • the present invention provides a cross-platform interconnection document ID generation method for overcoming at least one problem existing in the prior art.
  • the present invention provides a cross-platform interconnection document ID generation method, including:
  • Step 1 Obtain device information, and the obtained device information is encoded into a first set number of bytes of data by using a hash algorithm.
  • Step 2 Obtain a second set number of bytes of true random numbers as the first random number information
  • Step 3 Obtain operating system status information, where the operating system status information is information when the system is running in the current state, and is encoded into a third set number of bytes of data by using a hash algorithm;
  • Step 4 Obtain a fourth set number of bytes of true random numbers as the second random number information
  • Step 5 Obtain time information, where the time information is composed of current system time, time adjustment parameters, and timestamp adjustment parameters, and is stored in a file on the hard disk after being hash coded;
  • Step 6 The above time information, device information, first random number information, second random number information, operating system state information, user data information, and operating system type information are grouped into a string according to a set order to generate a final interconnected document. ID;
  • steps 1 to 5 can be adjusted.
  • the acquired device information is stored, so that the next generation ID is reused.
  • the device information is simulated using a true random number.
  • the operating system status information is simulated using a true random number.
  • the system is first acquired from the file. Time, time adjustment parameters and timestamp adjustment parameters. If the current system time acquired is later than the last system time, the current system time is taken as a part of the ID; if the current system time obtained is the same as the previous system time, then Adjust the time adjustment parameters so that the current system time and time adjustment parameters are different from the previous system time and time adjustment parameters; if the current system time obtained is earlier than the previous system time, adjust the timestamp adjustment parameters to make the current system time and The timestamp adjustment parameters are different from the last system time and timestamp adjustment parameters.
  • the generated ID specifications are consistent and can be run on different platforms to achieve cross-platform features
  • the time information is stored by using a file, so that the repetition probability of the ID generated by the same device is 0;
  • the ID repetition probability generated by different devices is extremely low
  • the above three points can meet the big data requirements of the interconnected PDF, ensure that an interconnected PDF document corresponds to an ID, realize document interconnection, human interconnection and system interconnection, and provide the basic guarantee for interconnecting the PDF ecosystem in the future.
  • FIG. 1 is a flowchart of a method for generating a cross-platform interconnected document ID according to an embodiment of the present invention.
  • the present invention provides a cross-platform, less reproducible ID generation method.
  • the method for generating ID of the invention has cross-platformity, and the implementation method is implemented by using c/c++, and can be compiled and run on several mainstream desktop platforms and embedded platforms of Windows system, Linux system, Mac, iOS and Android.
  • the ID generated by the present invention consists of the following six parts:
  • time information 1.) time information; 2.) device information; 3.) random number information; 4.) operating system status information; 5.) user data information; 6.) operating system type information.
  • the operating system type information can use one byte to indicate the operating system information, so that the IDs generated by different operating systems are never the same, reducing the repetition probability.
  • User data information allows the user to set a byte of user data as a component of the ID, the user data is arbitrarily defined by the user, such as different software, different use methods of the ID, etc., to reduce the repetition probability.
  • Operating system status information is runtime information running on the operating system of the hardware device, including memory status information, current stack status information, process ID, thread ID, current time, operating system user name, computer name And other software information. This information can be encoded into 8 bytes of data using the SHA1 hash algorithm in the present invention.
  • the random number information may be a pseudo random number or a true random number.
  • the present invention uses a true random number. If the random sequence is considered to be a random number, the following characteristics must be met:
  • each bit of the random sequence should satisfy the equal probability distribution.
  • the probability of 0 and 1 for each bit is 50%;
  • the currently published random sequence test set is: NIST SP800-22, FIPS 140-1, -2. That is to say, we believe that as long as the authentication random sequence is detected by FIPS 140 or SP800-22, then we think it is Random sequence, consistent with random sequence characteristics.
  • a FIPS-detected CryptGenRandom function and a dev/random function are used.
  • Device information includes the number information that can identify the characteristics of the device, such as IP address, MAC address, hard disk reel, etc.
  • IP address can theoretically be a unique number of a computer, and the MAC address can also be used as a unique identifier of a device.
  • Device information such as hard disk reels, which are encoded into 8 bytes of data using the SHA1 hash algorithm in the present invention.
  • Time information consisting of current system time, time adjustment parameters, and timestamp adjustment parameters.
  • FIG. 1 is a flowchart of a method for generating a cross-platform interconnected document ID according to an embodiment of the present invention. As shown in the figure, the cross-platform interconnection document ID generation method includes:
  • Step 1 Obtain device information, and the obtained device information is encoded into a first set number (such as 8 bytes) of byte data by using a hash algorithm (such as a sha1 hash algorithm, an MD5 hash algorithm, etc.);
  • a hash algorithm such as a sha1 hash algorithm, an MD5 hash algorithm, etc.
  • Step 2 Obtain a second set number (such as 6) of byte true random numbers as the first random number information
  • Step 3 Obtain operating system status information, where the operating system status information is information when the system is running in the current state, and is encoded into a third set number by using a hash algorithm (such as a sha1 hash algorithm, an MD5 hash algorithm, etc.). (eg 8) byte data;
  • a hash algorithm such as a sha1 hash algorithm, an MD5 hash algorithm, etc.
  • Step 4 Obtain a fourth set number (such as 10) of byte true random numbers as the second random number information
  • Step 5 Obtain time information, where the time information is composed of current system time, time adjustment parameters, and timestamp adjustment parameters, and is encoded and processed on a hard disk by a hash algorithm (such as a sha1 hash algorithm, an MD5 hash algorithm, etc.).
  • a hash algorithm such as a sha1 hash algorithm, an MD5 hash algorithm, etc.
  • Step 6 The above time information, device information, first random number information, second random number information, operating system state information, user data information, and operating system type information are grouped into a string according to a set order to generate a final interconnected document. ID;
  • steps 1 to 5 can be adjusted.
  • the acquired device information is stored, so that the next generation ID is reused.
  • the device information is simulated using a true random number.
  • the operating system status information is simulated using a true random number.
  • the last system time, time adjustment parameter, and timestamp adjustment parameter are first obtained from the file, and if the current system time obtained is later than the last system time, the current system is obtained.
  • Time is used as a part of the ID; if the current system time obtained is the same as the previous system time, adjust the time adjustment parameter so that the current system time and time adjustment parameters are different from the previous system time and time adjustment parameters; if the current system is acquired The time is earlier than the last system time, and the timestamp adjustment parameter is adjusted so that the current system time and timestamp adjustment parameters are different from the previous system time and timestamp adjustment parameters.
  • the generated ID specifications are consistent and can be run on different platforms to achieve cross-platform features
  • the time information is stored by using a file, so that the repetition probability of the ID generated by the same device is 0;
  • the ID repetition probability generated by different devices is extremely low
  • the above three points can meet the big data requirements of the interconnected PDF, ensure that an interconnected PDF document corresponds to an ID, realize document interconnection, human interconnection and system interconnection, and provide the basic guarantee for interconnecting the PDF ecosystem in the future.
  • modules in the devices in the embodiments may be distributed in the devices of the embodiments according to the embodiments, or may be correspondingly changed in one or more devices different from the embodiment.
  • the modules of the above embodiments may be combined into one module, or may be further split into multiple sub-modules.

Abstract

Disclosed is a cross-platform interlinked document ID generating method. The method comprises: step 1: obtaining device information, wherein the obtained device information is encoded to be a first set number of pieces of byte data by using a hash calculation; step 2: obtaining a true random number of a second set number of pieces of byte data and regarding same as first random number information; step 3: obtaining operating system state information, wherein the operating system state information is information about a system running under a current state, and encoding a third set number of pieces of byte data by using a hash calculation; step 4: obtaining a true random number of a fourth set number of pieces of byte data and regarding same as second random number information; step 5: obtaining time information, wherein the time information is composed of a current system time, a time adjustment parameter and a time stamp adjustment parameter, and is saved in a file of hardware after a hash encoding is performed on the information; step 6: and composing a byte string using the above-mentioned information in accordance with a sequence, and generating a final interlinked document ID.

Description

一种跨平台的互联文档ID生成方法Cross-platform interconnection document ID generation method 技术领域Technical field
本发明涉及文档网络应用领域,具体而言,涉及一种跨平台的互联文档ID生成方法。The present invention relates to the field of document network applications, and in particular to a method for generating an interconnected document ID across platforms.
背景技术Background technique
随着互联PDF文件的诞生和普及,围绕着海量的具有唯一性特征的互联PDF文档的构成的生态圈逐渐被构建。所有的互联PDF文档在逻辑和物理上都是链接的,纵向链接:内容引用、修改、数据、保护、工作流等,横向链接:分发、分享、使用等。允许所有链接对特定文档的快速存取,通过客户端收集互联连接信息并存放云服务的元数据库中,元数据对应着一个互联PDF文档,以上都需要一个唯一ID与一个PDF关联起来,ID就是文档的身份证,通过具有唯一性特征的互联PDF文件,以ID为主线,可以做到文档的互联,人的互联以及系统的互联,这个ID是关键标示,如果利用各个平台生成的uuID作为互联PDF的ID,比如Windows操作系统使用uudCreate,Unix/Linux环境中大都有一个名为uuIDgen的小工具,MacOSX可以使用CFUUID或者CFUUIDCreate等方法,平台不同,生成的ID不同,ID的长度也不同,由于互联PDF服务系统要做到全平台互联,ID的生成规格必须一致,所有的客户端要使用同一种ID生成方法,需要解决跨平台问题,另外,随着互联PDF以后动辄以亿计的文档数量级别的链接,ID的重复概率必须要足够低,ID的长度也不能太短,所以大多数的操作系统生成的uuID都不能作为互联PDF的ID,必须要有一个统一的跨平台的ID生成方法,这个方法确保ID是世界唯一的,支持大数据量互联文档的身份定义。 With the birth and popularity of interconnected PDF files, an ecosystem of interconnected PDF documents with unique features has gradually been built. All interconnected PDF documents are logically and physically linked, with vertical links: content references, modifications, data, protection, workflows, etc., horizontal links: distribution, sharing, usage, etc. Allows all links to quickly access specific documents. The client collects interconnection information and stores the meta-database of the cloud service. The metadata corresponds to an interconnected PDF document. All of the above requires a unique ID associated with a PDF. The ID is The ID of the document, through the unique PDF of the connected PDF file, with the ID as the main line, can achieve the interconnection of documents, the interconnection of people and the interconnection of the system. This ID is a key indicator if the uuID generated by each platform is used as the interconnection. PDF ID, such as Windows operating system using uudCreate, Unix/Linux environment has a small tool called uuIDgen, MacOSX can use CFUUID or CFUUIDCreate and other methods, the platform is different, the generated ID is different, the length of the ID is also different, due to The interconnected PDF service system needs to be fully platform-connected, and the ID generation specifications must be the same. All clients must use the same ID generation method, and need to solve cross-platform problems. In addition, with the number of documents in the future after interconnecting PDFs Level link, ID repetition probability must be low enough, ID length can not be too , So most of the operating system can not be generated uuID as PDF interconnection of ID, ID must have a method of generating a unified cross-platform, this method ensures that the ID is the world's only support the definition of the identity of large amounts of data interconnected documents.
发明内容Summary of the invention
本发明提供一种跨平台的互联文档ID生成方法,用以克服现有技术中存在的至少一个问题。The present invention provides a cross-platform interconnection document ID generation method for overcoming at least one problem existing in the prior art.
为达到上述目的,本发明提供了一种跨平台的互联文档ID生成方法,包括:To achieve the above objective, the present invention provides a cross-platform interconnection document ID generation method, including:
步骤1:获取设备信息,获取的设备信息使用哈希算法编码成第一设定数量个字节数据;Step 1: Obtain device information, and the obtained device information is encoded into a first set number of bytes of data by using a hash algorithm.
步骤2:获取第二设定数量个字节真随机数作为第一随机数信息;Step 2: Obtain a second set number of bytes of true random numbers as the first random number information;
步骤3:获取操作系统状态信息,所述操作系统状态信息是当前状态下系统运行时的信息,使用哈希算法编码成第三设定数量个字节数据;Step 3: Obtain operating system status information, where the operating system status information is information when the system is running in the current state, and is encoded into a third set number of bytes of data by using a hash algorithm;
步骤4:获取第四设定数量个字节真随机数作为第二随机数信息;Step 4: Obtain a fourth set number of bytes of true random numbers as the second random number information;
步骤5:获取时间信息,所述时间信息由当前系统时间、时间调整参数和时间戳调整参数组成,通过哈希编码处理后保存在硬盘的一个文件中;Step 5: Obtain time information, where the time information is composed of current system time, time adjustment parameters, and timestamp adjustment parameters, and is stored in a file on the hard disk after being hash coded;
步骤6:将以上时间信息、设备信息、第一随机数信息、第二随机数信息、操作系统状态信息、用户数据信息、操作系统类型信息按照设定顺序组成一个字符串,生成最终的互联文档ID;Step 6: The above time information, device information, first random number information, second random number information, operating system state information, user data information, and operating system type information are grouped into a string according to a set order to generate a final interconnected document. ID;
其中,步骤1至步骤5的顺序排列可调整。The order of steps 1 to 5 can be adjusted.
进一步地,第一次获取设备信息后,将所获取的设备信息存储起来,以备下一次生成ID重复使用。Further, after the device information is acquired for the first time, the acquired device information is stored, so that the next generation ID is reused.
进一步地,如果设备信息获取不到,使用真随机数模拟设备信息。Further, if the device information is not available, the device information is simulated using a true random number.
进一步地,如果操作系统状态信息获取不到,使用真随机数模拟操作系统状态信息。Further, if the operating system status information is not available, the operating system status information is simulated using a true random number.
进一步地,当需要生成一个ID时,首先从所述文件中获取上一次的系统 时间、时间调整参数和时间戳调整参数,如果获取的当前系统时间比上一次系统时间晚,则将当前的系统时间作为ID的一个部分;如果获取的当前系统时间和上一次系统时间一样,则调整时间调整参数,使当前系统时间和时间调整参数与上一次系统时间和时间调整参数不同;如果获取的当前系统时间比上一次系统时间早,则调整时间戳调整参数,使当前的系统时间和时间戳调整参数与上一次系统时间和时间戳调整参数不同。Further, when it is necessary to generate an ID, the system is first acquired from the file. Time, time adjustment parameters and timestamp adjustment parameters. If the current system time acquired is later than the last system time, the current system time is taken as a part of the ID; if the current system time obtained is the same as the previous system time, then Adjust the time adjustment parameters so that the current system time and time adjustment parameters are different from the previous system time and time adjustment parameters; if the current system time obtained is earlier than the previous system time, adjust the timestamp adjustment parameters to make the current system time and The timestamp adjustment parameters are different from the last system time and timestamp adjustment parameters.
本发明达到的有益效果包括几个方面:The beneficial effects achieved by the present invention include several aspects:
使用同一套c/c++实现,生成的ID规格一致,可以在不同平台运行,达到跨平台特性;Using the same set of c/c++ implementations, the generated ID specifications are consistent and can be run on different platforms to achieve cross-platform features;
使用文件的方式来存储时间信息,使得相同设备生成的ID的重复概率为0;The time information is stored by using a file, so that the repetition probability of the ID generated by the same device is 0;
使用当前操作系统运行信息、设备信息、真随机数信息,使得不同设备生成的ID重复概率极低;Using the current operating system running information, device information, and true random number information, the ID repetition probability generated by different devices is extremely low;
以上三点可以满足互联PDF的大数据需求,保证一个互联PDF文档对应一个ID,实现文档互联,人的互联和系统的互联,为以后互联PDF生态系统提供互联的基础保证。The above three points can meet the big data requirements of the interconnected PDF, ensure that an interconnected PDF document corresponds to an ID, realize document interconnection, human interconnection and system interconnection, and provide the basic guarantee for interconnecting the PDF ecosystem in the future.
附图说明DRAWINGS
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the description of the prior art will be briefly described below. Obviously, the drawings in the following description are only It is a certain embodiment of the present invention, and other drawings can be obtained from those skilled in the art without any creative work.
图1为本发明一个实施例的跨平台的互联文档ID生成方法流程图。FIG. 1 is a flowchart of a method for generating a cross-platform interconnected document ID according to an embodiment of the present invention.
具体实施方式 detailed description
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有付出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. It is obvious that the described embodiments are only a part of the embodiments of the present invention, but not all embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without departing from the inventive scope are the scope of the present invention.
本发明提供一种跨平台的,重复性较低的ID生成方法。本发明生成ID的方法具有跨平台性,实现方法使用c/c++实现,可以在Windows系统、Linux系统、Mac、iOS、Android几个主流的桌面平台和嵌入平台编译和运行。The present invention provides a cross-platform, less reproducible ID generation method. The method for generating ID of the invention has cross-platformity, and the implementation method is implemented by using c/c++, and can be compiled and run on several mainstream desktop platforms and embedded platforms of Windows system, Linux system, Mac, iOS and Android.
本发明生成的ID由以下六个部分构成:The ID generated by the present invention consists of the following six parts:
1.)时间信息;2.)设备信息;3.)随机数信息;4.)操作系统状态信息;5.)用户数据信息;6.)操作系统类型信息。1.) time information; 2.) device information; 3.) random number information; 4.) operating system status information; 5.) user data information; 6.) operating system type information.
操作系统类型信息,本发明可以使用一个字节标示操作系统信息,使得不同操作系统生成的ID永远不相同,降低重复概率。The operating system type information, the present invention can use one byte to indicate the operating system information, so that the IDs generated by different operating systems are never the same, reducing the repetition probability.
用户数据信息,本发明允许用户可以设置一个字节用户数据作为ID的组成部分,用户数据由用户任意定义,比如不同软件,ID的不同使用方法等,降低重复概率。User data information, the present invention allows the user to set a byte of user data as a component of the ID, the user data is arbitrarily defined by the user, such as different software, different use methods of the ID, etc., to reduce the repetition probability.
操作系统状态信息,操作系统状态信息是运行在硬件设备的操作系统上的运行时信息,如包括内存状态信息、当前堆栈状态信息、进程ID、线程ID、当前时间、操作系统用户名称、计算机名称等软件信息。这些信息在本发明中可以使用SHA1哈希算法编码成8个字节数据。Operating system status information, operating system status information is runtime information running on the operating system of the hardware device, including memory status information, current stack status information, process ID, thread ID, current time, operating system user name, computer name And other software information. This information can be encoded into 8 bytes of data using the SHA1 hash algorithm in the present invention.
随机数信息,随机数可以是伪随机数也可以是真随机数,本发明使用真随机数,随机序列如果被认为是随机数,必须要符合以下几个特性:The random number information, the random number may be a pseudo random number or a true random number. The present invention uses a true random number. If the random sequence is considered to be a random number, the following characteristics must be met:
1.)能够通过所有的正确的随机性测试,如fips,SP800等;1.) Can pass all correct randomness tests, such as fips, SP800, etc.;
2.)分布均匀性,随机序列的每一位都应该满足等概率分布,长期来看,每一bits出现的0和1的概率是50%; 2.) Distribution uniformity, each bit of the random sequence should satisfy the equal probability distribution. In the long run, the probability of 0 and 1 for each bit is 50%;
3.)无周期规律性,随机性序列没有周期性,或者说周期性为无限长,并且不能有其他规律性,自相关系数等于0,随机序列内部所有的子序列都应该是随机的,子序列满足随机序列的各种特性;3.) There is no periodicity, the random sequence has no periodicity, or the periodicity is infinitely long, and there is no other regularity. The autocorrelation coefficient is equal to 0. All subsequences in the random sequence should be random. The sequence satisfies various characteristics of the random sequence;
4.)不可预测性,包括不可向后预测和向前预测;4.) Unpredictability, including non-backward prediction and forward prediction;
5.)不可重复性,即使使用相同的生成手段,也不会生成相同的随机序列;5.) Non-repeatable, even if the same generation means are used, the same random sequence will not be generated;
6.)目前已经发布的随机序列测试集合有:NIST SP800-22,FIPS 140-1,-2.也就是说我们认为只要通过FIPS 140或者SP800-22检测认证的随机序列,那么我们就认为是随机序列,符合随机序列特性.。6.) The currently published random sequence test set is: NIST SP800-22, FIPS 140-1, -2. That is to say, we believe that as long as the authentication random sequence is detected by FIPS 140 or SP800-22, then we think it is Random sequence, consistent with random sequence characteristics.
在本发明中使用经过FIPS检测的CryptGenRandom函数和dev/random函数生成。In the present invention, a FIPS-detected CryptGenRandom function and a dev/random function are used.
设备信息,设备信息包括是能够标识设备特性的编号信息组成,如IP地址、MAC地址、硬盘卷轴等,IP地址理论上可以作为一台计算机的唯一编号,MAC地址也可以作为一个设备的唯一标识,硬盘卷轴等设备信息,这些信息在本发明中使用SHA1哈希算法编码成8个字节数据。Device information, device information includes the number information that can identify the characteristics of the device, such as IP address, MAC address, hard disk reel, etc. The IP address can theoretically be a unique number of a computer, and the MAC address can also be used as a unique identifier of a device. Device information such as hard disk reels, which are encoded into 8 bytes of data using the SHA1 hash algorithm in the present invention.
时间信息,由当前系统时间、时间调整参数和时间戳调整参数组成。Time information, consisting of current system time, time adjustment parameters, and timestamp adjustment parameters.
图1为本发明一个实施例的跨平台的互联文档ID生成方法流程图。如图所示,跨平台的互联文档ID生成方法包括:FIG. 1 is a flowchart of a method for generating a cross-platform interconnected document ID according to an embodiment of the present invention. As shown in the figure, the cross-platform interconnection document ID generation method includes:
步骤1:获取设备信息,获取的设备信息使用哈希算法(如sha1哈希算法、MD5哈希算法等)编码成第一设定数个(如8个)字节数据;Step 1: Obtain device information, and the obtained device information is encoded into a first set number (such as 8 bytes) of byte data by using a hash algorithm (such as a sha1 hash algorithm, an MD5 hash algorithm, etc.);
步骤2:获取第二设定数量个(如6个)字节真随机数作为第一随机数信息;Step 2: Obtain a second set number (such as 6) of byte true random numbers as the first random number information;
步骤3:获取操作系统状态信息,所述操作系统状态信息是当前状态下系统运行时的信息,使用哈希算法(如sha1哈希算法、MD5哈希算法等)编码成第三设定数量个(如8个)字节数据; Step 3: Obtain operating system status information, where the operating system status information is information when the system is running in the current state, and is encoded into a third set number by using a hash algorithm (such as a sha1 hash algorithm, an MD5 hash algorithm, etc.). (eg 8) byte data;
步骤4:获取第四设定数量个(如10个)字节真随机数作为第二随机数信息;Step 4: Obtain a fourth set number (such as 10) of byte true random numbers as the second random number information;
步骤5:获取时间信息,所述时间信息由当前系统时间、时间调整参数和时间戳调整参数组成,通过哈希算法(如sha1哈希算法、MD5哈希算法等)编码处理后保存在硬盘的一个文件中;Step 5: Obtain time information, where the time information is composed of current system time, time adjustment parameters, and timestamp adjustment parameters, and is encoded and processed on a hard disk by a hash algorithm (such as a sha1 hash algorithm, an MD5 hash algorithm, etc.). In a file;
步骤6:将以上时间信息、设备信息、第一随机数信息、第二随机数信息、操作系统状态信息、用户数据信息、操作系统类型信息按照设定顺序组成一个字符串,生成最终的互联文档ID;Step 6: The above time information, device information, first random number information, second random number information, operating system state information, user data information, and operating system type information are grouped into a string according to a set order to generate a final interconnected document. ID;
其中,步骤1至步骤5的顺序排列可调整。The order of steps 1 to 5 can be adjusted.
进一步地,第一次获取设备信息后,将所获取的设备信息存储起来,以备下一次生成ID重复使用。Further, after the device information is acquired for the first time, the acquired device information is stored, so that the next generation ID is reused.
进一步地,如果设备信息获取不到,使用真随机数模拟设备信息。Further, if the device information is not available, the device information is simulated using a true random number.
进一步地,如果操作系统状态信息获取不到,使用真随机数模拟操作系统状态信息。Further, if the operating system status information is not available, the operating system status information is simulated using a true random number.
进一步地,当需要生成一个ID时,首先从所述文件中获取上一次的系统时间、时间调整参数和时间戳调整参数,如果获取的当前系统时间比上一次系统时间晚,则将当前的系统时间作为ID的一个部分;如果获取的当前系统时间和上一次系统时间一样,则调整时间调整参数,使当前系统时间和时间调整参数与上一次系统时间和时间调整参数不同;如果获取的当前系统时间比上一次系统时间早,则调整时间戳调整参数,使当前的系统时间和时间戳调整参数与上一次系统时间和时间戳调整参数不同。Further, when an ID needs to be generated, the last system time, time adjustment parameter, and timestamp adjustment parameter are first obtained from the file, and if the current system time obtained is later than the last system time, the current system is obtained. Time is used as a part of the ID; if the current system time obtained is the same as the previous system time, adjust the time adjustment parameter so that the current system time and time adjustment parameters are different from the previous system time and time adjustment parameters; if the current system is acquired The time is earlier than the last system time, and the timestamp adjustment parameter is adjusted so that the current system time and timestamp adjustment parameters are different from the previous system time and timestamp adjustment parameters.
本发明达到的有益效果包括几个方面:The beneficial effects achieved by the present invention include several aspects:
使用同一套c/c++实现,生成的ID规格一致,可以在不同平台运行,达到跨平台特性; Using the same set of c/c++ implementations, the generated ID specifications are consistent and can be run on different platforms to achieve cross-platform features;
使用文件的方式来存储时间信息,使得相同设备生成的ID的重复概率为0;The time information is stored by using a file, so that the repetition probability of the ID generated by the same device is 0;
使用当前操作系统运行信息、设备信息、真随机数信息,使得不同设备生成的ID重复概率极低;Using the current operating system running information, device information, and true random number information, the ID repetition probability generated by different devices is extremely low;
以上三点可以满足互联PDF的大数据需求,保证一个互联PDF文档对应一个ID,实现文档互联,人的互联和系统的互联,为以后互联PDF生态系统提供互联的基础保证。The above three points can meet the big data requirements of the interconnected PDF, ensure that an interconnected PDF document corresponds to an ID, realize document interconnection, human interconnection and system interconnection, and provide the basic guarantee for interconnecting the PDF ecosystem in the future.
本领域普通技术人员可以理解:附图只是一个实施例的示意图,附图中的模块或流程并不一定是实施本发明所必须的。It will be understood by those of ordinary skill in the art that the drawings are only a schematic diagram of an embodiment, and the modules or processes in the drawings are not necessarily required to implement the invention.
本领域普通技术人员可以理解:实施例中的装置中的模块可以按照实施例描述分布于实施例的装置中,也可以进行相应变化位于不同于本实施例的一个或多个装置中。上述实施例的模块可以合并为一个模块,也可以进一步拆分成多个子模块。It will be understood by those skilled in the art that the modules in the devices in the embodiments may be distributed in the devices of the embodiments according to the embodiments, or may be correspondingly changed in one or more devices different from the embodiment. The modules of the above embodiments may be combined into one module, or may be further split into multiple sub-modules.
最后应说明的是:以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明实施例技术方案的精神和范围。 It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and are not limited thereto; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that The technical solutions described in the foregoing embodiments are modified, or the equivalents of the technical features are replaced by the equivalents of the technical solutions of the embodiments of the present invention.

Claims (5)

  1. 一种跨平台的互联文档ID生成方法,其特征在于,包括:A cross-platform interconnection document ID generation method, comprising:
    步骤1:获取设备信息,获取的设备信息使用哈希算法编码成第一设定数量个字节数据;Step 1: Obtain device information, and the obtained device information is encoded into a first set number of bytes of data by using a hash algorithm.
    步骤2:获取第二设定数量个字节真随机数作为第一随机数信息;Step 2: Obtain a second set number of bytes of true random numbers as the first random number information;
    步骤3:获取操作系统状态信息,所述操作系统状态信息是当前状态下系统运行时的信息,使用哈希算法编码成第三设定数量个字节数据;Step 3: Obtain operating system status information, where the operating system status information is information when the system is running in the current state, and is encoded into a third set number of bytes of data by using a hash algorithm;
    步骤4:获取第四设定数量个字节真随机数作为第二随机数信息;Step 4: Obtain a fourth set number of bytes of true random numbers as the second random number information;
    步骤5:获取时间信息,所述时间信息由当前系统时间、时间调整参数和时间戳调整参数组成,通过哈希编码处理后保存在硬盘的一个文件中;Step 5: Obtain time information, where the time information is composed of current system time, time adjustment parameters, and timestamp adjustment parameters, and is stored in a file on the hard disk after being hash coded;
    步骤6:将以上时间信息、设备信息、第一随机数信息、第二随机数信息、操作系统状态信息、用户数据信息、操作系统类型信息按照设定顺序组成一个字符串,生成最终的互联文档ID;Step 6: The above time information, device information, first random number information, second random number information, operating system state information, user data information, and operating system type information are grouped into a string according to a set order to generate a final interconnected document. ID;
    其中,步骤1至步骤5的顺序排列可调整。The order of steps 1 to 5 can be adjusted.
  2. 根据权利要求1所述的跨平台的互联文档ID生成方法,其特征在于,第一次获取设备信息后,将所获取的设备信息存储起来,以备下一次生成ID重复使用。The cross-platform interconnection document ID generation method according to claim 1, wherein after the device information is acquired for the first time, the acquired device information is stored for use in generating the ID reuse for the next time.
  3. 根据权利要求1所述的跨平台的互联文档ID生成方法,其特征在于,如果设备信息获取不到,使用真随机数模拟设备信息。The method for generating a cross-platform interconnected document ID according to claim 1, wherein if the device information is not available, the device information is simulated using a true random number.
  4. 根据权利要求1所述的跨平台的互联文档ID生成方法,其特征在于,如果操作系统状态信息获取不到,使用真随机数模拟操作系统状态信息。The method for generating a cross-platform interconnected document ID according to claim 1, wherein if the operating system state information is not available, the operating system state information is simulated using a true random number.
  5. 根据权利要求1所述的跨平台的互联文档ID生成方法,其特征在于, 当需要生成一个ID时,首先从所述文件中获取上一次的系统时间、时间调整参数和时间戳调整参数,如果获取的当前系统时间比上一次系统时间晚,则将当前的系统时间作为ID的一个部分;如果获取的当前系统时间和上一次系统时间一样,则调整时间调整参数,使当前系统时间和时间调整参数与上一次系统时间和时间调整参数不同;如果获取的当前系统时间比上一次系统时间早,则调整时间戳调整参数,使当前的系统时间和时间戳调整参数与上一次系统时间和时间戳调整参数不同。 The cross-platform interconnected document ID generation method according to claim 1, wherein When an ID needs to be generated, the system time, time adjustment parameter, and timestamp adjustment parameter are first obtained from the file. If the current system time is later than the last system time, the current system time is used as the ID. If the current system time is the same as the previous system time, adjust the time adjustment parameters so that the current system time and time adjustment parameters are different from the previous system time and time adjustment parameters; if the current system time is higher than the previous system time When the system time is early, adjust the timestamp adjustment parameters so that the current system time and timestamp adjustment parameters are different from the previous system time and timestamp adjustment parameters.
PCT/CN2017/000307 2016-06-07 2017-04-19 Cross-platform interlinked document id generating method WO2017211077A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610399667.2 2016-06-07
CN201610399667.2A CN107480151A (en) 2016-06-07 2016-06-07 A kind of cross-platform interconnection document id generation method

Publications (1)

Publication Number Publication Date
WO2017211077A1 true WO2017211077A1 (en) 2017-12-14

Family

ID=60578363

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/000307 WO2017211077A1 (en) 2016-06-07 2017-04-19 Cross-platform interlinked document id generating method

Country Status (2)

Country Link
CN (1) CN107480151A (en)
WO (1) WO2017211077A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112383381A (en) * 2020-10-30 2021-02-19 刘锋 Coding method and device suitable for interconnection of everything and electronic equipment

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109410314A (en) * 2018-04-28 2019-03-01 武汉思普崚技术有限公司 The method and device of topological structure dynamic rendering based on three-dimensional space
CN116823141A (en) * 2023-04-25 2023-09-29 广东企企通科技有限公司 Payment data processing method, device, equipment and medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8136025B1 (en) * 2003-07-03 2012-03-13 Google Inc. Assigning document identification tags
CN102768673A (en) * 2012-06-12 2012-11-07 上海方正数字出版技术有限公司 Method and device for coding XML (extensible markup language) data node identity codes
CN105005624A (en) * 2015-07-31 2015-10-28 天脉聚源(北京)传媒科技有限公司 Method and device for generating index document ID

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007060355A (en) * 2005-08-25 2007-03-08 Fuji Xerox Co Ltd Image processing unit, image processing method, and image processing program
JP2013037642A (en) * 2011-08-11 2013-02-21 Canon Inc Document generation system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8136025B1 (en) * 2003-07-03 2012-03-13 Google Inc. Assigning document identification tags
CN102768673A (en) * 2012-06-12 2012-11-07 上海方正数字出版技术有限公司 Method and device for coding XML (extensible markup language) data node identity codes
CN105005624A (en) * 2015-07-31 2015-10-28 天脉聚源(北京)传媒科技有限公司 Method and device for generating index document ID

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
YU, F., MONGODB DOCUMENT GLOBALLY UNIQUE ID, 15 October 2012 (2012-10-15), Retrieved from the Internet <URL:http://blog.csdn.net/vltic/article/details/8073741> *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112383381A (en) * 2020-10-30 2021-02-19 刘锋 Coding method and device suitable for interconnection of everything and electronic equipment
CN112383381B (en) * 2020-10-30 2023-08-25 刘锋 Coding method and device suitable for everything interconnection and electronic equipment

Also Published As

Publication number Publication date
CN107480151A (en) 2017-12-15

Similar Documents

Publication Publication Date Title
US20180157700A1 (en) Storing and verifying event logs in a blockchain
US20190268138A1 (en) Meta block chain
CN109889505B (en) Data consistency verification method and terminal equipment
CN108270874B (en) Application program updating method and device
JP5860556B1 (en) Inconsistency detection method, inconsistency detection system, inconsistency detection apparatus, and program
CN110163006B (en) Signature verification method, system, device and equipment in block chain type account book
US11057220B2 (en) Signature verification for a blockchain ledger
US20150207632A1 (en) Random Number Generation Failure Detection and Entropy Estimation
WO2020199711A1 (en) Data storage method, system, device and apparatus
CN110543448A (en) data synchronization method, device, equipment and computer readable storage medium
US20210303633A1 (en) Shard hashing
WO2017211077A1 (en) Cross-platform interlinked document id generating method
WO2020199713A1 (en) Data verification method, system, apparatus, and device
US11489660B2 (en) Re-encrypting data on a hash chain
WO2019222006A1 (en) Obfuscation and deletion of personal data in a loosely-coupled distributed system
CN110190963B (en) Monitoring method, device and equipment for time service certificate generation request
WO2016127664A1 (en) Access control method and system
Apostal et al. Password recovery using MPI and CUDA
US20160330181A1 (en) Securing data in a dispersed storage network
Bertoin Sizes of the largest clusters for supercritical percolation on random recursive trees
US20110154015A1 (en) Method For Segmenting A Data File, Storing The File In A Separate Location, And Recreating The File
US20140279946A1 (en) System and Method for Automatic Integrity Checks in a Key/Value Store
WO2017211076A1 (en) Automatic filling method for associated documents
CN114218595A (en) File protection method and system in cloud computing platform
CN105933303B (en) A kind of detection method and device that file is distorted

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17809518

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17809518

Country of ref document: EP

Kind code of ref document: A1