[go: up one dir, main page]

WO2017063369A1 - Method of establishing wireless direct connection and device utilizing same - Google Patents

Method of establishing wireless direct connection and device utilizing same Download PDF

Info

Publication number
WO2017063369A1
WO2017063369A1 PCT/CN2016/084439 CN2016084439W WO2017063369A1 WO 2017063369 A1 WO2017063369 A1 WO 2017063369A1 CN 2016084439 W CN2016084439 W CN 2016084439W WO 2017063369 A1 WO2017063369 A1 WO 2017063369A1
Authority
WO
WIPO (PCT)
Prior art keywords
direct connection
terminal
channel
wireless
channel number
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.)
Ceased
Application number
PCT/CN2016/084439
Other languages
French (fr)
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.)
Shenzhen TCL Digital Technology Co Ltd
Original Assignee
Shenzhen TCL Digital Technology 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 Shenzhen TCL Digital Technology Co Ltd filed Critical Shenzhen TCL Digital Technology Co Ltd
Publication of WO2017063369A1 publication Critical patent/WO2017063369A1/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode setup

Definitions

  • the present invention relates to the field of wireless transmission technologies, and in particular, to a wireless direct connection method and apparatus.
  • Wi-Fi Direct's wireless direct connection application came into being, for example, Miracast.
  • the Miracast application allows content on one terminal's screen to be projected onto another terminal's screen over a wireless network to meet the entertainment and product experience requirements.
  • the method for connecting the Miracast application includes: detecting whether two terminals are connected to the same wireless network. If both terminals are connected to the same wireless network, the two terminals directly connect to the Miracast through the channel of the wireless network; If the terminals are not connected to the same wireless network, the first terminal and the second terminal scan all channels of the wireless network that they access to select a good channel, and the first terminal and the second terminal connect the Miracast application through the selected high quality channel. .
  • both terminals need to scan the channels of the wireless network one by one to determine that the connection is on the same high-quality channel, and the scanning of the non-connected channel extends the connection time of the Miracast application to cause the connection of the Miracast application. low efficiency.
  • the main object of the present invention is to provide a wireless direct connection method and device, which aims to solve the problem of low efficiency of the Miracast connection.
  • the present invention provides a wireless direct connection method, including:
  • the first terminal compares the direct connection parameter level of the local terminal with the preset direct connection parameter level;
  • the first terminal generates a graphic code according to the channel number, so that the second terminal scans the graphic code to obtain the channel number;
  • the first terminal After receiving the direct connection request sent by the second terminal, the first terminal detects whether the wireless direct connection module is activated;
  • the first terminal starts the wireless direct connection module
  • the first terminal establishes a wireless direct connection with the second terminal based on the wireless direct connection module and the obtained channel number.
  • the present invention further provides a wireless direct connection method, including:
  • the channel number corresponding to the channel with the least interference in the current wireless network is obtained;
  • the first terminal generates a graphic code according to the channel number, so that the second terminal scans the graphic code to obtain the channel number;
  • the first terminal After receiving the direct connection request sent by the second terminal, the first terminal performs a wireless direct connection with the second terminal according to the channel number.
  • the step of acquiring the channel number corresponding to the channel with the least interference in the current wireless network includes:
  • the first terminal scans all channels of the current wireless network
  • the channel with the strongest signal strength in the channel is used as the channel with the smallest interference, and the channel number corresponding to the channel with the least interference is obtained.
  • the wireless direct connection method includes:
  • the first terminal compares the direct connection parameter level of the local end with a preset direct connection parameter level
  • the step of acquiring the channel number corresponding to the channel with the least interference in the current wireless network is performed.
  • the step of acquiring the channel number corresponding to the channel with the least interference in the current wireless network includes:
  • the first terminal scans all channels of the current wireless network
  • the channel with the strongest signal strength in the channel is used as the channel with the smallest interference, and the channel number corresponding to the channel with the least interference is obtained.
  • the wireless direct connection method includes the following steps:
  • the first terminal broadcasts a direct connection request
  • the first terminal displays a graphic code scanning interface
  • the first terminal When scanning the graphic code based on the graphic code scanning interface, the first terminal parses the graphic code to obtain a channel number;
  • the first terminal Upon receiving the response information fed back by the direct connection request by the terminal providing the graphic code, the first terminal establishes a wireless direct connection with the terminal that provides the graphic code based on the acquired channel number.
  • the step of acquiring the channel number corresponding to the channel with the least interference in the current wireless network includes:
  • the first terminal scans all channels of the current wireless network
  • the channel with the strongest signal strength in the channel is used as the channel with the smallest interference, and the channel number corresponding to the channel with the least interference is obtained.
  • the step of the first terminal performing a wireless direct connection with the second terminal according to the channel number includes:
  • the first terminal detects whether the wireless direct connection module is activated
  • the first terminal starts the wireless direct connection module
  • the first terminal establishes a wireless direct connection with the second terminal based on the wireless direct connection module and the obtained channel number.
  • the step of acquiring the channel number corresponding to the channel with the least interference in the current wireless network includes:
  • the first terminal scans all channels of the current wireless network
  • the channel with the strongest signal strength in the channel is used as the channel with the smallest interference, and the channel number corresponding to the channel with the least interference is obtained.
  • the present invention further provides a wireless direct connection device, including:
  • An acquiring module configured to acquire a channel number corresponding to a channel with the least interference in the current wireless network when the first terminal where the first terminal is located enters the wireless direct connection mode;
  • a generating module configured to generate a graphic code according to the channel number, for the second terminal to scan the graphic code to obtain the channel number;
  • connection module configured to: after receiving the direct connection request sent by the second terminal, the first terminal performs a wireless direct connection with the second terminal according to the channel number.
  • the obtaining module comprises:
  • a scanning unit for scanning all channels of the current wireless network
  • an obtaining unit configured to use a channel with the strongest signal strength in the channel as the channel with the smallest interference, and obtain a channel number corresponding to the channel with the least interference.
  • the wireless direct connection device further includes:
  • the first terminal compares the direct connection parameter level of the local end with the preset direct connection parameter level
  • the acquiring module is further configured to: when the direct connection parameter level of the local end is equal to the preset direct connection parameter level, obtain a channel number corresponding to the channel with the least interference in the current wireless network.
  • the obtaining module comprises:
  • a scanning unit for scanning all channels of the current wireless network
  • an obtaining unit configured to use a channel with the strongest signal strength in the channel as the channel with the smallest interference, and obtain a channel number corresponding to the channel with the least interference.
  • the wireless direct connection device further includes:
  • a broadcast module configured to: when the direct connection parameter level of the local end is less than a preset direct connection parameter level, broadcast a direct connection request;
  • a display module for displaying a graphic code scanning interface
  • a parsing module configured to parse the graphic code to obtain a channel number when scanning the graphic code based on the graphic code scanning interface
  • connection module is further configured to: when receiving, by the terminal providing the graphic code, the response information that is fed back based on the direct connection request, the first terminal establishes, according to the obtained channel number, the providing the graphic code Wireless direct connection between terminals.
  • the obtaining module comprises:
  • a scanning unit for scanning all channels of the current wireless network
  • an obtaining unit configured to use a channel with the strongest signal strength in the channel as the channel with the smallest interference, and obtain a channel number corresponding to the channel with the least interference.
  • connection module comprises:
  • a detecting unit configured to detect whether the wireless direct connection module is activated
  • a startup unit configured to start the wireless direct connection module when the wireless direct connection module is not activated
  • a connecting unit configured to establish a wireless direct connection with the second terminal based on the wireless direct connection module and the obtained channel number.
  • the obtaining module comprises:
  • a scanning unit for scanning all channels of the current wireless network
  • an obtaining unit configured to use a channel with the strongest signal strength in the channel as the channel with the smallest interference, and obtain a channel number corresponding to the channel with the least interference.
  • the invention scans the graphic code on the terminal, parses the graphic code to obtain the channel number, and performs the Miracast connection according to the channel number, so that the terminal explicitly determines the channel number for the Miracast connection, instead of determining the channel connected by the Miracast by sequentially scanning the channel of the wireless network. No., thereby reducing the scan time of the scan of the non-connected channel and improving the efficiency of the Miracast connection.
  • FIG. 1 is a schematic flowchart of a first embodiment of a method for connecting a wireless direct connection according to the present invention
  • FIG. 2 is a schematic flowchart of a second embodiment of a method for connecting a wireless direct connection according to the present invention
  • FIG. 3 is a schematic flowchart diagram of a third embodiment of a method for connecting a wireless direct connection according to the present invention.
  • FIG. 4 is a schematic diagram of a refinement process of a wireless connection between a first terminal and a second terminal according to the channel number in a fourth embodiment of the method for wireless direct connection according to the present invention
  • FIG. 5 is a schematic flowchart of refining a channel number with minimum interference in a fifth embodiment of a method for connecting a wireless direct connection according to the present invention
  • FIG. 6 is a schematic diagram of functional modules of a first embodiment of a wireless direct connection device according to the present invention.
  • FIG. 7 is a schematic diagram of functional modules of a second embodiment of a wireless direct connection device according to the present invention.
  • FIG. 8 is a schematic diagram of functional modules of a third embodiment of a wireless direct connection device according to the present invention.
  • FIG. 9 is a schematic diagram of a refinement function module of a connection module according to the present invention.
  • FIG. 10 is a schematic diagram of a refinement function module of a receiving module according to the present invention.
  • the present invention provides a wireless direct connection method.
  • FIG. 1 is a schematic flowchart diagram of a first embodiment of a method for connecting a wireless direct connection according to the present invention.
  • the wireless direct connection method includes:
  • step S10 when the first terminal enters the wireless direct connection mode, the channel number corresponding to the channel with the least interference in the current wireless network is obtained;
  • the Miracast event listener is registered in the first terminal, and is used for monitoring the events of the Miracast application opening and closing, device connection, and terminal.
  • the Miracast application switch When the first terminal receives the request to open the Miracast application switch, the Miracast application switch is turned on, and all channels of the radio frequency segment used by the current wireless network are immediately scanned, and a high quality channel is selected, which can be understood as a space occupied by other signals.
  • the channel channel number of the premium channel is obtained by the least, and the other channel with the weakest signal strength.
  • the wireless network in the wireless direct connection mode, can provide a total of 23 communication channels in a total of 13 communication channels or 5 GHz transmission bands in the 2.4 GHz transmission band.
  • the first terminal When the first terminal enters the wireless direct mode, for example, a Miracast connection is made, the first terminal serves as a boot terminal, and the second terminal acts as a boot terminal.
  • the second terminal sends the direct connection request to the first terminal when detecting the direct connection request triggered by the user; or the second terminal enters the current wireless network coverage, the Miracast application automatically detects the current wireless network, and triggers Directly connect to the request.
  • the direct connection request includes opening a Miracast application switch, a terminal device connection and an interrupt.
  • the wireless network includes, but is not limited to, Wi-Fi.
  • Step S20 the first terminal generates a graphic code according to the channel number, so that the second terminal scans the graphic code to obtain a channel number;
  • the first terminal After obtaining the channel number corresponding to the channel with the smallest interference in the current wireless network, the first terminal automatically encodes the obtained channel number; or the first terminal detects the graphic code encoding instruction of the channel number, and The graphic code is encoded according to the channel number locked by the detected graphic code encoding instruction; or any other suitable manner.
  • the graphic code includes, but is not limited to, a two-dimensional code and a barcode.
  • a two-dimensional code is taken as an example.
  • the two-dimensional code records the data symbol information by using a certain geometric pattern in a plane (two-dimensional direction) distributed between the strip and the space between the graphics code.
  • the second terminal obtains the channel number by scanning the two-dimensional code, confirms a channel that is directly connected to the first terminal, and waits for the return information after the direct connection request is sent.
  • Step S30 After receiving the direct connection request sent by the second terminal, the first terminal performs a wireless direct connection with the second terminal according to the channel number.
  • the first terminal and the second terminal perform function negotiation by establishing a TCP connection channel, and the first terminal encapsulates the input connection signal into a corresponding type of connection according to the preset connection signal type.
  • Sending a signal packet to the second terminal, and the second terminal parses the received connection signal packet according to the preset connection signal type, and obtains the parsed connection signal, so as to implement the first terminal according to the The channel number is connected to the second terminal by Miracast.
  • the terminal can be implemented in various forms.
  • the terminal described in the present invention may include a mobile terminal or a fixed terminal.
  • Mobile terminal such as mobile phone, smart phone, laptop, lion broadcast receiver, PDA (Personal Digital Assistant), PAD (tablet), PMP (portable multimedia player), navigation device, etc.
  • fixed terminal such as digital TV , desktop computers, etc.
  • the mobile terminal or the fixed terminal has a relatively large screen and a small screen.
  • the first terminal can be considered as a fixed terminal with a relatively large screen
  • the second terminal is a mobile terminal with a relatively small screen.
  • the user can let the content on the smartphone be projected onto a large screen such as a smart TV through the wireless network; or, the user can also let the content on the smart TV screen be projected to the smartphone through the wireless network. Wait for small screen terminal devices.
  • the invention scans the graphic code on the terminal, parses the graphic code to obtain the channel number, and performs the Miracast connection according to the channel number, so that the terminal explicitly determines the channel number for the Miracast connection, instead of determining the channel connected by the Miracast by sequentially scanning the channel of the wireless network. No., thereby reducing the scan time of the scan of the non-connected channel and improving the efficiency of the Miracast connection.
  • the method further includes:
  • Step S40 When the first terminal enters the wireless direct connection mode, the first terminal compares the direct connection parameter level of the local end with the preset direct connection parameter level;
  • the direct connection parameter in the set wireless network program is read, and the level of the direct connection parameter is determined.
  • the user can set the direct connection parameter p2p_go_intent in the wireless network direct connection configuration file p2p_supplicant of the first terminal system to different levels, and directly connect the parameter level to determine whether the first terminal is used as the leading end when the direct connection is directly connected. As the guided end.
  • the direct connection parameter level of the local end and the preset direct connection parameter level are compared.
  • the direct connection profile is read from a wireless network program.
  • step S10 is performed to obtain the channel number corresponding to the channel with the least interference in the current wireless network.
  • the terminal system sets different levels of the parameter p2p_go_intent in the wireless direct connection configuration file p2p_supplicant in the wireless network, and the terminal exchanges between the leading end and the guided end, that is, the terminal is generated.
  • the graphic code terminal and the scanned graphic code terminal are interchanged.
  • the first terminal determines to be the guidance. End, scan the channel of the wireless network in the current environment, and obtain the channel number corresponding to the channel with the least interference in the wireless network.
  • the leading end includes a feedback direct connection request, a graphic code, a scanning wireless network signal, and the like.
  • the terminal can determine whether the local end is the leading end or the leading end by comparing the direct connection parameter level of the local end with the preset direct connection parameter level, so that the local end performs different functions.
  • the method further includes:
  • Step S50 The first terminal broadcasts a direct connection request when the direct connection parameter level of the local end is less than a preset direct connection parameter level;
  • the highest priority set by the direct connection parameter p2p_go_intent in the directly connected configuration file p2p_supplicant of the first terminal in the wireless network is less than 15, and it is determined that the first terminal is a scanned graphic code terminal.
  • the wireless direct connection module of the first terminal automatically broadcasts the direct connection request; or the wireless direct connection module that triggers the first terminal based on the user broadcasts the direct connection request.
  • the receiving end of the direct connection request is not limited to one, and there may be multiple.
  • Step S60 the first terminal displays a graphic code scanning interface
  • the user may click the information prompt of the direct connection request broadcast to directly enter the first terminal to display the graphic code scanning interface, for example, double-click the graphic code scanning interface shortcut icon on the lock screen interface; or the user Find the graphic code scanning interface application to display the graphic code scanning interface after clicking.
  • the wireless network broadcasts the prompt installation information of the associated application to the terminal within the coverage of the wireless network signal in which it is located.
  • the terminal that scans the graphic code terminal and does not install the associated application needs to download and install the associated application according to the corresponding prompting step after receiving the prompting installation information.
  • the associated application is an application that recognizes a two-dimensional code, which may be in the format of an APP.
  • the wireless network includes, but is not limited to, a Wi-Fi wireless network.
  • the wireless network signal coverage area may be, for example, a wireless router installed in the room, the coverage of the wireless network signal is the area where the room is located; the wireless router is installed in the public place, and the wireless network signal coverage is in a public place. The area where you are.
  • Step S70 When scanning the graphic code based on the graphic code scanning interface, the first terminal parses the graphic code to obtain a channel number;
  • the first terminal uses the associated application scan to identify an external two-dimensional code
  • the associated application acquires a channel number corresponding to the two-dimensional code.
  • the first terminal monitors the two-dimensional code parsing event and obtains the channel number for the Miracast connection
  • the first terminal automatically opens the Miracast switch according to the channel number.
  • the first terminal sends a direct connection request to the terminal that provides the graphic code, and waits for feedback information on the acquired channel.
  • the terminal that provides the graphic code may be the second terminal, or may be other terminals in the current wireless network.
  • Step S80 when receiving the response information fed back by the terminal that provides the graphic code based on the direct connection request, the first terminal establishes a wireless relationship with the terminal that provides the graphic code based on the acquired channel number. Direct connection.
  • the terminal that provides the graphic code When the direct connection is performed, the terminal that provides the graphic code is a leading end, and generates a graphic code for the first terminal to perform a scanning operation based on the graphic code, where the first terminal is a guided end.
  • the terminal that provides the graphic code detects the direct connection request and generates wireless direct connection information to return to the first terminal.
  • the terminal that provides the graphic code may receive a plurality of terminals to send a direct connection request, and feed back response information to the multiple terminals based on the direct connection request. After receiving the response information on the acquired channel, the first terminal performs a Miracast connection with the first terminal according to the channel number.
  • the television terminal that is, the second terminal scans all channels of the current wireless network signal coverage, determines a good channel, obtains the channel number of the premium channel, and generates a two-dimensional code image according to the channel number.
  • the two-dimensional code image may be displayed on the screen of the television end in the form of an icon, or may be printed and posted in the room.
  • the television terminal sends a broadcast of the prompt information of the related application that installs the Miracast connection. After the user enters the coverage of the wireless network signal, the broadcast of the prompt information of the related application for installing the Miracast connection is accepted, and the associated application is installed according to the broadcast prompt.
  • the mobile terminal that is, the first terminal scans the two-dimensional code image, acquires a channel number of a wireless network corresponding to the two-dimensional code image, and automatically sends the same to the other terminal that provides the two-dimensional code image, that is, the television end.
  • the direct connection request after receiving the response information, establishes a Miracast connection with the television end.
  • the first terminal sends a direct connection request to the terminal that provides the graphic code, and the first terminal provides a graphic code scanning interface, so that the first terminal is exchanged from the leading end to the guided end, which is effective.
  • the problem that both the leading end and the guided end need to scan the wireless network channel and increase the scanning time is solved.
  • step S30 includes:
  • Step S31 The first terminal detects whether the wireless direct connection module is started.
  • the wireless direct connection module After receiving the direct connection request sent by the second terminal, determining whether the wireless direct connection module of the first terminal is started.
  • the wireless direct connection module monitors the direct connection request, the Miracast switch, the connection status of the device, and sends an instruction to the local end to open the Miracast switch. When the current Miracast switch is turned on, the Miracast connection will be made directly.
  • Step S32 when the wireless direct connection module is not activated, the first terminal starts the wireless direct connection module
  • the first terminal receives an instruction for opening the Miracast switch sent by the local end, and obtains a channel number obtained from the graphic code parsed by the local end, according to the instruction for opening the Miracast switch. And the channel number automatically turns on the wireless direct connection module; or, based on the user triggers the Miracast switch.
  • Step S33 The first terminal establishes a wireless direct connection with the second terminal based on the wireless direct connection module and the obtained channel number.
  • the second terminal receives the connection signal and the real-time control of the first terminal by using the Miracast protocol, and displays the content sharing on the screen of the first terminal on the screen of the second terminal, by using the second terminal.
  • the terminal hardware system decodes and encodes the signal to deliver a signal suitable for the large screen to the small screen.
  • the receiving the connection signal and the real-time manipulation of the first end by the Miracast protocol includes establishing a TCP connection channel for function negotiation.
  • the second terminal receives the connection signal and the real-time control of the first terminal by using the Miracast protocol, and displays the content sharing on the second terminal screen on the first terminal screen, and the first terminal hardware system
  • the signal is decoded and encoded to deliver a suitable small screen signal to the large screen.
  • the switch of the Miracast application when the Miracast application is not used, the switch of the Miracast application is turned off, reducing the power consumption of the terminal and reducing the occupation of the wireless network by the terminal; and obtaining the command and channel number for opening the Miracast switch. Automatically turn on the switch of the Miracast app to improve the app experience.
  • the foregoing step S10 includes:
  • Step S11 the first terminal scans all channels of the current wireless network
  • the first terminal After the first terminal compares the direct connection parameter level of the local end with the direct connection parameter level preset by the local end, after determining that the direct connection parameter level of the local end is the highest priority 15, the first terminal scans the current wireless network channel for the leading end. The first terminal detects the current wireless network signal.
  • Step S22 The channel with the strongest signal strength in the channel is used as the channel with the smallest interference, and the channel number corresponding to the channel with the least interference is obtained.
  • the first terminal selects a wireless network with the strongest signal strength in the current wireless network
  • the first terminal detects the wireless network, setting a wireless network signal strength threshold, if the detected signal strength is less than the preset wireless network signal strength threshold, then giving up and continuing to detect the wireless network signal strength in the current environment. Until the wireless network signal whose channel strength is greater than the wireless network signal strength threshold is detected. If the detected wireless network signal whose channel strength is greater than the wireless network signal strength threshold is greater than one, the signal strengths are compared to obtain a wireless network signal with the highest signal strength, and the first terminal bottom layer starts the wireless network scanning function, and acquires the The channel and channel/bandwidth occupancy status information contained in the wireless network is allowed/disabled to use channel/bandwidth status information.
  • the terminal when the terminal is connected to Wi-Fi, a channel with a relatively strong Wi-Fi signal is preferentially selected for connection.
  • the space occupied by other signals in the channel where the signal is relatively strong is small, and the strength of the other signals is weak. Therefore, the channel with a relatively strong signal has small interference and smooth communication. Therefore, when performing the Miracast connection, the terminal preferentially scans the channel with weak Wi-Fi signal, determines the channel with the strongest signal as the quality channel, and acquires the channel number of the high-quality channel.
  • the invention further provides a wireless direct connection device.
  • FIG. 6 is a schematic diagram of functional modules of a first embodiment of a wireless direct connection device according to the present invention.
  • the device includes: an obtaining module 10, a generating module 20, and a connecting module 30.
  • the obtaining module 10 is configured to acquire, when the first terminal where the first terminal is located, enter a wireless direct connection mode, obtain a channel number corresponding to a channel with the least interference in the current wireless network;
  • the Miracast event listener is registered in the connection module 30 of the first terminal, and is used for monitoring the events of the Miracast application opening and closing, device connection, and terminal.
  • the receiving module 10 of the first terminal receives the request to open the Miracast application switch
  • the Miracast application switch is opened, and all channels of the radio frequency segment used by the current wireless network are immediately scanned, and a high quality channel is selected, and the high quality channel can be understood as being
  • the other signals occupy the least space, and the other channels with the weakest signal strength are the best, and the channel number of the good channel is obtained.
  • the wireless network in the wireless direct connection mode, can provide a total of 23 communication channels in a total of 13 communication channels or 5 GHz transmission bands in the 2.4 GHz transmission band.
  • a wireless direct connection for example, a Miracast connection is made
  • the first terminal serves as a boot terminal
  • the second terminal serves as a boot terminal.
  • the second terminal detects the direct connection request triggered by the user
  • the second terminal sends the direct connection request to the receiving module 10 of the first terminal; or the second terminal enters the current wireless network coverage, and the Miracast application automatically Detects the current wireless network and triggers a direct connection request.
  • the direct connection request includes opening a Miracast application switch, a terminal device connection and an interrupt.
  • the wireless network includes, but is not limited to, Wi-Fi.
  • the generating module 20 is configured to generate a graphic code according to the channel number, so that the second terminal scans the graphic code to obtain the channel number;
  • the channel number of the generating module 20 is automatically graphically encoded; or the generating module 20 detects the graphic code encoding instruction of the channel number. And performing graphic code encoding according to the channel number locked by the detected graphic code encoding instruction; or any other applicable manner.
  • the graphic code includes, but is not limited to, a two-dimensional code and a barcode.
  • a two-dimensional code is taken as an example.
  • the two-dimensional code records the data symbol information by using a certain geometric pattern in a plane (two-dimensional direction) distributed between the strip and the space between the graphics code.
  • the second terminal obtains the channel number by scanning the two-dimensional code, confirms a channel that is directly connected to the first terminal, and waits for the return information after the direct connection request is sent.
  • the connection module 30 is configured to: after receiving the direct connection request sent by the second terminal, the first terminal performs a wireless direct connection with the second terminal according to the channel number.
  • the connection module 30 of the first terminal and the second terminal perform function negotiation by establishing a TCP connection channel, and the connection module 30 inputs the input connection signal according to the preset connection signal type.
  • the connection signal packet encapsulated into a corresponding type is sent to the second terminal, and the second terminal parses the received connection signal packet according to the preset connection signal type, and obtains the parsed connection signal, and implements the The first terminal performs a Miracast connection with the second terminal according to the channel number.
  • the terminal can be implemented in various forms.
  • the terminal described in the present invention may include a mobile terminal or a fixed terminal.
  • Mobile terminal such as mobile phone, smart phone, laptop, lion broadcast receiver, PDA (Personal Digital Assistant), PAD (tablet), PMP (portable multimedia player), navigation device, etc.
  • fixed terminal such as digital TV , desktop computers, etc.
  • the mobile terminal or the fixed terminal has a relatively large screen and a small screen.
  • the first terminal can be considered as a fixed terminal with a relatively large screen
  • the second terminal is a mobile terminal with a relatively small screen.
  • the user can let the content on the smartphone be projected onto a large screen such as a smart TV through the wireless network; or, the user can also let the content on the smart TV screen be projected to the smartphone through the wireless network. Wait for small screen terminal devices.
  • the terminal by scanning the graphic code on the terminal, parsing the graphic code to obtain the channel number, and performing the Miracast connection according to the channel number, so that the terminal explicitly determines the channel number for the Miracast connection, instead of determining the Miracast connection by sequentially scanning the channel of the wireless network.
  • the channel number thereby reducing the scan time for scanning the non-connected channel and improving the efficiency of the Miracast connection.
  • FIG. 7 is a schematic diagram of functional modules of a second embodiment of a wireless direct connection device according to the present invention.
  • the device further includes: a comparison module 40.
  • the first terminal compares the direct connection parameter level of the local end with a preset direct connection parameter level
  • the direct connection parameter in the set wireless network program is read, and the level of the direct connection parameter is determined.
  • the user can set the direct connection parameter p2p_go_intent in the wireless network direct connection configuration file p2p_supplicant of the comparison module 40 to different levels, and directly connect the parameter level to determine whether the first terminal is used as the leading end when the direct connection is directly connected. As the guided end.
  • the comparison module 40 compares the direct connection parameter level of the local end with the size of the preset direct connection parameter level.
  • the direct connection profile is read from a wireless network program.
  • the obtaining module 10 obtains the channel number corresponding to the channel with the least interference in the current wireless network when the direct connection parameter level of the local end is equal to the preset direct connection parameter level.
  • the terminal system has different levels in the direct connection parameter p2p_go_intent setting in the wireless direct connection configuration file p2p_supplicant in the wireless network, and the terminal exchanges between the leading end and the guided end, that is, the terminal The interchange between the generated graphics terminal and the scanned graphics terminal is performed.
  • the first terminal is determined to be a leading end, and scans a channel of the wireless network in the current environment to obtain a channel number corresponding to the channel with the least interference in the wireless network.
  • the terminal can determine whether the local end is the leading end or the leading end by comparing the direct connection parameter level of the local end with the preset direct connection parameter level, so that the local end performs different functions.
  • FIG. 8 is a schematic diagram of functional modules of a third embodiment of a wireless direct connection device according to the present invention.
  • the device further includes: a broadcast module 60, a display module 70, and a parsing module 80.
  • the broadcast module 50 is configured to: when the direct connection parameter level of the local end is less than a preset direct connection parameter level, broadcast a direct connection request;
  • the highest priority set by the direct connection parameter p2p_go_intent in the direct connection configuration file p2p_supplicant of the first terminal acquired by the obtaining module 10 is less than 15, and the second terminal is determined to be a scan.
  • the wireless direct connection module of the broadcast module 50 of the first terminal automatically broadcasts a direct connection request; or the broadcast module 50 broadcasts a request based on a wireless direct connection module triggered by the user to trigger the first terminal.
  • the receiving end of the direct connection request is not limited to one, and there may be multiple.
  • the display module 60 is configured to display a graphic code scanning interface
  • the user may click the information of the direct connection request broadcast to directly enter the graphic code scanning interface displayed by the display module 60 of the first terminal, for example, double-clicking the lock.
  • the graphic code scanning interface shortcut icon on the screen interface; or the user finds the graphic code scanning interface application to display the graphic code scanning interface after clicking.
  • the wireless network broadcasts the prompt installation information of the associated application to the terminal within the coverage of the wireless network signal in which it is located.
  • the terminal that scans the graphic code terminal and does not install the associated application, after receiving the prompt installation information, the user can download and install the associated application according to the corresponding prompting step.
  • the associated application is an application that recognizes a two-dimensional code, which may be in the format of an APP.
  • the wireless network includes, but is not limited to, a Wi-Fi wireless network.
  • the wireless network signal coverage area may be, for example, a wireless router installed in the room, the coverage of the wireless network signal is the area where the room is located; the wireless router is installed in the public place, and the wireless network signal coverage is in a public place. The area where you are.
  • the parsing module 70 is configured to parse the graphic code to obtain a channel number when scanning the graphic code based on the graphic code scanning interface.
  • the parsing module 70 uses the associated application scan to identify an external two-dimensional code
  • the associated application acquires a channel number corresponding to the two-dimensional code.
  • the connection module 30 of the first terminal monitors the two-dimensional code parsing event and obtains the channel number for the Miracast connection
  • the first terminal automatically opens the Miracast switch according to the channel number.
  • the first terminal sends a direct connection request to the terminal that provides the graphic code, and waits for feedback information on the acquired channel.
  • the terminal that provides the graphic code may be the second terminal, or may be other terminals in the current wireless network.
  • connection module 30 is further configured to: when receiving, by the terminal that provides the graphic code, response information that is fed back based on the direct connection request, the first terminal establishes and provides the Wireless direct connection between terminals of graphics code.
  • the terminal that provides the graphic code is a leading end, and generates a graphic code for the first terminal to perform a scanning operation based on the graphic code, where the first terminal is a guided end.
  • the terminal that provides the graphic code detects the direct connection request and generates wireless direct connection information to return to the first terminal.
  • the terminal that provides the graphic code may receive a plurality of terminals to send a direct connection request, and feed back response information to the multiple terminals based on the direct connection request.
  • the connection module 30 After receiving the response information on the acquired channel, the connection module 30 performs a Miracast connection with the first terminal according to the channel number.
  • the television terminal that is, the second terminal scans all channels of the current wireless network signal coverage, determines a good channel, obtains the channel number of the premium channel, and generates a two-dimensional code image according to the channel number.
  • the two-dimensional code image may be displayed on the screen of the television end in the form of an icon, or may be printed and posted in the room.
  • the television terminal sends a broadcast of the prompt information of the related application that installs the Miracast connection. After the user enters the coverage of the wireless network signal, the broadcast of the prompt information of the related application for installing the Miracast connection is accepted, and the associated application is installed according to the broadcast prompt.
  • the mobile terminal that is, the first terminal scans the two-dimensional code image, acquires a channel number of a wireless network corresponding to the two-dimensional code image, and automatically sends the same to the other terminal that provides the two-dimensional code image, that is, the television end.
  • the direct connection request after receiving the response information, establishes a Miracast connection with the television end.
  • the first terminal sends a direct connection request to the terminal that provides the graphic code, and the first terminal provides a graphic code scanning interface, so that the first terminal is exchanged from the leading end to the guided end, which is effective.
  • the problem that both the leading end and the guided end need to scan the wireless network channel and increase the scanning time is solved.
  • FIG. 9 is a schematic diagram of functional modules of an embodiment of a connection module 30 according to the present invention.
  • connection module 30 includes a detecting unit 31, a starting unit 32, and a connecting unit 33.
  • the detecting unit 31 is configured to detect whether the wireless direct connection module is activated.
  • the detecting unit 31 determines whether the wireless direct connection module of the first terminal is activated.
  • the wireless direct connection module monitors the direct connection request, the Miracast switch, the connection status of the device, and sends an instruction to the local end to open the Miracast switch.
  • the detecting unit 31 detects that the Miracast connection is directly performed when the current Miracast switch is turned on.
  • the initiating unit 32 is configured to start the wireless direct connection module when the wireless direct connection module is not activated;
  • the detecting unit 31 detects that the local terminal does not turn on the wireless direct connection module, and the starting unit 32 of the first terminal receives the instruction to open the Miracast switch sent by the local end, and obtains the graphic code parsed from the local end.
  • the channel number to be obtained, the wireless direct connection module is automatically turned on according to the instruction to open the Miracast switch and the channel number; or the Miracast switch is triggered based on the user.
  • the connecting unit 33 is configured to establish a wireless direct connection with the second terminal based on the wireless direct connection module and the obtained channel number.
  • connection unit 33 of the second terminal receives the connection signal and real-time control of the first terminal by using the Miracast protocol, and displays the content sharing on the screen of the first terminal on the second terminal screen.
  • the signal is decoded and encoded by the connecting unit 33 of the second terminal, so that a signal of a suitable large screen is transmitted to the small screen.
  • the receiving the connection signal and the real-time manipulation of the first end by the Miracast protocol includes establishing a TCP connection channel for function negotiation.
  • connection unit 33 of the second terminal receives the connection signal of the first terminal and the real-time manipulation by using the Miracast protocol, and displays the content sharing on the second terminal screen on the first terminal screen, by using the The first terminal hardware system decodes and encodes the signal to deliver a suitable small screen signal to the large screen.
  • the switch of the Miracast application when the Miracast application is not used, the switch of the Miracast application is turned off, reducing the power consumption of the terminal and reducing the occupation of the wireless network by the terminal; and obtaining the command and channel number for opening the Miracast switch. Automatically turn on the switch of the Miracast app to improve the app experience.
  • FIG. 10 is a schematic diagram of functional modules of an embodiment of the acquisition module 10 of the present invention.
  • the obtaining module 10 includes a scanning module 11 and an obtaining unit 12.
  • the scanning unit 11 is configured to scan all channels of the current wireless network
  • the first terminal compares the direct connection parameter level of the local end with the direct connection parameter level preset by the local end, and determines that the direct connection parameter level of the local end is the highest priority 15, the first terminal is the leading end, and the scanning unit is adopted.
  • 11 Scan the current wireless network channel. The first terminal detects the current wireless network signal.
  • the acquiring unit 12 is configured to use a channel with the strongest signal strength in the channel as the channel with the smallest interference, and obtain a channel number corresponding to the channel with the smallest interference.
  • the acquiring unit 12 of the first terminal selects a wireless network with the strongest signal strength in the current wireless network
  • the acquiring unit 12 sets a wireless network signal strength threshold in advance when detecting the wireless network, and if the detected signal strength is less than the preset wireless network signal strength threshold, abandoning and continuing to detect the current The wireless network signal strength in the environment until a wireless network signal with a channel strength greater than the wireless network signal strength threshold is detected. If the detected wireless network signal whose channel strength is greater than the wireless network signal strength threshold is greater than one, the signal strengths are compared to obtain the wireless network signal with the strongest signal strength, and the first terminal bottom layer starts the wireless network scanning function to obtain The channel and channel/bandwidth occupancy status information contained in the wireless network allows/disables the use of channel/bandwidth status information.
  • the terminal when the terminal is connected to Wi-Fi, a channel with a relatively strong Wi-Fi signal is preferentially selected for connection.
  • the space occupied by other signals in the channel where the signal is relatively strong is small, and the strength of the other signals is weak. Therefore, the channel with a relatively strong signal has small interference and smooth communication. Therefore, when performing the Miracast connection, the terminal preferentially scans the channel with weak Wi-Fi signal, determines the channel with the strongest signal as the quality channel, and acquires the channel number of the high-quality channel.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention discloses a method of establishing a wireless direct connection. The method comprises: when a wireless direction connection mode is entered, obtaining, by a first terminal, a channel number corresponding to a channel having minimum interference in a present wireless network; generating, by the first terminal, according to the channel number, a pattern code to be scanned by a second terminal for obtaining the channel number; and upon receiving a direction connection request transmitted from the second terminal, establishing, by the first terminal, according to the channel number, a wireless direction connection to the second terminal. The invention also discloses a wireless direction connection device. The invention can be implemented to determine a channel number for performing a Miracast connection by a terminal by scanning a pattern code, increasing connection efficiency of a Miracast application.

Description

无线直连连接方法及装置  Wireless direct connection method and device

技术领域Technical field

本发明涉及无线传输技术领域,尤其涉及一种无线直连连接方法及装置。The present invention relates to the field of wireless transmission technologies, and in particular, to a wireless direct connection method and apparatus.

背景技术Background technique

随着无线传输技术的高速发展,尤其是短距离无线传输——Wi-Fi的兴起,无疑给人们的日常生活带来了极大的便利,例如,人们通过Wi-Fi可以浏览网页,观看视频等。因此,一项基于Wi-Fi Direct的无线直连的应用应运而生,例如,Miracast。Miracast应用可以使一个终端屏幕上的内容通过无线网络投射到另一个终端屏幕上,从而满足人们在娱乐需求和产品体验方面的要求。With the rapid development of wireless transmission technology, especially the short-distance wireless transmission - the rise of Wi-Fi, it has undoubtedly brought great convenience to people's daily life, for example, people can browse the web and watch video through Wi-Fi. Wait. So one based on Wi-Fi Direct's wireless direct connection application came into being, for example, Miracast. The Miracast application allows content on one terminal's screen to be projected onto another terminal's screen over a wireless network to meet the entertainment and product experience requirements.

目前Miracast应用连接的方法包括:检测两个终端是否连接在同一个无线网络上,如果两个终端都连接在同一个无线网络上,则两个终端直接通过无线网络的信道进行Miracast连接;如果两个终端没有连接在同一无线网络上,则第一终端和第二终端均扫描其接入的无线网络所有信道以选择优质信道,第一终端以及第二终端通过已选择的优质信道使Miracast应用连接。At present, the method for connecting the Miracast application includes: detecting whether two terminals are connected to the same wireless network. If both terminals are connected to the same wireless network, the two terminals directly connect to the Miracast through the channel of the wireless network; If the terminals are not connected to the same wireless network, the first terminal and the second terminal scan all channels of the wireless network that they access to select a good channel, and the first terminal and the second terminal connect the Miracast application through the selected high quality channel. .

该方法虽然可以实现Miracast应用连接,但是两个终端都需要逐个扫描无线网络的信道确定是在同一个优质信道上后才能进行连接,对非连接信道的扫描延长了Miracast应用连接时间导致Miracast应用连接效率低。Although the method can realize the connection of the Miracast application, both terminals need to scan the channels of the wireless network one by one to determine that the connection is on the same high-quality channel, and the scanning of the non-connected channel extends the connection time of the Miracast application to cause the connection of the Miracast application. low efficiency.

发明内容Summary of the invention

本发明的主要目的在于提供一种无线直连连接方法及装置,旨在解决Miracast连接效率低的问题。The main object of the present invention is to provide a wireless direct connection method and device, which aims to solve the problem of low efficiency of the Miracast connection.

为实现上述目的,本发明提供的一种无线直连连接方法,包括:To achieve the above objective, the present invention provides a wireless direct connection method, including:

在第一终端进入无线直连模式时,所述第一终端将本端的直连参数等级与预设的直连参数等级进行比对;When the first terminal enters the wireless direct connection mode, the first terminal compares the direct connection parameter level of the local terminal with the preset direct connection parameter level;

在本端的所述直连参数等级等于预设直连参数等级时,获取当前所在无线网络中干扰最小的信道对应的信道号;When the direct connection parameter level of the local end is equal to the preset direct connection parameter level, obtain the channel number corresponding to the channel with the least interference in the current wireless network;

所述第一终端根据所述信道号生成图形码,以供所述第二终端扫描所述图形码以获取所述信道号;The first terminal generates a graphic code according to the channel number, so that the second terminal scans the graphic code to obtain the channel number;

在接收到第二终端发送的直连请求后,所述第一终端检测无线直连模块是否启动;After receiving the direct connection request sent by the second terminal, the first terminal detects whether the wireless direct connection module is activated;

在所述无线直连模块未启动时,所述第一终端启动所述无线直连模块;When the wireless direct connection module is not activated, the first terminal starts the wireless direct connection module;

所述第一终端基于所述无线直连模块以及获取到的所述信道号建立与第二终端之间的无线直连连接。The first terminal establishes a wireless direct connection with the second terminal based on the wireless direct connection module and the obtained channel number.

为实现上述目的,本发明又提供的一种无线直连连接方法,包括:To achieve the above object, the present invention further provides a wireless direct connection method, including:

在第一终端进入无线直连模式时,获取当前所在无线网络中干扰最小的信道对应的信道号;When the first terminal enters the wireless direct connection mode, the channel number corresponding to the channel with the least interference in the current wireless network is obtained;

所述第一终端根据所述信道号生成图形码,以供所述第二终端扫描所述图形码以获取所述信道号;The first terminal generates a graphic code according to the channel number, so that the second terminal scans the graphic code to obtain the channel number;

在接收到第二终端发送的直连请求后,所述第一终端根据所述信道号与第二终端进行无线直连连接。After receiving the direct connection request sent by the second terminal, the first terminal performs a wireless direct connection with the second terminal according to the channel number.

优选地,所述获取当前所在无线网络中干扰最小的信道对应的信道号的步骤包括:Preferably, the step of acquiring the channel number corresponding to the channel with the least interference in the current wireless network includes:

所述第一终端扫描当前所在无线网络所有信道;The first terminal scans all channels of the current wireless network;

将所述信道内信号强度最强的信道作为所述干扰最小的信道,并获取所述干扰最小的信道对应的信道号。The channel with the strongest signal strength in the channel is used as the channel with the smallest interference, and the channel number corresponding to the channel with the least interference is obtained.

优选地,所述获取当前所在无线网络中干扰最小的信道对应的信道号的步骤之前,所述无线直连连接方法包括:Preferably, before the step of acquiring the channel number corresponding to the channel with the least interference in the current wireless network, the wireless direct connection method includes:

在所述第一终端进入无线直连模式时,所述第一终端将本端的直连参数等级与预设的直连参数等级进行比对;When the first terminal enters the wireless direct connection mode, the first terminal compares the direct connection parameter level of the local end with a preset direct connection parameter level;

在本端的所述直连参数等级等于预设直连参数等级时,执行获取当前所在无线网络中干扰最小的信道对应的信道号的步骤。When the direct connection parameter level of the local end is equal to the preset direct connection parameter level, the step of acquiring the channel number corresponding to the channel with the least interference in the current wireless network is performed.

优选地,所述获取当前所在无线网络中干扰最小的信道对应的信道号的步骤包括:Preferably, the step of acquiring the channel number corresponding to the channel with the least interference in the current wireless network includes:

所述第一终端扫描当前所在无线网络所有信道;The first terminal scans all channels of the current wireless network;

将所述信道内信号强度最强的信道作为所述干扰最小的信道,并获取所述干扰最小的信道对应的信道号。The channel with the strongest signal strength in the channel is used as the channel with the smallest interference, and the channel number corresponding to the channel with the least interference is obtained.

优选地,所述第一终端将本端的直连参数等级与预设的直连参数等级进行比对的步骤之后,所述无线直连方法包括步骤:Preferably, after the step of the first terminal comparing the direct connection parameter level of the local end with the preset direct connection parameter level, the wireless direct connection method includes the following steps:

在本端的所述直连参数等级小于预设直连参数等级时,所述第一终端广播直连请求;When the direct connection parameter level of the local end is less than a preset direct connection parameter level, the first terminal broadcasts a direct connection request;

所述第一终端显示图形码扫描界面;The first terminal displays a graphic code scanning interface;

在基于所述图形码扫描界面扫描到图形码时,所述第一终端对所述图形码进行解析以获取信道号;When scanning the graphic code based on the graphic code scanning interface, the first terminal parses the graphic code to obtain a channel number;

在接收到提供图形码的终端基于所述直连请求反馈的响应信息时,所述第一终端基于获取的所述信道号建立与所述提供所述图形码的终端之间的无线直连。Upon receiving the response information fed back by the direct connection request by the terminal providing the graphic code, the first terminal establishes a wireless direct connection with the terminal that provides the graphic code based on the acquired channel number.

优选地,所述获取当前所在无线网络中干扰最小的信道对应的信道号的步骤包括:Preferably, the step of acquiring the channel number corresponding to the channel with the least interference in the current wireless network includes:

所述第一终端扫描当前所在无线网络所有信道;The first terminal scans all channels of the current wireless network;

将所述信道内信号强度最强的信道作为所述干扰最小的信道,并获取所述干扰最小的信道对应的信道号。The channel with the strongest signal strength in the channel is used as the channel with the smallest interference, and the channel number corresponding to the channel with the least interference is obtained.

优选地,所述第一终端根据所述信道号与第二终端进行无线直连连接的步骤包括:Preferably, the step of the first terminal performing a wireless direct connection with the second terminal according to the channel number includes:

所述第一终端检测无线直连模块是否启动;The first terminal detects whether the wireless direct connection module is activated;

在所述无线直连模块未启动时,所述第一终端启动所述无线直连模块;When the wireless direct connection module is not activated, the first terminal starts the wireless direct connection module;

所述第一终端基于所述无线直连模块以及获取到的所述信道号建立与第二终端之间的无线直连连接。The first terminal establishes a wireless direct connection with the second terminal based on the wireless direct connection module and the obtained channel number.

优选地,所述获取当前所在无线网络中干扰最小的信道对应的信道号的步骤包括:Preferably, the step of acquiring the channel number corresponding to the channel with the least interference in the current wireless network includes:

所述第一终端扫描当前所在无线网络所有信道;The first terminal scans all channels of the current wireless network;

将所述信道内信号强度最强的信道作为所述干扰最小的信道,并获取所述干扰最小的信道对应的信道号。The channel with the strongest signal strength in the channel is used as the channel with the smallest interference, and the channel number corresponding to the channel with the least interference is obtained.

此外,为实现上述目的,本发明还提供一种无线直连连接装置,包括:In addition, in order to achieve the above object, the present invention further provides a wireless direct connection device, including:

获取模块,用于在其所在的第一终端进入无线直连模式时,获取当前所在无线网络中干扰最小的信道对应的信道号;An acquiring module, configured to acquire a channel number corresponding to a channel with the least interference in the current wireless network when the first terminal where the first terminal is located enters the wireless direct connection mode;

生成模块,用于根据所述信道号生成图形码,以供所述第二终端扫描所述图形码以获取所述信道号;a generating module, configured to generate a graphic code according to the channel number, for the second terminal to scan the graphic code to obtain the channel number;

连接模块,用于在接收到第二终端发送的直连请求后,所述第一终端根据所述信道号与第二终端进行无线直连连接。And a connection module, configured to: after receiving the direct connection request sent by the second terminal, the first terminal performs a wireless direct connection with the second terminal according to the channel number.

优选地,所述获取模块包括:Preferably, the obtaining module comprises:

扫描单元,用于扫描当前所在无线网络所有信道;a scanning unit for scanning all channels of the current wireless network;

获取单元,用于将所述信道内信号强度最强的信道作为所述干扰最小的信道,并获取所述干扰最小的信道对应的信道号。And an obtaining unit, configured to use a channel with the strongest signal strength in the channel as the channel with the smallest interference, and obtain a channel number corresponding to the channel with the least interference.

优选地,所述无线直连装置还包括:Preferably, the wireless direct connection device further includes:

比对模块,用于进入无线直连模式时,所述第一终端将本端的直连参数等级与预设的直连参数等级进行比对;When the comparison module is configured to enter the wireless direct connection mode, the first terminal compares the direct connection parameter level of the local end with the preset direct connection parameter level;

所述获取模块,还用于在本端的所述直连参数等级等于预设直连参数等级时,获取当前所在无线网络中干扰最小的信道对应的信道号。The acquiring module is further configured to: when the direct connection parameter level of the local end is equal to the preset direct connection parameter level, obtain a channel number corresponding to the channel with the least interference in the current wireless network.

优选地,所述获取模块包括:Preferably, the obtaining module comprises:

扫描单元,用于扫描当前所在无线网络所有信道;a scanning unit for scanning all channels of the current wireless network;

获取单元,用于将所述信道内信号强度最强的信道作为所述干扰最小的信道,并获取所述干扰最小的信道对应的信道号。And an obtaining unit, configured to use a channel with the strongest signal strength in the channel as the channel with the smallest interference, and obtain a channel number corresponding to the channel with the least interference.

优选地,所述无线直连装置还包括:Preferably, the wireless direct connection device further includes:

广播模块,用于在本端的所述直连参数等级小于预设直连参数等级时,广播直连请求;a broadcast module, configured to: when the direct connection parameter level of the local end is less than a preset direct connection parameter level, broadcast a direct connection request;

显示模块,用于显示图形码扫描界面;a display module for displaying a graphic code scanning interface;

解析模块,用于在基于所述图形码扫描界面扫描到图形码时,对所述图形码进行解析以获取信道号;a parsing module, configured to parse the graphic code to obtain a channel number when scanning the graphic code based on the graphic code scanning interface;

所述连接模块,还用于在接收到提供图形码的终端基于所述直连请求反馈的响应信息时,所述第一终端基于获取的所述信道号建立与所述提供所述图形码的终端之间的无线直连。The connection module is further configured to: when receiving, by the terminal providing the graphic code, the response information that is fed back based on the direct connection request, the first terminal establishes, according to the obtained channel number, the providing the graphic code Wireless direct connection between terminals.

优选地,所述获取模块包括:Preferably, the obtaining module comprises:

扫描单元,用于扫描当前所在无线网络所有信道;a scanning unit for scanning all channels of the current wireless network;

获取单元,用于将所述信道内信号强度最强的信道作为所述干扰最小的信道,并获取所述干扰最小的信道对应的信道号。And an obtaining unit, configured to use a channel with the strongest signal strength in the channel as the channel with the smallest interference, and obtain a channel number corresponding to the channel with the least interference.

优选地,所述连接模块包括:Preferably, the connection module comprises:

检测单元,用于检测无线直连模块是否启动;a detecting unit, configured to detect whether the wireless direct connection module is activated;

启动单元,用于在所述无线直连模块未启动时,启动所述无线直连模块;a startup unit, configured to start the wireless direct connection module when the wireless direct connection module is not activated;

连接单元,用于基于所述无线直连模块以及获取到的所述信道号建立与第二终端之间的无线直连连接。And a connecting unit, configured to establish a wireless direct connection with the second terminal based on the wireless direct connection module and the obtained channel number.

优选地,所述获取模块包括:Preferably, the obtaining module comprises:

扫描单元,用于扫描当前所在无线网络所有信道;a scanning unit for scanning all channels of the current wireless network;

获取单元,用于将所述信道内信号强度最强的信道作为所述干扰最小的信道,并获取所述干扰最小的信道对应的信道号。And an obtaining unit, configured to use a channel with the strongest signal strength in the channel as the channel with the smallest interference, and obtain a channel number corresponding to the channel with the least interference.

本发明通过扫描终端上的图形码,解析图形码获取信道号,根据信道号进行Miracast连接,使终端明确确定进行Miracast连接的信道号,而不用通过依次扫描无线网络的信道来确定Miracast连接的信道号,从而减少对非连接信道的扫描的扫描时间,提高Miracast连接效率。The invention scans the graphic code on the terminal, parses the graphic code to obtain the channel number, and performs the Miracast connection according to the channel number, so that the terminal explicitly determines the channel number for the Miracast connection, instead of determining the channel connected by the Miracast by sequentially scanning the channel of the wireless network. No., thereby reducing the scan time of the scan of the non-connected channel and improving the efficiency of the Miracast connection.

附图说明DRAWINGS

图1为本发明无线直连连接方法的第一实施例的流程示意图;1 is a schematic flowchart of a first embodiment of a method for connecting a wireless direct connection according to the present invention;

图2为本发明无线直连连接方法的第二实施例的流程示意图;2 is a schematic flowchart of a second embodiment of a method for connecting a wireless direct connection according to the present invention;

图3为本发明无线直连连接方法的第三实施例的流程示意图;3 is a schematic flowchart diagram of a third embodiment of a method for connecting a wireless direct connection according to the present invention;

图4为本发明无线直连连接方法的第四实施例中第一终端根据所述信道号与第二终端进行无线连接的细化流程示意图;4 is a schematic diagram of a refinement process of a wireless connection between a first terminal and a second terminal according to the channel number in a fourth embodiment of the method for wireless direct connection according to the present invention;

图5为本发明无线直连连接方法的第五实施例中获取干扰最小的信道号的细化流程示意图;5 is a schematic flowchart of refining a channel number with minimum interference in a fifth embodiment of a method for connecting a wireless direct connection according to the present invention;

图6为本发明无线直连连接装置的第一实施例的功能模块示意图;6 is a schematic diagram of functional modules of a first embodiment of a wireless direct connection device according to the present invention;

图7为本发明无线直连连接装置的第二实施例的功能模块示意图;7 is a schematic diagram of functional modules of a second embodiment of a wireless direct connection device according to the present invention;

图8为本发明无线直连连接装置的第三实施例的功能模块示意图;8 is a schematic diagram of functional modules of a third embodiment of a wireless direct connection device according to the present invention;

图9为本发明连接模块的细化功能模块示意图;9 is a schematic diagram of a refinement function module of a connection module according to the present invention;

图10为本发明接收模块的细化功能模块示意图。FIG. 10 is a schematic diagram of a refinement function module of a receiving module according to the present invention.

本发明目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The implementation, functional features, and advantages of the present invention will be further described in conjunction with the embodiments.

具体实施方式detailed description

应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。It is understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

基于上述问题,本发明提供一种无线直连连接方法。Based on the above problems, the present invention provides a wireless direct connection method.

参照图1,图1为本发明无线直连连接方法的第一实施例的流程示意图。Referring to FIG. 1, FIG. 1 is a schematic flowchart diagram of a first embodiment of a method for connecting a wireless direct connection according to the present invention.

在本实施例中,所述无线直连连接方法包括:In this embodiment, the wireless direct connection method includes:

步骤S10,在第一终端进入无线直连模式时,获取当前所在无线网络中干扰最小的信道对应的信道号;In step S10, when the first terminal enters the wireless direct connection mode, the channel number corresponding to the channel with the least interference in the current wireless network is obtained;

在本实施例中,在第一终端内注册Miracast事件监听,用于对Miracast应用开与关、设备连接与终端等事件的监听。当第一终端收到打开Miracast应用开关的请求时,打开Miracast应用开关,立即扫描当前无线网络所用射频段的所有信道,选择一个优质信道,所述优质信道可以理解为被其它的信号占用的空间最少,并且所述其它信号强度最弱的优质信道,获取所述优质信道的信道号。需要说明的是,无线直连模式下,所述无线网络可以提供2.4GHz发射频段共13个通信信道或5GHz发射频段共23个通信信道。In this embodiment, the Miracast event listener is registered in the first terminal, and is used for monitoring the events of the Miracast application opening and closing, device connection, and terminal. When the first terminal receives the request to open the Miracast application switch, the Miracast application switch is turned on, and all channels of the radio frequency segment used by the current wireless network are immediately scanned, and a high quality channel is selected, which can be understood as a space occupied by other signals. The channel channel number of the premium channel is obtained by the least, and the other channel with the weakest signal strength. It should be noted that, in the wireless direct connection mode, the wireless network can provide a total of 23 communication channels in a total of 13 communication channels or 5 GHz transmission bands in the 2.4 GHz transmission band.

在所述第一终端进入无线直连模式时,例如,进行Miracast连接,第一终端作为引导终端,第二终端作为被引导终端。第二终端在侦测到用户触发的直连请求时,将所述直连请求发送至第一终端;或者,第二终端进入当前无线网络覆盖范围内,Miracast应用会自动检测当前无线网络,触发直连请求。所述直连请求包括打开Miracast应用开关、终端设备连接与中断。所述无线网络包括但不限于Wi-Fi。When the first terminal enters the wireless direct mode, for example, a Miracast connection is made, the first terminal serves as a boot terminal, and the second terminal acts as a boot terminal. The second terminal sends the direct connection request to the first terminal when detecting the direct connection request triggered by the user; or the second terminal enters the current wireless network coverage, the Miracast application automatically detects the current wireless network, and triggers Directly connect to the request. The direct connection request includes opening a Miracast application switch, a terminal device connection and an interrupt. The wireless network includes, but is not limited to, Wi-Fi.

步骤S20,所述第一终端根据所述信道号生成图形码,以供所述第二终端扫描所述图形码以获取信道号;Step S20, the first terminal generates a graphic code according to the channel number, so that the second terminal scans the graphic code to obtain a channel number;

在获取到当前所在无线网络中干扰最小的信道对应的信道号后,第一终端对获取的信道号进行自动图形编码;或者,第一终端侦测到所述信道号的图形码编码指令,并根据侦测到的图形码编码指令锁定的信道号进行图形码编码;或者,其他任意适用的方式。所述图形码包括但不限于二维码和条形码。本实施例中以二维码为例。二维码使用某种特定的几何图形按照一定规律在平面(二维方向)上分布的条、空相间的图形码来记录数据符号信息。第二终端通过扫描所述二维码得到所述信道号,确认与第一终端进行无线直连连接的信道,发送直连请求后,在该信道等待返回信息。After obtaining the channel number corresponding to the channel with the smallest interference in the current wireless network, the first terminal automatically encodes the obtained channel number; or the first terminal detects the graphic code encoding instruction of the channel number, and The graphic code is encoded according to the channel number locked by the detected graphic code encoding instruction; or any other suitable manner. The graphic code includes, but is not limited to, a two-dimensional code and a barcode. In this embodiment, a two-dimensional code is taken as an example. The two-dimensional code records the data symbol information by using a certain geometric pattern in a plane (two-dimensional direction) distributed between the strip and the space between the graphics code. The second terminal obtains the channel number by scanning the two-dimensional code, confirms a channel that is directly connected to the first terminal, and waits for the return information after the direct connection request is sent.

步骤S30,在接收到第二终端发送的直连请求后,所述第一终端根据所述信道号与第二终端进行无线直连连接。Step S30: After receiving the direct connection request sent by the second terminal, the first terminal performs a wireless direct connection with the second terminal according to the channel number.

在本实施例中,在Miracast的建立会话阶段,第一终端与第二终端通过建立TCP连接通道进行功能协商,第一终端根据预设连接信号类型,将输入的连接信号封装成相应类型的连接信号报文发送给所述第二终端,所述第二终端根据预设的连接信号类型,对接收到的连接信号报文进行解析,得到解析后的连接信号,实现所述第一终端根据所述信道号与第二终端进行Miracast连接。In this embodiment, during the establishment session of the Miracast, the first terminal and the second terminal perform function negotiation by establishing a TCP connection channel, and the first terminal encapsulates the input connection signal into a corresponding type of connection according to the preset connection signal type. Sending a signal packet to the second terminal, and the second terminal parses the received connection signal packet according to the preset connection signal type, and obtains the parsed connection signal, so as to implement the first terminal according to the The channel number is connected to the second terminal by Miracast.

终端可以以各种形式来实施。例如,本发明中描述的终端可以包括移动终端或者固定终端。移动终端,诸如移动电话、智能电话、笔记本电脑、狮子广播接收器、PDA(个人数字助理)、PAD(平板电脑)、PMP(便携式多媒体播放器)、导航装置等;固定终端,诸如数字TV 、台式计算机等。所述的移动终端或者固定终端都会有一个相对来说是大屏幕另一个是小屏幕。在本实施例中,可以认为第一终端是相对较大屏幕的固定终端,第二终端是相对较小屏幕的移动终端。例如,通过开启两个终端的Miracast连接,用户可以让智能手机上的内容通过无线网络投射到智能电视等大屏上;或者,用户也可以让智能电视屏幕上的内容通过无线网络投射到智能手机等小屏幕终端设备上。The terminal can be implemented in various forms. For example, the terminal described in the present invention may include a mobile terminal or a fixed terminal. Mobile terminal, such as mobile phone, smart phone, laptop, lion broadcast receiver, PDA (Personal Digital Assistant), PAD (tablet), PMP (portable multimedia player), navigation device, etc.; fixed terminal, such as digital TV , desktop computers, etc. The mobile terminal or the fixed terminal has a relatively large screen and a small screen. In this embodiment, the first terminal can be considered as a fixed terminal with a relatively large screen, and the second terminal is a mobile terminal with a relatively small screen. For example, by turning on the Miracast connection between two terminals, the user can let the content on the smartphone be projected onto a large screen such as a smart TV through the wireless network; or, the user can also let the content on the smart TV screen be projected to the smartphone through the wireless network. Wait for small screen terminal devices.

本发明通过扫描终端上的图形码,解析图形码获取信道号,根据信道号进行Miracast连接,使终端明确确定进行Miracast连接的信道号,而不用通过依次扫描无线网络的信道来确定Miracast连接的信道号,从而减少对非连接信道的扫描的扫描时间,提高Miracast连接效率。The invention scans the graphic code on the terminal, parses the graphic code to obtain the channel number, and performs the Miracast connection according to the channel number, so that the terminal explicitly determines the channel number for the Miracast connection, instead of determining the channel connected by the Miracast by sequentially scanning the channel of the wireless network. No., thereby reducing the scan time of the scan of the non-connected channel and improving the efficiency of the Miracast connection.

进一步的,基于第一实施例,提出本发明无线直连连接方法的第二实施例,在本实施例中,参照图2上述步骤S10之前,还包括:Further, based on the first embodiment, a second embodiment of the wireless direct connection method of the present invention is proposed. In the embodiment, before the step S10 in FIG. 2, the method further includes:

步骤S40,在所述第一终端进入无线直连模式时,所述第一终端将本端的直连参数等级与预设的直连参数等级进行比对;Step S40: When the first terminal enters the wireless direct connection mode, the first terminal compares the direct connection parameter level of the local end with the preset direct connection parameter level;

在本实施例中,在所述第一终端系统中,读取已设置的无线网络程序中的直连参数,确定所述直连参数的等级。用户可以依据需要设置所述第一终端系统的无线网络直连配置文件p2p_supplicant中直连参数p2p_go_intent的为不同等级,直连参数等级的不同,决定第一终端在直连连接时是作为引导端还是作为被引导端。在所述第一终端进入无线直连模式时,比较本端的直连参数等级与预设直连参数等级的大小。所述直连配置文件从无线网络程序中读取。例如,终端系统中Wi-Fi直连配置文件p2p_supplicant中直连参数p2p_go_intent的等级有两种形式p2p_go_intent=15或者p2p_go_intent<15。In this embodiment, in the first terminal system, the direct connection parameter in the set wireless network program is read, and the level of the direct connection parameter is determined. The user can set the direct connection parameter p2p_go_intent in the wireless network direct connection configuration file p2p_supplicant of the first terminal system to different levels, and directly connect the parameter level to determine whether the first terminal is used as the leading end when the direct connection is directly connected. As the guided end. When the first terminal enters the wireless direct connection mode, the direct connection parameter level of the local end and the preset direct connection parameter level are compared. The direct connection profile is read from a wireless network program. For example, the level of the direct connection parameter p2p_go_intent in the Wi-Fi Direct configuration file p2p_supplicant in the terminal system has two forms p2p_go_intent=15 or p2p_go_intent<15.

在本端的所述直连参数等级等于预设直连参数等级时,执行步骤S10即获取当前所在无线网络中干扰最小的信道对应的信道号。When the direct connection parameter level of the local end is equal to the preset direct connection parameter level, step S10 is performed to obtain the channel number corresponding to the channel with the least interference in the current wireless network.

在本实施例中,终端系统在无线网络中无线直连配置文件p2p_supplicant中参数p2p_go_intent设置的等级不同,所述终端就会在引导端和被引导端进行互换,即所述终端就会在生成图形码终端和扫描图形码终端之间进行互换。在本端的直连参数等级等于预设直连参数等级时,即终端系统中Wi-Fi直连配置文件p2p_supplicant中直连参数p2p_go_intent设置的等级为p2p_go_intent=15时,所述第一终端确定为引导端,扫描当前所在环境无线网络的信道,获取无线网络中干扰最小的信道对应的信道号。所述引导端包括反馈直连引导请求,生成图形码及扫描无线网络信号等。In this embodiment, the terminal system sets different levels of the parameter p2p_go_intent in the wireless direct connection configuration file p2p_supplicant in the wireless network, and the terminal exchanges between the leading end and the guided end, that is, the terminal is generated. The graphic code terminal and the scanned graphic code terminal are interchanged. When the direct connection parameter level of the local end is equal to the preset direct connection parameter level, that is, the level of the direct connection parameter p2p_go_intent in the Wi-Fi Direct configuration file p2p_supplicant in the terminal system is p2p_go_intent=15, the first terminal determines to be the guidance. End, scan the channel of the wireless network in the current environment, and obtain the channel number corresponding to the channel with the least interference in the wireless network. The leading end includes a feedback direct connection request, a graphic code, a scanning wireless network signal, and the like.

本技术领域的技术人员可以理解的是,终端通过比对本端的直连参数等级与预设的直连参数等级的大小,可以确定本端是引导端还是被引导端,从而使本端执行不同的功能。It can be understood by those skilled in the art that the terminal can determine whether the local end is the leading end or the leading end by comparing the direct connection parameter level of the local end with the preset direct connection parameter level, so that the local end performs different functions. Features.

进一步的,基于第一或第二实施例,提出本发明无线直连连接方法的第三实施例,在本实施例中,参照图3上述步骤S40之后,还包括:Further, based on the first or second embodiment, a third embodiment of the wireless direct connection method of the present invention is proposed. In this embodiment, after referring to step S40 in FIG. 3, the method further includes:

步骤S50,在本端的所述直连参数等级小于预设直连参数等级时,所述第一终端广播直连请求;Step S50: The first terminal broadcasts a direct connection request when the direct connection parameter level of the local end is less than a preset direct connection parameter level;

在本实施例中,获取到的所述第一终端的在无线网络中直连配置文件p2p_supplicant中直连参数p2p_go_intent设置的最高优先级小于15,确定所述第一终端为扫描图形码终端即被引导端。第一终端的无线直连模块自动广播直连请求;或者,基于用户的触发第一终端的无线直连模块广播直连请求。所述直连请求的接收端不局限于一个,可以有多个。In this embodiment, the highest priority set by the direct connection parameter p2p_go_intent in the directly connected configuration file p2p_supplicant of the first terminal in the wireless network is less than 15, and it is determined that the first terminal is a scanned graphic code terminal. The boot end. The wireless direct connection module of the first terminal automatically broadcasts the direct connection request; or the wireless direct connection module that triggers the first terminal based on the user broadcasts the direct connection request. The receiving end of the direct connection request is not limited to one, and there may be multiple.

步骤S60,所述第一终端显示图形码扫描界面;Step S60, the first terminal displays a graphic code scanning interface;

在所述第一终端广播直连请求之后,用户可以点击直连请求广播的信息提示直接进入第一终端显示图形码扫描界面,例如,双击锁屏界面上的图形码扫描界面快捷图标;或者用户找到图形码扫描界面应用点击后显示图形码扫描界面。After the first terminal broadcasts the direct connection request, the user may click the information prompt of the direct connection request broadcast to directly enter the first terminal to display the graphic code scanning interface, for example, double-click the graphic code scanning interface shortcut icon on the lock screen interface; or the user Find the graphic code scanning interface application to display the graphic code scanning interface after clicking.

具体的,无线网络向其所在的无线网络信号覆盖范围内的终端广播关联应用程序的提示安装信息。需要作为扫描图形码终端而又未安装该关联应用的终端,在接收到该提示安装信息后,用户可根据相应的提示步骤下载并安装该关联应用。所述关联应用程序为识别二维码的应用程序,其可以采用APP的格式。所述无线网络包括但不限于Wi-Fi无线网络。所述无线网络信号覆盖范围区域可以是,例如,在房间里安装了无线路由器,无线网络信号覆盖的范围为房间所在的区域;在公共场所安装了无线路由器,无线网络信号覆盖的范围为公共场所所在的区域。Specifically, the wireless network broadcasts the prompt installation information of the associated application to the terminal within the coverage of the wireless network signal in which it is located. The terminal that scans the graphic code terminal and does not install the associated application needs to download and install the associated application according to the corresponding prompting step after receiving the prompting installation information. The associated application is an application that recognizes a two-dimensional code, which may be in the format of an APP. The wireless network includes, but is not limited to, a Wi-Fi wireless network. The wireless network signal coverage area may be, for example, a wireless router installed in the room, the coverage of the wireless network signal is the area where the room is located; the wireless router is installed in the public place, and the wireless network signal coverage is in a public place. The area where you are.

步骤S70,在基于所述图形码扫描界面扫描到图形码时,所述第一终端对所述图形码进行解析以获取信道号;Step S70: When scanning the graphic code based on the graphic code scanning interface, the first terminal parses the graphic code to obtain a channel number;

当第一终端使用所述关联应用扫描识别一外部的二维码时,所述关联应用程序获取所述二维码对应的信道号。第一终端监听二维码解析事件,获取用于Miracast连接的信道号后,所述第一终端根据所述信道号自动打开所述Miracast开关。所述第一终端向提供所述图形码的终端发送直连请求,并在所述获取到的信道上等待反馈信息。此处,提供所述图形码的终端可以是第二终端,也可以是当前所在无线网络中的其他终端。When the first terminal uses the associated application scan to identify an external two-dimensional code, the associated application acquires a channel number corresponding to the two-dimensional code. After the first terminal monitors the two-dimensional code parsing event and obtains the channel number for the Miracast connection, the first terminal automatically opens the Miracast switch according to the channel number. The first terminal sends a direct connection request to the terminal that provides the graphic code, and waits for feedback information on the acquired channel. Here, the terminal that provides the graphic code may be the second terminal, or may be other terminals in the current wireless network.

步骤S80,在接收到提供图形码的终端基于所述直连请求反馈的响应信息时,所述第一终端基于获取的所述信道号建立与所述提供所述图形码的终端之间的无线直连。Step S80, when receiving the response information fed back by the terminal that provides the graphic code based on the direct connection request, the first terminal establishes a wireless relationship with the terminal that provides the graphic code based on the acquired channel number. Direct connection.

在进行直连连接时,所述提供所述图形码的终端为引导端,生成图形码以供第一终端基于所述图形码进行扫描操作,所述第一终端为被引导端。所述提供所述图形码的终端监听到直连请求后生成无线直连连接信息返回给第一终端。所述提供所述图形码的终端可以接收多个终端发送直连请求,并基于所述直连请求向多个终端反馈响应信息。第一终端在获取到的信道上接收到响应信息后,根据所述信道号与第一终端进行Miracast连接。When the direct connection is performed, the terminal that provides the graphic code is a leading end, and generates a graphic code for the first terminal to perform a scanning operation based on the graphic code, where the first terminal is a guided end. The terminal that provides the graphic code detects the direct connection request and generates wireless direct connection information to return to the first terminal. The terminal that provides the graphic code may receive a plurality of terminals to send a direct connection request, and feed back response information to the multiple terminals based on the direct connection request. After receiving the response information on the acquired channel, the first terminal performs a Miracast connection with the first terminal according to the channel number.

下面通过一个具体的实施例来说明上述方法是如何实现的。The following describes how the above method is implemented by a specific embodiment.

在房间内,电视端即所述第二终端扫描当前无线网络信号覆盖范围的所有信道,确定一个优质信道,以获取所述优质信道的信道号,根据所述信道号生成二维码图像。所述二维码图像可以以图标的形式显示在电视端的屏幕上,也可以打印出来贴在房间内。所述电视端发送安装Miracast连接的相关应用程序的提示信息的广播。当用户进入所述无线网络信号覆盖范围后,则接受安装Miracast连接的相关应用程序的提示信息的广播,按照广播提示安装相关联应用程序。手机端即所述第一终端扫描所述二维码图像,获取与所述二维码图像相对应的无线网络的信道号,自动向提供二维码图像的另一终端即所述电视端发送直连请求,接收到响应信息后,与所述电视端建立Miracast连接。In the room, the television terminal, that is, the second terminal scans all channels of the current wireless network signal coverage, determines a good channel, obtains the channel number of the premium channel, and generates a two-dimensional code image according to the channel number. The two-dimensional code image may be displayed on the screen of the television end in the form of an icon, or may be printed and posted in the room. The television terminal sends a broadcast of the prompt information of the related application that installs the Miracast connection. After the user enters the coverage of the wireless network signal, the broadcast of the prompt information of the related application for installing the Miracast connection is accepted, and the associated application is installed according to the broadcast prompt. The mobile terminal, that is, the first terminal scans the two-dimensional code image, acquires a channel number of a wireless network corresponding to the two-dimensional code image, and automatically sends the same to the other terminal that provides the two-dimensional code image, that is, the television end. The direct connection request, after receiving the response information, establishes a Miracast connection with the television end.

本实施例通过第一终端向所述提供所述图形码的终端发送直连请求,所述第一终端提供图形码扫描界面,实现了第一终端由引导端向被引导端互换,有效的解决了引导端与被引导端都需要扫描无线网络信道,增加扫描时间的问题。In this embodiment, the first terminal sends a direct connection request to the terminal that provides the graphic code, and the first terminal provides a graphic code scanning interface, so that the first terminal is exchanged from the leading end to the guided end, which is effective. The problem that both the leading end and the guided end need to scan the wireless network channel and increase the scanning time is solved.

进一步的,基于第一实施例,提出本发明无线直连连接方法的第四实施例,在本实施例中,参照图4上述步骤S30包括:Further, based on the first embodiment, a fourth embodiment of the wireless direct connection method of the present invention is proposed. In this embodiment, referring to FIG. 4, the foregoing step S30 includes:

步骤S31,所述第一终端检测无线直连模块是否启动;Step S31: The first terminal detects whether the wireless direct connection module is started.

在接收到第二终端发送的直连请求后,判断第一终端的无线直连模块是否启动。所述无线直连模块监听直连请求、Miracast开关、设备的连接情况及向本端发送打开Miracast开关的指令。在本端的Miracast开关已开启的情况下,会直接进行Miracast连接。After receiving the direct connection request sent by the second terminal, determining whether the wireless direct connection module of the first terminal is started. The wireless direct connection module monitors the direct connection request, the Miracast switch, the connection status of the device, and sends an instruction to the local end to open the Miracast switch. When the current Miracast switch is turned on, the Miracast connection will be made directly.

步骤S32,在所述无线直连模块未启动时,所述第一终端启动所述无线直连模块;Step S32, when the wireless direct connection module is not activated, the first terminal starts the wireless direct connection module;

在无线直连模块未开启的情况下,所述第一终端接收本端发送的打开Miracast开关的指令,并从本端解析的图形码中获取到的信道号,根据所述打开Miracast开关的指令及信道号自动开启所述无线直连模块;或者,基于用户触发Miracast开关。If the wireless direct connection module is not turned on, the first terminal receives an instruction for opening the Miracast switch sent by the local end, and obtains a channel number obtained from the graphic code parsed by the local end, according to the instruction for opening the Miracast switch. And the channel number automatically turns on the wireless direct connection module; or, based on the user triggers the Miracast switch.

步骤S33,所述第一终端基于所述无线直连模块以及获取到的所述信道号建立与第二终端之间的无线直连连接。Step S33: The first terminal establishes a wireless direct connection with the second terminal based on the wireless direct connection module and the obtained channel number.

在本实施例中,所述第二终端采用Miracast协议接收所述第一终端的连接信号和实时操控,并将第一终端屏幕上的内容分享显示在第二终端屏幕上,通过所述第二终端硬件系统对信号进行解码和编码,实现将适合大屏幕的信号传递到小屏幕上。所述Miracast协议接收所述第一端的连接信号和实时操控包括建立TCP连接通道进行功能协商。In this embodiment, the second terminal receives the connection signal and the real-time control of the first terminal by using the Miracast protocol, and displays the content sharing on the screen of the first terminal on the screen of the second terminal, by using the second terminal. The terminal hardware system decodes and encodes the signal to deliver a signal suitable for the large screen to the small screen. The receiving the connection signal and the real-time manipulation of the first end by the Miracast protocol includes establishing a TCP connection channel for function negotiation.

或者,所述第二终端采用Miracast协议接收所述第一终端的连接信号和实时操控,并将第二终端屏幕上的内容分享显示在第一终端屏幕上,通过所述第一终端硬件系统对信号进行解码和编码,实现将合适小屏幕的信号传递到大屏幕上。Or the second terminal receives the connection signal and the real-time control of the first terminal by using the Miracast protocol, and displays the content sharing on the second terminal screen on the first terminal screen, and the first terminal hardware system The signal is decoded and encoded to deliver a suitable small screen signal to the large screen.

本领域的技术人员可以理解的是,在未使用Miracast应用时,Miracast应用的开关是关闭的,减少终端的耗电量及减少终端对无线网络的占用;通过获取打开Miracast开关的指令与信道号自动打开Miracast应用的开关,提高了应用的体验度。It can be understood by those skilled in the art that when the Miracast application is not used, the switch of the Miracast application is turned off, reducing the power consumption of the terminal and reducing the occupation of the wireless network by the terminal; and obtaining the command and channel number for opening the Miracast switch. Automatically turn on the switch of the Miracast app to improve the app experience.

进一步的,基于上述任一实施例,提出本发明无线直连连接方法的第五实施例,在本实施例中,上述步骤S10包括:Further, based on any of the foregoing embodiments, a fifth embodiment of the wireless direct connection method of the present invention is proposed. In this embodiment, the foregoing step S10 includes:

步骤S11,所述第一终端扫描当前所在无线网络所有信道;Step S11, the first terminal scans all channels of the current wireless network;

第一终端比对本端的直连参数等级与本端预设的直连参数等级,确定本端的直连参数等级为最高优先级15后,所述第一终端为引导端扫描当前无线网络信道。第一终端检测到当前无线网络信号。After the first terminal compares the direct connection parameter level of the local end with the direct connection parameter level preset by the local end, after determining that the direct connection parameter level of the local end is the highest priority 15, the first terminal scans the current wireless network channel for the leading end. The first terminal detects the current wireless network signal.

步骤S22,将所述信道内信号强度最强的信道作为所述干扰最小的信道,并获取所述干扰最小的信道对应的信道号。Step S22: The channel with the strongest signal strength in the channel is used as the channel with the smallest interference, and the channel number corresponding to the channel with the least interference is obtained.

在本实施例中,第一终端选择当前无线网络中信号强度最强的无线网络;In this embodiment, the first terminal selects a wireless network with the strongest signal strength in the current wireless network;

或者,在第一终端检测无线网络时,设置一个无线网络信号强度阈值,如果检测到的信号强度小于所述预设的无线网络信号强度阈值,则放弃,继续检测当前环境中的无线网络信号强度,直到检测到信道强度大于所述无线网络信号强度阈值的无线网络信号。如果检测到的信道强度大于所述无线网络信号强度阈值的无线网络信号大于一个,则将这些信号强度进行比较,获取信号强度最大的无线网络信号,第一终端底层启动无线网络扫描功能,获取所述无线网络中包含的信道及信道/带宽占用状态信息,允许/禁止使用信道/带宽状态信息。Or, when the first terminal detects the wireless network, setting a wireless network signal strength threshold, if the detected signal strength is less than the preset wireless network signal strength threshold, then giving up and continuing to detect the wireless network signal strength in the current environment. Until the wireless network signal whose channel strength is greater than the wireless network signal strength threshold is detected. If the detected wireless network signal whose channel strength is greater than the wireless network signal strength threshold is greater than one, the signal strengths are compared to obtain a wireless network signal with the highest signal strength, and the first terminal bottom layer starts the wireless network scanning function, and acquires the The channel and channel/bandwidth occupancy status information contained in the wireless network is allowed/disabled to use channel/bandwidth status information.

本领域的技术人员可以理解的是,在终端连接Wi-Fi时,会优先选择Wi-Fi信号比较强的信道进行连接。由于所述信号比较强的信道中被其它信号占用的空间小,并且所述其它信号的强度弱。因此,所述信号比较强的信道的干扰小,通讯顺畅。所以,终端在进行Miracast连接时,会优先扫描Wi-Fi信号比较弱的信道,将所述信号最强的信道确定为优质信道,并获取所述优质信道的信道号。It can be understood by those skilled in the art that when the terminal is connected to Wi-Fi, a channel with a relatively strong Wi-Fi signal is preferentially selected for connection. The space occupied by other signals in the channel where the signal is relatively strong is small, and the strength of the other signals is weak. Therefore, the channel with a relatively strong signal has small interference and smooth communication. Therefore, when performing the Miracast connection, the terminal preferentially scans the channel with weak Wi-Fi signal, determines the channel with the strongest signal as the quality channel, and acquires the channel number of the high-quality channel.

本发明进一步提供一种无线直连连接装置。The invention further provides a wireless direct connection device.

参照图6,图6为本发明无线直连连接装置的第一实施例的功能模块示意图。Referring to FIG. 6, FIG. 6 is a schematic diagram of functional modules of a first embodiment of a wireless direct connection device according to the present invention.

在本实施例中,所述装置包括:获取模块10、生成模块20、连接模块30。In this embodiment, the device includes: an obtaining module 10, a generating module 20, and a connecting module 30.

所述获取模块10,用于在其所在的第一终端进入无线直连模式时,获取当前所在无线网络中干扰最小的信道对应的信道号;The obtaining module 10 is configured to acquire, when the first terminal where the first terminal is located, enter a wireless direct connection mode, obtain a channel number corresponding to a channel with the least interference in the current wireless network;

在本实施例中,在所述第一终端的连接模块30内注册Miracast事件监听,用于对Miracast应用开与关、设备连接与终端等事件的监听。当所述第一终端的接收模块10收到打开Miracast应用开关的请求时,打开Miracast应用开关,立即扫描当前无线网络所用射频段的所有信道,选择一个优质信道,所述优质信道可以理解为被其它的信号占用的空间最少,并且所述其它信号强度最弱的优质信道,获取所述优质信道的信道号。需要说明的是,无线直连模式下,所述无线网络可以提供2.4GHz发射频段共13个通信信道或5GHz发射频段共23个通信信道。In this embodiment, the Miracast event listener is registered in the connection module 30 of the first terminal, and is used for monitoring the events of the Miracast application opening and closing, device connection, and terminal. When the receiving module 10 of the first terminal receives the request to open the Miracast application switch, the Miracast application switch is opened, and all channels of the radio frequency segment used by the current wireless network are immediately scanned, and a high quality channel is selected, and the high quality channel can be understood as being The other signals occupy the least space, and the other channels with the weakest signal strength are the best, and the channel number of the good channel is obtained. It should be noted that, in the wireless direct connection mode, the wireless network can provide a total of 23 communication channels in a total of 13 communication channels or 5 GHz transmission bands in the 2.4 GHz transmission band.

在进行无线直连连接时,例如,进行Miracast连接,第一终端作为引导终端,第二终端作为被引导终端。第二终端在侦测到用户触发的直连请求时,将所述直连请求发送至所述第一终端的接收模块10;或者,第二终端进入当前无线网络覆盖范围内,Miracast应用会自动检测当前无线网络,触发直连请求。所述直连请求包括打开Miracast应用开关、终端设备连接与中断。所述无线网络包括但不限于Wi-Fi。When a wireless direct connection is made, for example, a Miracast connection is made, the first terminal serves as a boot terminal, and the second terminal serves as a boot terminal. When the second terminal detects the direct connection request triggered by the user, the second terminal sends the direct connection request to the receiving module 10 of the first terminal; or the second terminal enters the current wireless network coverage, and the Miracast application automatically Detects the current wireless network and triggers a direct connection request. The direct connection request includes opening a Miracast application switch, a terminal device connection and an interrupt. The wireless network includes, but is not limited to, Wi-Fi.

所述生成模块20,用于根据所述信道号生成图形码,以供所述第二终端扫描所述图形码以获取所述信道号;The generating module 20 is configured to generate a graphic code according to the channel number, so that the second terminal scans the graphic code to obtain the channel number;

在获取到当前所在无线网络中干扰最小的信道对应的信道号后,所述生成模块20的信道号进行自动图形编码;或者,所述生成模块20侦测到所述信道号的图形码编码指令,并根据侦测到的图形码编码指令锁定的信道号进行图形码编码;或者,其他任意适用的方式。所述图形码包括但不限于二维码和条形码。本实施例中以二维码为例。二维码使用某种特定的几何图形按照一定规律在平面(二维方向)上分布的条、空相间的图形码来记录数据符号信息。第二终端通过扫描所述二维码得到所述信道号,确认与第一终端进行无线直连连接的信道,发送直连请求后,在该信道等待返回信息。After obtaining the channel number corresponding to the channel with the smallest interference in the current wireless network, the channel number of the generating module 20 is automatically graphically encoded; or the generating module 20 detects the graphic code encoding instruction of the channel number. And performing graphic code encoding according to the channel number locked by the detected graphic code encoding instruction; or any other applicable manner. The graphic code includes, but is not limited to, a two-dimensional code and a barcode. In this embodiment, a two-dimensional code is taken as an example. The two-dimensional code records the data symbol information by using a certain geometric pattern in a plane (two-dimensional direction) distributed between the strip and the space between the graphics code. The second terminal obtains the channel number by scanning the two-dimensional code, confirms a channel that is directly connected to the first terminal, and waits for the return information after the direct connection request is sent.

所述连接模块30,用于在接收到第二终端发送的直连请求后,所述第一终端根据所述信道号与第二终端进行无线直连连接。The connection module 30 is configured to: after receiving the direct connection request sent by the second terminal, the first terminal performs a wireless direct connection with the second terminal according to the channel number.

在本实施例中,在Miracast的建立会话阶段,第一终端的连接模块30与第二终端通过建立TCP连接通道进行功能协商,所述连接模块30根据预设连接信号类型,将输入的连接信号封装成相应类型的连接信号报文发送给所述第二终端,所述第二终端根据预设的连接信号类型,对接收到的连接信号报文进行解析,得到解析后的连接信号,实现所述第一终端根据所述信道号与第二终端进行Miracast连接。In this embodiment, during the establishment session of the Miracast, the connection module 30 of the first terminal and the second terminal perform function negotiation by establishing a TCP connection channel, and the connection module 30 inputs the input connection signal according to the preset connection signal type. The connection signal packet encapsulated into a corresponding type is sent to the second terminal, and the second terminal parses the received connection signal packet according to the preset connection signal type, and obtains the parsed connection signal, and implements the The first terminal performs a Miracast connection with the second terminal according to the channel number.

终端可以以各种形式来实施。例如,本发明中描述的终端可以包括移动终端或者固定终端。移动终端,诸如移动电话、智能电话、笔记本电脑、狮子广播接收器、PDA(个人数字助理)、PAD(平板电脑)、PMP(便携式多媒体播放器)、导航装置等;固定终端,诸如数字TV 、台式计算机等。所述的移动终端或者固定终端都会有一个相对来说是大屏幕另一个是小屏幕。在本实施例中,可以认为第一终端是相对较大屏幕的固定终端,第二终端是相对较小屏幕的移动终端。例如,通过开启两个终端的Miracast连接,用户可以让智能手机上的内容通过无线网络投射到智能电视等大屏上;或者,用户也可以让智能电视屏幕上的内容通过无线网络投射到智能手机等小屏幕终端设备上。The terminal can be implemented in various forms. For example, the terminal described in the present invention may include a mobile terminal or a fixed terminal. Mobile terminal, such as mobile phone, smart phone, laptop, lion broadcast receiver, PDA (Personal Digital Assistant), PAD (tablet), PMP (portable multimedia player), navigation device, etc.; fixed terminal, such as digital TV , desktop computers, etc. The mobile terminal or the fixed terminal has a relatively large screen and a small screen. In this embodiment, the first terminal can be considered as a fixed terminal with a relatively large screen, and the second terminal is a mobile terminal with a relatively small screen. For example, by turning on the Miracast connection between two terminals, the user can let the content on the smartphone be projected onto a large screen such as a smart TV through the wireless network; or, the user can also let the content on the smart TV screen be projected to the smartphone through the wireless network. Wait for small screen terminal devices.

本实施例通过扫描终端上的图形码,解析图形码获取信道号,根据信道号进行Miracast连接,使终端明确确定进行Miracast连接的信道号,而不用通过依次扫描无线网络的信道来确定Miracast连接的信道号,从而减少对非连接信道的扫描的扫描时间,提高Miracast连接效率。In this embodiment, by scanning the graphic code on the terminal, parsing the graphic code to obtain the channel number, and performing the Miracast connection according to the channel number, so that the terminal explicitly determines the channel number for the Miracast connection, instead of determining the Miracast connection by sequentially scanning the channel of the wireless network. The channel number, thereby reducing the scan time for scanning the non-connected channel and improving the efficiency of the Miracast connection.

参照图7,图7为本发明无线直连连接装置的第二实施例的功能模块示意图。Referring to FIG. 7, FIG. 7 is a schematic diagram of functional modules of a second embodiment of a wireless direct connection device according to the present invention.

在本实施例中,所述装置还包括:比对模块40。In this embodiment, the device further includes: a comparison module 40.

所述比对模块40,用于进入无线直连模式时,所述第一终端将本端的直连参数等级与预设的直连参数等级进行比对;When the comparison module 40 is configured to enter the wireless direct connection mode, the first terminal compares the direct connection parameter level of the local end with a preset direct connection parameter level;

在本实施例中,在所述比对模块40中,读取已设置的无线网络程序中的直连参数,确定所述直连参数的等级。用户可以依据需要设置所述比对模块40的无线网络直连配置文件p2p_supplicant中直连参数p2p_go_intent的为不同等级,直连参数等级的不同,决定第一终端在直连连接时是作为引导端还是作为被引导端。在所述第一终端进入无线直连模式时,比较通过所述比对模块40比较本端的直连参数等级与预设直连参数等级的大小。所述直连配置文件从无线网络程序中读取。例如,终端系统中Wi-Fi直连配置文件p2p_supplicant中直连参数p2p_go_intent的等级有两种形式p2p_go_intent=15或者p2p_go_intent<15。In this embodiment, in the comparison module 40, the direct connection parameter in the set wireless network program is read, and the level of the direct connection parameter is determined. The user can set the direct connection parameter p2p_go_intent in the wireless network direct connection configuration file p2p_supplicant of the comparison module 40 to different levels, and directly connect the parameter level to determine whether the first terminal is used as the leading end when the direct connection is directly connected. As the guided end. When the first terminal enters the wireless direct connection mode, the comparison module 40 compares the direct connection parameter level of the local end with the size of the preset direct connection parameter level. The direct connection profile is read from a wireless network program. For example, the level of the direct connection parameter p2p_go_intent in the Wi-Fi Direct configuration file p2p_supplicant in the terminal system has two forms p2p_go_intent=15 or p2p_go_intent<15.

所述获取模块10,在本端的所述直连参数等级等于预设直连参数等级时,获取当前所在无线网络中干扰最小的信道对应的信道号。The obtaining module 10 obtains the channel number corresponding to the channel with the least interference in the current wireless network when the direct connection parameter level of the local end is equal to the preset direct connection parameter level.

在本实施例中,终端系统在无线网络中无线直连配置文件p2p_supplicant中直连参数p2p_go_intent设置所述的等级不同,所述终端就会在引导端和被引导端进行互换,即所述终端就会在生成图形码终端和扫描图形码终端之间进行互换。所述获取模块10检测到在本端的直连参数等级等于预设直连参数等级时,即终端系统中Wi-Fi直连配置文件p2p_supplicant中直连参数p2p_go_intent设置的等级为p2p_go_intent=15时,所述第一终端确定为引导端,扫描当前所在环境无线网络的信道,获取无线网络中干扰最小的信道对应的信道号。In this embodiment, the terminal system has different levels in the direct connection parameter p2p_go_intent setting in the wireless direct connection configuration file p2p_supplicant in the wireless network, and the terminal exchanges between the leading end and the guided end, that is, the terminal The interchange between the generated graphics terminal and the scanned graphics terminal is performed. The obtaining module 10 detects that the direct connection parameter level of the local end is equal to the preset direct connection parameter level, that is, when the direct connection parameter p2p_go_intent of the Wi-Fi direct connection configuration file p2p_supplicant in the terminal system is set to p2p_go_intent=15, The first terminal is determined to be a leading end, and scans a channel of the wireless network in the current environment to obtain a channel number corresponding to the channel with the least interference in the wireless network.

本技术领域的技术人员可以理解的是,终端通过比对本端的直连参数等级与预设的直连参数等级的大小,可以确定本端是引导端还是被引导端,从而使本端执行不同的功能。It can be understood by those skilled in the art that the terminal can determine whether the local end is the leading end or the leading end by comparing the direct connection parameter level of the local end with the preset direct connection parameter level, so that the local end performs different functions. Features.

参照图8,图8为本发明无线直连连接装置的第三实施例的功能模块示意图。Referring to FIG. 8, FIG. 8 is a schematic diagram of functional modules of a third embodiment of a wireless direct connection device according to the present invention.

在本实施例中,所述装置还包括:广播模块60、显示模块70、解析模块80。In this embodiment, the device further includes: a broadcast module 60, a display module 70, and a parsing module 80.

所述广播模块50,用于在本端的所述直连参数等级小于预设直连参数等级时,广播直连请求;The broadcast module 50 is configured to: when the direct connection parameter level of the local end is less than a preset direct connection parameter level, broadcast a direct connection request;

在本实施例中,所述获取模块10获取到的所述第一终端的在无线网络中直连配置文件p2p_supplicant中直连参数p2p_go_intent设置的最高优先级小于15,确定所述第二终端为扫描图形码终端。第一终端的所述广播模块50的无线直连模块自动广播直连请求;或者,所述广播模块50在基于用户触发第一终端的无线直连模块广播请求。所述直连请求的接收端不局限于一个,可以有多个。In this embodiment, the highest priority set by the direct connection parameter p2p_go_intent in the direct connection configuration file p2p_supplicant of the first terminal acquired by the obtaining module 10 is less than 15, and the second terminal is determined to be a scan. Graphic code terminal. The wireless direct connection module of the broadcast module 50 of the first terminal automatically broadcasts a direct connection request; or the broadcast module 50 broadcasts a request based on a wireless direct connection module triggered by the user to trigger the first terminal. The receiving end of the direct connection request is not limited to one, and there may be multiple.

所述显示模块60,用于显示图形码扫描界面;The display module 60 is configured to display a graphic code scanning interface;

在所述第一终端的所述广播模块50广播直连请求之后,用户可以点击直连请求广播的信息提示直接进入第一终端的所述显示模块60显示的图形码扫描界面,例如,双击锁屏界面上的图形码扫描界面快捷图标;或者用户找到图形码扫描界面应用点击后显示图形码扫描界面。After the broadcast module 50 of the first terminal broadcasts the direct connection request, the user may click the information of the direct connection request broadcast to directly enter the graphic code scanning interface displayed by the display module 60 of the first terminal, for example, double-clicking the lock. The graphic code scanning interface shortcut icon on the screen interface; or the user finds the graphic code scanning interface application to display the graphic code scanning interface after clicking.

具体的,无线网络向其所在的无线网络信号覆盖范围内的终端广播关联应用程序的提示安装信息。需要作为扫描图形码终端而又未安装该关联应用的终端,在接收到该提示安装信息后,用户可以根据相应的提示步骤下载安装该关联应用。所述关联应用程序为识别二维码的应用程序,其可以采用APP的格式。所述无线网络包括但不限于Wi-Fi无线网络。所述无线网络信号覆盖范围区域可以是,例如,在房间里安装了无线路由器,无线网络信号覆盖的范围为房间所在的区域;在公共场所安装了无线路由器,无线网络信号覆盖的范围为公共场所所在的区域。Specifically, the wireless network broadcasts the prompt installation information of the associated application to the terminal within the coverage of the wireless network signal in which it is located. The terminal that scans the graphic code terminal and does not install the associated application, after receiving the prompt installation information, the user can download and install the associated application according to the corresponding prompting step. The associated application is an application that recognizes a two-dimensional code, which may be in the format of an APP. The wireless network includes, but is not limited to, a Wi-Fi wireless network. The wireless network signal coverage area may be, for example, a wireless router installed in the room, the coverage of the wireless network signal is the area where the room is located; the wireless router is installed in the public place, and the wireless network signal coverage is in a public place. The area where you are.

所述解析模块70,用于在基于所述图形码扫描界面扫描到图形码时,所述第一终端对所述图形码进行解析以获取信道号。The parsing module 70 is configured to parse the graphic code to obtain a channel number when scanning the graphic code based on the graphic code scanning interface.

当所述解析模块70使用所述关联应用扫描识别一外部的二维码时,所述关联应用程序获取所述二维码对应的信道号。所述第一终端的连接模块30监听二维码解析事件,获取用于Miracast连接的信道号后,所述第一终端根据所述信道号自动打开所述Miracast开关。所述第一终端向提供所述图形码的终端发送直连请求,并在所述获取到的信道上等待反馈信息。此处,提供所述图形码的终端可以是第二终端,也可以是当前所在无线网络中的其他终端。When the parsing module 70 uses the associated application scan to identify an external two-dimensional code, the associated application acquires a channel number corresponding to the two-dimensional code. After the connection module 30 of the first terminal monitors the two-dimensional code parsing event and obtains the channel number for the Miracast connection, the first terminal automatically opens the Miracast switch according to the channel number. The first terminal sends a direct connection request to the terminal that provides the graphic code, and waits for feedback information on the acquired channel. Here, the terminal that provides the graphic code may be the second terminal, or may be other terminals in the current wireless network.

所述连接模块30,还用于在接收到提供所述图形码的终端基于所述直连请求反馈的响应信息时,所述第一终端基于获取的所述信道号建立与所述提供所述图形码的终端之间的无线直连。The connection module 30 is further configured to: when receiving, by the terminal that provides the graphic code, response information that is fed back based on the direct connection request, the first terminal establishes and provides the Wireless direct connection between terminals of graphics code.

在进行直连连接时,所述提供所述图形码的终端为引导端,生成图形码以供第一终端基于所述图形码进行扫描操作,所述第一终端为被引导端。所述提供所述图形码的终端监听到直连请求后生成无线直连连接信息返回给第一终端。所述提供所述图形码的终端可以接收多个终端发送直连请求,并基于所述直连请求向多个终端反馈响应信息。所述连接模块30在获取到的信道上接收到响应信息后,根据所述信道号与第一终端进行Miracast连接。When the direct connection is performed, the terminal that provides the graphic code is a leading end, and generates a graphic code for the first terminal to perform a scanning operation based on the graphic code, where the first terminal is a guided end. The terminal that provides the graphic code detects the direct connection request and generates wireless direct connection information to return to the first terminal. The terminal that provides the graphic code may receive a plurality of terminals to send a direct connection request, and feed back response information to the multiple terminals based on the direct connection request. After receiving the response information on the acquired channel, the connection module 30 performs a Miracast connection with the first terminal according to the channel number.

下面通过一个具体的实施例来说明上述方法是如何实现的。The following describes how the above method is implemented by a specific embodiment.

在房间内,电视端即所述第二终端扫描当前无线网络信号覆盖范围的所有信道,确定一个优质信道,以获取所述优质信道的信道号,根据所述信道号生成二维码图像。所述二维码图像可以以图标的形式显示在电视端的屏幕上,也可以打印出来贴在房间内。所述电视端发送安装Miracast连接的相关应用程序的提示信息的广播。当用户进入所述无线网络信号覆盖范围后,则接受安装Miracast连接的相关应用程序的提示信息的广播,按照广播提示安装相关联应用程序。手机端即所述第一终端扫描所述二维码图像,获取与所述二维码图像相对应的无线网络的信道号,自动向提供二维码图像的另一终端即所述电视端发送直连请求,接收到响应信息后,与所述电视端建立Miracast连接。In the room, the television terminal, that is, the second terminal scans all channels of the current wireless network signal coverage, determines a good channel, obtains the channel number of the premium channel, and generates a two-dimensional code image according to the channel number. The two-dimensional code image may be displayed on the screen of the television end in the form of an icon, or may be printed and posted in the room. The television terminal sends a broadcast of the prompt information of the related application that installs the Miracast connection. After the user enters the coverage of the wireless network signal, the broadcast of the prompt information of the related application for installing the Miracast connection is accepted, and the associated application is installed according to the broadcast prompt. The mobile terminal, that is, the first terminal scans the two-dimensional code image, acquires a channel number of a wireless network corresponding to the two-dimensional code image, and automatically sends the same to the other terminal that provides the two-dimensional code image, that is, the television end. The direct connection request, after receiving the response information, establishes a Miracast connection with the television end.

本实施例通过第一终端向所述提供所述图形码的终端发送直连请求,所述第一终端提供图形码扫描界面,实现了第一终端由引导端向被引导端互换,有效的解决了引导端与被引导端都需要扫描无线网络信道,增加扫描时间的问题。In this embodiment, the first terminal sends a direct connection request to the terminal that provides the graphic code, and the first terminal provides a graphic code scanning interface, so that the first terminal is exchanged from the leading end to the guided end, which is effective. The problem that both the leading end and the guided end need to scan the wireless network channel and increase the scanning time is solved.

参照图9,图9为本发明连接模块30一实施例的功能模块示意图。Referring to FIG. 9, FIG. 9 is a schematic diagram of functional modules of an embodiment of a connection module 30 according to the present invention.

在本实施例中,所述连接模块30包括检测单元31、启动单元32、连接单元33。In the embodiment, the connection module 30 includes a detecting unit 31, a starting unit 32, and a connecting unit 33.

所述检测单元31,用于检测无线直连模块是否启动;The detecting unit 31 is configured to detect whether the wireless direct connection module is activated.

在接收到第二终端发送的直连请求后,所述检测单元31判断第一终端的无线直连模块是否启动。所述无线直连模块监听直连请求、Miracast开关、设备的连接情况及向本端发送打开Miracast开关的指令。所述检测单元31检测到在本端的Miracast开关已开启的情况下,会直接进行Miracast连接。After receiving the direct connection request sent by the second terminal, the detecting unit 31 determines whether the wireless direct connection module of the first terminal is activated. The wireless direct connection module monitors the direct connection request, the Miracast switch, the connection status of the device, and sends an instruction to the local end to open the Miracast switch. The detecting unit 31 detects that the Miracast connection is directly performed when the current Miracast switch is turned on.

所述启动单元32,用于在所述无线直连模块未启动时,启动所述无线直连模块;The initiating unit 32 is configured to start the wireless direct connection module when the wireless direct connection module is not activated;

所述检测单元31检测到本端在无线直连模块未开启的情况下,第一终端的所述启动单元32接收本端发送的打开Miracast开关的指令,并从本端解析的图形码中获取到的信道号,根据所述打开Miracast开关的指令及信道号自动开启所述无线直连模块;或者,基于用户触发Miracast开关。The detecting unit 31 detects that the local terminal does not turn on the wireless direct connection module, and the starting unit 32 of the first terminal receives the instruction to open the Miracast switch sent by the local end, and obtains the graphic code parsed from the local end. The channel number to be obtained, the wireless direct connection module is automatically turned on according to the instruction to open the Miracast switch and the channel number; or the Miracast switch is triggered based on the user.

所述连接单元33,用于基于所述无线直连模块以及获取到的所述信道号建立与第二终端之间的无线直连连接。The connecting unit 33 is configured to establish a wireless direct connection with the second terminal based on the wireless direct connection module and the obtained channel number.

在本实施例中,所述第二终端的所述连接单元33采用Miracast协议接收所述第一终端的连接信号和实时操控,并将第一终端屏幕上的内容分享显示在第二终端屏幕上,通过所述第二终端的所述连接单元33对信号进行解码和编码,实现将合适大屏幕的信号传递到小屏幕上。所述Miracast协议接收所述第一端的连接信号和实时操控包括建立TCP连接通道进行功能协商。In this embodiment, the connection unit 33 of the second terminal receives the connection signal and real-time control of the first terminal by using the Miracast protocol, and displays the content sharing on the screen of the first terminal on the second terminal screen. The signal is decoded and encoded by the connecting unit 33 of the second terminal, so that a signal of a suitable large screen is transmitted to the small screen. The receiving the connection signal and the real-time manipulation of the first end by the Miracast protocol includes establishing a TCP connection channel for function negotiation.

或者,所述第二终端的所述连接单元33采用Miracast协议接收所述第一终端的连接信号和实时操控,并将第二终端屏幕上的内容分享显示在第一终端屏幕上,通过所述第一终端硬件系统对信号进行解码和编码,实现将合适小屏幕的信号传递到大屏幕上。Or the connection unit 33 of the second terminal receives the connection signal of the first terminal and the real-time manipulation by using the Miracast protocol, and displays the content sharing on the second terminal screen on the first terminal screen, by using the The first terminal hardware system decodes and encodes the signal to deliver a suitable small screen signal to the large screen.

本领域的技术人员可以理解的是,在未使用Miracast应用时,Miracast应用的开关是关闭的,减少终端的耗电量及减少终端对无线网络的占用;通过获取打开Miracast开关的指令与信道号自动打开Miracast应用的开关,提高了应用的体验度。It can be understood by those skilled in the art that when the Miracast application is not used, the switch of the Miracast application is turned off, reducing the power consumption of the terminal and reducing the occupation of the wireless network by the terminal; and obtaining the command and channel number for opening the Miracast switch. Automatically turn on the switch of the Miracast app to improve the app experience.

参照图10,图10为本发明获取模块10一实施例的功能模块示意图。Referring to FIG. 10, FIG. 10 is a schematic diagram of functional modules of an embodiment of the acquisition module 10 of the present invention.

在本实施例中,所述获取模块10包括扫描模块11、获取单元12。In this embodiment, the obtaining module 10 includes a scanning module 11 and an obtaining unit 12.

所述扫描单元11,用于扫描当前所在无线网络所有信道;The scanning unit 11 is configured to scan all channels of the current wireless network;

在第一终端比对本端的直连参数等级与本端预设的直连参数等级,确定本端的直连参数等级为最高优先级15后,所述第一终端为引导端,通过所述扫描单元11扫描当前无线网络信道。第一终端检测到当前无线网络信号。After the first terminal compares the direct connection parameter level of the local end with the direct connection parameter level preset by the local end, and determines that the direct connection parameter level of the local end is the highest priority 15, the first terminal is the leading end, and the scanning unit is adopted. 11 Scan the current wireless network channel. The first terminal detects the current wireless network signal.

所述获取单元12,用于将所述信道内信号强度最强的信道作为所述干扰最小的信道,并获取所述干扰最小的信道对应的信道号。The acquiring unit 12 is configured to use a channel with the strongest signal strength in the channel as the channel with the smallest interference, and obtain a channel number corresponding to the channel with the smallest interference.

在本实施例中,第一终端的所述获取单元12选择当前无线网络中信号强度最强的无线网络;In this embodiment, the acquiring unit 12 of the first terminal selects a wireless network with the strongest signal strength in the current wireless network;

或者,在第一终端所述获取单元12在检测无线网络时,预先设置一个无线网络信号强度阈值,如果检测到的信号强度小于所述预设的无线网络信号强度阈值,则放弃,继续检测当前环境中的无线网络信号强度,直到检测到信道强度大于所述无线网络信号强度阈值的无线网络信号。如果检测到的信道强度大于所述无线网络信号强度阈值的无线网络信号大于一个,则将这些信号强度进行比较,获取信号强度最强的无线网络信号,第一终端底层启动无线网络扫描功能,获取所述无线网络中包含的信道及信道/带宽占用状态信息,允许/禁止使用信道/带宽状态信息。Or, in the first terminal, the acquiring unit 12 sets a wireless network signal strength threshold in advance when detecting the wireless network, and if the detected signal strength is less than the preset wireless network signal strength threshold, abandoning and continuing to detect the current The wireless network signal strength in the environment until a wireless network signal with a channel strength greater than the wireless network signal strength threshold is detected. If the detected wireless network signal whose channel strength is greater than the wireless network signal strength threshold is greater than one, the signal strengths are compared to obtain the wireless network signal with the strongest signal strength, and the first terminal bottom layer starts the wireless network scanning function to obtain The channel and channel/bandwidth occupancy status information contained in the wireless network allows/disables the use of channel/bandwidth status information.

本领域的技术人员可以理解的是,在终端连接Wi-Fi时,会优先选择Wi-Fi信号比较强的信道进行连接。由于所述信号比较强的信道中被其它信号占用的空间小,并且所述其它信号的强度弱。因此,所述信号比较强的信道的干扰小,通讯顺畅。所以,终端在进行Miracast连接时,会优先扫描Wi-Fi信号比较弱的信道,将所述信号最强的信道确定为优质信道,并获取所述优质信道的信道号。It can be understood by those skilled in the art that when the terminal is connected to Wi-Fi, a channel with a relatively strong Wi-Fi signal is preferentially selected for connection. The space occupied by other signals in the channel where the signal is relatively strong is small, and the strength of the other signals is weak. Therefore, the channel with a relatively strong signal has small interference and smooth communication. Therefore, when performing the Miracast connection, the terminal preferentially scans the channel with weak Wi-Fi signal, determines the channel with the strongest signal as the quality channel, and acquires the channel number of the high-quality channel.

以上仅为本发明的优选实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。The above are only the preferred embodiments of the present invention, and are not intended to limit the scope of the invention, and the equivalent structure or equivalent process transformations made by the description of the present invention and the drawings are directly or indirectly applied to other related technical fields. The same is included in the scope of patent protection of the present invention.

Claims (17)

一种无线直连连接方法,其特征在于,包括步骤:A wireless direct connection method, comprising the steps of: 在第一终端进入无线直连模式时,所述第一终端将本端的直连参数等级与预设的直连参数等级进行比对;When the first terminal enters the wireless direct connection mode, the first terminal compares the direct connection parameter level of the local terminal with the preset direct connection parameter level; 在本端的所述直连参数等级等于预设直连参数等级时,获取当前所在无线网络中干扰最小的信道对应的信道号;When the direct connection parameter level of the local end is equal to the preset direct connection parameter level, obtain the channel number corresponding to the channel with the least interference in the current wireless network; 所述第一终端根据所述信道号生成图形码,以供所述第二终端扫描所述图形码以获取所述信道号;The first terminal generates a graphic code according to the channel number, so that the second terminal scans the graphic code to obtain the channel number; 在接收到第二终端发送的直连请求后,所述第一终端检测无线直连模块是否启动;After receiving the direct connection request sent by the second terminal, the first terminal detects whether the wireless direct connection module is activated; 在所述无线直连模块未启动时,所述第一终端启动所述无线直连模块;When the wireless direct connection module is not activated, the first terminal starts the wireless direct connection module; 所述第一终端基于所述无线直连模块以及获取到的所述信道号建立与第二终端之间的无线直连连接。The first terminal establishes a wireless direct connection with the second terminal based on the wireless direct connection module and the obtained channel number. 一种无线直连连接方法,其特征在于,包括步骤:A wireless direct connection method, comprising the steps of: 在第一终端进入无线直连模式时,获取当前所在无线网络中干扰最小的信道对应的信道号;When the first terminal enters the wireless direct connection mode, the channel number corresponding to the channel with the least interference in the current wireless network is obtained; 所述第一终端根据所述信道号生成图形码,以供所述第二终端扫描所述图形码以获取所述信道号;The first terminal generates a graphic code according to the channel number, so that the second terminal scans the graphic code to obtain the channel number; 在接收到第二终端发送的直连请求后,所述第一终端根据所述信道号与第二终端进行无线直连连接。After receiving the direct connection request sent by the second terminal, the first terminal performs a wireless direct connection with the second terminal according to the channel number. 如权利要求2所述的无线直连连接方法,其特征在于,所述获取当前所在无线网络中干扰最小的信道对应的信道号的步骤包括:The wireless direct connection method according to claim 2, wherein the step of acquiring a channel number corresponding to a channel with the least interference in the currently located wireless network comprises: 所述第一终端扫描当前所在无线网络所有信道;The first terminal scans all channels of the current wireless network; 将所述信道内信号强度最强的信道作为所述干扰最小的信道,并获取所述干扰最小的信道对应的信道号。The channel with the strongest signal strength in the channel is used as the channel with the smallest interference, and the channel number corresponding to the channel with the least interference is obtained. 如权利要求2所述的无线直连连接方法,其特征在于,所述获取当前所在无线网络中干扰最小的信道对应的信道号的步骤之前,所述无线直连连接方法包括:The wireless direct connection method according to claim 2, wherein before the step of acquiring a channel number corresponding to a channel with the least interference in the current wireless network, the wireless direct connection method includes: 在所述第一终端进入无线直连模式时,所述第一终端将本端的直连参数等级与预设的直连参数等级进行比对;When the first terminal enters the wireless direct connection mode, the first terminal compares the direct connection parameter level of the local end with a preset direct connection parameter level; 在本端的所述直连参数等级等于预设直连参数等级时,执行获取当前所在无线网络中干扰最小的信道对应的信道号的步骤。When the direct connection parameter level of the local end is equal to the preset direct connection parameter level, the step of acquiring the channel number corresponding to the channel with the least interference in the current wireless network is performed. 如权利要求4所述的无线直连连接方法,其特征在于,所述获取当前所在无线网络中干扰最小的信道对应的信道号的步骤包括:The wireless direct connection method according to claim 4, wherein the step of acquiring a channel number corresponding to a channel with the least interference in the currently located wireless network comprises: 所述第一终端扫描当前所在无线网络所有信道;The first terminal scans all channels of the current wireless network; 将所述信道内信号强度最强的信道作为所述干扰最小的信道,并获取所述干扰最小的信道对应的信道号。The channel with the strongest signal strength in the channel is used as the channel with the smallest interference, and the channel number corresponding to the channel with the least interference is obtained. 如权利要求4所述的无线直连连接方法,其特征在于,所述第一终端将本端的直连参数等级与预设的直连参数等级进行比对的步骤之后,所述无线直连方法包括步骤:The wireless direct connection method according to claim 4, wherein after the step of comparing the direct connection parameter level of the local terminal with the preset direct connection parameter level, the wireless direct connection method Including steps: 在本端的所述直连参数等级小于预设直连参数等级时,所述第一终端广播直连请求;When the direct connection parameter level of the local end is less than a preset direct connection parameter level, the first terminal broadcasts a direct connection request; 所述第一终端显示图形码扫描界面;The first terminal displays a graphic code scanning interface; 在基于所述图形码扫描界面扫描到图形码时,所述第一终端对所述图形码进行解析以获取信道号;When scanning the graphic code based on the graphic code scanning interface, the first terminal parses the graphic code to obtain a channel number; 在接收到提供图形码的终端基于所述直连请求反馈的响应信息时,所述第一终端基于获取的所述信道号建立与所述提供所述图形码的终端之间的无线直连。Upon receiving the response information fed back by the direct connection request by the terminal providing the graphic code, the first terminal establishes a wireless direct connection with the terminal that provides the graphic code based on the acquired channel number. 如权利要求6所述的无线直连连接方法,其特征在于,所述获取当前所在无线网络中干扰最小的信道对应的信道号的步骤包括:The wireless direct connection method according to claim 6, wherein the step of acquiring a channel number corresponding to a channel with the least interference in the current wireless network includes: 所述第一终端扫描当前所在无线网络所有信道;The first terminal scans all channels of the current wireless network; 将所述信道内信号强度最强的信道作为所述干扰最小的信道,并获取所述干扰最小的信道对应的信道号。The channel with the strongest signal strength in the channel is used as the channel with the smallest interference, and the channel number corresponding to the channel with the least interference is obtained. 如权利要求2所述的无线直连连接方法,其特征在于,所述第一终端根据所述信道号与第二终端进行无线直连连接的步骤包括:The wireless direct connection method according to claim 2, wherein the step of the first terminal performing a wireless direct connection with the second terminal according to the channel number comprises: 所述第一终端检测无线直连模块是否启动;The first terminal detects whether the wireless direct connection module is activated; 在所述无线直连模块未启动时,所述第一终端启动所述无线直连模块;When the wireless direct connection module is not activated, the first terminal starts the wireless direct connection module; 所述第一终端基于所述无线直连模块以及获取到的所述信道号建立与第二终端之间的无线直连连接。The first terminal establishes a wireless direct connection with the second terminal based on the wireless direct connection module and the obtained channel number. 如权利要求8所述的无线直连连接方法,其特征在于,所述获取当前所在无线网络中干扰最小的信道对应的信道号的步骤包括:The wireless direct connection method according to claim 8, wherein the step of acquiring a channel number corresponding to a channel with the least interference in the currently located wireless network comprises: 所述第一终端扫描当前所在无线网络所有信道;The first terminal scans all channels of the current wireless network; 将所述信道内信号强度最强的信道作为所述干扰最小的信道,并获取所述干扰最小的信道对应的信道号。The channel with the strongest signal strength in the channel is used as the channel with the smallest interference, and the channel number corresponding to the channel with the least interference is obtained. 一种无线直连连接装置,其特征在于,包括:A wireless direct connection device, comprising: 获取模块,用于在其所在的第一终端进入无线直连模式时,获取当前所在无线网络中干扰最小的信道对应的信道号;An acquiring module, configured to acquire a channel number corresponding to a channel with the least interference in the current wireless network when the first terminal where the first terminal is located enters the wireless direct connection mode; 生成模块,用于根据所述信道号生成图形码,以供所述第二终端扫描所述图形码以获取所述信道号;a generating module, configured to generate a graphic code according to the channel number, for the second terminal to scan the graphic code to obtain the channel number; 连接模块,用于在接收到第二终端发送的直连请求后,所述第一终端根据所述信道号与第二终端进行无线直连连接。And a connection module, configured to: after receiving the direct connection request sent by the second terminal, the first terminal performs a wireless direct connection with the second terminal according to the channel number. 如权利要求10所述的无线直连连接装置,其特征在于,所述获取模块包括:The wireless direct connection device according to claim 10, wherein the obtaining module comprises: 扫描单元,用于扫描当前所在无线网络所有信道;a scanning unit for scanning all channels of the current wireless network; 获取单元,用于将所述信道内信号强度最强的信道作为所述干扰最小的信道,并获取所述干扰最小的信道对应的信道号。And an obtaining unit, configured to use a channel with the strongest signal strength in the channel as the channel with the smallest interference, and obtain a channel number corresponding to the channel with the least interference. 如权利要求10所述的无线直连连接装置,其特征在于,所述无线直连装置还包括:The wireless direct connection device of claim 10, wherein the wireless direct connection device further comprises: 比对模块,用于进入无线直连模式时,所述第一终端将本端的直连参数等级与预设的直连参数等级进行比对;When the comparison module is configured to enter the wireless direct connection mode, the first terminal compares the direct connection parameter level of the local end with the preset direct connection parameter level; 所述获取模块,还用于在本端的所述直连参数等级等于预设直连参数等级时,获取当前所在无线网络中干扰最小的信道对应的信道号。The acquiring module is further configured to: when the direct connection parameter level of the local end is equal to the preset direct connection parameter level, obtain a channel number corresponding to the channel with the least interference in the current wireless network. 如权利要求12所述的无线直连连接装置,其特征在于,所述获取模块包括:The wireless direct connection device according to claim 12, wherein the obtaining module comprises: 扫描单元,用于扫描当前所在无线网络所有信道;a scanning unit for scanning all channels of the current wireless network; 获取单元,用于将所述信道内信号强度最强的信道作为所述干扰最小的信道,并获取所述干扰最小的信道对应的信道号。And an obtaining unit, configured to use a channel with the strongest signal strength in the channel as the channel with the smallest interference, and obtain a channel number corresponding to the channel with the least interference. 如权利要求12所述的无线直连连接装置,其特征在于,所述无线直连装置还包括:The wireless direct connection device of claim 12, wherein the wireless direct connection device further comprises: 广播模块,用于在本端的所述直连参数等级小于预设直连参数等级时,广播直连请求;a broadcast module, configured to: when the direct connection parameter level of the local end is less than a preset direct connection parameter level, broadcast a direct connection request; 显示模块,用于显示图形码扫描界面;a display module for displaying a graphic code scanning interface; 解析模块,用于在基于所述图形码扫描界面扫描到图形码时,对所述图形码进行解析以获取信道号;a parsing module, configured to parse the graphic code to obtain a channel number when scanning the graphic code based on the graphic code scanning interface; 所述连接模块,还用于在接收到提供图形码的终端基于所述直连请求反馈的响应信息时,所述第一终端基于获取的所述信道号建立与所述提供所述图形码的终端之间的无线直连。The connection module is further configured to: when receiving, by the terminal providing the graphic code, the response information that is fed back based on the direct connection request, the first terminal establishes, according to the obtained channel number, the providing the graphic code Wireless direct connection between terminals. 如权利要求14所述的无线直连连接装置,其特征在于,所述获取模块包括:The wireless direct connection device according to claim 14, wherein the obtaining module comprises: 扫描单元,用于扫描当前所在无线网络所有信道;a scanning unit for scanning all channels of the current wireless network; 获取单元,用于将所述信道内信号强度最强的信道作为所述干扰最小的信道,并获取所述干扰最小的信道对应的信道号。And an obtaining unit, configured to use a channel with the strongest signal strength in the channel as the channel with the smallest interference, and obtain a channel number corresponding to the channel with the least interference. 如权利要求10所述的无线直连连接装置,其特征在于,所述连接模块包括:The wireless direct connection device according to claim 10, wherein the connection module comprises: 检测单元,用于检测无线直连模块是否启动;a detecting unit, configured to detect whether the wireless direct connection module is activated; 启动单元,用于在所述无线直连模块未启动时,启动所述无线直连模块;a startup unit, configured to start the wireless direct connection module when the wireless direct connection module is not activated; 连接单元,用于基于所述无线直连模块以及获取到的所述信道号建立与第二终端之间的无线直连连接。And a connecting unit, configured to establish a wireless direct connection with the second terminal based on the wireless direct connection module and the obtained channel number. 如权利要求16所述的无线直连连接装置,其特征在于,所述获取模块包括:The wireless direct connection device according to claim 16, wherein the obtaining module comprises: 扫描单元,用于扫描当前所在无线网络所有信道;a scanning unit for scanning all channels of the current wireless network; 获取单元,用于将所述信道内信号强度最强的信道作为所述干扰最小的信道,并获取所述干扰最小的信道对应的信道号。And an obtaining unit, configured to use a channel with the strongest signal strength in the channel as the channel with the smallest interference, and obtain a channel number corresponding to the channel with the least interference.
PCT/CN2016/084439 2015-10-15 2016-06-02 Method of establishing wireless direct connection and device utilizing same Ceased WO2017063369A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510666985.6A CN105392210B (en) 2015-10-15 2015-10-15 Wireless direct connection method and device
CN201510666985.6 2015-10-15

Publications (1)

Publication Number Publication Date
WO2017063369A1 true WO2017063369A1 (en) 2017-04-20

Family

ID=55423934

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/084439 Ceased WO2017063369A1 (en) 2015-10-15 2016-06-02 Method of establishing wireless direct connection and device utilizing same

Country Status (2)

Country Link
CN (1) CN105392210B (en)
WO (1) WO2017063369A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112566126A (en) * 2020-12-02 2021-03-26 支付宝(杭州)信息技术有限公司 Method, device and equipment for connecting equipment
EP4030794A3 (en) * 2021-06-08 2022-11-30 Apollo Intelligent Connectivity (Beijing) Technology Co., Ltd. Method and apparatus for interconnecting vehicle and machine

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105392210B (en) * 2015-10-15 2019-03-12 深圳Tcl数字技术有限公司 Wireless direct connection method and device
CN108243201A (en) * 2016-12-23 2018-07-03 乐视汽车(北京)有限公司 A kind of system and method for the interconnection of vehicle device and realization vehicle device and mobile terminal
CN106604403B (en) * 2017-01-12 2021-11-23 惠州Tcl移动通信有限公司 Miracast protocol-based channel selection method and system
WO2019095238A1 (en) 2017-11-16 2019-05-23 华为技术有限公司 Multi-carrier frequency selection method and related device
CN108055671B (en) * 2017-12-13 2021-11-09 深圳创维-Rgb电子有限公司 Multi-device communication method, device, equipment and storage medium
CN111065075B (en) * 2019-12-25 2021-06-01 郭晋华 M2M Internet of things improved communication method, equipment and system applied to new-generation information technology
CN113382457B (en) * 2021-05-17 2022-09-02 Tcl通讯(宁波)有限公司 WiFi P2P connection method and device, mobile terminal and storage medium
CN119520888A (en) * 2024-08-07 2025-02-25 海信视像科技股份有限公司 Display device and WiFi scanning control method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102547685A (en) * 2011-12-28 2012-07-04 Tcl王牌电器(惠州)有限公司 Building method of direct-linked chain, terminal and communication system
CN103369714A (en) * 2013-06-17 2013-10-23 华为技术有限公司 Method and device for establishing data connection and terminal equipment
CN103595798A (en) * 2013-11-14 2014-02-19 福州瑞芯微电子有限公司 Somatic sense sharing master/slave device and method based on WIFI Direct
US20140351444A1 (en) * 2013-05-22 2014-11-27 Emily H. Qi Systems and methods for enabling service interoperability functionality for wifi direct devices connected to a network via a wireless access point
CN105392210A (en) * 2015-10-15 2016-03-09 深圳Tcl数字技术有限公司 WiFi direct connecting method and WiFi direct connecting device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103067052A (en) * 2012-12-26 2013-04-24 上海合合信息科技发展有限公司 Method and system used for establishing bluetooth link and based on two-dimension bar code
US20140282923A1 (en) * 2013-03-14 2014-09-18 Motorola Mobility Llc Device security utilizing continually changing qr codes
CN103813473B (en) * 2014-01-17 2017-08-25 深圳市金立通信设备有限公司 A kind of communication means, terminal and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102547685A (en) * 2011-12-28 2012-07-04 Tcl王牌电器(惠州)有限公司 Building method of direct-linked chain, terminal and communication system
US20140351444A1 (en) * 2013-05-22 2014-11-27 Emily H. Qi Systems and methods for enabling service interoperability functionality for wifi direct devices connected to a network via a wireless access point
CN103369714A (en) * 2013-06-17 2013-10-23 华为技术有限公司 Method and device for establishing data connection and terminal equipment
CN103595798A (en) * 2013-11-14 2014-02-19 福州瑞芯微电子有限公司 Somatic sense sharing master/slave device and method based on WIFI Direct
CN105392210A (en) * 2015-10-15 2016-03-09 深圳Tcl数字技术有限公司 WiFi direct connecting method and WiFi direct connecting device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112566126A (en) * 2020-12-02 2021-03-26 支付宝(杭州)信息技术有限公司 Method, device and equipment for connecting equipment
EP4030794A3 (en) * 2021-06-08 2022-11-30 Apollo Intelligent Connectivity (Beijing) Technology Co., Ltd. Method and apparatus for interconnecting vehicle and machine

Also Published As

Publication number Publication date
CN105392210B (en) 2019-03-12
CN105392210A (en) 2016-03-09

Similar Documents

Publication Publication Date Title
WO2017063369A1 (en) Method of establishing wireless direct connection and device utilizing same
WO2019056752A1 (en) Household appliance network configuration method, device and system, and computer readable storage medium
WO2019051890A1 (en) Terminal control method and device, and computer-readable storage medium
WO2019062194A1 (en) Home appliance and method and system for controling home applicance and computer readable storage medium
WO2017082646A1 (en) Electronic device with metal frame antenna
WO2019051899A1 (en) Terminal control method and device, and storage medium
WO2019051895A1 (en) Terminal control method, device and storage medium
WO2015139639A1 (en) Method and apparatus for displaying application icons on terminal
WO2019019374A1 (en) Method, apparatus, and system for controlling household appliance with intelligent voice device
WO2017201899A1 (en) Method and apparatus for connecting to bluetooth device
WO2016017945A1 (en) Mobile device and method of pairing the same with electronic device
WO2016186373A1 (en) Apparatus and method for performing paging process in wireless communication system
WO2015158132A1 (en) Voice control method and system
WO2019051908A1 (en) Terminal control method and device, and computer readable storage medium
WO2019019340A1 (en) Application program page opening method and apparatus, terminal and readable storage medium
WO2020010671A1 (en) Display method and device, television set, and storage medium
WO2017111321A1 (en) Image display device
WO2016043404A1 (en) Multimedia apparatus, and method for processing audio signal thereof
WO2018000856A1 (en) Method implementing sdn overlay network message forwarding, terminal, apparatus, and computer readable storage medium
WO2019071762A1 (en) Floor positioning method and system, server and computer-readable storage medium
WO2018176864A1 (en) Database permission management method and system, device, computer-readable storage medium
WO2017088437A1 (en) Method and device for controlling switching of cameras of terminal by means of smart television
WO2017161702A1 (en) Method and system indicating washing machine status
WO2017185480A1 (en) Multi-screen interaction connection method, device and system
WO2017148028A1 (en) Remote network connection method and system based on smart television

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16854755

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 02.08.2018)

122 Ep: pct application non-entry in european phase

Ref document number: 16854755

Country of ref document: EP

Kind code of ref document: A1