Embodiment
The embodiment of the present invention according to the security information of user's setting and the first data message of needs storage, is determined the second data message of actual storage when needs storage information; The message identification of the first data message and the second data message are carried out the two-dimension code coding process, generate and store two-dimension code, and set up and store message identification that read data information uses and the corresponding relation of security information; When the needs reading information, the two-dimension code of storage is decoded, obtain the second data message of message identification and actual storage; According to the corresponding relation of canned data sign and security information, determine security information corresponding to message identification that decoding obtains; It is believed that according to security information and the second number the first data message of determining the needs storage.The embodiment of the present invention is owing to adopting the two-dimension code mode to store information, and sets up and store message identification that read data information uses and the corresponding relation of security information, thereby under the prerequisite that can conveniently read, improved the security of the information that records.
Below in conjunction with Figure of description, the embodiment of the present invention is described in further detail.
As shown in Figure 1, the method for embodiment of the present invention storage information comprises:
Step 101, the security information that arranges according to the user and the first data message of needs storage are determined the second data message of actual storage;
Step 102, the message identification of the first data message and the second data message are carried out the two-dimension code coding process, generate and store two-dimension code, and set up and store message identification that read data information uses and the corresponding relation of security information.
Preferably, the user can arrange security information when needs storage information, specifically comprise whether needing to encrypt.Accordingly, in step 101, judge according to security information whether needs are encrypted data message the user, according to security information, after definite need to being encrypted, the first data message is encrypted processing, obtain the second data message; According to security information, after determining not need to be encrypted, with the first data message as the second data message.
Preferably, security information can also comprise key and/or cryptographic algorithm.Accordingly, in step 101:
If enciphered message comprises key, the cryptographic algorithm that adopts the key in security information and set in advance is encrypted the first data message;
If enciphered message comprises cryptographic algorithm, the key that adopts the cryptographic algorithm in security information and set in advance is encrypted the first data message;
If enciphered message comprises key and cryptographic algorithm, adopt key in security information and the cryptographic algorithm in security information, the first data message is encrypted.
If security information does not comprise key and cryptographic algorithm, in step 101, adopt the key that sets in advance and the cryptographic algorithm that sets in advance, the first data message is encrypted.
Owing to can adopting the key form that data message is encrypted, further improved the security of data message.
Preferably, in step 102, according to setting in advance or user configured coding parameter, the message identification of the first data message and the second data message are carried out the two-dimension code coding process, generate two-dimension code.
Wherein, coding parameter includes but not limited at least a in following message:
The two-dimension code type, error-correction level, module pixel.
Preferably, the message identification of the first data message is to determine and need to generate after the first data message of storage.
In force, can also generate in advance a large amount of message identifications, be the first data message assignment information sign according to sequencing.
Preferably, the corresponding relation of message identification and security information can adopt the form of database to preserve.Such as being saved in encrypting database.Wherein encrypting database can be Database Systems, as oracle, and sqlserver etc.
In force, if some two-dimension codes are deleted, can according to the message identification in deleted two-dimension code, comprise the corresponding relation of the message identification in deleted two-dimension code in delete database.
In force, the first data message that needs in step 101 to store can be the new information that the user inputs, can be also decode in the two-dimension code to storage obtain data message after, the user modifies to this data message and obtains.
Concrete decode procedure can referring to the content of embodiment of the present invention reading information, not repeat them here.
Preferably, if the user arranges coding parameter, in step 102, according to user configured coding parameter, the message identification of the first data message and the second data message are carried out the two-dimension code coding process, generate two-dimension code.
If the user does not arrange coding parameter, in step 102, according to the coding parameter that sets in advance, the message identification of the first data message and the second data message are carried out the two-dimension code coding process, generate two-dimension code.
As shown in Figure 2, the method for embodiment of the present invention reading information comprises the following steps:
Step 201, to the storage two-dimension code decode, obtain the second data message of message identification and actual storage;
Step 202, according to the corresponding relation of canned data sign and security information, determine security information corresponding to message identification that decoding obtains;
Step 203, it is believed that according to security information and the second number the first data messages of determining the needs storage.
Whether preferably, security information comprises needs to encrypt.In step 202, according to security information, after definite need to being decrypted, the second data message is decrypted processing, obtains the first data message
According to security information, after determining not need to be decrypted, with the second data message as the first data message.
Preferably, security information can also comprise key and/or cryptographic algorithm.Accordingly, in step 202:
If enciphered message comprises key, adopt the key in security information and decipherment algorithm corresponding to cryptographic algorithm that sets in advance, the second data message is decrypted processing;
If enciphered message comprises cryptographic algorithm, the decipherment algorithm that the cryptographic algorithm in the employing security information is corresponding and the key that sets in advance are decrypted processing to the second data message;
If enciphered message comprises key and cryptographic algorithm, adopt key and decipherment algorithm corresponding to cryptographic algorithm in security information, the second data message is decrypted processing.
If security information does not comprise key and cryptographic algorithm, in step 202, adopt the key and decipherment algorithm corresponding to cryptographic algorithm that set in advance, the second data message is decrypted processing.
Preferably, if the user arranges coding parameter, the decoding parametric corresponding according to user configured coding parameter, decode to the two-dimension code of storage.
If the user does not arrange coding parameter, according to decoding parametric corresponding to coding parameter that sets in advance, the two-dimension code of storage is decoded.
Wherein, Fig. 1 and Fig. 2 can synthesize a flow process, form the method for another process information, i.e. first execution in step 101~step 102, then execution in step 201~step 202.
As shown in Figure 3, the method for embodiment of the present invention process information comprises the following steps:
Step 301, judge whether storing data information according to user's execution, if so, execution in step 302; Otherwise, need to determine read data information, and execution in step 310.
The first data message that step 302, the information that the user is inputted or imports are stored as needs.
The contents are as follows (the overstriking italics) of the first data message:
Step 303, according to user's configuration integrate enciphered message.
Wherein, whenever execution that step 303 can be between step 302~step 305.
Step 304, be that the first data message distributes a unique message identification.Such as 1231256343543545345.
Step 305, judge whether that according to enciphered message needs are encrypted processing, if so, execution in step 306; Otherwise, execution in step 307.
Step 306, according to key and cryptographic algorithm, the first data message is encrypted processing, obtain the second data message of actual storage, and execution in step 308.
Step 307, with the first data message as the second data message, and execution in step 308.
Step 308, according to coding parameter, the message identification of the first data message and the second data message are carried out the two-dimension code coding and process, generate and store two-dimension code.
Such as the two-dimension code type is the QR code, error-correction level is L (7%), and module pixel is 4.
Step 309, set up message identification that read data information uses and the corresponding relation of security information, and this corresponding relation is stored in encrypting database into process ends.
Wherein, whenever execution that step 309 can be after information generated sign and security information.
Step 310, according to decoding parametric, the two-dimension code of the storage that the user is selected is decoded, and obtains the second data message of message identification and actual storage.
Step 311, in the corresponding relation of canned data sign and security information, determine security information corresponding to message identification that decoding obtains from encrypting database.
The security information that step 312, basis are determined judges whether that needs are decrypted processing, and if so, execution in step 313; Otherwise, execution in step 314.
Step 313, according to key and decipherment algorithm corresponding to cryptographic algorithm, the second data message is decrypted processing, obtain the first data message, and execution in step 315.
Step 314, the second data message that decoding is obtained are as the first data message, and execution in step 315.
The contents are as follows (the overstriking italics) of the first data message:
Step 315, judge whether the user needs the data message that obtains is updated, and if so, execution in step 316; Otherwise, process ends.
The first data message that step 316, the information that the user is inputted or imports are stored as needs.
The contents are as follows (the overstriking italics) of the first data message:
Step 317, according to user's configuration integrate enciphered message.
Wherein, whenever execution that step 317 can be between step 316~step 319.
Step 318, be that the first data message distributes a unique message identification.Such as 90124354335465469856.
Step 319, judge whether that according to enciphered message needs are encrypted processing, if so, execution in step 320; Otherwise, execution in step 321.
Step 320, according to key and cryptographic algorithm, the first data message is encrypted processing, obtain the second data message of actual storage, and execution in step 322.
Step 321, with the first data message as the second data message, and execution in step 222.
Step 322, according to coding parameter, the message identification of the first data message and the second data message are carried out the two-dimension code coding and process, generate and store two-dimension code.
Such as the two-dimension code type is the QR code, error-correction level is H (30%), and module pixel is 5 (being picture pixel 265*265).
Step 323, set up message identification that read data information uses and the corresponding relation of security information, and this corresponding relation is stored in encrypting database into process ends.
Based on same inventive concept, a kind of equipment of storing information also is provided in the embodiment of the present invention, because the principle that this equipment is dealt with problems is similar to the method for embodiment of the present invention storage information, so the enforcement of this equipment can referring to the enforcement of method, repeat part and repeat no more.
As shown in Figure 4, the equipment of embodiment of the present invention storage information comprises: the first determination module 40 and the first processing module 41.
The first determination module 40 is used for determining the second data message of actual storage according to the security information of user's setting and the first data message of needs storage;
The first processing module 41 is used for that the message identification of the first data message and the second data message are carried out the two-dimension code coding and processes, and generates and stores two-dimension code, and sets up and store message identification that read data information uses and the corresponding relation of security information.
Preferably, the first determination module 40 after definite need to being encrypted, is encrypted processing to the first data message according to security information, obtains the second data message; According to security information, after determining not need to be encrypted, with the first data message as the second data message.
Preferably, if enciphered message comprises key, the first determination module 40 adopts the key in security information and the cryptographic algorithm that sets in advance, and the first data message is encrypted.
Preferably, if enciphered message comprises cryptographic algorithm, the first determination module 40 adopts the cryptographic algorithm in security information and the key that sets in advance, and the first data message is encrypted.
Preferably, if enciphered message comprises key and cryptographic algorithm, key and cryptographic algorithm that the first determination module 40 adopts in security information are encrypted the first data message.
Preferably, if security information does not comprise key and cryptographic algorithm, the first determination module 40 adopts key and the cryptographic algorithm that sets in advance, and the first data message is encrypted.
Preferably, the first processing module 41 is decoded to the two-dimension code of storage according to the decoding parametric that sets in advance or user configured coding parameter is corresponding.
Based on same inventive concept, a kind of equipment of reading information also is provided in the embodiment of the present invention, because the principle that this equipment is dealt with problems is similar to the method for embodiment of the present invention reading information, so the enforcement of this equipment can referring to the enforcement of method, repeat part and repeat no more.
As shown in Figure 5, the equipment of embodiment of the present invention reading information comprises: decoder module 50, the second determination module 51 and the second processing module 52.
Decoder module 50 is used for the two-dimension code of storage is decoded, and obtains the second data message of message identification and actual storage;
The second determination module 51 is used for the corresponding relation according to canned data sign and security information, determines security information corresponding to message identification that decoding obtains;
The second processing module 52 is used for according to security information and the second data message, need to determine the first data message of storage.
Preferably, the second processing module 52 after definite need to being decrypted, is decrypted processing to the second data message according to security information, obtains the first data message; According to security information, after determining not need to be decrypted, with the second data message as the first data message.
Preferably, if enciphered message comprises key, the second processing module 52 adopts the key in security information and decipherment algorithm corresponding to cryptographic algorithm that sets in advance, and the second data message is decrypted processing.
Preferably, if enciphered message comprises cryptographic algorithm, the second processing module 52 adopts decipherment algorithm corresponding to the cryptographic algorithm in security information and the key that sets in advance, and the second data message is decrypted processing.
Preferably, if enciphered message comprises key and cryptographic algorithm, key and decipherment algorithm corresponding to cryptographic algorithm that the second processing module 52 adopts in security information are decrypted processing to the second data message.
Preferably, if security information does not comprise key and cryptographic algorithm, the second processing module 52 adopts key and decipherment algorithm corresponding to cryptographic algorithm that sets in advance, and the second data message is decrypted processing.
Preferably, decoder module 50 is decoded to the two-dimension code of storage according to the decoding parametric that sets in advance or user configured coding parameter is corresponding.
In force, the equipment of storage information and the function of equipment of the breath of winning the confidence can be combined in an entity, thus the module in the equipment of the module in the equipment of storage information and reading information can be combined in an entity, module corresponding to choice for use as required.
The preservation of two-dimension code graphic file is simple and convenient, file can be printed with printer, is clipped in photograph album, and wallet is medium, also the two-dimension code graphic file can be deposited in USB flash disk, PC or mobile phone.
The described scheme of the embodiment of the present invention is not limited to the plain text information such as code data, and the scheme that the Word messages such as audio frequency, video, books in libraries can use the embodiment of the present invention to provide is equally stored.
Those skilled in the art should understand, embodiments of the invention can be provided as method, system or computer program.Therefore, the present invention can adopt complete hardware implementation example, implement software example or in conjunction with the form of the embodiment of software and hardware aspect fully.And the present invention can adopt the form that wherein includes the upper computer program of implementing of computer-usable storage medium (including but not limited to magnetic disk memory, CD-ROM, optical memory etc.) of computer usable program code one or more.
The present invention is that reference is described according to process flow diagram and/or the block scheme of method, equipment (system) and the computer program of the embodiment of the present invention.Should understand can be by the flow process in each flow process in computer program instructions realization flow figure and/or block scheme and/or square frame and process flow diagram and/or block scheme and/or the combination of square frame.Can provide these computer program instructions to the processor of multi-purpose computer, special purpose computer, Embedded Processor or other programmable data processing device to produce a machine, make the instruction of carrying out by the processor of computing machine or other programmable data processing device produce to be used for the device of realizing in the function of flow process of process flow diagram or a plurality of flow process and/or square frame of block scheme or a plurality of square frame appointments.
These computer program instructions also can be stored in energy vectoring computer or the computer-readable memory of other programmable data processing device with ad hoc fashion work, make the instruction that is stored in this computer-readable memory produce the manufacture that comprises command device, this command device is realized the function of appointment in flow process of process flow diagram or a plurality of flow process and/or square frame of block scheme or a plurality of square frame.
These computer program instructions also can be loaded on computing machine or other programmable data processing device, make on computing machine or other programmable devices and to carry out the sequence of operations step producing computer implemented processing, thereby be provided for realizing the step of the function of appointment in flow process of process flow diagram or a plurality of flow process and/or square frame of block scheme or a plurality of square frame in the instruction of carrying out on computing machine or other programmable devices.
Although described the preferred embodiments of the present invention, in a single day those skilled in the art get the basic creative concept of cicada, can make other change and modification to these embodiment.So claims are intended to all changes and the modification that are interpreted as comprising preferred embodiment and fall into the scope of the invention.
Obviously, those skilled in the art can carry out various changes and modification and not break away from the spirit and scope of the present invention the present invention.Like this, if within of the present invention these are revised and modification belongs to the scope of claim of the present invention and equivalent technologies thereof, the present invention also is intended to comprise these changes and modification interior.