Method and device for generating user unique identification

Through the multi-encryption algorithm, the initial user identification and user-unique identification are solved, and the problem of insufficient security of user-unique identification in the prior art is achieved, and higher identity authentication and data protection security are achieved.

CN118784314BActive Publication Date: 2025-03-25BEIJING SHENZHOU LOONGSON ANCHUANG INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410920218.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-10
Publication Date
2025-03-25
Estimated Expiration
2044-07-10

AI Technical Summary

Technical Problem

The prior art is difficult to generate a user-unique identifier with high security, resulting in risks in user identity authentication and data protection.

Method used

The initial user ID is generated by obtaining timestamps, random numbers and auto-incremental numbers, and the initial user ID is encrypted and digested by using multiple encryption algorithms (symmetric algorithms, hash algorithms and asymmetric algorithms), generating a user-unique ID, and encoding it into a QR code.

Benefits of technology

Improve the security of user unique identifiers, prevent data tampering and identity forgery, and enhance the reliability of user identity authentication.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118784314B_ABST
    Figure CN118784314B_ABST
Patent Text Reader

Abstract

The present disclosure provides a method and device for generating a user unique identifier, the method comprising generating an initial user identifier according to an acquired first timestamp, a first random number and a self-increment number, and obtaining original message information of the initial user identifier; using a first encryption algorithm to encrypt the original message information using a pre-acquired key to obtain encrypted message information; using a second encryption algorithm to encrypt the original message information to obtain summary information; using a third encryption algorithm's private key to encrypt a third random number to obtain a random number ciphertext, and using the third encryption algorithm's public key and the initial user identifier as digital watermark information; generating a user unique identifier according to the encrypted message information, the random number ciphertext, the summary information and the digital watermark information. The present application uses a variety of encryption algorithms to encrypt again after generating the initial user identifier, to obtain a double-encrypted user unique identifier, which is more secure.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of data processing technology, and in particular to a method and device for generating a unique user identifier. Background Art

[0002] The user unique identifier is the user's unique identity ID. The same identity ID will be regarded as the same user. How to generate a user unique identifier with strong security is an urgent problem to be solved. Summary of the invention

[0003] The present disclosure provides a method and device for generating a unique user identifier to at least solve the above technical problems existing in the prior art.

[0004] According to a first aspect of the present disclosure, a method for generating a user unique identifier is provided, the method comprising:

[0005] Generate an initial user identifier according to the acquired first timestamp, the first random number and the self-increment number, and obtain original message information of the initial user identifier;

[0006] Using a first encryption algorithm and a pre-acquired key to encrypt the original message information to obtain encrypted message information;

[0007] Encrypting the original message information using a second encryption algorithm to obtain summary information;

[0008] Encrypting the third random number using the private key of the third encryption algorithm to obtain a random number ciphertext, and using the public key of the third encryption algorithm and the initial user identifier as digital watermark information;

[0009] A user unique identifier is generated according to the encrypted message information, random number ciphertext, summary information and digital watermark information.

[0010] In one possible implementation, the generating the initial user identifier according to the acquired first timestamp, the first random number and the self-increment number includes:

[0011] Generate a first timestamp according to the time, generate a first random number using a random number generator, and generate a self-increasing number according to a sequence number increase rule;

[0012] Generate a timestamp hash code according to the first timestamp, generate a random number hash code according to the first random number, and generate a self-incrementing number hash code according to the self-incrementing number;

[0013] An initial user identifier is generated according to the timestamp hash code, the random number hash code and the self-increment hash code.

[0014] In one possible implementation manner, the obtaining of the original message information of the initial user identifier includes:

[0015] Acquiring message information that needs to be protected based on the initial user identifier;

[0016] The second timestamp information is added to the message information to obtain the original message information.

[0017] In one possible implementation manner, the adopting a first encryption algorithm to encrypt the original message information using a pre-acquired key to obtain the encrypted message information includes:

[0018] Obtain a third random number using a random number generator;

[0019] The third random number is used as a key and a symmetric algorithm is adopted to encrypt the original message information to obtain encrypted message information.

[0020] In one possible implementation manner, the user unique identifier is displayed using a QR code; the generating the user unique identifier according to the encrypted message information, the random number ciphertext, the summary information and the digital watermark information includes:

[0021] The encrypted message information, random number ciphertext, summary information and digital watermark information are encoded into the information area, encryption area, verification area and watermark area of ​​the two-dimensional code according to the two-dimensional code encoding rules or preset encoding rules.

[0022] In one possible implementation, it also includes:

[0023] Scan and verify the unique identifier of the user;

[0024] The scanning verification includes offline scanning verification and online scanning verification.

[0025] In one possible implementation, the offline scanning verification includes:

[0026] Scan the QR code to obtain encrypted message information, random number ciphertext, summary information and digital watermark information;

[0027] The fourth encryption algorithm is used to extract the public key information in the digital watermark information.

[0028] Decrypting the random number ciphertext in the encryption area using the public key of the third encryption algorithm to obtain the random number plaintext;

[0029] Using the random number plaintext as the key of the first encryption algorithm, decrypting the encrypted message information in the information area to obtain the decrypted original message information;

[0030] Using a second encryption algorithm to calculate the original message information to generate summary information;

[0031] The generated summary information is compared with the summary information in the information area. If they are consistent, it is considered that the original data has not been tampered with and the verification is successful. Otherwise, it is considered that the data has been tampered with and the verification is unsuccessful.

[0032] In one possible implementation, the online scanning verification includes:

[0033] Scan the QR code to obtain encrypted message information, random number ciphertext, summary information and digital watermark information;

[0034] Using a fourth encryption algorithm to extract the public key information and the initial user identifier of the digital watermark information;

[0035] Decrypting the random number ciphertext in the encryption area using the public key of the third encryption algorithm to obtain the random number plaintext;

[0036] Using the random number plaintext as the key of the first encryption algorithm, decrypting the encrypted message information in the information area to obtain the decrypted original message information;

[0037] Using a second encryption algorithm to calculate the original message information to generate summary information;

[0038] Compare the generated summary information with the summary information in the information area. If they are consistent, it is considered that the original data has not been tampered with and the verification is successful. Otherwise, it is considered that the data has been tampered with and the verification is unsuccessful.

[0039] At the same time, the initial user identification, the second random number, and the second timestamp are encrypted using a public key algorithm of a third encryption algorithm and transmitted to a backend server;

[0040] The backend server performs decryption according to the private key of the third encryption algorithm to obtain the initial user identifier, the second timestamp, and the second random number;

[0041] The backend server searches for the second timestamp and the second random number corresponding to the initial user identifier in the database, and compares them with the second timestamp and the second random number obtained after decryption. If they are equal, it indicates that the verification is passed, otherwise it indicates that the verification is failed.

[0042] In one possible implementation, the first encryption algorithm adopts a symmetric algorithm;

[0043] The second encryption algorithm adopts a hash algorithm;

[0044] The third encryption algorithm adopts an asymmetric algorithm;

[0045] The fourth encryption algorithm adopts a digital watermark algorithm.

[0046] According to a second aspect of the present disclosure, a device for generating a user unique identifier is provided, the device comprising:

[0047] An acquisition module, used to generate an initial user identifier according to the acquired first timestamp, the first random number and the self-increment number, and to acquire original message information of the initial user identifier;

[0048] A first encryption module, used to encrypt the original message information using a pre-acquired key using a first encryption algorithm to obtain encrypted message information;

[0049] A second encryption module, used to encrypt the original message information using a second encryption algorithm to obtain summary information;

[0050] A third encryption module, used to encrypt a third random number using a private key of a third encryption algorithm to obtain a random number ciphertext, and to use a public key of the third encryption algorithm and an initial user identifier as digital watermark information;

[0051] A generation module is used to generate a user unique identifier according to the encrypted message information, random number ciphertext, summary information and digital watermark information.

[0052] According to a third aspect of the present disclosure, there is provided an electronic device, including:

[0053] at least one processor; and

[0054] a memory communicatively connected to the at least one processor; wherein,

[0055] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method described in the present disclosure.

[0056] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to cause the computer to execute the method described in the present disclosure.

[0057] The user unique identification generation method and device disclosed in the present invention first obtains the initial user identification, and then encrypts the initial user identification to obtain the user unique identification, which is equivalent to double encrypting the user unique identification, so that the obtained user unique identification is more secure.

[0058] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] The above and other objects, features and advantages of the exemplary embodiments of the present disclosure will become readily understood by reading the detailed description below with reference to the accompanying drawings. In the accompanying drawings, several embodiments of the present disclosure are shown in an exemplary and non-limiting manner, in which:

[0060] In the drawings, the same or corresponding reference numerals represent the same or corresponding parts.

[0061] Figure 1 A schematic diagram of the implementation process of the method for generating a unique user identifier according to an embodiment of the present disclosure is shown;

[0062] Figure 2 A schematic diagram showing the structure of a device for generating a unique user identifier according to an embodiment of the present disclosure is shown;

[0063] Figure 3 A schematic diagram of the structure of an electronic device according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0064] In order to make the purpose, features, and advantages of the present disclosure more obvious and easy to understand, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present disclosure.

[0065] The following describes the method and device for generating a unique user identifier provided by the present application in conjunction with the accompanying drawings.

[0066] like Figure 1 As shown, an embodiment of the present application provides a method for generating a user unique identifier, the method comprising:

[0067] S101, generating an initial user identifier according to the acquired first timestamp, the first random number and the self-increment number, and acquiring original message information of the initial user identifier;

[0068] In this application, the initial user identifier is first generated by the first timestamp, the first random number and the self-increment number. It can be understood that the initial user identifier is bound to the first timestamp and the first random number and encrypted with a private key. The initial user identifier uses a 64-bit integer, which is divided into different parts, including timestamp, machine ID and serial number. The Snowflake algorithm generates a unique ID by combining timestamp, machine ID and serial number, and can generate a globally unique ID in a highly concurrent distributed environment.

[0069] S102, using a first encryption algorithm to encrypt the original message information using a pre-acquired key to obtain encrypted message information;

[0070] Among them, the first encryption algorithm adopts a symmetric algorithm. The symmetric algorithm can be, for example, the AES algorithm used internationally, the SM1, SM4 and other algorithms used in China. The symmetric algorithm only requires one key, that is, the same key is used for encryption and decryption.

[0071] S103, encrypting the original message information using a second encryption algorithm to obtain summary information;

[0072] The second encryption algorithm uses a hash algorithm. For example, the hash algorithm can be the SHA-256 algorithm used internationally, the SM3 algorithm used in China, etc. The hash algorithm can convert information of any length into a digital summary of a fixed length, and the digital summary generated by any different message or file is different. Therefore, the digital summary has error detection capabilities, that is, changing any one or more bits of the message will cause the digital summary to change, thereby preventing tampering with the message data.

[0073] S104, using a private key of a third encryption algorithm to encrypt a third random number to obtain a random number ciphertext, and using a public key of the third encryption algorithm and an initial user identifier as digital watermark information;

[0074] The third encryption algorithm uses an asymmetric algorithm. For example, the asymmetric algorithm can be the RSA algorithm used internationally, the SM2, SM9 and other algorithms used in China. The asymmetric algorithm requires two keys: a public key and a private key. The public key and the private key are a pair. If the public key is used to encrypt the message data, it can only be decrypted with the corresponding private key; if the private key is used to encrypt the message data, it can only be decrypted with the corresponding public key.

[0075] S105, generating a user unique identifier according to the encrypted message information, the random number ciphertext, the summary information and the digital watermark information.

[0076] It is understandable that any graphic code such as a QR code or a preset code can increase security by converting the original message data into unrecognizable ciphertext data to prevent data tampering.

[0077] In some optional embodiments, the generating the initial user identifier according to the acquired first timestamp, the first random number and the self-increment number includes:

[0078] Generate a first timestamp according to the time, generate a first random number using a random number generator, and generate a self-increasing number according to a sequence number increase rule;

[0079] Generate a timestamp hash code according to the first timestamp, generate a random number hash code according to the first random number, and generate a self-incrementing number hash code according to the self-incrementing number;

[0080] An initial user identifier is generated according to the timestamp hash code, the random number hash code and the self-increment hash code.

[0081] In the present application, a timestamp is generated according to the time, a random number is generated using a random number generator, and a self-incrementing number is generated according to a serial number increase rule; a timestamp hash code, a random number hash code and a self-incrementing number hash code are generated according to the generated timestamp, random number and self-incrementing number respectively; an initial user identifier is obtained according to the generated timestamp hash code, random number hash code and self-incrementing number hash code.

[0082] In some optional embodiments, the using a first encryption algorithm to encrypt the original message information using a pre-acquired key to obtain the encrypted message information includes:

[0083] Obtain a third random number using a random number generator;

[0084] The third random number is used as a key and a symmetric algorithm is adopted to encrypt the original message information to obtain encrypted message information.

[0085] Specifically, in the present application, after obtaining the third random number, the random number is used to encrypt the original message using the random number as a key to obtain encrypted message information.

[0086] In some optional embodiments, the user unique identifier is displayed using a QR code; the generating the user unique identifier according to the encrypted message information, the random number ciphertext, the summary information and the digital watermark information includes:

[0087] The encrypted message information, random number ciphertext, summary information and digital watermark information are encoded into the information area, encryption area, verification area and watermark area of ​​the two-dimensional code according to the two-dimensional code encoding rules or preset encoding rules.

[0088] The present application compiles encrypted message information, summary information, random number ciphertext, and digital watermark information into the information area, encryption area, verification area, and watermark area respectively according to a QR code or a preset coding rule.

[0089] It is understandable that, in the present application, the encrypted message information can be encoded as an information area coding pattern according to the corresponding coding rules; the random number ciphertext can be encoded as an encryption area coding pattern; the summary information can be encoded as a verification area coding pattern, and the public key of the digital watermark information can be encoded as a watermark area coding pattern; based on the information area coding pattern, the encryption area coding pattern, the verification area coding pattern and the watermark area coding pattern, the corresponding user unique identification is generated. Among them, the user unique identification can be various codes in the Chinese MA identification code system, such as QR code, Hanxin code, QR code, Longbei code and GM code, etc. This disclosure takes QR code as an example for explanation. Those skilled in the art should understand that the user unique identification generation method and user unique identification decoding method involved in this disclosure are also applicable to other codes in the Chinese MA identification code system.

[0090] In some optional embodiments, the method for generating a unique user identifier provided in the present application further includes:

[0091] Scan and verify the unique identifier of the user;

[0092] The scanning verification includes offline scanning verification and online scanning verification.

[0093] Wherein, the offline scanning verification includes:

[0094] Scan the QR code to obtain encrypted message information, random number ciphertext, summary information and digital watermark information;

[0095] The fourth encryption algorithm is used to extract the public key information in the digital watermark information.

[0096] Decrypting the random number ciphertext in the encryption area using the public key of the third encryption algorithm to obtain the random number plaintext;

[0097] Using the random number plaintext as the key of the first encryption algorithm, decrypting the encrypted message information in the information area to obtain the decrypted original message information;

[0098] Using a second encryption algorithm to calculate the original message information to generate summary information;

[0099] The generated summary information is compared with the summary information in the information area. If they are consistent, it is considered that the original data has not been tampered with and the verification is successful. Otherwise, it is considered that the data has been tampered with and the verification is unsuccessful.

[0100] The fourth encryption algorithm in this application adopts a digital watermark algorithm. The digital watermark algorithm refers to the use of signal processing methods to embed hidden information in digitized multimedia data (images, audio, video, etc.). This information is usually invisible and can only be extracted through a dedicated detector or reader. The digital watermark process is to embed certain information that can prove copyright ownership or track infringement into the protected carrier data (such as still images, videos, audio, etc.). It can be the author's serial number, company logo, meaningful text, and does not affect the protected digital object. The information used for embedding is usually called a watermark. In addition, according to the different characteristics of digital watermarks, digital watermark algorithms suitable for different scenarios can be designed. For example, robust invisible watermarks can be used for copyright protection, copy control, fingerprint recognition, etc.; fragile invisible watermarks can be used for content authentication, file modification detection, etc.; semi-fragile watermarks can be used for printed anti-counterfeiting, etc.

[0101] Specifically, the offline scanning verification process in the present application is to scan the code to extract the information of the information area, encryption area, verification area and watermark area, extract the public key information hidden in the digital watermark according to the digital watermark algorithm, use the public key of the asymmetric algorithm (SM2) to decrypt the random number ciphertext in the encryption area to obtain the random number plaintext, and then use the random number plaintext as the key of the symmetric algorithm (SM4) to decrypt the encrypted message information in the information area to obtain the decrypted original message information, calculate the original message information with a hash algorithm (SM3), generate summary information, and compare the generated summary information with the summary information in the information area. If they are consistent, it indicates that the original data has not been tampered with, indicating that the verification is successful. Otherwise, it indicates that the data has been tampered with, indicating that the verification is unsuccessful.

[0102] In some optional embodiments, the online scanning verification includes:

[0103] Scan the QR code to obtain encrypted message information, random number ciphertext, summary information and digital watermark information;

[0104] Using a fourth encryption algorithm to extract the public key information and the initial user identifier of the digital watermark information;

[0105] Decrypting the random number ciphertext in the encryption area using the public key of the third encryption algorithm to obtain the random number plaintext;

[0106] Using the random number plaintext as the key of the first encryption algorithm, decrypting the encrypted message information in the information area to obtain the decrypted original message information;

[0107] Using a second encryption algorithm to calculate the original message information to generate summary information;

[0108] The generated summary information is compared with the summary information in the information area. If they are consistent, it is considered that the original data has not been tampered with and the verification is successful. Otherwise, it is considered that the data has been tampered with and the verification is unsuccessful. At the same time

[0109] The initial user identifier, the second random number, and the second timestamp are encrypted using a public key algorithm of a third encryption algorithm and transmitted to a backend server;

[0110] The backend server performs decryption according to the private key of the third encryption algorithm to obtain the initial user identifier, the second timestamp, and the second random number;

[0111] The backend server searches for the second timestamp and the second random number corresponding to the initial user identifier in the database, and compares them with the second timestamp and the second random number obtained after decryption. If they are equal, it indicates that the verification is passed, otherwise it indicates that the verification is failed.

[0112] It can be understood that the online scanning method in the present application not only includes the verification step of the offline scanning method, but also encrypts the initial user identification, the second random number, the second timestamp and other information using the public key algorithm of the asymmetric algorithm (SM2) and transmits them to the background server. The server decrypts the information according to the private key of the asymmetric algorithm (SM2) to obtain the initial user identification, the second timestamp, the second random number and other information. The server searches the database for the second timestamp and the second random number corresponding to the initial user identification, and compares them with the second timestamp and the second random number obtained after decryption. If they are equal, the verification is successful, otherwise the verification is failed.

[0113] The user unique identifier generated by the user unique identifier generation method in this application can be used in the industrial Internet identifier resolution system, which mainly includes identifier coding, identifier resolution system and identifier data service; among them, the identifier coding includes the "identity card" of machines and objects. The identifier resolution system includes the use of user unique identifiers to uniquely locate and query information on machines and objects. It is the premise and foundation for achieving accurate docking between the global supply chain system and the enterprise production system, and the full life cycle management and intelligent services of products. The identifier data service includes the ability to use identifier coding resources and identifier resolution systems to carry out industrial identifier data management and cross-enterprise, cross-industry, cross-regional and cross-national data sharing and use.

[0114] Industrial Internet identity resolution refers to the process of mapping object identifiers to information required for actual information services, such as addresses, items, spatial locations, etc. For example, by resolving the unique identifier of an item, the server address storing its associated information can be obtained. The user unique identifier generated by this application can also be used in complex network environments, and can accurately and efficiently obtain the "information transformation" of the corresponding information of the object unique identifier. The user unique identifier generated by this application can also connect all production factors such as equipment, machines and materials in the industry by establishing a unified identification system, and connect the fragmented data and applications through the resolution system to achieve the mastery of information such as the source, flow process, and purpose of the data. From the vertical perspective, it can connect products, machines, workshops, and factories to achieve the scale of underlying identification data collection, data sharing between information systems, and analysis and application of identification data. From the horizontal perspective, it can connect its upstream and downstream enterprises horizontally, and use the user unique identifier provided by this application to query data on demand; small and medium-sized enterprises can be connected horizontally into a platform to share data on demand using the user unique identifier. From end to end, the entire life cycle of design, manufacturing, logistics, and use can be connected to achieve true full life cycle management.

[0115] like Figure 2 As shown, an embodiment of the present application provides a device for generating a user unique identifier, the device comprising:

[0116] The acquisition module 201 is used to generate an initial user identifier according to the acquired first timestamp, the first random number and the self-increment number, and acquire original message information of the initial user identifier;

[0117] The first encryption module 202 is used to encrypt the original message information using a pre-acquired key using a first encryption algorithm to obtain encrypted message information;

[0118] The second encryption module 203 is used to encrypt the original message information using a second encryption algorithm to obtain summary information;

[0119] The third encryption module 204 is used to encrypt the third random number using the private key of the third encryption algorithm to obtain a random number ciphertext, and use the public key of the third encryption algorithm and the initial user identifier as digital watermark information;

[0120] The generating module 205 is used to generate a user unique identifier according to the encrypted message information, the random number ciphertext, the summary information and the digital watermark information.

[0121] The user unique identification generation device provided in the present application adopts a first encryption algorithm to encrypt the original message information using a pre-acquired key through a first encryption module 202 to obtain encrypted message information; a second encryption module 203 adopts a second encryption algorithm to encrypt the original message information to obtain summary information; a third encryption module 204 adopts a private key of a third encryption algorithm to encrypt a third random number to obtain a random number ciphertext, and uses the public key of the third encryption algorithm and the initial user identification as digital watermark information; a generation module 205 generates a user unique identification according to the encrypted message information, the random number ciphertext, the summary information and the digital watermark information.

[0122] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device and a readable storage medium.

[0123] Figure 3 A schematic block diagram of an example electronic device 300 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.

[0124] like Figure 3 As shown, the device 300 includes a computing unit 301, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 302 or a computer program loaded from a storage unit 308 into a random access memory (RAM) 303. In the RAM 303, various programs and data required for the operation of the device 300 can also be stored. The computing unit 301, the ROM 302, and the RAM 303 are connected to each other via a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.

[0125] A number of components in the device 300 are connected to the I / O interface 305, including: an input unit 306, such as a keyboard, a mouse, etc.; an output unit 307, such as various types of displays, speakers, etc.; a storage unit 308, such as a disk, an optical disk, etc.; and a communication unit 309, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 309 allows the device 300 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0126] The computing unit 301 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 301 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 301 performs the various methods and processes described above, such as a user unique identification generation method. For example, in some embodiments, the user unique identification generation method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 308. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 300 via ROM 302 and / or communication unit 309. When the computer program is loaded into RAM 303 and executed by the computing unit 301, one or more steps of the user unique identification generation method described above may be performed. Alternatively, in other embodiments, the computing unit 301 may be configured to perform the user unique identification generation method by any other appropriate means (e.g., by means of firmware).

[0127] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0128] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0129] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0130] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0131] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0132] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.

[0133] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

[0134] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of the present disclosure, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0135] The above is only a specific embodiment of the present disclosure, but the protection scope of the present disclosure is not limited thereto. Any person skilled in the art who is familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present disclosure, which should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.

Claims

1. A method for generating a user unique identifier, characterized in that: The method comprises: Generate an initial user identifier according to the acquired first timestamp, the first random number and the self-increment number, and obtain original message information of the initial user identifier; Using a first encryption algorithm and a pre-acquired key to encrypt the original message information to obtain encrypted message information; The method of using a first encryption algorithm to encrypt the original message information using a pre-acquired key to obtain encrypted message information includes: Obtain a third random number using a random number generator; Using the third random number as a key, and using a symmetric algorithm to encrypt the original message information to obtain encrypted message information; Encrypting the original message information using a second encryption algorithm to obtain summary information; Encrypting the third random number using the private key of the third encryption algorithm to obtain a random number ciphertext, and using the public key of the third encryption algorithm and the initial user identifier as digital watermark information; Generate a unique user identifier based on the encrypted message information, random number ciphertext, summary information and digital watermark information; The user unique identifier is displayed using a QR code; the user unique identifier is generated according to the encrypted message information, the random number ciphertext, the summary information and the digital watermark information, including: The encrypted message information, random number ciphertext, summary information and digital watermark information are encoded into the information area, encryption area, verification area and watermark area of ​​the two-dimensional code according to the two-dimensional code encoding rules or preset encoding rules.

2. The method according to claim 1, characterized in that The generating the initial user identifier according to the acquired first timestamp, the first random number and the self-increment number comprises: Generate a first timestamp according to the time, generate a first random number using a random number generator, and generate a self-increasing number according to a sequence number increase rule; Generate a timestamp hash code according to the first timestamp, generate a random number hash code according to the first random number, and generate a self-incrementing number hash code according to the self-incrementing number; An initial user identifier is generated according to the timestamp hash code, the random number hash code and the self-increment hash code.

3. The method according to claim 1, characterized in that The original message information for obtaining the initial user identifier includes: Acquiring message information that needs to be protected based on the initial user identifier; The second timestamp information is added to the message information to obtain the original message information.

4. The method according to claim 1, characterized in that Also includes: Scan and verify the unique identifier of the user; The scanning verification includes offline scanning verification and online scanning verification.

5. The method according to claim 4, characterized in that The offline scanning verification includes: Scan the QR code to obtain encrypted message information, random number ciphertext, summary information and digital watermark information; The fourth encryption algorithm is used to extract the public key information in the digital watermark information. Decrypting the random number ciphertext in the encryption area using the public key of the third encryption algorithm to obtain the random number plaintext; Using the random number plaintext as the key of the first encryption algorithm, decrypting the encrypted message information in the information area to obtain the decrypted original message information; Using a second encryption algorithm to calculate the original message information to generate summary information; The generated summary information is compared with the summary information in the information area. If they are consistent, it is considered that the original data has not been tampered with and the verification is successful. Otherwise, it is considered that the data has been tampered with and the verification is unsuccessful.

6. The method according to claim 5, characterized in that The online scanning verification includes: Scan the QR code to obtain encrypted message information, random number ciphertext, summary information and digital watermark information; Using a fourth encryption algorithm to extract the public key information and the initial user identifier of the digital watermark information; Decrypting the random number ciphertext in the encryption area using the public key of the third encryption algorithm to obtain the random number plaintext; Using the random number plaintext as the key of the first encryption algorithm, decrypting the encrypted message information in the information area to obtain the decrypted original message information; Using a second encryption algorithm to calculate the original message information to generate summary information; The generated summary information is compared with the summary information in the information area. If they are consistent, it is considered that the original data has not been tampered with and the verification is successful. Otherwise, it is considered that the data has been tampered with and the verification is unsuccessful. At the same time The initial user identifier, the second random number, and the second timestamp are encrypted using a public key algorithm of a third encryption algorithm and transmitted to a backend server; The backend server performs decryption according to the private key of the third encryption algorithm to obtain the initial user identifier, the second timestamp, and the second random number; The backend server searches for the second timestamp and the second random number corresponding to the initial user identifier in the database, and compares them with the second timestamp and the second random number obtained after decryption. If they are equal, it indicates that the verification is passed, otherwise it indicates that the verification is failed.

7. The method according to claim 6, characterized in that The first encryption algorithm adopts a symmetric algorithm; The second encryption algorithm adopts a hash algorithm; The third encryption algorithm adopts an asymmetric algorithm; The fourth encryption algorithm adopts a digital watermark algorithm.

8. A device for generating a unique user identifier, characterized in that: The device comprises: An acquisition module, used to generate an initial user identifier according to the acquired first timestamp, the first random number and the self-increment number, and to acquire original message information of the initial user identifier; A first encryption module, used to encrypt the original message information using a pre-acquired key using a first encryption algorithm to obtain encrypted message information; The method of using a first encryption algorithm to encrypt the original message information using a pre-acquired key to obtain encrypted message information includes: Obtain a third random number using a random number generator; Using the third random number as a key, and using a symmetric algorithm to encrypt the original message information to obtain encrypted message information; A second encryption module, used to encrypt the original message information using a second encryption algorithm to obtain summary information; A third encryption module, used to encrypt a third random number using a private key of a third encryption algorithm to obtain a random number ciphertext, and to use a public key of the third encryption algorithm and an initial user identifier as digital watermark information; A generating module, used for generating a unique user identifier according to the encrypted message information, random number ciphertext, summary information and digital watermark information; The user unique identifier is displayed using a QR code; the user unique identifier is generated according to the encrypted message information, the random number ciphertext, the summary information and the digital watermark information, including: The encrypted message information, random number ciphertext, summary information and digital watermark information are encoded into the information area, encryption area, verification area and watermark area of ​​the two-dimensional code according to the two-dimensional code encoding rules or preset encoding rules.

Citation Information

Patent Citations

  • Processing method and device for image acquisition synchronous encryption privacy protection

    CN114390316A

  • Distributed watermark embedding software protection method

    CN117892268A