[go: up one dir, main page]

CN103646121A - Identifier code, application method and device - Google Patents

Identifier code, application method and device Download PDF

Info

Publication number
CN103646121A
CN103646121A CN201310742721.5A CN201310742721A CN103646121A CN 103646121 A CN103646121 A CN 103646121A CN 201310742721 A CN201310742721 A CN 201310742721A CN 103646121 A CN103646121 A CN 103646121A
Authority
CN
China
Prior art keywords
identification code
data
user data
section
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
CN201310742721.5A
Other languages
Chinese (zh)
Other versions
CN103646121B (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.)
SERVYOU SOFTWARE GROUP Co Ltd
Original Assignee
SERVYOU SOFTWARE GROUP Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by SERVYOU SOFTWARE GROUP Co Ltd filed Critical SERVYOU SOFTWARE GROUP Co Ltd
Priority to CN201310742721.5A priority Critical patent/CN103646121B/en
Publication of CN103646121A publication Critical patent/CN103646121A/en
Application granted granted Critical
Publication of CN103646121B publication Critical patent/CN103646121B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Bioethics (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)
  • Storage Device Security (AREA)

Abstract

The invention provides an identifier code, application method and device. The identifier code comprises a control identifier section and a user data section, wherein the control identifier section is used for storing a parameter identifier of the identifier code; the user data section is used for storing user data information carried in the identifier code. The user data in the user data section can be compressed by using the identifier code, and labeled through the control identifier section, and whether the operations such as encryption, compression are carried out on the data in the user data section in the reading process according to the control identifier section. Thus, increase of user data carrying capacity in the identifier code is improved, and use of a user is facilitated.

Description

A kind of identification code and using method and device
Technical field
The present invention relates to multimedia messages recognition technology field, particularly a kind of identification code and using method and device.
Background technology
Along with the progress of social science and technology, multimedia information technology also develops rapidly.Wherein, identification code recognition technology is used simple, convenient storage, good confidentiality because it has, and by people, is widely used in every field.
But along with going deep into that identification code infotech is used, the shortcoming of relevant identification code has also come out gradually, thereby limited the application of identification code technology.
Wherein, the number amount of carrying in identification code is less, is exactly one of them key factor that hinders its development.In traditional identification code, comprise identification code, bar code etc., because its carrier is mainly to transmit data by image.Therefore, in limited image, can only carry fixing information.And this point is disproportionate for the society of information big bang.
How making can carry more information in identification code, is the problem that people need to solve.
Summary of the invention
The technical problem to be solved in the present invention is to provide a kind of identification code and using method and device, solves in identification code and carries the problem that data volume is few, is convenient to popularization and the use of identification code.
An identification code, is characterized in that, comprising: control identification section and user data segment;
Described control identification section, for storing the parameter tags of described identification code;
Described user data segment, the user data information carrying for storing described identification code.
Preferably, also comprise:
In described user data segment, also comprise: growth data section;
Described growth data section, for storing user's growth data;
In described control identification section, also comprise: extend information mark;
Described extend information mark, for identifying the length of described growth data section.
Preferably, described parameter tags, comprising: encrypted indicia;
Whether described encrypted indicia, be encrypted for identifying described identification code user data segment.
Preferably, described parameter tags, comprising: compact token;
Whether described compact token, compress for identifying described identification code user data segment.
Preferably, also comprise: check information section; Described check information section, for storing described number of users
According to section, carry out the check information of verification.
Preferably, also comprise: version information segment;
Described version information segment, for storing the data structure information of described identification code.
A sign code generating method, comprising:
User data is compressed;
If the described user data size after compression does not surpass the capacity of user data segment in identification code, the data in the user data segment using the user data after described compression as described identification code;
Compact token in the control identification section of described identification code is set to compress;
Generate described identification code.
Preferably, also comprise:
User's growth data is compressed;
If the total data size of the described user data after the described user's growth data after compression and compression does not surpass the capacity of user data segment in identification code, the described user's growth data after compression is stored in the growth data section in described identification code;
The length information of described user's growth data is stored in the extend information mark of controlling identification section in described identification code.
Preferably, also comprise:
If the total data size of the described user data after the described user's growth data after compression and compression has surpassed the capacity of user data segment in identification code, the described user's growth data of part after compression is stored in the growth data section of described identification code.
Preferably, before generating described identification code, also comprise:
Data in described user data segment are encrypted;
Encrypted indicia in the control identification section of described identification code is set to encrypt.
Preferably, before generating described identification code, also comprise:
The check information generating according to data in described user data segment is written to check information section.
Preferably, before generating described identification code, also comprise:
In the version information segment of described identification code, write the data structure information of described identification code.
An identification code read method, comprising:
Read described identification code;
According to the compact token of controlling identification section in described identification code, the user data of user data segment in described identification code is decompressed;
Obtain the data in the user data segment after described decompression.
Preferably, after according to the compact token of controlling identification section in described identification code, the user data of user data segment decompresses in to described identification code, also comprise:
According to the extend information mark of controlling identification section in described identification code, obtain the growth data in growth data section in described identification code.
Preferably, after reading described identification code, also comprise:
If control the encrypted indicia of identification section in described identification code for encrypting, the data in described user data segment be decrypted.
Preferably, after reading described identification code, also comprise:
According to the check information in described check information section, the content in described user data segment is verified;
If verify incorrectly, think that the data in user data segment are misdata in described identification code.
Preferably, after reading described identification code, also comprise:
Obtain the data structure information in version information segment in described identification code;
According to described data structure information, determine control identification section and/or the user data segment in described identification code.
An identification code generating apparatus, comprising: data compressing module, capacity judge module, user data writing module, compressing mark arrange module and identification code generating module;
Described data compressing module, for compressing user data;
Described user capacity judge module, for judging whether the described user data size after compression surpasses the capacity of identification code user data segment;
Described user data writing module, if surpassed the capacity of identification code user data segment, the data in the user data segment using the user data after described compression as described identification code for the described user data size after compression;
Described compressing mark arranges module, for the compact token of the control identification section of described identification code, is set to compress;
Identification code generating module, for generating described identification code.
Preferably, also comprise: growth data writing module;
Described growth data writing module, if the total data size for the described user data after the described user's growth data after compression and compression does not surpass the capacity of identification code user data segment, the described user's growth data after compression is stored in the growth data section in described identification code;
In described identification code generating apparatus, also comprise: expansion sign arranges module;
Described expansion sign arranges module, for the length information of described user's growth data being stored in to described identification code, controls in the extend information mark of identification section.
Preferably, in growth data writing module, also comprise: growth data segmentation writes submodule;
Described growth data segmentation writes submodule, if the total data size for the described user data after the described user's growth data after compression and compression does not surpass the capacity of identification code user data segment, the described user's growth data of part after compression is stored in the growth data section in described identification code.
Preferably, also comprise: version information writing module;
Described version information writing module, writes the data structure information of described identification code for the version information segment at described identification code.
An identification code reading device, comprising: identification code read module, compression parameters acquisition module, decompression module and user data acquisition module;
Described identification code read module, for reading described identification code;
Described compressing mark acquisition module, for judging the compact token of controlling identification section according to described identification code;
Described decompression module, if the compact token of controlling identification section for described identification code, for compressing, decompresses to the user data of user data segment in described identification code;
Described user data acquisition module, for obtaining the data of the user data segment after described decompression.
Preferably, also comprise: expansion identifier acquisition module and growth data acquisition module;
Described expansion identifier acquisition module, controls the extend information sign in identification section for obtaining described identification code;
Described growth data acquisition module, for obtaining the growth data in described identification code growth data section according to described extend information mark.
Preferably, also comprise: version information acquisition module;
Described version information acquisition module, for obtaining the data structure information in described identification code version information segment; Data structure in described version information is for determining control identification section and/or the user data segment of described identification code.
Compared with prior art, the present invention has the following advantages:
Identification code provided by the invention comprises user data segment and controls identification section, the parameter tags of control identification section for storing described identification code, and user data segment is for storing the user data information that described identification code carries.By using above identification code, can be by the storage of subscriber data after compression at user data segment, and mark by controlling identification section, when reading, according to controlling identification section, determine in user data segment, whether data carried out the operations such as encryption, compression, thereby improved the increase of the user data amount of carrying in identification code, user-friendly.
Accompanying drawing explanation
Fig. 1 is the data structure diagram of a kind of identification code the first embodiment provided by the invention;
Fig. 2 is the data structure diagram of a kind of identification code the second embodiment provided by the invention;
Fig. 3 is the data structure diagram of a kind of identification code the 3rd embodiment provided by the invention;
Fig. 4 is a kind of process flow diagram that identifies code generating method the first embodiment provided by the invention;
Fig. 5 is a kind of process flow diagram that identifies code generating method the second embodiment provided by the invention;
Fig. 6 is a kind of process flow diagram that identifies code generating method the 3rd embodiment provided by the invention;
Fig. 7 is the process flow diagram of a kind of identification code read method the first embodiment provided by the invention;
Fig. 8 is the process flow diagram of a kind of identification code read method the second embodiment provided by the invention;
Fig. 9 is the process flow diagram of a kind of identification code read method the 3rd embodiment provided by the invention;
Figure 10 is the theory diagram of a kind of identification code generating apparatus the first embodiment provided by the invention;
Figure 11 is the theory diagram of a kind of identification code generating apparatus the second embodiment provided by the invention;
Figure 12 is the theory diagram of a kind of identification code reading device the first embodiment provided by the invention;
Figure 13 is the theory diagram of a kind of identification code reading device the second embodiment provided by the invention.
Embodiment
For above-mentioned purpose of the present invention, feature and advantage can be become apparent more, below in conjunction with accompanying drawing, the specific embodiment of the present invention is described in detail.
Referring to Fig. 1, this figure is the data structure diagram of a kind of identification code the first embodiment provided by the invention.
In the present embodiment, identification code comprises: control identification section 101 and user data segment 102;
Described control identification section 101, for storing the parameter tags of described identification code.
Described user data segment 102, the user data information carrying for storing described identification code.
In traditional identification code, the general user data of just directly storing.Writing fashionablely, directly user data is being converted to identification code data and carries out write operation.And when reading, be also directly by the user data reading out wherein.
But, if need the amount of user data of storage to be greater than the capacity of identification code, such as: in identification code, need to carry a large amount of invoice information (comprising: invoice kind, invoice code, the enterprise's duty paragraph of making out an invoice, the amount of money etc. of making out an invoice) and just user data can only be divided into several identification codes and store respectively, cannot in an identification code, realize the global storage of user data.
In the present embodiment providing in invention, propose a kind of identification code, thereby meet above needs.In described identification code, there are the identification section 101 of control and user data segment 102.
Wherein, in user data segment 102, store user's data message.Described user's data message can, for through encrypting or unencrypted, can also be compression or unpressed.
And in controlling identification section 101 for the parameter tags of storaging mark code.Described parameter tags can comprise compact token, encrypted indicia, extending marking etc.
Whether described user data segment and check bit section that for example, encrypted indicia can be used for identifying in described identification code are encrypted.
And whether described user data segment and verification section section that compact token can be used for identifying in described identification code are compressed.
When reading, first read the parameter tags of controlling in identification section 101, as compact token, encrypted indicia etc.According to parameter tags decompress, the operation such as deciphering.
In the present embodiment, control the parameter tags of identification section for storing described identification code, user data segment is for storing the user data information that described identification code carries.By using above identification code, can be by the storage of subscriber data after the operation such as compression in user data segment, and mark by controlling identification section, when reading, according to controlling identification section, determine in user data segment, whether data carried out the operations such as encryption, compression, thereby improved the increase of the user data amount of carrying in identification code, user-friendly.
Referring to Fig. 2, this figure is the data structure diagram of a kind of identification code the second embodiment provided by the invention.
In the present embodiment,
In described user data segment 102, also comprise: growth data section 201.
Described growth data section 201, for storing user's growth data.
In described control identification section 101, also comprise: extend information mark 202.
Described extend information mark 202, for identifying the length of described growth data section.
In some cases, in user data segment, stored after user's data message, may also need the extraneous information that storage is relevant to user data.For example, after having stored the Back ground Information of invoice, also need to store the operator that makes out an invoice of invoice, the information such as affiliated area of invoice.These data messages do not belong to the content of invoice Back ground Information, therefore this class extend information and Back ground Information need to be separated to storage.
At this moment, growth data section 201 can be set in user data segment 102, for user's growth data is stored in to growth data section 201.Wherein, in growth data section 201, some subsegments can also be set, for different growth daties is separated to storage, to realize carrying of more data.
Meanwhile, in order to mark, in user data segment 102, which is the growth data section of separating storage, in controlling identification section 101, extend information mark 202 is set.Extend information mark 202 is used for identifying the length of growth data section.It can record the start address of growth data section in user data segment, also can directly record the data length information of growth data section or identifier etc.
By growth data section is set in user data segment, can realize the separation storage of user data, when reading, only need to get extend information mark according to controlling in identification section, can correctly read information wherein, user-friendly.
Referring to Fig. 3, this figure is the data structure diagram of a kind of identification code the 3rd embodiment provided by the invention.
In the present embodiment, in identification code, also comprise: check information section 301.
Described check information section 301, for storing the check information that described user data segment is carried out to verification.
Due in order to prevent that other people from, to the distorting of identification code content, improving the accuracy that identification code carries data in transmission, can generate check informations to the user data segment 103 of identification code, and will become raw check information to be stored in check information section 301.When reading, use the check information in check information section 301 to carry out verification to the data in user data segment 102, to guarantee to read out correctness and the security of data.
In the present embodiment, in identification code, also comprise: version information segment 304.
Described version information segment 304, for storing the data structure information of described identification code.
Because identification code may need to exist plurality of data structures according to different content, as there is no check information section in some identification code, in some identification code, user data segment is longer, even in some identification code, also needs to increase other field.Therefore,, in order to guarantee can correctly get the length information of these fields in reading to mark identification code, can in identification code, add version information segment 304.The length of different field, start address, beginning flag position etc. in record identification code in version information segment 304.
When reading identification code, first read the data structure information in version information segment in identification code, according to data structure information, determine the storage organization of different pieces of information, guarantee correctly reading of data message.
Referring to Fig. 4, this figure is a kind of process flow diagram that identifies code generating method the first embodiment provided by the invention.
In the present embodiment, comprising:
S401: user data is compressed.
S402: whether the described user data size after judgement compression surpasses the capacity of user data segment in identification code.
S403: if the described user data size after compression does not surpass the capacity of user data segment in identification code, the data in the user data segment using the user data after described compression as described identification code.
S404: the compact token in the control identification section of described identification code is set to compress.
S405: generate described identification code.
Before generating identification code, the user data that first need to be stored in identification code compresses.
Due to the restriction of data space in identification code, can only accept to be no more than the writing of user data of identification code memory capacity length.Whether the storage size that therefore, the user data after judgement compression takies after user data is compressed has surpassed the memory capacity of user data segment in identification code.
If do not surpass the storage size of user data segment, the data in can the user data segment using the user data after described compression as described identification code are carried out write operation.
For the data that can distinguish in user data segment when reading were compressed, can in the compact token in controlling identification section, carry out record, be about to compact token and be set to compress.
According to above data message, generate corresponding identification code more afterwards.
In the present embodiment, first user data is compressed, whether the user data size after judgement compression surpasses the capacity of user data segment in identification code, if the user data size after compression does not surpass the capacity of user data segment in identification code, data in the user data segment using the user data after described compression as identification code, compact token in the control identification section of described identification code is set to compress, and finally generates described identification code.By using this method, can realize the user profile after store compressed in identification code, improve the amount of carrying of data in sign, user-friendly.
Referring to Fig. 5, this figure, it is a kind of process flow diagram that identifies code generating method the second embodiment provided by the invention.
In the present embodiment, also comprise:
S501: user's growth data is compressed.
S502: whether the described user's growth data after judgement compression and the total data size of the described user data after compression surpass the capacity of user data segment in identification code.
S503: if the total data size of the described user data after the described user's growth data after compression and compression does not surpass the capacity of user data segment in identification code, the growth data of the described user after compression is stored in the growth data section in described identification code.
S504: the length information of described user's growth data is stored in the extend information mark of controlling identification section in described identification code.
In some cases, in identification code, also need to store user's growth data.Take invoice as example: after having stored the Back ground Information of invoice, also needs to store the operator that makes out an invoice of invoice, the information such as affiliated area of invoice.These data messages do not belong to the content of invoice Back ground Information, therefore this category information and Back ground Information need to be separated to storage.
In the time of in user's growth data is written to identification code, first need growth data to compress.
Restriction due to data space in identification code, and growth data section is the part in user data segment, therefore, need user's growth data after judgement compression and the summary data amount of the user data after compression whether to surpass the capacity of user data segment in identification code.
If do not surpass the capacity of user data segment, the growth data of the described user after compression is stored in the growth data section in described identification code.If surpassed the capacity of user data segment, the content in Memory Extension data segment not.
In order to guarantee to identify the growth data section in user data segment when reading, the length information of user's growth data can be stored in the extend information mark of controlling identification section in described identification code.Wherein, in extend information mark, can record the start address of growth data section in user data segment, also can directly record the data length information of growth data section or identifier etc.
When reading, only need to obtain the information in extend information mark, just can know the position length of determining in growth data section, thereby complete reading growth data.
In the present embodiment, first user's growth data is compressed, whether the described user's growth data after judgement compression afterwards and the total data size of the described user data after compression surpass the capacity of user data segment in identification code, if the total data size of the described user data after the described user's growth data after compression and compression does not surpass the capacity of user data segment in identification code, the growth data of the described user after compression is stored in the growth data section in described identification code, finally the length information of described user's growth data is stored in the extend information mark of controlling identification section in described identification code.By using above method, can in user data segment, store user's growth data, realized the separation storage of data, user-friendly.
In the present embodiment, can also comprise:
Owing to can also store several growth daties in growth data section, if therefore the summary data amount of the user's growth data after judgement compression and the user data after compression has surpassed the capacity of user data segment in identification code, part growth data after compression can also be written in growth data section, thereby guarantee that part growth data still can carry out normal storage.For example: the length of user data segment is 100K, wherein user data takies 75K, and comprise A growth data 10K in growth data section, B growth data 10K, C growth data 10K, can only store A growth data and B growth data in this case, and abandon C growth data, thereby guarantee the normal storage of A growth data and B growth data, improve the amount of carrying of data in identification code.
Referring to Fig. 6, this figure, it is a kind of process flow diagram that identifies code generating method the 3rd embodiment provided by the invention.
In the present embodiment, before generating described identification code, also comprise:
S601: data in described user data segment are encrypted.
S602: the encrypted indicia in the control identification section of described identification code is set to encrypt.
In order to prevent that other people from, to the distorting of identification code content, improving the accuracy that identification code carries data in transmission, can be encrypted the data in user data segment before generating identification code.
In order to guarantee correctly to read out user data, after user data segment is encrypted, the encrypted indicia in the control identification section of identification code is set to encrypt.
In order further to improve the security of enciphered data, in this locality, do not retaining in some cases key, but be stored in far-end server.When being encrypted, need first from far-end, to get key, re-use the key getting and be encrypted operation.
In the present embodiment, before generating identification code, data in described user data segment are encrypted, then the encrypted indicia in the control identification section of described identification code is set to encrypt.By using above method, can realize the encryption to user data segment content in identification code, guaranteed the safety of user data.
The present embodiment is a kind of the 4th embodiment that identifies code generating method provided by the invention.
In the present embodiment, before generating described identification code, also comprise:
The check information generating according to data in described user data segment is written to check information section.
Due in order to prevent other people distorting data content in identification code, improve the accuracy that identification code carries data in transmission, can generate check information to the user data segment of identification code, the check information generating according to data in described user data segment is written in check information section.Wherein, can generate check information by the data of encrypting or compress in previous user data segment, also can generate check information by the data in the user data segment after encryption or compression.
When reading, use the check information in check information section to carry out verification to the data in user data segment, to guarantee to read out correctness and the security of data.
In the present embodiment, before generating described identification code, can also comprise:
In the version information segment of described identification code, write the data structure information of described identification code.
Because identification code may need to exist plurality of data structures according to different content, as there is no check information section in some identification code, in some identification code, user data segment is longer, even in some identification code, also needs to increase other field.Therefore,, in order to guarantee can correctly get the length information of these fields in reading to mark identification code, can, before generating identification code, in the version information segment of described identification code, write the data structure information of described identification code.
When reading identification code, first read the data structure information in version information segment in identification code, according to data structure information, determine the storage organization of different pieces of information, guarantee correctly reading of data message.
It referring to Fig. 7, this figure, is the process flow diagram of a kind of identification code read method the first embodiment provided by the invention.
In the present embodiment, comprising:
S701: read described identification code.
S702: the user data of user data segment in described identification code is decompressed according to the compact token of controlling identification section in described identification code.
S703: obtain the data in the user data segment after described decompression.
Owing to can carry the user data of compression in identification code, thus user after obtaining identification code first use equipment read the compact token of controlling identification section in identification code.
If the information recording in compact token, for compressing, is carried out decompression operation to the data in user data segment in identification code.
According to the data that obtain after decompressing, carry out normal read operation.
In the present embodiment, first user reads content wherein after getting identification code, according to the compact token of controlling identification section in identification code, the user data of user data segment in described identification code is carried out to decompression operation, obtain afterwards the data in the user data segment after described decompression.By using above method, can correctly read out the packed data in identification code, realize the function of carrying more data in identification code, user-friendly.
It referring to Fig. 8, this figure, is the process flow diagram of a kind of identification code read method the second embodiment provided by the invention.
Step S801 in the present embodiment, S802 are identical with S701, S702 and S703 in identification code read method the first embodiment with S804, at this, are no longer introduced.
In the present embodiment, after according to the compact token of controlling identification section in described identification code, the user data of user data segment decompresses in to described identification code, also comprise:
S803: obtain the growth data in growth data section in described identification code according to the extending marking of controlling identification section in described identification code.
Owing to may comprise growth data section in the user data segment of identification code, during data in need to reading growth data section, can first read and in identification code, control the extend information mark in identification section.In extend information mark, record the length information of user's growth data, as the start address in user data segment or identifier etc.Therefore, can determine particular location and the length of growth data section in user data segment by obtaining extend information mark, thereby guarantee that user can normally read out growth data.
Referring to Fig. 9, this figure is the process flow diagram of a kind of identification code read method the 3rd embodiment provided by the invention.
After reading described identification code, also comprise:
S901: judge whether the encrypted indicia of controlling identification section in identification code is set to encrypt.
S902: if the encrypted indicia of controlling identification section in described identification code is for encrypting, the data in described user data segment are decrypted.
After reading identification code, can first read the encrypted indicia of controlling in identification section.Whether described encrypted indicia has carried out cryptographic operation for the data of record identification code user data segment.
If encrypted indicia is set to encrypt, should first the data in user data segment be decrypted to operation.
In order further to improve the security of enciphered data, in this locality, do not retaining in some cases key, but be stored in far-end server.When being decrypted, need first from far-end, to get key, re-use the key getting and be decrypted.
In the present embodiment, after reading described identification code, judge whether the encrypted indicia of controlling identification section in identification code is set to encrypt.If control the encrypted indicia of identification section in identification code for encrypting, the data in described user data segment be decrypted.By using above method, whether the data that can correctly identify in user data segment encrypt, and realize the reading of user data segment content by decryption oprerations, have guaranteed the safety of user data.
The present embodiment is the 4th embodiment of a kind of identification code read method provided by the invention.
In the present embodiment, after reading described identification code, also comprise:
According to the check information in described check information section, the content in described user data segment is verified.
If verify incorrectly, think that the data in user data segment are misdata in described identification code.
Owing to also there being check information section in identification code, therefore, after reading described identification code, can to the data in user data segment, carry out verification according to the check information in check information section.
If data during verification in user data segment and check information are inconsistent, can think that the data in user data segment are misdata.User can no longer carry out subsequent operation to this identification code, to prevent from getting wrong data message.
Can also comprise in the present embodiment:
After reading described identification code, obtain the data structure information in version information segment in identification code.
According to described data structure information, determine control identification section and/or the user data segment in identification code.
In identification code, also may include version information segment.In described version information segment, storing the data structure information of identification code.Such as: control the length of identification section, the length of user ID section etc.
When reading identification code, first read the data structure information in version information segment in identification code, according to data structure information, determine the storage organization of different pieces of information section, guarantee correctly reading of data message.
The method that generates and read based on above-mentioned identification code, the device that the present invention also provides identification code to generate and read, describes its ingredient in detail below in conjunction with specific embodiment.
Referring to Figure 10, this figure is the theory diagram of a kind of identification code generating apparatus the first embodiment provided by the invention.
In the present embodiment, it is characterized in that, comprising: data compressing module 1001, capacity judge module 1002, user data writing module 1003, compressing mark arrange module 1004 and identification code generating module 1005;
Described data compressing module 1001, for compressing user data;
Described user capacity judge module 1002, for judging whether the described user data size after compression surpasses the capacity of identification code user data segment;
Described user data writing module 1003, if for having surpassed the capacity of identification code user data segment, data in the user data segment using the user data after described compression as described identification code;
Described compressing mark arranges module 1004, for the compact token of the control identification section of described identification code, is set to compress;
Identification code generating module 1005, for generating described identification code.
At identification code generating apparatus, obtain after user data, the user data that first data compressing module 1001 need to be stored in identification code compresses.
Due to the restriction of data space in identification code, can only accept to be no more than the writing of user data of identification code storage space length.Whether the storage size that the user data that therefore, user's capacity judge module 1002 is used for after judgement compression after user data is compressed takies has surpassed the storage space of user data segment in identification code.
If do not surpass the storage size of user data segment, user's data writing module 1003 using the user data after described compression the data in user data segment carry out write operation.
For the data that can distinguish in user data segment when reading were compressed, compressing mark arranges in the compact token of module 1004 in controlling identification section carries out record, is about to compact token and is set to compress.
Finally, identification code generating module 1005 generates corresponding identification code according to above data message.
In the present embodiment, after receiving user data, usage data compression module compresses, with capacity judge module, judge whether user data has surpassed the capacity of user data segment afterwards, if useless, surpass, user's data writing module writes data, by compressing mark, module compressing mark position is set again and is set to encrypt, finally use identification code generating module generating identification code.By using above device, can realize the compression to user data in identification code, make may carry more data information in identification code, user-friendly.
Referring to Figure 11, this figure is the theory diagram of a kind of identification code generating apparatus the second embodiment provided by the invention.
In the present embodiment, also comprise: growth data writing module 1101;
Described growth data writing module 1101, if do not surpass the capacity of identification code user data segment, the data in the user data segment using the user data after described compression as described identification code for the described user data size after compression.
In described identification code generating apparatus, also comprise: expansion sign arranges module 1102.
Described expansion sign arranges module 1102, for the length information of described user's growth data being stored in to described identification code, controls in the extend information mark of identification section.
Owing to can also store user's growth data information in identification code, therefore growth data that can 1001 couples of users of usage data compression module compresses, and whether the summary data amount that judges described user's growth data after compression and user data with capacity judge module 1002 is afterwards over the capacity of user data segment in identification code.
If do not surpass the capacity of user data segment in identification code, using the user's growth data after described compression, the data in described growth data section enter and write growth data writing module 1101.
Also using afterwards expansion sign that module 1102 is set is stored in the length information of user's growth data in the extend information mark of controlling identification section in described identification code.Thereby when identification code is read, can be by getting the extend information of controlling in identification section.
In the present embodiment, use growth data writing module that user's growth data information is written in user data segment, and use expansion sign that module is set the length information of user's growth data is stored in extend information mark.By using above device, can realize and in user data segment, separate storage user growth data information, convenient for users to use.
In the present embodiment, in growth data writing module 1101, can also comprise: growth data segmentation writing module.
Owing to can also store several growth daties in growth data section, if therefore the summary data amount of the user's growth data after judgement compression and the user data after compression has surpassed the capacity of user data segment in identification code, can also use growth data segmentation writing module that the part growth data after compression is written in growth data section, thereby guarantee that part growth data still can carry out normal storage.For example: the length of user data segment is 100K, wherein user data takies 75K, and comprise A growth data 10K in growth data section, B growth data 10K, C growth data 10K, can only store A growth data and B growth data in this case, and abandon C growth data, thereby guarantee the normal storage of A growth data and B growth data, improve the amount of carrying of data in identification code.
The present embodiment is the 3rd embodiment of a kind of identification code generating apparatus provided by the invention.
In the present embodiment, also comprise: version information writing module.
Described version information writing module, writes the data structure information of described identification code for the version information segment at described identification code.
Because identification code may need to exist plurality of data structures according to different content, as there is no check information section in some identification code, in some identification code, user data segment is longer, even in some identification code, also needs to increase other field.Therefore,, in order to guarantee can correctly get the length information of these fields in reading to mark identification code, can use version information writing module in the version information segment of described identification code, to write the data structure information of described identification code.
When reading identification code, first read the data structure information in version information segment in identification code, according to data structure information, determine the storage organization of different pieces of information, guarantee correctly reading of data message.
Referring to Figure 12, this figure is the theory diagram of a kind of identification code reading device the first embodiment provided by the invention.
In the present embodiment, comprising: identification code read module 1201, compression parameters acquisition module 1202, decompression module 1203 and user data acquisition module 1204.
Described identification code read module 1201, for reading described identification code.
Described compressing mark acquisition module 1202, for judging the compact token of controlling identification section according to described identification code.
Described decompression module 1203, if the compact token of controlling identification section for described identification code, for compressing, decompresses to the user data of user data segment in described identification code.
Described user data acquisition module 1204, for obtaining the data of the user data segment after described decompression.
Owing to can carry the user data of compression in identification code, so user using identification code read module 1201 to read after identification code, first uses the compact token of controlling identification section in compressing mark acquisition module 1202 judgement identification codes.
If the information recording in compact token for compressing, is used the data in user data segment in 1203 pairs of identification codes of decompression module to carry out decompression operation.
After carrying out proper solution compression, user data acquisition module 1204 carries out normal read operation according to the data that obtain after decompressing.
In the present embodiment, first use identification code read module to read identification code, with compression parameters acquisition module, judge that whether compressing mark is for compressing again, compress if, use decompression module to decompress to user data, end user's data acquisition module is with obtaining the data message in user data segment.By using above device, can correctly read out the packed data in identification code, realize the function of carrying more data in identification code, user-friendly.
Referring to Figure 13, this figure is the theory diagram of a kind of identification code reading device the second embodiment provided by the invention.
In the present embodiment, also comprise: expansion identifier acquisition module 1301 and growth data acquisition module 1302.
Described expansion identifier acquisition module 1301, controls the extend information sign in identification section for obtaining described identification code;
Described growth data acquisition module 1302, for obtaining the growth data in described identification code growth data section according to described extend information mark.
Owing to may comprise growth data section in the user data segment of identification code, during data in need to reading growth data section, can be first by expansion identifier acquisition module 1301, read and in identification code, control the extend information mark in identification section.In extend information mark, record the length information of user's growth data, as the start address in user data segment or identifier etc.
After obtaining the length information of user's growth data section, can obtain the user data in growth data section by growth data acquisition module 1302.
In the present embodiment, expansion identifier acquisition module is controlled the extend information sign in identification section for obtaining described identification code.Growth data acquisition module is for obtaining the growth data in described identification code growth data section according to described extend information mark.By using above device, can realize correctly the reading of user's extend information in identification code, realized the separation storage of user's extend information, convenient for users to use.
The present embodiment is the 3rd embodiment of a kind of identification code reading device provided by the invention.
In the present embodiment, also comprise: version information acquisition module.
Described version information acquisition module, for obtaining the data structure information in described identification code version information segment.Data structure in described version information is for determining control identification section and/or the user data segment of described identification code.
In identification code, also may include version information segment.In described version information segment, storing the data structure information of identification code.Such as: control the length of identification section, the length of user ID section etc.
When reading identification code, first use version information acquisition module to read the data structure information in version information segment in identification code, according to data structure information, determine the storage organization of different pieces of information section, guarantee correctly reading of data message.
The above, be only preferred embodiment of the present invention, not the present invention done to any pro forma restriction.Although the present invention discloses as above with preferred embodiment, yet not in order to limit the present invention.Any those of ordinary skill in the art, do not departing from technical solution of the present invention scope situation, all can utilize method and the technology contents of above-mentioned announcement to make many possible changes and modification to technical solution of the present invention, or be revised as the equivalent embodiment of equivalent variations.Therefore, every content that does not depart from technical solution of the present invention,, all still belongs in the scope of technical solution of the present invention protection any simple modification made for any of the above embodiments, equivalent variations and modification according to technical spirit of the present invention.

Claims (24)

1. an identification code, is characterized in that, comprising: control identification section and user data segment;
Described control identification section, for storing the parameter tags of described identification code;
Described user data segment, the user data information carrying for storing described identification code.
2. identification code according to claim 1, is characterized in that, also comprises:
In described user data segment, also comprise: growth data section;
Described growth data section, for storing user's growth data;
In described control identification section, also comprise: extend information mark;
Described extend information mark, for identifying the length of described growth data section.
3. identification code according to claim 1, is characterized in that, described parameter tags, comprising: encrypted indicia;
Whether described encrypted indicia, be encrypted for identifying described identification code user data segment.
4. identification code according to claim 1, is characterized in that, described parameter tags, comprising: compact token;
Whether described compact token, compress for identifying described identification code user data segment.
5. identification code according to claim 1, is characterized in that, also comprises: check information section;
Described check information section, for storing the check information that described user data segment is carried out to verification.
6. identification code according to claim 1, is characterized in that, also comprises: version information segment;
Described version information segment, for storing the data structure information of described identification code.
7. a sign code generating method, is characterized in that, comprising:
User data is compressed;
If the described user data size after compression does not surpass the capacity of user data segment in identification code, the data in the user data segment using the user data after described compression as described identification code;
Compact token in the control identification section of described identification code is set to compress;
Generate described identification code.
8. method according to claim 7, is characterized in that, also comprises:
User's growth data is compressed;
If the total data size of the described user data after the described user's growth data after compression and compression does not surpass the capacity of user data segment in identification code, the described user's growth data after compression is stored in the growth data section in described identification code;
The length information of described user's growth data is stored in the extend information mark of controlling identification section in described identification code.
9. method according to claim 8, is characterized in that, also comprises:
If the total data size of the described user data after the described user's growth data after compression and compression has surpassed the capacity of user data segment in identification code, the described user's growth data of part after compression is stored in the growth data section of described identification code.
10. method according to claim 7, is characterized in that, before generating described identification code, also comprises:
Data in described user data segment are encrypted;
Encrypted indicia in the control identification section of described identification code is set to encrypt.
11. methods according to claim 7, is characterized in that, before generating described identification code, also comprise:
The check information generating according to data in described user data segment is written to check information section.
12. methods according to claim 7, is characterized in that, before generating described identification code, also comprise:
In the version information segment of described identification code, write the data structure information of described identification code.
13. 1 kinds of identification code read methods, is characterized in that, comprising:
Read described identification code;
According to the compact token of controlling identification section in described identification code, the user data of user data segment in described identification code is decompressed;
Obtain the data in the user data segment after described decompression.
14. methods according to claim 13, is characterized in that, after according to the compact token of controlling identification section in described identification code, the user data of user data segment decompresses in to described identification code, also comprise:
According to the extend information mark of controlling identification section in described identification code, obtain the growth data in growth data section in described identification code.
15. methods according to claim 13, is characterized in that, after reading described identification code, also comprise:
If control the encrypted indicia of identification section in described identification code for encrypting, the data in described user data segment be decrypted.
16. methods according to claim 13, is characterized in that, after reading described identification code, also comprise:
According to the check information in described check information section, the content in described user data segment is verified;
If verify incorrectly, think that the data in user data segment are misdata in described identification code.
17. methods according to claim 13, is characterized in that, after reading described identification code, also comprise:
Obtain the data structure information in version information segment in described identification code;
According to described data structure information, determine control identification section and/or the user data segment in described identification code.
18. 1 kinds of identification code generating apparatus, is characterized in that, comprising: data compressing module, capacity judge module, user data writing module, compressing mark arrange module and identification code generating module;
Described data compressing module, for compressing user data;
Described user capacity judge module, for judging whether the described user data size after compression surpasses the capacity of identification code user data segment;
Described user data writing module, if surpassed the capacity of identification code user data segment, the data in the user data segment using the user data after described compression as described identification code for the described user data size after compression;
Described compressing mark arranges module, for the compact token of the control identification section of described identification code, is set to compress;
Identification code generating module, for generating described identification code.
19. devices according to claim 18, is characterized in that, also comprise: growth data writing module;
Described growth data writing module, if the total data size for the described user data after the described user's growth data after compression and compression does not surpass the capacity of identification code user data segment, the described user's growth data after compression is stored in the growth data section in described identification code;
In described identification code generating apparatus, also comprise: expansion sign arranges module;
Described expansion sign arranges module, for the length information of described user's growth data being stored in to described identification code, controls in the extend information mark of identification section.
20. devices according to claim 19, is characterized in that, in growth data writing module, also comprise: growth data segmentation writes submodule;
Described growth data segmentation writes submodule, if the total data size for the described user data after the described user's growth data after compression and compression does not surpass the capacity of identification code user data segment, the described user's growth data of part after compression is stored in the growth data section in described identification code.
21. devices according to claim 18, is characterized in that, also comprise: version information writing module;
Described version information writing module, writes the data structure information of described identification code for the version information segment at described identification code.
22. 1 kinds of identification code reading devices, is characterized in that, comprising: identification code read module, compression parameters acquisition module, decompression module and user data acquisition module;
Described identification code read module, for reading described identification code;
Described compressing mark acquisition module, for judging the compact token of controlling identification section according to described identification code;
Described decompression module, if the compact token of controlling identification section for described identification code, for compressing, decompresses to the user data of user data segment in described identification code;
Described user data acquisition module, for obtaining the data of the user data segment after described decompression.
23. devices according to claim 22, is characterized in that, also comprise: expansion identifier acquisition module and growth data acquisition module;
Described expansion identifier acquisition module, controls the extend information sign in identification section for obtaining described identification code;
Described growth data acquisition module, for obtaining the growth data in described identification code growth data section according to described extend information mark.
24. devices according to claim 22, is characterized in that, also comprise: version information acquisition module;
Described version information acquisition module, for obtaining the data structure information in described identification code version information segment; Data structure in described version information is for determining control identification section and/or the user data segment of described identification code.
CN201310742721.5A 2013-12-27 2013-12-27 A kind of identification code and using method and device Active CN103646121B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310742721.5A CN103646121B (en) 2013-12-27 2013-12-27 A kind of identification code and using method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310742721.5A CN103646121B (en) 2013-12-27 2013-12-27 A kind of identification code and using method and device

Publications (2)

Publication Number Publication Date
CN103646121A true CN103646121A (en) 2014-03-19
CN103646121B CN103646121B (en) 2016-03-16

Family

ID=50251334

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310742721.5A Active CN103646121B (en) 2013-12-27 2013-12-27 A kind of identification code and using method and device

Country Status (1)

Country Link
CN (1) CN103646121B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105592030A (en) * 2014-11-18 2016-05-18 华为技术有限公司 IP message processing method and device
CN105674475A (en) * 2015-12-18 2016-06-15 宁波奥克斯空调有限公司 Control method for intelligent air conditioner with time-based electricity-limiting function
CN106972918A (en) * 2017-03-15 2017-07-21 中国工商银行股份有限公司 A kind of generation method, device and the verification method of electronic code data
CN108920573A (en) * 2018-06-22 2018-11-30 北京奇艺世纪科技有限公司 A kind of data buffer storage processing method, device and terminal device

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6764011B2 (en) * 2002-02-13 2004-07-20 Nec Infrontia Corporation Graphics code system
CN100550653C (en) * 2005-12-14 2009-10-14 北京北大方正电子有限公司 A kind of Code And Decode method of variable length structural information
CN101645140A (en) * 2008-08-06 2010-02-10 华为技术有限公司 Two-dimensional code generation method, decoding method and device
CN101334849B (en) * 2008-07-01 2012-04-25 北大方正集团有限公司 Symbol generation method and device of two-dimensional code label
CN102750516A (en) * 2012-05-18 2012-10-24 西安邮电学院 Certificate anti-counterfeit system with embedded biological characteristics and bar code technology
CN103368582A (en) * 2012-04-11 2013-10-23 联咏科技股份有限公司 Data coding and decoding method and device
CN103400173A (en) * 2013-07-25 2013-11-20 中国科学院信息工程研究所 Generating method and reading method of two-dimensional code containing private information

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6764011B2 (en) * 2002-02-13 2004-07-20 Nec Infrontia Corporation Graphics code system
CN100550653C (en) * 2005-12-14 2009-10-14 北京北大方正电子有限公司 A kind of Code And Decode method of variable length structural information
CN101334849B (en) * 2008-07-01 2012-04-25 北大方正集团有限公司 Symbol generation method and device of two-dimensional code label
CN101645140A (en) * 2008-08-06 2010-02-10 华为技术有限公司 Two-dimensional code generation method, decoding method and device
CN103368582A (en) * 2012-04-11 2013-10-23 联咏科技股份有限公司 Data coding and decoding method and device
CN102750516A (en) * 2012-05-18 2012-10-24 西安邮电学院 Certificate anti-counterfeit system with embedded biological characteristics and bar code technology
CN103400173A (en) * 2013-07-25 2013-11-20 中国科学院信息工程研究所 Generating method and reading method of two-dimensional code containing private information

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105592030A (en) * 2014-11-18 2016-05-18 华为技术有限公司 IP message processing method and device
CN105592030B (en) * 2014-11-18 2019-06-07 华为技术有限公司 IP packet processing method and processing device
CN105674475A (en) * 2015-12-18 2016-06-15 宁波奥克斯空调有限公司 Control method for intelligent air conditioner with time-based electricity-limiting function
CN106972918A (en) * 2017-03-15 2017-07-21 中国工商银行股份有限公司 A kind of generation method, device and the verification method of electronic code data
CN108920573A (en) * 2018-06-22 2018-11-30 北京奇艺世纪科技有限公司 A kind of data buffer storage processing method, device and terminal device

Also Published As

Publication number Publication date
CN103646121B (en) 2016-03-16

Similar Documents

Publication Publication Date Title
CN104680077B (en) Method for encrypting picture, method for viewing picture, system and terminal
CN111897786B (en) Log reading method, device, computer equipment and storage medium
US20060069925A1 (en) Content processing device, content accumulation medium, content processing method and content processing program
CN109981266B (en) Method and device for storing and reading key and sensitive information
CN101763397B (en) Device and method for processing expanding information in image file
EP2251815A1 (en) Electronic device, password erasure method, and program
CN103646121B (en) A kind of identification code and using method and device
KR101371834B1 (en) Method and system for the secured distribution of audiovisual data by transaction marking
CN107516045A (en) Document protection method and device
CN102073831A (en) System and method for encrypting and decrypting electronic documents
CN105162588A (en) Media file encryption/decryption methods and device
CN104298926A (en) Method and device for running encrypted file
CN101887713A (en) Encryption method and device for font library
CN102682072A (en) Data processing method and system for multimedia documents
CN102799815A (en) Method and device for safely loading program library
CN107481181B (en) A picture hiding method, restoration method and picture hiding system for protecting personal privacy
JP2018160129A (en) Data generation program, data generation method, and data generation apparatus
CN104506322A (en) Examinee identity authentication data compression and encryption method and decryption method
CN110008724B (en) Solid state hard disk controller safe loading method and device and storage medium
JP5966053B1 (en) Information management method and information management system
CN110968885A (en) Model training data storage method and device, electronic equipment and storage medium
CN101661546B (en) System and method for file encryption therein in hand-held mobile electronic device
CN106485158A (en) A kind of transparent encryption method based on hdfs and system
CN108881106B (en) System and method for network electronic identity verification
CN104978502A (en) System and method for encrypting local file of intelligent terminal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant