CN106127275B - A kind of coding method for bar code of paying the bill - Google Patents

A kind of coding method for bar code of paying the bill Download PDF

Info

Publication number
CN106127275B
CN106127275B CN201610464286.8A CN201610464286A CN106127275B CN 106127275 B CN106127275 B CN 106127275B CN 201610464286 A CN201610464286 A CN 201610464286A CN 106127275 B CN106127275 B CN 106127275B
Authority
CN
China
Prior art keywords
bar code
code
string
payment
timestamp
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610464286.8A
Other languages
Chinese (zh)
Other versions
CN106127275A (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.)
China Electric fufu Mdt InfoTech Ltd
Original Assignee
Fujian Fujitsu Communication 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 Fujian Fujitsu Communication Software Co Ltd filed Critical Fujian Fujitsu Communication Software Co Ltd
Priority to CN201610464286.8A priority Critical patent/CN106127275B/en
Publication of CN106127275A publication Critical patent/CN106127275A/en
Application granted granted Critical
Publication of CN106127275B publication Critical patent/CN106127275B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K19/00Record carriers for use with machines and with at least a part designed to carry digital markings
    • G06K19/06Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code
    • G06K19/06009Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code with optically detectable marking
    • G06K19/06046Constructional details
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/30Payment architectures, schemes or protocols characterised by the use of specific devices or networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Accounting & Taxation (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Cash Registers Or Receiving Machines (AREA)

Abstract

The present invention provides a kind of coding method of bar code of paying the bill, comprising: step 1, bar code information include timestamp, payment number and type of payment, and the data of the timestamp, the payment number and the type of payment are combined and form an original string code;Step 2, using it is described payment number holder phone number as encryption string code, the original string code is encrypted, a new string code is obtained;The new string code is added by step 3 by turn with the application digital cipher of identical digit, and the not-carry more than 10 obtains string number to the end;Step 4 after being encrypted the last string number again according to Obfuscating Algorithms, obtains final bar code data;The bar code data is generated bar code image by bar code generating algorithm by step 5.The present invention reduces the digits of bar code, improve the efficiency of manually input or equipment recognition.

Description

A kind of coding method for bar code of paying the bill
Technical field
The present invention relates to a kind of coding method more particularly to a kind of coding methods for bar code of paying the bill.
Background technique
After Meituan etc. purchases by group online purchase coupons, one " certificate code " can be obtained, user needs carefully to take care of The certificate code because once by other people obtain and use cannot reuse.And the effect of the payment code essence on Alipay is " gathering ", other users are transferred accounts by sweeping the payment code and give the user.
In O2O business, the coupons that user buys on line, when checking and writing off under online, needing to generate can be by POS or client The end terminal recognitions such as APP, have timeliness and be not easy the payment code for being tampered and copying.Further, it is desirable to pay number generation When payment code is paid the bill, it may have above-mentioned safety.
Application No. is 201110231125.1 Chinese inventions filed on August 12nd, 2011, a kind of bar shaped is disclosed The coding method of code and two dimensional code mixing, comprising the following steps: (1) bar code data is generated into bar code by bar code algorithm Image;(2) hiding information to be encrypted is encrypted by the bar code data of Encryption Algorithm using product as key, is obtained Two dimensional code generates information;(3) two dimensional code for obtaining step (2) generates information and generates two dimensional code figure by two dimensional code generating algorithm Picture.The invention also discloses the coding/decoding method and coding, decoding apparatus of above-mentioned coding method.When the payment code of the invention does not have Effect property;Bar code and two dimensional code are mixing;Its Encryption Algorithm does not have the effect of dual signature.
Summary of the invention
The technical problem to be solved in the present invention is to provide a kind of coding method of bar code of paying the bill, in order to improve payment The safety of code carries out code Design to bar code, user's signature, application signature and timestamp is added, and encrypted and mixed Confuse processing.
Problem of the invention is achieved in that
A kind of coding method for bar code of paying the bill, includes the following steps:
Step 1, bar code information include timestamp, payment number and type of payment, the timestamp at least 6 digit tables Show, first 3 the N days indicated among 1 year, latter 3 M minutes indicated among one day;By the timestamp, the payment The data of number and the type of payment are combined and form an original string code;
Step 2, using the phone number of the holder of the payment number as encryption string code, to the original string code progress Encryption, obtains a new string code;
The new string code is added by step 3 by turn with the application digital cipher of identical digit, more than 10 not into Position, obtains string number to the end;
Step 4 after being encrypted the last string number again according to Obfuscating Algorithms, obtains final bar shaped yardage According to;
The bar code data is generated bar code image by bar code generating algorithm by step 5.
Further, timestamp described in the step 1 is indicated at least 6 digits, first 3 N indicated among 1 year It, latter 3 M minutes indicated among one day, specifically:
The value of M is 0≤M≤1440, if the numerical value of 0≤M < 720, N indicate that practical number of days, the numerical value of M indicate real Border the number of minutes;If the practical number of days of 720≤M≤1440, N adds 400 to indicate, the practical the number of minutes of M, which subtracts 720, to be indicated.
Further, the step 2 specifically:
If the timestamp is 6 digits, by first 6 of the phone number and the numerical value of timestamp phase by turn Add, the not-carry more than 10, obtains one 6 results;Then latter 6 of the phone number are added by turn with 6 results, Not-carry more than 10 obtains another 6 results;After the numerical value of newest 6 results and the timestamp is replaced, obtain The string code new to one.
Further, the step 4 specifically:
In the last string number, the 1st is obscured position for determination, is from left to right carried out according to the 1st value Index, the numerical value of index are from left to right to be followed successively by 0 to 17, and the value of holding the 1st and the value for obscuring position are constant, other value Plus the value for obscuring position, the not-carry more than 10 obtains final bar code data.
The present invention has the advantage that
The present invention uses novel method in the timestamp code Design of payment bar code, makes the position of payment bar code Number shortens two, improves the efficiency of manually input or equipment recognition.
Detailed description of the invention
The present invention is further illustrated in conjunction with the embodiments with reference to the accompanying drawings.
Fig. 1 is a kind of coding method execution flow chart for bar code of paying the bill of the present invention.
Specific embodiment
To be clearer and more comprehensible the present invention, now with a preferred embodiment, and attached drawing is cooperated to be described in detail below.
As shown in Figure 1, a kind of coding method of payment bar code of the invention, includes the following steps:
Step 1, bar code information include timestamp, payment number and type of payment, and bar code is typically manually entered Numerical value matched, so the fewer the digit of bar code the better;The timestamp indicates at least 6 digits, this implementation In example, the timestamp is 6 digits, first 3 the N days indicated among 1 year, latter 3 M minutes indicated among one day;Institute Stating payment number includes coupons and payment accounts, is indicated with 11 digits, supplying with 0 less than 11;The type of payment is with 1 Digit indicates that number is that 0 expression is paid with coupons, and number is that 1 expression is paid with payment accounts;By the timestamp, described The data of payment number and the type of payment are combined (can be to this 3 kinds of data any combination) and form 18 original String code;
Such as: the timestamp of a consumption card is 101010, payment number is 12345678910, type of payment 0, then 18 original string codes are 101010123456789100;
The wherein encryption algorithm of the timestamp specifically:
The value of M is 0≤M≤1440, if the numerical value of 0≤M < 720, N indicate that practical number of days, the numerical value of M indicate real Border the number of minutes;If the practical number of days of 720≤M≤1440, N adds 400 to indicate, the practical the number of minutes of M, which subtracts 720, to be indicated;
For example, timestamp is encoded to 050100 if today is the 50th day, the 100th minute among 1 year;If being today The 50th day, the 1200th minute among 1 year, then timestamp is encoded to 450480;
Step 2, using the phone number of the holder of the payment number as encryption string code, to the original string code progress Encryption, obtain 18 new string codes, can verify whether be holder operation;
Specifically: first 6 of the phone number are added by turn with original first 6 for going here and there code, not more than 10 Carry obtains one 6 results;Then latter 6 of the phone number are added by turn with 6 results, more than 10 not into Position, obtains another 6 results;By preceding 6 numerical value in newest 6 results and the original string code, (this refers at 6 Between stab and 101010) be replaced after, obtain 18 new string codes;
For example, the phone number of the holder of the payment number is 15859090114, by first 6 of phone number (158590) (timestamp: 101010) being added by turn, and the not-carry more than 10 obtains with first 6 of the original string code of bar code One 6 as a result, i.e. 101010+158590=259500;Then by rear 6 (090114) of the phone number and this 6 knots Fruit (259500) is added by turn, the not-carry more than 10, obtain another 6 as a result, i.e. 090114+259500=249614, then 18 new string codes are 249614123456789100;
Described 18 new string codes are added by turn with 18 using digital ciphers by step 3, more than 10 not into Position, is obtained string number to the end, can verify whether to be operated using legal payment terminal;
It is assumed that this 18 application digital ciphers are 591350100853520400,18 new string codes (249614123456789100) it is added by turn, the not-carry more than 10 obtains string number to the end, it may be assumed that
249614123456789100+591350100853520400=730964223209209500;
Step 4 after being encrypted the last string number again according to Obfuscating Algorithms, obtains final bar shaped yardage According to;
In the last string number, the 1st is obscured position for determination, is from left to right carried out according to the 1st value Index, the numerical value of index are from left to right to be followed successively by 0 to 17, and the value of holding the 1st and the value for obscuring position are constant, other value Plus the value for obscuring position, the not-carry more than 10 obtains final bar code data;
From 18 last string numbers 730964223209209500 it is found that the 1st value is 7, then from left to right Start to index, the 1st to index corresponding 0, then the 8th (indexing corresponding 7) to obscure position, the value for obscuring position is 2, Then other than the value of the 1st and the 8th are constant, other value adds 2, obtains final bar code data, it may be assumed that
730964223209209500+022222202222222222=752186405421421722;
The bar code data is generated bar code image by bar code generating algorithm by step 5.
Illustrate:
A) mechanism signed to timestamp, it is more commonly used in payment scene, so that bar code has timeliness And it prevents from distorting.But innovation here is only to carry out coded representation to " the time-division day moon " with 6 numbers, reduce The digit of bar code;
B) a set of reversible Obfuscating Algorithms are devised, certain aliasing effect has been reached;
C) in the ciphering process of bar code, using key is applied, have the function that application signature;Use holder's mobile phone Number has the function that user's signature that is, using binding relationship between phone number and certificate number.
Although specific embodiments of the present invention have been described above, those familiar with the art should be managed Solution, we are merely exemplary described specific embodiment, rather than for the restriction to the scope of the present invention, it is familiar with this The technical staff in field should be covered of the invention according to modification and variation equivalent made by spirit of the invention In scope of the claimed protection.

Claims (4)

1. a kind of coding method for bar code of paying the bill, characterized by the following steps:
Step 1, bar code information include that timestamp, payment number and type of payment, the timestamp are indicated at least 6 digits, First 3 the N days indicated among 1 year, latter 3 M minutes indicated among one day;By the timestamp, the payment number And the data of the type of payment are combined and form an original string code;
Step 2, using it is described payment number holder phone number as encryption string code, the original string code is added It is close, obtain a new string code;
The new string code is added, the not-carry more than 10 by step 3 by turn with the application digital cipher of identical digit, Obtain string number to the end;
Step 4 after being encrypted the last string number again according to Obfuscating Algorithms, obtains final bar code data;
The bar code data is generated bar code image by bar code generating algorithm by step 5.
2. a kind of coding method of bar code of paying the bill according to claim 1, it is characterised in that: described in the step 1 Timestamp indicates that first 3 the N days indicated among 1 year, latter 3 M minutes indicated among one day have at least 6 digits Body are as follows:
The value of M is 0≤M≤1440, if the numerical value of 0≤M < 720, N indicate that practical number of days, the numerical value of M indicate practical point Clock number;If the practical number of days of 720≤M≤1440, N adds 400 to indicate, the practical the number of minutes of M, which subtracts 720, to be indicated.
3. a kind of coding method of bar code of paying the bill according to claim 1, it is characterised in that: the step 2 specifically:
If the timestamp is 6 digits, first 6 of the phone number are added by turn with the numerical value of the timestamp, are surpassed The not-carry for crossing 10 obtains one 6 results;Then latter 6 of the phone number are added by turn with 6 results, are more than 10 not-carry obtains another 6 results;After the numerical value of newest 6 results and the timestamp is replaced, one is obtained New string code.
4. a kind of coding method of bar code of paying the bill according to claim 1, it is characterised in that: the step 4 specifically:
In the last string number, the 1st is obscured position for determination, is from left to right indexed according to the 1st value, The numerical value of index is from left to right to be followed successively by 0 to 17, and the value of holding the 1st and the value for obscuring position are constant, other value adds On obscure the value of position, the not-carry more than 10 obtains final bar code data.
CN201610464286.8A 2016-06-23 2016-06-23 A kind of coding method for bar code of paying the bill Active CN106127275B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610464286.8A CN106127275B (en) 2016-06-23 2016-06-23 A kind of coding method for bar code of paying the bill

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610464286.8A CN106127275B (en) 2016-06-23 2016-06-23 A kind of coding method for bar code of paying the bill

Publications (2)

Publication Number Publication Date
CN106127275A CN106127275A (en) 2016-11-16
CN106127275B true CN106127275B (en) 2019-01-15

Family

ID=57269690

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610464286.8A Active CN106127275B (en) 2016-06-23 2016-06-23 A kind of coding method for bar code of paying the bill

Country Status (1)

Country Link
CN (1) CN106127275B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112016948B (en) * 2019-05-31 2024-01-23 口碑(上海)信息技术有限公司 Method and device for generating electronic coupon code, storage medium and electronic device
CN111400779A (en) * 2020-01-07 2020-07-10 李蕴光 High-dimensional data encryption method and system
CN112784943A (en) * 2021-01-27 2021-05-11 深圳技术大学 Two-dimensional code encryption method, system, equipment and storage medium
CN113971553A (en) * 2021-10-28 2022-01-25 中国银行股份有限公司 Remittance method, bank background system and bank client
CN114219055B (en) * 2021-12-14 2024-04-05 平安壹钱包电子商务有限公司 Bar code generation method, bar code verification method and payment system

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102118710A (en) * 2011-03-08 2011-07-06 上海红松信息技术有限公司 System and method for transmitting data between mobile terminals
CN102243739A (en) * 2011-07-04 2011-11-16 中国建设银行股份有限公司 Mobile-phone bank payment method, mobile-phone bank payment system and mobile-phone bank client based on two-dimension code
KR20120025708A (en) * 2010-09-08 2012-03-16 주식회사 비즈모델라인 Method and system for providing code-image for integrated demand
CN102842081A (en) * 2011-06-23 2012-12-26 上海易悠通信息科技有限公司 Method for generating two-dimensional code and implementing mobile payment by mobile phone
CN103269269A (en) * 2013-05-08 2013-08-28 吴伟 File encryption transmission method based on two-dimensional bar code technology
CN103714458A (en) * 2013-12-20 2014-04-09 江苏大学 Two-dimension code-based mobile terminal transaction encryption method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20120025708A (en) * 2010-09-08 2012-03-16 주식회사 비즈모델라인 Method and system for providing code-image for integrated demand
CN102118710A (en) * 2011-03-08 2011-07-06 上海红松信息技术有限公司 System and method for transmitting data between mobile terminals
CN102842081A (en) * 2011-06-23 2012-12-26 上海易悠通信息科技有限公司 Method for generating two-dimensional code and implementing mobile payment by mobile phone
CN102243739A (en) * 2011-07-04 2011-11-16 中国建设银行股份有限公司 Mobile-phone bank payment method, mobile-phone bank payment system and mobile-phone bank client based on two-dimension code
CN103269269A (en) * 2013-05-08 2013-08-28 吴伟 File encryption transmission method based on two-dimensional bar code technology
CN103714458A (en) * 2013-12-20 2014-04-09 江苏大学 Two-dimension code-based mobile terminal transaction encryption method

Also Published As

Publication number Publication date
CN106127275A (en) 2016-11-16

Similar Documents

Publication Publication Date Title
CN106127275B (en) A kind of coding method for bar code of paying the bill
CN107077670B (en) Method and apparatus for transmitting and processing transaction message, computer readable storage medium
US9864983B2 (en) Payment method, payment server performing the same and payment system performing the same
US7066382B2 (en) Method and apparatus for transferring or receiving data via the Internet securely
US8606720B1 (en) Secure storage of payment information on client devices
CN105933274B (en) A kind of method of payment and device
CN101576983A (en) Electronic payment method and system based on mobile terminal
JP7367939B2 (en) Data structure, transmitting device, receiving device, payment device, method, computer program
CN104937626A (en) Authentication device and related methods
CN104166916A (en) Payment method and payment system
CN101790166A (en) Digital signing method based on mobile phone intelligent card
CN104182868B (en) Method of payment and payment system
CN104200365A (en) Writing and paying method for electronic check
CN102647410A (en) Information safe system and method based on light sensation identification
HRP20201061T1 (en) Protections for unauthorized copying (anti-cloning) method and system
CN103824203A (en) Point payment system of mobile intelligent terminal
KR101587414B1 (en) One-time credit card number based payment assistance apparatus and method
US20200311715A1 (en) Methods and apparatus for payment card activation
JP2004102883A (en) Cybermoney settlement system, communication terminal, and server device
CN101882344B (en) Method for realizing small payment
CN107077668A (en) System and method for providing payment services
CN105205427A (en) Identity card information storage and recognition method
CN105096120A (en) Pre-authorization processing method and device
CN107947934A (en) The fingerprint recognition Verification System and method of mobile terminal based on banking system
TWI271668B (en) Electronic ticket system for information hiding

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: Wufeng Street software Avenue Gulou District of Fuzhou city in Fujian province 350000 No. 89 Building No. 12

Patentee after: China Electric fufu Mdt InfoTech Ltd

Address before: Wufeng Street software Avenue Gulou District of Fuzhou city in Fujian province 350000 No. 89 Building No. 12

Patentee before: Fujian Fushitong Information Software Co.,Ltd.