CN105138942B - The display methods and device of two dimensional code - Google Patents

The display methods and device of two dimensional code Download PDF

Info

Publication number
CN105138942B
CN105138942B CN201510531767.1A CN201510531767A CN105138942B CN 105138942 B CN105138942 B CN 105138942B CN 201510531767 A CN201510531767 A CN 201510531767A CN 105138942 B CN105138942 B CN 105138942B
Authority
CN
China
Prior art keywords
terminal
dimensional code
scanned
display
camera
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.)
Active
Application number
CN201510531767.1A
Other languages
Chinese (zh)
Other versions
CN105138942A (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.)
Xiaomi Inc
Original Assignee
Xiaomi Inc
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 Xiaomi Inc filed Critical Xiaomi Inc
Priority to CN201510531767.1A priority Critical patent/CN105138942B/en
Publication of CN105138942A publication Critical patent/CN105138942A/en
Application granted granted Critical
Publication of CN105138942B publication Critical patent/CN105138942B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • User Interface Of Digital Computer (AREA)
  • Telephone Function (AREA)

Abstract

The disclosure is directed to a kind of display methods of two dimensional code and devices, are related to the communications field.The described method includes: obtaining two dimensional code;According to the camera parameter of terminal to be scanned, the display area of two dimensional code is determined;The two dimensional code is shown in the display area, so that the terminal to be scanned scans the two dimensional code.Described device includes: to obtain module, determining module and display module.The disclosure determines the display area of two dimensional code by the camera parameter according to terminal to be scanned;The display area determined can be the position that the camera of terminal to be scanned can scan, in this way, after the display area determined shows the two dimensional code, the camera of terminal to be scanned can scan rapidly the two dimensional code, to obtain the information in two dimensional code, it is the experience that user has brought to save the time of user.

Description

The display methods and device of two dimensional code
Technical field
This disclosure relates to the display methods and device of the communications field more particularly to a kind of two dimensional code.
Background technique
With the development of wireless communication technique, smart machine is just progressed into huge numbers of families.User is using intelligence When equipment, need that smart machine is made to obtain certain information, such as the information for including in two dimensional code.
Since some smart machines do not have display screen, when scanning the two-dimensional code, user cannot easily adjust these intelligence The angle and distance that energy equipment scans the two-dimensional code, therefore, generally requiring to take a long time could scan successfully.
Summary of the invention
In order to allow smart machine to scan rapidly to two dimensional code, present disclose provides a kind of display methods of two dimensional code and dresses It sets.The technical solution is as follows:
According to the first aspect of the embodiments of the present disclosure, a kind of display methods of two dimensional code is provided, which comprises
First terminal obtains two dimensional code;
According to the camera parameter of terminal to be scanned, display area of the two dimensional code on the first terminal is determined;
The two dimensional code is shown in the display area, so that the terminal to be scanned scans the two dimensional code,
The camera parameter of the terminal to be scanned includes at least the camera of the terminal to be scanned during the scanning process Height.
In a kind of implementation of the embodiment of the present disclosure, the camera parameter according to terminal to be scanned determines two The display area for tieing up code, includes at least one of the following:
The display position of the two dimensional code in the vertical direction is determined according to the height of the camera during the scanning process;
According to the camera position relative to local terminal terminal display screen in the horizontal direction during the scanning process, determine The display position of the two dimensional code in the horizontal direction;
According to the distance between with the camera, the display size of the two dimensional code is determined.
By determining the display of the two dimensional code in the vertical direction according to the height of the camera during the scanning process Position, it can be ensured that the height of display position and the height of camera are consistent;By according to the camera during the scanning process Relative to the position of local terminal terminal display screen in the horizontal direction, the display position of the two dimensional code in the horizontal direction is determined, It can ensure that two dimensional code is aligned in display with camera;According to the distance between with the camera, the two dimensional code is determined Display size, after the two-dimensional code display of display position, camera can scan two dimensional code and identify the two dimensional code, smoothly Obtain the information in two dimensional code.
In a kind of implementation of the embodiment of the present disclosure, the method also includes:
Export the first prompt information, first prompt information be used to prompt between the terminal to be scanned actually away from From and at least one of preset distance between the terminal to be scanned.
By exporting the first prompt information, user can according to the distance adjustment first terminal that the first prompt information prompts with The distance between terminal to be scanned, so that camera is easy scanning and arrives two dimensional code.
In a kind of implementation of the embodiment of the present disclosure, the preset distance is the length of local terminal terminal.
By setting spacing distance to the length of first terminal, user can measure first terminal using first terminal The distance between terminal to be scanned, it is user-friendly, and promote user experience.
It is described after the display area shows the two dimensional code in a kind of implementation of the embodiment of the present disclosure Method further include:
In response to determination, the terminal to be scanned scans the two dimensional code not successfully within a predetermined period of time, and output second mentions Show that information, second prompt information are used to prompt to adjust the position of the terminal to be scanned.
By exporting the second prompt information, user can adjust first terminal and terminal to be scanned according to the second prompt information Distance so that camera be easy scanning arrive two dimensional code.
In a kind of implementation of the embodiment of the present disclosure, the acquisition two dimensional code, comprising:
The two dimensional code is generated according to the network parameter of network to be accessed, the network parameter includes: network identity and steps on Land password;
The two dimensional code is shown in the display area, so that the terminal to be scanned scans the two dimensional code, comprising:
The two dimensional code is shown in the display area, accesses institute after scanning the two dimensional code for the terminal to be scanned State network to be accessed.
Include the terminal to be scanned network identity and modification logging to be accessed by two dimensional code, is swept in terminal to be scanned When retouching the two dimensional code, terminal to be scanned can obtain network identity and modification logging to be accessed, have access to the network.
It is described after the display area shows the two dimensional code in a kind of implementation of the embodiment of the present disclosure Method further include:
In response to two dimensional code described in the determination terminal successful scan to be scanned, closes display screen or jump the predetermined page of display Face.
According to the second aspect of an embodiment of the present disclosure, a kind of display device of two dimensional code, the display device setting are provided In first terminal, described device includes:
Module is obtained, for obtaining two dimensional code;
Determining module determines two dimensional code in the aobvious of the first terminal for the camera parameter according to terminal to be scanned Show region;
Display module, for showing the two dimension that the acquisition module obtains in the display area that the determining module determines Code, so that the terminal to be scanned scans the two dimensional code,
The camera parameter of the terminal to be scanned includes at least the camera of the terminal to be scanned during the scanning process Height.
In a kind of implementation of the embodiment of the present disclosure, the determining module is at least one of following for executing:
The display position of the two dimensional code in the vertical direction is determined according to the height of the camera during the scanning process;
According to the camera position relative to local terminal terminal display screen in the horizontal direction during the scanning process, determine The display position of the two dimensional code in the horizontal direction;
According to the distance between with the camera, the display size of the two dimensional code is determined.
In a kind of implementation of the embodiment of the present disclosure, described device further include:
First output module, for exporting the first prompt information, first prompt information is for prompting with described wait sweep Retouch at least one of the actual range between terminal and preset distance between the terminal to be scanned.
In a kind of implementation of the embodiment of the present disclosure, the preset distance is the length of local terminal terminal.
In a kind of implementation of the embodiment of the present disclosure, described device further include:
Second output module, described in the terminal to be scanned scans not successfully within a predetermined period of time in response to determination Two dimensional code, exports the second prompt information, and second prompt information is used to prompt to adjust the position of the terminal to be scanned.
In a kind of implementation of the embodiment of the present disclosure, the acquisition module is used for, according to the network of network to be accessed Parameter generates the two dimensional code, and the network parameter includes: network identity and modification logging;
The display module is used for, and shows two that the acquisition module obtains in the display area that the determining module determines Code is tieed up, accesses the network to be accessed after scanning the two dimensional code for the terminal to be scanned.
In a kind of implementation of the embodiment of the present disclosure, the display module is also used to,
In response to two dimensional code described in the determination terminal successful scan to be scanned, closes display screen or jump the predetermined page of display Face.
According to the third aspect of an embodiment of the present disclosure, a kind of display device of two dimensional code, the display device setting are provided In first terminal, described device includes:
Display screen;
Processor;
Memory for storage processor executable instruction;
Wherein, the processor is configured to:
The first terminal obtains two dimensional code;
According to the camera parameter of terminal to be scanned, display area of the two dimensional code on the first terminal is determined;
The two dimensional code is shown in the display area, so that the terminal to be scanned scans the two dimensional code,
The camera parameter of the terminal to be scanned includes at least the camera of the terminal to be scanned during the scanning process Height.
The technical scheme provided by this disclosed embodiment can include the following benefits: by obtaining two dimensional code;According to The camera parameter of terminal to be scanned, determines the display area of two dimensional code;The display area determined can be terminal to be scanned The position that can scan of camera, in this way, after the display area determined shows the two dimensional code, the camera shooting of terminal to be scanned Head can scan rapidly the two dimensional code, to obtain the information in two dimensional code, to save the time of user, be user with Come the experience got well.
It should be understood that above general description and following detailed description be only it is exemplary and explanatory, not The disclosure can be limited.
Detailed description of the invention
The drawings herein are incorporated into the specification and forms part of this specification, and shows and meets implementation of the invention Example, and be used to explain the principle of the present invention together with specification.
Fig. 1 is the schematic diagram of the smart phone shown in the disclosure.
Fig. 2 is a kind of flow chart of the display methods of two dimensional code shown according to an exemplary embodiment.
Fig. 3 is a kind of flow chart of the display methods of two dimensional code shown according to an exemplary embodiment.
Fig. 4 a to Fig. 4 f is the user interface signal of first terminal two-dimensional code display shown according to an exemplary embodiment Figure.
Fig. 5 is a kind of flow chart of the display methods of two dimensional code shown according to an exemplary embodiment.
Fig. 6 is a kind of block diagram of the display device of two dimensional code shown according to an exemplary embodiment.
Fig. 7 is a kind of block diagram of the display device of two dimensional code shown according to an exemplary embodiment.
Fig. 8 is a kind of block diagram of the display device of two dimensional code shown according to an exemplary embodiment.
Specific embodiment
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related to When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment Described in embodiment do not represent all embodiments consistented with the present invention.On the contrary, they be only with it is such as appended The example of device and method being described in detail in claims, some aspects of the invention are consistent.
In the embodiments of the present disclosure, terminal refers to smart machine, and first terminal is at least equipped with display screen, such as smartwatch, Smart phone, tablet computer or laptop.Terminal to be scanned at least matches the camera for being ready for use on camera shooting, such as intelligent camera Machine, the smart phone for being provided with camera, tablet computer or laptop.
In the embodiments of the present disclosure, for first terminal when vertical screen works, the lower side of the display screen of first terminal refers to display The nearest side of screen distance the earth, the lower side of first terminal refer to the nearest side of first terminal distance the earth.Referring to Fig. 1, with For smart phone, key 10 and front camera 11 are typically provided on the main panel of smart phone.Assuming that key 10 and preposition Camera 11 is located at the opposite two sides of display screen 12.So, it when smart phone vertical screen works, is leaned on display screen 12 The side of nearly key 10 is the lower side 12a of display screen, and key 10 is located at the lower side 12a of display screen and the downside of smart phone Between the 1a of side.
Fig. 2 is a kind of display methods of two dimensional code shown according to an exemplary embodiment, is suitable for first terminal.Such as figure Shown in 2, this approach includes the following steps.
In step s101, two dimensional code is obtained.
Wherein, which may include the address of appointed website or the two dimensional code may include the mark of wireless network Knowledge and modification logging.
Specifically, the two dimensional code can be generated in first terminal, or can receive the two dimensional code of other terminals transmission.
In step s 102, according to the camera parameter of terminal to be scanned, the display area of two dimensional code is determined.
Wherein, the camera parameter of terminal to be scanned includes at least the height of the camera of terminal to be scanned during the scanning process Degree.The camera parameter of terminal to be scanned can be set in advance in first terminal, alternatively, first terminal receives the setting of user Request, setting request include the camera parameter of terminal to be scanned.
Wherein, the display area of two dimensional code is display area of the two dimensional code in the display screen of first terminal.
Specifically, it can be closed according to the height of pre-set camera during the scanning process is corresponding with center point coordinate System, obtains the corresponding center point coordinate of the height of the camera of terminal to be scanned during the scanning process, and with corresponding central point Coordinate is the coordinate position of the central point of two dimensional code, obtains the display area of two dimensional code.Since two dimensional code is the image of square, The screen area of two-dimensional code display is also square, therefore, in the center point coordinate position and the side of two dimensional code for knowing two dimensional code It is long, so that it may to obtain the display area of two dimensional code.
In step s 103, in display area two-dimensional code display, so that terminal to be scanned scans the two-dimensional code.
The embodiment of the present disclosure is by obtaining two dimensional code;According to the camera parameter of terminal to be scanned, the aobvious of two dimensional code is determined Show region;The display area determined can be the position that the camera of terminal to be scanned can scan, in this way, determining After display area shows the two dimensional code, the camera of terminal to be scanned can scan rapidly the two dimensional code, to obtain two The information in code is tieed up, so that the time of user is saved, the experience brought for user.
Fig. 3 is a kind of display methods of two dimensional code shown according to an exemplary embodiment, is suitable for first terminal.At this In embodiment, how description is determined to the display area of two dimensional code.As shown in figure 3, this approach includes the following steps.
In step s 201, two dimensional code is generated according to the network parameter of network to be accessed.
Wherein, which includes the network identity and modification logging of terminal to be scanned network to be accessed.
In the present embodiment, using first terminal as smart phone, terminal to be scanned be intelligent camera for be illustrated.
Client is installed on smart phone.By the client, smart phone can control intelligent camera access and refer to Fixed wireless network.Specifically, user logs in the client using registered account, and selects " camera configuration guide " function Energy.A referring to fig. 4, client will be prompted to user and connect the power supply of intelligent camera, and wait intelligent camera voice prompting " waiting connection ".After hearing the voice prompting that intelligent camera issues " waiting connection ", user, which clicks, " has heard that voice mentions Show " button.B referring to fig. 4, client will be prompted to the mark and wireless network that user inputs intelligent camera wireless network to be accessed The modification logging of network.User executes correlated inputs operation according to the prompt of client.Client sends the register account number of user To server.After server receives, a random code (Code) will be fed back to client.The random code is for limiting intelligent camera The time limit of prow time connection server.Client is stepped on according to register account number, random code, the mark of wireless network and wireless network Land password, generates two dimensional code, and two dimensional code may include stepping on for register account number, random code, the mark of wireless network and wireless network Land password.
In step S202, according to the camera parameter of terminal to be scanned, the display area of two dimensional code is determined.
Wherein, camera parameter includes the focal length of camera height during the scanning process and camera.
This step S202 may include at least one of following three kinds of situations situation.
The first situation is, determines the two dimensional code in the vertical direction according to the height of the camera during the scanning process Display position.
Second case is, according to the camera during the scanning process relative to first terminal display screen in the horizontal direction Position, determine the display position of the two dimensional code in the horizontal direction.
The third situation is, according to the distance between with the camera, determines the display size of the two dimensional code.
Three kinds of situations are introduced separately below.
In the first situation, the height of camera during the scanning process can be camera when terminal to be scanned is placed vertically Height, be also possible to terminal to be scanned it is laterally disposed when camera height.During the scanning process according to the camera Height determines the display position of the two dimensional code in the vertical direction, can make the height phase of the display height and camera of two dimensional code Matching.
Wherein, the display position of two dimensional code in the vertical direction can be, and in the work of first terminal vertical screen, two dimensional code exists Display position in display screen on vertical direction;It is also possible to when first terminal transverse screen works, two dimensional code erects in display screen The upward display position of histogram.
As preferred embodiment, the display position of two dimensional code in the vertical direction be can be, in first terminal vertical screen When work, display position of the two dimensional code in display screen on vertical direction.Based on this, the first situation may include as flowed down Journey.
Firstly, obtaining the height of the camera of terminal to be scanned during the scanning process.
In the present embodiment, the acquisition pattern for not limiting the height of the camera of intelligent camera during the scanning process, can Using any acquisition pattern provided in the related technology.For example, the supplier of smart phone can be from intelligent camera Supplier obtain the height of intelligent camera camera during the scanning process, then the intelligent camera of acquisition is being scanned The height of camera in the process is set in advance in smart phone, alternatively, user can input intelligent camera by client The height of machine during the scanning process, or, user can input the model of intelligent camera, smart phone root by client According to the corresponding relationship of preset model and height, the height of the corresponding camera of model of intelligent camera during the scanning process is obtained Degree.
Secondly, first terminal is obtained when vertical screen works, the distance of the lower side of the lower side of display screen to first terminal.
Wherein, smart phone is obtained when vertical screen works, the distance of the lower side of the lower side of display screen to smart phone Mode include, firstly, obtaining the device identification of smart phone, such as the model of smart phone.Secondly, inquiring in the server The corresponding distance of the device identification obtains the corresponding distance of the device identification referring to table.The distance in table referring to having recorded in intelligence Can the work of mobile phone vertical screen when, the corresponding relationship of the distance of the lower side of the lower side of display screen to smart phone.
Then, it is determined that the display position of two dimensional code in the vertical direction.
Wherein, it is to be scanned which, which includes the spacing h1, h1=H-h2, H of the lower side of two dimensional code and display screen, The height of the camera of terminal, h2 be first terminal display screen lower side to first terminal lower side distance.
The position of two dimensional code in the vertical direction is determined in the first situation, second case is then determining two dimensional code Position in the horizontal direction.Wherein, two dimensional code can be with the display position in horizontal direction in the vertical direction, first When terminal vertical screen works, display position of the two dimensional code in display screen on vertical direction and in horizontal direction;Two dimensional code is vertical Display position on direction and in horizontal direction is also possible to when first terminal transverse screen works, and two dimensional code erects in display screen Histogram upwards and horizontal direction on display position.
As preferred embodiment, two dimensional code can be with the display position in horizontal direction in the vertical direction, When first terminal vertical screen works, display position of the two dimensional code in display screen on vertical direction and in horizontal direction.Wherein, this is taken the photograph As head can be inputted during the scanning process relative to the position of first terminal display screen in the horizontal direction by user.For example, with Family first by the left screen region of the display screen of the first terminal of camera alignment vertical screen work, is then taken the photograph to first terminal input As head is the left screen region of display screen relative to the position of first terminal display screen in the horizontal direction during the scanning process. First terminal then determines that the display position of the two dimensional code in the horizontal direction is left screen region.
The third situation may include first embodiment or second embodiment.
First embodiment includes, firstly, obtaining the focal length of the camera of terminal to be scanned.Secondly, according to focal length and two The corresponding relationship for tieing up the scaling of code, determines the scaling of the corresponding two dimensional code of the focal length of the camera of terminal to be scanned. Then, according to the scaling of the corresponding two dimensional code of focal length of the camera of terminal to be scanned, the size of two dimensional code is adjusted It is whole.Finally, showing two dimensional code adjusted.The display position of two dimensional code is referred in the first situation and second case Display position.
Specifically, first terminal can obtain the focal length of the camera of terminal to be scanned according to the information of terminal to be scanned, The information of terminal to be scanned includes model.It can be to be scanned knowing with the corresponding relationship of preset model and focal length in first terminal After the model of terminal, the corresponding focal length of model of terminal to be scanned can be obtained.
Second embodiment includes, firstly, obtaining the width of display screen.Specifically, the display information of smart phone, packet The height and width for including display screen, are already provided in smart phone before factory.Secondly, using the width of display screen as two dimensional code Height and width, in the display position two-dimensional code display determined.Since the general presentation mode of two dimensional code is square, because This, the height and width of two dimensional code are all the same.The height of two dimensional code and width are adjusted to the width of display screen, it is ensured that The area for the two dimensional code that display screen is shown is the largest, in this way convenient for terminal to be scanned scanning to two dimensional code.
In step S203, in display area two-dimensional code display, accessed after being scanned the two-dimensional code for terminal to be scanned waiting Enter network.
C referring to fig. 4 can also prompt user by intelligent camera towards the aobvious of smart phone before two-dimensional code display Display screen, and maintain a certain distance (referring specifically to step S303 in the embodiment shown in Fig. 5).Then, d referring to fig. 4, intelligent hand The display screen of machine will show always the two dimensional code, until intelligent camera scan successfully obtain wireless network account and step on Land password, and issue voice prompting " in connection, please later ".For user after hearing the voice prompting, click " has heard voice The button of prompt ".E referring to fig. 4, client will be prompted to user and intelligent camera waited to connect wireless network.Intelligent camera exists After scanning successfully, wireless network is accessed by the account of wireless network and modification logging first, secondly, being successfully accessed wireless network After network, intelligent camera by by scanning the two-dimensional code acquisition random code and register account number be sent to server.Server receives Afterwards, first check whether the receiving time from the generation time of random code to random code has been more than specified duration, it is specified when being less than When duration, server binds the intelligent camera and register account number, while the successful information of feedback link is to smart phone, this Mean that smart phone successfully controls intelligent camera access wireless network.It is anti-to receive server in smart phone by f referring to fig. 4 After the information of the successful connection of feedback, smart phone can show the prompt information of successful connection.After successful connection, smart phone The monitoring image of intelligent camera can be obtained by the client.
The embodiment of the present disclosure is by obtaining two dimensional code;According to the camera parameter of terminal to be scanned, the aobvious of two dimensional code is determined Show region;The display area determined can be the position that the camera of terminal to be scanned can scan, in this way, determining After display area shows the two dimensional code, the camera of terminal to be scanned can scan rapidly the two dimensional code, to obtain two The information in code is tieed up, so that the time of user is saved, the experience brought for user.
Fig. 5 is a kind of display methods of two dimensional code shown according to an exemplary embodiment, is suitable for first terminal.This reality Apply example and embodiment shown in Fig. 3 the difference is that, the present embodiment exports different prompt informations for first terminal is described, To prompt the user with the distance between first terminal and terminal to be scanned.As shown in figure 5, this approach includes the following steps.
In step S301, two dimensional code is obtained.
This step S301 can be identical as step S201 in the embodiment shown in Fig. 3, and details are not described herein.
In step s 302, according to the camera parameter of terminal to be scanned, the display area of two dimensional code is determined.
Wherein, this step S302 can be identical as step S202 in the embodiment shown in Fig. 3, and details are not described herein.
In step S303, the first prompt information is exported.
Wherein, the first prompt information can be used for prompting the actual range between first terminal and terminal to be scanned, alternatively, First prompt information can be used for prompting preset distance or the first prompt information between first terminal and terminal to be scanned It can be used for prompting pre- between the actual range between first terminal and terminal to be scanned and first terminal and terminal to be scanned Set a distance.
When realizing, first terminal can be measured by infrared light-emitting diode or ultrasound wave emitter first terminal with Actual range between terminal to be scanned.
When realizing, terminal to be scanned shoots the environment in front of camera using camera, obtains from shooting In image, searches two dimensional code and identified.If first terminal and terminal to be scanned distance are especially close or especially remote, then by shadow Ring terminal to be scanned and identify two dimensional code from the image taken, therefore, it is necessary to prompt user's first terminal with it is to be scanned Actual range or preset distance between terminal facilitate user to adjust the interval distance between first terminal and terminal to be scanned From.
Specifically, first terminal can determine preset distance, the information of terminal to be scanned according to the information of terminal to be scanned It may include model.For example, user can input the model of terminal to be scanned, the model that first terminal is inputted according to user, In the corresponding relationship of preset model and preset distance, the corresponding preset distance of model of the terminal to be scanned is obtained.
As optional embodiment, which can be the integral multiple of the length of first terminal, such as pre- spacing (referring to fig. 4 c) from the length for first terminal.It is put vertically it should be noted that the length of first terminal can be first terminal Height when setting.
By the preset distance between prompt user's first terminal and terminal to be scanned, can be adjusted in user according to prompt After the distance between first terminal and terminal to be scanned, terminal to be scanned can more rapidly scan first terminal and show Two dimensional code.
In step s 304, in display area two-dimensional code display, so that the terminal to be scanned scans the two dimensional code.
This step S304 is identical as the step S203 shown in Fig. 3, and details are not described herein.
In step S305, in response to determining, the terminal to be scanned scans the two dimensional code not successfully within a predetermined period of time, Export the second prompt information.
Wherein, which is used for the position for prompting to adjust the terminal to be scanned.
When realizing, when terminal to be scanned can not identify two dimensional code from the image taken within a predetermined period of time, The instruction of two dimensional code recognition failures is sent to first terminal.The instruction of two dimensional code recognition failures is used to indicate terminal to be scanned in pre- timing Between scanned the two-dimensional code in section not successfully.
First terminal receives the two dimensional code recognition failures instruction that terminal to be scanned is sent.First terminal can measure first eventually Actual range between end and terminal to be scanned, and whether within the specified range to judge the actual range of measurement.When the reality of measurement Border distance not within the specified range when, export the second prompt information.Second prompt information is for prompting user to adjust first terminal At a distance from terminal to be scanned.When realizing, first terminal can show the second prompt information on a display screen, can also use Voice prompting mode exports the second prompt information.
It should be noted that will trigger the display process of the two dimensional code of a new round after exporting the second prompt information, this will Repeat step S301- step S304.Assuming that terminal to be scanned is in the predetermined time during the display of the two dimensional code of a new round When identifying two dimensional code from the image taken in section, then the flow for displaying further includes step S306.
In step S306, in response to determining the terminal successful scan two dimensional code to be scanned, closing display screen or jumping Show predetermined page.
When realizing, when terminal to be scanned identifies two dimensional code from the image taken within a predetermined period of time, to the One terminal transmission two dimensional code, which identifies, successfully to be indicated.Two dimensional code identifies that successfully instruction is used to indicate terminal to be scanned in predetermined amount of time Interior successful scan two dimensional code.
The two dimensional code that first terminal receives terminal transmission to be scanned, which identifies, successfully to be indicated, and is closed display screen or jumped display Predetermined page.
The embodiment of the present disclosure is by obtaining two dimensional code;According to the camera parameter of terminal to be scanned, the aobvious of two dimensional code is determined Show region;The display area determined can be the position that the camera of terminal to be scanned can scan, in this way, determining After display area shows the two dimensional code, the camera of terminal to be scanned can scan rapidly the two dimensional code, to obtain two The information in code is tieed up, so that the time of user is saved, the experience brought for user.
Fig. 6 is a kind of block diagram of the display device of two dimensional code shown according to an exemplary embodiment, which can set It sets in first terminal, the method provided suitable for the embodiment shown in Fig. 2, Fig. 3 or Fig. 5.Referring to Fig. 6, which includes obtaining Modulus block 401, determining module 402 and display module 403.
It obtains module 401 to be configured as, obtains two dimensional code.
Determining module 402 is configured as, and according to the height of the camera of the terminal to be scanned, determines the viewing area of two dimensional code Domain.
Display module 403 is configured as, and in the display position that determining module 402 determines, display obtains what module 401 obtained Two dimensional code.
About the device in above-described embodiment, wherein modules execute the concrete mode of operation in related this method Embodiment in be described in detail, no detailed explanation will be given here.
The embodiment of the present disclosure is by obtaining two dimensional code;According to the camera parameter of terminal to be scanned, the aobvious of two dimensional code is determined Show region;The display area determined can be the position that the camera of terminal to be scanned can scan, in this way, determining After display area shows the two dimensional code, the camera of terminal to be scanned can scan rapidly the two dimensional code, to obtain two The information in code is tieed up, so that the time of user is saved, the experience brought for user.
Fig. 7 is a kind of block diagram of the display device of two dimensional code shown according to an exemplary embodiment, which can set It sets in first terminal.Referring to Fig. 7, which includes obtaining module 501, determining module 502 and display module 503.Fig. 7 is shown Device and the device shown in Fig. 6 difference it is as follows.
Wherein it is determined that module 502 is at least one of following for executing: true according to the height of the camera during the scanning process The fixed display position of the two dimensional code in the vertical direction;According to the camera during the scanning process relative to local terminal terminal display screen Position in the horizontal direction determines the display position of the two dimensional code in the horizontal direction;According between the camera away from From determining the display size of the two dimensional code.
Wherein, which further includes the first output module 504.
First output module 504 is configured as, and exports the first prompt information, first prompt information for prompt with should be to At least one of actual range between end of scan and the preset distance between the terminal to be scanned.
As optional embodiment, which is the length of the local terminal terminal.
Wherein, which further includes the second output module 505.
Second output module 505 is configured as, and in response to determining, the terminal to be scanned is swept not successfully within a predetermined period of time The two dimensional code is retouched, the second prompt information is exported, which is used for the position for prompting to adjust the terminal to be scanned.
Wherein, which is used for, and generates the two dimensional code according to the network parameter of network to be accessed, network ginseng Number includes: network identity and modification logging.
The display module 503 is used for, and shows the two dimension that the acquisition module obtains in the display area that the determining module determines Code, accesses the network to be accessed after scanning the two dimensional code for the terminal to be scanned.
Wherein, which is also used to, and in response to determining the terminal successful scan two dimensional code to be scanned, closes Display screen jumps display predetermined page.
About the device in above-described embodiment, wherein modules execute the concrete mode of operation in related this method Embodiment in be described in detail, no detailed explanation will be given here.
The embodiment of the present disclosure is by obtaining two dimensional code;According to the camera parameter of terminal to be scanned, the aobvious of two dimensional code is determined Show region;The display area determined can be the position that the camera of terminal to be scanned can scan, in this way, determining After display area shows the two dimensional code, the camera of terminal to be scanned can scan rapidly the two dimensional code, to obtain two The information in code is tieed up, so that the time of user is saved, the experience brought for user.
Fig. 8 is a kind of block diagram of the display device 800 of two dimensional code shown according to an exemplary embodiment.For example, device 800 can be the mobile phone for having display screen, computer, digital broadcast terminal, messaging device, game console, put down Panel assembly, medical device, body-building device, personal digital assistant etc..
Referring to Fig. 8, device 800 may include following one or more components: processing component 802, memory 804, power supply Component 806, multimedia component 808, audio component 810, the interface 812 of input/output (I/O), sensor module 814, and Communication component 816.
The integrated operation of the usual control device 800 of processing component 802, such as with display, telephone call, data communication, phase Machine operation and record operate associated operation.Processing component 802 may include that one or more processors 820 refer to execute It enables, to perform all or part of the steps of the methods described above.In addition, processing component 802 may include one or more modules, just Interaction between processing component 802 and other assemblies.For example, processing component 802 may include multi-media module, it is more to facilitate Interaction between media component 808 and processing component 802.
Memory 804 is configured as storing various types of data to support the operation in device 800.These data are shown Example includes the instruction of any application or method for operating on device 800, contact data, and telephone book data disappears Breath, picture, video etc..Memory 804 can be by any kind of volatile or non-volatile memory devices or their group It closes and realizes, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM) is erasable to compile Journey read-only memory (EPROM), programmable read only memory (PROM), read-only memory (ROM), magnetic memory, flash Device, disk or CD.
Power supply module 806 provides electric power for the various assemblies of device 800.Power supply module 806 may include power management system System, one or more power supplys and other with for device 800 generate, manage, and distribute the associated component of electric power.
Multimedia component 808 includes the screen of one output interface of offer between described device 800 and user.One In a little embodiments, screen may include liquid crystal display (LCD) and touch panel (TP).If screen includes touch panel, screen Curtain may be implemented as touch screen, to receive input signal from the user.Touch panel includes one or more touch sensings Device is to sense the gesture on touch, slide, and touch panel.The touch sensor can not only sense touch or sliding action Boundary, but also detect duration and pressure associated with the touch or slide operation.In some embodiments, more matchmakers Body component 808 includes a front camera and/or rear camera.When device 800 is in operation mode, such as screening-mode or When video mode, front camera and/or rear camera can receive external multi-medium data.Each front camera and Rear camera can be a fixed optical lens system or have focusing and optical zoom capabilities.
Audio component 810 is configured as output and/or input audio signal.For example, audio component 810 includes a Mike Wind (MIC), when device 800 is in operation mode, when such as call mode, recording mode, and voice recognition mode, microphone is matched It is set to reception external audio signal.The received audio signal can be further stored in memory 804 or via communication set Part 816 is sent.In some embodiments, audio component 810 further includes a loudspeaker, is used for output audio signal.
I/O interface 812 provides interface, above-mentioned peripheral interface module packet between processing component 802 and peripheral interface module Display screen is included, can also include keyboard, click wheel, button etc..These buttons may include, but are not limited to: home button, volume are pressed Button, start button and locking press button.
Sensor module 814 includes one or more sensors, and the state for providing various aspects for device 800 is commented Estimate.For example, sensor module 814 can detecte the state that opens/closes of device 800, and the relative positioning of component, for example, it is described Component is the display and keypad of device 800, and sensor module 814 can be with 800 1 components of detection device 800 or device Position change, the existence or non-existence that user contacts with device 800,800 orientation of device or acceleration/deceleration and device 800 Temperature change.Sensor module 814 may include proximity sensor, be configured to detect without any physical contact Presence of nearby objects.Sensor module 814 can also include optical sensor, such as CMOS or ccd image sensor, at As being used in application.In some embodiments, which can also include acceleration transducer, gyro sensors Device, Magnetic Sensor, pressure sensor or temperature sensor.
Communication component 816 is configured to facilitate the communication of wired or wireless way between device 800 and other devices.Device 800 can access the wireless network based on communication standard, such as WiFi, 2G or 3G or their combination.In an exemplary implementation In example, communication component 816 receives broadcast singal or broadcast related information from external broadcasting management system via broadcast channel. In one exemplary embodiment, the communication component 816 further includes near-field communication (NFC) module, to promote short range communication.Example Such as, NFC module can be based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra wide band (UWB) technology, Bluetooth (BT) technology and other technologies are realized.
In the exemplary embodiment, device 800 can be believed by one or more application specific integrated circuit (ASIC), number Number processor (DSP), digital signal processing device (DSPD), programmable logic device (PLD), field programmable gate array (FPGA), controller, microcontroller, microprocessor or other electronic components are realized, for executing the above method.
In the exemplary embodiment, a kind of non-transitorycomputer readable storage medium including instruction, example are additionally provided It such as include the memory 804 of instruction, above-metioned instruction can be executed by the processor 820 of device 800 to complete the above method.For example, The non-transitorycomputer readable storage medium can be ROM, random access memory (RAM), CD-ROM, tape, floppy disk With optical data storage devices etc..
A kind of non-transitorycomputer readable storage medium, when the instruction in the storage medium is by the processing of mobile terminal When device executes, so that mobile terminal is able to carry out a kind of display methods of two dimensional code, which comprises
Obtain two dimensional code;According to the camera parameter of terminal to be scanned, the display area of two dimensional code is determined;In the viewing area Domain shows the two dimensional code, so that the terminal to be scanned scans the two dimensional code.
As optional first embodiment, mobile terminal can be executed, according to the height of the camera during the scanning process It spends and determines the display position of the two dimensional code in the vertical direction;It is aobvious relative to local terminal terminal during the scanning process according to the camera The position of display screen in the horizontal direction determines the display position of the two dimensional code in the horizontal direction;According between the camera Distance, determine the display size of the two dimensional code.
As optional second embodiment, mobile terminal can be executed, and export the first prompt information, the first prompt letter Breath is for prompting in the actual range between the terminal to be scanned and the preset distance between the terminal to be scanned at least It is a kind of.
As optional third embodiment, which is the length of the local terminal terminal.
As optional 4th embodiment, mobile terminal can be executed, within a predetermined period of time should be in response to determining End of scan scans the two dimensional code not successfully, exports the second prompt information, second prompt information is for prompting adjustment should be wait sweep Retouch the position of terminal.
As optional 5th embodiment, mobile terminal can be executed, and be generated according to the network parameter of network to be accessed The two dimensional code, the network parameter include: network identity and modification logging;Mobile terminal can also be performed, aobvious in the display area Show the two dimensional code, accesses the network to be accessed after scanning the two dimensional code for the terminal to be scanned.
As optional sixth embodiment, mobile terminal can be executed, in response to determining that the terminal to be scanned is successfully swept The two dimensional code is retouched, display screen is closed or jumps display predetermined page.
Those skilled in the art after considering the specification and implementing the invention disclosed here, will readily occur to of the invention its Its embodiment.This application is intended to cover any variations, uses, or adaptations of the invention, these modifications, purposes or Person's adaptive change follows general principle of the invention and including the undocumented common knowledge in the art of the disclosure Or conventional techniques.The description and examples are only to be considered as illustrative, and true scope and spirit of the invention are by following Claim is pointed out.
It should be understood that the present invention is not limited to the precise structure already described above and shown in the accompanying drawings, and And various modifications and changes may be made without departing from the scope thereof.The scope of the present invention is limited only by the attached claims.

Claims (15)

1. a kind of display methods of two dimensional code, which is characterized in that the described method includes:
First terminal obtains two dimensional code;
According to the camera parameter of terminal to be scanned, display area of the two dimensional code on the first terminal is determined;
The two dimensional code is shown in the display area, so that the terminal to be scanned scans the two dimensional code,
The camera parameter of the terminal to be scanned includes at least the height of the camera of the terminal to be scanned during the scanning process Degree.
2. the method according to claim 1, wherein the camera parameter according to terminal to be scanned, determines The display area of two dimensional code, includes at least one of the following:
The display position of the two dimensional code in the vertical direction is determined according to the height of the camera during the scanning process;
According to the camera position relative to local terminal terminal display screen in the horizontal direction during the scanning process, determine described in The display position of two dimensional code in the horizontal direction;
According to the distance between with the camera, the display size of the two dimensional code is determined.
3. the method according to claim 1, wherein the method also includes:
Export the first prompt information, first prompt information be used to prompt actual range between the terminal to be scanned and At least one of preset distance between the terminal to be scanned.
4. according to the method described in claim 3, it is characterized in that, the preset distance is the length of local terminal terminal.
5. the method according to claim 1, wherein after the display area shows the two dimensional code, institute State method further include:
In response to determination, the terminal to be scanned scans the two dimensional code, output the second prompt letter not successfully within a predetermined period of time Breath, second prompt information are used to prompt to adjust the position of the terminal to be scanned.
6. the method according to claim 1, wherein the acquisition two dimensional code, comprising:
The two dimensional code is generated according to the network parameter of network to be accessed, the network parameter includes: network identity and logs in close Code;
The two dimensional code is shown in the display area, so that the terminal to be scanned scans the two dimensional code, comprising:
Show the two dimensional code in the display area, for the terminal to be scanned scan access after the two dimensional code it is described to Access network.
7. method according to any one of claim 1 to 6, which is characterized in that show described two in the display area After tieing up code, the method also includes:
In response to two dimensional code described in the determination terminal successful scan to be scanned, closes display screen or jump display predetermined page.
8. a kind of display device of two dimensional code, which is characterized in that the display device is arranged in first terminal, described device packet It includes:
Module is obtained, for obtaining two dimensional code;
Determining module determines two dimensional code in the viewing area of the first terminal for the camera parameter according to terminal to be scanned Domain;
Display module, for showing the two dimensional code that the acquisition module obtains in the display area that the determining module determines, with The two dimensional code is scanned for the terminal to be scanned,
The camera parameter of the terminal to be scanned includes at least the height of the camera of the terminal to be scanned during the scanning process Degree.
9. device according to claim 8, which is characterized in that the determining module is at least one of following for executing:
The display position of the two dimensional code in the vertical direction is determined according to the height of the camera during the scanning process;
According to the camera position relative to local terminal terminal display screen in the horizontal direction during the scanning process, determine described in The display position of two dimensional code in the horizontal direction;
According to the distance between with the camera, the display size of the two dimensional code is determined.
10. device according to claim 8, which is characterized in that described device further include:
First output module, for exporting the first prompt information, first prompt information is for prompting and the end to be scanned At least one of actual range between end and the preset distance between the terminal to be scanned.
11. device according to claim 10, which is characterized in that the preset distance is the length of local terminal terminal.
12. device according to claim 8, which is characterized in that described device further include:
Second output module, for the terminal to be scanned to scan the two dimension not successfully within a predetermined period of time in response to determination Code, exports the second prompt information, and second prompt information is used to prompt to adjust the position of the terminal to be scanned.
13. device according to claim 8, which is characterized in that
The acquisition module is used for, and generates the two dimensional code according to the network parameter of network to be accessed, the network parameter includes: Network identity and modification logging;
The display module is used for, and shows the two dimension that the acquisition module obtains in the display area that the determining module determines Code accesses the network to be accessed after scanning the two dimensional code for the terminal to be scanned.
14. the device according to any one of claim 8 to 13, which is characterized in that the display module is also used to,
In response to two dimensional code described in the determination terminal successful scan to be scanned, closes display screen or jump display predetermined page.
15. a kind of display device of two dimensional code, which is characterized in that the display device is arranged in first terminal, described device packet It includes:
Display screen;
Processor;
Memory for storage processor executable instruction;
Wherein, the processor is configured to:
The first terminal obtains two dimensional code;
According to the camera parameter of terminal to be scanned, display area of the two dimensional code on the first terminal is determined;
The two dimensional code is shown in the display area, so that the terminal to be scanned scans the two dimensional code,
The camera parameter of the terminal to be scanned includes at least the height of the camera of the terminal to be scanned during the scanning process Degree.
CN201510531767.1A 2015-08-26 2015-08-26 The display methods and device of two dimensional code Active CN105138942B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510531767.1A CN105138942B (en) 2015-08-26 2015-08-26 The display methods and device of two dimensional code

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510531767.1A CN105138942B (en) 2015-08-26 2015-08-26 The display methods and device of two dimensional code

Publications (2)

Publication Number Publication Date
CN105138942A CN105138942A (en) 2015-12-09
CN105138942B true CN105138942B (en) 2018-12-18

Family

ID=54724286

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510531767.1A Active CN105138942B (en) 2015-08-26 2015-08-26 The display methods and device of two dimensional code

Country Status (1)

Country Link
CN (1) CN105138942B (en)

Families Citing this family (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106778434A (en) * 2016-11-25 2017-05-31 广州视源电子科技股份有限公司 Method and device for dynamically adjusting two-dimensional code on display area
CN108154058B (en) * 2016-12-05 2021-04-23 北京小米移动软件有限公司 Graphic code display and position area determination method and device
CN107018328A (en) * 2017-04-11 2017-08-04 珠海市魅族科技有限公司 A kind of image scan method method and image-scanning device
KR101993512B1 (en) * 2017-04-21 2019-09-30 성균관대학교산학협력단 An apparatus of presenting encryption code for screen-to-camera communication, and method thereof
CN107423794B (en) * 2017-05-31 2021-07-02 北京安云世纪科技有限公司 Code scanning method and device for graphic coding and mobile terminal
CN113836956B (en) * 2017-12-25 2024-09-03 先进新星技术(新加坡)控股有限公司 Scanning positioning method, device, equipment and system
CN110662273A (en) * 2018-06-28 2020-01-07 深圳市优必选科技有限公司 Network distribution method, network distribution system and robot
CN109214810A (en) * 2018-07-25 2019-01-15 努比亚技术有限公司 A kind of two-dimensional code display method, mobile terminal and computer readable storage medium
CN109376824B (en) * 2018-09-10 2022-06-21 平安科技(深圳)有限公司 Dynamic two-dimensional code generation method and system
CN109615360A (en) * 2018-09-29 2019-04-12 阿里巴巴集团控股有限公司 A kind of encoding of graphs methods of exhibiting and device
CN109583181B (en) * 2018-11-29 2020-07-03 新华三技术有限公司 Authentication method, authentication device and machine-readable storage medium
CN109766070B (en) * 2019-01-31 2022-12-02 网易(杭州)网络有限公司 Display control method and device in mobile terminal
CN110110571B (en) * 2019-04-28 2023-03-14 维沃移动通信有限公司 Code scanning method and mobile terminal
CN110287744B (en) 2019-06-17 2020-12-25 珠海格力电器股份有限公司 Method and device for identifying two-dimensional code
CN111126096A (en) * 2019-12-06 2020-05-08 支付宝(杭州)信息技术有限公司 Two-dimensional code size determination method, two-dimensional code display method, device and equipment
CN110933771B (en) * 2019-12-06 2024-03-01 江苏紫米电子技术有限公司 Network connection method and device of camera, storage medium and camera

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101877046A (en) * 2009-11-25 2010-11-03 格科微电子(上海)有限公司 Image sensor device and method for identifying visible mark
CN102902943A (en) * 2012-09-18 2013-01-30 腾讯科技(深圳)有限公司 Two-dimension code scanning method, processing device and terminal
CN103729610A (en) * 2013-12-24 2014-04-16 北京握奇智能科技有限公司 Two-dimension code focusing displaying method and system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4041993B2 (en) * 2004-06-01 2008-02-06 ソニー株式会社 Display device, light receiving device, communication system, and communication method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101877046A (en) * 2009-11-25 2010-11-03 格科微电子(上海)有限公司 Image sensor device and method for identifying visible mark
CN102902943A (en) * 2012-09-18 2013-01-30 腾讯科技(深圳)有限公司 Two-dimension code scanning method, processing device and terminal
CN103729610A (en) * 2013-12-24 2014-04-16 北京握奇智能科技有限公司 Two-dimension code focusing displaying method and system

Also Published As

Publication number Publication date
CN105138942A (en) 2015-12-09

Similar Documents

Publication Publication Date Title
CN105138942B (en) The display methods and device of two dimensional code
CN106302762B (en) Smart machine binding method and device
EP3119054B1 (en) Method for controlling smart apparatus, terminal and server
CN104936304B (en) Smart machine binding method, smart machine and server
CN104318741B (en) Bluetooth equipment control method and device
EP3151507B1 (en) Methods and apparatuses for controlling device
CN105472771B (en) Wireless connection method and device
EP3076716A1 (en) Method and apparatus for network access
US10764934B2 (en) Method, apparatus for terminal device to access wireless network
US11329974B2 (en) Device network configuration method and apparatus, and storage medium
WO2019210487A1 (en) Face recognition-based payment method, device and terminal
WO2017128767A1 (en) Fingerprint template input method and device
CN105517103A (en) Network access method and device based on intelligent terminal device
JP2017537414A (en) Fingerprint authentication method and apparatus, program and recording medium
CN105228147A (en) Method for connecting network, Apparatus and system
KR101642019B1 (en) Method, apparatus, program, and recording medium of verifying terminal
CN105068467B (en) Control the method and device of smart machine
CN105323372A (en) Mobile terminal and method for controlling the same
CN109039990A (en) The method and device of behavior verifying is carried out based on identifying code
CN106792448A (en) Bluetooth connecting method and device, system
CN104994541B (en) Network flow bearing calibration and device
CN104506443A (en) Router setting interface display method and device
CN105550343B (en) Two dimensional code processing method and processing device
CN105337937B (en) Network verification method, device and computer readable storage medium
CN107851248B (en) Mobile terminal and control method thereof

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant