Summary of the invention
Aiming at the shortcomings existing in the above problems, the present invention provides one kind and can only use within effective time
Code figure, to avoid code figure by the illegal code figure with time attributive function used of fake producer and its generation method and recognition side
Method.
To achieve the above object, the present invention provides a kind of code figure with time attributive function, and being added in code figure has tool
There is the code information using time limit instruction, record has the effective time of yard figure to use interval value in the code information.
The above-mentioned code figure with time attributive function, wherein the code figure is bar code, two dimensional code, by least two
A bar code is staggeredly superimposed the group being staggeredly superimposed with the combined type bar code constituted or at least two two-dimensional bar codes to constitute
Box-like two dimensional code.
The present invention provides also a kind of yard of map generalization method, comprising the following steps:
S1, the code information for inputting and having using time limit instruction in interface is generated in code figure;
S2, library is generated in conjunction with code figure, code information is generated to the code figure having using time attributive function, and be uploaded to cloud
In server.
The above-mentioned code drawing generating method based on time attributive function, wherein in step s 2, including following sub-step:
S21, code information is imported in code figure generation library, to generate code figure matrix sequence corresponding with code information;
S22, after being set to the size of code figure matrix sequence, thus will code figure matrix sequence corresponding with code information
Column-generation code figure pattern;
S23, by code figure pattern, with generated code figure pattern time-code figure generate library for its assign generation serial number mutually bind after
To form code diagram data APMB package, serial number will be generated as the filename of code diagram data APMB package, and pass through network for code figure number
It is uploaded in Cloud Server according to APMB package to be stored.
The above-mentioned code drawing generating method based on time attributive function, wherein Cloud Server is receiving a yard diagram data packet
After file, the data link table of creation Table Header information identical as the filename of code diagram data APMB package in code chart database, and
After the parsing of code diagram data APMB package, the code figure pattern in code diagram data APMB package is stored in data pointed by data pointer
In unique storage location in chained list after Table Header information.
The present invention also provides the reading methods of a kind of yard of figure, comprising the following steps:
First time recognition is carried out to the code figure for being implanted in article surface by code figure reading device, at the beginning of successfully distinguishing
Between point be effective time representated by the code information using time limit instruction that is implanted into uses interval value in code figure beginning
Record point;
It carries out second to the code figure for being implanted in article surface by code figure reading device to distinguish, at the beginning of successfully distinguishing
Between point be effective time representated by the code information using time limit instruction that is implanted into uses interval value in code figure end
Point is recorded, if the time range distinguished twice is greater than effective time representated by the code information using time limit instruction and uses
Interval value then determines that this yard of figure is invalid code figure.
Above-mentioned code figure reading method, wherein specific step is as follows for the above method:
S1, the code figure for being implanted in article surface is carried out after successfully distinguishing for the first time by code figure reading device, to obtain
To code diagram data APMB package corresponding thereto;
S2, serial number will be generated and be uploaded in Cloud Server using the code information of time limit instruction, when generation serial number
When identical with the Table Header information of data link table in code chart database, call the caching to Cloud Server empty the data link table
Between in, time starting point of the data link table in spatial cache is recorded;
S3, the code figure for being implanted in article surface is carried out after successfully distinguishing for the second time by code figure reading device, to obtain
To code diagram data APMB package corresponding thereto;
S4, serial number will be generated and be uploaded in Cloud Server using the code information of time limit instruction, if Cloud Server
Spatial cache in include with generate the identical data link table of serial number, then will use the code information of time limit instruction
Representative effective time is compared using interval value with record time range of the spatial cache to data link table, if when effective
Between using interval value be less than record time range, determine that this yard of figure is effective code figure.
Above-mentioned code figure reading method, wherein in step s 4, determining the cloud service when former code figure is effective code figure
Device deletes the data link table in spatial cache, and in the effective code chart database in Cloud Server and code chart database, right
This time operation is recorded.
Above-mentioned code figure reading method, wherein if effective time is greater than record time range using interval value, determine the code
Figure is invalid code figure.
Above-mentioned code figure reading method, wherein determining when former code figure is invalid code figure, Cloud Server is by spatial cache
It is deleted with the data link table in code chart database, and in the effective code chart database in Cloud Server, this operation is carried out
Record.
Compared with prior art, the invention has the following advantages that
Code figure provided by the invention with time attributive function is only capable of carrying out in the time use scope as defined in code figure
It uses, after being distinguished to it, if it is determined that time use scope as defined in having exceeded, then determine when former code figure and implantation
There is the article when former code figure invalid, to make code figure that there is available time;
The present invention uses existing code drawing generating method, and distinctive points, which are that, will have the code for using time limit instruction
Information can generate the code figure with time attributive function, have the advantages that generating mode is easy to operate as transitional information;
The present invention by being distinguished twice to when former code figure, so that getting made when time of former code figure after being activated
With range, after time use scope is compared with effective time using interval value, to determine after second is distinguished
When former code figure and it is implanted with when whether the article of former code figure is effective.
Specific embodiment
The present invention provides a kind of code figure with time attributive function, and addition is had to have to be limited using the time and be referred in code figure
The code information of order, record has the effective time of yard figure to use interval value in code information.Wherein, which uses section
Value is the time that can effectively use of code figure, which is several minutes or several minutes, a few hours or tens of hours.
If it using interval value is two hours that record, which has effective time of yard figure, in code information, therefore, this yard of figure it is effective
Usage time interval is only two hours, once then determined this yard figure more than two hours and be implanted with the article of this yard of figure as nothing
Effect.
First time recognition is carried out to the code figure for being implanted in article surface by code figure reading device, at the beginning of successfully distinguishing
Between point be effective time representated by the code information using time limit instruction that is implanted into uses interval value in code figure beginning
Record point;
It carries out second to the code figure for being implanted in article surface by code figure reading device to distinguish, at the beginning of successfully distinguishing
Between point be effective time representated by the code information using time limit instruction that is implanted into uses interval value in code figure end
Point is recorded, if the time range distinguished twice is greater than effective time representated by the code information using time limit instruction and uses
Interval value then determines that this yard of figure is invalid code figure.
Wherein, code figure is bar code, two dimensional code, interlocked the combined type one being superimposed to constitute by least two bar codes
Tie up bar code or at least two two-dimensional bar codes staggeredly combined type two dimensional code of the superposition to constitute.
Code figure provided by the present invention is implanted on the admission ticket of garden fete, the surface of subway ticket and other items.
The present invention provides also a kind of yard of map generalization method, wherein the two dimensional code is two dimensional code, comprising the following steps:
S1, the code information for inputting and having as used time limit instruction in interface is generated in two dimensional code;
Wherein, it is the interface for human-computer interaction that system provides during generating two dimensional code that two dimensional code, which generates interface,
The main certain operations for being convenient for user, for example, log in, submit or forward two dimensional code etc..The two dimensional code generates boundary
Face can also include submitting button, shortcut bar etc. in addition to including the input frame for inputting information for user.
Two dimensional code generate that interface receives that user input from input frame with program code message form indicate with such as making
With the information to be converted of time limit instruction.
S2, library is generated in conjunction with two dimensional code, code information is generated to the two dimensional code having using time attributive function, and upload
Into Cloud Server.
The above-mentioned two-dimensional code generation method based on time attributive function, wherein in step s 2, including following sub-step
It is rapid:
S21, code information is imported in two dimensional code generation library, to generate two dimensional code matrix sequence corresponding with code information
Column;
Wherein, the information to be converted indicated with program code message form is imported into two dimensional code and generates library, two dimensional code generates
Library can generate two-dimensional matrix sequence according to these with the information to be converted that program code message form indicates.
S22, after being set to the size of two dimensional code matrix sequence, thus will two dimensional code square corresponding with code information
Battle array sequence generates two dimensional code pattern.
Wherein, after generating two-dimensional matrix sequence, these two-dimensional matrix sequences are received, according to the size of two-dimensional matrix sequence
Size is configured, and information to be converted is generated two dimensional code pattern.
In addition, in this step, can also other auxiliary informations such as color to the two dimensional code pattern to be generated carry out
Setting.
In the present invention, it is that the two dimensional code increased income generates the source generation of code (Qrlibencode) composition that two dimensional code, which generates library,
The function such as code file, including some adjustment two dimensional code sizes, the format that alternates coding, change two dimensional code color, two dimensional code superposition picture
Power function and resource file of energy etc..Before two-dimensional code display generates interface, two dimensional code can be generated into code
(Qrlibencode) it is incorporated into local code.
S23, by two dimensional code pattern, with when generating two dimensional code pattern two dimensional code generate library be its assign generation serial number phase
To form two-dimensional code data APMB package after binding, serial number will be generated as the filename of two-dimensional code data APMB package, and pass through net
Two-dimensional code data APMB package is uploaded in Cloud Server to store by network.
In this sub-step, the format for being formed by two-dimensional code data APMB package is as follows:
Generate serial number |
Two dimensional code pattern |
Cloud Server is after receiving two-dimensional code data APMB package, creation and two-dimensional code data packet in two-dimensional code data library
The data link table of the identical Table Header information of the filename of file, and after by the parsing of two-dimensional code data APMB package, by two-dimensional code data
Two dimensional code pattern in APMB package is stored in the unique storage location in data link table pointed by data pointer after Table Header information
In.
In this sub-step, the document form of data link table is as follows:
Table Header information |
Two dimensional code pattern |
The present invention also provides the reading methods of a kind of yard of figure, and in the present embodiment, which is two dimensional code, including following step
It is rapid:
First time recognition is carried out to the two dimensional code for being implanted in article surface by two dimension code reading device, what success was distinguished opens
Begin time point be in two dimensional code effective time representated by the code information using time limit instruction that is implanted into use interval value
Start recording point;
It carries out second to the two dimensional code for being implanted in article surface by two dimension code reading device to distinguish, what success was distinguished opens
Begin time point be in two dimensional code effective time representated by the code information using time limit instruction that is implanted into use interval value
End record point, if the time range distinguished twice be greater than using time limit instruction code information representated by it is effective
Between use interval value, then determine the two dimensional code be invalid two dimensional code.
Wherein, the time which can effectively be used using interval value for code figure, the time are several minutes or number
Minute, a few hours or tens of hours.
Specific step is as follows for the above method:
S1, the two dimensional code for being implanted in article surface is carried out after successfully distinguishing for the first time by two dimension code reading device, with
Getting corresponding thereto includes the two-dimensional code data Bao Wen for generating serial number and the code information using time limit instruction
Part;
Two-dimensional code data APMB package is uploaded in Cloud Server by S2, two dimension code reading device, to two-dimensional code data packet
After file is parsed, serial number is generated and using the code information of time limit instruction to get.It extracts and generates serial number two
It is inquired in dimension code database as querying condition, if generating the table in serial number and two-dimensional code data library in a certain data link table
Head information is identical, then shows to include same data link table in two-dimensional code data library.
When generation serial number is identical with the Table Header information of data link table in two-dimensional code data library, by the data link table tune
With in the spatial cache to Cloud Server, time starting point of the data link table in spatial cache is recorded.
S3, the two dimensional code for being implanted in article surface is carried out after successfully distinguishing for the second time by two dimension code reading device, with
Getting corresponding thereto includes the two-dimensional code data Bao Wen for generating serial number and the code information using time limit instruction
Part
S4, serial number will be generated and be uploaded in Cloud Server using the code information of time limit instruction, to two dimensional code
After data APMB package is parsed, serial number is generated and using the code information of time limit instruction to get.Cloud Server mentions
It takes and generates serial number inquired in the spatial cache of Cloud Server as querying condition, if including in spatial cache and life
At the identical data link table of serial number, then using inquiry complete time point as data link table in spatial cache at the end of
Between point, and by the time interval between sart point in time corresponding with data link table and end time point, as twice to working as
Preceding two dimensional code figure distinguished between record time range.
Effective time representated by the code information for using time limit instruction is used into interval value and spatial cache logarithm
It is compared according to the record time range of chained list, if effective time is less than record time range using interval value, determines the two dimension
Code is effective two dimensional code, and determines that the article for being implanted with current two-dimension is effective article.
In addition, Cloud Server will be in spatial cache and code chart database when determining current two-dimension is effective two dimensional code
Data link table delete, and in effective two-dimensional code data library in Cloud Server, this operation is recorded.
In addition, determining that the two dimensional code is invalid two dimensional code if effective time is greater than record time range using interval value.?
When determining that current two-dimension is invalid two dimensional code, Cloud Server deletes the data link table in spatial cache and code chart database,
And in effective two-dimensional code data library in Cloud Server, this operation is recorded.
After Cloud Server deletes data link table, even if two dimensional code is scanned again using two dimension code reading device,
Recognition can not also get corresponding information feedback, so that two dimensional code be made to become disposable two dimensional code.
Cloud Server, which extracts, generates serial number using as querying condition, when the spatial cache of Cloud Server is inquired, if
Not with the identical data link table of generation serial number in spatial cache, then implementation steps S2, extracts and generates serial number in two dimension
It is inquired in code database as querying condition, if generating the gauge outfit in serial number and two-dimensional code data library in a certain data link table
Information is identical, then shows to include same data link table in two-dimensional code data library.
When generation serial number is identical with the Table Header information of data link table in two-dimensional code data library, by the data link table tune
With in the spatial cache to Cloud Server, time starting point of the data link table in spatial cache is recorded.
Wherein, the time which can effectively be used using interval value for code figure, the time are several minutes or number
Minute, a few hours or tens of hours.
Only as described above, only presently preferred embodiments of the present invention, professional who are familiar with this art such as.?
After understanding technological means of the invention, natural energy is changed under the teachings of the present invention according to actual needs.Therefore all
According to variation and modification on an equal basis made by scope of the present invention patent, once should still remain within the scope of the patent.