CN109842960A - Connect method for building up and device - Google Patents

Connect method for building up and device Download PDF

Info

Publication number
CN109842960A
CN109842960A CN201710841143.9A CN201710841143A CN109842960A CN 109842960 A CN109842960 A CN 109842960A CN 201710841143 A CN201710841143 A CN 201710841143A CN 109842960 A CN109842960 A CN 109842960A
Authority
CN
China
Prior art keywords
optical signal
terminal
mark
hotspot
established
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.)
Withdrawn
Application number
CN201710841143.9A
Other languages
Chinese (zh)
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.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN201710841143.9A priority Critical patent/CN109842960A/en
Publication of CN109842960A publication Critical patent/CN109842960A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Mobile Radio Communication Systems (AREA)

Abstract

The disclosure belongs to field of communication technology about a kind of connection method for building up and device.The described method includes: obtaining the mark for the Wi-Fi hotspot that first terminal is established;It is that the first optical signal exports by the identification code;Receive the access request that second terminal is sent, the access request is that the second terminal is decoded to obtain the mark to first optical signal that ambient light sensor receives, after determining Wi-Fi hotspot indicated by the mark in all Wi-Fi hotspots searched, sent to the first terminal for establishing the Wi-Fi hotspot;Connection is established according to the access request and the second terminal.The disclosure transmits data as medium using light, extends a kind of novel data transfer mode, so that data transmission is more convenient.In addition, the disclosure can simplify connection establishment process, to improve the efficiency that connection is established, connection is established between terminal and is provided convenience.

Description

Connect method for building up and device
Technical field
This disclosure relates to field of communication technology more particularly to a kind of connection method for building up and device.
Background technique
With the development of network technology, most of terminals can set itself to WiFi (Wireless Fidelity, Wireless Fidelity) hot spot, enable other terminals to establish connection by Wi-Fi hotspot and the terminal.
In the related technology, user opens the Wi-Fi hotspot function of first terminal manually, then the SSID of Wi-Fi hotspot is arranged (Service Set Identifier;Service set) and password;User opens the WiFi function of second terminal manually, and leads to The Wi-Fi hotspot near second terminal search is crossed, searches what SSID was provided with first terminal in all Wi-Fi hotspots searched When the identical Wi-Fi hotspot of the SSID of Wi-Fi hotspot, user selects the Wi-Fi hotspot, inputs password and first terminal is established and connected It connects.
Summary of the invention
To solve the problems in the relevant technologies, present disclose provides a kind of connection method for building up and devices.
According to the first aspect of the embodiments of the present disclosure, a kind of connection method for building up is provided, which comprises
Obtain the mark for the wireless fidelity Wi-Fi hotspot that first terminal is established;
It is that the first optical signal exports by the identification code;
The access request that second terminal is sent is received, the access request is that the second terminal connects ambient light sensor First optical signal received is decoded to obtain the mark, and the mark is determined from all Wi-Fi hotspots searched After indicated Wi-Fi hotspot, sent to the first terminal for establishing the Wi-Fi hotspot;
Connection is established according to the access request and the second terminal.
Optionally, the method, further includes:
It is that the second optical signal exports by data encoding to be sent, second terminal described in second optical signals connects It receives and is decoded to obtain the data.
It is optionally, described to export the identification code for the first optical signal, comprising:
According to preset coding schedule by the identification code be first optical signal;
First optical signal is exported by the backlight in the first terminal;Or, by the first terminal Flash lamp exports first optical signal.
Optionally, it is described according to preset coding schedule by the identification code be first optical signal, comprising:
According to the preset coding schedule by the identification code be optical signal;
The optical signal is added to and starts optical signal and terminates to obtain first optical signal between optical signal, it is described Beginning optical signal, which is used to indicate, starts to transmit the optical signal, and the end optical signal is used to indicate end and transmits the light letter Number.
Optionally, it is described according to the preset coding schedule by the identification code be optical signal, comprising:
Corresponding coding mode, the coding mode are searched in the preset coding schedule according to the content of the mark Encoded content include number of light emission times, adjacent time interval luminous twice, every time luminous duration, every time luminous light intensity value Or light intensity variation tendency;
The optical signal is generated with the coding mode.
According to the second aspect of an embodiment of the present disclosure, a kind of connection method for building up is provided, which comprises
The first optical signal of first terminal output is received by ambient light sensor, first optical signal is described first Terminal obtains the mark for the wireless fidelity Wi-Fi hotspot established, and is encoded to the mark;
First optical signal is decoded to obtain the mark;
The Wi-Fi hotspot indicated by the mark is determined from all Wi-Fi hotspots searched;
Access request is sent to the first terminal for establishing the Wi-Fi hotspot;
Connection is established according to the access request and the first terminal.
Optionally, the method, further includes:
The second optical signal of the first terminal output is received by the ambient light sensor, second optical signal is What the first terminal was encoded to sent data;
Second optical signal is decoded, the data are obtained.
It is optionally, described that first optical signal is decoded to obtain the mark, comprising:
It obtains to be located at and starts optical signal and terminate the optical signal between optical signal, the beginning optical signal is used to indicate beginning The optical signal is transmitted, the end optical signal is used to indicate end and transmits the optical signal;
The optical signal is decoded according to preset coding schedule, obtains the mark.
Optionally, described that the optical signal is decoded according to preset coding schedule, obtain the mark, comprising:
Determine the coding mode of the optical signal, the encoded content of the coding mode include number of light emission times, it is adjacent twice Luminous time interval, every time luminous duration, every time luminous light intensity value or light intensity variation tendency;
Content corresponding to the coding mode is searched in the preset coding schedule, obtains the mark.
Optionally, when the first terminal exports first optical signal by backlight, the determination light letter Number coding mode, comprising:
The brightness value of the optical signal that the ambient light sensor is measured multiplied by the first terminal display screen Reflection coefficient obtains the light intensity value of the optical signal;
The coding mode of the optical signal is determined according to the light intensity value.
According to the third aspect of an embodiment of the present disclosure, a kind of connect is provided and establishes device, described device includes:
Module is obtained, is configured as obtaining the mark for the wireless fidelity Wi-Fi hotspot that first terminal is established;
First output module is configured as the identification code for obtaining the acquisition module as the progress of the first optical signal Output;
Receiving module is configured as receiving the access request that second terminal is sent, and the access request is described second whole End is decoded to obtain the mark to first optical signal that ambient light sensor receives, from all WiFi searched After determining Wi-Fi hotspot indicated by the mark in hot spot, sent to the first terminal for establishing the Wi-Fi hotspot;
Module is established, is configured as being established according to the received access request of the receiving module and the second terminal Connection.
Optionally, described device, further includes:
Second output module is configured as being that the second optical signal is exported by data encoding to be sent, described second Second terminal described in optical signals receives and is decoded to obtain the data.
Optionally, first output module, comprising:
Encoding submodule is configured as according to preset coding schedule being first optical signal by the identification code;
Output sub-module is configured as exporting what the encoding submodule obtained by the backlight in the first terminal First optical signal;Or, exporting described first that the encoding submodule obtains by the flash lamp in the first terminal Optical signal.
Optionally, the encoding submodule, is configured as:
According to the preset coding schedule by the identification code be optical signal;
The optical signal is added to and starts optical signal and terminates to obtain first optical signal between optical signal, it is described Beginning optical signal, which is used to indicate, starts to transmit the optical signal, and the end optical signal is used to indicate end and transmits the light letter Number.
Optionally, the encoding submodule, is also configured to
Corresponding coding mode, the coding mode are searched in the preset coding schedule according to the content of the mark Encoded content include number of light emission times, adjacent time interval luminous twice, every time luminous duration, every time luminous light intensity value Or light intensity variation tendency;
The optical signal is generated with the coding mode.
According to a fourth aspect of embodiments of the present disclosure, a kind of connect is provided and establishes device, described device includes:
First receiving module is configured as receiving the first optical signal of first terminal output, institute by ambient light sensor Stating the first optical signal is the mark that the first terminal obtains the wireless fidelity Wi-Fi hotspot established, and is encoded to the mark It obtains;
First decoder module is configured as first optical signal received to first receiving module and is decoded To the mark;
Determining module is configured as determining the WiFi indicated by the mark from all Wi-Fi hotspots searched Hot spot;
Sending module is configured as sending access request to the first terminal for establishing the Wi-Fi hotspot;
Module is established, is configured as establishing connection according to the access request and the first terminal.
Optionally, described device, further includes:
Second receiving module is configured as receiving the second light of the first terminal output by the ambient light sensor Signal, second optical signal are that the first terminal is encoded to obtain to sent data;
Second decoder module is configured as second optical signal received to second receiving module and is decoded, Obtain the data.
Optionally, first decoder module, comprising:
Acquisition submodule is configured as obtaining the optical signal for being located at and starting between optical signal and end optical signal, described to open Beginning optical signal, which is used to indicate, starts to transmit the optical signal, and the end optical signal is used to indicate end and transmits the optical signal;
Decoding sub-module, be configured as the optical signal that the acquisition submodule is obtained according to preset coding schedule into Row decoding, obtains the mark.
Optionally, the decoding sub-module, is configured as:
Determine the coding mode of the optical signal, the encoded content of the coding mode include number of light emission times, it is adjacent twice Luminous time interval, every time luminous duration, every time luminous light intensity value or light intensity variation tendency;
Content corresponding to the coding mode is searched in the preset coding schedule, obtains the mark.
Optionally, when the first terminal exports first optical signal by backlight, the decoding sub-module, also It is configured as:
The brightness value of the optical signal that the ambient light sensor is measured multiplied by the first terminal display screen Reflection coefficient obtains the light intensity value of the optical signal;
The coding mode of the optical signal is determined according to the light intensity value.
According to a fifth aspect of the embodiments of the present disclosure, a kind of connect is provided and establishes device, described device includes:
Processor;
Memory for storage processor executable instruction;
Wherein, the processor is configured to:
Obtain the mark for the wireless fidelity Wi-Fi hotspot that first terminal is established;
It is that the first optical signal exports by the identification code;
The access request that second terminal is sent is received, the access request is that the second terminal connects ambient light sensor First optical signal received is decoded to obtain the mark, and the mark is determined from all Wi-Fi hotspots searched After indicated Wi-Fi hotspot, sent to the first terminal for establishing the Wi-Fi hotspot;
Connection is established according to the access request and the second terminal.
According to a sixth aspect of an embodiment of the present disclosure, a kind of connect is provided and establishes device, described device includes:
Processor;
Memory for storage processor executable instruction;
Wherein, the processor is configured to:
The first optical signal of first terminal output is received by ambient light sensor, first optical signal is described first Terminal obtains the mark for the wireless fidelity Wi-Fi hotspot established, and is encoded to the mark;
First optical signal is decoded to obtain the mark;
The Wi-Fi hotspot indicated by the mark is determined from all Wi-Fi hotspots searched;
Access request is sent to the first terminal for establishing the Wi-Fi hotspot;
Connection is established according to the access request and the first terminal.
According to the 7th of embodiment of the present disclosure aspect, a kind of computer readable storage medium is provided, in the storage medium It is stored at least one instruction, at least a Duan Chengxu, code set or instruction set, described at least one instructs, is at least one section described Program, the code set or instruction set are loaded by the processor and are executed to realize connection foundation side as described in relation to the first aspect Method.
According to the eighth aspect of the embodiment of the present disclosure, a kind of computer readable storage medium is provided, in the storage medium It is stored at least one instruction, at least a Duan Chengxu, code set or instruction set, described at least one instructs, is at least one section described Program, the code set or instruction set are loaded as the processor and are executed to realize the connection foundation side as described in second aspect Method.
The technical scheme provided by this disclosed embodiment can include the following benefits:
The identification code of the Wi-Fi hotspot of foundation is that the first optical signal exports by first terminal, in this way, second terminal The first optical signal can be received by ambient light sensor, and decodes and is identified, and the present embodiment is transmitted using light as medium Data extend a kind of novel data transfer mode, so that data transmission is more convenient.In addition, second terminal can The Wi-Fi hotspot that first terminal is established directly is determined from all Wi-Fi hotspots searched, then passes through the Wi-Fi hotspot and the One terminal establishes connection, searches the Wi-Fi hotspot of first terminal foundation one by one from all Wi-Fi hotspots without user, can Establishment process is connected to simplify, to improve the efficiency that connection is established, connection is established between terminal and provides convenience.
Data encoding to be sent is that the second optical signal exports by first terminal, in this way, second terminal can pass through Ambient light sensor receives the second optical signal, and decodes and obtain data, so that data transmission is more convenient.
The first optical signal is exported by the backlight in first terminal;Or, passing through the flash lamp output in first terminal the One optical signal, since backlight and flash lamp are all whole indispensable devices, so not needing to add terminal new device It realizes this programme, reduces the complexity of scheme realization.
Optical signal is added to and starts optical signal and terminates between optical signal, by starting optical signal come designation date biography Defeated beginning, the end transmitted by terminating optical signal come designation date, can accurately identify optical signals, to improve decoding The accuracy of obtained data.
Since the environmental sensor of each terminal is different to the perception degree of light intensity, that is, different ambient light sensors is surveyed The light intensity value obtained may be different, so that the content of mark can not be determined from coding schedule, and any ambient light sensor all may be used To measure accurate light intensity variation tendency, therefore, determine that the accuracy of coding mode is higher by light intensity variation tendency.
It should be understood that the above general description and the following detailed description are merely exemplary, this can not be limited It is open.
Detailed description of the invention
The drawings herein are incorporated into the specification and forms part of this specification, and shows the implementation for meeting the disclosure Example, and together with specification for explaining the principles of this disclosure.
Figure 1A and 1B is the schematic diagram that system is established in a kind of connection shown in each exemplary embodiment.
Fig. 2 is a kind of flow chart for connecting method for building up shown according to an exemplary embodiment.
Fig. 3 is a kind of flow chart of the connection method for building up shown according to another exemplary embodiment.
Fig. 4 is the block diagram that device is established in a kind of connection shown according to an exemplary embodiment.
Fig. 5 is the block diagram that device is established in a kind of connection shown according to an exemplary embodiment.
Fig. 6 is shown according to an exemplary embodiment a kind of for connecting the block diagram for the device established.
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 consistent with the application.On the contrary, they be only with as appended The example of the consistent device and method of some aspects be described in detail in claims, the application.
It is only to be not intended to be limiting the application merely for for the purpose of describing particular embodiments in term used in this application. It is also intended in the application and the "an" of singular used in the attached claims, " described " and "the" including majority Form, unless the context clearly indicates other meaning.It is also understood that term "and/or" used herein refers to and wraps It may be combined containing one or more associated any or all of project listed.
It will be appreciated that though various information, but this may be described using term first, second, third, etc. in the application A little information should not necessarily be limited by these terms.These terms are only used to for same type of information being distinguished from each other out.For example, not departing from In the case where the application range, the first information can also be referred to as the second information, and similarly, the second information can also be referred to as One information.Depending on context, word as used in this " if " can be construed to " ... when " or " when ... When " or " in response to determination ".
Figure 1A and 1B be according to this disclosure relates to each exemplary embodiment shown in a kind of connection establish showing for system It is intended to, it includes first terminal 110 and second terminal 120 which, which establishes system,.
First terminal 110 includes the output device of optical signal, such as backlight or flash lamp;Second terminal 120 includes light The receiving device of signal, such as ambient light sensor.In this way, second terminal 120 can receive by ambient light sensor The optical signal of one terminal 110 output.
When first terminal 110 further includes the receiving device of optical signal and second terminal 120 further includes the follower of optical signal When part, second terminal 120 can also receive optical signal by first terminal 110, below only with first terminal 110 with output optical signal Output optical signal, second terminal 120 are illustrated for receiving optical signal.
The positional relationship of first terminal 110 and second terminal 120 meets the following conditions: the light letter that first terminal 110 exports It number can be received by the ambient light sensor in second terminal 120.In the disclosure, first terminal 110 can pass through backlight Output optical signal, due to backlight lamp control display screen output optical signal, second terminal 120 is located at ambient light sensor Display screen where plane the upper left corner for, then the display of plane and first terminal 110 where the display screen of second terminal 120 Plane where screen is opposite, and the display screen face of second terminal 120 is located at the ambient light sensor in the upper left corner, please refers to Figure 1A. First terminal 110 can also be by flash lamp output optical signal, the back side of plane where being usually located at display screen due to flash lamp, That is the back side of first terminal 110, the upper left corner of plane is where the display screen of second terminal 120 is located at ambient light sensor Example, then the back side of second terminal 120 is opposite with plane where the display screen of first terminal 110, and the back side of second terminal 120 is just To the ambient light sensor for being located at the upper left corner, Figure 1B is please referred to.
Fig. 2 is a kind of flow chart for connecting method for building up shown according to an exemplary embodiment, the connection method for building up It is established in system applied to connection shown in figure 1A and 1B, as shown in Fig. 2, the connection method for building up includes the following steps.
In step 201, first terminal obtains the mark for the Wi-Fi hotspot that first terminal is established.
In step 202, which is that the first optical signal exports by first terminal.
In step 203, second terminal receives the first optical signal of first terminal output by ambient light sensor.
In step 204, second terminal is decoded the first optical signal to obtain the mark.
In step 205, second terminal determines the heat of WiFi indicated by the mark from all Wi-Fi hotspots searched Point.
In step 206, second terminal sends access request to the first terminal for establishing the Wi-Fi hotspot.
In step 207, first terminal receives the access request that second terminal is sent.
In a step 208, connection is established by access request between first terminal and second terminal.
Wherein, establishing connection by access request between first terminal and second terminal can be first terminal according to access Request establishes connection with second terminal, is also possible to second terminal according to access request and first terminal and establishes connection.
It should be noted that the embodiment as first terminal side can be implemented separately in step 201,202,207 and 208; The embodiment as second terminal side can be implemented separately in step 203-206.
In conclusion the connection method for building up that the disclosure provides, first terminal is by the identification code of the Wi-Fi hotspot of foundation It is exported for the first optical signal, in this way, second terminal can receive the first optical signal by ambient light sensor, and is decoded It is identified, the present embodiment transmits data as medium using light, a kind of novel data transfer mode is extended, so that data pass It is defeated more convenient.In addition, second terminal directly can determine that first terminal is built from all Wi-Fi hotspots searched Vertical Wi-Fi hotspot, then connection is established by the Wi-Fi hotspot and first terminal, without user from all Wi-Fi hotspots The Wi-Fi hotspot that first terminal is established is searched one by one, can simplify connection establishment process, to improve the efficiency that connection is established, is Connection is established between terminal to provide convenience.
Fig. 3 is a kind of flow chart of the connection method for building up shown according to another exemplary embodiment, the connection foundation side Method is applied to connection shown in figure 1A and 1B and establishes in system, as shown in figure 3, the connection method for building up includes the following steps.
In step 301, first terminal obtains the mark for the Wi-Fi hotspot that first terminal is established.
The establishment process of Wi-Fi hotspot are as follows: the SSID of Wi-Fi hotspot is arranged in the Wi-Fi hotspot function in starting first terminal And password.
Each first terminal all establishes Wi-Fi hotspot under the trigger of the user;Alternatively, first terminal can also detect itself Whether Wi-Fi hotspot was established, when itself did not set up Wi-Fi hotspot, Wi-Fi hotspot function, first terminal root are started by user Wi-Fi hotspot is established according to the SSID and password of user setting;When itself had built up Wi-Fi hotspot, first terminal opens automatically Dynamic Wi-Fi hotspot function, establishes Wi-Fi hotspot according to the SSID of user setting and password.When not high to security requirement, first Terminal can also be automatic to start Wi-Fi hotspot function when itself did not set up Wi-Fi hotspot, according to the SSID and password of default Establish Wi-Fi hotspot.The present embodiment does not limit the mode of establishing of Wi-Fi hotspot.
The mark of Wi-Fi hotspot can be SSID.
In step 302, which is the first optical signal according to preset coding schedule by first terminal.
It wherein, is the first optical signal by identification code according to preset coding schedule, comprising: will be marked according to preset coding schedule Knowledge is encoded to optical signal;Optical signal is added to and starts optical signal and terminates to obtain the first optical signal between optical signal, starts light Signal, which is used to indicate, to be started to transmit optical signal, is terminated optical signal and is used to indicate end transmission optical signal.
It wherein, is optical signal by identification code according to preset coding schedule, comprising: according to the content of mark in preset volume Corresponding coding mode is searched in code table, the encoded content of coding mode includes between number of light emission times, adjacent time luminous twice Every, luminous duration, every time luminous light intensity value or light intensity variation tendency every time;Optical signal is generated in a compiled manner.
Mark is usually a string of character strings, and character therein can be letter or number.
It include the corresponding relationship of character or character string and coding mode in preset coding schedule.For example, being identified as binary system Character string, and character 0 corresponds to coding mode 0, character 1 corresponds to coding mode 1;Alternatively, each character string corresponds to one Coding mode n.
When coding schedule includes the corresponding relationship of character and coding mode, the available each character of first terminal is corresponding Coding mode generates the combination of one group of coding mode according to position of each character in the string of binary characters, obtains final Coding mode.When coding schedule includes the corresponding relationship of character string and coding mode, first terminal can be directly in coding schedule The corresponding coding mode of middle lookup character string.
Wherein, the encoded content of coding mode includes number of light emission times, adjacent time interval luminous twice, shines every time Duration, the light intensity value to shine every time;Alternatively, the encoded content of coding mode includes number of light emission times, adjacent time luminous twice Interval, the duration to shine every time, the light intensity variation tendency to shine every time.
It is 1 second a length of when luminous every time for example, the encoded content of coding mode is to shine 2 times, when adjacent luminous twice Between between be divided into 1 second, luminous light intensity value is x, the then optical signal generated with the coding mode every time are as follows: continues bright 1 with light intensity value x Second, dark 1 second, continue bright 1 second with light intensity value x.
For example, the encoded content of coding mode is to shine 2 times, shine for the first time when it is 2 seconds a length of, second shine when A length of 3 seconds, adjacent time interval luminous twice was 1 second, and luminous light intensity variation tendency is second from small to large for the first time Luminous light intensity variation tendency is the optical signal then generated with the coding mode from big to small are as follows: light intensity value during continuing bright 2 seconds Become larger from small, dark 1 second, continue bright 3 seconds during light intensity value from big to small.
Since the environmental sensor of each terminal is different to the perception degree of light intensity, that is, different ambient light sensors is surveyed The light intensity value obtained may be different, so that the content of mark can not be determined from coding schedule, and any ambient light sensor all may be used To measure accurate light intensity variation tendency, therefore, determine that the accuracy of coding mode is higher by light intensity variation tendency.
Start optical signal it should be noted that first terminal can also be arranged and terminate optical signal, and optical signal is added To beginning optical signal and terminate between optical signal, second terminal is recognized accurately and starts optical signal and end optical signal Between optical signal.Wherein, starting optical signal can be identical as optical signal is terminated, can also be different from optical signal is terminated, this reality Example is applied to be not construed as limiting.
In step 303, first terminal exports the first optical signal by the backlight in first terminal;Or, passing through first Flash lamp in terminal exports the first optical signal.
In step 304, second terminal receives the first optical signal of first terminal output by ambient light sensor.
Since flash lamp is brighter, the difference of the first optical signal and environment light of flash lamp output is larger, therefore, second terminal The first optical signal received influenced by environment light it is little, by flash lamp export the first optical signal transmission mode it is accurate Property is higher.
Backlight exports the first optical signal by control display screen, and the brightness of display screen differs not with the brightness of environment light It is more.Although the first optical signal is rung by environment shadow, so that second terminal can not accurately measure the light intensity value of the first optical signal, It is that second terminal still can accurately measure the light intensity variation tendency of the first optical signal and environment finishing body, since environment light is usual Constant, therefore, which is the light intensity variation tendency of the first optical signal, also can by the way that light intensity variation tendency is arranged Improve the accuracy of the first optical signal received.
It should be noted that since environment light may also can be mutated, for example, second terminal makes suddenly by strong illumination The light intensity value for obtaining environment light increases suddenly, this can identify that the first optical signal generates interference to second terminal, and therefore, second terminal can To improve the accuracy of the first optical signal received by multiple repairing weld.
In step 305, second terminal is decoded the first optical signal to obtain the mark.
Wherein, the first optical signal is decoded and is identified, comprising: obtained and be located at beginning optical signal and end optical signal Between optical signal, start optical signal be used to indicate starts transmit optical signal, terminate optical signal be used to indicate end transmission light letter Number;Optical signal is decoded according to preset coding schedule, is identified.
Second terminal will be received when receiving terminates optical signal after starting optical signal, before end optical signal The optical signal that is obtained as identification code of optical signal.
Optionally, optical signal is decoded according to preset coding schedule, is identified, comprising: determine the volume of optical signal Code mode, the encoded content of coding mode include number of light emission times, adjacent time interval luminous twice, every time luminous duration, Luminous light intensity value or light intensity variation tendency every time;Content corresponding to coding mode is searched in preset coding schedule, is obtained Mark.
Second terminal is corresponding with the process encoded to mark to the decoded process of optical signal.
When coding schedule includes the corresponding relationship of character and coding mode, the available each coding mode of second terminal, The corresponding character of each coding mode is found in coding schedule, according to position of each coding mode in one group of coding mode A string of character strings are generated, are identified.When coding schedule includes the corresponding relationship of character string and coding mode, second terminal can be with The corresponding character string of the coding mode is directly searched in coding schedule, is identified.
When first terminal exports the first optical signal by backlight, since backlight lamp control display screen exports the first light letter Number, and display screen have reflection coefficient, therefore, display screen output the first optical signal be it is adjusted by reflection coefficient, this When, determine the coding mode of optical signal, comprising: the brightness value for the optical signal for measuring ambient light sensor is multiplied by first terminal The reflection coefficient of display screen obtains the light intensity value of optical signal;The coding mode of optical signal is determined according to the light intensity value.
Known formula light intensity value L=reflection R × brightness value E, it is known that the illumination that reflection coefficient and second terminal measure Value E, second terminal can be calculated from the formula the light intensity value of the optical signal of backlight reality output, determine further according to light intensity value The coding mode of optical signal.
Within step 306, second terminal determines the heat of WiFi indicated by the mark from all Wi-Fi hotspots searched Point.
In step 307, second terminal sends access request to the first terminal for establishing the Wi-Fi hotspot.
Wherein, access request further includes the password to be verified of user's input.At this point, second terminal also shows Wi-Fi hotspot Password input frame, user inputs password to be verified in the input frame, and second terminal adds the password to be verified Into access request.
In step 308, first terminal receives the access request that second terminal is sent.
In a step 309, connection is established by access request between first terminal and second terminal.
Wherein, establishing connection by access request between first terminal and second terminal can be first terminal according to access Request establishes connection with second terminal, is also possible to second terminal according to access request and first terminal and establishes connection.
When first terminal determines that the password in access request is accurate, the company between first terminal and second terminal is established It connects.
In the step 310, data encoding to be sent is that the second optical signal exports by first terminal.
After selecting data to be sent in user, which is that the second optical signal exports by first terminal.Its In, process that data encoding is the second optical signal is identical as by process that identification code is the first optical signal, it is no longer superfluous herein It states.
In step 311, second terminal receives the second optical signal of first terminal output by ambient light sensor, to the Two optical signals are decoded, and obtain the data.
Wherein, it is decoded to obtain the processes of data to the second optical signal and is identified with being decoded to the first optical signal Process it is identical, details are not described herein again.
Consumed flow is not needed during transmitting data in the present embodiment, between first terminal and second terminal, yet Expense will not be generated, the cost of data transmission can be saved.
It should be noted that the embodiment as first terminal side can be implemented separately in step 301-303,308-310;Step The embodiment as second terminal side can be implemented separately in rapid 304-307 and 311.
In conclusion the connection method for building up that the disclosure provides, first terminal is by the identification code of the Wi-Fi hotspot of foundation It is exported for the first optical signal, in this way, second terminal can receive the first optical signal by ambient light sensor, and is decoded It is identified, the present embodiment transmits data as medium using light, a kind of novel data transfer mode is extended, so that data pass It is defeated more convenient.In addition, second terminal directly can determine that first terminal is built from all Wi-Fi hotspots searched Vertical Wi-Fi hotspot, then connection is established by the Wi-Fi hotspot and first terminal, without user from all Wi-Fi hotspots The Wi-Fi hotspot that first terminal is established is searched one by one, can simplify connection establishment process, to improve the efficiency that connection is established, is Connection is established between terminal to provide convenience.
Data encoding to be sent is that the second optical signal exports by first terminal, in this way, second terminal can pass through Ambient light sensor receives the second optical signal, and decodes and obtain data, so that data transmission is more convenient.
The first optical signal is exported by the backlight in first terminal;Or, passing through the flash lamp output in first terminal the One optical signal, since backlight and flash lamp are all whole indispensable devices, so not needing to add terminal new device It realizes this programme, reduces the complexity of scheme realization.
Optical signal is added to and starts optical signal and terminates between optical signal, by starting optical signal come designation date biography Defeated beginning, the end transmitted by terminating optical signal come designation date, can accurately identify optical signals, to improve decoding The accuracy of obtained data.
Since the environmental sensor of each terminal is different to the perception degree of light intensity, that is, different ambient light sensors is surveyed The light intensity value obtained may be different, so that the content of mark can not be determined from coding schedule, and any ambient light sensor all may be used To measure accurate light intensity variation tendency, therefore, determine that the accuracy of coding mode is higher by light intensity variation tendency.
Fig. 4 is the block diagram that device is established in a kind of connection shown according to an exemplary embodiment, which establishes device and answer For in first terminal shown in figure 1A and 1B, as shown in figure 4, it includes: that obtain module 410, first defeated that device is established in the connection Module 420, receiving module 430 and establish module 440 out.
The acquisition module 410 is configured as obtaining the mark for the Wi-Fi hotspot that first terminal is established;
First output module 420 is configured as will acquire the identification code that module 410 obtains being the progress of the first optical signal Output;
The receiving module 430 is configured as receiving the access request that second terminal is sent, and access request is second terminal pair The first optical signal that ambient light sensor receives, which is decoded, to be identified, and mark is determined from all Wi-Fi hotspots searched After knowing indicated Wi-Fi hotspot, what the first terminal of Xiang Jianli Wi-Fi hotspot was sent;
This establishes module 440, is configured as establishing company according to the received access request of receiving module 430 and second terminal It connects.
Optionally, device, further includes: the second output module;
Second output module is configured as being that the second optical signal is exported by data encoding to be sent, the second light Signal is received by second terminal and is decoded to obtain data.
Optionally, the first output module 420, comprising: encoding submodule and output sub-module;
The encoding submodule is configured as according to preset coding schedule being the first optical signal by identification code;
The output sub-module is configured as the first light obtained by the backlight exports coding submodule in first terminal Signal;Or, the first optical signal obtained by the flash lamp exports coding submodule in first terminal.
Optionally, encoding submodule is configured as:
According to preset coding schedule by identification code be optical signal;
Optical signal is added to and starts optical signal and terminates to obtain the first optical signal between optical signal, starts optical signal and uses Start to transmit optical signal in instruction, terminates optical signal and be used to indicate end transmission optical signal.
Optionally, encoding submodule is also configured to
Corresponding coding mode, the encoded content packet of coding mode are searched in preset coding schedule according to the content of mark Number of light emission times, adjacent time interval luminous twice, the duration to shine every time, the light intensity value to shine every time or light intensity variation is included to become Gesture;
Optical signal is generated in a compiled manner.
In conclusion device is established in the connection that the disclosure provides, first terminal is by the identification code of the Wi-Fi hotspot of foundation It is exported for the first optical signal, in this way, second terminal can receive the first optical signal by ambient light sensor, and is decoded It is identified, the present embodiment transmits data as medium using light, a kind of novel data transfer mode is extended, so that data pass It is defeated more convenient.In addition, second terminal directly can determine that first terminal is built from all Wi-Fi hotspots searched Vertical Wi-Fi hotspot, then connection is established by the Wi-Fi hotspot and first terminal, without user from all Wi-Fi hotspots The Wi-Fi hotspot that first terminal is established is searched one by one, can simplify connection establishment process, to improve the efficiency that connection is established, is Connection is established between terminal to provide convenience.
Data encoding to be sent is that the second optical signal exports by first terminal, in this way, second terminal can pass through Ambient light sensor receives the second optical signal, and decodes and obtain data, so that data transmission is more convenient.
The first optical signal is exported by the backlight in first terminal;Or, passing through the flash lamp output in first terminal the One optical signal, since backlight and flash lamp are all whole indispensable devices, so not needing to add terminal new device It realizes this programme, reduces the complexity of scheme realization.
Optical signal is added to and starts optical signal and terminates between optical signal, by starting optical signal come designation date biography Defeated beginning, the end transmitted by terminating optical signal come designation date, can accurately identify optical signals, to improve decoding The accuracy of obtained data.
Since the environmental sensor of each terminal is different to the perception degree of light intensity, that is, different ambient light sensors is surveyed The light intensity value obtained may be different, so that the content of mark can not be determined from coding schedule, and any ambient light sensor all may be used To measure accurate light intensity variation tendency, therefore, determine that the accuracy of coding mode is higher by light intensity variation tendency.
Fig. 5 is the block diagram that device is established in a kind of connection shown according to an exemplary embodiment, which establishes device and answer For in second terminal shown in figure 1A and 1B, as shown in figure 5, it includes: the first acquisition module 510, that device is established in the connection One decoder module 520, determining module 530, sending module 540 and establish module 550.
First receiving module 510 is configured as receiving the first light letter of first terminal output by ambient light sensor Number, the first optical signal is the mark that first terminal obtains the Wi-Fi hotspot established, and is encoded to mark;
First decoder module 520 is configured as being decoded received first optical signal of the first receiving module 510 To mark;
The determining module 530 is configured as determining the WiFi heat that mark is indicated from all Wi-Fi hotspots searched Point;
The sending module 540 is configured as sending access request to the first terminal for establishing Wi-Fi hotspot;
This establishes module 550, is configured as establishing connection according to access request and first terminal.
Optionally, device, further includes: the second receiving module and the second decoder module;
Second receiving module is configured as receiving the second optical signal of first terminal output by ambient light sensor, Second optical signal is that first terminal is encoded to obtain to sent data;
Second decoder module is configured as the second optical signal received to the second receiving module and is decoded, counted According to.
Optionally, the first decoder module 520, comprising: acquisition submodule and decoding sub-module;
The acquisition submodule is configured as obtaining the optical signal for being located at and starting between optical signal and end optical signal, start Optical signal, which is used to indicate, to be started to transmit optical signal, is terminated optical signal and is used to indicate end transmission optical signal;
The decoding sub-module is configured as solving the optical signal that acquisition submodule obtains according to preset coding schedule Code, is identified.
Optionally, decoding sub-module is configured as:
The coding mode of optical signal is determined, when the encoded content of coding mode includes number of light emission times, is adjacent luminous twice Between interval, every time luminous duration, every time luminous light intensity value or light intensity variation tendency;
Content corresponding to coding mode is searched in preset coding schedule, is identified.
Optionally, when first terminal exports the first optical signal by backlight, decoding sub-module is also configured to
The brightness value for the optical signal that ambient light sensor is measured is obtained multiplied by the reflection coefficient of the display screen of first terminal The light intensity value of optical signal;
The coding mode of optical signal is determined according to light intensity value.
In conclusion device is established in the connection that the disclosure provides, first terminal is by the identification code of the Wi-Fi hotspot of foundation It is exported for the first optical signal, in this way, second terminal can receive the first optical signal by ambient light sensor, and is decoded It is identified, the present embodiment transmits data as medium using light, a kind of novel data transfer mode is extended, so that data pass It is defeated more convenient.In addition, second terminal directly can determine that first terminal is built from all Wi-Fi hotspots searched Vertical Wi-Fi hotspot, then connection is established by the Wi-Fi hotspot and first terminal, without user from all Wi-Fi hotspots The Wi-Fi hotspot that first terminal is established is searched one by one, can simplify connection establishment process, to improve the efficiency that connection is established, is Connection is established between terminal to provide convenience.
Data encoding to be sent is that the second optical signal exports by first terminal, in this way, second terminal can pass through Ambient light sensor receives the second optical signal, and decodes and obtain data, so that data transmission is more convenient.
The first optical signal is exported by the backlight in first terminal;Or, passing through the flash lamp output in first terminal the One optical signal, since backlight and flash lamp are all whole indispensable devices, so not needing to add terminal new device It realizes this programme, reduces the complexity of scheme realization.
Optical signal is added to and starts optical signal and terminates between optical signal, by starting optical signal come designation date biography Defeated beginning, the end transmitted by terminating optical signal come designation date, can accurately identify optical signals, to improve decoding The accuracy of obtained data.
Since the environmental sensor of each terminal is different to the perception degree of light intensity, that is, different ambient light sensors is surveyed The light intensity value obtained may be different, so that the content of mark can not be determined from coding schedule, and any ambient light sensor all may be used To measure accurate light intensity variation tendency, therefore, determine that the accuracy of coding mode is higher by light intensity variation tendency.
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.
An exemplary embodiment of the present disclosure provides a kind of connections to establish device, and the connection that can be realized disclosure offer is built Cube method, it includes: processor, for the memory of storage processor executable instruction which, which establishes device,;
Wherein, processor is configured as:
Obtain the mark for the Wi-Fi hotspot that first terminal is established;
It is that the first optical signal exports by identification code;
Receive the access request that second terminal is sent, access request is second terminal ambient light sensor is received the One optical signal, which is decoded, to be identified, after determining the indicated Wi-Fi hotspot of mark in all Wi-Fi hotspots searched, It is sent to the first terminal for establishing Wi-Fi hotspot;
Connection is established according to access request and second terminal.
An exemplary embodiment of the present disclosure provides a kind of connections to establish device, and the connection that can be realized disclosure offer is built Cube method, it includes: processor, for the memory of storage processor executable instruction which, which establishes device,;
Wherein, processor is configured as:
The first optical signal of first terminal output is received by ambient light sensor, the first optical signal is that first terminal obtains The mark of the Wi-Fi hotspot of foundation encodes mark;
First optical signal is decoded and is identified;
The indicated Wi-Fi hotspot of mark is determined from all Wi-Fi hotspots searched;
Access request is sent to the first terminal for establishing Wi-Fi hotspot;
Connection is established according to access request and first terminal.
An exemplary embodiment of the present disclosure provides a kind of computer readable storage medium, it is stored in the storage medium At least one instruction, at least a Duan Chengxu, code set or instruction set, at least one instruction, an at least Duan Chengxu, institute It states code set or instruction set and is loaded by the processor and executed connection method for building up to realize first terminal side as above.
An exemplary embodiment of the present disclosure provides a kind of computer readable storage medium, it is stored in the storage medium At least one instruction, at least a Duan Chengxu, code set or instruction set, at least one instruction, an at least Duan Chengxu, institute It states code set or instruction set and is loaded by the processor and executed connection method for building up to realize second terminal side as above.
Fig. 6 is shown according to an exemplary embodiment a kind of for connecting the block diagram for the device 600 established.For example, dress Setting 600 can be mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, medical treatment Equipment, body-building equipment, personal digital assistant etc..
Referring to Fig. 6, device 600 may include following one or more components: processing component 602, memory 604, power supply Component 606, multimedia component 608, audio component 610, the interface 612 of input/output (I/O), sensor module 614, and Communication component 616.
The integrated operation of the usual control device 600 of processing component 602, such as with display, telephone call, data communication, phase Machine operation and record operate associated operation.Processing component 602 may include that one or more processors 618 refer to execute It enables, to perform all or part of the steps of the methods described above.In addition, processing component 602 may include one or more modules, just Interaction between processing component 602 and other assemblies.For example, processing component 602 may include multi-media module, it is more to facilitate Interaction between media component 608 and processing component 602.
Memory 604 is configured as storing various types of data to support the operation in device 600.These data are shown Example includes the instruction of any application or method for operating on device 600, contact data, and telephone book data disappears Breath, picture, video etc..Memory 604 can be by any kind of volatibility or non-volatile memory device 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 606 provides electric power for the various assemblies of device 600.Power supply module 606 may include power management system System, one or more power supplys and other with for device 600 generate, manage, and distribute the associated component of electric power.
Multimedia component 608 includes the screen of one output interface of offer between described device 600 and user.One In a little embodiments, screen may include backlight, liquid crystal display (LCD) and touch panel (TP).If screen includes touching Panel, screen may be implemented as touch screen, to receive input signal from the user.Touch panel includes one or more touchings Sensor is touched to sense the gesture on touch, slide, and touch panel.The touch sensor can not only sense touch or cunning The boundary of movement, but also detect duration and pressure associated with the touch or slide operation.In some embodiments In, multimedia component 608 includes a front camera and/or rear camera.When device 600 is in operation mode, as clapped When taking the photograph mode or video mode, front camera and/or rear camera can receive external multi-medium data.It is each preposition Camera and rear camera can be a fixed optical lens system or have focusing and optical zoom capabilities.
Audio component 610 is configured as output and/or input audio signal.For example, audio component 610 includes a Mike Wind (MIC), when device 600 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 604 or via communication set Part 616 is sent.In some embodiments, audio component 610 further includes a loudspeaker, is used for output audio signal.
I/O interface 612 provides interface between processing component 602 and peripheral interface module, and above-mentioned peripheral interface module can To be keyboard, click wheel, button etc..These buttons may include, but are not limited to: home button, volume button, start button and lock Determine button.
Sensor module 614 includes one or more sensors, and the state for providing various aspects for device 600 is commented Estimate.For example, sensor module 614 can detecte the state that opens/closes of device 600, and the relative positioning of component, for example, it is described Component is the display and keypad of device 600, and sensor module 614 can be with 600 1 components of detection device 600 or device Position change, the existence or non-existence that user contacts with device 600,600 orientation of device or acceleration/deceleration and device 600 Temperature change.Sensor module 614 may include proximity sensor, be configured to detect without any physical contact Presence of nearby objects.Sensor module 614 can also include optical sensor, such as CMOS or ccd image sensor, at As being used in application.Sensor module 614 can also include ambient light sensor, carry on the back for being automatically adjusted according to environmental light brightness The brightness of light lamp.In some embodiments, the sensor module 614 can also include acceleration transducer, gyro sensor, Magnetic Sensor, pressure sensor or temperature sensor.
Communication component 616 is configured to facilitate the communication of wired or wireless way between device 600 and other equipment.Device 600 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 616 receives broadcast singal or broadcast related information from external broadcasting management system via broadcast channel. In one exemplary embodiment, the communication component 616 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 600 can be believed by one or more application specific integrated circuit (ASIC), number Number processor (DSP), digital signal processing appts (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 604 of instruction, above-metioned instruction can be executed by the processor 618 of device 600 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..
Those skilled in the art will readily occur to its of the disclosure after considering specification and practicing disclosure disclosed herein Its embodiment.This application is intended to cover any variations, uses, or adaptations of the disclosure, these modifications, purposes or Person's adaptive change follows the general principles of this disclosure 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 the true scope and spirit of the disclosure are by following Claim is pointed out.
It should be understood that the present disclosure is not limited to the precise structures that have been described above and shown in the drawings, and And various modifications and changes may be made without departing from the scope thereof.The scope of the present disclosure is only limited by the accompanying claims.

Claims (24)

1. a kind of connection method for building up, which is characterized in that the described method includes:
Obtain the mark for the wireless fidelity Wi-Fi hotspot that first terminal is established;
It is that the first optical signal exports by the identification code;
The access request that second terminal is sent is received, the access request is that the second terminal receives ambient light sensor First optical signal be decoded to obtain the mark, mark meaning is determined from all Wi-Fi hotspots searched After the Wi-Fi hotspot shown, sent to the first terminal for establishing the Wi-Fi hotspot;
Connection is established according to the access request and the second terminal.
2. the method according to claim 1, wherein the method, further includes:
It is that the second optical signal exports by data encoding to be sent, second terminal described in second optical signals receives simultaneously It is decoded to obtain the data.
3. method according to claim 1 or 2, which is characterized in that it is described by the identification code be the first optical signal into Row output, comprising:
According to preset coding schedule by the identification code be first optical signal;
First optical signal is exported by the backlight in the first terminal;Or, passing through the flash of light in the first terminal Lamp exports first optical signal.
4. according to the method described in claim 3, it is characterized in that, described be by the identification code according to preset coding schedule First optical signal, comprising:
According to the preset coding schedule by the identification code be optical signal;
The optical signal is added to and starts optical signal and terminates to obtain first optical signal, the beginning between optical signal Optical signal, which is used to indicate, starts to transmit the optical signal, and the end optical signal is used to indicate end and transmits the optical signal.
5. according to the method described in claim 4, it is characterized in that, described compile the mark according to the preset coding schedule Code is optical signal, comprising:
Corresponding coding mode, the volume of the coding mode are searched in the preset coding schedule according to the content of the mark Digital content includes number of light emission times, adjacent time interval luminous twice, the duration to shine every time, the light intensity value or light to shine every time Strong variation tendency;
The optical signal is generated with the coding mode.
6. a kind of connection method for building up, which is characterized in that the described method includes:
The first optical signal of first terminal output is received by ambient light sensor, first optical signal is the first terminal The mark for obtaining the wireless fidelity Wi-Fi hotspot established, encodes the mark;
First optical signal is decoded to obtain the mark;
The Wi-Fi hotspot indicated by the mark is determined from all Wi-Fi hotspots searched;
Access request is sent to the first terminal for establishing the Wi-Fi hotspot;
Connection is established according to the access request and the first terminal.
7. according to the method described in claim 6, it is characterized in that, the method, further includes:
The second optical signal of the first terminal output is received by the ambient light sensor, second optical signal is described First terminal is encoded to sent data;
Second optical signal is decoded, the data are obtained.
8. method according to claim 6 or 7, which is characterized in that described to be decoded to obtain to first optical signal The mark, comprising:
It obtains to be located at and starts optical signal and terminate the optical signal between optical signal, the beginning optical signal, which is used to indicate, to be started to transmit The optical signal, the end optical signal are used to indicate end and transmit the optical signal;
The optical signal is decoded according to preset coding schedule, obtains the mark.
9. according to the method described in claim 8, it is characterized in that, described carry out the optical signal according to preset coding schedule Decoding, obtains the mark, comprising:
Determine the coding mode of the optical signal, the encoded content of the coding mode includes number of light emission times, adjacent shines twice Time interval, luminous duration, every time luminous light intensity value or light intensity variation tendency every time;
Content corresponding to the coding mode is searched in the preset coding schedule, obtains the mark.
10. according to the method described in claim 9, it is characterized in that, when the first terminal exports described the by backlight When one optical signal, the coding mode of the determination optical signal, comprising:
The brightness value for the optical signal that the ambient light sensor is measured multiplied by the display screen of the first terminal reflection Coefficient obtains the light intensity value of the optical signal;
The coding mode of the optical signal is determined according to the light intensity value.
11. device is established in a kind of connection, which is characterized in that described device includes:
Module is obtained, is configured as obtaining the mark for the wireless fidelity Wi-Fi hotspot that first terminal is established;
First output module is configured as the identification code that the acquisition module obtains being that the progress of the first optical signal is defeated Out;
Receiving module is configured as receiving the access request that second terminal is sent, and the access request is the second terminal pair First optical signal that ambient light sensor receives is decoded to obtain the mark, from all Wi-Fi hotspots searched After Wi-Fi hotspot indicated by the middle determination mark, sent to the first terminal for establishing the Wi-Fi hotspot;
Module is established, is configured as establishing company according to the received access request of the receiving module and the second terminal It connects.
12. device according to claim 11, which is characterized in that described device, further includes:
Second output module is configured as being that the second optical signal is exported by data encoding to be sent, the second light letter It number is received by the second terminal and is decoded to obtain the data.
13. device according to claim 11 or 12, which is characterized in that first output module, comprising:
Encoding submodule is configured as according to preset coding schedule being first optical signal by the identification code;
Output sub-module is configured as exporting by the backlight in the first terminal described in the encoding submodule obtains First optical signal;Believe or, exporting first light that the encoding submodule obtains by the flash lamp in the first terminal Number.
14. device according to claim 13, which is characterized in that the encoding submodule is configured as:
According to the preset coding schedule by the identification code be optical signal;
The optical signal is added to and starts optical signal and terminates to obtain first optical signal, the beginning between optical signal Optical signal, which is used to indicate, starts to transmit the optical signal, and the end optical signal is used to indicate end and transmits the optical signal.
15. device according to claim 14, which is characterized in that the encoding submodule is also configured to
Corresponding coding mode, the volume of the coding mode are searched in the preset coding schedule according to the content of the mark Digital content includes number of light emission times, adjacent time interval luminous twice, the duration to shine every time, the light intensity value or light to shine every time Strong variation tendency;
The optical signal is generated with the coding mode.
16. device is established in a kind of connection, which is characterized in that described device includes:
First receiving module is configured as receiving the first optical signal of first terminal output by ambient light sensor, described the One optical signal is the mark that the first terminal obtains the wireless fidelity Wi-Fi hotspot established, and is encoded to obtain to the mark 's;
First decoder module is configured as first optical signal received to first receiving module and is decoded to obtain institute State mark;
Determining module is configured as determining the WiFi heat indicated by the mark from all Wi-Fi hotspots searched Point;
Sending module is configured as sending access request to the first terminal for establishing the Wi-Fi hotspot;
Module is established, is configured as establishing connection according to the access request and the first terminal.
17. device according to claim 16, which is characterized in that described device, further includes:
Second receiving module is configured as receiving the second light letter of the first terminal output by the ambient light sensor Number, second optical signal is that the first terminal is encoded to obtain to sent data;
Second decoder module is configured as second optical signal received to second receiving module and is decoded, obtains The data.
18. device according to claim 16 or 17, which is characterized in that first decoder module, comprising:
Acquisition submodule is configured as obtaining the optical signal for being located at and starting between optical signal and end optical signal, the beginning light Signal, which is used to indicate, starts to transmit the optical signal, and the end optical signal is used to indicate end and transmits the optical signal;
Decoding sub-module is configured as solving the optical signal that the acquisition submodule obtains according to preset coding schedule Code, obtains the mark.
19. device according to claim 18, which is characterized in that the decoding sub-module is configured as:
Determine the coding mode of the optical signal, the encoded content of the coding mode includes number of light emission times, adjacent shines twice Time interval, luminous duration, every time luminous light intensity value or light intensity variation tendency every time;
Content corresponding to the coding mode is searched in the preset coding schedule, obtains the mark.
20. device according to claim 19, which is characterized in that when the first terminal exports described by backlight When one optical signal, the decoding sub-module is also configured to
The brightness value for the optical signal that the ambient light sensor is measured multiplied by the display screen of the first terminal reflection Coefficient obtains the light intensity value of the optical signal;
The coding mode of the optical signal is determined according to the light intensity value.
21. device is established in a kind of connection, which is characterized in that described device includes:
Processor;
Memory for storage processor executable instruction;
Wherein, the processor is configured to:
Obtain the mark for the wireless fidelity Wi-Fi hotspot that first terminal is established;
It is that the first optical signal exports by the identification code;
The access request that second terminal is sent is received, the access request is that the second terminal receives ambient light sensor First optical signal be decoded to obtain the mark, mark meaning is determined from all Wi-Fi hotspots searched After the Wi-Fi hotspot shown, sent to the first terminal for establishing the Wi-Fi hotspot;
Connection is established according to the access request and the second terminal.
22. device is established in a kind of connection, which is characterized in that described device includes:
Processor;
Memory for storage processor executable instruction;
Wherein, the processor is configured to:
The first optical signal of first terminal output is received by ambient light sensor, first optical signal is the first terminal The mark for obtaining the wireless fidelity Wi-Fi hotspot established, encodes the mark;
First optical signal is decoded to obtain the mark;
The Wi-Fi hotspot indicated by the mark is determined from all Wi-Fi hotspots searched;
Access request is sent to the first terminal for establishing the Wi-Fi hotspot;
Connection is established according to the access request and the first terminal.
23. a kind of computer readable storage medium, which is characterized in that be stored at least one instruction, extremely in the storage medium A few Duan Chengxu, code set or instruction set, at least one instruction, an at least Duan Chengxu, the code set or instruction Collection is loaded by the processor and is executed to realize connection method for building up as claimed in claim 1 to 5.
24. a kind of computer readable storage medium, which is characterized in that be stored at least one instruction, extremely in the storage medium A few Duan Chengxu, code set or instruction set, at least one instruction, an at least Duan Chengxu, the code set or instruction Collection is loaded by the processor and is executed to realize the connection method for building up as described in claim 6 to 10 is any.
CN201710841143.9A 2017-09-18 2017-09-18 Connect method for building up and device Withdrawn CN109842960A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710841143.9A CN109842960A (en) 2017-09-18 2017-09-18 Connect method for building up and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710841143.9A CN109842960A (en) 2017-09-18 2017-09-18 Connect method for building up and device

Publications (1)

Publication Number Publication Date
CN109842960A true CN109842960A (en) 2019-06-04

Family

ID=66876064

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710841143.9A Withdrawn CN109842960A (en) 2017-09-18 2017-09-18 Connect method for building up and device

Country Status (1)

Country Link
CN (1) CN109842960A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111542133A (en) * 2020-06-18 2020-08-14 Tcl海外电子(惠州)有限公司 Information transmission method, system, receiving device, transmitting device and storage medium
CN112491473A (en) * 2020-12-16 2021-03-12 支付宝(杭州)信息技术有限公司 Method and system for establishing wireless communication connection

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111542133A (en) * 2020-06-18 2020-08-14 Tcl海外电子(惠州)有限公司 Information transmission method, system, receiving device, transmitting device and storage medium
CN111542133B (en) * 2020-06-18 2023-05-09 茂佳科技(广东)有限公司 Information transmission method, system, receiving device, transmitting device and storage medium
CN112491473A (en) * 2020-12-16 2021-03-12 支付宝(杭州)信息技术有限公司 Method and system for establishing wireless communication connection
CN112491473B (en) * 2020-12-16 2022-03-18 支付宝(杭州)信息技术有限公司 Method and system for establishing wireless communication connection

Similar Documents

Publication Publication Date Title
CN104038263B (en) Method and device for establishing Bluetooth connection
CN104936304B (en) Smart machine binding method, smart machine and server
WO2017008399A1 (en) Smart device control method, terminal, and server
RU2626659C1 (en) Method and equipment for device control
US20160295625A1 (en) Method and apparatus for network access
CN105138942B (en) The display methods and device of two dimensional code
CN105450655A (en) Device binding methods and apparatuses
CN104464238B (en) Method of controlling operation thereof and device between mobile terminal
CN106528617B (en) A kind of method and device that Web page picture is shown
CN104159218A (en) Network connection establishment method and device
CN112887926B (en) Calling method and device
CN106506562B (en) Method for connecting network, device and the smart machine of smart machine
KR101606134B1 (en) Apparatus and method for connecting device using the image recognition in portable terminal
CN110399112A (en) A kind of throwing screen method and device
CN104506443A (en) Router setting interface display method and device
CN105828294B (en) Detection method and device
CN105207813B (en) Smart machine sort method and device
CN110769422A (en) Distribution network data transmission method and device
CN105188024B (en) Access the method, apparatus and system of network
EP3614711A1 (en) Method for outputting networking authentication information, networking method, apparatus and storage medium
CN109842960A (en) Connect method for building up and device
CN104811904A (en) Contact setting method and device
CN105307204B (en) signal display method and device
CN108307477A (en) Connect method for building up and device
CN108925016A (en) State display method, device and the computer readable storage medium of intelligent electric lamp

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20190604