An identity identification generation method and device, and a storage medium

By using a two-dimensional matrix and a padding method to generate identity identifiers, the problem of low identity identifier generation rate in existing technologies is solved, and efficient generation of multiple identity identifiers is achieved.

CN115563345BActive Publication Date: 2026-04-14JD DIGITS HAIYI INFORMATION TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-23
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

Existing technologies have a low identity generation rate under high traffic conditions, which cannot meet the need to quickly generate multiple unique IDs.

Method used

The identity identifier is generated using a two-dimensional matrix and a preset padding method. By obtaining the two-dimensional matrix and the target sequence number, padding is performed to directly obtain the target element value and generate the identity identifier.

Benefits of technology

It improves the generation rate of identity identifiers, enabling the simultaneous generation of multiple identity identifiers without the need for sequential incrementing, thus enhancing generation efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115563345B_ABST
    Figure CN115563345B_ABST
Patent Text Reader

Abstract

The embodiment of the application discloses an identity generation method and device, and a storage medium, comprising: in the case of receiving a first identity generation request, obtaining a two-dimensional matrix and a first target serial number according to the first identity generation request; padding the first target serial number according to a preset padding mode to obtain a padded serial number; obtaining a target element value in the two-dimensional matrix according to the padded serial number; and generating a first target identity corresponding to the first identity generation request according to the target element value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of information processing technology, and in particular to an identity generation method, apparatus, and storage medium. Background Technology

[0002] With the increasing prevalence of internet applications and the growing number of users, software systems are placing higher demands on data storage. Single tables have limited storage capacity, necessitating database sharding and table partitioning. Different databases and tables require a globally unique identifier (ID), i.e., distributed IDs. For example, in e-commerce systems, product, order, and coupon data also need to be identified using distributed IDs, and each data entry must have a unique ID.

[0003] In related technologies, a certain field in the database is set to auto-increment. When an ID generation instruction is received, the field is auto-incremented to generate the corresponding ID number. However, when the access volume is large, multiple ID numbers need to be generated by auto-incrementing sequentially, which reduces the generation rate of identity identifiers. Summary of the Invention

[0004] To address the aforementioned technical problems, embodiments of this application aim to provide an identity generation method, apparatus, and storage medium that can improve the identity generation rate.

[0005] The technical solution of this application is implemented as follows:

[0006] This application provides an identity generation method, the identity generation method comprising:

[0007] Upon receiving a first identity generation request, a two-dimensional matrix and a first target sequence number are obtained based on the first identity generation request.

[0008] The first target sequence number is padded according to a preset padding method to obtain a padded sequence number;

[0009] The target element value is obtained in the two-dimensional matrix according to the supplementary sequence number;

[0010] Based on the target element value, a first target identity identifier corresponding to the first identity identifier generation request is generated.

[0011] This application provides an identity generation device, the device comprising:

[0012] The acquisition unit is configured to, upon receiving a first identity generation request, acquire a two-dimensional matrix and a first target sequence number based on the first identity generation request; and acquire the target element value in the two-dimensional matrix based on the padding sequence number.

[0013] The padding unit is used to pad the first target sequence number according to a preset padding method to obtain the padding sequence number;

[0014] The generation unit is used to generate a first target identity corresponding to the first identity generation request based on the target element value.

[0015] This application provides an identity generation device, the device comprising:

[0016] The system includes a memory, a processor, and a communication bus. The memory communicates with the processor via the communication bus. The memory stores an identity generation program executable by the processor. When the identity generation program is executed, the processor performs the aforementioned identity generation method.

[0017] This application provides a storage medium storing a computer program applied to an identity generation device, characterized in that the computer program, when executed by a processor, implements the aforementioned identity generation method.

[0018] This application provides an identity identifier generation method, apparatus, and storage medium. The identity identifier generation method includes: upon receiving a first identity identifier generation request, obtaining a two-dimensional matrix and a first target sequence number according to the first identity identifier generation request; padding the first target sequence number according to a preset padding method to obtain a padded sequence number; obtaining target element values ​​in the two-dimensional matrix based on the padded sequence numbers; and generating a first target identity identifier corresponding to the first identity identifier generation request based on the target element values. Using the above method, when the identity identifier generation apparatus needs to generate multiple first target identity identifiers simultaneously, the apparatus can obtain multiple first target sequence numbers, pad them according to a preset padding method to obtain multiple padded sequence numbers, and obtain multiple sets of target element values ​​in the two-dimensional matrix based on the multiple padded sequence numbers to generate multiple first target identity identifiers. This eliminates the need for sequential incrementing to generate multiple ID numbers, meaning it eliminates the need to wait for the first target identity identifier to be generated before generating the next target identity identifier. Multiple first target identity identifiers can be generated simultaneously, improving the identity identifier generation rate. Attached Figure Description

[0019] Figure 1 This application provides a flowchart of an identity generation method;

[0020] Figure 2 An exemplary two-dimensional matrix parameter diagram provided for an embodiment of this application;

[0021] Figure 3 A flowchart illustrating an exemplary identity generation method provided in this application embodiment;

[0022] Figure 4 A schematic diagram of the composition structure of an identity generation device provided in this application embodiment. Figure 1 ;

[0023] Figure 5 A schematic diagram of the composition structure of an identity generation device provided in this application embodiment. Figure 2 . Detailed Implementation

[0024] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit this application.

[0025] This application provides an identity generation method, which is applied to an identity generation device. Figure 1 A flowchart of an identity generation method provided in this application embodiment is shown below. Figure 1 As shown, the identity generation method may include:

[0026] S101. Upon receiving a first identity generation request, obtain a two-dimensional matrix and a first target sequence number based on the first identity generation request.

[0027] The identity generation method provided in this application embodiment is applicable to scenarios where a target identity is generated corresponding to an identity generation request.

[0028] In the embodiments of this application, the identity generation device can be implemented in various forms. For example, the identity generation device described in this application may include devices such as mobile phones, cameras, tablet computers, laptops, handheld computers, personal digital assistants (PDAs), portable media players (PMPs), navigation devices, wearable devices, smart bracelets, pedometers, etc., as well as devices such as digital TVs, desktop computers, servers, etc.

[0029] In this embodiment of the application, the number of first identity generation requests can be one or more; the specific number of first identity generation requests can be determined according to the actual situation, and this embodiment of the application does not limit this.

[0030] In this embodiment, the identity generation device can receive identity generation requests at any time, or it can receive identity generation requests within a preset time period; the specific time period can be determined according to the actual situation, and this embodiment does not limit it.

[0031] It should be noted that the preset time period can be the time period configured in the identity generation device; the preset time period can also be the time period transmitted from other devices to the identity generation device; the specific preset time period can be determined according to the actual situation, and this application embodiment does not limit it.

[0032] In this embodiment, the first identity generation request carries generation sequence number type information and a time difference parameter between the current time and a preset time. The generation sequence number type information includes a time difference threshold (length of the number of days between events, and the maximum value of the number of days between events), a preset sequence number length (length of the generated sequence number), the maximum value of the generated sequence number, and a business type prefix sequence number.

[0033] It should be noted that the current time point is the time when the identity generation device receives the first identity generation request. Specifically, the current time point can be in the format of year, month, and day, or it can be in the format of year, month, day, hour, minute, and second; the specific time point can be determined according to the actual situation, and this application embodiment does not limit it in this way.

[0034] It should be noted that the preset time point can be January 1, 1970, or other times; the specific time point can be determined according to the actual situation, and this application embodiment does not limit it.

[0035] It should also be noted that the time format is the same for the current time point and the preset time point.

[0036] In this embodiment, the process by which the identity generation device obtains a two-dimensional matrix and a first target sequence number according to a first identity generation request can be as follows: the identity generation device uses the generated sequence number type information and time difference parameter as a cache key, obtains a sequence number from multiple first sequence numbers to obtain a first target sequence number, and uses the first target sequence number as the corresponding value; the identity generation device uses the generated sequence number type information and time difference parameter as a cache key, obtains a two-dimensional matrix, and uses the two-dimensional matrix as the corresponding value.

[0037] In this embodiment, before the identity generation device obtains the two-dimensional matrix and the first target serial number according to the first identity generation request, the identity generation device generates multiple first serial numbers when the first identity generation request is the first identity generation request; the identity generation device obtains the row parameters and column parameters of the matrix; the identity generation device determines the number of elements of the matrix according to the row parameters and column parameters; the identity generation device generates the required number of elements and constructs a two-dimensional matrix based on the elements.

[0038] It should be noted that the multiple first serial numbers include the first target serial number.

[0039] In this embodiment of the application, the number of serial numbers of the multiple first serial numbers can be 200 or 300; the number of multiple first serial numbers can also be other numbers; the specific number of serial numbers of the multiple first serial numbers can be determined according to the actual situation, and this embodiment of the application does not limit it.

[0040] In this application embodiment, the identity generation device can generate multiple first serial numbers in the following ways: the identity generation device can use Redis or R2M to generate multiple first serial numbers; or the identity generation device can use other devices to generate multiple first serial numbers. The specific method is determined according to the actual situation, and this application embodiment does not limit it.

[0041] In this embodiment of the application, after the identity generation device generates multiple first serial numbers, the identity generation device stores the multiple first serial numbers in a local cache.

[0042] In this embodiment, the row parameter is the number of rows in the two-dimensional matrix; the column parameter is the number of columns in the two-dimensional matrix.

[0043] It should be noted that the row parameter can be a preset sequence number length, or it can be a configured parameter; the specific identity generation device can determine the row parameter according to the actual situation, and this application embodiment does not limit it in this regard.

[0044] It should be noted that the column parameters are parameters configured in the identity generation device; the column parameters can also be parameters input into the identity generation device; the specific way the identity generation device obtains the column parameters can be determined according to the actual situation, and this application embodiment does not limit this.

[0045] For example, the column parameter can be 10 columns or 5 columns; the column parameter can also be other values; the specific value can be determined according to the actual situation, and this application embodiment does not limit it.

[0046] In this embodiment, the identity generation device generates a number of elements by generating a random number of elements. The random number is a value between 0 and 9.

[0047] It should be noted that the parameters in any row of a two-dimensional matrix are different from the parameters in other rows.

[0048] For example, the row parameter can be 5 rows and the column parameter can be 10 columns, resulting in a two-dimensional matrix parameter as follows: Figure 2 As shown in the figure. In this two-dimensional matrix, the elements are all values ​​in the range of 0-9, and the 10 parameters in each row of the two-dimensional matrix are different, while the 5 parameters in each column can be the same or different.

[0049] In this embodiment of the application, after the identity generation device generates multiple first serial numbers, and the application status of the multiple first serial numbers is "applied", the identity generation device generates multiple second serial numbers according to the preset serial number increment step.

[0050] In this embodiment of the application, when the identity generation device obtains the first target serial number according to the first identity generation request, the identity generation device determines that the application status of the first target serial number is applied.

[0051] It should be noted that multiple first serial numbers are different from multiple second serial numbers.

[0052] In this embodiment of the application, the number of multiple first serial numbers is the same as the number of multiple second serial numbers.

[0053] In this embodiment of the application, the number of serial numbers of the multiple second serial numbers can be 200 or 300; the number of multiple second serial numbers can also be other numbers; the specific number of serial numbers of the multiple second serial numbers can be determined according to the actual situation, and this embodiment of the application does not limit it.

[0054] In this application embodiment, the identity generation device can generate multiple second serial numbers in the following ways: the identity generation device can use Redis or R2M to generate multiple second serial numbers; or the identity generation device can use other devices to generate multiple second serial numbers. The specific method is determined according to the actual situation, and this application embodiment does not limit it.

[0055] In this embodiment of the application, after the identity generation device generates multiple second serial numbers, the identity generation device stores the multiple second serial numbers in a local cache.

[0056] In this embodiment, the preset serial number increment step can be a step size configured in the identity generation device, or it can be a step size transmitted from other devices to the identity generation device. The specific way in which the identity generation device obtains the preset serial number increment step can be determined according to the actual situation, and this embodiment does not limit it.

[0057] It should be noted that the step size of the preset serial number increment step size can be 1, 2, or other values. The specific step size of the preset serial number increment step size can be determined according to the actual situation, and this application embodiment does not limit it.

[0058] In this embodiment, when the application status of multiple first serial numbers is "applied", the identity generation device also generates multiple second serial numbers by decrementing the preset serial number by a step size. The specific method by which the identity generation device generates multiple second serial numbers can be determined according to the actual situation, and this embodiment does not limit this.

[0059] In this embodiment, after the identity generation device generates multiple second serial numbers, upon receiving a second identity generation request, the identity generation device obtains a second target serial number corresponding to the second identity generation request from the multiple second serial numbers; if the generation time of the multiple second serial numbers is less than or equal to a preset time and the second target serial number is greater than the largest serial number among the multiple first serial numbers, the identity generation device generates a second target identity corresponding to the second identity generation request based on the second target serial number.

[0060] In this embodiment, the preset duration can be the duration configured in the identity generation device, or it can be the duration transmitted from other devices to the identity generation device. The specific way in which the identity generation device obtains the preset duration can be determined according to the actual situation, and this embodiment does not limit it.

[0061] For example, the preset duration can be 36 hours or 35 hours; the preset duration can also be other duration values; the specific preset duration can be determined according to the actual situation, and this application embodiment does not limit it in this way.

[0062] In this embodiment, the method by which the identity generation device generates a second target identity corresponding to a second identity generation request based on a second target serial number is the same as the method by which it generates a first target identity corresponding to a first identity generation request based on a first target serial number; the specific implementation process can be referred to the process of generating a first target identity corresponding to a first identity generation request based on a first target serial number.

[0063] In this embodiment of the application, the process of the identity generation device obtaining a two-dimensional matrix and a first target serial number according to the first identity generation request includes: the identity generation device obtaining a time difference threshold from the first identity generation request; and when the time difference parameter between the current time point and the preset time point is less than or equal to the time difference threshold, the identity generation device obtaining a two-dimensional matrix and a first target serial number according to the first identity generation request.

[0064] In this embodiment of the application, after the identity generation device obtains the time difference threshold from the first identity generation request, if the time difference parameter is greater than the time difference threshold, the identity generation device outputs response information for identity generation failure.

[0065] In this embodiment of the application, the response information for the identity generation failure can be text information or voice information; the response information for the identity generation failure can also be other forms of information; the specifics can be determined according to the actual situation, and this embodiment of the application does not limit them.

[0066] S102. The first target sequence number is padded according to the preset padding method to obtain the padded sequence number.

[0067] In this embodiment of the application, after the identity generation device obtains the two-dimensional matrix and the first target sequence number according to the first identity generation request, the identity generation device can fill in the first target sequence number according to the preset filling method to obtain the filled sequence number.

[0068] In this embodiment, the preset padding method can be the padding method configured in the identity generation device; the preset padding method can also be the padding method transmitted from other devices to the identity generation device; the specific identity generation device can obtain the preset padding method according to the actual situation, and this embodiment does not limit it.

[0069] In this embodiment of the application, the process of the identity generation device padding the first target serial number according to a preset padding method to obtain a padding serial number includes: the identity generation device obtaining a preset serial number length from the first identity generation request; the identity generation device obtaining preset padding data; and the identity generation device using the preset padding data to pad the first target serial number to the preset serial number length to obtain a padding serial number.

[0070] In this embodiment of the application, the preset sequence number length is the parameter carried in the first identity generation request.

[0071] In this embodiment, the preset padding data is a parameter configured in the identity generation device; the preset padding data can also be a parameter transmitted from other devices to the identity generation device; the specific way the identity generation device obtains the preset padding data can be determined according to the actual situation, and this embodiment does not limit it.

[0072] It should be noted that the preset padding data can be 0, 1, or other data values; the specific preset padding data can be determined according to the actual situation, and this application embodiment does not limit it.

[0073] In this embodiment, the process of the identity generation device padding the first target serial number to a preset serial number length using preset padding data to obtain a padded serial number includes: the identity generation device writing preset padding data to the left of the first target serial number until the sum of the data lengths of the first target serial number and the preset padding data is the preset serial number length; alternatively, the identity generation device may write preset padding data to the right of the first target serial number until the sum of the data lengths of the first target serial number and the preset padding data is the preset serial number length; alternatively, the identity generation device may write preset padding data in the middle of the first target serial number until the sum of the data lengths of the first target serial number and the preset padding data is the preset serial number length. The specific process of the identity generation device padding the first target serial number to a preset serial number length using preset padding data to obtain a padded serial number can be determined according to the actual situation, and this embodiment does not limit it.

[0074] S103. Obtain the target element value in the two-dimensional matrix according to the supplementary sequence number.

[0075] In this embodiment of the application, the identity generation device fills in the first target sequence number according to a preset filling method. After obtaining the filled sequence number, the identity generation device can obtain the target element value in the two-dimensional matrix based on the filled sequence number.

[0076] In this embodiment, the process by which the identity generation device obtains the target element value in a two-dimensional matrix based on the padding sequence number includes: the identity generation device determining the bit length parameter of each sequence number in the padding sequence number and using the bit length parameter as matrix row information; the identity generation device determining the sequence number value at the position of the bit length parameter and using the sequence number value as matrix row information and matrix column information; and the identity generation device obtaining the element corresponding to the matrix row information and matrix column information in the two-dimensional matrix to obtain the target element value.

[0077] For example, the filler sequence number is 00010, and the two-dimensional matrix is ​​as follows: Figure 2 As shown, based on the supplementary sequence number in Figure 2 The target element value can be obtained from the two-dimensional matrix shown, and the target element is 21956.

[0078] S104. Generate a first target identity corresponding to the first identity generation request based on the target element value.

[0079] In this embodiment, after the identity generation device obtains the target element value in the two-dimensional matrix according to the padding sequence number, the identity generation device can generate a first target identity corresponding to the first identity generation request based on the target element value.

[0080] In this embodiment of the application, the process of the identity generation device generating a first target identity corresponding to the first identity generation request based on the target element value includes: the identity generation device obtaining the time difference parameter between the current time point and the preset time point from the first identity generation request; and the identity generation device concatenating the target element value and the time difference parameter to obtain the first target identity.

[0081] In this embodiment of the application, the first identity generation request carries a time difference parameter.

[0082] In this embodiment, the process by which the identity generation device concatenates the target element value and the time difference parameter to obtain the first target identity can be as follows: the identity generation device concatenates the target element value after the time difference parameter to obtain the first target identity; the identity generation device concatenates the target element value before the time difference parameter to obtain the first target identity; or the identity generation device concatenates the target element value in the middle of the time difference parameter to obtain the first target identity. The specific process by which the identity generation device concatenates the target element value and the time difference parameter to obtain the first target identity can be determined according to the actual situation, and this embodiment does not limit it.

[0083] In this embodiment of the application, the process of the identity generation device concatenating the target element value and the time difference parameter to obtain the first target identity includes: the identity generation device obtaining the business type prefix sequence number from the first identity generation request; and the identity generation device concatenating the business type prefix sequence number, the target element value, and the time difference parameter to obtain the first target identity.

[0084] In this embodiment of the application, the first identity generation request carries a business type prefix number.

[0085] In this embodiment, the process by which the identity generation device concatenates the service type prefix number, the target element value, and the time difference parameter to obtain the first target identity includes: the identity generation device concatenates the time difference parameter after the service type prefix number, and then concatenates the target element value after the time difference parameter to obtain the first target identity; alternatively, the identity generation device concatenates the target element value after the service type prefix number, and then concatenates the time difference parameter after the target element value to obtain the first target identity; the identity generation device may also concatenate the service type prefix number, the target element value, and the time difference parameter in other concatenation methods to obtain the first target identity. The specific process by which the identity generation device concatenates the service type prefix number, the target element value, and the time difference parameter to obtain the first target identity can be determined according to the actual situation, and this embodiment does not limit this.

[0086] In this application embodiment, an exemplary identity generation method flowchart is shown below. Figure 3 As shown:

[0087] S1. Upon receiving a first identity generation request, if the first identity generation request is the first identity generation request, the identity generation device generates multiple first serial numbers; and obtains the row parameters and column parameters of the matrix; and determines the number of elements in the matrix based on the row parameters and column parameters.

[0088] It should be noted that the multiple first serial numbers include the first target serial number.

[0089] S2, The identity generation device generates the number of elements and constructs a two-dimensional matrix based on the elements.

[0090] S3. The identity generation device obtains the time difference threshold from the first identity generation request; and when the time difference parameter between the current time point and the preset time point is less than or equal to the time difference threshold, it obtains the two-dimensional matrix and the first target sequence number according to the first identity generation request.

[0091] It should be noted that if the time difference parameter is greater than the time difference threshold, a response message indicating a failure in the generation of the identity identifier will be output.

[0092] S4. The identity generation device obtains preset padding data and obtains the preset serial number length from the first identity generation request.

[0093] S5. The identity generation device uses preset padding data to pad the first target serial number to the preset serial number length to obtain the padding serial number.

[0094] S6. The identity generation device determines the number of bits in the supplementary sequence number for each sequence number and uses the number of bits as matrix row information.

[0095] S7. The identity generation device determines the serial number value at the position of the bit parameter and uses the serial number value as matrix row information and matrix column information.

[0096] S8. The identity generation device obtains the elements corresponding to the matrix row information and matrix column information in the two-dimensional matrix to obtain the target element value.

[0097] S9. The identity generation device obtains the time difference parameter between the current time point and the preset time point and the business type prefix number from the first identity generation request.

[0098] S10, The identity generation device concatenates the business type prefix number, the target element value, and the time difference parameter to obtain the first target identity.

[0099] S11. When the application status of multiple first serial numbers is "applied", the identity generation device generates multiple second serial numbers according to the preset serial number increment step.

[0100] It should be noted that multiple first serial numbers are different from multiple second serial numbers.

[0101] S12. Upon receiving a second identity generation request, the identity generation device obtains a second target serial number corresponding to the second identity generation request from a plurality of second serial numbers.

[0102] S13. When the generation time of multiple second serial numbers is less than or equal to a preset time and the second target serial number is greater than the largest serial number among multiple first serial numbers, the identity identifier generation device generates a second target identity identifier corresponding to the second identity identifier generation request based on the second target serial number.

[0103] Understandably, when the identity generation device needs to generate multiple first target identity identifiers simultaneously, the identity generation device can obtain multiple first target serial numbers, and then fill in the multiple first target serial numbers according to a preset filling method to obtain multiple filled serial numbers. Based on the multiple filled serial numbers, it can obtain multiple sets of target element values ​​in a two-dimensional matrix, and generate multiple first target identity identifiers based on the multiple sets of target element values. It is no longer necessary to generate multiple ID numbers by sequentially incrementing, that is, it is no longer necessary to wait for the first target identity identifier to be generated before generating the next target identity identifier. Multiple first target identity identifiers can be generated simultaneously, which improves the identity identifier generation rate.

[0104] Based on the same inventive concept as the above-mentioned identity generation method, this application provides an identity generation device 1, corresponding to an identity generation method; Figure 4 A schematic diagram of the composition structure of an identity generation device provided in this application embodiment. Figure 1 The identity generation device 1 may include:

[0105] The acquisition unit 11 is configured to, upon receiving a first identity generation request, acquire a two-dimensional matrix and a first target sequence number based on the first identity generation request; and acquire the target element value in the two-dimensional matrix based on the padding sequence number.

[0106] The padding unit 12 is used to pad the first target sequence number according to a preset padding method to obtain the padding sequence number;

[0107] The generation unit 13 is used to generate a first target identity corresponding to the first identity generation request based on the target element value.

[0108] In some embodiments of this application, the apparatus further includes a determining unit and an establishing unit;

[0109] The generation unit 13 is configured to generate a plurality of first serial numbers when the first identity generation request is the first identity generation request; the plurality of first serial numbers includes the first target serial number; and generate the specified number of elements.

[0110] The acquisition unit 11 is used to acquire the row parameters and column parameters of the matrix;

[0111] The determining unit is used to determine the number of elements in the matrix based on the row parameters and the column parameters;

[0112] The establishment unit is used to construct the two-dimensional matrix based on the elements.

[0113] In some embodiments of this application, the generation unit 13 is used to generate a plurality of second serial numbers according to a preset serial number increment step size when the application status of the plurality of first serial numbers is "applied"; the plurality of first serial numbers are different from the plurality of second serial numbers.

[0114] In some embodiments of this application, the acquisition unit 11 is used to acquire a second target serial number corresponding to the second identity generation request from the plurality of second serial numbers when a second identity generation request is received;

[0115] The generation unit 13 is used to generate a second target identity identifier corresponding to the second identity identifier generation request based on the second target serial number when the generation time of the plurality of second serial numbers is less than or equal to a preset time and the second target serial number is greater than the largest serial number among the plurality of first serial numbers.

[0116] In some embodiments of this application, the determining unit is configured to determine the bit length parameter of each sequence number in the supplementary sequence number and use the bit length parameter as matrix row information; determine the sequence number value at the position of the bit length parameter and use the sequence number value as matrix row information and matrix column information;

[0117] The acquisition unit 11 is used to acquire the elements corresponding to the matrix row information and the matrix column information in the two-dimensional matrix, and obtain the target element value.

[0118] In some embodiments of this application, the device further includes a splicing unit;

[0119] The acquisition unit 11 is used to acquire the time difference parameter between the current time point and the preset time point from the first identity generation request;

[0120] The splicing unit is used to splice the target element value and the time difference parameter to obtain the first target identity identifier.

[0121] In some embodiments of this application, the acquisition unit 11 is used to obtain a service type prefix sequence number from the first identity generation request;

[0122] The splicing unit is used to splice the business type prefix number, the target element value, and the time difference parameter to obtain the first target identity identifier.

[0123] In some embodiments of this application, the acquisition unit 11 is used to acquire a preset sequence number length from the first identity generation request; and acquire preset padding data;

[0124] The padding unit 12 is used to pad the first target sequence number to the preset sequence number length using the preset padding data to obtain the padding sequence number.

[0125] In some embodiments of this application, the acquisition unit 11 is used to acquire a time difference threshold from the first identity generation request; when the time difference parameter between the current time point and the preset time point is less than or equal to the time difference threshold, the unit acquires a two-dimensional matrix and a first target sequence number according to the first identity generation request.

[0126] In some embodiments of this application, the device further includes an output unit;

[0127] The output unit is used to output response information for identity generation failure when the time difference parameter is greater than the time difference threshold.

[0128] It should be noted that, in practical applications, the aforementioned acquisition unit 11, supplementary unit 12, and generation unit 13 can be implemented by the processor 14 on the identity generation device 1, specifically by a CPU (Central Processing Unit), MPU (Microprocessor Unit), DSP (Digital Signal Processor), or Field Programmable Gate Array (FPGA), etc.; the aforementioned data storage can be implemented by the memory 15 on the identity generation device 1.

[0129] This application embodiment also provides an identity generation device 1, such as... Figure 5 As shown, the identity generation device 1 includes a processor 14, a memory 15, and a communication bus 16. The memory 15 communicates with the processor 14 through the communication bus 16. The memory 15 stores programs executable by the processor 14. When the program is executed, the identity generation method described above is executed by the processor 14.

[0130] In practical applications, the aforementioned memory 15 can be volatile memory, such as random-access memory (RAM); or non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid-state drive (SSD); or a combination of the above types of memory, and provide instructions and data to the processor 14.

[0131] This application provides a computer-readable storage medium having a computer program thereon, which, when executed by a processor 14, implements the identity generation method as described above.

[0132] Understandably, when the identity generation device needs to generate multiple first target identity identifiers simultaneously, the identity generation device can obtain multiple first target serial numbers, and then fill in the multiple first target serial numbers according to a preset filling method to obtain multiple filled serial numbers. Based on the multiple filled serial numbers, it can obtain multiple sets of target element values ​​in a two-dimensional matrix, and generate multiple first target identity identifiers based on the multiple sets of target element values. It is no longer necessary to generate multiple ID numbers by sequentially incrementing, that is, it is no longer necessary to wait for the first target identity identifier to be generated before generating the next target identity identifier. Multiple first target identity identifiers can be generated simultaneously, which improves the identity identifier generation rate.

[0133] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of hardware embodiments, software embodiments, or embodiments combining software and hardware aspects. Furthermore, this application can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage and optical storage) containing computer-usable program code.

[0134] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0135] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0136] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0137] The above description is merely a preferred embodiment of this application and is not intended to limit the scope of protection of this application.

Claims

1. A method for generating an identity identifier, characterized in that, The method includes: Upon receiving a first identity generation request, a two-dimensional matrix and a first target sequence number are obtained based on the first identity generation request. The first target sequence number is padded according to a preset padding method to obtain a padded sequence number; The target element value is obtained in the two-dimensional matrix according to the supplementary sequence number; Based on the target element value, generate a first target identity identifier corresponding to the first identity identifier generation request; Before obtaining the two-dimensional matrix and the first target sequence number based on the first identity identifier in the request, the method further includes: When the first identity generation request is the first identity generation request, multiple first serial numbers are generated; the multiple first serial numbers include the first target serial number. Obtain the first target serial number from the plurality of first serial numbers; Get the row and column parameters of the matrix; The number of elements in the matrix is ​​determined based on the row parameters and the column parameters; Generate the specified number of elements, and construct the two-dimensional matrix based on the elements.

2. The method according to claim 1, characterized in that, After generating multiple first serial numbers, the method further includes: When the application status of the plurality of first serial numbers is "applied", a plurality of second serial numbers are generated according to a preset serial number increment step; the plurality of first serial numbers are different from the plurality of second serial numbers.

3. The method according to claim 2, characterized in that, After generating multiple second serial numbers, the method further includes: Upon receiving a second identity generation request, a second target serial number corresponding to the second identity generation request is obtained from the plurality of second serial numbers; If the generation time of the plurality of second serial numbers is less than or equal to a preset time, and the second target serial number is greater than the largest serial number among the plurality of first serial numbers, a second target identity identifier corresponding to the second identity identifier generation request is generated based on the second target serial number.

4. The method according to claim 1, characterized in that, The step of obtaining the target element value in the two-dimensional matrix according to the complement sequence number includes: Determine the bit length parameter of each sequence number in the supplementary sequence number, and use the bit length parameter as matrix row information; Determine the sequence number value at the position of the bit parameter, and use the sequence number value as matrix row information and matrix column information; The target element value is obtained by retrieving the elements corresponding to the matrix row information and the matrix column information from the two-dimensional matrix.

5. The method according to claim 1, characterized in that, The step of generating a first target identity identifier corresponding to the first identity identifier generation request based on the target element value includes: Obtain the time difference parameter between the current time point and the preset time point from the first identity generation request; The target element value and the time difference parameter are concatenated to obtain the first target identity identifier.

6. The method according to claim 5, characterized in that, The step of concatenating the target element value and the time difference parameter to obtain the first target identity identifier includes: Obtain the business type prefix number from the first identity generation request; The first target identity identifier is obtained by concatenating the business type prefix number, the target element value, and the time difference parameter.

7. The method according to claim 1, characterized in that, The step of padding the first target sequence number according to a preset padding method to obtain a padded sequence number includes: Obtain the preset sequence number length from the first identity generation request; Get the preset padding data; The first target sequence number is padded to the preset sequence number length using the preset padding data to obtain the padded sequence number.

8. The method according to claim 1, characterized in that, The step of obtaining the two-dimensional matrix and the first target sequence number based on the first identity identifier generation request includes: Obtain the time difference threshold from the first identity generation request; If the time difference parameter between the current time point and the preset time point is less than or equal to the time difference threshold, a two-dimensional matrix and a first target sequence number are obtained by generating a request based on the first identity identifier.

9. The method according to claim 8, characterized in that, After obtaining the time difference threshold from the first identity generation request, the method further includes: If the time difference parameter is greater than the time difference threshold, output response information for identity generation failure.

10. An identity generation device, characterized in that, The device includes: The acquisition unit is configured to, upon receiving a first identity generation request, acquire a two-dimensional matrix and a first target sequence number based on the first identity generation request; and acquire the target element value in the two-dimensional matrix based on the padding sequence number. The padding unit is used to pad the first target sequence number according to a preset padding method to obtain the padding sequence number; The generation unit is used to generate a first target identity identifier corresponding to the first identity identifier generation request based on the target element value; The device further includes a determining unit and an establishing unit; The generation unit is configured to generate a plurality of first serial numbers when the first identity generation request is the first identity generation request; the plurality of first serial numbers includes the first target serial number; and generate the number of elements specified in the original text. The acquisition unit is used to acquire the first target sequence number from the plurality of first sequence numbers; and to acquire the row parameters and column parameters of the matrix; The determining unit is used to determine the number of elements in the matrix based on the row parameters and the column parameters; The establishment unit is used to construct the two-dimensional matrix based on the elements.

11. An identity generation device, characterized in that, The device includes: The system includes a memory, a processor, and a communication bus, wherein the memory communicates with the processor via the communication bus, and the memory stores an identity generation program executable by the processor. When the identity generation program is executed, the processor performs the method as described in any one of claims 1 to 9.

12. A storage medium storing a computer program thereon, used in an identity generation device, characterized in that, When executed by a processor, the computer program implements the method described in any one of claims 1 to 9.

Citation Information

Patent Citations

  • Data conversion systems and methods

    CN110073634A

  • Data processing method and matrix memory

    WO2020133010A1