Summary of the invention
The embodiment of the present invention provides a kind of Quick Response Code generation, using method, Quick Response Code maker and subscriber equipment, can generate and have identical content and resolution but the less Quick Response Code of size.
First aspect present invention provides a kind of two-dimensional code generation method, comprising:
Obtain target URL;
Convert described target URL to short link URL;
Described short link URL is changed into Quick Response Code.
In conjunction with the first aspect of the embodiment of the present invention, in the first implementation of the first aspect of the embodiment of the present invention, describedly convert target URL to short link URL and specifically comprise:
According to the corresponding relation of URL and short link URL, inquire about the short link URL that described target URL is corresponding;
Convert described target URL to the short link URL corresponding with it.
In conjunction with the first implementation of the first aspect of the embodiment of the present invention, in the second implementation of the first aspect of the embodiment of the present invention, described two-dimensional code generation method also comprises:
When described target URL upgrades, adjust the corresponding relation of described URL and short link URL.
In conjunction with the second implementation of the first aspect of the embodiment of the present invention or the first implementation of first aspect or first aspect, described target URL converted to before short link URL and comprised:
Obtain the length of described target URL, judge whether this length is greater than presetting length, if so, trigger the described step that target URL is converted to short link URL.
Second aspect present invention provides a kind of Quick Response Code using method, comprising:
User terminal scanning Quick Response Code;
Obtain the short link URL in described Quick Response Code;
Convert described short link URL to target URL;
Access described target URL resource pointed.
In conjunction with the second aspect of the embodiment of the present invention, in the first implementation of the second aspect of the embodiment of the present invention, describedly convert short link URL to target URL and comprise:
According to the corresponding relation of short link URL and URL, inquire about target URL corresponding to described short link URL;
Convert described short link URL to the target URL corresponding with it.
Third aspect present invention provides a kind of Quick Response Code maker, comprising:
Acquisition module, for obtaining target URL;
Modular converter, for converting described target URL to short link URL;
Generation module, for changing into Quick Response Code by the URL from described modular converter.
The third aspect in conjunction with the embodiment of the present invention, in the first implementation of the third aspect of the embodiment of the present invention, described modular converter is specifically for according to the corresponding relation of URL and short link URL, inquire about the short link URL that described target URL is corresponding, and convert this target URL to the short link URL corresponding with it.
Fourth aspect present invention provides a kind of subscriber equipment, comprising:
Scan module, for scanning Quick Response Code;
Acquisition module, for obtaining the short link URL of described Quick Response Code;
Modular converter, for converting described short link URL to target URL;
Access modules, for accessing described target URL resource pointed.
Fourth aspect in conjunction with the embodiment of the present invention, in the first implementation of the fourth aspect of the embodiment of the present invention, described modular converter is specifically for according to the corresponding relation of described short link URL and URL, inquire about target URL corresponding to this short link URL, and convert this short link URL to the target URL corresponding with it.
As can be seen from the above technical solutions, the embodiment of the present invention has the following advantages:
In the embodiment of the present invention, by being first converted to short link URL, longer target URL changes into again Quick Response Code, compare directly this longer target URL is converted into Quick Response Code, it is less that the Quick Response Code obtaining in the present invention has identical content and resolution and size, if and the content that need replacing Quick Response Code refers to after this Quick Response Code of printing is without printing again, meets referred to URL but directly change short chain.
Embodiment
The embodiment of the present invention provides a kind of Quick Response Code generation, using method, Quick Response Code maker and subscriber equipment, can generate and have identical content and resolution but the less Quick Response Code of size.
In order to make those skilled in the art person understand better the present invention program, below in conjunction with the accompanying drawing in the embodiment of the present invention, technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is only the embodiment of a part of the present invention, rather than whole embodiment.Embodiment based in the present invention, those of ordinary skills, not making the every other embodiment obtaining under creative work prerequisite, should belong to the scope of protection of the invention.
Refer to Fig. 1, in the embodiment of the present invention, embodiment of two-dimensional code generation method comprises:
101, obtain target URL;
When needs generate Quick Response Code for certain target URL, Quick Response Code maker can first obtain this target URL, and this target URL refers to the address of the resource that user will link.
102, convert target URL to short link URL;
In order to reduce the content that needs printing, Quick Response Code maker can be converted to short link URL by the target URL getting in step 101, and the length of this short link URL is less than the length of this target URL.
103, short link URL is changed into Quick Response Code;
After completing conversion, Quick Response Code maker can transform into Quick Response Code for follow-up by this short link URL.
In the present embodiment, by target URL is first converted to short link URL, change into Quick Response Code again, compare directly this longer target URL is converted into Quick Response Code, it is less that the Quick Response Code obtaining in the present embodiment has identical content and resolution and size.
Above in embodiment, convert target URL to short link URL and have several different methods, in practice, can convert this target URL to short link URL according to the corresponding relation of target URL and short link URL, below conversion method in the embodiment of the present invention is described.Refer to Fig. 2, in the embodiment of the present invention, another embodiment of two-dimensional code generation method comprises:
201, obtain target URL;
When needs generate Quick Response Code for certain target URL, Quick Response Code maker can first obtain this target URL, and this target URL refers to the address of the resource that user will link.
202, according to the corresponding relation of URL and short link URL, the short link URL that query aim URL is corresponding;
By pre-defined rule, preset the mapping table of URL and short link URL.During inquiry, in this mapping table, find the URL consistent with target URL, get the short link URL corresponding with this URL simultaneously.
203, target URL is converted to the short link URL corresponding with it;
In order to reduce the content that needs printing, Quick Response Code maker can be converted to short link URL by the target URL getting in step 201, and the length of this short link URL is less than the length of this target URL.
204, short link URL is changed into Quick Response Code;
After completing conversion, Quick Response Code maker can transform into Quick Response Code for follow-up by this short link URL.
Concrete example, refers to following table one, and table one is an example of the corresponding relation of URL and short link URL:
Table one
In practice, get target URL for " http://wap.kuaidi100.com/q.jsp rand=890986521 & id=shentong & fromWeb=null & postid=668380629842 & sub=%B2%E9%D1%AF ".According to URL represented in upper table one and the corresponding relation of short link URL, can inquire short being linked as that this target URL is corresponding " http://ckd.im/boOvN ".Convert this target URL to the short link URL corresponding with it " http://ckd.im/boOvN ", then this short link URL is converted to Quick Response Code.
Above in embodiment, after converting target URL to short link URL, again this short link URL is changed into Quick Response Code, like this, in the situation that occurs changing URL, can directly change the corresponding relation that URL and short chain connect, below replacing method in the embodiment of the present invention is described.Refer to Fig. 3, in the embodiment of the present invention, another embodiment of two-dimensional code generation method comprises:
301, obtain target URL.
When needs generate Quick Response Code for certain target URL, Quick Response Code maker can first obtain this target URL, and this target URL refers to the address of the resource that user will link.
302, according to the corresponding relation of URL and short link URL, the short link URL that query aim URL is corresponding.
By pre-defined rule, preset the mapping table of URL and short link URL.During inquiry, in this mapping table, find the URL consistent with target URL, get the short link URL corresponding with this URL simultaneously.
303, target URL is converted to the short link URL corresponding with it.
In order to reduce the content that needs printing, Quick Response Code maker can be converted to short link URL by the target URL getting in step 301, and the length of this short link URL is less than the length of this target URL.
304, short link URL is changed into Quick Response Code.
After completing conversion, Quick Response Code maker can transform into Quick Response Code for follow-up by this short link URL.
305,, when target URL upgrades, adjust the corresponding relation of URL and short link URL.
When the resource that will point to when Quick Response Code changes, without regenerating and printing Quick Response Code, only need to adjust the corresponding relation of URL and short link URL, the URL that the represented short link URL sensing of this Quick Response Code will be changed over.
Concrete example, target URL " http://wap.kuaidi100.com/q.jsp rand=890986521 & id=shentong & fromWeb=null & postid=668380629842 & sub=%B2%E9%D1%AF " and short chain meet " http://ckd.im/boOvN " and are corresponding relation, certain printing material publication and printing will be connect by this short chain the Quick Response Code that " http://ckd.im/boOvN " generates.When the corresponding URL of this Quick Response Code makes " http://wenku.baidu.com/link url=IWUCtPiX1PJ9LPIfVxQKOoAhwoWSLDZcd XOOTJ1GXS8h_hELQjmY6cVxTYbRccw-X4cRxAwN0fMr4V4OfGpk1qO1S hjI ifFDE6J3JC1k9eS " into from " http://wap.kuaidi100.com/q.jsp rand=890986521 & id=shentong & fromWeb=null & postid=668380629842 & sub=%B2%E9%D1%AF ", without again printing new Quick Response Code, only need to change the URL that meets " http://ckd.im/boOvN " with short chain and be corresponding relation into " http://wenku.baidu.com/link url=IWUCtPiX1PJ9LPIfVxQKOoAhwoWSLDZcd XOOTJ1GXS8h_hELQjmY6cVxTYbRccw-X4cRxAwN0fMr4V4OfGpk1qO1S hjI ifFDE6J3JC1k9eS ".
In the present embodiment, if print, need to change content that Quick Response Code refers to after this Quick Response Code and only need change short chain and meet referred to URL, without printing again, greatly facilitate user, saved resource.
In the above in embodiment, after getting target URL, directly inquire about the short link URL corresponding with this target URL, in practice, part target URL itself is exactly that short chain connects, without inquiry, can directly be converted to Quick Response Code, below determination methods in the embodiment of the present invention is described.Refer to Fig. 4, in the embodiment of the present invention, another embodiment of two-dimensional code generation method comprises:
401, obtain target URL;
When needs generate Quick Response Code for certain target URL, Quick Response Code maker can first obtain this target URL, and this target URL refers to the address of the resource that user will link.
402, obtain the length of target URL, judge whether this length is greater than presetting length, if so, trigger step 403, if not, trigger step 404;
The length of different URL is different, has partial-length longer, need first convert short link URL to, the size of the Quick Response Code being converted to reduce; And having partial-length shorter, this URL itself is exactly that short chain connects like this, without conversion, can directly generate Quick Response Code.
403, target URL is converted to the short link URL corresponding with it.
In order to reduce the content that needs printing, Quick Response Code maker can be converted to short link URL by the target URL getting in step 401, and the length of this short link URL is less than the length of this target URL.
404, short link URL is changed into Quick Response Code.
After completing conversion, Quick Response Code maker can transform into Quick Response Code for follow-up by this short link URL.
After getting the length of target URL, first according to its length, judge the whether short link URL of this target URL, if so, directly this target URL is changed into Quick Response Code, if not, change into again Quick Response Code after now converting this target URL to short link URL.
In the present embodiment, can avoid target URL is the situation of query conversion operation of also carrying out in short chain situation about connecing.
For ease of understanding, with a concrete application scenarios, collecting method in the embodiment of the present invention is specifically described below:
Get target URL for " http://wap.kuaidi100.com/q.jsp rand=890986521 & id=shentong & fromWeb=null & postid=668380629842 & sub=%B2%E9%D1%AF ".Obtain the length of this target URL, judge that this length is greater than presetting length, therefore according to corresponding relation, inquiring the short link URL that this target URL is corresponding is " http://ckd.im/boOvN ", and this target URL is converted to this short link URL.This short link URL " http://ckd.im/boOvN " is converted into Quick Response Code.
When the target URL corresponding when this Quick Response Code need be updated to " http://wenku.baidu.com/link url=IWUCtPiX1PJ9LPIfVxQKOoAhwoWSLDZcd XOOTJ1GXS8h_hELQjmY6cVxTYbRccw-X4cRxAwN0fMr4V4OfGpk1qO1S hjI ifFDE6J3JC1k9eS ", adjust the corresponding URL of short link URL for " http://wenku.baidu.com/link url=IWUCtPiX1PJ9LPIfVxQKOoAhwoWSLDZcd XOOTJ1GXS8h_hELQjmY6cVxTYbRccw-X4cRxAwN0fMr4V4OfGpk1qO1S hjI ifFDE6J3JC1k9eS ".
Above the two-dimensional code generation method in the embodiment of the present invention is described, below the Quick Response Code maker in the embodiment of the present invention is described, refer to Fig. 5, in the embodiment of the present invention, embodiment of Quick Response Code maker comprises:
Acquisition module 501, for obtaining target URL.
When needs generate Quick Response Code for certain target URL, acquisition module 501 can first obtain this target URL, and this target URL refers to the address of the resource that user will link.
Modular converter 502, for converting target URL to short link URL.
In order to reduce the content that needs printing, the target URL that modular converter 502 can get acquisition module 501 is converted to short link URL, and the length of this short link URL is less than the length of this target URL.
Generation module 503, for changing into Quick Response Code by the URL from modular converter.
After completing conversion, generation module 503 can transform into Quick Response Code for follow-up by this short link URL.
In the present embodiment, by target URL is first converted to short link URL, change into Quick Response Code again, compare directly this longer target URL is converted into Quick Response Code, it is less that the Quick Response Code obtaining in the present embodiment has identical content and resolution and size.
In the present embodiment, modular converter 502 converts target URL to short link URL for realization several different methods.Preferably, modular converter 502 can be for according to the corresponding relation of URL and short link URL, the short link URL that query aim URL is corresponding, and convert this target URL to the short link URL corresponding with it.
Concrete example, refers to following table two, and table two is examples for the corresponding relation of the interior stored URL of modular converter 502 and short link URL:
Table two
In practice, acquisition module 501 gets target URL for " http://wap.kuaidi100.com/q.jsp rand=890986521 & id=shentong & fromWeb=null & postid=668380629842 & sub=%B2%E9%D1%AF ".The URL that modular converter 502 is stored according to it and the corresponding relation of short link URL, can inquire short being linked as that this target URL is corresponding " http://ckd.im/boOvN ".Modular converter 502 converts this target URL to the short link URL corresponding with it " http://ckd.im/boOvN ", and generation module 503 is converted to Quick Response Code by this short link URL again.
Described a kind of two-dimensional code generation method above, below the using method of this Quick Response Code has been described.Refer to Fig. 6, in the embodiment of the present invention, the using method of Quick Response Code embodiment comprises:
601, user terminal scanning Quick Response Code.
User terminal can be that mobile phone, panel computer or other can scan the terminal of Quick Response Code, at this, does not limit.
602, obtain the short link URL in Quick Response Code.
Information in identification Quick Response Code, converts scanned Quick Response Code to short link URL, for follow-up use.
603, convert short link URL to target URL.
This target URL refers to the address of the resource that user will link.The length of this target URL is greater than the length of short link URL, and like this, user terminal can obtain by the Quick Response Code of scanning reduced size the target URL that length is larger.
604, access destination URL resource pointed.
Concrete example, mobile telephone scanning Quick Response Code, get the short link URL " http://ckd.im/boOvN " in this Quick Response Code, then this short link URL is converted to target " http://wap.kuaidi100.com/q.jsp rand=890986521 & id=shentong & fromWeb=null & postid=668380629842 & sub=%B2%E9%D1%AF ", and access this target URL resource pointed.
Above in embodiment, convert short link URL to target URL and have several different methods, in practice, can convert this short link URL to target URL according to the corresponding relation of short link URL and target URL, below conversion method in the embodiment of the present invention is described.Refer to Fig. 7, in the embodiment of the present invention, another embodiment of the using method of Quick Response Code comprises:
701, user terminal scanning Quick Response Code;
User terminal can be that mobile phone, panel computer or other can scan the terminal of Quick Response Code, at this, does not limit.
702, obtain the short link URL in Quick Response Code;
Information in identification Quick Response Code, converts scanned Quick Response Code to short link URL, for follow-up use.
703,, according to the corresponding relation of short link URL and URL, inquire about target URL corresponding to short link URL;
By pre-defined rule, preset the mapping table of short link URL and URL.During inquiry, in this mapping table, find the URL consistent with short link URL, get the URL corresponding with this short link URL simultaneously, this URL is target URL.
704, convert short link URL to target URL;
This target URL refers to the address of the resource that user will link.The length of this target URL is greater than the length of short link URL, and like this, user terminal can obtain by the Quick Response Code of scanning reduced size the target URL that length is larger.
705, access destination URL resource pointed.
Concrete example, refers to following table three, and table three is examples for the corresponding relation of URL and short link URL:
Table three
In practice, the short link URL getting after mobile telephone scanning Quick Response Code in Quick Response Code is " http://ckd.im/boOvN ".According to short link URL represented in upper table two and the corresponding relation of URL, can inquire target URL corresponding to this short link URL for " http://wap.kuaidi100.com/q.jsp rand=890986521 & id=shentong & fromWeb=null & postid=668380629842 & sub=%B2%E9%D1%AF ".Mobile phone converts this short link URL to the target URL corresponding with it, visits again this target URL resource pointed.
Above the Quick Response Code using method in the embodiment of the present invention is described, below the subscriber equipment in the embodiment of the present invention is described, refer to Fig. 8, in the embodiment of the present invention, embodiment of subscriber equipment comprises:
Scan module 801, for scanning Quick Response Code.
Acquisition module 802, for obtaining the short link URL of Quick Response Code.
Modular converter 803, for converting short link URL to target URL.
Access modules 804, for access destination URL resource pointed.
Concrete example, subscriber equipment is mobile phone.Certainly, in practice, subscriber equipment can be also that panel computer or other can scan the equipment of Quick Response Code, at this, does not limit.Mobile telephone scanning Quick Response Code, get the short link URL " http://ckd.im/boOvN " in this Quick Response Code, then this short link URL is converted to target URL " http://wap.kuaidi100.com/q.jsp rand=890986521 & id=shentong & fromWeb=null & postid=668380629842 & sub=%B2%E9%D1%AF ", and access this target URL resource pointed.
In the present embodiment, modular converter 803 converts short link URL to target URL for realization several different methods, preferably, modular converter 803 can be for according to the corresponding relation of short link URL and URL, inquire about target URL corresponding to this short link URL, and convert this short link URL to the target URL corresponding with it.
Concrete example, refers to following table four, and table four is examples for the corresponding relation of the interior stored URL of modular converter 803 and short link URL:
Table four
In practice, the scan module 801 scanning Quick Response Codes of mobile phone, the short link URL that acquisition module 802 obtains in this Quick Response Code is " http://ckd.im/boOvN ".The short link URL that modular converter 803 is stored according to it and the corresponding relation of URL, inquire target URL corresponding to this short link URL and be
“http://wap.kuaidi100.com/q.jsp?rand=890986521&id=shentong&fromWeb=null&postid=668380629842&sub=%B2%E9%D1%AF”。Modular converter 803 converts this short link URL to the target URL corresponding with it, and access modules 804 visits again this target URL resource pointed.
Those skilled in the art can be well understood to, for convenience and simplicity of description, the system of foregoing description, the specific works process of device and unit, can, with reference to the corresponding process in preceding method embodiment, not repeat them here.
In the several embodiment that provide in the application, should be understood that, disclosed system, apparatus and method, can realize by another way.For example, device embodiment described above is only schematic, for example, the division of described unit, be only that a kind of logic function is divided, during actual realization, can have other dividing mode, for example a plurality of unit or assembly can in conjunction with or can be integrated into another system, or some features can ignore, or do not carry out.Another point, shown or discussed coupling each other or direct-coupling or communication connection can be by some interfaces, indirect coupling or the communication connection of device or unit can be electrically, machinery or other form.
The described unit as separating component explanation can or can not be also physically to separate, and the parts that show as unit can be or can not be also physical locations, can be positioned at a place, or also can be distributed in a plurality of network element.Can select according to the actual needs some or all of unit wherein to realize the object of the present embodiment scheme.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, can be also that the independent physics of unit exists, and also can be integrated in a unit two or more unit.Above-mentioned integrated unit both can adopt the form of hardware to realize, and also can adopt the form of SFU software functional unit to realize.
If the form of SFU software functional unit of usining described integrated unit realizes and during as production marketing independently or use, can be stored in a computer read/write memory medium.Understanding based on such, the all or part of of the part that technical scheme of the present invention contributes to prior art in essence in other words or this technical scheme can embody with the form of software product, this computer software product is stored in a storage medium, comprise that some instructions are with so that a computer equipment (can be personal computer, server, or the network equipment etc.) carry out all or part of step of method described in each embodiment of the present invention.And aforesaid storage medium comprises: various media that can be program code stored such as USB flash disk, portable hard drive, ROM (read-only memory) (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disc or CDs.
The above, above embodiment only, in order to technical scheme of the present invention to be described, is not intended to limit; Although the present invention is had been described in detail with reference to previous embodiment, those of ordinary skill in the art is to be understood that: its technical scheme that still can record aforementioned each embodiment is modified, or part technical characterictic is wherein equal to replacement; And these modifications or replacement do not make the essence of appropriate technical solution depart from the spirit and scope of various embodiments of the present invention technical scheme.