CN107368297A - A kind of method for generating application code - Google Patents
A kind of method for generating application code Download PDFInfo
- Publication number
- CN107368297A CN107368297A CN201710465066.1A CN201710465066A CN107368297A CN 107368297 A CN107368297 A CN 107368297A CN 201710465066 A CN201710465066 A CN 201710465066A CN 107368297 A CN107368297 A CN 107368297A
- Authority
- CN
- China
- Prior art keywords
- application code
- batch
- javabean
- application
- generating
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/31—Programming languages or programming paradigms
Abstract
The present invention discloses a kind of method for generating application code, comprises the steps of:A obtains batch ID;B generates fixed qty application code according to batch ID and generation quantity, the beneficial effects of the invention are as follows:1st, it is safe, by 35 systems and the algorithm of random number, can accomplish mutually to convert using reverse thinking, so as to ensure that the security of application code;2nd, autgmentability is strong, can correspond to and code type is applied in 1..........n, infinite expanding, and addition is convenient;3rd, uniqueness, such a algorithm, which can be counted clearly, can generate 64339296874 batches, can at most generate 64339296874*5000 application code, ensure that the uniqueness of application code;4th, high-performance, 500 and gives, and response speed can reach the storage speed that 1000tps. ensure that application code.
Description
Technical field
The present invention relates to data processing field, specifically a kind of method for generating application code.
Background technology
It is domestic as the continuous emergence of internet industry, internet gaming industry are also to emerge in an endless stream at present, and in playing
One of most common business scenario is exactly the application of stage property or gift bag, for player, want to obtain corresponding to stage property or
Person's gift bag is to need unique exchanges to identify, and this mark of exchanging is need strictly to handle one in game technology
Ins and outs, during design, the main characteristic for considering four aspects, first, its security;Second, its autgmentability;Third, it
Infinite property;
Fourth, its high-performance.
Going game industry has the relation of dependence for the technology, but the processing for this technology is various each
Sample,
Though IT technologies are inherently particular about innovation, without ready patterns to follow.But industry is understood for the technical finesse based on me,
The characteristic of four aspects of appeal is not accounted for mostly or only takes into account wherein 1.
So this technology uses industry main flow programming language java, combination algorithm, data modeling, caching.
The content of the invention
It is an object of the invention to provide a kind of method of generation application code simple in construction, easy to use, with solution
State the problem of being proposed in background technology.
To achieve the above object, the present invention provides following technical scheme:
A kind of method for generating application code, is comprised the steps of:A obtains batch ID;B gives birth to according to batch ID and generation quantity
Into fixed qty application code.
Preferred scheme as the present invention:The step A includes:1st, agency couple is created by JavaBean AppAgent
As;2nd, a new application batch object is created by JavaBean AppCodeBatch;3rd, JavaBean is passed through
AppCodeBatch creates a new application batch object.
Preferred scheme as the present invention:The step B includes:1., using google provide assembly tool class joined
Number verification;2., provide assembly tool class using google and carry out parameter verification, created after generation by javaBean AppCode
Application code object is built, 3., by application code object is stored into mysql databases.
Preferred scheme as the present invention:The agent object include act on behalf of name, act on behalf of rank, higher level id, root id, whether
Effectively, renewal time, more new person, creation time and establishment are humanized.
Preferred scheme as the present invention:The application batch object include using id, Apply Names, type, act on behalf of id,
Act on behalf of name, quantity, access times, game specified configuration information, whether mix alphabetical, effective time started, effective deadline,
Batch state, renewal time, more new person, creation time, founder.
Preferred scheme as the present invention:The application code object includes batch number, using id, Apply Names, application code
Type, application code, remaining number, application code state, version number, renewal time, creation time.
Compared with prior art, the beneficial effects of the invention are as follows:1st, it is safe, pass through the calculation of 35 systems and random number
Method, it can accomplish mutually to convert using reverse thinking, so as to ensure that the security of application code;2nd, autgmentability is strong, can correspond to
1..........n middle to apply code type, infinite expanding, addition is conveniently;3rd, uniqueness, such a algorithm can be counted clearly can be with
64339296874 batches are generated, 64339296874*5000 application code can be at most generated, ensure that the unique of application code
Property;4th, high-performance, high-performance 500 and are given, and response speed can reach the storage speed that 1000tps. ensure that application code.
Brief description of the drawings
Fig. 1 is the overall block diagram of the present invention;
Fig. 2 is application code product process figure;
Fig. 3 is application code security authentication process figure.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete
Site preparation describes, it is clear that described embodiment is only part of the embodiment of the present invention, rather than whole embodiments.It is based on
Embodiment in the present invention, those of ordinary skill in the art are obtained every other under the premise of creative work is not made
Embodiment, belong to the scope of protection of the invention.
Fig. 1,2,3 are referred to, a kind of method for generating application code, are comprised the steps of:A obtains batch ID;B is according to batch
ID and generation quantity generation fixed qty application code.
Step A includes:1st, agent object is created by JavaBean AppAgent;2nd, JavaBean is passed through
AppCodeBatch creates a new application batch object;3rd, by JavaBean AppCodeBatch create one it is new
Using batch object.
Step B includes:1., provide assembly tool class using google and carry out parameter verification;2., using google offer groups
Part tool-class carries out parameter verification, and application code object is created by javaBean AppCode after generation, 3., by application code pair
As storing into mysql databases.
Agent object include act on behalf of name, act on behalf of rank, higher level id, root id, whether effectively, renewal time, more new person, create
Time and establishment are humanized.
Included using batch object using id, Apply Names, type, act on behalf of id, Dai Liming, quantity, access times, game
Specified configuration information, whether mix alphabetical, effective time started, effective deadline, batch state, renewal time, more new person,
Creation time, founder.
Application code object include batch number, using id, Apply Names, using code type, application code, remaining number, should
With code state, version number, renewal time, creation time.
The present invention operation principle be:Application code generation limitation:
1. a batch most multipotency generates 5000 application codes, if necessary to more application codes, it is necessary to add multiple answer
With code batch;
2. it is one group of code for including capitalization A-Y and digital 0-9 that regular length is 16 using code length;
Application code first six digits create-rule:
The first six digits of application code are herein referred to as prefix, and prefix is three quindenary batch number numbers, specific rule
It is then as follows:
6 are fixed batch number information before application code:
A. the batch number of integer (int64) is converted into 35 system character strings, referred to as hexBid;
B. if hexBid length is less than 6, then a Z-shaped symbol is mended afterwards, when length is still less than 6, supplies [2- at random
9XD] composition character;
C. for example:BatchId=75, the hexBid=25 of generation, then carry out length and supply:25Z22X, 22X be with
The character string that machine is supplied, Z are mark separator;
10 are unique random character string composition under the batch after application code
Pay attention to:Under above-mentioned rule, it can at most possess 64339296874 batches, can at most generate 64339296874*
5000 application codes, use enough.
3. the application code of generation is stored in redis cachings
Based on the characteristic of high concurrent in game user group, application code is stored in redis, largely improved
The performance of application scenarios, application of the present invention to redis are based on spring-redis.
Source code, which is realized, is based primarily upon industry main flow programming language java, with reference to google components, 35 systems and random number
Algorithm Mass production application code, business main flow non-relational database redis (spring-redis are used in application code storage
Component) carry out improving performance, redis servers are to be arranged on based on linux in Ali's cloud service, so as to lift user experience.
Market application foreground:
2.1.1 active coding
Platform activation game passage private code, game can be logged in after activation game.Be generally used for application technical testing,
Close beta, delete shelves test etc..
Active coding is typically only capable to, using once, can only only be used by an account number;The active coding for being issued to media can be by
It is used for multiple times (multiple account number uses).
2.1.2 new hand blocks
Actually one special stage property card, but a game role only and is used only once.
2.1.3 stage property card
In game on specific NPC, stage property, a role such as the convertible gift bag of input stage property card number, equipment do not limit
Using the number of stage property card, but a stage property card can only be only used once.
2.1.4 trade council blocks
In game on specific NPC, the stage property such as the proprietary gift bag of the convertible trade council of card number of input trade council, equipment, one
Role does not limit the number blocked using trade council, but trade council's card number can only be only used once.
Claims (6)
- A kind of 1. method for generating application code, it is characterised in that comprise the steps of:A, batch ID is obtained;B, fixed qty application code is generated according to batch ID and generation quantity.
- 2. a kind of method for generating application code according to claim 1, it is characterised in that the step A includes:1st, pass through JavaBean AppAgent create agent object;2nd, a new application batch is created by JavaBean AppCodeBatch Object;3rd, a new application batch object is created by JavaBean AppCodeBatch.
- 3. a kind of method for generating application code according to claim 1, it is characterised in that the step B includes:1., adopt Assembly tool class, which is provided, with google carries out parameter verification;2., provide assembly tool class using google and carry out parameter verification, it is raw Into application code object is created by javaBean AppCode afterwards, 3., by application code object store into mysql databases.
- 4. a kind of method for generating application code according to claim 2, it is characterised in that the agent object includes agency Name, act on behalf of rank, higher level id, root id, whether effectively, renewal time, more new person, creation time and create humanized.
- 5. a kind of method for generating application code according to claim 2, it is characterised in that the application batch object includes Using id, Apply Names, type, act on behalf of id, Dai Liming, quantity, access times, game specified configuration information, whether mix word Female, effective time started, effective deadline, batch state, renewal time, more new person, creation time, founder.
- 6. a kind of method for generating application code according to claim 3, it is characterised in that the application code object, which includes, to be criticized Secondary number, using id, Apply Names, using code type, application code, remaining number, application code state, version number, renewal time, Creation time.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710465066.1A CN107368297A (en) | 2017-06-19 | 2017-06-19 | A kind of method for generating application code |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710465066.1A CN107368297A (en) | 2017-06-19 | 2017-06-19 | A kind of method for generating application code |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107368297A true CN107368297A (en) | 2017-11-21 |
Family
ID=60306435
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710465066.1A Pending CN107368297A (en) | 2017-06-19 | 2017-06-19 | A kind of method for generating application code |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107368297A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110765738A (en) * | 2018-07-24 | 2020-02-07 | 鸿合科技股份有限公司 | System and method for generating card number and electronic equipment |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040205734A1 (en) * | 2000-11-30 | 2004-10-14 | Krishnamurthy Srinivasan | Dynamic notification of non java services using jini (TM) |
CN101106771A (en) * | 2006-07-10 | 2008-01-16 | 王磊 | Mobile phone software encryption and verification method |
CN101404052A (en) * | 2008-05-04 | 2009-04-08 | 北京深思洛克软件技术股份有限公司 | Method for remotely activating software |
CN101483686A (en) * | 2008-11-20 | 2009-07-15 | 杭州华科通信设备有限公司 | Digital anticounterfeiting system and method based on IP telephone operation system |
CN103390239A (en) * | 2012-05-07 | 2013-11-13 | 星全安创意行销顾问有限公司 | Electronic coin certificate and method for automatically processing same |
UA110633C2 (en) * | 2010-12-30 | 2016-01-25 | Діджітел Кеудінг Енд Тракінг Есеусіейшн | Method and apparatus for marking manufactured items |
CN105574737A (en) * | 2015-12-15 | 2016-05-11 | 中国建设银行股份有限公司 | Data processing system and method for generating and maintaining redeem codes |
CN105931056A (en) * | 2016-04-13 | 2016-09-07 | 孙巍 | Commodity anti-counterfeiting method and device |
US20160314502A1 (en) * | 2015-04-24 | 2016-10-27 | Conversant, Inc. | System and method for streamlining the design and development process of multiple advertising units |
-
2017
- 2017-06-19 CN CN201710465066.1A patent/CN107368297A/en active Pending
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040205734A1 (en) * | 2000-11-30 | 2004-10-14 | Krishnamurthy Srinivasan | Dynamic notification of non java services using jini (TM) |
CN101106771A (en) * | 2006-07-10 | 2008-01-16 | 王磊 | Mobile phone software encryption and verification method |
CN101404052A (en) * | 2008-05-04 | 2009-04-08 | 北京深思洛克软件技术股份有限公司 | Method for remotely activating software |
CN101483686A (en) * | 2008-11-20 | 2009-07-15 | 杭州华科通信设备有限公司 | Digital anticounterfeiting system and method based on IP telephone operation system |
UA110633C2 (en) * | 2010-12-30 | 2016-01-25 | Діджітел Кеудінг Енд Тракінг Есеусіейшн | Method and apparatus for marking manufactured items |
CN103390239A (en) * | 2012-05-07 | 2013-11-13 | 星全安创意行销顾问有限公司 | Electronic coin certificate and method for automatically processing same |
US20160314502A1 (en) * | 2015-04-24 | 2016-10-27 | Conversant, Inc. | System and method for streamlining the design and development process of multiple advertising units |
CN105574737A (en) * | 2015-12-15 | 2016-05-11 | 中国建设银行股份有限公司 | Data processing system and method for generating and maintaining redeem codes |
CN105931056A (en) * | 2016-04-13 | 2016-09-07 | 孙巍 | Commodity anti-counterfeiting method and device |
Non-Patent Citations (2)
Title |
---|
QIANJUNYOUXI.COM: "游戏礼包的制作与推广技巧", 《HTTPS://GAME.HUANQIU.COM/ARTICLE/9CAKRNJSVZJ》 * |
撒一片暖阳: "如何设计和生成游戏的激活码", 《HTTPS://BLOG.CSDN.NET/WE_ARE_THE_WORLD_123/ARTICLE/DETAILS/72771843》 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110765738A (en) * | 2018-07-24 | 2020-02-07 | 鸿合科技股份有限公司 | System and method for generating card number and electronic equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105630590B (en) | A kind of business information processing method and processing device | |
Ta-Shma | On extracting randomness from weak random sources | |
CN110414567A (en) | Data processing method, device and electronic equipment | |
CN107707477A (en) | The processing method and processing device of message, computer-readable recording medium | |
Hall Jr et al. | Uniqueness of the projective plane of order eight | |
Bollig et al. | Hierarchy theorems for kOBDDs and kIBDDs | |
WO2020118856A1 (en) | Traceable tamper-proof chip research and development transaction data storage method and system | |
CN110264156A (en) | A kind of project management method, device, electronic equipment and storage medium | |
Job et al. | Recursive backtracking for solving 9* 9 Sudoku puzzle | |
CN107368297A (en) | A kind of method for generating application code | |
CN105574737A (en) | Data processing system and method for generating and maintaining redeem codes | |
CN108958925B (en) | Energy-saving workload proving method and system | |
CN109241057A (en) | A kind of digital ID generation method for distributed system | |
Marsaglia | Seeds for random number generators | |
Charnes et al. | Past, present and future of large scale transshipment computer codes and applications | |
CN109582476A (en) | Data processing method, apparatus and system | |
CN105225153A (en) | Data processing method and device | |
US20040267773A1 (en) | Generation of repeatable synthetic data | |
CN108833156A (en) | A kind of appraisal procedure and system of the simulation performance index for power telecom network | |
Kanetkar et al. | Let Us Python Solutions: Learn by Doing-the Python Learning Mantra | |
CN109285015A (en) | A kind of distribution method and system of virtual resource | |
Zingaro | Algorithmic Thinking: Unlock Your Programming Potential | |
CN109726581B (en) | Data statistical method and device | |
CN109784094A (en) | It is a kind of to support pretreated batch outsourcing data integrity auditing method and system | |
Jongsma et al. | Basic set theory and combinatorics |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20171121 |
|
RJ01 | Rejection of invention patent application after publication |