Method, device and system for obtaining order number

By parsing the order number rule configuration input by the user, combining the batch number segment and the random number segment to generate the order number, and using bit two-dimensional array storage, it solves the problems of business information leakage and storage query disadvantages in the existing technology in order number generation. Problem, customized, non-repetitive and efficient tracking number generation is implemented.

CN113408246BActive Publication Date: 2024-09-06SUM PAYMENT SERVICES CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110734968.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-06-30
Publication Date
2024-09-06
Estimated Expiration
2041-06-30

AI Technical Summary

Technical Problem

In the existing technology, the tracking number generation method such as the auto-increment method has the risk of business information leakage, while the tracking number generated by the snowflake algorithm is too long and difficult to store and query, and the tracking number rules are meaningless.

Method used

By parsing the order number rule configuration entered by the user, the order number is generated by combining the batch number segment and the random number segment, and a bit two-dimensional array is used to store the random number segment to ensure the non-repetition and customization of the order number and avoid the leakage of business information. And optimize storage and query efficiency.

Benefits of technology

Implemented custom order number rules and lengths to facilitate configuration in different business scenarios, generate a sufficient number of unique order numbers, avoid business information leakage, and reduce the burden of order number storage and query.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113408246B
    Figure CN113408246B
Patent Text Reader

Abstract

The present invention also provides a method, device and system for obtaining an order number, the method comprising: parsing an order number rule configuration input by a user; generating an order number according to the parsed order number rule configuration; sending the order number when an order number acquisition request is received; wherein the order number rule configuration at least includes a batch number segment and a random number segment. The method, device and system for obtaining an order number of the present invention allow users to define the order number rules and lengths to be generated, so that users can set different order numbers according to different business scenarios. In addition, the method, device and system for obtaining an order number of the present invention combines the generation of batch number segments by self-incrementing method and the generation of random number segments by random algorithm, which can not only generate a sufficient number of non-repetitive unique order numbers, but also effectively avoid the problem of leaking business information due to the single rule of the order number.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to computer software application technology, in particular to a method, device and system for obtaining order numbers through computer software. Background Art

[0002] With the diversification of business models, such as banking transactions, logistics transportation, product sales, etc., each transaction in its application scenarios requires a unique order number in order to manage various types of business. At present, the unique order number is generally generated by self-increment or snowflake algorithm. The self-increment method is to customize a data table with a maximum number mechanism. On the basis of not exceeding the maximum number, the current order number is increased by 1 each time as a new order number, and the order number is stored in the maximum data table. The order numbers generated by this self-increment method have order rules and predictable quantities. Users can calculate the service-side business volume based on the order number, which poses a risk of leaking business information. Although the order numbers generated by the snowflake algorithm can avoid the above problems, the order number length is too long, which has an adverse effect on storage and query, and the order number rules are meaningless. Summary of the invention

[0003] In order to solve the problems in the prior art, the present invention provides a method, device and system for obtaining order numbers that are suitable for different business scenarios. The order numbers obtained by the method, device and system for obtaining order numbers can avoid the prediction of order number business volume, thereby effectively avoiding the occurrence of business information leakage problems.

[0004] In order to achieve the above object, the present invention provides a method for obtaining a tracking number, which is characterized by comprising:

[0005] Parse the number rule configuration entered by the user;

[0006] Generate a tracking number based on the parsed tracking number rule configuration;

[0007] When receiving a request to obtain a tracking number, send the tracking number;

[0008] Among them, the order number rule configuration at least includes a batch number segment and a random number segment.

[0009] Preferably, the tracking number rule configuration also includes one or more of a prefix, a suffix, and a custom segment.

[0010] Preferably, when the tracking number rule configuration includes a prefix, a suffix, and a custom segment, the order of the tracking number rule configuration is prefix, batch number segment, custom segment, random number segment, and suffix.

[0011] Preferably, in the method for obtaining the order number,

[0012] Each batch of number segments corresponds to at least two random numbers, and the number of random numbers corresponding to each batch of number segments is also random.

[0013] Preferably, when the number of remaining random numbers corresponding to the current batch number segment is less than a preset number, the generation of random numbers corresponding to the next batch number segment is triggered.

[0014] Preferably, in the method for obtaining the order number,

[0015] The random number segments are stored in a bit two-dimensional array.

[0016] The present invention also provides a device for obtaining a tracking number, which is characterized by comprising:

[0017] The rule parsing unit is used to parse the number rule configuration entered by the user;

[0018] A tracking number generating unit, used to generate tracking numbers according to the parsed tracking number rule configuration;

[0019] The order number sending unit is used to send the order number when receiving the order number acquisition request;

[0020] Among them, the order number rule configuration at least includes a batch number segment and a random number segment.

[0021] Preferably, the device for obtaining the order number further includes:

[0022] A trigger is used to trigger the generation of random numbers corresponding to the next batch of number segments when the number of remaining random numbers corresponding to the current batch of number segments is less than a preset number.

[0023] Preferably, the device for obtaining the order number further includes:

[0024] The memory is used to store the random number segment in a bit two-dimensional array.

[0025] The present invention also provides a system for obtaining a tracking number, comprising: a user terminal and a device for obtaining a tracking number,

[0026] The user terminal is used to input the order number rule configuration and send an order number acquisition request to the device for acquiring the order number;

[0027] The device for obtaining the order number is used to parse the order number rule configuration input by the user terminal and generate the order number according to the parsed order number rule configuration, and when receiving the order number acquisition request, send the order number to the user terminal;

[0028] Among them, the order number rule configuration at least includes a batch number segment and a random number segment.

[0029] The method, device and system for obtaining order numbers of the present invention allow users to define order number rules and lengths by themselves, thereby facilitating the configuration of different order numbers according to different business scenarios; further, the method, device and system for obtaining order numbers of the present invention, while combining the self-increment method to generate batch number segments and the random algorithm to generate random number segments to generate a sufficient number of non-repetitive order numbers, also effectively avoids the problem of business information leakage. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1 A schematic diagram of a flow chart of a method for obtaining a tracking number according to an embodiment of the present invention;

[0031] Figure 2 A schematic diagram of a user terminal operation interface according to an embodiment of the present invention;

[0032] Figure 3 A schematic diagram of the configuration of the tracking number rule according to an embodiment of the present invention;

[0033] Figure 4 A schematic diagram of a bit two-dimensional array storage method according to an embodiment of the present invention;

[0034] Figure 5 A schematic diagram of the structure of a device for obtaining a tracking number according to an embodiment of the present invention;

[0035] Figure 6 A schematic diagram of the structure of a system for obtaining order numbers according to an embodiment of the present invention. DETAILED DESCRIPTION

[0036] The following specific embodiments illustrate the implementation of the present invention, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. Although the description of the present invention will be introduced in conjunction with the preferred embodiment, this does not mean that the features of this invention are limited to this implementation. On the contrary, the purpose of introducing the invention in conjunction with the implementation is to cover other options or modifications that may extend from the claims of the present invention. In order to provide a deep understanding of the present invention, the following description will include many specific details. The present invention can also be implemented without using these details. In addition, in order to avoid confusion or blurring the focus of the present invention, some specific details will be omitted in the description.

[0037] At present, the order numbers are generally generated by self-incrementing or snowflake algorithm. The self-incrementing method has predictable rules and quantities for the order numbers. Users can calculate the service volume of the server based on the order numbers, which poses a risk of leaking commercial information. Although the snowflake algorithm can avoid the above problems, the order numbers are too long and need to be generated in real time, which is not conducive to the storage and query of the order numbers, and the order number rules are meaningless.

[0038] In order to solve the problems in the prior art, the present invention provides a method, device and system for obtaining a tracking number with strong confidentiality and convenient storage and query. The technical solution of the present invention is described in detail below in conjunction with the accompanying drawings.

[0039] Figure 1 FIG. 1 is a flow chart of a method for obtaining a tracking number according to an embodiment of the present invention. Figure 1 As shown, the method of obtaining the order number includes:

[0040] S10, parsing the order number rule configuration input by the user;

[0041] S20, generating a tracking number according to the parsed tracking number rule configuration;

[0042] S30, when receiving a request for obtaining a tracking number, sending the tracking number;

[0043] Among them, the order number rule configuration at least includes a batch number segment and a random number segment.

[0044] Execute S10 to parse the order number rule configuration input by the user. The user inputs the order number rule configuration by operating the user terminal, which may be a portable intelligent terminal or a designated terminal. The user terminal includes an operation interface, and the user sets the order number rule configuration through the operation interface. Figure 2 FIG. 1 is a schematic diagram of a user terminal operation interface according to an embodiment of the present invention. Figure 2 As shown, the operation interface includes but is not limited to the following input items: order number name (name), code, current batch initial value (current value), order number format rule configuration (format), whether to generate ordered order numbers (sort), etc. Among them, the order number rule configuration is realized by editing the "Format" column.

[0045] In this embodiment, the order number rule configuration includes at least a batch number segment and a random number segment. In this embodiment, the batch number segment set by the user can be generated by an auto-increment method, and the random number segment can be generated by a random algorithm.

[0046] Specifically, in actual applications, the batch number can be a 1-3 digit number, which can be specified by the user according to his or her needs. In this embodiment, the self-increment method is to customize a data table with a maximum number mechanism, and based on the maximum number, the current order number is increased by 1 each time as a new order number. It is known to those skilled in the art that the batch number segment can also be generated by a self-decrement method, which is not limited here.

[0047] In practical applications, random numbers can be generated by a random number generator. The random number generator generates random numbers through the random number generation function in programming languages ​​and software such as C, C++, C#, Java, Matlab, PHP, C51, etc. Similarly, users can also specify the number of bits of the random number according to their needs.

[0048] In this embodiment, the tracking number rule configuration may also include one or more of a prefix, a suffix, and a custom segment.

[0049] When the order number rule configuration includes a prefix, a suffix, and a custom segment, the order of the order number rule configuration can be prefix, batch number segment, custom segment, random number segment, and suffix. The prefix, custom segment, and suffix are also values ​​specified by the user. Specifically, they can be used to indicate the time of the order number, the type of the order number, the identification of the computer room, and other contents. The order number format rule configuration can also adopt other orders, which are not limited here.

[0050] Figure 3 FIG. 1 is a schematic diagram of the configuration of the number rule according to an embodiment of the present invention. Figure 3 As shown in the figure, when the number rule entered by the user is configured as P[%07d]01%02d s, it can be parsed to find that P is the prefix, [%07d] is the batch number segment ([] is the truncation symbol), 01 is the custom segment, %02d is the random number segment, and s is the suffix. Through such settings, users can define the number rule and length by themselves, which is convenient for configuring different numbers according to different business scenarios.

[0051] Execute S20 to generate a tracking number according to the parsed tracking number rule configuration.

[0052] In this embodiment, when generating the order number, each batch number segment corresponds to at least two random numbers, and the number of random numbers corresponding to each batch number segment is also random. As described above, the batch number is automatically incremented after the random number corresponding to the current batch number is used up, and the batch number is automatically incremented by 1 to form a new batch number. In order to increase the unpredictability of the order number, the number of random numbers corresponding to each batch number is not fixed. The random number generator calculates an unfixed value less than the maximum value represented by the length of the random number configured by the user as the number of random numbers corresponding to the batch number. In this way, while the random number segment generates a sufficient number of non-repetitive order numbers, it also effectively avoids the problem of business information leakage.

[0053] Furthermore, in this embodiment, when the number of remaining random numbers corresponding to the current batch number is less than the preset number, the generation of the random numbers corresponding to the next batch number is triggered. The random numbers can be preloaded, and the random numbers corresponding to the next batch number are pre-generated before the random numbers corresponding to the previous batch number are about to be used up; the specific process can be that point points to the segment (data space) currently in use, and the segment in use is _segment1. When the random numbers in segment1 are about to be obtained, and the remaining ones are less than a certain proportion, the next segment_2 will be automatically triggered to pre-generate the next batch of random numbers; when segment1 is completely used up, point will switch to point to segment2; when the single number is obtained again, it will be obtained from segment2, and so on. The aforementioned pre-generation of the next batch of random numbers before the previous batch of random numbers is about to be used up means that when there are N random numbers corresponding to the current batch (N is a natural number greater than or equal to 1) or when the remaining number percentage is lower than the specified threshold, the next batch of random numbers is pre-generated. When a user obtains an order number, he can take a random number from the current segment and combine it with the current batch number and order number rules to generate a complete order number.

[0054] In this embodiment, the random number segment may be stored in a bit two-dimensional array. Figure 4 Schematic diagram of the bit two-dimensional array storage method of an embodiment of the present invention. In this embodiment, in order to reduce the memory occupation of a large number of random numbers, the random numbers are stored in a bit two-dimensional array. Each random number occupies 1 bit, and the index of the bit in the two-dimensional array represents the value of the random number. The value of the bit array index corresponding to the generated random number is marked as 1, such as Figure 4 In FIG. 1 , the gray marked blocks are the locations where random numbers are stored in the bit two-dimensional array. In this embodiment, the length of each row of the bit array is 64, and the bit two-dimensional array index corresponding to a certain value can be quickly calculated based on the shift operation.

[0055] Based on the same inventive concept, the present invention also provides a device for obtaining a tracking number. Figure 5 Schematic diagram of the structure of the device for obtaining the order number according to an embodiment of the present invention. Figure 5 As shown, the device comprises:

[0056] A rule parsing unit 21, used to parse the number rule configuration input by the user;

[0057] A tracking number generating unit 22, configured to generate a tracking number according to the parsed tracking number rule configuration;

[0058] The order number sending unit 23 is used to send the order number when receiving the order number acquisition request;

[0059] Among them, the order number rule configuration at least includes a batch number segment and a random number segment.

[0060] Furthermore, the device for obtaining the order number also includes: a trigger, which is used to trigger the generation of random numbers corresponding to the next batch number segment when the number of remaining random numbers corresponding to the current batch number segment is less than a preset number.

[0061] Furthermore, the device for obtaining the order number also includes: a memory for storing the random number segment in a bit two-dimensional array.

[0062] For the implementation of the device for obtaining the order number in this embodiment, please refer to the implementation of the method for obtaining the order number mentioned above, which will not be repeated here.

[0063] Based on the same inventive concept, the present invention also provides a system for obtaining a tracking number. Figure 6 FIG. 1 is a schematic diagram of the structure of a system for obtaining a tracking number according to an embodiment of the present invention. Figure 6 As shown, the system includes: a user terminal 10 and a device 20 for obtaining an order number; the user terminal 10 is used to input an order number rule configuration and send an order number acquisition request to the device 20 for obtaining an order number; the device 20 for obtaining an order number is used to parse the order number rule configuration input by the user terminal and generate an order number according to the parsed order number rule configuration, and when receiving the order number acquisition request, send the order number to the user terminal, wherein the order number rule configuration includes at least a batch number segment and a random number segment.

[0064] In this embodiment, the user terminal 10 can be a portable intelligent terminal or a designated terminal, and the user terminal 10 and the device 20 for obtaining the order number are connected through a Restful interface. The user terminal 10 includes an operation interface, and the user sets the order number rule configuration and sends a request for the order number to the device for obtaining the order number through the operation interface. The device 20 for obtaining the order number includes: a rule parsing unit 21, which is used to parse the order number rule configuration input by the user; a number generating unit 22, which is used to generate the order number according to the parsed order number rule configuration; and a number sending unit 23, which is used to send the order number when receiving the order number acquisition request.

[0065] The method, device and system for obtaining order numbers in the above-mentioned embodiments of the present invention allow users to define order number rules and lengths by themselves, so as to configure different order numbers according to different business scenarios; further, the method, device and system for obtaining order numbers of the present invention, while combining the self-increment method to generate batch number segments and the random algorithm to generate random number segments to generate a sufficient number of non-repetitive order numbers, also effectively avoids the problem of business information leakage; further, the method, device and system for obtaining order numbers of the present invention adopts a bit two-dimensional array to store random numbers, thereby reducing the memory occupied by a large number of random numbers.

[0066] Based on the same technical concept, an embodiment of the present invention provides a computer device, including at least one processor and at least one memory, wherein the memory stores a computer program, and when the program is executed by the processor, the processor is able to execute the above-mentioned method of obtaining the order number.

[0067] Based on the same technical concept, an embodiment of the present invention provides a computer-readable storage medium. When the instructions in the storage medium are executed by a processor in a device, the device can execute the above-mentioned method for obtaining the order number.

[0068] Optionally, the memory is used to store programs; the memory may include volatile memory (English: volatile memory), such as random-access memory (English: random-access memory, abbreviated: RAM), such as static random-access memory (English: static random-access memory, abbreviated: SRAM), double data rate synchronous dynamic random access memory (English: Double Data Rate Synchronous Dynamic Random Access Memory, abbreviated: DDR SDRAM), etc.; the memory may also include non-volatile memory (English: non-volatile memory), such as flash memory (English: flash memory). The memory is used to store computer programs (such as applications, functional modules, etc. that implement the above method), computer instructions, etc., and the above computer programs, computer instructions, etc. can be partitioned and stored in one or more memories. And the above computer programs, computer instructions, data, etc. can be called by the processor.

[0069] The above-mentioned computer programs, computer instructions, etc. may be stored in one or more memories in partitions, and the above-mentioned computer programs, computer instructions, data, etc. may be called by a processor.

[0070] The processor is used to execute the computer program stored in the memory to implement the various steps in the method involved in the above embodiment. For details, please refer to the relevant description in the above method embodiment.

[0071] The processor and the memory may be independent structures or integrated structures. When the processor and the memory are independent structures, the memory and the processor may be coupled and connected via a bus.

[0072] It should be noted that the steps in the method provided by the present invention can be implemented by using corresponding modules, devices, units, etc. in the system. Those skilled in the art can refer to the technical solution of the method to realize the composition of the system, that is, the embodiments in the method can be understood as preferred examples for constructing the system, which will not be elaborated here.

[0073] Those skilled in the art know that, in addition to implementing the system and its various devices provided by the present invention in a purely computer-readable program code, the system and its various devices provided by the present invention can be made to implement the same functions in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, the system and its various devices provided by the present invention can be considered as a hardware component, and the devices for implementing various functions included therein can also be considered as structures within the hardware component; the devices for implementing various functions can also be considered as both software modules for implementing the method and structures within the hardware component.

[0074] The embodiments of the present invention are merely illustrative of the principles and effects of the present invention, and are not intended to limit the present invention. Anyone familiar with the technology may modify or change the above embodiments without violating the spirit and scope of the present invention. Therefore, all equivalent modifications or changes made by a person of ordinary skill in the art without departing from the spirit and technical ideas disclosed by the present invention should still be covered by the claims of the present invention.

Claims

1. A method for obtaining a tracking number, characterized in that: include: Parse the number rule configuration entered by the user; Generate a tracking number based on the parsed tracking number rule configuration; When receiving a request to obtain a tracking number, send the tracking number; The order of configuring the tracking number rules is as follows: prefix, batch number segment, custom segment, random number segment and suffix, wherein the prefix, custom segment and suffix are values ​​specified by the user. Each batch number segment corresponds to at least two random numbers, and the number of random numbers corresponding to each batch number segment is also random; the number of random numbers corresponding to each batch number is not fixed. The random number generator calculates an unfixed value less than the maximum value represented by the length of the random number configured by the user as the number of random numbers corresponding to this batch number; When the number of remaining random numbers corresponding to the current batch of number segments is less than the preset number, the generation of random numbers corresponding to the next batch of number segments is triggered; The random numbers are preloaded, and the random numbers corresponding to the next batch number are pre-generated before the random numbers corresponding to the previous batch number are about to be used up. The specific process is that point points to the data space segment currently in use, and the segment in use is _segment1. When the random numbers in segment1 are about to be obtained, and the remaining number is less than a certain proportion, it will automatically trigger the next segment_2 to pre-generate the next batch of random numbers; when segment1 is completely used up, point will switch to point to segment2; when the order number is obtained again, it will be obtained from segment2, and so on. The aforementioned pre-generation of the next batch of random numbers before the previous batch of random numbers is about to be used up means that the next batch of random numbers is pre-generated when there are N random numbers corresponding to the current batch or when the remaining number percentage is lower than the specified threshold; when the user obtains the order number, a random number is taken from the current segment and combined with the current batch number and order number rules to generate a complete order number, where N is a natural number greater than or equal to 1; The random numbers are stored in a bit two-dimensional array. Each random number occupies 1 bit. The index of the bit in the two-dimensional array represents the value of the random number. The length of each row of the bit array is 64. The bit two-dimensional array index corresponding to a certain value is quickly calculated based on the shift operation.

2. A device for obtaining a tracking number, characterized in that: include: The rule parsing unit is used to parse the number rule configuration entered by the user; A tracking number generating unit, used to generate tracking numbers according to the parsed tracking number rule configuration; The order number sending unit is used to send the order number when receiving the order number acquisition request; The order of the number rule configuration is prefix, batch number segment, custom segment, random number segment and suffix, wherein the prefix, custom segment and suffix are values ​​specified by the user; each batch number segment corresponds to at least two random numbers, and the number of random numbers corresponding to each batch number segment is also random; the number of random numbers corresponding to each batch number is not fixed, and the random number generator calculates an unfixed value less than the maximum value represented by the length of the random number configured by the user as the number of random numbers corresponding to this batch number; Also includes: A trigger is used to trigger the generation of random numbers corresponding to the next batch of number segments when the number of remaining random numbers corresponding to the current batch of number segments is less than the preset number; The random numbers are preloaded, and the random numbers corresponding to the next batch number are pre-generated before the random numbers corresponding to the previous batch number are about to be used up. The specific process is that point points to the data space segment currently in use, and the segment in use is _segment1. When the random numbers in segment1 are about to be obtained, and the remaining number is less than a certain proportion, it will automatically trigger the next segment_2 to pre-generate the next batch of random numbers; when segment1 is completely used up, point will switch to point to segment2; when the order number is obtained again, it will be obtained from segment2, and so on. The aforementioned pre-generation of the next batch of random numbers before the previous batch of random numbers is about to be used up means that the next batch of random numbers is pre-generated when there are N random numbers corresponding to the current batch or when the remaining number percentage is lower than the specified threshold; when the user obtains the order number, a random number is taken from the current segment and combined with the current batch number and order number rules to generate a complete order number, where N is a natural number greater than or equal to 1; The random numbers are stored in a bit two-dimensional array. Each random number occupies 1 bit. The index of the bit in the two-dimensional array represents the value of the random number. The length of each row of the bit array is 64. The bit two-dimensional array index corresponding to a certain value is quickly calculated based on the shift operation.

3. A system for obtaining a tracking number, characterized in that: Including: a user terminal and a device for obtaining a single number, The user terminal is used to input the order number rule configuration and send an order number acquisition request to the device for acquiring the order number; The device for obtaining the order number is used to parse the order number rule configuration input by the user terminal and generate the order number according to the parsed order number rule configuration, and when receiving the order number acquisition request, send the order number to the user terminal; The order of configuring the tracking number rules is prefix, batch number segment, custom segment, random number segment and suffix. The prefix, custom segment and suffix are values ​​specified by the user. Each batch number segment corresponds to at least two random numbers, and the number of random numbers corresponding to each batch number segment is also random; the number of random numbers corresponding to each batch number is not fixed. The random number generator calculates an unfixed value less than the maximum value represented by the length of the random number configured by the user as the number of random numbers corresponding to this batch number; When the number of remaining random numbers corresponding to the current batch of number segments is less than the preset number, the generation of random numbers corresponding to the next batch of number segments is triggered; The random numbers are preloaded, and the random numbers corresponding to the next batch number are pre-generated before the random numbers corresponding to the previous batch number are about to be used up. The specific process is that point points to the data space segment currently in use, and the segment in use is _segment1. When the random numbers in segment1 are about to be obtained, and the remaining ones are less than a certain proportion, the next segment_2 will be automatically triggered to pre-generate the next batch of random numbers. When segment1 is completely used up, point will switch to point to segment2; when the order number is obtained again, it will be obtained from segment2, and so on. The aforementioned pre-generation of the next batch of random numbers before the previous batch of random numbers is about to be used up means that when there are N random numbers corresponding to the current batch or when the remaining number percentage is lower than the specified threshold, the next batch of random numbers is pre-generated. When the user obtains the order number, a random number is taken out from the current segment and combined with the current batch number and the order number rule to generate a complete order number, and N is a natural number greater than or equal to 1. The random numbers are stored in a bit two-dimensional array. Each random number occupies 1 bit. The index of the bit in the two-dimensional array represents the value of the random number. The length of each row of the bit array is 64. The bit two-dimensional array index corresponding to a certain value is quickly calculated based on the shift operation.