CN105095263B - method and device for generating card number - Google Patents

method and device for generating card number Download PDF

Info

Publication number
CN105095263B
CN105095263B CN201410193651.7A CN201410193651A CN105095263B CN 105095263 B CN105095263 B CN 105095263B CN 201410193651 A CN201410193651 A CN 201410193651A CN 105095263 B CN105095263 B CN 105095263B
Authority
CN
China
Prior art keywords
card number
information
card
number segment
value
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.)
Active
Application number
CN201410193651.7A
Other languages
Chinese (zh)
Other versions
CN105095263A (en
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.)
Advanced New Technologies Co Ltd
Original Assignee
Advanced New Technologies Co Ltd
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 Advanced New Technologies Co Ltd filed Critical Advanced New Technologies Co Ltd
Priority to CN201410193651.7A priority Critical patent/CN105095263B/en
Publication of CN105095263A publication Critical patent/CN105095263A/en
Priority to HK16101344.3A priority patent/HK1213341A1/en
Application granted granted Critical
Publication of CN105095263B publication Critical patent/CN105095263B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

the application provides a card number generation method and a device thereof, wherein the method comprises the following steps: obtaining a card number application request of a user; distributing a card number application request to one or more nodes, wherein each node has non-repeated number field information; and obtaining corresponding card number basic information and a corresponding card number segment value according to the received card number application request and the corresponding card number segment information through a node receiving the card number application request, and generating the card number according to the corresponding card number basic information and the corresponding card number segment value, wherein the obtained card number segment values corresponding to the same card number basic information are different. According to the method for generating the card number, the different number segment values in the number segment are obtained in parallel through the plurality of nodes, and the card number is generated according to the obtained different number segment values and the corresponding card number basic information, so that the generated card number is not repeated, the problem of performance bottleneck during a large number of card issuing is solved, and the card issuing efficiency is improved.

Description

Method and device for generating card number
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for generating a card number.
Background
Generally, as shown in FIG. 1', the bank card number may include three parts, a card BIN value, a card number random number field and a check digit. The card BIN value (BIN Identification Number) is an issuer Identification code and is mainly used for identifying card issuing organization and card type information. The card number random number segment is a random number sequence for removing the BIN value and the check digit of the card, and is mainly used for distinguishing different card number entities with the same BIN value of the card, and each bank card entity corresponds to a unique serial number. The check digit is mainly used for verifying the validity of the card number.
at present, the method for generating the card number of the bank card is as follows: firstly, determining the BIN value of the card, secondly, generating a random number segment of the card number without repetition, then calculating a check digit, and finally, generating the card number of the bank card according to the BIN value of the card, the random number segment of the card number and the check digit. The generation of the random number segment of the card number without repetition mainly comprises two modes: the first way ensures that the generated number sequence is not repeated through the characteristics of the database product, such as: the sequence (automatically added number sequence according to a certain rule) object of an Oracle database ensures that the generated number sequence is not repeated. The second way ensures that the generated number sequence is not repeated by maintaining an automatically incremented counter in the database.
However, in the process of implementing the present application, the inventors found that at least the following problems exist in the prior art: the database resource is relied on to ensure that non-repeated card number random number segments are generated, and under the condition of high concurrency (namely, a large number of card numbers are generated at the same time), the performance bottleneck of card issuing can be generated, so that the card issuing efficiency is poor.
Disclosure of Invention
The present application is directed to solving, at least to some extent, one of the technical problems in the related art.
Therefore, a first objective of the present application is to provide a card number generation method, which can solve the problem of performance bottleneck when issuing a large number of cards, and improve card issuing efficiency.
A second object of the present application is to provide a card number generation apparatus.
In order to achieve the above object, an embodiment according to a first aspect of the present application provides a card number generation method, including: obtaining a card number application request of a user; distributing the card number application request to one or more nodes, wherein each node has non-repeated number field information; and obtaining corresponding card number basic information and a corresponding card number segment value through a node receiving the card number application request, and generating the card number according to the corresponding card number basic information and the corresponding card number segment value, wherein the obtained card number segment values corresponding to the same card number basic information are different.
According to the method for generating the card number, the different number segment values in the number segment are obtained in parallel through the plurality of nodes, and the card number is generated according to the obtained different number segment values and the corresponding card number basic information, so that the generated card number is not repeated, the problem of performance bottleneck during a large number of card issuing is solved, and the card issuing efficiency is improved.
An embodiment of a second aspect of the present application provides an apparatus for generating a card number, including: the obtaining module is used for obtaining a card number application request of a user; the distribution module is used for distributing the card number application request to one or more nodes, wherein each node has non-repeated number field information; and the generating module is used for acquiring corresponding card number basic information and a corresponding card number segment value through the node receiving the card number application request, and generating the card number according to the corresponding card number basic information and the corresponding card number segment value, wherein the acquired card number segment values corresponding to the same card number basic information are different.
The card number generation device of the embodiment of the application obtains different number segment values in the number segment of the device through a plurality of nodes in parallel, and generates the card number according to the obtained different number segment values and the corresponding card number basic information, so that the generated card number is not repeated, the problem of performance bottleneck during a large number of card issuing is solved, and the card issuing efficiency is improved.
Additional aspects and advantages of the present application will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the present application.
Drawings
FIG. 1' is a diagram illustrating the composition of a bank card number in the prior art.
Fig. 1a is a flow diagram of a method of generating a card number according to one embodiment of the present application.
fig. 1b is a signaling flow diagram when a card number is generated at a client according to one embodiment of the present application.
Fig. 1c is a signaling flow diagram when a server generates a card number according to one embodiment of the present application.
Fig. 2 is a flow chart of a method of generating a card number according to an embodiment of the present application.
Fig. 3 is a diagram of generating a card number according to one embodiment of the present application.
Fig. 4 is a block diagram of a card number generation apparatus according to an embodiment of the present application.
fig. 5 is a block diagram of a card number generation apparatus according to another embodiment of the present application.
fig. 6 is a block diagram of a card number generation apparatus according to still another embodiment of the present application.
Detailed Description
Reference will now be made in detail to embodiments of the present application, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are exemplary and intended to be used for explaining the present application and should not be construed as limiting the present application.
A method for generating a card number and an apparatus therefor according to an embodiment of the present application are described below with reference to the drawings.
fig. 1a is a flow diagram of a method of generating a card number according to one embodiment of the present application. As shown in fig. 1a, the method for generating the card number includes:
S101, obtaining a card number application request of a user.
In this embodiment, when the user needs to apply for the membership card and the benefit card, the corresponding card application column may be clicked at the client, and at this time, the client may obtain the corresponding card number application request. The embodiment is particularly suitable for processing the situation that a user applies for a card number in a large quantity.
s102, the card number application request is distributed to one or more nodes, wherein each node has non-repeated number field information.
In the embodiment, the operation of subsequently and efficiently generating a large number of card numbers is realized by setting a plurality of callable nodes with non-repeated number field information.
Note that S102 may be completed by the client or the server. When S102 is completed by the client, the nodes refer to a plurality of nodes located at the client, and when S102 is completed by the server, the nodes refer to a plurality of nodes located at the server. Distributing the card number application request to multiple nodes may improve processing efficiency.
Specifically, the distribution of the card number application request to one or more nodes may be implemented by: the method comprises the steps of obtaining card number basic information according to a card number application request, inquiring a locally stored information list according to the obtained card number basic information so as to determine the information of a plurality of callable nodes, and then distributing the card number application request to one or more nodes of the plurality of nodes.
The information list may include the card number basic information, the information of the plurality of callable nodes corresponding to the card number basic information, and the number field information corresponding to each node, and may also include the first data corresponding to the card number basic information, that is, the BIN value. The card number base information may include card issuer information, card type information, and the like. For example: the card issuing institution may include mertesbang, carrefour, etc., and the card type information may include a general membership card, a VIP (VIP) membership card, a coupon card, etc. For example, as shown in table 1: the BIN value corresponding to the membership card of mettesbangwei is 000001, which can be distributed to four nodes. The number segment information corresponding to the node 1 is 0/1000, the number segment information corresponding to the node 2 is 1001/2000, the number segment information corresponding to the node 3 is 2001/3000, and the number segment information corresponding to the node 4 is 3001/4000. The BIN value corresponding to the happy membership card is 000005, and the value can be distributed to the node 10, and the number segment information corresponding to the node 10 is 0/1000. The BIN value corresponding to the happy honoured guest card is 000006, and the BIN value can be distributed to the node 11, and the number segment information corresponding to the node 11 is 0/1000.
TABLE 1 information List
S103, obtaining corresponding card number basic information and a corresponding card number segment value through the node receiving the card number application request, and generating the card number according to the corresponding card number basic information and the corresponding card number segment value, wherein the obtained card number segment values corresponding to the same card number basic information are different.
Because the number segment information corresponding to each node is not repeated, the nodes can obtain different number segment values in the corresponding number segment in parallel based on the number segment information of the nodes, thereby ensuring that a plurality of non-repeated card numbers can be generated simultaneously and efficiently.
It should be noted that the above operations may be performed by the client, that is, the client may first obtain the information list from the server, then determine the callable nodes according to the information list, then distribute the obtained card number application request to one or more callable nodes, and finally generate the card number according to the obtained corresponding card number basic information and the obtained number segment value by the node that receives the card number application request, as shown in fig. 1 b; the above operations may also be performed by the server, that is, the server determines a plurality of callable nodes according to the information list stored by the server, then distributes the obtained card number application request to one or more callable nodes, finally generates a card number according to the obtained corresponding card number basic information and the obtained number segment value by the node that receives the card number application request, and then returns the generated card number to the client, as shown in fig. 1c, and finally executes the card issuing operation by the client.
According to the method for generating the card number, the different number segment values in the number segment are obtained in parallel through the plurality of nodes, and the card number is generated according to the obtained different number segment values and the corresponding card number basic information, so that the generated card number is not repeated, the problem of performance bottleneck during a large number of card issuing is solved, and the card issuing efficiency is improved.
Fig. 2 is a flow chart of a method of generating a card number according to an embodiment of the present application. The embodiment is described from the side of the node receiving the card number application request, wherein the node receiving the card number application request can be positioned at the side of the server or the side of the client; for each node receiving the card number application request, the process of generating the card number is executed as shown in fig. 2, and includes:
S201, the information list is inquired to obtain first data corresponding to the basic information of the current card number, and a current number segment value is obtained according to the first data and the number segment information corresponding to the current node.
specifically, the current node determines whether first data exists in the local information list, and if so, the assigned number segment value is used as the current number segment value, and then the assigned number segment value is subjected to an addition operation. For example, assuming that the segment information corresponding to the current node is 0 to 1000, and the current card number basis information includes mettesland and ordinary membership cards, if the local information list has the first data, i.e., BIN value, of the ordinary membership card corresponding to mettesland, and it is assumed that 000001, the assigned segment value in the segment information corresponding to the first data is used as the current segment value, and it is assumed that the assigned segment value is 3, 3 is used as the current segment value, and then the assigned segment value is set to 4, so that when the current node receives the next request for applying for the ordinary membership card of mettesland, it may use 4 as the segment value corresponding to the request, and similarly, it is necessary to set the assigned segment value to 5, thereby ensuring that the obtained segment values corresponding to the same card number basis information are different.
In addition, in order to ensure that the BIN value corresponding to the card number basic information included in the card number application request is stored in the information list, in this embodiment, after the server receives the card number application request sent by the client, the card number basic information included in the card number application request is obtained, if the local information list does not have the first data, that is, the BIN value, corresponding to the card number basic information, for example, the BIN value of the ordinary membership card corresponding to mestra, the corresponding first data is allocated, and the allocated first data and the corresponding card number basic information are written into the information list; in addition, after the client sends an information query request to the server, the server can return an information list containing the distributed first data and the corresponding card number basic information to the client; therefore, the BIN value corresponding to the card number basic information contained in the current card number application request is ensured to be contained in the information list stored at the server side or the client side.
in this embodiment, the current node may determine whether the assigned number segment value is smaller than a predetermined threshold, and if so, take the assigned number segment value as the current number segment value. And when the assigned number segment value is determined to be larger than or equal to the preset threshold value, inquiring whether an available number segment exists in the information list, if the available number segment exists, obtaining the available number segment, if the available number segment does not exist, generating new first data, and setting the assigned number segment value corresponding to the new first data as the initial value of the corresponding number segment. For example, if the number segment information corresponding to the current node is 0-1000 and the predetermined threshold is 900, if the assigned number segment value is 800, which is smaller than the predetermined threshold, the current number segment value is 800. If the assigned number segment value is 950 and is greater than the preset threshold value, the information list is inquired, and since the information list can also contain the assigned number segment information, the maximum available number segment information and the like of each node, whether the current node has available number segments or not can be judged according to the information, if the available number segments still exist, the available number segments are obtained, and the available number segments are used as the number segment information of the current node. If there is no available number segment, new first data is generated such as: 000002 and setting the assigned number segment value corresponding to the new first data as the start value 0 of the number segment 0-1000 corresponding to the current node. The purpose of this is: when the assigned number segment value of the current node is larger than a preset threshold value, namely the available number segment value of the current node is few, more available number segment values are obtained in advance, and the efficiency of obtaining the number segment value by the node is improved.
s202, check bit information is obtained.
After the current number segment value is obtained according to the first data and the corresponding number segment information, the current node can obtain check bit information so as to ensure the legality of the card number.
S203, generating the card number according to the obtained first data, the current number segment value and the check digit information.
After obtaining the check digit information, the current node may generate the card number according to the obtained first data, the current number segment value, and the check digit information. Specifically, a schematic diagram of generating a card number is shown in fig. 3, wherein the card number base information may include card issuer information and card type information. The first data may be obtained through the card issuer information and the card type information. The card issuing element may include: first data (BIN value), a random number segment (number segment value), and a check bit. The card number can be generated by the three card issuing elements.
according to the method for generating the card number, the different number segment values in the number segment are obtained in parallel through the plurality of nodes, and the card number is generated according to the obtained different number segment values and the corresponding card number basic information, so that the generated card number is not repeated, the problem of performance bottleneck during a large number of card issuing is solved, and the card issuing efficiency is improved.
in order to implement the above embodiment, the present application further provides a device for generating a card number.
Fig. 4 is a block diagram of a card number generation apparatus according to an embodiment of the present application. The card number generation device may include, as shown in fig. 4: an obtaining module 110, a distributing module 120, and a generating module 130. Wherein, the generating module 130 includes: a first obtaining unit 131, a second obtaining unit 132, and a generating unit 133.
The obtaining module 110 is used for obtaining a card number application request of a user.
The distribution module 120 is configured to distribute the card number application request to one or more nodes, wherein each node has non-repeating number segment information.
the generating module 130 is configured to obtain corresponding card number basic information and a corresponding card number segment value through a node that receives a card number application request, and generate a card number according to the corresponding card number basic information and the corresponding card number segment value, where the obtained card number segment values corresponding to the same card number basic information are different.
the card number generation device of the embodiment of the application obtains different number segment values in the number segment of the device through a plurality of nodes in parallel, and generates the card number according to the obtained different number segment values and the corresponding card number basic information, so that the generated card number is not repeated, the problem of performance bottleneck during a large number of card issuing is solved, and the card issuing efficiency is improved.
It should be noted that the modules may be located in the client or the server. Therefore, the following detailed description is made separately from the server and the client, and is not repeated herein.
Fig. 5 is a block diagram of a card number generation apparatus according to another embodiment of the present application. When the operation of generating the card number is performed by the server, the card number generation device may include, as shown in fig. 5: an obtaining module 110, a distributing module 120, a generating module 130, and a returning module 140. Wherein, the generating module 130 includes: a first obtaining unit 131, a second obtaining unit 132, and a generating unit 133.
The obtaining module 110 is used for obtaining a card number application request of a user.
In this embodiment, the obtaining module 110 may receive an issuing request sent by a client. The card issuing request is generated by clicking a corresponding card of the client when the user needs to apply for the membership card and the preferential card. The obtaining module 110 may then obtain a card number application request of the user according to the card issuing request.
The distribution module 120 is configured to distribute the card number application request to one or more nodes, wherein each node has non-repeating number segment information.
Specifically, the distribution module 120 may distribute the card number application request to one or more nodes by: the distribution module 120 may obtain the card number basic information according to the card number application request, query the locally stored information list according to the obtained card number basic information, thereby determining the information of the plurality of callable nodes, and then distribute the card number application request to one or more nodes of the plurality of nodes, specifically, distribute the card number application request according to the idle state of the callable nodes.
The information list may include card number basic information, information of a plurality of callable nodes corresponding to the card number basic information, and number segment information corresponding to each node, and may also include first data corresponding to the card number basic information, that is, a BIN value, specifically, as shown in table 1: the BIN value corresponding to the membership card of mettesbangwei is 000001, which can be distributed to four nodes. The number segment information corresponding to the node 1 is 0/1000, the number segment information corresponding to the node 2 is 1001/2000, the number segment information corresponding to the node 3 is 2001/3000, and the number segment information corresponding to the node 4 is 3001/4000. The BIN value corresponding to the happy membership card is 000005, and the value can be distributed to the node 10, and the number segment information corresponding to the node 10 is 0/1000. The BIN value corresponding to the happy honoured guest card is 000006, and the BIN value can be distributed to the node 11, and the number segment information corresponding to the node 11 is 0/1000. The generating module 130 is configured to obtain corresponding card number basic information and a corresponding number segment value according to the received card number application request and the corresponding number segment information through a node that receives the card number application request, and generate a card number according to the corresponding card number basic information and the number segment value, where the obtained number segment values corresponding to the same card number basic information are different.
specifically, the generating module 130 includes: a first obtaining unit 131, a second obtaining unit 132, and a generating unit 133.
The first obtaining unit 131 is configured to obtain first data corresponding to the current card number basic information by querying the information list through the current node, and obtain a current number segment value according to the first data and number segment information corresponding to the current node.
Specifically, the first obtaining unit 131 determines whether there is first data in the local information list, and if so, takes the assigned number segment value as the current number segment value, and then adds one to the assigned number segment value. For example, assuming that segment information corresponding to the current node is 0 to 1000, and the current card number basis information includes mettesland and ordinary membership cards, if the local information list has the first data, i.e., BIN value, of the ordinary membership card corresponding to mettesland, and it is assumed that 000001, the assigned segment value in the segment information corresponding to the first data is taken as the current segment value, and it is assumed that the assigned segment value is 3, 3 is taken as the current segment value, and then the assigned segment value is set to 4, so that when the current node receives the next request for applying for the ordinary membership card of mettesland, 4 is taken as the segment value corresponding to the request, and similarly, the assigned segment value needs to be set to 5, thereby ensuring that the obtained segment values corresponding to the same card number basis information are different.
In this embodiment, the first obtaining unit 131 may determine whether the assigned number segment value is smaller than a predetermined threshold, and if so, take the assigned number segment value as the current number segment value. And when the assigned number segment value is determined to be larger than or equal to the preset threshold value, inquiring whether an available number segment exists in the information list, if the available number segment exists, obtaining the available number segment, if the available number segment does not exist, generating new first data, and setting the assigned number segment value corresponding to the new first data as the initial value of the corresponding number segment. For example, if the number segment information corresponding to the current node is 0-1000 and the predetermined threshold is 900, if the assigned number segment value is 800, which is smaller than the predetermined threshold, the current number segment value is 800. If the assigned number segment value is 950 and is greater than the preset threshold value, the information list is inquired, and since the information list can also contain the assigned number segment information, the maximum available number segment information and the like of each node, whether the current node has available number segments or not can be judged according to the information, if the available number segments still exist, the available number segments are obtained, and the available number segments are used as the number segment information of the current node. If there is no available number segment, new first data is generated such as: 000002 and setting the assigned number segment value corresponding to the new first data as the start value 0 of the number segment 0-1000 corresponding to the current node. The purpose of this is: when the assigned number segment value of the current node is larger than a preset threshold value, namely the available number segment value of the current node is few, more available number segment values are obtained in advance, and the efficiency of obtaining the number segment value by the node is improved.
The second obtaining unit 132 is configured to obtain the check bit information through the current node.
after obtaining the current number segment value according to the first data and the corresponding number segment information, the second obtaining unit 132 may obtain the check digit information to ensure the validity of the card number.
The generating unit 133 is configured to generate a card number according to the obtained first data, the current number segment value, and the check digit information through the current node.
After obtaining the check digit information, the generating unit 133 may generate the card number according to the obtained first data, the current number segment value and the check digit information.
the returning module 140 is used for returning the card number to the client after the generating module 130 generates the card number according to the corresponding card number basic information and the number field value.
The card number generation device of the embodiment of the application obtains different number segment values in the number segment of the device through a plurality of nodes in parallel, and generates the card number according to the obtained different number segment values and the corresponding card number basic information, so that the generated card number is not repeated, the problem of performance bottleneck during a large number of card issuing is solved, and the card issuing efficiency is improved.
Fig. 6 is a block diagram of a card number generation apparatus according to still another embodiment of the present application. When the operation of generating the card number is performed by the client, the card number generation device may include, as shown in fig. 6: an obtaining module 110, a distributing module 120, a generating module 130 and an information obtaining module 150. Wherein, the generating module 130 includes: a first obtaining unit 131, a second obtaining unit 132, and a generating unit 133.
The obtaining module 110 is used for obtaining a card number application request of a user.
In this embodiment, when the user needs to apply for the membership card and the benefit card, the user may click the corresponding card at the client, and at this time, the obtaining module 110 obtains the corresponding card number application request. The embodiment is particularly suitable for processing the situation that a user applies for a card number in a large quantity.
The distribution module 120 is configured to distribute the card number application request to one or more nodes, wherein each node has non-repeating number segment information.
Specifically, the distribution module 120 may first obtain the information list from the server, then determine a plurality of callable nodes according to the information list, and then distribute the obtained card number application request to one or more callable nodes.
The function and structure of the generating module 130 are the same as those described in the embodiment shown in fig. 4, and are not described herein again.
The information obtaining module 150 is configured to send an information query request to the server according to the obtained card number basic information and receive an information list returned by the server according to the information query request before the distribution module 120 queries the locally stored information list according to the obtained card number basic information.
In an embodiment of the present application, the information obtaining module 150 may send an information query request to the server in advance according to the obtained card number basic information, receive an information list returned by the server according to the information query request, and locally store the returned information list, so that the client obtains the card number basic information and the corresponding number field information from the returned information list after receiving the application request. The information list includes basic information of card number and corresponding number field information.
The card number generation device of the embodiment of the application receives the information list returned by the server according to the information query request, not only ensures that the generated card numbers are not repeated, but also solves the problem of performance bottleneck during a large number of card issuing, and improves the card issuing efficiency.
In the description herein, reference to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the application. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present application, "plurality" means at least two, e.g., two, three, etc., unless specifically limited otherwise.
any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and the scope of the preferred embodiments of the present application includes other implementations in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present application.
The logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
it should be understood that portions of the present application may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.
in addition, functional units in the embodiments of the present application may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc. Although embodiments of the present application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present application, and that variations, modifications, substitutions and alterations may be made to the above embodiments by those of ordinary skill in the art within the scope of the present application.

Claims (14)

1. A method for generating a card number, comprising:
Obtaining a card number application request of a user;
Distributing the card number application request to one or more nodes, wherein each node has non-repeated number field information; and
Obtaining corresponding card number basic information and a corresponding card number segment value through a node receiving the card number application request, and generating a card number according to the corresponding card number basic information and the corresponding card number segment value through a current node, wherein the obtained card number segment values corresponding to the same card number basic information are different;
Wherein said distributing the card number application request to one or more nodes comprises:
Obtaining card number basic information according to the card number application request, inquiring an information list stored locally according to the obtained card number basic information, determining the information of a plurality of callable nodes, and distributing the card number application request to one or more nodes of the plurality of nodes, wherein the information list comprises the card number basic information, the callable nodes corresponding to the card number basic information and the number field information corresponding to each node.
2. The method of claim 1, wherein said obtaining a user's card number application request comprises:
receiving a card issuing request sent by a client, and acquiring a card number application request of the user according to the card issuing request;
After generating the card number according to the corresponding card number basic information and the corresponding number field value, the method further comprises the following steps: and returning the card number to the client.
3. The method of claim 1, prior to said querying the locally stored list of information based on the obtained card number base information, further comprising:
and sending an information query request to a server according to the obtained card number basic information, and receiving an information list returned by the server according to the information query request.
4. The method of claim 1, wherein the information list further includes first data corresponding to the card number base information, and the obtaining of the corresponding card number base information and the number segment value by the node that receives the card number application request and the generation of the card number by the current node according to the corresponding card number base information and the number segment value comprise:
Inquiring the information list through the current node to obtain first data corresponding to the basic information of the current card number, and obtaining a current number segment value according to the first data and the number segment information corresponding to the current node;
Obtaining check bit information through a current node; and
And generating the card number according to the acquired first data, the current number segment value and the check digit information through the current node.
5. The method of claim 4, wherein obtaining a current number segment value according to the first data and the number segment information corresponding to the current node comprises:
And taking the assigned number segment value corresponding to the first data as the current number segment value, and adding one to the assigned number segment value.
6. The method according to claim 5, wherein the using the assigned number segment value corresponding to the first data as the current number segment value comprises:
And judging whether the assigned number segment value is smaller than a preset threshold value, and if so, taking the assigned number segment value as a current number segment value.
7. The method of claim 6, wherein after said determining whether said assigned number segment value is less than a predetermined threshold, further comprising:
And when the assigned number segment value is determined to be larger than or equal to the preset threshold value, inquiring whether an available number segment exists in the information list, if the available number segment exists, obtaining the available number segment, if the available number segment does not exist, generating new first data, and setting the assigned number segment value corresponding to the new first data as the initial value of the corresponding number segment.
8. an apparatus for generating a card number, comprising:
The obtaining module is used for obtaining a card number application request of a user;
The distribution module is used for distributing the card number application request to one or more nodes, wherein each node has non-repeated number field information; and
The generating module is used for acquiring corresponding card number basic information and a corresponding card number segment value through a node receiving the card number application request, and generating a card number according to the corresponding card number basic information and the corresponding card number segment value through a current node, wherein the acquired card number segment values corresponding to the same card number basic information are different;
the distribution module is specifically configured to:
Obtaining card number basic information according to the card number application request, inquiring an information list stored locally according to the obtained card number basic information, determining the information of a plurality of callable nodes, and distributing the card number application request to one or more nodes of the plurality of nodes, wherein the information list comprises the card number basic information, the callable nodes corresponding to the card number basic information and the number field information corresponding to each node.
9. The apparatus according to claim 8, wherein the obtaining module is specifically configured to: receiving a card issuing request sent by a client, and acquiring a card number application request of the user according to the card issuing request;
The device further comprises: and the returning module is used for returning the card number to the client after the generating module generates the card number according to the corresponding card number basic information and the corresponding card number field value.
10. The apparatus of claim 8, further comprising:
and the information acquisition module is used for sending an information query request to the server according to the obtained card number basic information and receiving the information list returned by the server according to the information query request before the distribution module queries the locally stored information list according to the obtained card number basic information.
11. The apparatus of claim 8, wherein the information list further includes first data corresponding to the card number basic information, and the generating module includes:
A first obtaining unit, configured to obtain first data corresponding to current card number basic information by querying the information list through a current node, and obtain a current number segment value according to the first data and number segment information corresponding to the current node;
a second obtaining unit, configured to obtain check bit information through the current node; and
And the generating unit is used for generating the card number according to the acquired first data, the current number segment value and the check digit information through the current node.
12. The apparatus according to claim 11, wherein the first obtaining unit is specifically configured to:
And taking the assigned number segment value corresponding to the first data as the current number segment value, and adding one to the assigned number segment value.
13. The apparatus according to claim 12, wherein the first obtaining unit is specifically configured to:
And judging whether the assigned number segment value is smaller than a preset threshold value, and if so, taking the assigned number segment value as a current number segment value.
14. The apparatus of claim 13, wherein the first obtaining unit is further configured to:
After judging whether the assigned number segment value is smaller than a preset threshold value, when the assigned number segment value is determined to be larger than or equal to the preset threshold value, inquiring whether an available number segment exists in the information list, if the available number segment exists, obtaining the available number segment, if the available number segment does not exist, generating new first data, and setting the assigned number segment value corresponding to the new first data as the initial value of the corresponding number segment.
CN201410193651.7A 2014-05-08 2014-05-08 method and device for generating card number Active CN105095263B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201410193651.7A CN105095263B (en) 2014-05-08 2014-05-08 method and device for generating card number
HK16101344.3A HK1213341A1 (en) 2014-05-08 2016-02-04 Method for generating card numbers and device thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410193651.7A CN105095263B (en) 2014-05-08 2014-05-08 method and device for generating card number

Publications (2)

Publication Number Publication Date
CN105095263A CN105095263A (en) 2015-11-25
CN105095263B true CN105095263B (en) 2019-12-17

Family

ID=54575717

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410193651.7A Active CN105095263B (en) 2014-05-08 2014-05-08 method and device for generating card number

Country Status (2)

Country Link
CN (1) CN105095263B (en)
HK (1) HK1213341A1 (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107622102B (en) * 2017-09-11 2019-04-19 平安科技(深圳)有限公司 Entity card number generation method and terminal device
CN108829650B (en) * 2018-06-01 2022-08-23 腾讯科技(北京)有限公司 Card number generation method, device, server and storage medium
CN110765738A (en) * 2018-07-24 2020-02-07 鸿合科技股份有限公司 System and method for generating card number and electronic equipment
CN109493025B (en) * 2018-10-23 2022-03-18 中国银行股份有限公司 Account generating method and device
CN111369343A (en) * 2020-03-06 2020-07-03 中国银行股份有限公司 Bank account processing method and device
CN112612790A (en) * 2020-12-17 2021-04-06 深圳前海微众银行股份有限公司 Card number configuration method, device, equipment and computer storage medium
CN112884098A (en) * 2021-01-25 2021-06-01 中国建设银行股份有限公司 Card number generation method and device
CN113721887A (en) * 2021-08-30 2021-11-30 上海通联金融服务有限公司 Method for generating system card number by random hash algorithm

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1595410A (en) * 2004-06-08 2005-03-16 中国联合通信有限公司 Card number resources dispensing system
CN1734493A (en) * 2004-07-14 2006-02-15 招商银行股份有限公司 Number distribution system and disposal method thereof
CN102609330A (en) * 2012-02-06 2012-07-25 中国农业银行股份有限公司 Document number generating method and document number generating system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6889221B1 (en) * 2001-08-23 2005-05-03 Ncr Corporation Parallel random sampling
CN103514216B (en) * 2012-06-29 2016-12-21 中国银联股份有限公司 Serial numbers based on Database Systems generate method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1595410A (en) * 2004-06-08 2005-03-16 中国联合通信有限公司 Card number resources dispensing system
CN1734493A (en) * 2004-07-14 2006-02-15 招商银行股份有限公司 Number distribution system and disposal method thereof
CN102609330A (en) * 2012-02-06 2012-07-25 中国农业银行股份有限公司 Document number generating method and document number generating system

Also Published As

Publication number Publication date
CN105095263A (en) 2015-11-25
HK1213341A1 (en) 2016-06-30

Similar Documents

Publication Publication Date Title
CN105095263B (en) method and device for generating card number
CN109034809B (en) Block chain generation method and device, block chain node and storage medium
CN108829610B (en) Memory management method and device in neural network forward computing process
CN106453146B (en) Method, system, device and readable storage medium for allocating private cloud computing resources
JP7133647B2 (en) DATA PROCESSING METHOD, APPARATUS AND COMPUTER-READABLE STORAGE MEDIUM
CN106407207B (en) Real-time newly-added data updating method and device
CN107506145B (en) Physical storage scheduling method and cloud host creation method
JP2021002392A (en) Method and device for initializing two-dimensional code
EP3370166B1 (en) Method and apparatus for model parameter fusion
CN107277188B (en) Method, client, server and service system for determining IP address attribution information
CN110457114B (en) Application cluster deployment method and device
CN111079095A (en) ID generation method and system
CN110909978A (en) Resource processing method, device, server and computer readable storage medium
CN109710263B (en) Code compiling method and device, storage medium and electronic equipment
CN104765789A (en) Creation method and device for primary key of database
CN108153494A (en) A kind of I/O request processing method and processing device
CN105988890B (en) Information backup method and device
US10585879B2 (en) Database identifier generation in transaction processing systems
CN112087401A (en) Method and device for realizing service quality in distributed storage
CN109727036B (en) Transaction processing method and device
CN110019357B (en) Database query script generation method and device
CN105162842A (en) Display method and device for application in application wall
CN108121733B (en) Data query method and device
CN105718550B (en) Media information publishing method and system
CN106156169B (en) Discrete data processing method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 1213341

Country of ref document: HK

GR01 Patent grant
GR01 Patent grant
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20191127

Address after: P.O. Box 31119, grand exhibition hall, hibiscus street, 802 West Bay Road, Grand Cayman, British Cayman Islands

Applicant after: Innovative advanced technology Co., Ltd

Address before: A four-storey 847 mailbox in Grand Cayman Capital Building, British Cayman Islands

Applicant before: Alibaba Group Holding Co., Ltd.