CN110135144A - Invitation code generation method, verification method, device, electronic equipment and storage medium - Google Patents

Invitation code generation method, verification method, device, electronic equipment and storage medium Download PDF

Info

Publication number
CN110135144A
CN110135144A CN201910420054.6A CN201910420054A CN110135144A CN 110135144 A CN110135144 A CN 110135144A CN 201910420054 A CN201910420054 A CN 201910420054A CN 110135144 A CN110135144 A CN 110135144A
Authority
CN
China
Prior art keywords
code
character string
redundancy check
characteristic value
invitation
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.)
Granted
Application number
CN201910420054.6A
Other languages
Chinese (zh)
Other versions
CN110135144B (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.)
Beijing Kingsoft Internet Security Software Co Ltd
Original Assignee
Beijing Kingsoft Internet Security Software 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 Beijing Kingsoft Internet Security Software Co Ltd filed Critical Beijing Kingsoft Internet Security Software Co Ltd
Priority to CN201910420054.6A priority Critical patent/CN110135144B/en
Publication of CN110135144A publication Critical patent/CN110135144A/en
Application granted granted Critical
Publication of CN110135144B publication Critical patent/CN110135144B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/31User authentication
    • G06F21/36User authentication by graphic or iconic representation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2133Verifying human interaction, e.g., Captcha

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Storage Device Security (AREA)

Abstract

The application discloses an invitation code generation method, an authentication method and related equipment thereof, wherein the invitation code generation method comprises the following steps: generating a character string according to a preset rule, and generating a first redundancy check code according to the character string; generating a reference characteristic value of the character string according to the first redundancy check code; generating an identification code for uniquely representing the reference characteristic value, and storing the reference characteristic value and the identification code into a database according to the corresponding relation between the reference characteristic value and the identification code; generating a first characteristic value according to the first redundancy check code, the identification code and a preset private key; generating a second redundancy check code according to the first characteristic value; and generating invitation code information according to the first redundancy check code, the identification code and the second redundancy check code. Therefore, by storing part of character strings in the invitation codes in the database in the form of characteristic values (namely ciphertext), the security and the stability of the system are increased, and the verification efficiency and the performance of the invitation codes can be effectively improved.

Description

Invite code generating method, verification method, device, electronic equipment and storage medium
Technical field
This application involves technical field of information processing more particularly to a kind of invitation code generating method, verification method, device, Electronic equipment and computer readable storage medium.
Background technique
Currently, the invitation code information handing service based on character string verifying is extensive, for example, number of site and application are in order to anti- Only by machine malicious registration, a kind of special pass --- i.e. invitation code is needed in registration, in addition, there are also some interconnections Businessman is netted in order to promote sales volume, attracts consumer to buy commodity using activity invitation code.In the related technology, by invitation code When being issued to consumer, usually the invitation code provided is recorded in database in clear text manner, in this way, monitoring To when having consumer using invitation code, it is whether legal that the invitation code is verified by way of data base querying.
But presently, there are the problem of be: traditional invitation code transmission and recording in clear text manner is easy to be cracked, Security of system and stability is caused to reduce.In addition, due in entire verification process, can only by inquiry database mode into The verifying of row invitation code, when the same time, a large amount of invitation codes were verified, system will generate a large amount of data query, in this way It will lead to the reduction of inquiring and authenticating efficiency.
Summary of the invention
The purpose of the application is intended to solve above-mentioned one of technical problem at least to a certain extent.
For this purpose, first purpose of the application is to propose a kind of invitation code generating method.This method is by by invitation code In partial character string with the storage of the form of characteristic value (i.e. ciphertext) in the database, increase the safety and stabilization of system Property, simultaneously effective promote the verification efficiency and performance of invitation code.
Second purpose of the application is to propose a kind of invitation code verification method.
The third purpose of the application is to propose a kind of invitation code generating means.
The 4th purpose of the application is to propose a kind of invitation code verifying device.
The 5th purpose of the application is to propose a kind of electronic equipment.
The 6th purpose of the application is to propose a kind of computer readable storage medium.
The 7th purpose of the application is to propose another electronic equipment.
The 8th purpose of the application is to propose another computer readable storage medium.
In order to achieve the above object, the application first aspect embodiment proposes a kind of invitation code generating method, comprising: according to pre- If rule generates character string, and according to the first redundancy check code of text string generation;The word is generated according to the first redundancy check code Accord with the reference characteristic value of string;The identification code uniquely to indicate reference characteristic value is generated, and according to reference characteristic value and identification code Corresponding relationship, reference characteristic value and the identification code are stored into database;According to the first redundancy check code, identification code With preset private key, the First Eigenvalue is generated;According to the First Eigenvalue the second redundancy check code of corresponding generation;According to first Redundancy check code, identification code and second redundancy check code generate invitation code information.
The invitation code generating method of the embodiment of the present application generates character string according to preset rules, and according to the character string Generate the first redundancy check code;The reference characteristic value of the character string is generated according to first redundancy check code;Generate to Uniquely indicate the identification code of the reference characteristic value, and according to the corresponding relationship of the reference characteristic value and the identification code, it will The reference characteristic value and the identification code are stored into database;According to first redundancy check code, the identification code and Preset private key generates the First Eigenvalue;According to the First Eigenvalue the second redundancy check code of corresponding generation;According to institute The first redundancy check code, identification code and second redundancy check code are stated, invitation code information is generated.As a result, by by invitation code In partial character string store in the form of characteristic value (i.e. ciphertext) into database, safety, the stabilization of system can be improved Property, and invitation code is generated by way of combining multiple character strings, in this way when being verified to the invitation code that user inputs, The invitation code of the input can be carried out dividing and generate multiple character strings, invitation code validity is first carried out by partial character string Verifying, and when verifying invitation code is effective, legitimacy is carried out based on the characteristic value stored in remaining character string and database The efficiency of invitation code verifying can be improved in verifying.
It is described according to the First Eigenvalue the second redundancy check of corresponding generation according to one embodiment of the application Code, comprising: calculate the corresponding redundancy check code value of the First Eigenvalue;Judge whether the redundancy check code value is eight Data;If it is not, then choosing character from preset characters to fill the redundancy check code value, so that filled redundancy check Code value is eight bit data;If so, using the corresponding redundancy check code value of the First Eigenvalue as second redundancy check Code.
In order to achieve the above object, the application second aspect embodiment proposes a kind of invitation code verification method, including following step It is rapid: to receive the invitation code information of user's input;It parses the invitation code information and obtains multiple character strings;Wherein, the multiple word Symbol string includes the first character string, the second character string and third character string;According to preset private key, first character string, second Whether effective character string and third character string verify the invitation code information;When the verifying invitation code information is effective, from It is pre-stored in the reference characteristic value of database, searches object reference characteristic value corresponding with first character string;Wherein, The reference characteristic value is to invite code generating method to generate by the embodiment of the present application;Calculate the spy of second character string Value indicative matches the characteristic value of second character string with the object reference characteristic value, to verify the invitation code letter Whether cease legal.
The invitation code verification method of the embodiment of the present application receives the invitation code information of user's input;Parse the invitation code Information obtains multiple character strings;Wherein, the multiple character string includes the first character string, the second character string and third character string; According to preset private key, first character string, the second character string and third character string, whether the invitation code information is verified Effectively;Verify the invitation code information it is effective when, from the reference characteristic value for being pre-stored within database, search with it is described The corresponding object reference characteristic value of first character string;Wherein, the reference characteristic value is raw by the embodiment of the present application invitation code It is generated at method;The characteristic value for calculating second character string, by the characteristic value of second character string and the target Whether reference characteristic value is matched, legal to verify the invitation code information.As a result, in the invitation code letter inputted to user When breath is verified, validation verification is first carried out to the invitation code based on invitation code self information, if verifying invitation code is invalid, Then without inquiring database to carry out the verifying of legitimacy to it, verification efficiency is improved, and reduce the inquiry time of database Number, improves system stability;Verify the invitation code it is effective when, then based in the invitation code character string inquire database Further to be verified to the invitation code, the legitimacy of invitation code ensure that;Also, by the character string in invitation code with close The form (such as reference characteristic value) of text is stored into database, can improve system to avoid the case where being cracked is easy Safety and stability.
According to one embodiment of the application, it is described according to preset private key, first character string, the second character string and Whether effective third character string verifies the invitation code information, comprising: according to preset private key, first character string and institute The second character string is stated, Second Eigenvalue is generated;According to the corresponding generation third redundancy check code of the Second Eigenvalue;By institute Third redundancy check code is stated to be matched with the third character string, it is whether effective to verify the invitation code information.
It is described that third redundancy check code is generated according to the Second Eigenvalue according to one embodiment of the application, comprising: Calculate the corresponding redundancy check code value of the Second Eigenvalue;Judge whether the redundancy check code value is eight bit data;If It is no, then character is chosen from preset characters to fill the redundancy check code value, so that filled redundancy check code value is eight Position data;If so, using the corresponding redundancy check code value of the Second Eigenvalue as the third redundancy check code.
It is described from the reference characteristic value for being pre-stored within database according to one embodiment of the application, lookup and institute State the corresponding object reference characteristic value of the first character string, comprising: from the identification code of the database, search and described first The corresponding target identification code of character string;According to the target identification code, it is special that the object reference is found out from the database Value indicative.
According to one embodiment of the application, the method also includes: verify the invitation code information it is legal when, determine The corresponding business event of the invitation code information, and respond the business event.
In order to achieve the above object, the application third aspect embodiment proposes a kind of invitation code generating means, comprising: first is superfluous Remaining check code generation module, for generating character string according to preset rules, and according to first redundancy check of text string generation Code;Reference characteristic value generation module, for generating the reference characteristic value of the character string according to first redundancy check code; Identification code generating module, for generating the identification code uniquely to indicate the reference characteristic value;Data memory module is used for According to the corresponding relationship of the reference characteristic value and the identification code, by the reference characteristic value and the identification code store to In database;The First Eigenvalue generation module, for according to first redundancy check code, the identification code and preset private Key generates the First Eigenvalue;Second redundancy check code generation module, for generating the according to the First Eigenvalue is corresponding Two redundancy check codes;Invitation code generation module, for according to first redundancy check code, the identification code and described second Redundancy check code generates invitation code information.
The invitation code generating means of the embodiment of the present application generate character string according to preset rules, and according to the character string Generate the first redundancy check code;The reference characteristic value of the character string is generated according to first redundancy check code;Generate to Uniquely indicate the identification code of the reference characteristic value, and according to the corresponding relationship of the reference characteristic value and the identification code, it will The reference characteristic value and the identification code are stored into database;According to first redundancy check code, the identification code and Preset private key generates the First Eigenvalue;According to the First Eigenvalue the second redundancy check code of corresponding generation;According to institute The first redundancy check code, identification code and second redundancy check code are stated, invitation code information is generated.As a result, by by invitation code In partial character string store in the form of characteristic value (i.e. ciphertext) into database, safety, the stabilization of system can be improved Property, and invitation code is generated by way of combining multiple character strings, in this way when being verified to the invitation code that user inputs, The invitation code of the input can be carried out dividing and generate multiple character strings, invitation code validity is first carried out by partial character string Verifying, and when verifying invitation code is effective, legitimacy is carried out based on the characteristic value stored in remaining character string and database The efficiency of invitation code verifying can be improved in verifying.
According to one embodiment of the application, the second redundancy check code generation module is specifically used for: calculating described the The corresponding redundancy check code value of one characteristic value;Judge whether the redundancy check code value is eight bit data;If it is not, then from default Character is chosen in character to fill the redundancy check code value, so that filled redundancy check code value is eight bit data;If It is, then using the corresponding redundancy check code value of the First Eigenvalue as second redundancy check code.
In order to achieve the above object, the application fourth aspect embodiment proposes a kind of invitation code verifying device, comprising: information connects Module is received, for receiving the invitation code information of user's input;Information analysis module is obtained for parsing the invitation code information Multiple character strings;Wherein, the multiple character string includes the first character string, the second character string and third character string;Validity is tested Module is demonstrate,proved, for verifying the invitation according to preset private key, first character string, the second character string and third character string Whether code information is effective;Searching module, for verify the invitation code information it is effective when, from being pre-stored within database In reference characteristic value, object reference characteristic value corresponding with first character string is searched;Legitimate verification module, based on The characteristic value for calculating second character string, by the characteristic value of second character string and object reference characteristic value progress Match, it is whether legal to verify the invitation code information.
The invitation code of the embodiment of the present application verifies device, receives the invitation code information of user's input;Parse the invitation code Information obtains multiple character strings;Wherein, the multiple character string includes the first character string, the second character string and third character string; According to preset private key, first character string, the second character string and third character string, whether the invitation code information is verified Effectively;Verify the invitation code information it is effective when, from the reference characteristic value for being pre-stored within database, search with it is described The corresponding object reference characteristic value of first character string;Wherein, the reference characteristic value is raw by the embodiment of the present application invitation code It is generated at method;The characteristic value for calculating second character string, by the characteristic value of second character string and the target Whether reference characteristic value is matched, legal to verify the invitation code information.As a result, in the invitation code letter inputted to user When breath is verified, validation verification is first carried out to the invitation code based on invitation code self information, if verifying invitation code is invalid, Then without inquiring database to carry out the verifying of legitimacy to it, verification efficiency is improved, and reduce the inquiry time of database Number, improves system stability;Verify the invitation code it is effective when, then based in the invitation code character string inquire database Further to be verified to the invitation code, the legitimacy of invitation code ensure that;Also, by the character string in invitation code with close The form (such as reference characteristic value) of text is stored into database, can improve system to avoid the case where being cracked is easy Safety and stability.
According to one embodiment of the application, the validation verification module is specifically used for: described according to preset private key First character string and second character string generate the First Eigenvalue;It is superfluous according to the corresponding generation third of the Second Eigenvalue Remaining check code.
According to one embodiment of the application, the validation verification module is specifically used for: calculating the Second Eigenvalue Corresponding redundancy check code value;Judge whether the redundancy check code value is eight bit data;If it is not, then being selected from preset characters Character is taken to fill the redundancy check code value, so that filled redundancy check code value is eight bit data;If so, by institute The corresponding redundancy check code value of Second Eigenvalue is stated as the third redundancy check code.
According to one embodiment of the application, the searching module is specifically used for: from the identification code of the database, looking into Look for target identification code corresponding with first character string;According to the target identification code, institute is found out from the database State object reference characteristic value.
According to one embodiment of the application, described device further include: Service Processing Module, for verifying the invitation When code information is legal, the corresponding business event of the invitation code information is determined, and respond the business event.
In order to achieve the above objectives, the 5th aspect embodiment of the application proposes a kind of electronic equipment, including memory, processing Device and it is stored in the computer program that can be run on the memory and on the processor;Wherein, the processor passes through The executable program code that stores in the memory is read to run program corresponding with the executable program code, with For realizing invitation code generating method described in the application first aspect embodiment.
In order to achieve the above objectives, the 6th aspect embodiment of the application proposes a kind of computer readable storage medium, thereon It is stored with computer program, which realizes when being executed by processor invites described in the application first aspect embodiment It please code generation.
In order to achieve the above objectives, the 7th aspect embodiment of the application proposes a kind of electronic equipment, including memory, processing Device and it is stored in the computer program that can be run on the memory and on the processor;Wherein, the processor passes through The executable program code that stores in the memory is read to run program corresponding with the executable program code, with For realizing invitation code verification method described in the application second aspect embodiment.
In order to achieve the above objectives, the application eighth aspect embodiment proposes a kind of computer readable storage medium, thereon It is stored with computer program, which realizes when being executed by processor invites described in the application second aspect embodiment It please code verification method.
The additional aspect of the application and advantage will be set forth in part in the description, and will partially become from the following description It obtains obviously, or recognized by the practice of the application.
Detailed description of the invention
The above-mentioned and/or additional aspect and advantage of the application will become from the description of the embodiment in conjunction with the following figures Obviously and it is readily appreciated that, in which:
Fig. 1 is the flow diagram according to the invitation code generating method of the application one embodiment;
Fig. 2 is the flow diagram according to the invitation code verification method of the application one embodiment;
Fig. 3 is the structural schematic diagram according to the invitation code generating means of the application one embodiment;
Fig. 4 is the structural schematic diagram that device is verified according to the invitation code of the application one embodiment;
Fig. 5 is the structural schematic diagram that device is verified according to the invitation code of the application another embodiment;
Fig. 6 shows the block diagram for being suitable for the example electronic device for being used to realize the application embodiment.
Specific embodiment
Embodiments herein is described below in detail, examples of the embodiments are shown in the accompanying drawings, wherein from beginning to end Same or similar label indicates same or similar element or element with the same or similar functions.Below with reference to The embodiment of attached drawing description is exemplary, it is intended to for explaining the application, and should not be understood as the limitation to the application.
Below with reference to the accompanying drawings describe the invitation code generating method of the embodiment of the present application, verification method, device, electronic equipment and Computer readable storage medium.Wherein, the invitation code of the embodiment of the present application generates and verification method can be applied and arbitrarily be relied on In the corresponding business event of the information processing of invitation code, which includes the registration of terminal program, and pay proof of purchase, game It invites, platform synergetic office work etc., after verifying invitation code information is legal, i.e., the business event is determined and is responded.
Fig. 1 is the flow diagram according to the invitation code generating method of the application one embodiment.
As shown in Figure 1, the invitation code generating method the following steps are included:
Step 101, character string is generated according to preset rules, and according to the first redundancy check code of text string generation.
Wherein, in the embodiment of the present application, preset rules can be random create-rule, for example, can generate according to random Rule generates a character string, wherein the character may include but be not limited to used in computer at random from multiple characters Letter, number, word and symbol etc., for example, 1,2,3, A, B, C ,~!#$% ...-* () etc..Then, it can be used CRC32 (the cyclic redundancy check algorithm that can be regarded as the check value for generating a 32bit) algorithm calculates the random generation Character string check code, and the check code is switched into 16 systems, as the first redundancy check code.It is appreciated that by check code The purpose for switching to 16 systems is to be able to realize and issue to client, that is to say, that client was supported is 16 system numbers According to so when generating invitation code, used character need to usually be given to 16 systems, so that client can be with 16 systems Invitation code is presented to user by form.
It should be noted that above-mentioned preset rules can be randomly generated the formula of character string, it is also possible to a string of words Symbol string is intercepted, and can also be a kind of any other method of producible character string, here with no restrictions.
Step 102, the reference characteristic value of character string is generated according to the first redundancy check code.
Optionally, after obtaining the first redundancy check code, which is calculated using the first preset algorithm Characteristic value, this feature value are reference characteristic value.Wherein, in the present embodiment, which may include but be not limited to MD5 (Message Digest Algorithm, Message Digest Algorithm 5) algorithm, hash algorithm etc..
Step 103, the identification code uniquely to indicate reference characteristic value is generated, and according to reference characteristic value and identification code Corresponding relationship stores reference characteristic value and identification code into database.It is understandable to be, for the ease of database lookup When quickly navigate to reference characteristic value, when the reference characteristic value storage that will be generated is to database, also need to generate for only table Show the identification code of reference characteristic value, and be stored in database, when so as to follow-up data library inquiry, passes through the identification code It can quickly and accurately carry out data query.Optionally, it in one embodiment of the application, produces to only table Show the identification code of reference characteristic value, and establish the corresponding relationship of reference characteristic value and identification code, and by the reference characteristic value, mark Know code and the corresponding relationship is stored into database.For example, the tables of data of a reference characteristic value is created in the database, it should Two attributes are included at least in tables of data, one is the attribute for indicating reference characteristic value, and one is the attribute for indicating identification code, Wherein, identification code attribute is the major key of the tables of data, by reference to the corresponding relationship of characteristic value and identification code, by this with reference to special Value indicative and the corresponding storage of identification code are into the tables of data, to realize the character string that will be generated according to preset rules with ciphertext Form store purpose into database.For example, when reference characteristic value to be written in database, it can produce one Decimal system identification code ID, such as 101,102,103 ... etc..In this way, can be by the identification code ID in follow-up data library inquiry Reference characteristic value corresponding with the ID can be quickly searched in the database.
Step 104, according to the first redundancy check code, identification code and preset private key, the First Eigenvalue is generated.
It is understandable to be, obtain the first redundancy check code and the identification code uniquely to indicate reference characteristic value it It afterwards, then, at this time can should in order to generate the invitation code of 16 systems so that the invitation code of generation is handed down to client Identification code switchs to 16 systems, and by the identification code of 16 system, the first redundancy check code of 16 systems, identification code and preset Private key, these three string-concatenations together, and use the second preset algorithm, count to the character string obtained after the splicing It calculates, obtains corresponding the First Eigenvalue.Second preset algorithm can be but not limited to MD5 algorithm, hash algorithm etc..
Step 105, according to the First Eigenvalue the second redundancy check code of corresponding generation.
Further, the First Eigenvalue above-mentioned steps generated, it is superfluous according to the corresponding generation second of third preset algorithm Remaining check code.In the embodiment of the present application, CRC32 algorithm can be used and calculate corresponding second redundancy check of the First Eigenvalue Code.
It is corresponding calculating the First Eigenvalue to ensure that check code CRC32 value is eight bit data in embodiments herein Redundancy check code after, can first judge whether the redundancy check code being calculated is eight bit data, if it is not, then from default Character is chosen in character to fill the redundancy check code value, so that filled redundancy check code value is eight bit data, example Such as, character can be chosen from the lowercase [g-z] to fill the redundancy check code value less than eight, after filling and will meet The redundancy check code value of eight bit data is as second redundancy check code;If the redundancy check code being calculated is eight-digit number According to then can be directly using the redundancy check code value being calculated as second redundancy check code.
It should be noted that due to client support be 16 binary datas, so in order to generate inviting for 16 systems Please code so that the invitation code of generation is handed down to client, can be by the second redundancy school after obtaining the second redundancy check code It tests code and switchs to 16 systems.
Step 106, according to the first redundancy check code, identification code and the second redundancy check code, invitation code information is generated.
It is easily understood that the first redundancy check code, identification code and the second redundancy check code that are generated by above step, According to certain create-rule and then generate invitation code information.For example, can be by first redundancy check code, identification code and second Redundancy check code is spliced, to obtain invitation code information.
According to the invitation code generating method of the embodiment of the present application, character string is generated according to preset rules, and according to character string Generate the first redundancy check code;The reference characteristic value of character string is generated according to the first redundancy check code;It generates uniquely to indicate The identification code of reference characteristic value, and according to the corresponding relationship of reference characteristic value and identification code, reference characteristic value and identification code are deposited Storage is into database;According to the first redundancy check code, identification code and preset private key, the First Eigenvalue is generated;According to the first spy Value indicative the second redundancy check code of corresponding generation;According to the first redundancy check code, identification code and the second redundancy check code, generate Invitation code information.As a result, being stored the partial character string in invitation code in the form of characteristic value (i.e. ciphertext) to database In, safety, the stability of system can be improved, and generate invitation code by way of combining multiple character strings, in this way right When the invitation code of user's input is verified, the invitation code of the input can be carried out dividing the multiple character strings of generation, pass through portion Point character string first carries out the verifying of invitation code validity, and verify invitation code it is effective when, be based on remaining character string and data The characteristic value stored in library carries out the verifying of legitimacy, and the efficiency of invitation code verifying can be improved.
Present invention also provides a kind of invitation code verification methods.Fig. 2 is to be tested according to the invitation code of the application one embodiment The flow diagram of card method.As shown in Fig. 2, the invitation code verification method the following steps are included:
Step 201, the invitation code information of user's input is received.
It should be noted that in embodiments herein, invitation code can be it is pre-generated, generate invitation code it Afterwards, the invitation code of generation can be handed down to the user of client, after sharing the invitation code so as to user, other users are by being somebody's turn to do The invitation code issued triggers corresponding business event, for example, other users can trigger " enjoying discounted cost " by the invitation code Event, registered events etc..As an example, invitation code can be the character string being made of multiple characters, which may include But be not limited to letter, number used in computer, word and symbol etc., for example, 1,2,3, A, B, C ,~!#$% ... - * () etc..
Step 202, parsing invitation code information obtains multiple character strings;Wherein, multiple character strings include the first character string, the Two character strings and third character string.
In embodiments herein, when the invitation code information for receiving user and inputting in application terminal, this can be invited Please code information parsed, for example, can be invited according to the create-rule of preset invitation code character string to user's input Please code split, split into multiple character strings, respectively the first character string, the second character string and third character string.Wherein, The invitation code of user's input can give acquisition by other people.
Step 203, according to preset private key, the first character string, the second character string and third character string, invitation code letter is verified It whether effective ceases.
Specifically, when by the invitation code information of input split into the first character string, the second character string and third character string it Afterwards, can adopt according to preset private key, the first character string and the corresponding Second Eigenvalue of the second text string generation, and according to this Two characteristic values generate corresponding third redundancy check code and then compare the third redundancy check code with third character string Matching, it is whether effective with the invitation code information for verifying the input.
As an example, preset private key, the first character string and the second character string can be subjected to character splicing, so Afterwards, using preset algorithm, calculate the corresponding Second Eigenvalue of the spliced character string, for example, the preset algorithm can be but It is not limited to MD5 (Message Digest Algorithm, Message Digest Algorithm 5) algorithm, hash algorithm etc.;Later, The third redundancy check code that CRC32 algorithm calculates the Second Eigenvalue can be used, which is 8 hexadecimal numbers Check value;Then, similarity algorithm can be used, judge whether the third redundancy check code and third character string are consistent, if not Unanimously, then it is invalid to verify invitation code.If third redundancy check code is consistent with third character string, it is effective to verify invitation code, into And next step verifying is carried out to the invitation code.
It should be noted that in embodiments herein, being calculated to ensure that check code CRC32 value is eight bit data After the corresponding redundancy check code value of Second Eigenvalue, can first judge whether the redundancy check code value being calculated is eight-digit number According to if it is not, then choosing character from preset characters to fill the redundancy check code value, so that filled redundancy check code Value is eight bit data, for example, character can be chosen from the lowercase [g-z] to fill the redundancy check code value less than eight, After filling and the redundancy check code value of eight bit data will be met as the third redundancy check code;If the redundancy school being calculated Testing code is eight bit data, then can be directly using the corresponding redundancy check code value of the Second Eigenvalue as the third redundancy check Code.
It should also be noted that, in embodiments herein, if invitation code is 16 binary datas, so the first character String, the second character string and third character string are 16 binary datas, then carry out by third redundancy check code and third character string Before comparison matching, the third redundancy check code first can be switched into 16 systems, utilize the third redundancy check code of 16 systems and 16 System third character string compares matching, to guarantee with the matching between binary data.
It is understandable to be, in embodiments herein, according to preset private key, the first character string, the second character When string carries out validation verification to the invitation code information, if verifying invitation code is invalid, no longer need to carry out down the invitation code The verifying of one step legitimacy.As a result, when a large amount of invitation codes need to verify, this step can filter out a part of invalid invitation Code, reduces subsequent query database to carry out the invitation number of codes of legitimate verification, it can reduces the inquiry time of database Number, so as to improve the stability of system.In addition, this step is not needed, by entire invitation code, character is compared one by one, and And it is not related to the data verification in database, improve the verification efficiency of invitation code.
Optionally, in one embodiment of the application, above-mentioned steps 201- step 203 can locally be held by client Row, can also be executed by server.Preferably, above-mentioned steps 201- step 203 is placed on client local, in this way, in visitor Family end, which can be realized, verifies (i.e. validation verification) to the first step of invitation code, can be filtered out by first step verifying A part of invalid invitation code reduces subsequent query database to carry out the invitation number of codes of legitimate verification, reduces data The inquiry times in library, so as to improve the stability of system.
Step 204, it when verifying invitation code information is effective, from the reference characteristic value for being pre-stored within database, searches Object reference characteristic value corresponding with the first character string, wherein reference characteristic value is by described in the above embodiments of the present application It invites code generating method and generates.
Specifically, it after verifying invitation code information is effective, needs to invite this using the first character string and the second character string Please code information carry out next step legitimate verification.For example, being looked into first from the reference characteristic value for being pre-stored within database Look for object reference characteristic value corresponding with the first character string.
It is appreciated that can store multiple reference characteristic values in the database, multiple reference characteristic value can be pre- Mr. At.Wherein, in embodiments herein, following manner can be used and pre-generate the reference characteristic value: according to preset rules Character string is generated, and according to first redundancy check code of generation, and is referred to according to the corresponding generation of first redundancy check code Characteristic value.
For the ease of quickly navigating to reference characteristic value when database lookup, in the reference characteristic value storage that will be generated to number When according to library, also need to generate the identification code for uniquely indicating reference characteristic value, and be stored in database, so as to subsequent When data base querying, data query can quickly and accurately be carried out by the identification code.Optionally, at one of the application In embodiment, produce uniquely to indicate the identification code of reference characteristic value, and establish the correspondence of reference characteristic value and identification code Relationship, and by the storage of the reference characteristic value, identification code and the corresponding relationship into database.For example, creating one in the database The tables of data of a reference characteristic value includes at least two attributes in the tables of data, and one is the attribute for indicating reference characteristic value, One is the attribute for indicating identification code, wherein identification code attribute is the major key of the tables of data, by reference to characteristic value and mark The corresponding relationship of code, by the corresponding storage of the reference characteristic value and identification code into the tables of data, so that realizing will be according to default The character string that rule generates stores the purpose into database in the form of ciphertext.
In embodiments herein, in order to rapidly and accurately find object reference corresponding with the first character string Characteristic value can find target identification code corresponding with the first string character in the database, and according to identification code and fixed reference feature The corresponding relationship of value, finds reference characteristic value corresponding with the target identification code from the database, which is For object feature value.
It should be noted that in embodiments herein, if invitation code is 16 binary datas, so the first character string For 16 binary datas, since the identification code in database for uniquely indicating reference characteristic value is the decimal system, so, can first by First character string of 16 system switchs to the decimal system, later, can be searched from database according to metric first character string Corresponding object reference characteristic value out.
Step 205, the characteristic value for calculating the second character string, by the characteristic value of the second character string and object reference characteristic value into Row matching, it is whether legal to verify invitation code information.
In the embodiment of the present application, the characteristic value of the second character string can be calculated, and by the characteristic value of second character string It is matched with object reference characteristic value, it is whether legal to verify invitation code information.For example, similarity algorithm can be used, judge Whether the characteristic value of second character string is consistent with object reference characteristic value, if unanimously, it is legal to verify the invitation code information, If inconsistent, it is illegal to verify the invitation code information, i.e., the invitation code be not be that system is handed down to the legal of client user Invitation code, that is to say, that the reference characteristic value of the invitation code is not stored in the database.
In order to improve the availability and feasibility of the application, optionally, in one embodiment of the application, verifying When invitation code information is legal, it may be determined that the corresponding business event of invitation code information, and respond the business event.For example, it is assumed that The embodiment of the present application invites code generating method and verification method to be applied to the scene of purchase applications function, that is, produces tool There is the invitation code of preferential function, and these invitation codes are handed down to the user of client, user is transmitted to other users, other User can enjoy discounted cost by these invitation codes.In user's purchase applications function, if detecting that user inputs Invitation code then needs the invitation code inputted to user to verify, and effective and legal in the invitation code for verifying user input When, determine that the corresponding business event of the invitation code is " enjoying discounted cost ", then the purchase after " can should enjoying discounted cost " Price is supplied to user, to enjoy promotional price when user's purchase.
The invitation code verification method of the embodiment of the present application parses this and invites when receiving the invitation code information of user's input Please code information obtain multiple character strings, wherein multiple character string include the first character string, the second character string and third character String, later, according to preset private key, the first character string, the second character string and third character string, verifying the invitation code information is It is no effectively, and verify the invitation code information it is effective when, from the reference characteristic value for being pre-stored within database, search and the The corresponding object reference characteristic value of one character string, and the characteristic value of the second character string is calculated, by the characteristic value of second character string It is matched with object reference characteristic value, it is whether legal to verify invitation code information.As a result, in the invitation code inputted to user When information is verified, first based on invitation code self information to the invitation code carry out validation verification, if verifying invitation code without Effect improves verification efficiency, and reduce looking into for database then without inquiring database to carry out the verifying of legitimacy to it Number is ask, system stability is improved;Verify the invitation code it is effective when, then based in the invitation code character string inquire number According to library further to be verified to the invitation code, the legitimacy of invitation code ensure that;Also, by the character string in invitation code (such as reference characteristic value) storage into database, can improve in the form of ciphertext to avoid the case where being cracked is easy The safety and stability of system.
The application can be clearly understood in order to facilitate those skilled in the art, will be exemplified below in the application Invitation code generates and verification process.
For example, firstly, invitation code generating process can be as follows:
Step 1: generating the character string A of 8 digits at random, and the CRC32 of the character string is calculated using CRC32 algorithm It is worth and switchs to 16 systems, to ensure that the CRC32 value is 8, preset characters (such as lowercase [g-z]) can be used less than 8 Filling calculates using hash algorithm the reference characteristic value C of first redundancy check code B to get to the first redundancy check code B.
Step 2: generate the identification code D uniquely to indicate reference characteristic value C, and by reference characteristic value C, identification code D Corresponding storage is into database.It should be noted that identification code ID can be the decimal system from ID is increased, such as 101,102 etc., for example, Whenever a reference characteristic value C is written into database, an identification code D will be automatically generated, identification code D can for ten into System increases ID certainly, it can is increased certainly with the write operation of reference characteristic value C.
Step 3: carrying out character splicing for private key E is preset in the first redundancy check code B, identification code D and system, and use MD5 algorithm calculates spliced character, generates the First Eigenvalue F, i.e. MD5 (DBE).
In this step, identification code D can be first obtained from database, and identification code D is converted into 16 systems by the decimal system, Later, the identification code D of 16 systems, the first redundancy check code B of 16 systems and private key E are subjected to character splicing, and use MD5 Algorithm calculates spliced character, to generate the First Eigenvalue F.
Step 4: calculating the CRC32 value of the First Eigenvalue F using CRC32 algorithm, corresponding second redundancy check is generated Code G simultaneously switchs to 16 systems, if redundancy check code G less than eight, is filled with lowercase [g-z].
Step 5: identification code D, the first redundancy check code B and the second redundancy check code G are spliced, composition is invited Code.
The generation of invitation code can be realized based on the above embodiment, the invitation code of generation can be handed down to user's use.? When detecting user using invitation code to trigger corresponding business event, need first to verify the invitation code of user input. Wherein, the verification process of invitation code can be as follows:
Step 1: the invitation code for obtaining user's input is split as the first character string by it according to every one group of eight characters D1, the second character string B, third character string G three parts.Wherein, which is 16 binary datas.
Step 2: the first character string D1, the second character string B are connected with private key E built in system, calculated by MD5 algorithm Obtain characteristic value F.
Step 3: calculating the CRC32 value of characteristic value F using CRC32 algorithm and switching to 16 systems, if the CRC32 value is insufficient 8 can then be filled with preset characters (such as lowercase [g-z]), obtains redundancy check code G1.
Step 4: this invitation code is invalid, and otherwise continue to the next step if redundancy check code G1 is not equal to third character string G.
Step 5: the first character string D1 is switched to the decimal system, and cryptographic Hash corresponding with D1 is searched in the database, obtain Object reference characteristic value C.
It should be noted that since the identification code in database for uniquely indicating reference characteristic value is a decimal system Number, so, in this step, first the first character string D1 can be switched to the decimal system, D1 is that is, be to record reference in database Identification code in the list of feature values can find out corresponding cryptographic Hash, as target by first character string D1 later Reference characteristic value C.Step 6: the cryptographic Hash C1 of the second character string B is calculated using hash algorithm, by the mesh in C1 and the 5th step Reference characteristic value C comparison is marked, is verified if equal, that is, determines that the invitation code of user input is legal, otherwise verifying is lost It loses, determines that the invitation code of user's input is illegal, i.e., be not the real invitation code that system server is handed down to user, Ke Yili Solution has the corresponding ciphertext of the invitation code to be not stored in the database.
Corresponding with the invitation code generating method that above-mentioned several embodiments provide, a kind of embodiment of the application also provides one Kind invitation code generating means are provided due to invitation code generating means provided by the embodiments of the present application with above-mentioned several embodiments Invite code generating method it is corresponding, therefore it is aforementioned invite code generating method embodiment be also applied for the present embodiment provides Invitation code generating means, be not described in detail in the present embodiment.Fig. 3 is the invitation code according to the application one embodiment The structural schematic diagram of generating means.As shown in figure 3, the invitation code generating means include: the first redundancy check code generation module 01, reference characteristic value generation module 02, identification code generating module 03, data memory module 04, the First Eigenvalue generation module 05, the second redundancy check code generation module 06 and invitation code generation module 07.
Specifically, the first redundancy check code generation module 01 is used to generate character string according to preset rules, and according to character Concatenate into the first redundancy check code.
Reference characteristic value generation module 02 is used to generate the reference characteristic value of character string according to the first redundancy check code.
Identification code generating module 03 is used to generate the identification code uniquely to indicate reference characteristic value.
Data memory module 04 is used for the corresponding relationship according to reference characteristic value and identification code, by reference characteristic value and mark Code is stored into database.
The First Eigenvalue generation module 05 is used for according to the first redundancy check code, identification code and preset private key, generates the One characteristic value.
Second redundancy check code generation module 06 is used for according to the First Eigenvalue the second redundancy check code of corresponding generation.Make For a kind of example, the second redundancy check code generation module 06 is specifically used for: calculating the corresponding redundancy check of the First Eigenvalue Code value, and judge whether the redundancy check code value is eight bit data, if it is not, choosing character from preset characters then to fill The redundancy check code value, so that filled redundancy check code value is eight bit data;If so, by the First Eigenvalue Corresponding redundancy check code value is as second redundancy check code.
Invitation code generation module 07 according to the first redundancy check code, identification code and the second redundancy check code, generation for inviting It please code information.
According to the invitation code generating means of the embodiment of the present application, character string is generated according to preset rules, and according to character string Generate the first redundancy check code;The reference characteristic value of character string is generated according to the first redundancy check code;It generates uniquely to indicate The identification code of reference characteristic value, and according to the corresponding relationship of reference characteristic value and identification code, reference characteristic value and identification code are deposited Storage is into database;According to the first redundancy check code, identification code and preset private key, the First Eigenvalue is generated;According to the first spy Value indicative the second redundancy check code of corresponding generation;According to the first redundancy check code, identification code and the second redundancy check code, generate Invitation code information.As a result, being stored the partial character string in invitation code in the form of characteristic value (i.e. ciphertext) to database In, safety, the stability of system can be improved, and generate invitation code by way of combining multiple character strings, in this way right When the invitation code of user's input is verified, the invitation code of the input can be carried out dividing the multiple character strings of generation, pass through portion Point character string first carries out the verifying of invitation code validity, and verify invitation code it is effective when, be based on remaining character string and data The characteristic value stored in library carries out the verifying of legitimacy, and the efficiency of invitation code verifying can be improved.It is mentioned with above-mentioned several embodiments The invitation code verification method of confession is corresponding, and a kind of embodiment of the application also provides a kind of invitation code verifying device, due to this Shen Please the invitation code verifying device that provides of embodiment it is corresponding with the invitation code verification method of above-mentioned several embodiments offers, therefore It is also applied for invitation code verifying device provided in this embodiment in the aforementioned embodiment for inviting code verification method, in the present embodiment In be not described in detail.Fig. 4 is the structural schematic diagram that device is verified according to the invitation code of the application one embodiment.Such as Fig. 4 institute Show, invitation code verifying device includes: information receiving module 11, information analysis module 21, validation verification module 31, searches Module 41 and legitimate verification module 51.
Specifically, information receiving module 11 is used to receive the invitation code information of user's input.
Information analysis module 21 is for analyzing invitation code information to generate multiple character strings;Wherein, multiple characters String includes the first character string, the second character string and third character string.
Validation verification module 31 is used for according to preset private key, the first character string, the second character string and third character string Whether effective verify invitation code information.
Searching module 41 is used for when verifying invitation code information is effective, from the reference characteristic value for being pre-stored within database In, search object reference characteristic value corresponding with the first character string.Wherein, which is to invite through the foregoing embodiment Please code generating means and generate.
Legitimate verification module 51 is used to calculate the characteristic value of the second character string, by the characteristic value and target of the second character string Whether reference characteristic value is matched, legal to verify invitation code information.
As a kind of possible implementation of the embodiment of the present application, validation verification module 31 can be according to preset private Key, the first character string and the second character string generate Second Eigenvalue;Then superfluous according to the corresponding generation third of Second Eigenvalue Remaining check code;Finally third redundancy check code is matched with third character string, it is whether effective to verify invitation code information. Wherein, validation verification module 31 is specifically used for: calculating the corresponding redundancy check code value of the Second Eigenvalue;Described in judgement Whether redundancy check code value is eight bit data;If it is not, choosing character from preset characters then to fill the redundancy check code Value, so that filled redundancy check code value is eight bit data;If so, by the corresponding redundancy check of the Second Eigenvalue Code value is as the third redundancy check code.
In embodiments herein, searching module 41 from the reference characteristic value for being pre-stored within database, search with The specific implementation process of the corresponding object reference characteristic value of first character string can be as follows: from the identification code of database, search with The corresponding target identification code of first character string searches object reference characteristic value according to target identification code from database.
As a kind of possible implementation, as shown in figure 5, invitation code verifying device may be used also on the basis of shown in Fig. 4 It include: Service Processing Module 61.Wherein, Service Processing Module 61 is used to determine invitation code when verifying invitation code information is legal The corresponding business event of information, and respond business event.
The invitation code of the embodiment of the present application verifies device, when receiving the invitation code information of user's input, parses this and invites Please code information obtain multiple character strings, wherein multiple character string include the first character string, the second character string and third character String, later, according to preset private key, the first character string, the second character string and third character string, verifying the invitation code information is It is no effectively, and verify the invitation code information it is effective when, from the reference characteristic value for being pre-stored within database, search and the The corresponding object reference characteristic value of one character string, and the characteristic value of the second character string is calculated, by the characteristic value of second character string It is matched with object reference characteristic value, it is whether legal to verify invitation code information.As a result, in the invitation code inputted to user When information is verified, first based on invitation code self information to the invitation code carry out validation verification, if verifying invitation code without Effect improves verification efficiency, and reduce looking into for database then without inquiring database to carry out the verifying of legitimacy to it Number is ask, system stability is improved;Verify the invitation code it is effective when, then based in the invitation code character string inquire number According to library further to be verified to the invitation code, the legitimacy of invitation code ensure that;Also, by the character string in invitation code (such as reference characteristic value) storage into database, can improve in the form of ciphertext to avoid the case where being cracked is easy The safety and stability of system
In order to realize above-described embodiment, the embodiment of the present application also proposes a kind of electronic equipment, including processor and memory And store the computer program that can be run on a memory and on a processor;Wherein, processor is deposited by reading in memory The executable program code of storage runs program corresponding with executable program code, for realizing such as above-described embodiment institute The invitation code generating method of description.
Fig. 6 shows the block diagram for being suitable for the example electronic device for being used to realize the application embodiment.The electricity that Fig. 6 is shown Sub- equipment 12 is only an example, should not function to the embodiment of the present application and use scope bring any restrictions.
As shown in fig. 6, electronic equipment 12 is showed in the form of universal computing device.The component of electronic equipment 12 may include But be not limited to: one or more processor or processing unit 16, system storage 28, connect different system components (including System storage 28 and processing unit 16) bus 18.
Bus 18 indicates one of a few class bus structures or a variety of, including memory bus or Memory Controller, Peripheral bus, graphics acceleration port, processor or the local bus using any bus structures in a variety of bus structures. For example, these architectures include but is not limited to industry standard architecture (Industry Standard Architecture;Hereinafter referred to as: ISA) bus, microchannel architecture (Micro Channel Architecture;With Lower abbreviation: MAC) bus, enhanced isa bus, Video Electronics Standards Association (Video Electronics Standards Association;Hereinafter referred to as: VESA) local bus and peripheral component interconnection (Peripheral Component Interconnection;Hereinafter referred to as: PCI) bus.
Electronic equipment 12 typically comprises a variety of computer system readable media.These media can be it is any can be electric The usable medium that sub- equipment 12 accesses, including volatile and non-volatile media, moveable and immovable medium.
Memory 28 may include the computer system readable media of form of volatile memory, such as random access memory Device (Random Access Memory;Hereinafter referred to as: RAM) 30 and/or cache memory 29.Electronic equipment 12 can be with It further comprise other removable/nonremovable, volatile/non-volatile computer system storage mediums.Only as act Example, storage system 44 can be used for reading and writing immovable, non-volatile magnetic media, and (Fig. 6 does not show that commonly referred to as " hard disk drives Dynamic device ").Although being not shown in Fig. 6, the magnetic for reading and writing to removable non-volatile magnetic disk (such as " floppy disk ") can be provided Disk drive, and to removable anonvolatile optical disk (such as: compact disc read-only memory (Compact Disc Read Only Memory;Hereinafter referred to as: CD-ROM), digital multi CD-ROM (Digital Video Disc Read Only Memory;Hereinafter referred to as: DVD-ROM) or other optical mediums) read-write CD drive.In these cases, each drive Dynamic device can be connected according to Media Interface Connector with bus 18 by one or multi-quantity.Memory 28 may include at least one journey Sequence product, the program product have one group of (for example, at least one) program module, these program modules are configured to perform this Shen Please each embodiment function.
Program/utility 40 with one group of (at least one) program module 42 can store in such as memory 28 In, such program module 42 include but is not limited to operating system, one or more application program, other program modules with And program data, it may include the realization of network environment in each of these examples or certain combination.Program module 42 is logical Often execute the function and/or method in the application Fig. 1 described embodiment.
Electronic equipment 12 can also be with one or more external equipments 14 (such as keyboard, sensing equipment, display 24 etc.) Communication, can also be enabled a user to one or more equipment interact with the electronic equipment 12 communicate, and/or with make this Any equipment (such as network interface card, modem etc. that electronic equipment 12 can be communicated with one or more of the other calculating equipment Deng) communication.This communication can be carried out by input/output (I/O) interface 22.Also, electronic equipment 12 can also pass through net Network adapter 20 and one or more network (such as local area network (Local Area Network;Hereinafter referred to as: LAN), extensively Domain net (Wide Area Network;Hereinafter referred to as: WAN) and/or public network, for example, internet) communication.As shown, Network adapter 20 is communicated by bus 18 with other modules of electronic equipment 12.It should be understood that although not shown in the drawings, can To combine electronic equipment 12 to use other hardware and/or software module, including but not limited to: microcode, device driver, superfluous Remaining processing unit, external disk drive array, RAID system, tape drive and data backup storage system etc..
Processing unit 16 by the program that is stored in system storage 28 of operation, thereby executing various function application and Data processing, such as realize the method referred in aforementioned embodiment illustrated in fig. 1.
In order to realize above-described embodiment, the embodiment of the present application also proposes a kind of non-transitorycomputer readable storage medium, It is stored thereon with computer program, the invitation code generating method such as above-described embodiment is realized when which is executed by processor.
In order to realize above-described embodiment, the embodiment of the present application also proposes another electronic equipment, including processor and storage Device and storage are on a memory and the computer program that can run on a processor;Wherein, processor is by reading in memory The executable program code of storage runs program corresponding with executable program code, for realizing such as above-described embodiment Described invitation code verification method.
In order to realize above-described embodiment, the embodiment of the present application also proposes another non-transitory computer-readable storage medium Matter is stored thereon with computer program, and the invitation code authentication such as above-described embodiment is realized when which is executed by processor Method.
In the description of the present application, it is to be understood that term " first ", " second " are used for description purposes only, and cannot It is interpreted as indication or suggestion relative importance or implicitly indicates the quantity of indicated technical characteristic.Define as a result, " the One ", the feature of " second " can explicitly or implicitly include at least one of the features.In the description of the present application, " multiple " It is meant that at least two, such as two, three etc., unless otherwise specifically defined.
In the description of this specification, reference term " one embodiment ", " some embodiments ", " example ", " specifically show The description of example " or " some examples " etc. means specific features, structure, material or spy described in conjunction with this embodiment or example Point is contained at least one embodiment or example of the application.In the present specification, schematic expression of the above terms are not It must be directed to identical embodiment or example.Moreover, particular features, structures, materials, or characteristics described can be in office It can be combined in any suitable manner in one or more embodiment or examples.In addition, without conflicting with each other, this field Technical staff can carry out the feature of different embodiments or examples described in this specification and different embodiments or examples Combination and combination.
Although embodiments herein has been shown and described above, it is to be understood that above-described embodiment is example Property, it should not be understood as the limitation to the application, those skilled in the art within the scope of application can be to above-mentioned Embodiment is changed, modifies, replacement and variant.

Claims (9)

1. a kind of invitation code generating method characterized by comprising
Character string is generated according to preset rules, and according to first redundancy check code of text string generation;
The reference characteristic value of the character string is generated according to first redundancy check code;
The identification code uniquely to indicate the reference characteristic value is generated, and according to the reference characteristic value and the identification code Corresponding relationship stores the reference characteristic value and the identification code into database;
According to first redundancy check code, the identification code and preset private key, the First Eigenvalue is generated;
According to the First Eigenvalue the second redundancy check code of corresponding generation;
According to first redundancy check code, the identification code and second redundancy check code, invitation code information is generated.
2. the method according to claim 1, wherein described generate second according to the First Eigenvalue is corresponding Redundancy check code, comprising:
Calculate the corresponding redundancy check code value of the First Eigenvalue;
Judge whether the redundancy check code value is eight bit data;
If it is not, then choosing character from preset characters to fill the redundancy check code value, so that filled redundancy check code Value is eight bit data;
If so, using the corresponding redundancy check code value of the First Eigenvalue as more than second check code.
3. a kind of invitation code verification method, which comprises the following steps:
Receive the invitation code information of user's input;
It parses the invitation code information and obtains multiple character strings;Wherein, the multiple character string includes the first character string, the second word Symbol string and third character string;
According to preset private key, first character string, the second character string and third character string, verifying the invitation code information is It is no effective;
Verify the invitation code information it is effective when, from the reference characteristic value for being pre-stored within database, search and described the The corresponding object reference characteristic value of one character string;Wherein, the reference characteristic value is by using inviting as described in claim 1 Please code generating method and generate;
The characteristic value for calculating second character string, by the characteristic value of second character string and the object reference characteristic value into Row matching, it is whether legal to verify the invitation code information.
4. according to the method described in claim 3, it is characterized in that, described according to preset private key, first character string, Whether effective two character strings and third character string verify the invitation code information, comprising:
According to preset private key, first character string and second character string, Second Eigenvalue is generated;
Third redundancy check code is generated according to the Second Eigenvalue;
The third redundancy check code is matched with the third character string, to verify whether the invitation code information has Effect.
5. according to the method described in claim 4, it is characterized in that, described generate third redundancy school according to the Second Eigenvalue Test code, comprising:
Calculate the corresponding redundancy check code value of the Second Eigenvalue;
Judge whether the redundancy check code value is eight bit data;
If it is not, then choosing character from preset characters to fill the redundancy check code value, so that filled redundancy check code Value is eight bit data;
If so, using the corresponding redundancy check code value of the Second Eigenvalue as the third redundancy check code.
6. according to the method described in claim 3, it is characterized in that, described from the reference characteristic value for being pre-stored within database In, search object reference characteristic value corresponding with first character string, comprising:
From the identification code of the database, target identification code corresponding with first character string is searched;
The object reference characteristic value is found out from the database according to the target identification code.
7. method according to any one of claim 3 to 6, which is characterized in that the method also includes:
When the verifying invitation code information is legal, the corresponding business event of the invitation code information is determined, and respond the industry Business event.
8. a kind of invitation code generating means characterized by comprising
First redundancy check code generation module, for generating character string according to preset rules, and according to the text string generation the One redundancy check code;
Reference characteristic value generation module, for generating the reference characteristic value of the character string according to first redundancy check code;
Identification code generating module, for generating the identification code uniquely to indicate the reference characteristic value;
Data memory module, for the corresponding relationship according to the reference characteristic value and the identification code, by the fixed reference feature Value and the identification code are stored into database;
The First Eigenvalue generation module, for generating according to first redundancy check code, the identification code and preset private key The First Eigenvalue;
Second redundancy check code generation module, for according to the First Eigenvalue the second redundancy check code of corresponding generation;
Invitation code generation module is used for according to first redundancy check code, the identification code and second redundancy check code, Generate invitation code information.
9. a kind of invitation code verifies device characterized by comprising
Information receiving module, for receiving the invitation code information of user's input;
Information analysis module obtains multiple character strings for parsing the invitation code information;Wherein, the multiple character string includes First character string, the second character string and third character string;
Validation verification module is used for according to preset private key, first character string, the second character string and third character string, Whether effective verify the invitation code information;
Searching module is used for when the verifying invitation code information is effective, from the reference characteristic value for being pre-stored within database, Search object reference characteristic value corresponding with first character string;Wherein, the reference characteristic value is by using such as right It is required that invitation code generating means described in 8 and generate;
Legitimate verification module, for calculating the characteristic value of second character string, by the characteristic value of second character string with Whether the object reference characteristic value is matched, legal to verify the invitation code information.
CN201910420054.6A 2019-05-20 2019-05-20 Invitation code generation method, verification method, device, electronic equipment and storage medium Active CN110135144B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910420054.6A CN110135144B (en) 2019-05-20 2019-05-20 Invitation code generation method, verification method, device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910420054.6A CN110135144B (en) 2019-05-20 2019-05-20 Invitation code generation method, verification method, device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110135144A true CN110135144A (en) 2019-08-16
CN110135144B CN110135144B (en) 2020-12-18

Family

ID=67571594

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910420054.6A Active CN110135144B (en) 2019-05-20 2019-05-20 Invitation code generation method, verification method, device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110135144B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110619204A (en) * 2019-08-28 2019-12-27 深圳市融壹买信息科技有限公司 Invitation code generation method and device, terminal equipment and storage medium
CN112487253A (en) * 2020-11-03 2021-03-12 关爱未来(广东)信息科技有限公司 User invitation code generation method, verification method, device, equipment and storage medium
CN112559497A (en) * 2020-12-25 2021-03-26 北京百度网讯科技有限公司 Data processing method, information transmission method and device and electronic equipment
CN113836364A (en) * 2021-10-12 2021-12-24 北京京东拓先科技有限公司 Invitation code generation method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103812660A (en) * 2014-02-13 2014-05-21 陈炳福 Invitation code generation and application method and system for authentication
US20140149194A1 (en) * 2012-11-26 2014-05-29 Nec Biglobe, Ltd. Granting of benefits
CN105657699A (en) * 2016-02-22 2016-06-08 成都北纬航信网络科技有限责任公司 Safe data transmission method
CN107743085A (en) * 2016-09-05 2018-02-27 腾讯科技(深圳)有限公司 Invite code management method and invitation code managing device
CN108829650A (en) * 2018-06-01 2018-11-16 腾讯科技(北京)有限公司 A kind of generation method of card number, device, server and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140149194A1 (en) * 2012-11-26 2014-05-29 Nec Biglobe, Ltd. Granting of benefits
CN103812660A (en) * 2014-02-13 2014-05-21 陈炳福 Invitation code generation and application method and system for authentication
CN105657699A (en) * 2016-02-22 2016-06-08 成都北纬航信网络科技有限责任公司 Safe data transmission method
CN107743085A (en) * 2016-09-05 2018-02-27 腾讯科技(深圳)有限公司 Invite code management method and invitation code managing device
CN108829650A (en) * 2018-06-01 2018-11-16 腾讯科技(北京)有限公司 A kind of generation method of card number, device, server and storage medium

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110619204A (en) * 2019-08-28 2019-12-27 深圳市融壹买信息科技有限公司 Invitation code generation method and device, terminal equipment and storage medium
CN112487253A (en) * 2020-11-03 2021-03-12 关爱未来(广东)信息科技有限公司 User invitation code generation method, verification method, device, equipment and storage medium
CN112487253B (en) * 2020-11-03 2024-04-05 光蕊科技(深圳)有限公司 User invitation code generation method, verification method, device, equipment and storage medium
CN112559497A (en) * 2020-12-25 2021-03-26 北京百度网讯科技有限公司 Data processing method, information transmission method and device and electronic equipment
CN112559497B (en) * 2020-12-25 2023-06-23 北京百度网讯科技有限公司 Data processing method, information transmission method, device and electronic equipment
CN113836364A (en) * 2021-10-12 2021-12-24 北京京东拓先科技有限公司 Invitation code generation method and device

Also Published As

Publication number Publication date
CN110135144B (en) 2020-12-18

Similar Documents

Publication Publication Date Title
CN110135144A (en) Invitation code generation method, verification method, device, electronic equipment and storage medium
JP5415795B2 (en) Method and apparatus for verifying the integrity of an edited document
CN108520293A (en) A kind of product false proof source tracing method, device, server and storage medium
AU2014237406B2 (en) Method and apparatus for substitution scheme for anonymizing personally identifiable information
CN108519967A (en) Chart method for visualizing, device, terminal and storage medium
CN103338219B (en) Terminal device performance evaluation information acquisition and processing method, and corresponding device and processing system thereof
US9189618B2 (en) Secure password generation
CN103646044A (en) Mobile terminal identification method and device
US20080177920A1 (en) Methods for Handling Keyboard Inputs
KR20190107009A (en) Computer-implemented system and method for determining the state of a machine executable contract implemented using blockchain
CN109815746A (en) A kind of data tamper resistant method and system based on block chain technology
JP7157141B2 (en) A Context-Aware Differencing Algorithm for Genome Files
US9325689B2 (en) Transcoding content based on verification of ownership of the content
CN113382017B (en) Permission control method and device based on white list, electronic equipment and storage medium
CN103999082B (en) Method, computer program and computer for detecting the community in social media
CN109165209A (en) The data verification method, device of object type, equipment and medium in database
CN109344572A (en) The Licensing Methods and system of distributed objects
CN104579909A (en) Method and equipment for classifying user information and acquiring user grouping information
CN104598374B (en) The method and apparatus of correction failure script
US9043885B2 (en) System for providing content or application and control method therefor, terminal and control method therefor, authentication device and control method therefor, program, and information storage medium
CN112994900B (en) File countersigning method, device, client, server and storage medium
CN106102059B (en) For the method and apparatus for the owner for determining hotspot
KR102676770B1 (en) Information processing method, information display method, program, terminal, and server
CN109685507A (en) The identification of transactions requests validity and initiating method, device, equipment and medium
US20080313472A1 (en) Method and apparatus for changing and adding activation keys for functions of digital content without having to change and recompile the digital content

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
GR01 Patent grant
GR01 Patent grant