CN110765738A - System and method for generating card number and electronic equipment - Google Patents

System and method for generating card number and electronic equipment Download PDF

Info

Publication number
CN110765738A
CN110765738A CN201810818708.6A CN201810818708A CN110765738A CN 110765738 A CN110765738 A CN 110765738A CN 201810818708 A CN201810818708 A CN 201810818708A CN 110765738 A CN110765738 A CN 110765738A
Authority
CN
China
Prior art keywords
execution
generating
card
card numbers
card number
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201810818708.6A
Other languages
Chinese (zh)
Inventor
王瑞玲
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hitevision Polytron Technologies Inc
Original Assignee
Hitevision Polytron Technologies Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitevision Polytron Technologies Inc filed Critical Hitevision Polytron Technologies Inc
Priority to CN201810818708.6A priority Critical patent/CN110765738A/en
Publication of CN110765738A publication Critical patent/CN110765738A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Telephone Function (AREA)

Abstract

The invention discloses a system and a method for generating a card number and electronic equipment, wherein the system comprises: the setting module is used for setting the number of the target card numbers; the card number generation module is provided with a single maximum threshold value and is used for receiving the number of the target card numbers and generating random card numbers according to the number of the target card numbers and the single maximum threshold value; the single maximum threshold is the upper limit of the number of the card numbers generated by the card number generation module in a single execution. The system and the method can quickly generate the random card numbers with the target number, and the system has stable operation and good user experience.

Description

System and method for generating card number and electronic equipment
Technical Field
The present invention relates to the field of card number management technologies, and in particular, to a system and a method for generating a card number, and an electronic device.
Background
Generating random VIP card numbers is a common application. By using the current card number generation method, thousands of random card numbers can be generated at most once, and if tens of thousands of card numbers need to be generated, the web page is crashed due to the memory limitation and the longest program execution time limitation. Although the configuration of the memory and the maximum execution time can be adjusted, if the memory setting is too large, the computer is stuck, and if the maximum execution time of the web page is too large, the user can wait for too long, which results in poor user experience.
Disclosure of Invention
In view of this, the present invention is directed to a system and a method for generating card numbers, and an electronic device, which are capable of generating random card numbers with target number, and have stable operation and good user experience.
In view of the above object, the present invention provides a system for generating a card number, comprising:
the setting module is used for setting the number of the target card numbers;
the card number generation module is provided with a single maximum threshold value and is used for receiving the number of the target card numbers and generating random card numbers according to the number of the target card numbers and the single maximum threshold value;
the single maximum threshold is the upper limit of the number of the card numbers generated by the card number generation module in a single execution.
Optionally, the card number generation module includes:
and the execution times determining submodule is used for determining the execution times according to the single maximum threshold and the number of the target card numbers.
And the execution submodule is used for generating a random card number according to the execution times, and releasing the memory after the single execution is finished.
Optionally, the card number generation module further includes:
the number segment generation submodule is used for generating a specific number segment according to the execution times;
and the execution submodule is used for generating the random card number with the specific number segment according to the execution times, and releasing the memory after the single execution is finished.
Optionally, the system further includes:
and the progress monitoring module is used for displaying the generation progress of the card number according to the execution progress of the execution submodule.
The embodiment of the invention also provides a method for generating the card number, which comprises the following steps:
setting the number of target card numbers;
generating random card numbers according to the single maximum threshold value and the number of the target card numbers;
the single maximum threshold is the upper limit of the number of the card numbers generated by single execution.
Optionally, the method further includes:
determining the execution times according to the single maximum threshold and the number of the target card numbers;
and generating a random card number according to the execution times, and releasing the memory after the single execution is finished.
Optionally, the method further includes:
generating a specific number section according to the execution times;
and generating the random card number with the specific number segment according to the execution times, finishing the single execution, and releasing the memory.
Optionally, the method further includes:
and displaying the generation progress of the card number according to the progress of generating the random card number.
An embodiment of the present invention further provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the method when executing the computer program.
From the above, the system, the method and the electronic device for generating card numbers provided by the invention set the number of the target card numbers through the setting module; the card number generation module generates random card numbers according to the number of the target card numbers and the single maximum threshold value. By utilizing the system and the method, the large-batch card number is divided into the plurality of small-batch card numbers to be respectively generated, and the memory is released after the small-batch card number is generated each time, so that the problem of memory overflow can be avoided, the system is stable in operation, the random card numbers with the target number can be quickly generated, and the user experience is good.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a schematic diagram of a system according to an embodiment of the present invention;
fig. 2 is a schematic diagram of the card number generation module according to the embodiment of the invention;
FIG. 3 is a schematic flow chart of a method according to an embodiment of the present invention;
FIG. 4 is a schematic flow chart of a method according to a second embodiment of the present invention;
FIG. 5 is a flowchart illustrating a method according to a third embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to specific embodiments and the accompanying drawings.
It should be noted that all expressions using "first" and "second" in the embodiments of the present invention are used for distinguishing two entities with the same name but different names or different parameters, and it should be noted that "first" and "second" are merely for convenience of description and should not be construed as limitations of the embodiments of the present invention, and they are not described in any more detail in the following embodiments.
FIG. 1 is a schematic diagram of a system according to an embodiment of the present invention. As shown in the figure, the system for generating the card number disclosed by the invention comprises a setting module and a card number generating module.
The setting module is used for setting the number of target card numbers to be generated;
the card number generation module is provided with a single maximum threshold value and is used for receiving the number of the target card numbers and generating random card numbers according to the number of the target card numbers and the single maximum threshold value.
The single maximum threshold is the upper limit of the number of the card numbers generated by the card number generation module in a single execution, the card number generation module determines the execution times of the card number generation module according to the number of the target card numbers and the number of the card numbers generated in a single execution, and the card number generation module executes the corresponding times to generate the random card numbers of the target number.
Fig. 2 is a schematic diagram of the card number generation module according to the embodiment of the invention. As shown in the figure, in the embodiment of the present invention, the card number generation module includes an execution number determination sub-module and an execution sub-module.
And the execution times determining submodule is used for determining the execution times according to the single maximum threshold and the number of the received target card numbers.
And the execution submodule is used for generating a random card number according to the execution times, and releasing the memory after the single execution is finished.
In the embodiment of the invention, the number of the target card numbers is set to be N by using the setting module, the single maximum threshold value is set to be M, and the execution times are determined according to the number of the target card numbers which is N and the single maximum threshold value which is M.
If N < M, the execution times is 1, the execution submodule is used for executing for 1 time, and random card numbers with the quantity of N are generated;
if N is M, the execution times is 1, the execution submodule is used for executing for 1 time, and the number of the random card numbers is N;
for the case that N is greater than M, if N% M is 0, the execution times is N/M, the execution submodule is used for executing N/M times, and the number of random card numbers is N; if N% M is not equal to 0, the execution times is (N/M) +1, and the execution submodules are used for executing (N/M) +1 times to generate N random card numbers.
The execution sub-module executes the operation of releasing the memory after generating the random card number by single execution, thereby avoiding the problem of memory overflow.
As shown in fig. 2, in the embodiment of the present invention, the card number generation module further includes a number segment generation submodule.
The number segment generation submodule is used for generating a specific number segment according to the execution times;
and the execution submodule is used for generating a random card number with a specific number segment according to the execution times, and releasing the memory after the single execution is finished.
The execution submodule generates a random card number with a specific number segment in a single execution mode, the execution submodule generates a random card number with the number of target card numbers according to the execution times, and the random card number has the specific number segment with the execution times.
The system for generating the card number of the embodiment of the invention also comprises a progress monitoring module.
And the progress monitoring module is used for displaying the generation progress of the card number according to the execution progress of the execution submodule.
FIG. 3 is a flow chart of a method according to an embodiment of the present invention. As shown in the figure, the method for generating the card number disclosed by the invention comprises the following steps:
setting the number of target card numbers;
and generating a random card number according to the single maximum threshold and the number of the target card numbers.
FIG. 4 is a flowchart illustrating a method according to a second embodiment of the present invention. As shown in the figure, the method for generating a card number according to the embodiment of the present invention further includes:
determining the execution times according to the single maximum threshold and the number of the target card numbers;
and generating a random card number according to the execution times, and releasing the memory after the single execution is finished.
FIG. 5 is a flowchart illustrating a method according to a third embodiment of the present invention. As shown in the figure, the method for generating a card number according to the embodiment of the present invention further includes:
generating a specific number section according to the execution times;
and generating a random card number with a specific number segment according to the execution times, finishing single execution and releasing the memory.
In the embodiment of the invention, the method further comprises the following steps:
and displaying the generation progress of the card number according to the progress of generating the random card number.
In view of the above object, the embodiment of the present invention further provides an embodiment of an apparatus for executing the method for generating a card number. The device comprises:
one or more processors, and a memory.
The apparatus performing the method of generating a card number may further include: an input device and an output device.
The processor, memory, input device, and output device may be connected by a bus or other means.
The memory, which is a non-volatile computer-readable storage medium, may be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as program instructions/modules corresponding to the method for generating a card number in the embodiment of the present invention (for example, the setting module, the card number generation module shown in fig. 1). The processor executes various functional applications and data processing of the server by running the nonvolatile software program, instructions and modules stored in the memory, namely, the method for generating a card number of the above method embodiment is realized.
The memory may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created from use of a device that performs the method of generating a card number, and the like. Further, the memory may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some embodiments, the memory optionally includes memory remotely located from the processor, and these remote memories may be connected to the member user behavior monitoring device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device may receive input numeric or character information and generate key signal inputs related to user settings and function control of a device performing the method of generating a card number. The output device may include a display device such as a display screen.
The one or more modules are stored in the memory and, when executed by the one or more processors, perform a method of generating a card number in any of the method embodiments described above. The technical effect of the embodiment of the device for executing the method for generating the card number is the same as or similar to that of any method embodiment.
The embodiment of the invention also provides a non-transitory computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions can execute the processing method of the list item operation in any method embodiment. Embodiments of the non-transitory computer storage medium may be the same or similar in technical effect to any of the method embodiments described above.
Finally, it should be noted that, as will be understood by those skilled in the art, all or part of the processes in the methods of the above embodiments may be implemented by a computer program that can be stored in a computer-readable storage medium and that, when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like. The technical effect of the embodiment of the computer program is the same as or similar to that of any of the method embodiments described above.
Furthermore, the apparatuses, devices, etc. described in the present disclosure may be various electronic terminal devices, such as a mobile phone, a Personal Digital Assistant (PDA), a tablet computer (PAD), a smart television, etc., and may also be large terminal devices, such as a server, etc., and therefore the scope of protection of the present disclosure should not be limited to a specific type of apparatus, device. The client disclosed by the present disclosure may be applied to any one of the above electronic terminal devices in the form of electronic hardware, computer software, or a combination of both.
Furthermore, the method according to the present disclosure may also be implemented as a computer program executed by a CPU, which may be stored in a computer-readable storage medium. The computer program, when executed by the CPU, performs the above-described functions defined in the method of the present disclosure.
Further, the above method steps and system elements may also be implemented using a controller and a computer readable storage medium for storing a computer program for causing the controller to implement the functions of the above steps or elements.
Further, it should be appreciated that the computer-readable storage media (e.g., memory) described herein can be either volatile memory or nonvolatile memory, or can include both volatile and nonvolatile memory. By way of example, and not limitation, nonvolatile memory can include Read Only Memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM), which can act as external cache memory. By way of example and not limitation, RAM is available in a variety of forms such as synchronous RAM (DRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The storage devices of the disclosed aspects are intended to comprise, without being limited to, these and other suitable types of memory.
The apparatus of the foregoing embodiment is used to implement the corresponding method in the foregoing embodiment, and has the beneficial effects of the corresponding method embodiment, which are not described herein again.
Those of ordinary skill in the art will understand that: the discussion of any embodiment above is meant to be exemplary only, and is not intended to intimate that the scope of the disclosure, including the claims, is limited to these examples; within the idea of the invention, also features in the above embodiments or in different embodiments may be combined, steps may be implemented in any order, and there are many other variations of the different aspects of the invention as described above, which are not provided in detail for the sake of brevity.
In addition, well known power/ground connections to Integrated Circuit (IC) chips and other components may or may not be shown within the provided figures for simplicity of illustration and discussion, and so as not to obscure the invention. Furthermore, devices may be shown in block diagram form in order to avoid obscuring the invention, and also in view of the fact that specifics with respect to implementation of such block diagram devices are highly dependent upon the platform within which the present invention is to be implemented (i.e., specifics should be well within purview of one skilled in the art). Where specific details (e.g., circuits) are set forth in order to describe example embodiments of the invention, it should be apparent to one skilled in the art that the invention can be practiced without, or with variation of, these specific details. Accordingly, the description is to be regarded as illustrative instead of restrictive.
While the present invention has been described in conjunction with specific embodiments thereof, many alternatives, modifications, and variations of these embodiments will be apparent to those of ordinary skill in the art in light of the foregoing description. For example, other memory architectures (e.g., dynamic ram (dram)) may use the discussed embodiments.
The embodiments of the invention are intended to embrace all such alternatives, modifications and variances that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, substitutions, improvements and the like that may be made without departing from the spirit and principles of the invention are intended to be included within the scope of the invention.

Claims (9)

1. A system for generating a card number, comprising:
the setting module is used for setting the number of the target card numbers;
the card number generation module is provided with a single maximum threshold value and is used for receiving the number of the target card numbers and generating random card numbers according to the number of the target card numbers and the single maximum threshold value;
the single maximum threshold is the upper limit of the number of the card numbers generated by the card number generation module in a single execution.
2. The system of claim 1, wherein the card number generation module comprises:
the execution times determining submodule is used for determining the execution times according to the single maximum threshold and the number of the target card numbers;
and the execution submodule is used for generating a random card number according to the execution times, and releasing the memory after the single execution is finished.
3. The system of claim 2, wherein the card number generation module further comprises:
the number segment generation submodule is used for generating a specific number segment according to the execution times;
and the execution submodule is used for generating the random card number with the specific number segment according to the execution times, and releasing the memory after the single execution is finished.
4. The system of claim 1, further comprising:
and the progress monitoring module is used for displaying the generation progress of the card number according to the execution progress of the execution submodule.
5. A method of generating a card number, comprising:
setting the number of target card numbers;
generating random card numbers according to the single maximum threshold value and the number of the target card numbers;
the single maximum threshold is the upper limit of the number of the card numbers generated by single execution.
6. The method of claim 5, further comprising:
determining the execution times according to the single maximum threshold and the number of the target card numbers;
and generating a random card number according to the execution times, and releasing the memory after the single execution is finished.
7. The method of claim 6, further comprising:
generating a specific number section according to the execution times;
and generating the random card number with the specific number segment according to the execution times, finishing the single execution, and releasing the memory.
8. The method of claim 5, further comprising:
and displaying the generation progress of the card number according to the progress of generating the random card number.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method according to any of claims 5 to 8 when executing the program.
CN201810818708.6A 2018-07-24 2018-07-24 System and method for generating card number and electronic equipment Pending CN110765738A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810818708.6A CN110765738A (en) 2018-07-24 2018-07-24 System and method for generating card number and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810818708.6A CN110765738A (en) 2018-07-24 2018-07-24 System and method for generating card number and electronic equipment

Publications (1)

Publication Number Publication Date
CN110765738A true CN110765738A (en) 2020-02-07

Family

ID=69326816

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810818708.6A Pending CN110765738A (en) 2018-07-24 2018-07-24 System and method for generating card number and electronic equipment

Country Status (1)

Country Link
CN (1) CN110765738A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113721887A (en) * 2021-08-30 2021-11-30 上海通联金融服务有限公司 Method for generating system card number by random hash algorithm

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105095263A (en) * 2014-05-08 2015-11-25 阿里巴巴集团控股有限公司 Generation method for card number and apparatus thereof
CN106469042A (en) * 2015-08-19 2017-03-01 阿里巴巴集团控股有限公司 The generation method of pseudo random number and device
CN107368297A (en) * 2017-06-19 2017-11-21 上海顶羽网络科技有限公司 A kind of method for generating application code
CN107622102A (en) * 2017-09-11 2018-01-23 平安科技(深圳)有限公司 Entity card number generation method and terminal device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105095263A (en) * 2014-05-08 2015-11-25 阿里巴巴集团控股有限公司 Generation method for card number and apparatus thereof
CN106469042A (en) * 2015-08-19 2017-03-01 阿里巴巴集团控股有限公司 The generation method of pseudo random number and device
CN107368297A (en) * 2017-06-19 2017-11-21 上海顶羽网络科技有限公司 A kind of method for generating application code
CN107622102A (en) * 2017-09-11 2018-01-23 平安科技(深圳)有限公司 Entity card number generation method and terminal device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113721887A (en) * 2021-08-30 2021-11-30 上海通联金融服务有限公司 Method for generating system card number by random hash algorithm

Similar Documents

Publication Publication Date Title
CN111062189A (en) Data analysis method and device and electronic equipment
CN110830280B (en) Micro-service gateway device and method and electronic equipment
CN107479868B (en) Interface loading method, device and equipment
US20200137075A1 (en) Method and device for preventing server from being attacked
CN111385137A (en) Terminal awakening method, server and electronic equipment
CN108809943B (en) Website monitoring method and device
CN110708360A (en) Information processing method and system and electronic equipment
CN110781139A (en) Teaching plan resource management system and method and electronic equipment
CN110765738A (en) System and method for generating card number and electronic equipment
CN110806910A (en) Method and system for optimizing carousel map and electronic equipment
US20140324368A1 (en) Test method, test system and electronic device employing the same
CN111352993A (en) Cross-platform data synchronization method and device and electronic equipment
CN111382415A (en) Unified login method and device and electronic equipment
CN111104648A (en) Software processing method and device, application program and electronic equipment
CN111190529A (en) Keyboard input method and device and electronic equipment
CN111382560A (en) Courseware making method and system and electronic equipment
CN111200621A (en) Ad hoc network method and device, and electronic device
CN111355970A (en) Live broadcast management method and device and electronic equipment
CN111158569A (en) Erasing operation method and device and electronic equipment
CN110908567B (en) Terminal assistant device and method and electronic equipment
CN111385491A (en) Image superposition method and device and electronic equipment
CN110912959B (en) Equipment access method and device, management and control system and electronic equipment
CN111142982A (en) Event execution method and device and electronic equipment
CN111199498A (en) Data management method, server and electronic equipment
CN110895474A (en) Terminal micro-service device and method and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination