CN110334794A - The generation method and device of off-line graphical code - Google Patents

The generation method and device of off-line graphical code Download PDF

Info

Publication number
CN110334794A
CN110334794A CN201910478067.9A CN201910478067A CN110334794A CN 110334794 A CN110334794 A CN 110334794A CN 201910478067 A CN201910478067 A CN 201910478067A CN 110334794 A CN110334794 A CN 110334794A
Authority
CN
China
Prior art keywords
code
line graphical
graphical code
random number
user
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
CN201910478067.9A
Other languages
Chinese (zh)
Other versions
CN110334794B (en
Inventor
唐志慧
李晓瑞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Advanced New Technologies Co Ltd
Advantageous New Technologies Co Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201910478067.9A priority Critical patent/CN110334794B/en
Priority to CN202211460889.2A priority patent/CN115759160A/en
Publication of CN110334794A publication Critical patent/CN110334794A/en
Application granted granted Critical
Publication of CN110334794B publication Critical patent/CN110334794B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/58Random or pseudo-random number generators
    • 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/06018Record 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 one-dimensional coding
    • G06K19/06028Record 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 one-dimensional coding using bar codes
    • 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/06037Record 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 multi-dimensional coding

Abstract

This specification embodiment provides the generation method and device of a kind of off-line graphical code, this method comprises: receiving the off-line graphical code acquisition request that graphic code presentation device is sent;Wherein, the identification information of user corresponding to graphic code presentation device is carried in off-line graphical code acquisition request;The configuration information of off-line graphical code based on user generates the different random number of specified quantity according to the generating random number rule of setting;Wherein, configuration information is used to indicate the number for needing the off-line graphical code generated, and the quantity of random number is equal with the number of off-line graphical code that needs generate;For each random number, user information corresponding to the identification information to random number and user carries out signature processing, and the signing messages that signature is handled is as code value corresponding to off-line graphical code, and the code value is for generating off-line graphical code.

Description

The generation method and device of off-line graphical code
Technical field
This application involves graphic code technical field more particularly to a kind of generation methods and device of off-line graphical code.
Background technique
With the fast development of information technology and popularizing for graphic code technology, the graphic codes such as two dimensional code, bar code are each A field is all widely used, for example, payment technical field, gate inhibition field etc..In order to facilitate the use of user, reduce The waiting time for carrying out user in graphic code checking procedure, currently, can be generated offline by graphic code presentation device, Yi Jitong The off-line graphical code that overscan decoding apparatus verifies offline also starts to start to be widely applied in every field.It is swept for example, subway is out of the station Code, campus dining room, convenience store, publilc baths etc. consume scene.
But the code value of used off-line graphical code is generally longer at present, correspondingly, in order to realize the knowledge to graphic code Not, the requirement to barcode scanning equipment is also higher, and some more outmoded equipment may be reduced with the recognition success rate of graphic code Or extend identification time-consuming.Therefore, it needs to propose a kind of technical solution for generating off-line graphical code, it is generated offline to shorten The code value length of graphic code.
Summary of the invention
The purpose of this specification embodiment is to provide the generation method and device of a kind of off-line graphical code, raw in server end At off-line graphical code, the mechanism private key of the mechanism as corresponding to the server is stored in server end, it is generating When off-line graphical code, can directly it be signed using mechanism private key to user information and random number;It only needs using the machine Structure private key, which carries out once signed to user information and random number, can generate code value corresponding to off-line graphical code;With existing skill Off-line graphical code is generated in client in art to compare, and does not need to reuse private key for user to random number progress once signed, therefore Also client public key need not be carried in code value generated, that is, is simplified the generating process of off-line graphical code, also shortened and give birth to At the code value length of off-line graphical code set to reduce the requirement to barcode scanning equipment correspondingly, certain barcode scannings can be improved Standby is time-consuming to the recognition success rate of graphic code, shortening identification.
In order to solve the above technical problems, this specification embodiment is achieved in that
This specification embodiment provides a kind of generation method of off-line graphical code, is applied to server, the method packet It includes:
Receive the off-line graphical code acquisition request that graphic code presentation device is sent;Wherein, the off-line graphical code acquisition is asked Seek the identification information for carrying user corresponding to the graphic code presentation device;
The configuration information of off-line graphical code based on the user generates specified number according to the generating random number rule of setting The different random number of amount;Wherein, the configuration information is used to indicate the number for needing the off-line graphical code generated, And the quantity of the random number is equal with the number of the off-line graphical code that needs generate;
For each random number, user information corresponding to the identification information to the random number and the user into The processing of row signature, the signing messages that signature is handled is as the code value of the off-line graphical code;Wherein, the code value is used for Generate the off-line graphical code.
This specification embodiment additionally provides a kind of generation method of off-line graphical code, is applied to graphic code presentation device, The described method includes:
Off-line graphical code acquisition request is sent to server;Wherein, it is carried in the off-line graphical code acquisition request The identification information of user corresponding to graphic code presentation device is stated, so that off-line graphical code of the server based on the user Configuration information, generate the different random number of specified quantity according to the generating random number rule of setting, and for each The random number, user information corresponding to the identification information to the random number and the user carry out signature processing, will sign Code value of the signing messages that name processing obtains as the off-line graphical code;Wherein, the configuration information, which is used to indicate, needs to give birth to At the off-line graphical code number, and the number phase of the off-line graphical code that the quantity of the random number is generated with needs Deng;The code value is for generating the off-line graphical code;
Receive code value corresponding to each of the server return off-line graphical code.
This specification embodiment additionally provides a kind of generating means of off-line graphical code, is applied to server, described device Include:
First receiving module, for receiving the off-line graphical code acquisition request of graphic code presentation device transmission;Wherein, described The identification information of user corresponding to the graphic code presentation device is carried in off-line graphical code acquisition request;
Generation module, for the configuration information of the off-line graphical code based on the user, according to the generating random number of setting Rule generates the different random number of specified quantity;Wherein, the configuration information be used to indicate need generate it is described from The number of line chart shape code, and the quantity of the random number is equal with the number of the off-line graphical code that needs generate;
Signature blocks are used for each random number, corresponding to the identification information to the random number and the user User information carry out signature processing, the signing messages that signature is handled is as the code value of the off-line graphical code;Wherein, The code value is for generating the off-line graphical code.
This specification embodiment additionally provides a kind of generating means of off-line graphical code, is applied to graphic code presentation device, Described device includes:
Sending module, for sending off-line graphical code acquisition request to server;Wherein, the off-line graphical code acquisition is asked The identification information for carrying user corresponding to the graphic code presentation device is sought, so that the server is based on the user Off-line graphical code configuration information, generate different random of specified quantity according to the generating random number rule of setting Number, and it is directed to each random number, user information corresponding to the identification information to the random number and the user carries out Signature processing, the signing messages that signature is handled is as the code value of the off-line graphical code;Wherein, the configuration information is used The number of the off-line graphical code generated, and the offline figure that the quantity of the random number and needs generate are needed in instruction The number of shape code is equal;The code value is for generating the off-line graphical code;
Second receiving module, for receiving code value corresponding to each of the server return off-line graphical code.
This specification embodiment additionally provides a kind of generating device of off-line graphical code, is applied to server, comprising:
Processor;And
It is arranged to the memory of storage computer executable instructions, the executable instruction makes the place when executed Manage device:
Receive the off-line graphical code acquisition request that graphic code presentation device is sent;Wherein, the off-line graphical code acquisition is asked Seek the identification information for carrying user corresponding to the graphic code presentation device;
The configuration information of off-line graphical code based on the user generates specified number according to the generating random number rule of setting The different random number of amount;Wherein, the configuration information is used to indicate the number for needing the off-line graphical code generated, And the quantity of the random number is equal with the number of the off-line graphical code that needs generate;
For each random number, user information corresponding to the identification information to the random number and the user into The processing of row signature, the signing messages that signature is handled is as the code value of the off-line graphical code;Wherein, the code value is used for Generate the off-line graphical code.
This specification embodiment additionally provides a kind of generating device of off-line graphical code, is applied to graphic code presentation device, Include:
Processor;And
It is arranged to the memory of storage computer executable instructions, the executable instruction makes the place when executed Manage device:
Off-line graphical code acquisition request is sent to server;Wherein, it is carried in the off-line graphical code acquisition request The identification information of user corresponding to graphic code presentation device is stated, so that off-line graphical code of the server based on the user Configuration information, generate the different random number of specified quantity according to the generating random number rule of setting, and for each The random number, user information corresponding to the identification information to the random number and the user carry out signature processing, will sign Code value of the signing messages that name processing obtains as the off-line graphical code;Wherein, the configuration information, which is used to indicate, needs to give birth to At the off-line graphical code number, and the number phase of the off-line graphical code that the quantity of the random number is generated with needs Deng;The code value is for generating the off-line graphical code;
Receive code value corresponding to each of the server return off-line graphical code.
This specification embodiment additionally provides a kind of storage medium, described to hold for storing computer executable instructions Following below scheme is realized in row instruction when executed:
Receive the off-line graphical code acquisition request that graphic code presentation device is sent;Wherein, the off-line graphical code acquisition is asked Seek the identification information for carrying user corresponding to the graphic code presentation device;
The configuration information of off-line graphical code based on the user generates specified number according to the generating random number rule of setting The different random number of amount;Wherein, the configuration information is used to indicate the number for needing the off-line graphical code generated, And the quantity of the random number is equal with the number of the off-line graphical code that needs generate;
For each random number, user information corresponding to the identification information to the random number and the user into The processing of row signature, the signing messages that signature is handled is as the code value of the off-line graphical code;Wherein, the code value is used for Generate the off-line graphical code.
This specification embodiment additionally provides a kind of storage medium, described to hold for storing computer executable instructions Following below scheme is realized in row instruction when executed:
Off-line graphical code acquisition request is sent to server;Wherein, it is carried in the off-line graphical code acquisition request The identification information of user corresponding to graphic code presentation device is stated, so that off-line graphical code of the server based on the user Configuration information, generate the different random number of specified quantity according to the generating random number rule of setting, and for each The random number, user information corresponding to the identification information to the random number and the user carry out signature processing, will sign Code value of the signing messages that name processing obtains as the off-line graphical code;Wherein, the configuration information, which is used to indicate, needs to give birth to At the off-line graphical code number, and the number phase of the off-line graphical code that the quantity of the random number is generated with needs Deng;The code value is for generating the off-line graphical code;
Receive code value corresponding to each of the server return off-line graphical code.
Technical solution in the present embodiment, generates off-line graphical code in server end, generates off-line graphical in server end Code, the mechanism private key of the mechanism as corresponding to the server are stored in server end, generating off-line graphical code When, it can directly be signed using mechanism private key to user information and random number;Only need using mechanism private key to Family information and random number, which carry out once signed, can generate code value corresponding to off-line graphical code;With in the prior art in client End generates off-line graphical code and compares, and does not need to reuse private key for user and carries out once signed, therefore code generated to random number Also client public key need not be carried in value, that is, simplifies the generating process of off-line graphical code, also shorten offline figure generated The code value length of shape code, to reduce the requirement to barcode scanning equipment, correspondingly, can be improved certain barcode scanning equipment to figure The recognition success rate of code shortens identification time-consuming.
Detailed description of the invention
In order to illustrate more clearly of this specification embodiment or technical solution in the prior art, below will to embodiment or Attached drawing needed to be used in the description of the prior art is briefly described, it should be apparent that, the accompanying drawings in the following description is only Some embodiments as described in this application, for those of ordinary skill in the art, in the premise not made the creative labor Under, it is also possible to obtain other drawings based on these drawings.
Fig. 1 is one of the method flow diagram of generation method for the off-line graphical code that this specification embodiment provides;
Fig. 2 is the two of the method flow diagram of the generation method for the off-line graphical code that this specification embodiment provides;
Fig. 3 is the three of the method flow diagram of the generation method for the off-line graphical code that this specification embodiment provides;
Fig. 4 is the four of the method flow diagram of the generation method for the off-line graphical code that this specification embodiment provides;
Fig. 5 is the five of the method flow diagram of the generation method for the off-line graphical code that this specification embodiment provides;
Fig. 6 is the six of the method flow diagram of the generation method for the off-line graphical code that this specification embodiment provides;
Fig. 7 is the interaction diagrams of the generation method for the off-line graphical code that this specification embodiment provides;
Fig. 8 is one of the module composition schematic diagram of generating means of off-line graphical code that this specification embodiment provides;
Fig. 9 is the two of the module composition schematic diagram of the generating means for the off-line graphical code that this specification embodiment provides;
Figure 10 is the structural schematic diagram of the generating device for the off-line graphical code that this specification embodiment provides.
Specific embodiment
In order to make those skilled in the art better understand the technical solutions in the application, below in conjunction with this specification Attached drawing in embodiment is clearly and completely described the technical solution in this specification embodiment, it is clear that described Embodiment is merely a part but not all of the embodiments of the present application.Based on the embodiment in the application, this field Those of ordinary skill's every other embodiment obtained without creative efforts, all should belong to the application The range of protection.
The thought of this specification embodiment is, off-line graphical code is generated in server side, due to storing on the server There is mechanism (referring specifically to graphic code issuing organization) private key information, it therefore, can when server side generates off-line graphical code Off-line graphical code is generated directly to carry out signature to user information and random number using mechanism private key, it is only necessary to once be signed Name can generate off-line graphical code, avoid and brought since mechanism private key cannot directly be handed down to graphic code presentation device It is constant, simplify the product process of off-line graphical code, also shorten the code value length of off-line graphical code generated.It is based on This, this specification embodiment provides generation method, device, equipment and the storage medium of a kind of off-line graphical code, following by one One is introduced in detail.
The method that this specification embodiment provides is applied to server, which is that off-line graphical code generates server. I.e. the executing subject of this method is server, specifically, the executing subject of this method is the off-line graphical of installation on the server The generating means of code.
The off-line graphical code arrived mentioned by this specification embodiment can be for offline two dimensional code, offline bar code etc., offline For example common rectangular two dimensional code of two dimensional code, circular two-dimensional code etc..In addition, off-line graphical code also includes other for displaying and barcode scanning Code, details are not described herein.
Fig. 1 is one of the method flow diagram of generation method for the off-line graphical code that this specification embodiment provides, shown in Fig. 1 Method include at least following steps:
Step 102, the off-line graphical code acquisition request that graphic code presentation device is sent is received;Wherein, the off-line graphical code The identification information of user corresponding to the graphic code presentation device is carried in acquisition request.
Wherein, the graphic code presentation device arrived mentioned in this specification embodiment can be the intelligence such as mobile phone, tablet computer It can equipment.Above-mentioned user identity information can be the account information of user, the identity information of user or can be somebody's turn to do with unique identification Subscriber-coded information of user etc..
In the specific implementation, triggering off-line graphical code sends the trigger timing of off-line graphical code acquisition request extremely to server Less may include following several situations:
1), whenever user is when carrying out the displaying of off-line graphical code using graphic code presentation device, triggering graphic code is shown Equipment sends off-line graphical code acquisition request to server;
2), when user is when carrying out the displaying of off-line graphical code using graphic code presentation device, graphic code presentation device is examined Whether the number for surveying current residual code value in code value corresponding to the off-line graphical code of its storage is less than or equal to setting quantity, if It is then to send off-line graphical code acquisition request to server;Or graphic code presentation device detects the remaining code value stored Whether remaining term of validity is less than or equal to setting duration, if so, sending off-line graphical code acquisition request to server;
3), graphic code presentation device according to setting the period to server send off-line graphical code acquisition request, in this way whenever When interval duration between at the time of current and at the time of last time sends off-line graphical code acquisition request reaches the above-mentioned setting period, Then graphic code presentation device sends off-line graphical code acquisition request from trend server.
Certainly, it is only exemplary herein and lists several triggering graphic code presentation devices to server transmission off-line graphical The specific triggering mode of code acquisition request, in addition to this it is possible to trigger graphic code presentation device by other means to service Device sends off-line graphical code acquisition request, and this specification embodiment will not enumerate.
It should be noted that mentioned in this specification embodiment to off-line graphical code then refer to offline generate, with And the double off-line graphical codes verified by barcode scanning equipment off-line.
Step 104, the configuration information of the off-line graphical code based on above-mentioned user, it is raw according to the generating random number rule of setting At the different random number of specified quantity;Wherein, above-mentioned configuration information is used to indicate the off-line graphical code for needing to generate Number, and the quantity of random number is equal with the number of off-line graphical code that needs generate.
In order to enable having differences between each off-line graphical code corresponding to the same user generated, need to be directed to Each off-line graphical code generates a random number, and random number corresponding to each off-line graphical code is different.
Specifically, server every time when generating off-line graphical code, generally can all generate multiple off-line graphical codes, need to protect It is different to demonstrate,prove each random number corresponding to the off-line graphical code generated every time, it is also necessary to guarantee generating off-line graphical every time It is required to generate different random numbers when code.It can just guarantee that the off-line graphical code generated every time is all different in this way, and every time The each off-line graphical code generated is also different.
In a specific embodiment, it can be used at the time of receiving off-line graphical code acquisition request every time or life At prefix at the time of random number as random number, it can guarantee that the random number generated every time is different in this way.Certainly, in life It, can be according to needing the quantity of the off-line graphical code generated to be encoded every time, as the specific interior of random number when at random number Hold, can guarantee that the multiple random numbers generated every time are different in this way.It is generated random i.e. in this specification embodiment Number includes prefix and particular content.This ensure that the random number generated every time and every time is different, and generate every time Multiple random numbers are different.For ease of understanding, following to be illustrated citing.
For example, in a specific embodiment, server 05 tap at 12 days 13 December in 2018 receives graphic code The off-line graphical code acquisition request that presentation device is sent, and this is determined according to the configuration information of acquired off-line graphical code It is secondary to need to generate three off-line graphical codes, in generating the secondary off-line graphical code when random number corresponding to each off-line graphical code, 201812121305 prefix as this random number generated at the time of can receiving off-line graphical code acquisition request, When determining the particular content of each off-line graphical code, due to needing to generate three off-line graphical codes, it can be used 1,2,3 in this way Individual digit encoded, also can be used 11,12,13 as dibit number encode etc., as long as guaranteeing to be compiled Each number of code is all different, and is then added to obtained coding behind above-mentioned prefix as particular content, from And each random number corresponding to the off-line graphical code that the secondary needs generate is obtained, random number generated can be 20181212130511,20181212130512 and 20181212130513.
Certainly, in addition to this it is possible to generate above-mentioned random number based on other generating random number rules, as long as guaranteeing every The secondary and random number generated every time and each random number generated every time are all different.Above-mentioned only exemplary illustration, The restriction to this specification embodiment is not constituted.
Step 106, for each random number, the letter of user corresponding to the identification information to above-mentioned random number and above-mentioned user Breath carries out signature processing, and the signing messages that signature is handled is as the code value of off-line graphical code;Wherein, the code value is for giving birth to At off-line graphical code.
Specifically, being stored with user information corresponding to each user in the server, therefore, off-line graphical can be based on The identification information of entrained user searches user information corresponding to the user in code acquisition request.Wherein, above-mentioned user's letter Registration information when breath can be registered on the server for user, for example, the name of user, age, identification card number, Number, identity information etc..
In above-mentioned steps 106, signature processing is carried out to random number and user information, actually uses mechanism (figure Code issuing organization) private key encrypts random number and user information, obtained signing messages is a string of character strings, as from The code value of line chart shape code, the corresponding off-line graphical code of a code value.
It in the specific implementation, can be using the mechanism private key stored in server to random number and use in above-mentioned steps 106 User information corresponding to the identification information at family carries out signature processing.The server is then the corresponding service of graphic code issuing organization Device, correspondingly, said mechanism private key is then the private key of graphic code issuing organization.
In the bright book embodiment of this book, after the code value that off-line graphical code is generated by server, which is handed down to figure Code presentation device then generates corresponding offline figure based on the code value when graphic code presentation device needs to show off-line graphical code Shape code.
For ease of understanding, following to be illustrated citing.
For example, in a specific embodiment, the server of above-mentioned generation off-line graphical code is a kind of payment server, It receives in the off-line graphical code acquisition request of graphic code presentation device transmission and carries the identification information for being user A, therefore, need Off-line graphical code corresponding to user A is generated, according to the configuration information of accessed off-line graphical code, determines that this time needs The quantity for the off-line graphical code to be generated is three, is denoted as off-line graphical code 1, off-line graphical code 2 and off-line graphical code 3 respectively, Three random numbers generated are denoted as random number 1, random number 2 and random number 3 respectively, and the user information of acquired user A is User information A, therefore, when generating off-line graphical code, respectively using payment mechanism private key to user information A+ random number 1 into Row signature, obtains code value corresponding to off-line graphical code 1, is carried out using the private key of payment mechanism to user information A+ random number 2 Signature, is obtained code value corresponding to off-line graphical code 2, is signed using the private key of payment mechanism to user information A+ random number 3 Name, obtains code value corresponding to off-line graphical code 3.
The generation method for the off-line graphical code that this specification embodiment provides generates off-line graphical code in server end, by It is stored in mechanism private key in server end, therefore, when generating off-line graphical code, can directly use mechanism private key It signs to user information and random number;It only needs to carry out once signed to user information and random number using mechanism private key Code value corresponding to off-line graphical code can be generated;With in the prior art client generate off-line graphical code compared with, be not required to It reuses private key for user and once signed is carried out to random number, therefore need not also carry client public key in code value generated, The generating process of off-line graphical code is simplified, the code value length of off-line graphical code generated is also shortened, to reduce Requirement to barcode scanning equipment consumes the recognition success rate of graphic code, shortening identification correspondingly, certain barcode scanning equipment can be improved When.
In the specific implementation, in order to determine the number of random number that needs generate, before executing above-mentioned steps 104, also Need to obtain the configuration information of off-line graphical code, in a specific embodiment, can obtain as follows it is above-mentioned from The configuration information of line chart shape code:
Step 1: use information of the user to off-line graphical code in acquisition setting time length;Wherein, above-mentioned use information User is used to indicate to the frequency of use of off-line graphical code;
Step 2: the term of validity information based on above-mentioned use information and off-line graphical code, determines what current needs generated The number of off-line graphical code, as above-mentioned configuration information.
Due to user in different phase to the use demand of off-line graphical code there may be difference, generating every time When off-line graphical code, for the service condition information to off-line graphical code in available nearest a period of time.It is being embodied When, available user in nearest one week to the use information etc. of off-line graphical code, above-mentioned setting time length it is specific Setting can be configured according to practical application scene, and this specification embodiment is defined not to this.
Above-mentioned use information can for user in the setting time length to the usage record information of off-line graphical code, example Such as, which can be with are as follows: 21 user is divided to pay using off-line graphical code when 21 days 13 December in 2018, December 21 in 2018 05 user is divided to pay using off-line graphical code when days 14,22 days 09 December in 2018 when 08 user is divided to use off-line graphical code It pays etc..
In this way, can determine that user is long in setting time based on the use information after getting above-mentioned use information It spends the interior demand number to off-line graphical code and user uses the letter such as frequency of off-line graphical code in the setting time length Breath.
In order to ensure the safety of user information, the code value of general off-line graphical code is not suitable for placing the long time, therefore, It needs that a safe and effective time limit is arranged for the code value of each off-line graphical code, when the generation time of the code value of the off-line graphical code After the safe and effective time limit, then the code value of the off-line graphical code is invalid.Therefore, user is being got to off-line graphical code After use information, it is also necessary in conjunction with the term of validity information of the code value of off-line graphical code, determine the off-line graphical code for needing to generate Number.
For example, in a specific embodiment, determine that user has probably used 10 off-line graphical codes in the last week, An off-line graphical code is used within i.e. average user one day, and the term of validity of the code value of each off-line graphical code is three days, therefore, After the off-line graphical code acquisition request for receiving the transmission of graphic code presentation device, 5 off-line graphical codes can be generated for user.
Certainly, only exemplary illustration herein, does not constitute the restriction to this specification embodiment.
Fig. 2 is shown in two, Fig. 2 of the method flow diagram of the generation method for the off-line graphical code that this specification embodiment provides Method, include at least following steps:
Step 202, the off-line graphical code acquisition request that graphic code presentation device is sent is received.
Wherein, the identification information of user corresponding to the graphic code presentation device is carried in above-mentioned request.
Step 204, use information of the user to off-line graphical code in acquisition setting time length.
Step 206, the term of validity information of the code value based on the use information and off-line graphical code determines what needs generated The number of off-line graphical code.
Step 208, it is generated according to the generating random number rule of setting identical as the number of off-line graphical code for needing to generate The different random number of quantity, and obtain the user information of the user.
Step 210, for each random number, signature processing is carried out to random number and user information, signature is handled to obtain Code value of the signing messages as off-line graphical code.
In this specification embodiment, the user couple in a period of time recently is all based on when generating off-line graphical code every time The use information of off-line graphical code, and combine off-line graphical code code value effective life determine need generate it is offline The number of graphic code had both taken into account demand of the user to off-line graphical code and has been additionally contemplates that user security problem, so that generate The number of off-line graphical code is more reasonable.
In general, user paid using off-line graphical code, authentication etc. whens, then need to show by graphic code Equipment shows off-line graphical code to barcode scanning equipment, and therefore, server is after generating code value corresponding to off-line graphical code, it is also necessary to Code value corresponding to all off-line graphical codes by the batch being currently generated is sent to graphic code presentation device.Therefore, exist After having executed above-mentioned steps 106, it is also necessary to execute following steps:
The code value of each off-line graphical code is handed down to graphic code presentation device.
It should be noted that above-mentioned code value is then code value corresponding to off-line graphical code, off-line graphical code presentation device exists When showing off-line graphical code, then it is directly based upon the code value and generates corresponding off-line graphical code.
In this specification embodiment, the number of the off-line graphical code generated every time due to server be it is multiple, often It is secondary be handed down to graphic code presentation device then for the code value of multiple off-line graphical codes, (wherein, off-line graphical code is one corresponding Code value), after graphic code presentation device receives the code value for the off-line graphical code that server issues, the code value received is carried out Storage, need using when, then corresponding off-line graphical code is directly generated according to the code value of storage, does not need to lead to again The step of graphic code presentation device executes the code value for generating off-line graphical code is crossed, it is simple to operate, also, due to once can be with The code value for storing multiple off-line graphical codes, avoid required when using off-line graphical code every time execute from server obtain from The step of code value of line chart shape code.
In general, the safety in order to guarantee each off-line graphical code is needed when generating the code value of each off-line graphical code Term of validity is configured for the code value of each off-line graphical code, off-line graphical code execution can be used in user within term of validity Corresponding business operation, after the term of validity for the code value for being more than the off-line graphical code, then the off-line graphical code is invalid, can not Continue to execute corresponding business operation.
Therefore, before the code value of each off-line graphical code is handed down to graphic code presentation device, this specification embodiment The method of offer further include:
Determine term of validity information corresponding to the code value of off-line graphical code generated;
Correspondingly, the code value of each off-line graphical code is handed down to graphic code presentation device in above-mentioned steps, comprising:
Above-mentioned term of validity, the number of off-line graphical code generated and code value are handed down to graphic code presentation device.
In this specification embodiment, the code value of off-line graphical code generated is being handed down to graphic code presentation device When, the number of off-line graphical code generated and term of validity information are handed down to graphic code presentation device together, are convenient for figure Code presentation device counts the code value of the off-line graphical code stored, consequently facilitating it is offline to determine that next time sends to server The opportunity of graphic code acquisition request.
Fig. 3 is shown in three, Fig. 3 of the method flow diagram of the generation method for the off-line graphical code that this specification embodiment provides Method include at least following steps:
Step 302, the off-line graphical code acquisition request that graphic code presentation device is sent is received, wherein the off-line graphical code The identification information of user corresponding to graphic code presentation device is carried in acquisition request.
Step 304, which is obtained in setting time length to off-line graphical code according to the identification information of above-mentioned user Use information.
Step 306, the term of validity information of the code value based on above-mentioned use information and off-line graphical code determines current need The number of the off-line graphical code of generation.
Step 308, identical as the number for the off-line graphical code that need to be generated is generated according to the generating random number rule of setting Different random number, and obtain user information corresponding to the identification information of above-mentioned user.
Step 310, for each random number, signature processing is carried out to above-mentioned random number and user information, signature is handled Code value of the obtained signing messages as off-line graphical code.
Step 312, term of validity information corresponding to the code value of each off-line graphical code generated is determined.
Step 314, above-mentioned term of validity information, the number of code value generated and each code value are handed down to graphic code exhibition Show equipment.
The generation method for the graphic code that this specification embodiment provides generates off-line graphical code in server end, due to this The mechanism private key of mechanism corresponding to server is stored in server end, therefore, when generating off-line graphical code, Ke Yizhi It connects and is signed using mechanism private key to user information and random number;Only need using mechanism private key to user information and with Machine number, which carries out once signed, can generate code value corresponding to off-line graphical code;It is generated in the prior art in client offline Graphic code is compared, and does not need to reuse private key for user to random number progress once signed, therefore also need not in code value generated Client public key is carried, that is, simplifies the generating process of off-line graphical code, also shortens the code value of off-line graphical code generated Length, so that the requirement to barcode scanning equipment is reduced, correspondingly, being identified as to graphic code for certain barcode scanning equipment can be improved Power shortens identification time-consuming.
Corresponding to the generation method for the off-line graphical code that this specification implementation example figure 1- embodiment illustrated in fig. 3 provides, it is based on Identical thinking, this specification embodiment provide a kind of generation method of off-line graphical code, are applied to graphic code presentation device, That is the executing subject of the method for this specification embodiment offer is graphic code presentation device, specifically, to be mounted on graphic code exhibition Show the generating means of the off-line graphical code in equipment.Fig. 4 is the generation method for the off-line graphical code that this specification embodiment provides Method flow diagram four, method shown in Fig. 4, include at least following steps:
Step 402, off-line graphical code acquisition request is sent to server;Wherein, in above-mentioned off-line graphical code acquisition request The identification information of user corresponding to graphic code presentation device is carried, so that off-line graphical code of the server based on user is matched Confidence breath generates the different random number of specified quantity according to the generating random number rule of setting, and for each random It counts, user information corresponding to the identification information to above-mentioned random number and user carries out signature processing, and signature is handled Code value of the signing messages as off-line graphical code;Wherein, above-mentioned configuration information is used to indicate the off-line graphical code for needing to generate Number, and the quantity of random number is equal with the number of off-line graphical code that needs generate;Above-mentioned code value is for generating off-line graphical Code.
In this specification embodiment, graphic code presentation device can be sending out to server according to setting cycle It is sent from line chart shape code acquisition request, is also possible under the trigger action of user ask to server transmission off-line graphical code acquisition It asks, can also be and send off-line graphical code acquisition request to server after detection reaches certain trigger condition, specifically, figure Shape code presentation device when to server send off-line graphical code acquisition request can according to practical application scene into Row setting, this specification embodiment are defined not to this.
Step 404, the code value for each off-line graphical code that server returns is received.
Wherein, above-mentioned steps 402, embodiment corresponding to the specific implementation process of each step and Fig. 1-Fig. 3 in step 404 Identical, therefore, the specific implementation process of above-mentioned each step can refer to embodiment corresponding to Fig. 1-Fig. 3, and details are not described herein again.
Specifically, in this specification embodiment, when graphic code presentation device receives the generated of server return After the code value of off-line graphical code, then the code of its currently stored remaining off-line graphical code is updated using the code value newly received Value.I.e. after the code value corresponding to each off-line graphical code for receiving server return, what this specification embodiment provided Method further includes following steps:
The code value of the off-line graphical code of current residual is deleted, and stores received each code value.
It should be noted that stored in graphic code presentation device be each off-line graphical code code value, only connecing After the displaying request for receiving the off-line graphical code of user's triggering, then corresponding off-line graphical code is generated based on the code value stored And it is shown.
In this specification embodiment, every time in the code value for receiving the newly-generated off-line graphical code that server issues Afterwards, then the code value of the off-line graphical code of current residual is deleted, the code value for each off-line graphical code being currently received only is stored, this Sample can place longer time in graphic code presentation device to avoid certain code values, improve the safety that off-line graphical code arrives.
In a specific embodiment, graphic code presentation device to server send off-line graphical code acquisition request it Before, the trigger condition for currently whether meeting and sending off-line graphical code acquisition request to server needed first to detect.Therefore, in this theory It is bright to be in embodiment, before executing above-mentioned steps 402, method that this specification embodiment provides, further includes:
When receiving the off-line graphical code displaying request of user's triggering, selected from the code value of the off-line graphical code of current residual A code value is taken to carry out the displaying of corresponding off-line graphical code, and whether the code value for detecting the off-line graphical code of current residual meets The acquisition condition of preset off-line graphical code.
In a specific embodiment, when user needs that authentication is paid or carried out using off-line graphical code When, then user opens corresponding off-line graphical code on graphic code presentation device, that is, sending to graphic code presentation device Off-line graphical code show request so that graphic code presentation device from its store current residual off-line graphical code code value in Machine chooses the displaying that a code value carries out off-line graphical code.Also, the code value for occurring remaining off-line graphical code in order to prevent is insufficient The case where generation, when each user shows off-line graphical code, graphic code presentation device is required to detection current residual Whether code value corresponding to off-line graphical code meets the acquisition condition of preset off-line graphical code.
Specifically, whether full detecting code value corresponding to the off-line graphical code of current residual in this specification embodiment The acquisition condition of the preset off-line graphical code of foot, specifically includes:
Whether the remaining number for detecting the code value of current residual is less than or equal to setting amount threshold;If above-mentioned residue number Less than or equal to setting amount threshold, it is determined that the code value of current residual meets the acquisition of preset off-line graphical code Condition;
Alternatively,
Whether the remaining term of validity for detecting the code value of current residual is less than or equal to setting time limit threshold value;If remaining effective Time limit is less than or equal to setting time limit threshold value, it is determined that the code value of current residual meets preset off-line graphical code Acquisition condition.
Wherein, above-mentioned setting amount threshold and setting time limit threshold value can be configured according to practical application scene, this theory Bright book embodiment is not defined the specific value of above-mentioned setting amount threshold and setting time limit threshold value.
In the specific implementation, one off-line graphical code of every displaying, then delete the off-line graphical from graphic code presentation device Code value corresponding to code chooses a code that is, in this specification embodiment from the code value of the off-line graphical code of current residual Value carries out after the displaying of corresponding off-line graphical code, it is also necessary to execute following steps:
From the code value that above-mentioned graphic code presentation device is stored, selected code value is deleted.
In this manner it is ensured that the code value stored in graphic code storage equipment will not be reused, user's property ensure that The safety of information.Therefore, with the use of off-line graphical code, the remaining number of the code value stored in graphic code presentation device It constantly reduces, and constantly updates the number record information of off-line graphical code recorded in graphic code presentation device, in this way, can Current remaining number is determined to be directly based upon the number record information of code value, in the remaining number of the code value of detection current residual It is whether small with or equal to when setting amount threshold, then off-line graphical code acquisition request is sent to server.
In addition, due to the term of validity information for being stored with currently stored code value in graphic code presentation device, it can With based on term of validity information, code value generation temporal information and current temporal information determine the code value residue effectively Deadline information.For ease of understanding, following to be illustrated citing.
For example, in a specific embodiment, the term of validity of code value corresponding to off-line graphical code is 72 hours, it should The code value of off-line graphical code is what server was generated at 21 days 13 December in 2018, and the current time is on December 22nd, 2018 When 14, then it can determine that the time experienced is 25 hours till now from the generation of code value, hence, it can be determined that going out the offline figure The remaining term of validity of shape code is 47 hours.Certainly, in the specific implementation, server can be by code value corresponding to off-line graphical code Pair the generation time be handed down to graphic code presentation device together, graphic code presentation device can also be received to what server issued Generation time of the time of code value as code value.
Fig. 5 is shown in five, Fig. 5 of the method flow diagram of the generation method for the off-line graphical code that this specification embodiment provides Method include at least following steps:
Step 502, when receiving the off-line graphical code displaying request of user's triggering, from the off-line graphical code institute of current residual The displaying that a code value carries out corresponding off-line graphical code is chosen in corresponding code value.
Step 504, whether the remaining number for detecting the code value of current residual is less than or equal to setting amount threshold, alternatively, Whether the remaining term of validity for detecting the code value of current residual is less than or equal to setting time limit threshold value;If so, thening follow the steps 506;Otherwise, terminate.
Step 506, off-line graphical code acquisition request is sent to server, wherein graphic code exhibition is carried in the request Show the identification information of user corresponding to equipment, so that configuration information of the server based on acquired off-line graphical code, according to The generating random number rule of setting generates the different random number of specified quantity, and is directed to each random number, to it is above-mentioned with User information corresponding to machine number and the identification information of user carries out signature processing, the signing messages that signature is handled as The code value of off-line graphical code;Wherein, above-mentioned configuration information is used to indicate the number for needing the off-line graphical code generated, and random number Quantity it is equal with the number of off-line graphical code that needs generate;Above-mentioned code value is for generating off-line graphical code.
Step 508, code value corresponding to each off-line graphical code that server returns is received.
Step 510, the code value of the off-line graphical code of current residual is deleted, and stores received each code value.
Specifically, choosing one in code value corresponding to the off-line graphical code from current residual in this specification embodiment A code value carries out the displaying of corresponding off-line graphical code, specifically comprises the following steps:
A code value is read from the code value of the off-line graphical code of current residual;Current temporal information is carried out at encryption Reason, obtained cipher-text information is embedded in the code value of reading;Corresponding off-line graphical code is generated simultaneously based on the code value after insertion It shows.
In the specific implementation, in order to shorten the length for encrypt to current temporal information obtained cipher-text information, Current temporal information can be encrypted using symmetric encipherment algorithm.
In addition, the above-mentioned cipher-text information that will be obtained is embedded in read code value, it can be and add above-mentioned cipher-text information It adds to behind read code value.
In this specification embodiment, read code value currently will be embedded in by the time that code value generates off-line graphical code In, so that the temporal information for being currently generated off-line graphical code is carried in off-line graphical code generated, is set convenient for barcode scanning For after scanning to the off-line graphical code, the generation temporal information based on the off-line graphical code detects whether the off-line graphical code is located In in term of validity, to further ensure the safety of off-line graphical code, the safety of user information has been ensured.
Fig. 6 is the six of the method flow diagram of the methods of exhibiting for the graphic code that this specification embodiment provides, side shown in fig. 6 Method includes at least following steps:
Step 602, when receiving the off-line graphical code displaying request of user's triggering, from the off-line graphical code institute of current residual A code value is chosen in corresponding code value.
Step 604, current temporal information is encrypted, obtained cipher-text information is added to read code Behind value.
Step 606, corresponding off-line graphical code is generated based on obtained code value after the above-mentioned cipher-text information of addition and shielded It is shown on curtain.
Step 608, whether the remaining number for detecting the code value of current residual is less than or equal to setting amount threshold, alternatively, Whether the remaining term of validity for detecting the code value of current residual is less than or equal to setting time limit threshold value;If so, thening follow the steps 610;Otherwise, terminate.
Step 610, off-line graphical code acquisition request is sent to server, wherein graphic code exhibition is carried in the request Show the identification information of user corresponding to equipment, so that configuration information of the server based on acquired off-line graphical code, according to The generating random number rule of setting generates the different random number of specified quantity, and is directed to each random number, to it is above-mentioned with User information corresponding to machine number and the identification information of user carries out signature processing, the signing messages that signature is handled as The code value of off-line graphical code;Wherein, above-mentioned configuration information is used to indicate the number for needing the off-line graphical code generated, and random number Quantity it is equal with the number of off-line graphical code that needs generate;The code value is for generating off-line graphical code.
Step 612, the code value for each off-line graphical code that server returns is received.
Step 614, the code value of the off-line graphical code of current residual is deleted, and stores received each code value.
The generation method for the off-line graphical code that this specification embodiment provides for ease of understanding, it is following to be shown with graphic code The method of this specification embodiment offer is provided for the interaction between equipment and server.Fig. 7 is that this specification embodiment mentions The exchange method flow chart of the generation method of the off-line graphical code of confession, method shown in Fig. 7 include at least following steps:
Step 702, when the off-line graphical code that graphic code presentation device receives user's triggering shows request, from current residual Off-line graphical code corresponding to a code value is chosen in code value.
Step 704, current temporal information is encrypted in graphic code presentation device, and obtained cipher-text information is added It adds to behind read code value.
Step 706, graphic code presentation device be based on adding obtained code value after above-mentioned cipher-text information generate it is corresponding from Line chart shape code is simultaneously shown on the screen.
Step 708, whether the remaining number of the code value of graphic code presentation device detection current residual is less than or equal to setting Amount threshold, alternatively, whether the remaining term of validity of the code value of detection current residual is less than or equal to setting time limit threshold value;If It is to then follow the steps 710;Otherwise, terminate.
Step 710, graphic code presentation device sends off-line graphical code acquisition request to server, wherein in the request Carry the identification information of user corresponding to the graphic code presentation device.
Step 712, server obtains the user in setting time length to offline according to the identification information of above-mentioned user The use information of graphic code.
Step 714, term of validity information of the server based on above-mentioned use information and off-line graphical code determines current need The number of the off-line graphical code of generation.
Step 716, server generates the number with the off-line graphical code that need to be generated according to the generating random number rule of setting Identical different random number, and obtain user information corresponding to the identification information of above-mentioned user.
Step 718, server is directed to each random number, carries out signature processing to above-mentioned random number and user information, will sign Code value of the signing messages that name processing obtains as off-line graphical code.
Step 720, server determines term of validity information corresponding to the code value of each off-line graphical code generated.
Step 722, above-mentioned term of validity information, the number of code value generated and each code value are handed down to figure by server Shape code presentation device.
Step 724, graphic code presentation device receives term of validity corresponding to each code value of server return, the code value The number of information and code value generated.
Step 726, graphic code presentation device delete term of validity information corresponding to the code value of current residual, the code value with And the record information of code value number, and store received each code value, the number of received code value and term of validity Information.
The generation method for the off-line graphical code that this specification embodiment provides generates off-line graphical code in server end, by The mechanism private key of the mechanism corresponding to the server is stored in server end, therefore, can when generating off-line graphical code Directly to be signed using mechanism private key to user information and random number;It only needs using mechanism private key to user information Code value corresponding to off-line graphical code can be generated by carrying out once signed with random number;With in the prior art client generate Off-line graphical code is compared, and does not need to reuse private key for user to random number progress once signed, therefore in code value generated Client public key need not be carried, that is, simplifies the generating process of off-line graphical code, also shortens off-line graphical code generated Code value length, so that the requirement to barcode scanning equipment is reduced, correspondingly, the knowledge to graphic code of certain barcode scanning equipment can be improved Other success rate shortens identification time-consuming.
Corresponding to the method that this specification Fig. 1-embodiment illustrated in fig. 3 provides, it is based on identical thinking, this specification is implemented Example provides a kind of generating means of off-line graphical code, is applied to server, for executing implementation shown in this specification Fig. 1-Fig. 3 The method that example provides, Fig. 8 be the generating means of off-line graphical code that this specification embodiment provides module composition schematic diagram it One, device shown in Fig. 8, comprising:
First receiving module 802, for receiving the off-line graphical code acquisition request of graphic code presentation device transmission;Wherein, The identification information of user corresponding to graphic code presentation device is carried in off-line graphical code acquisition request;
Generation module 804 is advised for the configuration information of the off-line graphical code based on user according to the generating random number of setting Then generate the different random number of specified quantity;Wherein, configuration information is used to indicate the off-line graphical code for needing to generate Number, and the quantity of random number is equal with the number of off-line graphical code that needs generate;
Signature blocks 806 are used for each random number, user information corresponding to the identification information to random number and user Signature processing is carried out, the signing messages that signature is handled is as code value corresponding to off-line graphical code;Wherein, above-mentioned code value For generating off-line graphical code.
Optionally, the device that this specification embodiment provides, further includes:
Module is obtained, for obtaining in setting time length user to the use information of off-line graphical code;Wherein, using letter Breath is used to indicate user to the frequency of use of off-line graphical code;
Determining module, for the term of validity information based on use information and off-line graphical code, determination currently needs to generate Off-line graphical code number, as configuration information.
Optionally, the device that this specification embodiment provides, further includes:
Module is issued, for the code value of each off-line graphical code to be handed down to graphic code presentation device.
Optionally, the device that this specification embodiment provides, further includes:
Second determining module, for determining term of validity information corresponding to the code value of off-line graphical code generated;
Correspondingly, above-mentioned issue module, comprising:
Issuance unit, for term of validity information, the number of off-line graphical code generated and code value to be handed down to figure Code presentation device.
The generating means of the off-line graphical code of this specification embodiment can also carry out the generation of off-line graphical code in Fig. 1-Fig. 3 The method that device executes, and the generating means for realizing off-line graphical code are no longer gone to live in the household of one's in-laws on getting married herein in Fig. 1-embodiment illustrated in fig. 3 function It states.
The generating means for the off-line graphical code that this specification embodiment provides generate off-line graphical code in server end, by The mechanism private key of the mechanism corresponding to the server is stored in server end, therefore, can when generating off-line graphical code Directly to be signed using mechanism private key to user information and random number;It only needs using mechanism private key to user information Code value corresponding to off-line graphical code can be generated by carrying out once signed with random number;With in the prior art client generate Off-line graphical code is compared, and does not need to reuse private key for user to random number progress once signed, therefore in code value generated Client public key need not be carried, that is, simplifies the generating process of off-line graphical code, also shortens off-line graphical code generated Code value length, so that the requirement to barcode scanning equipment is reduced, correspondingly, the knowledge to graphic code of certain barcode scanning equipment can be improved Other success rate shortens identification time-consuming.
Corresponding to the method that this specification Fig. 4-embodiment illustrated in fig. 7 provides, it is based on identical thinking, this specification is implemented Example provides a kind of generating means of off-line graphical code, is applied to graphic code presentation device, for executing this specification Fig. 4-Fig. 7 The method that illustrated embodiment provides, Fig. 9 are the module composition of the generating means for the off-line graphical code that this specification embodiment provides The two of schematic diagram, device shown in Fig. 9, comprising:
Sending module 902, for sending off-line graphical code acquisition request to server;Wherein, off-line graphical code acquisition is asked The identification information for carrying user corresponding to graphic code presentation device is sought, so that off-line graphical code of the server based on user Configuration information, generate the different random number of specified quantity according to the generating random number rule of setting, and for each Random number, user information corresponding to the identification information to random number and user carry out signature processing, signature are handled Signing messages is as code value corresponding to off-line graphical code;Wherein, configuration information is used to indicate the off-line graphical code for needing to generate Number, and the quantity of random number is equal with the number of off-line graphical code that needs generate;Above-mentioned code value is for generating offline figure Shape code;
Second receiving module 904, the code value of each off-line graphical code for receiving server return.
Optionally, the device that this specification embodiment provides, further includes:
Display module, when the off-line graphical code for receiving user's triggering shows request, from the offline figure of current residual The displaying that a code value carries out corresponding off-line graphical code is chosen in the code value of shape code;
Detection module, for detecting whether the code value of off-line graphical code of current residual meets preset off-line graphical The acquisition condition of code.
Optionally, above-mentioned detection module, comprising:
First detection unit, for detecting whether the remaining number of code value of current residual is less than or equal to setting quantity threshold Value;If remaining number is less than or equal to setting amount threshold, it is determined that the code value of current residual meets preset offline figure The acquisition condition of shape code;
Alternatively,
Second detection unit, for detecting whether the remaining term of validity of code value of current residual is less than or equal to the setting phase Limit threshold value;If remaining term of validity is less than or equal to setting time limit threshold value, it is determined that the code value satisfaction of current residual is preset Off-line graphical code acquisition condition.
Optionally, the device that this specification embodiment provides, further includes:
Second removing module, the code value of the off-line graphical code for deleting current residual;
Memory module, for storing received each code value.
Optionally, above-mentioned display module, comprising:
Reading unit, for reading a code value from the code value of the off-line graphical code of current residual;
Obtained cipher-text information is embedded in reading for current temporal information to be encrypted by encryption unit Code value in;
Generation unit, for generating corresponding off-line graphical code based on the code value after insertion and showing.
Optionally, the device that this specification embodiment provides, further includes:
First removing module, for from the code value that graphic code presentation device is stored, deleting selected code value.
The generating means of the off-line graphical code of this specification embodiment can also carry out the generation of off-line graphical code in Fig. 4-Fig. 7 The method that device executes, and the generating means for realizing off-line graphical code are no longer gone to live in the household of one's in-laws on getting married herein in Fig. 4-embodiment illustrated in fig. 7 function It states.
The generating means for the off-line graphical code that this specification embodiment provides generate off-line graphical code in server end, by The mechanism private key of the mechanism corresponding to the server is stored in server end, therefore, can when generating off-line graphical code Directly to be signed using mechanism private key to user information and random number;It only needs using mechanism private key to user information Code value corresponding to off-line graphical code can be generated by carrying out once signed with random number;With in the prior art client generate Off-line graphical code is compared, and does not need to reuse private key for user to random number progress once signed, therefore in code value generated Client public key need not be carried, that is, simplifies the generating process of off-line graphical code, also shortens off-line graphical code generated Code value length, so that the requirement to barcode scanning equipment is reduced, correspondingly, the knowledge to graphic code of certain barcode scanning equipment can be improved Other success rate shortens identification time-consuming.
Further, based on above-mentioned Fig. 1 to method shown in Fig. 3, this specification embodiment additionally provides a kind of offline figure The generating device of shape code is applied to server, as shown in Figure 10.
The generating device of off-line graphical code can generate bigger difference because configuration or performance are different, may include one Or more than one processor 1001 and memory 1002, it can store one or more storages in memory 1002 and answered With program or data.Wherein, memory 1002 can be of short duration storage or persistent storage.It is stored in the application journey of memory 1002 Sequence may include one or more modules (diagram is not shown), and each module may include setting to the generation of off-line graphical code Series of computation machine executable instruction information in standby.Further, processor 1001 can be set to and memory 1002 Communication executes the series of computation machine executable instruction information in memory 1002 in the generating device of off-line graphical code.From The generating device of line chart shape code can also include one or more power supplys 1003, one or more wired or wireless nets Network interface 1004, one or more input/output interfaces 1005, one or more keyboards 1006 etc..
In a specific embodiment, the generating device of off-line graphical code includes memory and one or one Above program, perhaps more than one program is stored in memory and one or more than one program can be with for one of them Including one or more modules, and each module may include the series of computation in generating device to off-line graphical code Machine executable instruction information, and be configured to execute this or more than one program by one or more than one processor Comprising for carrying out following computer executable instructions information:
Receive the off-line graphical code acquisition request that graphic code presentation device is sent;Wherein, in off-line graphical code acquisition request Carry the identification information of user corresponding to graphic code presentation device;
The configuration information of off-line graphical code based on user generates specified quantity according to the generating random number rule of setting Different random number;Wherein, configuration information is used to indicate the number for needing the off-line graphical code generated, and the number of random number It measures equal with the number of off-line graphical code for needing to generate;
For each random number, user information corresponding to the identification information to random number and user carries out signature processing, The signing messages that signature is handled is as the code value of off-line graphical code;Wherein, the code value is for generating off-line graphical code.
Optionally, computer executable instructions information when executed, the configuration information of the off-line graphical code based on user, Before generating the different random number of specified quantity according to the generating random number rule of setting, following step can also be performed It is rapid:
Use information of the user to off-line graphical code in acquisition setting time length;Wherein, use information is used to indicate use Frequency of use of the family to off-line graphical code;
Term of validity information based on use information and off-line graphical code determines the off-line graphical code for currently needing to generate Number, as configuration information.
Optionally, computer executable instructions information when executed, for each random number, to random number and user User information corresponding to identification information carries out signature processing, and the signing messages that signature is handled is as off-line graphical code After code value, it can also carry out following steps:
The code value of each off-line graphical code is handed down to graphic code presentation device.
Optionally, the code value of each off-line graphical code when executed, is handed down to figure by computer executable instructions information Before shape code presentation device, following steps can also be performed:
Determine term of validity information corresponding to the code value of off-line graphical code generated;
Correspondingly, the code value of each off-line graphical code is handed down to graphic code presentation device, comprising:
Term of validity information, the number of off-line graphical code generated and code value are handed down to graphic code presentation device.
The generating device for the off-line graphical code that this specification embodiment provides generates off-line graphical code in server end, by The mechanism private key of the mechanism corresponding to the server is stored in server end, therefore, can when generating off-line graphical code Directly to be signed using mechanism private key to user information and random number;It only needs using mechanism private key to user information Code value corresponding to off-line graphical code can be generated by carrying out once signed with random number;With in the prior art client generate Off-line graphical code is compared, and does not need to reuse private key for user to random number progress once signed, therefore in code value generated Client public key need not be carried, that is, simplifies the generating process of off-line graphical code, also shortens off-line graphical code generated Code value length, so that the requirement to barcode scanning equipment is reduced, correspondingly, the knowledge to graphic code of certain barcode scanning equipment can be improved Other success rate shortens identification time-consuming.
Further, based on above-mentioned Fig. 4 to method shown in Fig. 7, this specification embodiment additionally provides a kind of offline figure The generating device of shape code is applied to graphic code presentation device, as shown in Figure 10.
In a specific embodiment, the generating device of off-line graphical code includes memory and one or one Above program, perhaps more than one program is stored in memory and one or more than one program can be with for one of them Including one or more modules, and each module may include the series of computation in generating device to off-line graphical code Machine executable instruction information, and be configured to execute this or more than one program by one or more than one processor Comprising for carrying out following computer executable instructions information:
Off-line graphical code acquisition request is sent to server;Wherein, graphic code is carried in off-line graphical code acquisition request The identification information of user corresponding to presentation device, so that the configuration information of off-line graphical code of the server based on user, according to The generating random number rule of setting generates the different random number of specified quantity, and is directed to each random number, to random number User information corresponding to identification information with user carries out signature processing, and the signing messages that signature is handled is as offline The code value of graphic code;Wherein, configuration information is used to indicate the number of off-line graphical code for needing to generate, and the quantity of random number with The number for the off-line graphical code for needing to generate is equal;The code value is for generating off-line graphical code;
Receive the code value for each off-line graphical code that server returns.
Optionally, computer executable instructions information when executed, sends off-line graphical code acquisition request to server Before, following steps can also be performed:
When receiving the off-line graphical code displaying request of user's triggering, selected from the code value of the off-line graphical code of current residual A code value is taken to carry out the displaying of corresponding off-line graphical code, and whether the code value for detecting the off-line graphical code of current residual meets The acquisition condition of preset off-line graphical code.
Optionally, computer executable instructions information when executed, detects the code value of the off-line graphical code of current residual Whether the acquisition condition of preset off-line graphical code is met, comprising:
Whether the remaining number for detecting the code value of current residual is less than or equal to setting amount threshold;If remaining number is less than Or it is equal to setting amount threshold, it is determined that the code value of current residual meets the acquisition condition of preset off-line graphical code;
Alternatively,
Whether the remaining term of validity for detecting the code value of current residual is less than or equal to setting time limit threshold value;If remaining effective Time limit is less than or equal to setting time limit threshold value, it is determined that the code value of current residual meets the acquisition of preset off-line graphical code Condition.
Optionally, computer executable instructions information when executed, receives each off-line graphical code that server returns Code value after, can also carry out following steps:
The code value of the off-line graphical code of current residual is deleted, and stores received each code value.
Optionally, computer executable instructions information when executed, from the code value of the off-line graphical code of current residual Choose the displaying that a code value carries out corresponding off-line graphical code, comprising:
A code value is read from the code value of the off-line graphical code of current residual;
Current temporal information is encrypted, obtained cipher-text information is embedded in the code value of reading;
Corresponding off-line graphical code is generated based on the code value after insertion and is shown.
Optionally, computer executable instructions information when executed, from the code value of the off-line graphical code of current residual After choosing the displaying that a code value carries out corresponding off-line graphical code, it can also carry out following steps:
From the code value that graphic code presentation device is stored, selected code value is deleted.
The generating device for the off-line graphical code that this specification embodiment provides generates off-line graphical code in server end, by The mechanism private key of the mechanism corresponding to the server is stored in server end, therefore, can when generating off-line graphical code Directly to be signed using mechanism private key to user information and random number;It only needs using mechanism private key to user information Code value corresponding to off-line graphical code can be generated by carrying out once signed with random number;With in the prior art client generate Off-line graphical code is compared, and does not need to reuse private key for user to random number progress once signed, therefore in code value generated Client public key need not be carried, that is, simplifies the generating process of off-line graphical code, also shortens off-line graphical code generated Code value length, so that the requirement to barcode scanning equipment is reduced, correspondingly, the knowledge to graphic code of certain barcode scanning equipment can be improved Other success rate shortens identification time-consuming.
Further, based on above-mentioned Fig. 1 to method shown in Fig. 3, this specification embodiment additionally provides a kind of storage Jie Matter, for storing computer executable instructions information, in a kind of specific embodiment, the storage medium can for USB flash disk, CD, Hard disk etc., the computer executable instructions information of storage medium storage are able to achieve following below scheme when being executed by processor:
Receive the off-line graphical code acquisition request that graphic code presentation device is sent;Wherein, in off-line graphical code acquisition request Carry the identification information of user corresponding to graphic code presentation device;
The configuration information of off-line graphical code based on user generates specified quantity according to the generating random number rule of setting Different random number;Wherein, configuration information is used to indicate the number for needing the off-line graphical code generated, and the number of random number It measures equal with the number of off-line graphical code for needing to generate;
For each random number, user information corresponding to the identification information to random number and user carries out signature processing, The signing messages that signature is handled is as the code value of off-line graphical code;Wherein, the code value is for generating off-line graphical code.
Optionally, the computer executable instructions information of storage medium storage is based on user when being executed by processor Off-line graphical code configuration information, generate the different random number of specified quantity according to the generating random number rule of setting Before, following steps can also be performed:
Use information of the user to off-line graphical code in acquisition setting time length;Wherein, use information is used to indicate use Frequency of use of the family to off-line graphical code;
Term of validity information based on use information and off-line graphical code determines the off-line graphical code for currently needing to generate Number, as configuration information.
Optionally, the computer executable instructions information of storage medium storage is when being executed by processor, for each Random number, user information corresponding to the identification information to random number and user carry out signature processing, signature are handled After code value of the signing messages as off-line graphical code, it can also carry out following steps:
The code value of each off-line graphical code is handed down to graphic code presentation device.
Optionally, the storage medium storage computer executable instructions information when being executed by processor, will each from The code value of line chart shape code is handed down to before graphic code presentation device, and following steps can also be performed:
Determine term of validity information corresponding to the code value of off-line graphical code generated;
Correspondingly, the code value of each off-line graphical code is handed down to graphic code presentation device, comprising:
Term of validity information, the number of off-line graphical code generated and code value are handed down to graphic code presentation device.
The computer executable instructions information for the storage medium storage that this specification embodiment provides is being executed by processor When, off-line graphical code is generated in server end, the mechanism private key of the mechanism as corresponding to the server is carried out in server end Storage, therefore, when generating off-line graphical code, can directly sign user information and random number using mechanism private key Name;It is right only to need that off-line graphical code institute can be generated to user information and random number progress once signed using mechanism private key The code value answered;With in the prior art client generate off-line graphical code compared with, do not need to reuse private key for user to random number Once signed is carried out, therefore need not also carry client public key in code value generated, that is, simplifies the generation of off-line graphical code Process, also shortens the code value length of off-line graphical code generated, so that the requirement to barcode scanning equipment is reduced, correspondingly, The time-consuming to the recognition success rate of graphic code, shortening identification of certain barcode scanning equipment can be improved.
Further, based on above-mentioned Fig. 4 to method shown in Fig. 7, this specification embodiment additionally provides a kind of storage Jie Matter, for storing computer executable instructions information, in a kind of specific embodiment, the storage medium can for USB flash disk, CD, Hard disk etc., the computer executable instructions information of storage medium storage are able to achieve following below scheme when being executed by processor:
Off-line graphical code acquisition request is sent to server;Wherein, graphic code is carried in off-line graphical code acquisition request The identification information of user corresponding to presentation device, so that the configuration information of off-line graphical code of the server based on user, according to The generating random number rule of setting generates the different random number of specified quantity, and is directed to each random number, to random number User information corresponding to identification information with user carries out signature processing, and the signing messages that signature is handled is as offline The code value of graphic code;Wherein, configuration information is used to indicate the number of off-line graphical code for needing to generate, and the quantity of random number with The number for the off-line graphical code for needing to generate is equal;The code value is for generating off-line graphical code;
Receive the code value for each off-line graphical code that server returns.
Optionally, the computer executable instructions information of storage medium storage is when being executed by processor, to server Before sending off-line graphical code acquisition request, following steps can also be performed:
When receiving the off-line graphical code displaying request of user's triggering, selected from the code value of the off-line graphical code of current residual A code value is taken to carry out the displaying of corresponding off-line graphical code, and whether the code value for detecting the off-line graphical code of current residual meets The acquisition condition of preset off-line graphical code.
Optionally, for the computer executable instructions information of storage medium storage when being executed by processor, detection is current Whether the code value of remaining off-line graphical code meets the acquisition condition of preset off-line graphical code, comprising:
Whether the remaining number for detecting the code value of current residual is less than or equal to setting amount threshold;If remaining number is less than Or it is equal to setting amount threshold, it is determined that the code value of current residual meets the acquisition condition of preset off-line graphical code;
Alternatively,
Whether the remaining term of validity for detecting the code value of current residual is less than or equal to setting time limit threshold value;If remaining effective Time limit is less than or equal to setting time limit threshold value, it is determined that the code value of current residual meets the acquisition of preset off-line graphical code Condition.
Optionally, the computer executable instructions information of storage medium storage receives service when being executed by processor After the code value for each off-line graphical code that device returns, it can also carry out following steps:
The code value of the off-line graphical code of current residual is deleted, and stores received each code value.
Optionally, the computer executable instructions information of storage medium storage is remained when being executed by processor from current The displaying that a code value carries out corresponding off-line graphical code is chosen in the code value of remaining off-line graphical code, comprising:
A code value is read from the code value of the off-line graphical code of current residual;
Current temporal information is encrypted, obtained cipher-text information is embedded in the code value of reading;
Corresponding off-line graphical code is generated based on the code value after insertion and is shown.
Optionally, the computer executable instructions information of storage medium storage is remained when being executed by processor from current After choosing the displaying that a code value carries out corresponding off-line graphical code in the code value of remaining off-line graphical code, it can also carry out as follows Step:
From the code value that graphic code presentation device is stored, selected code value is deleted.
The generating device for the off-line graphical code that this specification embodiment provides generates off-line graphical code in server end, by The mechanism private key of the mechanism corresponding to the server is stored in server end, therefore, can when generating off-line graphical code Directly to be signed using mechanism private key to user information and random number;It only needs using mechanism private key to user information Code value corresponding to off-line graphical code can be generated by carrying out once signed with random number;With in the prior art client generate Off-line graphical code is compared, and does not need to reuse private key for user to random number progress once signed, therefore in code value generated Client public key need not be carried, that is, simplifies the generating process of off-line graphical code, also shortens off-line graphical code generated Code value length, so that the requirement to barcode scanning equipment is reduced, correspondingly, the knowledge to graphic code of certain barcode scanning equipment can be improved Other success rate shortens identification time-consuming.
In the 1990s, the improvement of a technology can be distinguished clearly be on hardware improvement (for example, Improvement to circuit structures such as diode, transistor, switches) or software on improvement (improvement for method flow).So And with the development of technology, the improvement of current many method flows can be considered as directly improving for hardware circuit. Designer nearly all obtains corresponding hardware circuit by the way that improved method flow to be programmed into hardware circuit.Cause This, it cannot be said that the improvement of a method flow cannot be realized with hardware entities module.For example, programmable logic device (Programmable Logic Device, PLD) (such as field programmable gate array (Field Programmable Gate Array, FPGA)) it is exactly such a integrated circuit, logic function determines device programming by user.By designer Voluntarily programming comes a digital display circuit " integrated " on a piece of PLD, designs and makes without asking chip maker Dedicated IC chip.Moreover, nowadays, substitution manually makes IC chip, this programming is also used instead mostly " is patrolled Volume compiler (logic compiler) " software realizes that software compiler used is similar when it writes with program development, And the source code before compiling also write by handy specific programming language, this is referred to as hardware description language (Hardware Description Language, HDL), and HDL is also not only a kind of, but there are many kind, such as ABEL (Advanced Boolean Expression Language)、AHDL(Altera Hardware Description Language)、Confluence、CUPL(Cornell University Programming Language)、HDCal、JHDL (Java Hardware Description Language)、Lava、Lola、MyHDL、PALASM、RHDL(Ruby Hardware Description Language) etc., VHDL (Very-High-Speed is most generally used at present Integrated Circuit Hardware Description Language) and Verilog.Those skilled in the art also answer This understands, it is only necessary to method flow slightly programming in logic and is programmed into integrated circuit with above-mentioned several hardware description languages, The hardware circuit for realizing the logical method process can be readily available.
Controller can be implemented in any suitable manner, for example, controller can take such as microprocessor or processing The computer for the computer readable program code (such as software or firmware) that device and storage can be executed by (micro-) processor can Read medium, logic gate, switch, specific integrated circuit (Application Specific Integrated Circuit, ASIC), the form of programmable logic controller (PLC) and insertion microcontroller, the example of controller includes but is not limited to following microcontroller Device: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20 and Silicone Labs C8051F320 are deposited Memory controller is also implemented as a part of the control logic of memory.It is also known in the art that in addition to Pure computer readable program code mode is realized other than controller, can be made completely by the way that method and step is carried out programming in logic Controller is obtained to come in fact in the form of logic gate, switch, specific integrated circuit, programmable logic controller (PLC) and insertion microcontroller etc. Existing identical function.Therefore this controller is considered a kind of hardware component, and to including for realizing various in it The device of function can also be considered as the structure in hardware component.Or even, it can will be regarded for realizing the device of various functions For either the software module of implementation method can be the structure in hardware component again.
System, device, module or the unit that above-described embodiment illustrates can specifically realize by computer chip or entity, Or it is realized by the product with certain function.It is a kind of typically to realize that equipment is computer.Specifically, computer for example may be used Think personal computer, laptop computer, cellular phone, camera phone, smart phone, personal digital assistant, media play It is any in device, navigation equipment, electronic mail equipment, game console, tablet computer, wearable device or these equipment The combination of equipment.
For convenience of description, it is divided into various units when description apparatus above with function to describe respectively.Certainly, implementing this The function of each unit can be realized in the same or multiple software and or hardware when application.
It should be understood by those skilled in the art that, embodiments herein can provide as method, system or computer program Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the application Apply the form of example.Moreover, it wherein includes the computer of computer usable program code that the application, which can be used in one or more, The computer program implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) produces The form of product.
The application is reference according to the method for this specification embodiment, the stream of equipment (system) and computer program product Journey figure and/or block diagram describe.It should be understood that can be by computer program instructions information realization flowchart and/or the block diagram The combination of process and/or box in each flow and/or block and flowchart and/or the block diagram.It can provide these calculating Machine program instruction information is to general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices Processor is to generate a machine, so that the instruction executed by computer or the processor of other programmable data processing devices Information generates specifies for realizing in one or more flows of the flowchart and/or one or more blocks of the block diagram Function device.
These computer program instructions information, which may also be stored in, is able to guide computer or other programmable data processing devices In computer-readable memory operate in a specific manner, so that command information stored in the computer readable memory produces Raw includes the manufacture of command information device, the command information device realize in one or more flows of the flowchart and/or The function of being specified in one or more blocks of the block diagram.
These computer program instructions information also can be loaded onto a computer or other programmable data processing device, so that Series of operation steps are executed on a computer or other programmable device to generate computer implemented processing, thus calculating The command information that is executed on machine or other programmable devices provide for realizing in one or more flows of the flowchart and/or The step of function of being specified in one or more blocks of the block diagram.
In a typical configuration, calculating equipment includes one or more processors (CPU), input/output interface, net Network interface and memory.
Memory may include the non-volatile memory in computer-readable medium, random access memory (RAM) and/or The forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flash RAM).Memory is computer-readable medium Example.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method Or technology come realize information store.Information can be computer-readable instruction information, data structure, the module of program or other numbers According to.The example of the storage medium of computer includes, but are not limited to phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory techniques, CD-ROM are read-only Memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, tape magnetic disk storage or Other magnetic storage devices or any other non-transmission medium, can be used for storage can be accessed by a computing device information.According to Herein defines, and computer-readable medium does not include temporary computer readable media (transitory media), such as modulation Data-signal and carrier wave.
It should also be noted that, the terms "include", "comprise" or its any other variant are intended to nonexcludability It include so that the process, method, commodity or the equipment that include a series of elements not only include those elements, but also to wrap Include other elements that are not explicitly listed, or further include for this process, method, commodity or equipment intrinsic want Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including described want There is also other identical elements in the process, method of element, commodity or equipment.
It will be understood by those skilled in the art that embodiments herein can provide as method, system or computer program product. Therefore, complete hardware embodiment, complete software embodiment or embodiment combining software and hardware aspects can be used in the application Form.It is deposited moreover, the application can be used to can be used in the computer that one or more wherein includes computer usable program code The shape for the computer program product implemented on storage media (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) Formula.
The application can computer executable instructions information it is general up and down described in the text, such as Program module.Generally, program module include routines performing specific tasks or implementing specific abstract data types, it is program, right As, component, data structure etc..The application can also be practiced in a distributed computing environment, in these distributed computing environment In, by executing task by the connected remote processing devices of communication network.In a distributed computing environment, program module It can be located in the local and remote computer storage media including storage equipment.
All the embodiments in this specification are described in a progressive manner, same and similar portion between each embodiment Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for system reality For applying example, since it is substantially similar to the method embodiment, so being described relatively simple, related place is referring to embodiment of the method Part explanation.
The above description is only an example of the present application, is not intended to limit this application.For those skilled in the art For, various changes and changes are possible in this application.All any modifications made within the spirit and principles of the present application are equal Replacement, improvement etc., should be included within the scope of the claims of this application.

Claims (20)

1. a kind of generation method of off-line graphical code is applied to server, which comprises
Receive the off-line graphical code acquisition request that graphic code presentation device is sent;Wherein, in the off-line graphical code acquisition request Carry the identification information of user corresponding to the graphic code presentation device;
The configuration information of off-line graphical code based on the user generates specified quantity according to the generating random number rule of setting Different random number;Wherein, the configuration information is used to indicate the number for needing the off-line graphical code generated, and institute It states the quantity of random number and the number of the off-line graphical code that needs generate is equal;
For each random number, user information corresponding to the identification information to the random number and the user is signed Name processing, the signing messages that signature is handled is as the code value of the off-line graphical code;Wherein, the code value is for generating The off-line graphical code.
2. the method as described in claim 1, the configuration information of the off-line graphical code based on the user, according to setting Before generating random number rule generates the different random number of specified quantity, the method also includes:
Use information of the user to the off-line graphical code in acquisition setting time length;Wherein, the use information is used In the instruction user to the frequency of use of the off-line graphical code;
Term of validity information based on the use information and the off-line graphical code determines that currently needs generate described offline The number of graphic code, as the configuration information.
3. it is method according to claim 1 or 2, it is described to be directed to each random number, to the random number and the user Identification information corresponding to user information carry out signature processing, the signing messages that signature is handled is as the offline figure After the code value of shape code, the method also includes:
The code value of each off-line graphical code is handed down to the graphic code presentation device.
4. method as claimed in claim 3, the code value by each off-line graphical code is handed down to the graphic code exhibition Before showing equipment, the method also includes:
Determine term of validity information corresponding to the code value of the off-line graphical code generated;
Correspondingly, the code value by each off-line graphical code is handed down to the graphic code presentation device, comprising:
The term of validity information, the number of the off-line graphical code generated and the code value are handed down to the graphic code Presentation device.
5. a kind of generation method of off-line graphical code is applied to graphic code presentation device, which comprises
Off-line graphical code acquisition request is sent to server;Wherein, the figure is carried in the off-line graphical code acquisition request The identification information of user corresponding to shape code presentation device, so that off-line graphical code of the server based on the user is matched Confidence breath generates the different random number of specified quantity according to the generating random number rule of setting, and for each described Random number, user information corresponding to the identification information to the random number and the user carries out signature processing, at signature Manage code value of the obtained signing messages as the off-line graphical code;Wherein, the configuration information is used to indicate what needs generated The number of the off-line graphical code, and the quantity of the random number is equal with the number of the off-line graphical code that needs generate; The code value is for generating the off-line graphical code;
Receive the code value of each of the server return off-line graphical code.
6. method as claimed in claim 5, it is described send off-line graphical code acquisition request to server before, the method is also Include:
When receiving the off-line graphical code displaying request of user's triggering, one is chosen from the code value of the off-line graphical code of current residual A code value carries out the displaying of the corresponding off-line graphical code, and detect current residual the off-line graphical code code value whether Meet the acquisition condition of preset off-line graphical code.
7. method as claimed in claim 6, whether the code value of the off-line graphical code of the detection current residual meets pre- The acquisition condition of the off-line graphical code first set, comprising:
Whether the remaining number for detecting the code value of current residual is less than or equal to setting amount threshold;If the residue number Less than or equal to the setting amount threshold, it is determined that the code value of current residual meets preset off-line graphical code Acquisition condition;Alternatively,
Whether the remaining term of validity for detecting the code value of current residual is less than or equal to setting time limit threshold value, if the residue Term of validity is less than or equal to setting time limit threshold value, it is determined that the code value of current residual meets preset off-line graphical The acquisition condition of code.
8. described to receive each of the server return off-line graphical such as the described in any item methods of claim 5-7 After the code value of code, the method also includes:
The code value of the off-line graphical code of current residual is deleted, and stores received each code value.
9. method as claimed in claim 6, it is described from the code value of the off-line graphical code of current residual choose a code value into The displaying of the corresponding off-line graphical code of row, comprising:
A code value is read from the code value of the off-line graphical code of current residual;
Current temporal information is encrypted, obtained cipher-text information is embedded in the code value of reading;
Corresponding off-line graphical code is generated based on the code value after insertion and is shown.
10. method as claimed in claim 6, it is described from the code value of the off-line graphical code of current residual choose a code value into After the displaying of the corresponding off-line graphical code of row, the method also includes:
From the code value that the graphic code presentation device is stored, the selected code value is deleted.
11. a kind of generating means of off-line graphical code, are applied to server, described device includes:
First receiving module, for receiving the off-line graphical code acquisition request of graphic code presentation device transmission;Wherein, described offline The identification information of user corresponding to the graphic code presentation device is carried in graphic code acquisition request;
Generation module, for the configuration information of the off-line graphical code based on the user, according to the generating random number rule of setting Generate the different random number of specified quantity;Wherein, the configuration information is used to indicate the offline figure for needing to generate The number of shape code, and the quantity of the random number is equal with the number of the off-line graphical code that needs generate;
Signature blocks are used for each random number, use corresponding to the identification information to the random number and the user Family information carries out signature processing, and the signing messages that signature is handled is as the code value of the off-line graphical code;Wherein, described Code value is for generating the off-line graphical code.
12. device as claimed in claim 11, described device further include:
Module is obtained, for obtaining in setting time length the user to the use information of the off-line graphical code;Wherein, institute It states use information and is used to indicate the user to the frequency of use of the off-line graphical code;
First determining module determines current for the term of validity information based on the use information and the off-line graphical code The number for the off-line graphical code for needing to generate, as the configuration information.
13. a kind of generating means of off-line graphical code, are applied to graphic code presentation device, described device includes:
Sending module, for sending off-line graphical code acquisition request to server;Wherein, in the off-line graphical code acquisition request Carry the identification information of user corresponding to the graphic code presentation device so that the server based on the user from The configuration information of line chart shape code generates the different random number of specified quantity according to the generating random number rule of setting, and For each random number, user information corresponding to the identification information to the random number and the user is carried out at signature Reason, the signing messages that signature is handled is as the code value of the off-line graphical code;Wherein, the configuration information is used to indicate The number for the off-line graphical code for needing to generate, and the off-line graphical code that generates of the quantity of the random number and needs Number is equal;The code value is for generating the off-line graphical code;
Second receiving module, for receiving the code value of each of the server return off-line graphical code.
14. device as claimed in claim 13, described device further include:
Display module, when the off-line graphical code for receiving user's triggering shows request, from the off-line graphical code of current residual The displaying that a code value carries out the corresponding off-line graphical code is chosen in corresponding code value;
Detection module, for detect code value corresponding to the off-line graphical code of current residual whether meet it is preset from The acquisition condition of line chart shape code.
15. device as claimed in claim 14, the display module, comprising:
Reading unit, for reading a code value in code value corresponding to the off-line graphical code from current residual;
Obtained cipher-text information is embedded in the institute of reading for current temporal information to be encrypted by encryption unit It states in code value;
Generation unit, for generating corresponding off-line graphical code based on the code value after insertion and showing.
16. device as claimed in claim 14, described device further include:
First removing module, for from the code value that the graphic code presentation device is stored, deleting the selected code value.
17. a kind of generating device of off-line graphical code is applied to server, comprising:
Processor;And
It is arranged to the memory of storage computer executable instructions, the executable instruction makes the processing when executed Device:
Receive the off-line graphical code acquisition request that graphic code presentation device is sent;Wherein, in the off-line graphical code acquisition request Carry the identification information of user corresponding to the graphic code presentation device;
The configuration information of off-line graphical code based on the user generates specified quantity according to the generating random number rule of setting Different random number;Wherein, the configuration information is used to indicate the number for needing the off-line graphical code generated, and institute It states the quantity of random number and the number of the off-line graphical code that needs generate is equal;
For each random number, user information corresponding to the identification information to the random number and the user is signed Name processing, the signing messages that signature is handled is as the code value of the off-line graphical code;Wherein, the code value is for generating The off-line graphical code.
18. a kind of generating device of off-line graphical code is applied to graphic code presentation device, comprising:
Processor;And
It is arranged to the memory of storage computer executable instructions, the executable instruction makes the processing when executed Device:
Off-line graphical code acquisition request is sent to server;Wherein, the figure is carried in the off-line graphical code acquisition request The identification information of user corresponding to shape code presentation device, so that off-line graphical code of the server based on the user is matched Confidence breath generates the different random number of specified quantity according to the generating random number rule of setting, and for each described Random number, user information corresponding to the identification information to the random number and the user carries out signature processing, at signature Obtained signing messages is managed as code value corresponding to the off-line graphical code;Wherein, the configuration information is used to indicate needs The number of the off-line graphical code generated, and the number of the off-line graphical code that the quantity of the random number and needs generate It is equal;The code value is for generating the off-line graphical code;
Receive code value corresponding to each of the server return off-line graphical code.
19. a kind of storage medium, for storing computer executable instructions, the executable instruction is realized following when executed Process:
Receive the off-line graphical code acquisition request that graphic code presentation device is sent;Wherein, in the off-line graphical code acquisition request Carry the identification information of user corresponding to the graphic code presentation device;
The configuration information of off-line graphical code based on the user generates specified quantity according to the generating random number rule of setting Different random number;Wherein, the configuration information is used to indicate the number for needing the off-line graphical code generated, and institute It states the quantity of random number and the number of the off-line graphical code that needs generate is equal;
For each random number, user information corresponding to the identification information to the random number and the user is signed Name processing, the signing messages that signature is handled is as the code value of the off-line graphical code;Wherein, the code value is for generating The off-line graphical code.
20. a kind of storage medium, for storing computer executable instructions, the executable instruction is realized following when executed Process:
Off-line graphical code acquisition request is sent to server;Wherein, the figure is carried in the off-line graphical code acquisition request The identification information of user corresponding to shape code presentation device, so that off-line graphical code of the server based on the user is matched Confidence breath generates the different random number of specified quantity according to the generating random number rule of setting, and for each described Random number, the mechanism private key stored using the server are right to the identification information institute of the random number and the user respectively The user information answered carries out signature processing, and the signing messages that signature is handled is as the code value of the off-line graphical code;Its In, the configuration information is used to indicate the number for needing the off-line graphical code generated, and the quantity of the random number and need The number for the off-line graphical code to be generated is equal;The code value is for generating the off-line graphical code;
Receive code value corresponding to each of the server return off-line graphical code.
CN201910478067.9A 2019-06-03 2019-06-03 Method and device for generating offline graphic code Active CN110334794B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201910478067.9A CN110334794B (en) 2019-06-03 2019-06-03 Method and device for generating offline graphic code
CN202211460889.2A CN115759160A (en) 2019-06-03 2019-06-03 Method and device for generating offline graphic code

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910478067.9A CN110334794B (en) 2019-06-03 2019-06-03 Method and device for generating offline graphic code

Related Child Applications (1)

Application Number Title Priority Date Filing Date
CN202211460889.2A Division CN115759160A (en) 2019-06-03 2019-06-03 Method and device for generating offline graphic code

Publications (2)

Publication Number Publication Date
CN110334794A true CN110334794A (en) 2019-10-15
CN110334794B CN110334794B (en) 2023-01-17

Family

ID=68141187

Family Applications (2)

Application Number Title Priority Date Filing Date
CN201910478067.9A Active CN110334794B (en) 2019-06-03 2019-06-03 Method and device for generating offline graphic code
CN202211460889.2A Pending CN115759160A (en) 2019-06-03 2019-06-03 Method and device for generating offline graphic code

Family Applications After (1)

Application Number Title Priority Date Filing Date
CN202211460889.2A Pending CN115759160A (en) 2019-06-03 2019-06-03 Method and device for generating offline graphic code

Country Status (1)

Country Link
CN (2) CN110334794B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017036010A1 (en) * 2015-08-28 2017-03-09 深圳市前海康启源科技有限公司 Processing system and method for allocating bonus from online-to-offline health service products
CN108647065A (en) * 2018-03-22 2018-10-12 阿里巴巴集团控股有限公司 A kind of information displaying method, device and equipment
CN108811178A (en) * 2018-05-31 2018-11-13 阿里巴巴集团控股有限公司 A kind of data interactive method, device and equipment
WO2019029455A1 (en) * 2017-08-07 2019-02-14 阿里巴巴集团控股有限公司 Payment method and apparatus and device thereof

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017036010A1 (en) * 2015-08-28 2017-03-09 深圳市前海康启源科技有限公司 Processing system and method for allocating bonus from online-to-offline health service products
WO2019029455A1 (en) * 2017-08-07 2019-02-14 阿里巴巴集团控股有限公司 Payment method and apparatus and device thereof
CN108647065A (en) * 2018-03-22 2018-10-12 阿里巴巴集团控股有限公司 A kind of information displaying method, device and equipment
CN108811178A (en) * 2018-05-31 2018-11-13 阿里巴巴集团控股有限公司 A kind of data interactive method, device and equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
付钰等: "基于WPKI和虹膜识别的二维码安全管理系统", 《网络与信息安全学报》 *

Also Published As

Publication number Publication date
CN110334794B (en) 2023-01-17
CN115759160A (en) 2023-03-07

Similar Documents

Publication Publication Date Title
CN107392040B (en) A kind of method and device of common recognition verifying
CN107196989B (en) A kind of processing method and processing device of service request
CN107018125B (en) A kind of block catenary system, date storage method and device
CN110335036A (en) Processing, generation method and the device of off-line graphical code
CN110097376A (en) Commodity source tracing method, device, equipment and storage medium
CN109615383A (en) Data based on block chain deposit card, acquisition methods and device
US20070162766A1 (en) Data management system, data management method and storage medium storing program for data management
CN108055132A (en) The method, apparatus and equipment of a kind of service authorization
CN110009388A (en) Equipment leasing method, apparatus, equipment and storage medium
CN108154211A (en) Quick Response Code generation, method for processing business, device and equipment and Quick Response Code
CN108241974A (en) Write-in, method of payment, device and the equipment of NFC portable equipments
CN109993530A (en) A kind of virtual resource management method, device and electronic equipment
CN110263505A (en) Image processing method and device based on block chain
CN109145240A (en) A kind of page access method, apparatus and system based on barcode scanning operation
CN110009336A (en) Evidence collecting method and device based on block chain
CN108647065A (en) A kind of information displaying method, device and equipment
CN110263502A (en) Image processing method and device based on block chain
CN108320145A (en) E-payment processing method, device and client under line
CN110334160A (en) Relationship binding method, device and equipment based on block chain
CN107451868A (en) A kind of method and device of article appraisal
CN108334340A (en) A kind of Cross-environment data communications method, device and system
CN108282471A (en) A kind of transmission method of electronic certificate, device and equipment
CN113780847A (en) Intelligent community information processing method based on Internet of things and server
CN109144600A (en) A kind of operation method of application program, equipment and computer-readable medium
CN109388757A (en) A kind of hot topic track extraction method and device

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
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40016179

Country of ref document: HK

TA01 Transfer of patent application right

Effective date of registration: 20200924

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman, British Islands

Applicant after: Innovative advanced technology Co.,Ltd.

Address before: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman, British Islands

Applicant before: Advanced innovation technology Co.,Ltd.

Effective date of registration: 20200924

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman, British Islands

Applicant after: Advanced innovation technology Co.,Ltd.

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

Applicant before: Alibaba Group Holding Ltd.

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