Summary of the invention
Embodiments provide method and terminal that a kind of short-distance radio connects, be used for improving terminal it
Between short-distance radio connect efficiency.
A kind of method that embodiment of the present invention first aspect provides short-distance radio to connect includes:
First terminal obtains the Access Control of the second terminal and generates information;
First terminal generates information according to Access Control and generates access point;
First terminal receives the access request that the second terminal sends;
First terminal is connected with the second terminal foundation according to access request.
In a kind of possible implementation, Access Control generate information include the first title, first password with
And at least one that second in the channel bands information three that supported of terminal;The title of access point and first
Title is identical, and the password of access point is identical with first password, and the channel bands of access point is the second terminal institute
The channel bands supported.
In alternatively possible implementation, when Access Control generation information includes channel bands information,
Channel bands information includes at least two channel bands;
First terminal generates information generation access point according to Access Control and specifically includes:
When first terminal support at least two channel bands time, first terminal automatically according to default preference strategy,
Channel bands is selected to generate corresponding access point from least two channel bands.
In alternatively possible implementation, first terminal obtains the Access Control of the second terminal and generates information
Specifically include:
First terminal scanning and the Quick Response Code of the second terminal association, Quick Response Code points to Access Control and generates information.
Embodiment of the present invention second aspect provides a kind of method that short-distance radio connects, including:
Second terminal output Access Control generates information, so that first terminal produces letter according to Access Control
Breath generates access point;
Second terminal generates, according to Access Control, the access point that information searching is generated to first terminal;
Second terminal is connected with first terminal foundation by access point.
In a kind of possible implementation, the second terminal input Access Control generates information and specifically includes:
Second terminal generates Quick Response Code, and Quick Response Code points to Access Control and generates information.
The embodiment of the present invention third aspect provides a kind of first terminal, including:
Acquiring unit, generates information for obtaining the Access Control of the second terminal;
Signal generating unit, generates access point for generating information according to Access Control;
Receive unit, for receiving the access request that the second terminal sends;
Connect unit, for being connected with the second terminal foundation according to access request.
In a kind of possible implementation, Access Control generate information include the first title, first password with
And at least one that second in the channel bands information three that supported of terminal;The title of access point and first
Title is identical, and the password of access point is identical with first password, and the channel bands of access point is the second terminal institute
The channel bands supported.
In alternatively possible implementation, acquiring unit specifically includes:
Scanning element, for the Quick Response Code of scanning with the second terminal association, it is raw that Quick Response Code points to Access Control
One-tenth information.
Embodiment of the present invention fourth aspect provides a kind of second terminal, including:
Output unit, is used for exporting Access Control and generates information so that first terminal is raw according to Access Control
Product information generates access point;
Search unit, for generating, according to Access Control, the access point that information searching is generated to first terminal;
Connect unit, for being connected with first terminal foundation by access point.
As can be seen from the above technical solutions, the embodiment of the present invention has the advantage that the embodiment of the present invention
In, first terminal obtains the Access Control of the second terminal and generates information, and first terminal is raw according to Access Control
One-tenth information generate access point, first terminal receive second terminal send access request, first terminal according to
Access request is set up with the second terminal and is connected.So, first terminal, before generating access point, first obtains
The Access Control of the second terminal generates information, thus carries out an Access Control with the second terminal and generate information
Agreement, then according to this Access Control generate information generate access point so that the second terminal can
Search the access point that first terminal is generated quickly and easily, and quickly set up connection, thus improve
The efficiency of short-distance radio connection is carried out, it is impossible to user carries out artificial judgment connection, improves use between terminal
The experience at family.
Term " first " in description and claims of this specification and above-mentioned accompanying drawing, " second ", "
Three ", the (if present) such as " the 4th " be for distinguishing similar object, specific without being used for describing
Order or precedence.Should be appreciated that the data of so use can be exchanged in the appropriate case, in order to this
In describe embodiment can with in addition to the content except here illustrating or describe order implement.Additionally,
Term " includes " and " having " and their any deformation, it is intended that cover non-exclusive comprising, such as,
Contain series of steps or the process of unit, method, system, product or equipment are not necessarily limited to clearly
Those steps listed or unit, but can include the most clearly listing or for these processes, side
Other step that method, product or equipment are intrinsic or unit.
Embodiments provide method and terminal that a kind of short-distance radio connects, be used for improving terminal it
Between short-distance radio connect efficiency.
With reference to shown in Fig. 1, an embodiment of the method for embodiment of the present invention medium or short range wireless connections includes:
101, first terminal obtains the Access Control generation information of the second terminal;
In the prior art, as the first terminal of service end for being autonomously generated access point, therefore cause
After first terminal generates access point, use the user of the second terminal as client, can only be by artificial
Judge the access point that in the multiple access points searched, which is generated by first terminal.And in the present invention
In embodiment, in order to overcome this problem, the first terminal as service end is generating before access point,
From the second terminal, first obtain Access Control generate information, and this Access Control generation information is as client
Second terminal of end is exported.Oneself is first wanted the access point connected to pass through Access Control by the second terminal
Generation information tells first terminal, and first terminal then can generate according to this Access Control generation information and connect
Access point, so, first terminal, before generating access point, first has carried out once arranging with the second terminal.
102, described first terminal generates information according to described Access Control and generates access point;
After first terminal gets the Access Control generation information of the second terminal, then according to this Access Control
Generation information generates access point, then the access point that first terminal is generated then meets the connection of the second terminal
The channel bands that the title of requirement, such as access point, the password of access point and access point are used, all
Meet the requirement of the second terminal so that the second terminal can be quickly found out the access point of first terminal and access.
103, described first terminal receives the access request that described second terminal sends;
After first terminal generates information generation access point according to Access Control, then can broadcast access signal,
Make other terminal in short distance can search the access point that first terminal is generated.Due to second
Terminal needs to set up with first terminal to be connected, and therefore the second terminal needs to search for the access point of first terminal,
Owing to during the access point of first terminal, Access Control according to the second terminal generates what information was generated, therefore,
Second terminal can generate information according to the Access Control of oneself and accurately search this access point, and to first
Terminal sends access request.
104, described first terminal is connected with described second terminal foundation according to described access request;
After the access request of the transmission that first terminal receives the second terminal, then according to this access request and the
Two terminals are set up and are connected.In concrete connection procedure, first terminal can also first judge the body of the second terminal
Part is the most legal, i.e. the second terminal is carried out identification authentication.Set up at first terminal and the second terminal and connect
After, first terminal then can realize resource function or data communication with the second terminal.
In the embodiment of the present invention, first terminal obtains the Access Control of the second terminal and generates information, and described the
One terminal generates information according to described Access Control and generates access point, and described first terminal receives described second
The access request that terminal sends, described first terminal is set up with described second terminal according to described access request
Connect.So, first terminal is before generating access point, and the Access Control first obtaining the second terminal generates
Information, thus carry out an Access Control with the second terminal and generate the agreement of information, then according to this access
Control generation information and generate access point, so that the second terminal can search first eventually quickly and easily
The access point that end is generated, and quickly set up connection, thus improve and carry out short-distance radio between terminal even
The efficiency connect, it is impossible to user carries out artificial judgment connection, improves the experience of user.
With reference to shown in Fig. 2, another embodiment of the method for embodiment of the present invention medium or short range wireless connections includes:
201, first terminal obtains the Access Control generation information of the second terminal;Described Access Control generates letter
Breath includes in the channel bands information three that the first title, first password and described second terminal are supported
At least one;
Alternatively, first terminal obtains the Access Control generation information of the second terminal and can be, first terminal
Scanning and the Quick Response Code of described second terminal association, described Quick Response Code points to described Access Control and generates information.
Second terminal can first generate Quick Response Code, and this Quick Response Code is raw according to the Access Control required for the second terminal
One-tenth information is generated.
In this Access Control generation information, the first title, first password and the second terminal can be included
At least one in this three of channel bands information supported.If this control generates information and only includes first
Title, then first terminal then can generate access point, the name of the access point generated according to this first title
Claiming consistent with this first title, so, the second terminal, when searching for the access point of first terminal, the most only needs
Go to mate according to the first title, the access point that the match is successful is then the access that first terminal is generated
Point;If this Access Control generates information and only includes first password, then the access point that first terminal is generated
Password then consistent with first password, the second terminal is after searching multiple access point, first close according to this
Code is sequentially ingressed into request to the plurality of access point, when request is passed through, then it represents that connected connects
The access point that access point is generated by first terminal;When the JA(junction ambient) of first terminal and the second terminal is preferable
During environment, when i.e. around there is no other access point and terminal, then first terminal and the second terminal are without it
Its checking, can be directly connected to.But, due to the structure reason of terminal itself, different terminal institute energy
The channel bands supported may be different, and such as, some terminals support 2.4GHz frequency range and 5GHz frequency range,
And have a terminal only to support 2.4GHz frequency range, and only when the two channel bands used is identical, two
Person can set up connection.If the two channel bands used is inconsistent, then cannot connect, Zhi Nengtong
Cross user and adjust channel bands that first terminal used or the channel bands that the second terminal is used, make
The channel bands used both unanimously could connect.So the Access Control that the second terminal produces generates
In information, it is also possible to including the channel bands that the second terminal is supported, so, first terminal then can basis
Channel bands that second terminal is supported generates access point, and the access point that first terminal is generated is then the
The channel bands that two terminals are supported is the most all 2.4GHz frequency range or be all 5GHz frequency range.
It should be noted that in the embodiment of the present invention, the mode of short-distance radio can be bluetooth connection, nothing
Line fidelity (English full name: WIreless-Fidelity, english abbreviation: Wi-Fi) connects, visible ray is wireless
Communication (English full name: Light Fidelity english abbreviation: LiFi) connects and ZigBee protocol (ZigBee)
One in connection, does not limits.Such as, if short-distance radio is connected as Wi-Fi connected mode, that
The access point that first terminal is generated is then for Wi-Fi Hotspot.
Being appreciated that to those skilled in the art, short-distance wireless communication is general in an industry
Concept, to belong to short-distance wireless communication be clear and definite in which kind of communication.Such as, above-mentioned WIFI, LIFI or
ZIGBEE etc. come under short-distance wireless communication.
202, described first terminal generates information according to described Access Control and generates access point;Described access point
Title identical with described first title, the password of described access point is identical with described first password, described
The channel bands that the channel bands of access point is supported by described second terminal;
Optionally, when described Access Control generation information includes channel bands information, described channel bands
Information includes at least two channel bands;Described first terminal generates information according to described Access Control and generates
Access point specifically includes: when described first terminal supports described at least two channel bands, and described first
Terminal, automatically according to default preference strategy, selects channel bands to generate from described at least two channel bands
Corresponding access point.
The transfer rate of different channel bands is different, and connects to set up and carry out phase between terminal
Data communication mutually, then both sides must use identical channel bands.In embodiments of the present invention, protecting
While the identical channel bands of card first terminal and the second terminal use communicates, it is also possible to by the
One terminal arranges preference strategy to adjust the channel bands that first terminal is used, thus ensures first terminal
The channel bands used with the second terminal is the fastest channel frequency of transfer rate in the channel bands supported
Section.Such as, in the Access Control generation information of the second terminal accessed by first terminal, contain
The channel bands that two terminals can be supported includes 2.4GHz frequency range and 5GHz frequency range, and first terminal institute energy
The channel bands supported also includes 2.4GHz frequency range and 5GHz frequency range, it is well known that 5GHz frequency range
Transfer rate is more than the transfer rate of 2.4GHz frequency range, then according to the preference strategy set by first terminal,
The channel bands that transfer rate that first terminal prioritizing selection first terminal is supported is the fastest, i.e. first terminal
Preferential preselected 5GHz frequency range is as the channel bands of access point, then judges whether the second terminal is supported
5GHz frequency range, if supporting, then first terminal then determines the channel that 5GHz frequency range is used by access point
Frequency range;If not supporting, then first terminal then determines that the 2.4GHz frequency range that the second end is supported is access
The channel bands that point is used.After first terminal generates access point, connect this access in the second terminal
In point process, the second terminal can judge the channel bands that this access point is used, and is determining first terminal institute
After the channel bands used, the second terminal allows hand over into the channel bands used with first terminal, from
And set up connection.
For preference strategy, it can be that transfer rate as stated earlier is preferential, it is also possible to be with
Stability is preferential, it is also possible to be that capacity of resisting disturbance is preferential, or safe priority scheduling.
In an embodiment of the invention, it is wirelessly transferred the radius communication less than 150 meters and may be considered short
Journey radio communication.
In alternatively possible implementation, when first terminal supports at least two channel bands, first
Terminal generates information according to described Access Control and generates access point and include: described first terminal judges described the
Whether two terminals support that in described at least two channel bands, transfer rate is more than the channel frequency of predetermined threshold value
Section, the most then the channel bands of the access point generated is transfer rate in described at least two channel bands
Channel bands more than predetermined threshold value.Such as, first terminal supports 2.4GHz frequency range and 5GHz frequency range,
Second terminal also supports 2.4GHz frequency range and 5GHz frequency range, then first terminal obtains from the second terminal
The channel bands that the second terminal that Access Control generation information includes is supported be 2.4GHz frequency range and
5GHz frequency range, if the transfer rate that the transfer rate of 2.4GHz frequency range is 2M/S, 5GHz frequency range is
10M/S, then described predetermined threshold value is set to 9.9M/S, if in existing channel agreement, terminal can
The transfer rate the used channel bands more than 9.9M/S is 5GHz frequency range, then first terminal is generated
The channel bands that used of access point then for 5GHz frequency range.So, first terminal and the second terminal are being entered
Row about timing, first determines the channel bands that the second terminal can be supported, first terminal then can according to self
Support channel bands generate access point so that the channel bands that access point is used not only with the second terminal
The channel bands used is consistent, and ensures to be transfer rate a kind of channel bands faster.So,
Avoid user and manually adjust the channel bands that terminal is used, and improve the biography after connecting between terminal
Defeated speed, improves Consumer's Experience.
203, described first terminal receives the access request that described second terminal sends;
Detailed content is with reference to described in step 103.
204, described first terminal is connected with described second terminal foundation according to described access request;
Detailed content is with reference to described in step 104.
With reference to shown in Fig. 3, another embodiment of the method for embodiment of the present invention medium or short range wireless connections includes:
301, the second terminal output Access Control generates information, so that first terminal accesses control according to described
Production information processed generates access point;
Detailed content is with reference to described in step 101.
302, described second terminal is given birth to described first terminal according to described Access Control generation information searching
The access point become;
Detailed content is with reference to described in step 102.
303, described second terminal is connected with the foundation of described first terminal by described access point.
Detailed content is with reference to described in step 103 and 104.
Optionally, described second terminal input Access Control generation information specifically includes: the second terminal generates
Quick Response Code, described Quick Response Code points to Access Control and generates information.
With reference to shown in Fig. 4, in the embodiment of the present invention, an embodiment of first terminal includes:
Acquiring unit 401, generates information for obtaining the Access Control of the second terminal;
Detailed content is with reference to described in step 101.
Signal generating unit 402, generates access point for generating information according to described Access Control;
Detailed content is with reference to described in step 102.
Receive unit 403, for receiving the access request that described second terminal sends;
Detailed content is with reference to described in step 103.
Connect unit 404, for being connected with described second terminal foundation according to described access request;
Detailed content is with reference to described in step 104.
With reference to shown in Fig. 5, in the embodiment of the present invention, another embodiment of first terminal includes:
Acquiring unit 501 includes: scanning element 5011, for scanning and the two of described second terminal association
Dimension code, described Quick Response Code points to Access Control and generates information, and described Access Control generates information and includes first
At least one in the channel bands information three that title, first password and described second terminal are supported;
Detailed content is with reference to described in step 201.
Signal generating unit 502, generates access point, described access point for generating information according to described Access Control
Title identical with described first title, the password of described access point is identical with described first password, described
The channel bands that the channel bands of access point is supported by described second terminal;
Detailed content is with reference to described in step 202.
Receive unit 503, for receiving the access request that described second terminal sends;
Detailed content is with reference to described in step 203.
Connect unit 504, for being connected with described second terminal foundation according to described access request.
Detailed content is with reference to described in step 204.
With reference to shown in Fig. 6, in the embodiment of the present invention, an embodiment of the second terminal includes:
Output unit 601, is used for exporting Access Control and generates information so that first terminal according to described in connect
Enter to control production information and generate access point;
Detailed content is with reference to described in step 301.
Search unit 602, given birth to described first terminal for generating information searching according to described Access Control
The access point become;
Detailed content is with reference to described in step 302.
Connect unit 603, for being connected with the foundation of described first terminal by described access point.
Detailed content is with reference to described in step 303.
Those skilled in the art is it can be understood that arrive, and for convenience and simplicity of description, above-mentioned retouches
The specific works process of the system stated, device and unit, is referred to the correspondence in preceding method embodiment
Process, does not repeats them here.
In several embodiments provided herein, it should be understood that disclosed system, device and
Method, can realize by another way.Such as, device embodiment described above is only shown
Meaning property, such as, the division of described unit, be only a kind of logic function and divide, actual can when realizing
There to be other dividing mode, the most multiple unit or assembly can in conjunction with or be desirably integrated into another
System, or some features can ignore, or do not perform.Another point, shown or discussed each other
Coupling direct-coupling or communication connection can be the INDIRECT COUPLING by some interfaces, device or unit
Or communication connection, can be electrical, machinery or other form.
The described unit illustrated as separating component can be or may not be physically separate, makees
The parts shown for unit can be or may not be physical location, i.e. may be located at a place,
Or can also be distributed on multiple NE.Can select according to the actual needs part therein or
The whole unit of person realizes the purpose of the present embodiment scheme.
It addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit
In, it is also possible to it is that unit is individually physically present, it is also possible to two or more unit are integrated in one
In individual unit.Above-mentioned integrated unit both can realize to use the form of hardware, it would however also be possible to employ software merit
The form of energy unit realizes.
If described integrated unit realizes and as independent production marketing using the form of SFU software functional unit
Or when using, can be stored in a computer read/write memory medium.Based on such understanding, this
The part that the most in other words prior art contributed of technical scheme of invention or this technical scheme
Completely or partially can embody with the form of software product, this computer software product is stored in one
In storage medium, including some instructions with so that computer equipment (can be personal computer,
Server, or the network equipment etc.) perform completely or partially walking of method described in each embodiment of the present invention
Suddenly.And aforesaid storage medium includes: USB flash disk, portable hard drive, read only memory (ROM,
Read-Only Memory), random access memory (RAM, Random Access Memory),
The various medium that can store program code such as magnetic disc or CD.
The above, above example only in order to technical scheme to be described, is not intended to limit;
Although being described in detail the present invention with reference to previous embodiment, those of ordinary skill in the art should
Work as understanding: the technical scheme described in foregoing embodiments still can be modified by it, or to it
Middle part technical characteristic carries out equivalent;And these amendments or replacement, do not make appropriate technical solution
Essence depart from various embodiments of the present invention technical scheme spirit and scope.