Summary of the invention
The embodiment of the invention provides a kind of method of two-dimension code scanning, can start fast two-dimension code, has improved communication efficient.
Embodiment of the invention first aspect provides a kind of method of two-dimension code scanning, comprising:
Obtain the Monitoring Data that sensor rocks terminal in the terminal;
Preset the two-dimension code enabling gate in limited time when described Monitoring Data reaches, start and the display screen two-dimensional code display by described terminal scans the interface;
Obtain the 2 D code information that the scanister of described terminal scans.
In conjunction with first aspect, in the possible implementation of the first, describedly obtain the Monitoring Data that sensor rocks terminal in the terminal and comprise: obtain the acceleration information that acceleration transducer rocks terminal in the terminal.
In conjunction with the possible implementation of first aspect the first, in the possible implementation of the second, describedly when reaching, described Monitoring Data presets the two-dimension code enabling gate in limited time, start and the display screen two-dimensional code display by described terminal scans the interface, comprise: when the acceleration information on terminal any one axle on the locus be greater than or equal to one preset acceleration value the time, start and the display screen two-dimensional code display by described terminal scans the interface.
In conjunction with first aspect, implementation or the possible implementation of the second that first aspect the first is possible, in the third possible implementation, after the described step of obtaining the 2 D code information that described terminal scans, also comprise:
Whether identify described 2 D code information complete;
When described 2 D code information is complete, send the successful prompting message of scanning;
When described two-dimension code is imperfect, send the failed prompting message of scanning.
In conjunction with the third possible implementation of first aspect, in the 4th kind of possible implementation, described transmission scans after the step of failed prompting message, also comprises: again obtain 2 D code information.
Embodiment of the invention second aspect provides a kind for the treatment of apparatus, comprising:
Acquiring unit is used for obtaining the Monitoring Data that the terminal sensor rocks terminal;
Start unit is used for presetting the two-dimension code enabling gate in limited time when Monitoring Data that described acquiring unit gets access to reaches, and starts and the display screen two-dimensional code display by described terminal scans the interface;
Described acquiring unit also starts the 2 D code information that scans behind the two-dimension code scanning interface for the scanister that obtains terminal at described start unit.
In conjunction with second aspect, in the possible implementation of the first,
Described acquiring unit is used for obtaining the acceleration information that the terminal acceleration transducer rocks terminal.
In conjunction with the possible implementation of second aspect the first, in the possible implementation of the second,
Described start unit, be used for when the acceleration information on terminal any one axle on the locus that described acquiring unit obtains be greater than or equal to one preset acceleration value the time, start and the display screen two-dimensional code display by described terminal scans the interface.
In conjunction with second aspect, second aspect the first or the possible implementation of the second, in the third possible implementation, described treating apparatus also comprises: recognition unit and transmitting element,
Described recognition unit, whether be used for identifying the 2 D code information that described acquiring unit obtains complete;
Described transmitting element is used for identifying described 2 D code information when complete when described recognition unit, sends and scans successful prompting message; Identify described 2 D code information when imperfect when described recognition unit, send the failed prompting message of scanning.
In conjunction with the third possible implementation of second aspect, in the 4th in the possible implementation,
Described acquiring unit also is used for again obtaining 2 D code information after described transmitting element sends the failed prompting message of scanning.
The embodiment of the invention third aspect provides a kind of terminal, comprising: sensor, display screen, scanister and treating apparatus;
Described sensor is used for monitoring terminal and rocks;
Described display screen is used for two-dimensional code display scanning interface;
Described scanister is used for the scanning 2 D code information;
Described treating apparatus is used for obtaining the Monitoring Data that the terminal sensor rocks terminal; Preset the two-dimension code enabling gate in limited time when described Monitoring Data reaches, start and the display screen two-dimensional code display by described terminal scans the interface; Obtain the 2 D code information that the scanister of described terminal scans.
The embodiment of the invention adopts obtains the Monitoring Data that sensor rocks terminal in the terminal; Preset the two-dimension code enabling gate in limited time when described Monitoring Data reaches, start and the display screen two-dimensional code display by described terminal scans the interface; Obtain the 2 D code information that the scanister of described terminal scans.Compared with prior art, the embodiment of the invention is rocked the two-dimension code scanning interface of just can breathing out by monitoring terminal, has accelerated the speed that two-dimension code is breathed out, and then has effectively improved the efficient of linking up.
Embodiment
The embodiment of the invention provides a kind of method of two-dimension code scanning, can start fast two-dimension code, has improved communication efficient.The embodiment of the invention also provides corresponding terminal.Below be elaborated respectively.
The terminal that terminal in the embodiment of the invention can be convenient to rock for mobile phone, palm PC (PAD) etc., the treating apparatus in the embodiment of the invention can be for realizing the functional module of all functions in the embodiment of the invention in the terminal.
Consult Fig. 1, the treating apparatus angle of the embodiment of the invention from terminal described, and an embodiment of the method for the two-dimension code scanning that the embodiment of the invention provides comprises:
101, obtain the Monitoring Data that sensor rocks terminal in the terminal.
102, preset the two-dimension code enabling gate in limited time when described Monitoring Data reaches, start and the display screen two-dimensional code display by described terminal scans the interface.
103, obtain the 2 D code information that the scanister of described terminal scans.
Scanister can be camera.
The embodiment of the invention adopts obtains the Monitoring Data that sensor rocks terminal in the terminal; Preset the two-dimension code enabling gate in limited time when described Monitoring Data reaches, start and the display screen two-dimensional code display by described terminal scans the interface; Obtain the 2 D code information that the scanister of described terminal scans.Compared with prior art, the embodiment of the invention is rocked the two-dimension code scanning interface of just can breathing out by monitoring terminal, has accelerated the speed that two-dimension code is breathed out, thereby has effectively raised communication efficient.
Alternatively, on the basis of embodiment corresponding to above-mentioned Fig. 1, among another embodiment of the method for two-dimension code that the embodiment of the invention provides scanning, describedly obtain the Monitoring Data that sensor rocks terminal in the terminal, comprising: obtain the acceleration information that acceleration transducer rocks terminal in the terminal.
Alternatively, on the basis of optional embodiment corresponding to above-mentioned Fig. 1,
Describedly when reaching, described Monitoring Data presets the two-dimension code enabling gate in limited time, start and the display screen two-dimensional code display by described terminal scans the interface, comprise: when the acceleration information on terminal any one axle on the locus be greater than or equal to one preset acceleration value the time, start and the display screen two-dimensional code display by described terminal scans the interface.
Alternatively, on the basis of any optional embodiment corresponding to above-mentioned Fig. 1 and Fig. 1, after the described step of obtaining the 2 D code information that described terminal scans, whether also comprise: it is complete to identify described 2 D code information; When described 2 D code information is complete, send the successful prompting message of scanning; When described two-dimension code is imperfect, send the failed prompting message of scanning.
The camera scanning two-dimension code of terminal, when the two-dimension code that scans was imperfect or image blurring, treating apparatus can not get access to complete 2 D code information.
Treating apparatus sends the scanning success or scans failed prompting message, and prompting message can show by display screen, also can broadcast out by loudspeaker.
After the step that sends the failed prompting message of scanning, also comprise: again obtain 2 D code information.
The scheme of the two-dimension code scanning that a plurality of embodiment of the present invention provide, the two-dimension code of can breathing out fast scans the interface, thereby effectively raises the efficient of communication.
Be convenient to understand for example, the below describes the use procedure to two-dimension code in detail with the example that is applied as of two-dimension code:
When the information of two-dimension code is card information, after treating apparatus gets access to 2 D code information, store the information such as the name of contact person in this card information, telephone number, permanent address into terminal.So just do not need to input one by one the information on the business card, improved the efficient of linking up.
When 2 D code information is website information, after treating apparatus gets access to 2 D code information, extract this website information, after receiving the network address visit order, can open network address, browse for the user.So just do not need the user to input network address, thereby improved communication efficient.
For ease of understanding, the below describes the method for two-dimension code scanning in the embodiment of the invention in detail take a concrete application scenarios as example:
Sensor monitoring three axle gravity sensing axles, the direction according to measuring is divided into x-axis, y-axis and z-axis, and three axles are orthogonal.
The x axle: parallel with screen and point to the axle on the right, vertically using little corner in (portrait) pattern, laterally using long corner in (landscape) pattern.
Y axle: parallel with screen vertical with the x axle and point to the axle of screen top.
The z axle: when terminal (mobile phone) back side lands when being placed on the desk, the direction that points into the sky is exactly the z axle.
Lower in the raw in terminal, the direction vector of acceleration transducer is to point to the earth's core forever, if the length of vector is 1, we are referred to as 1G at hypothesis.Can regard as under the perfect condition and just hold terminal, the vector of acceleration transducer is (0 ,-1,0), and direction is pointed to the earth's core.Be rotated counterclockwise 90 °, the acceleration transducer vector becomes (1,0,0) another mistake the pin half-twist is become again (0,1,0).If if shake, fall or throw mobile phone, be subject to so inertia effects, acceleration transducer can detect very large power (much larger than 1G) on one or more axles.
The unit of acceleration transducer rreturn value is the m/s^ of unit of acceleration2(the every quadratic power of rice second), have the value of three directions to be respectively:
Values[0]: the x-axis directional acceleration;
Values[1]: the y-axis directional acceleration;
Values[2]: the z-axis directional acceleration;
X wherein, y, the definition of z direction be the lower right corner of the mobile phone that lies in a horizontal plane in be the reference system true origin, the x direction is exactly the horizontal direction of mobile phone, and right for just, the y direction is exactly the horizontal vertical direction of mobile phone, before for just, the z direction is exactly the spatial vertical direction of mobile phone, and the direction of sky is for just, and the direction of the earth is for negative.
So the locus that mobile phone is placed is different, the acceleration of its three direction is also different.Here, the acceleration of three directions is with we traditional acceleration (9.8m/s2) to some extent difference, generally under normal circumstances, just between 9.8 ~ 10, only when shaking mobile phone suddenly, instantaneous acceleration just can increase suddenly or reduce arbitrary axis numerical value maximum.So through actual test, the acceleration value that only needs to monitor arbitrary axle presets acceleration value greater than one, such as 13m/s2In time, just can start and two-dimensional code display scanning interface.
Scanister (as: camera) scanning two-dimension code, on display screen, will demonstrate the picture of two-dimension code, treating apparatus obtains the 2 D code information that scanister scans, if it is clear complete that treating apparatus identifies the picture of scanister shooting, will send the successful prompting message of scanning, if the picture of scanning is unclear or imperfect, treating apparatus can't obtain accurately 2 D code information, will send the failed prompting message of scanning, prompting message can show by display screen, also can play by loudspeaker.
Consult Fig. 2, an embodiment of the treating apparatus that the embodiment of the invention provides comprises:
Acquiringunit 201 is used for obtaining the Monitoring Data that the terminal sensor rocks terminal;
Start unit 202 is used for presetting the two-dimension code enabling gate in limited time when Monitoring Data that described acquiringunit 201 gets access to reaches, and starts and the display screen two-dimensional code display by described terminal scans the interface;
Described acquiringunit 201 also starts the 2 D code information that scans behind the two-dimension codes scanning interfaces for the scanister that obtains terminal at describedstart unit 202.
In the embodiment of the invention, acquiringunit 201 obtains the Monitoring Data that sensor rocks terminal in the terminal; The Monitoring Data that startunit 202 gets access to when described acquiringunit 201 reaches and presets the two-dimension code enabling gate in limited time, starts and the display screen two-dimensional code display by described terminal scans the interface; The scanister that described acquiringunit 201 also obtains terminal starts the 2 D code information that scans behind the two-dimension code scanning interface at described start unit 202.Compared with prior art, the terminal that the embodiment of the invention provides, the two-dimension code of can breathing out fast scanning interface is carried out two-dimension code scanning, thereby is effectively raised communication efficient.
On the basis of embodiment corresponding to above-mentioned Fig. 2, among another embodiment of the treating apparatus that the embodiment of the invention provides,
Described acquiringunit 201 is used for obtaining the acceleration information that the terminal acceleration transducer rocks terminal.
On the basis of optional embodiment corresponding to above-mentioned Fig. 2, among another embodiment of the terminal that the embodiment of the invention provides,
Describedstart unit 202, concrete be used for when the acceleration information on terminal any one axle on the locus that described acquiringunit 201 obtains be greater than or equal to one preset acceleration value the time, start and the display screen two-dimensional code display by described terminal scans the interface.
On the basis of above-described embodiment, consult Fig. 3, another embodiment of the terminal that the embodiment of the invention provides also comprises:recognition unit 203 and transmittingelement 204,
Describedrecognition unit 203, whether be used for identifying the 2 D code information that described acquiringunit 201 obtains complete;
Described transmittingelement 204 is used for sending the successful prompting message of scanning when the described 2 D code information of describedrecognition unit 203 identifications is complete; Identify described 2 D code information when imperfect when described recognition unit, send the failed prompting message of scanning.
On the basis of embodiment corresponding to above-mentioned Fig. 3, consult Fig. 4, among another embodiment of the treating apparatus that the embodiment of the invention provides, described acquiringunit 201, also be used for after described transmittingelement 204 sends the failed prompting message of scanning, again obtaining 2 D code information.
The treating apparatus that the above a plurality of embodiment of the present invention provide, the two-dimension code of can breathing out fast scanning interface is carried out two-dimension code scanning, thereby is effectively raised communication efficient.
Consult Fig. 5, an embodiment of the terminal that the embodiment of the invention provides comprises:sensor 10, treatingapparatus 20display screens 30 andscanister 40;
Describedsensor 10 is used for monitoring terminal and rocks;
Describeddisplay screen 30 is used for two-dimensional code display scanning interface;
Describedscanister 40 is used for the scanning 2 D code information;
Described treatingapparatus 20 is used for obtaining the Monitoring Data that the terminal sensor rocks terminal; Preset the two-dimension code enabling gate in limited time when described Monitoring Data reaches, start and the display screen two-dimensional code display by described terminal scans the interface; Obtain the 2 D code information that the scanister of described terminal scans.
The terminal that the embodiment of the invention provides, the two-dimension code of can breathing out fast scanning interface is carried out two-dimension code scanning, thereby is effectively raised communication efficient.
One of ordinary skill in the art will appreciate that all or part of step in the whole bag of tricks of above-described embodiment is to come the relevant hardware of instruction finish by program, this program can be stored in the computer-readable recording medium, and storage medium can comprise: ROM, RAM, disk or CD etc.
More than method and the terminal of two-dimension code scanning that the embodiment of the invention is provided be described in detail, used specific case herein principle of the present invention and embodiment are set forth, the explanation of above embodiment just is used for helping to understand method of the present invention and core concept thereof; Simultaneously, for one of ordinary skill in the art, according to thought of the present invention, all will change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention.