[go: up one dir, main page]

CN114286424A - Switching connection method, terminal device and storage medium - Google Patents

Switching connection method, terminal device and storage medium Download PDF

Info

Publication number
CN114286424A
CN114286424A CN202111596476.2A CN202111596476A CN114286424A CN 114286424 A CN114286424 A CN 114286424A CN 202111596476 A CN202111596476 A CN 202111596476A CN 114286424 A CN114286424 A CN 114286424A
Authority
CN
China
Prior art keywords
wifi
terminal device
channel
target channel
hotspot
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.)
Pending
Application number
CN202111596476.2A
Other languages
Chinese (zh)
Inventor
解长涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xian Wingtech Information Technology Co Ltd
Original Assignee
Xian Wingtech Information 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 Xian Wingtech Information Technology Co Ltd filed Critical Xian Wingtech Information Technology Co Ltd
Priority to CN202111596476.2A priority Critical patent/CN114286424A/en
Publication of CN114286424A publication Critical patent/CN114286424A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Mobile Radio Communication Systems (AREA)
  • Telephone Function (AREA)

Abstract

The embodiment of the application discloses a method for changing a machine connection, a terminal device and a storage medium, which are used for calculating a target channel according to a plurality of wifi information of the surrounding environment, and then creating a wifi hotspot according to the target channel, so that the probability of the interference of the wifi hotspot is reduced. The method in the embodiment of the application comprises the following steps: the method comprises the steps that a first terminal device scans a plurality of wireless fidelity wifi of the surrounding environment to obtain a plurality of wifi information; the first terminal equipment calculates a target channel according to the wifi information; and the first terminal equipment creates a wifi hotspot according to the target channel, wherein the wifi hotspot is used for connecting the first terminal equipment and the second terminal equipment.

Description

换机连接的方法、终端设备及存储介质Switching connection method, terminal device and storage medium

技术领域technical field

本申请涉及终端设备领域,尤其涉及一种换机连接的方法、终端设备及存储介质。The present application relates to the field of terminal equipment, and in particular, to a method, terminal equipment and storage medium for switch connection.

背景技术Background technique

现有技术中,手机通过换机助手在创建无线保真(Wireless Fidelity,Wi-Fi)热点时,指定了固定的信道。这样一来,手机的传输速度就有可能受周围wifi复杂环境的影响。如果旧手机开的wifi热点的信道和周围某个wifi信号的信道有重叠,就会对其有干扰。In the prior art, a mobile phone specifies a fixed channel when creating a wireless fidelity (Wireless Fidelity, Wi-Fi) hotspot through a phone change assistant. In this way, the transmission speed of the mobile phone may be affected by the surrounding wifi complex environment. If the channel of the Wi-Fi hotspot opened by the old mobile phone overlaps with the channel of a surrounding Wi-Fi signal, it will interfere with it.

发明内容SUMMARY OF THE INVENTION

本申请实施例提供了一种换机连接的方法、终端设备及存储介质,用于根据周围环境的多个wifi信息,计算出目标信道,再根据该目标信道创建wifi热点,降低该wifi热点受到干扰的概率。Embodiments of the present application provide a method, terminal device and storage medium for switching connections, which are used to calculate a target channel according to multiple wifi information in the surrounding environment, and then create a wifi hotspot according to the target channel, so as to reduce the exposure of the wifi hotspot to the probability of interference.

本申请第一方面提供一种换机连接的方法,可以包括:第一终端设备扫描周围环境的多个无线保真wifi,获取多个wifi信息;所述第一终端设备根据所述多个wifi信息,计算出目标信道;所述第一终端设备根据所述目标信道,创建wifi热点,所述wifi热点用于所述第一终端设备和第二终端设备进行连接。A first aspect of the present application provides a method for switching connections, which may include: a first terminal device scans multiple wireless fidelity wifi in the surrounding environment to obtain multiple wifi information; information, and calculate the target channel; the first terminal device creates a wifi hotspot according to the target channel, and the wifi hotspot is used for the connection between the first terminal device and the second terminal device.

可选的,所述目标信道为干扰值最小的信道。Optionally, the target channel is the channel with the smallest interference value.

可选的,所述wifi热点为5G wifi热点或2.4G wifi热点。Optionally, the wifi hotspot is a 5G wifi hotspot or a 2.4G wifi hotspot.

可选的,所述第一终端设备根据所述目标信道,创建wifi热点,可以包括:判断所述第一终端设备是否支持5G,在所述第一终端设备支持5G的情况下,所述第一终端设备根据所述目标信道,创建5G wifi热点;在所述第一终端设备不支持5G的情况下,所述第一终端设备根据所述目标信道,创建2.4G wifi热点。Optionally, creating a wifi hotspot by the first terminal device according to the target channel may include: judging whether the first terminal device supports 5G, and in the case that the first terminal device supports 5G, the first terminal device supports 5G. A terminal device creates a 5G wifi hotspot according to the target channel; if the first terminal device does not support 5G, the first terminal device creates a 2.4G wifi hotspot according to the target channel.

可选的,所述多个无线保真wifi信息包括多个wifi信道标识和多个wifi信道带宽,所述第一终端设备根据所述多个wifi信息,计算出目标信道,可以包括:所述第一终端设备根据所述多个wifi信道标识和所述多个wifi信道带宽,计算出目标信道。Optionally, the multiple Wi-Fi information includes multiple WiFi channel identifiers and multiple WiFi channel bandwidths, and the first terminal device calculates the target channel according to the multiple WiFi information, which may include: the The first terminal device calculates the target channel according to the multiple wifi channel identifiers and the multiple wifi channel bandwidths.

可选的,所述多个无线保真wifi信息包括多个wifi信道标识、多个wifi信道带宽,以及多个wifi信号强度,所述第一终端设备根据所述多个wifi信息,计算出目标信道,可以包括:所述第一终端设备根据所述多个wifi信道标识、所述多个wifi信道带宽,以及多个wifi信号强度,计算出目标信道。Optionally, the multiple Wi-Fi information includes multiple WiFi channel identifiers, multiple WiFi channel bandwidths, and multiple WiFi signal strengths, and the first terminal device calculates the target according to the multiple WiFi information. The channel may include: the first terminal device calculates the target channel according to the multiple wifi channel identifiers, the multiple wifi channel bandwidths, and the multiple wifi signal strengths.

可选的,所述第一终端设备根据所述多个wifi信息,计算出目标信道,可以包括:所述第一终端设备根据所述多个wifi信息,选出使用率最小的信道,作为目标信道。Optionally, calculating, by the first terminal device, the target channel according to the plurality of wifi information may include: the first terminal device selecting, according to the plurality of wifi information, the channel with the smallest usage rate as the target. channel.

可选的,所述方法还包括:Optionally, the method further includes:

在所述第二终端设备通过所述wifi热点,与所述第一终端设备已连接的情况下,所述第一终端设备响应用户传输数据的操作,向所述第二终端设备发送数据。When the second terminal device is connected to the first terminal device through the wifi hotspot, the first terminal device sends data to the second terminal device in response to the user's operation of transmitting data.

可选的,所述数据包括通讯录、照片、视频、软件、短信、通话记录、书签、音乐和日程中的至少一项。Optionally, the data includes at least one of contacts, photos, videos, software, text messages, call records, bookmarks, music, and schedules.

本申请第二方面提供一种终端设备,可以包括:A second aspect of the present application provides a terminal device, which may include:

获取模块,用于扫描周围环境的多个无线保真wifi,获取多个wifi信息;The acquisition module is used to scan multiple wireless fidelity wifi in the surrounding environment and obtain multiple wifi information;

处理模块,用于根据所述多个wifi信息,计算出目标信道;根据所述目标信道,创建wifi热点,所述wifi热点用于所述第一终端设备和第二终端设备进行连接。The processing module is configured to calculate a target channel according to the plurality of wifi information; create a wifi hotspot according to the target channel, and the wifi hotspot is used for the connection between the first terminal device and the second terminal device.

可选的,所述目标信道为干扰值最小的信道。Optionally, the target channel is the channel with the smallest interference value.

可选的,所述wifi热点为5G wifi热点或2.4G wifi热点。Optionally, the wifi hotspot is a 5G wifi hotspot or a 2.4G wifi hotspot.

可选的,所述处理模块,具体用于判断所述第一终端设备是否支持5G,在所述第一终端设备支持5G的情况下,所述第一终端设备根据所述目标信道,创建5G wifi热点;在所述第一终端设备不支持5G的情况下,所述第一终端设备根据所述目标信道,创建2.4G wifi热点。Optionally, the processing module is specifically configured to determine whether the first terminal device supports 5G, and in the case that the first terminal device supports 5G, the first terminal device creates a 5G according to the target channel. wifi hotspot; if the first terminal device does not support 5G, the first terminal device creates a 2.4G wifi hotspot according to the target channel.

可选的,所述多个无线保真wifi信息包括多个wifi信道标识和多个wifi信道带宽,所述处理模块,具体用于根据所述多个wifi信道标识和所述多个wifi信道带宽,计算出目标信道。Optionally, the multiple wireless fidelity WiFi information includes multiple WiFi channel identifiers and multiple WiFi channel bandwidths, and the processing module is specifically configured to, according to the multiple WiFi channel identifiers and the multiple WiFi channel bandwidths , calculate the target channel.

可选的,所述多个无线保真wifi信息包括多个wifi信道标识、多个wifi信道带宽,以及多个wifi信号强度,所述处理模块,具体用于根据所述多个wifi信道标识、所述多个wifi信道带宽,以及多个wifi信号强度,计算出目标信道。Optionally, the multiple Wi-Fi information includes multiple WiFi channel identifiers, multiple WiFi channel bandwidths, and multiple WiFi signal strengths, and the processing module is specifically configured to, according to the multiple WiFi channel identifiers, The multiple wifi channel bandwidths and multiple wifi signal strengths are used to calculate the target channel.

可选的,所述处理模块,具体用于根据所述多个wifi信息,选出使用率最小的信道,作为目标信道。Optionally, the processing module is specifically configured to select the channel with the smallest usage rate as the target channel according to the multiple wifi information.

可选的,所述终端设备还包括:Optionally, the terminal device further includes:

发送模块,用于在所述第二终端设备通过所述wifi热点,与所述第一终端设备已连接的情况下,响应用户传输数据的操作,向所述第二终端设备发送数据。The sending module is configured to send data to the second terminal device in response to the user's operation of transmitting data when the second terminal device has been connected to the first terminal device through the wifi hotspot.

可选的,所述数据包括通讯录、照片、视频、软件、短信、通话记录、书签、音乐和日程中的至少一项。Optionally, the data includes at least one of contacts, photos, videos, software, text messages, call records, bookmarks, music, and schedules.

本申请第三方面提供一种终端设备,可以包括:A third aspect of the present application provides a terminal device, which may include:

存储有可执行程序代码的存储器;a memory in which executable program code is stored;

与所述存储器耦合的处理器和收发器;a processor and a transceiver coupled to the memory;

所述处理器,用于扫描周围环境的多个无线保真wifi,获取多个wifi信息;根据所述多个wifi信息,计算出目标信道;根据所述目标信道,创建wifi热点,所述wifi热点用于所述第一终端设备和第二终端设备进行连接。The processor is used for scanning a plurality of wireless fidelity wifi in the surrounding environment to obtain a plurality of wifi information; calculating a target channel according to the plurality of wifi information; creating a wifi hotspot according to the target channel, the wifi A hotspot is used for the connection between the first terminal device and the second terminal device.

可选的,所述目标信道为干扰值最小的信道。Optionally, the target channel is the channel with the smallest interference value.

可选的,所述wifi热点为5G wifi热点或2.4G wifi热点。Optionally, the wifi hotspot is a 5G wifi hotspot or a 2.4G wifi hotspot.

可选的,所述处理器,具体用于判断所述第一终端设备是否支持5G,在所述第一终端设备支持5G的情况下,所述第一终端设备根据所述目标信道,创建5G wifi热点;在所述第一终端设备不支持5G的情况下,所述第一终端设备根据所述目标信道,创建2.4G wifi热点。Optionally, the processor is specifically configured to determine whether the first terminal device supports 5G, and in the case that the first terminal device supports 5G, the first terminal device creates a 5G according to the target channel. wifi hotspot; if the first terminal device does not support 5G, the first terminal device creates a 2.4G wifi hotspot according to the target channel.

可选的,所述多个无线保真wifi信息包括多个wifi信道标识和多个wifi信道带宽,所述处理器,具体用于根据所述多个wifi信道标识和所述多个wifi信道带宽,计算出目标信道。Optionally, the multiple wireless fidelity WiFi information includes multiple WiFi channel identifiers and multiple WiFi channel bandwidths, and the processor is specifically configured to, according to the multiple WiFi channel identifiers and the multiple WiFi channel bandwidths , calculate the target channel.

可选的,所述多个无线保真wifi信息包括多个wifi信道标识、多个wifi信道带宽,以及多个wifi信号强度,所述处理器,具体用于根据所述多个wifi信道标识、所述多个wifi信道带宽,以及多个wifi信号强度,计算出目标信道。Optionally, the multiple wireless fidelity WiFi information includes multiple WiFi channel identifiers, multiple WiFi channel bandwidths, and multiple WiFi signal strengths, and the processor is specifically configured to, according to the multiple WiFi channel identifiers, The multiple wifi channel bandwidths and multiple wifi signal strengths are used to calculate the target channel.

可选的,所述处理器,具体用于根据所述多个wifi信息,选出使用率最小的信道,作为目标信道。Optionally, the processor is specifically configured to select, according to the multiple pieces of wifi information, the channel with the smallest usage rate as the target channel.

可选的,所述收发器,用于在所述第二终端设备通过所述wifi热点,与所述第一终端设备已连接的情况下,响应用户传输数据的操作,向所述第二终端设备发送数据。Optionally, the transceiver is configured to respond to the user's operation of transmitting data to the second terminal when the second terminal device has been connected to the first terminal device through the wifi hotspot. The device sends data.

可选的,所述数据包括通讯录、照片、视频、软件、短信、通话记录、书签、音乐和日程中的至少一项。Optionally, the data includes at least one of contacts, photos, videos, software, text messages, call records, bookmarks, music, and schedules.

本申请实施例第四方面提供一种计算机可读存储介质,包括指令,当其在处理器上运行时,使得处理器执行本申请第一方面所述的方法。A fourth aspect of the embodiments of the present application provides a computer-readable storage medium, including instructions, which, when executed on a processor, cause the processor to execute the method described in the first aspect of the present application.

本发明实施例又一方面公开一种计算机程序产品,当所述计算机程序产品在计算机上运行时,使得所述计算机执行本申请第一方面所述的方法。Another aspect of the embodiments of the present invention discloses a computer program product, which when the computer program product runs on a computer, causes the computer to execute the method described in the first aspect of the present application.

本发明实施例又一方面公开一种应用发布平台,所述应用发布平台用于发布计算机程序产品,其中,当所述计算机程序产品在计算机上运行时,使得所述计算机执行本申请第一方面所述的方法。In yet another aspect of the embodiments of the present invention, an application publishing platform is disclosed, and the application publishing platform is used for publishing a computer program product, wherein when the computer program product runs on a computer, the computer is made to execute the first aspect of the present application the method described.

从以上技术方案可以看出,本申请实施例具有以下优点:As can be seen from the above technical solutions, the embodiments of the present application have the following advantages:

第一终端设备扫描周围环境的多个无线保真wifi,获取多个wifi信息;所述第一终端设备根据所述多个wifi信息,计算出目标信道;所述第一终端设备根据所述目标信道,创建wifi热点,所述wifi热点用于所述第一终端设备和第二终端设备进行连接。相比于现有技术设置的固定wifi信道来说,本申请实施例中,第一终端设备可以根据周围环境的多个wifi信息,计算出目标信道,再根据该目标信道创建wifi热点,创建出的该wifi热点是结合周围环境得到的,从而,降低了该wifi热点受到干扰的概率。The first terminal device scans a plurality of wireless fidelity wifi in the surrounding environment to obtain a plurality of wifi information; the first terminal device calculates a target channel according to the plurality of wifi information; the first terminal device calculates a target channel according to the target channel, create a wifi hotspot, and the wifi hotspot is used for the connection between the first terminal device and the second terminal device. Compared with the fixed wifi channel set in the prior art, in the embodiment of the present application, the first terminal device can calculate a target channel according to multiple wifi information of the surrounding environment, and then create a wifi hotspot according to the target channel to create a wifi hotspot. The wifi hotspot is obtained in combination with the surrounding environment, thereby reducing the probability of the wifi hotspot being interfered.

附图说明Description of drawings

为了更清楚地说明本申请实施例技术方案,下面将对实施例和现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,还可以根据这些附图获得其它的附图。In order to illustrate the technical solutions of the embodiments of the present application more clearly, the following will briefly introduce the accompanying drawings that need to be used in the description of the embodiments and the prior art. Obviously, the drawings in the following description are only some implementations of the present application. For example, other drawings may also be obtained from these drawings.

图1A为通过旧手机创建wifi P2P热点供新手机连接的一个示意图;FIG. 1A is a schematic diagram of creating a wifi P2P hotspot through an old mobile phone for the connection of a new mobile phone;

图1B为新手机和旧手机建立连接后,传输数据的一个示意图;1B is a schematic diagram of data transmission after the new mobile phone and the old mobile phone are connected;

图1C为wifi热点的信道和其他wifi信号的信道有重叠的一个示意图;Fig. 1C is a schematic diagram showing that the channel of the wifi hotspot and the channels of other wifi signals overlap;

图2为本申请实施例中换机连接的方法的一个实施例示意图;2 is a schematic diagram of an embodiment of a method for switching and connecting in an embodiment of the present application;

图3A为本申请实施例中终端设备计算目标信道的一个示意图;3A is a schematic diagram of a terminal device calculating a target channel in an embodiment of the present application;

图3B为本申请实施例中第二终端设备连接第一终端设备wifi热点的一个示意图;3B is a schematic diagram of a second terminal device connecting to a WiFi hotspot of the first terminal device in an embodiment of the present application;

图3C为本申请实施例中第一终端设备向第二终端设备传输数据的一个示意图;3C is a schematic diagram of data transmission from a first terminal device to a second terminal device in an embodiment of the present application;

图4为本申请实施例中换机连接的方法的一个实施例示意图;4 is a schematic diagram of an embodiment of a method for switching and connecting in an embodiment of the present application;

图5A为本申请实施例中终端设备的一个实施例示意图;5A is a schematic diagram of an embodiment of a terminal device in an embodiment of the present application;

图5B为本申请实施例中终端设备的一个实施例示意图;FIG. 5B is a schematic diagram of an embodiment of a terminal device in an embodiment of the present application;

图6为本申请实施例中终端设备的另一个实施例示意图。FIG. 6 is a schematic diagram of another embodiment of a terminal device in an embodiment of the present application.

具体实施方式Detailed ways

本申请实施例提供了一种换机连接的方法、终端设备及存储介质,用于根据周围环境的多个wifi信息,计算出目标信道,再根据该目标信道创建wifi热点,降低该wifi热点受到干扰的概率。Embodiments of the present application provide a method, terminal device and storage medium for switching connections, which are used to calculate a target channel according to multiple wifi information in the surrounding environment, and then create a wifi hotspot according to the target channel, so as to reduce the exposure of the wifi hotspot to the probability of interference.

为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述,显然,所描述的实施例仅仅是本申请一部分的实施例,而不是全部的实施例。基于本申请中的实施例,都应当属于本申请保护的范围。In order to make those skilled in the art better understand the solutions of the present application, the technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the present application. examples, but not all examples. Based on the embodiments in this application, all should belong to the scope of protection of this application.

下面先对本申请所涉及的一些术语做一个简要的说明,如下所示:The following is a brief description of some terms involved in this application, as follows:

Wi-Fi:无线保真(Wireless Fidelity,Wi-Fi)是一种可以将个人电脑、手持设备(如掌上电脑(Personal Digital Assistant,PDA)、手机)等终端以无线方式互相连接的技术。Wi-Fi是一个无线网路通信技术的品牌,由Wi-Fi联盟(Wi-Fi Alliance)所持有。Wi-Fi也可以写为wifi。Wi-Fi: Wireless Fidelity (Wireless Fidelity, Wi-Fi) is a technology that can wirelessly connect terminals such as personal computers, handheld devices (such as PDAs (Personal Digital Assistant, PDA), mobile phones) to each other. Wi-Fi is a brand of wireless network communication technology held by the Wi-Fi Alliance (Wi-Fi Alliance). Wi-Fi can also be written as wifi.

Wi-Fi Direct:是一种全新的技术,即使在没有传统的Wi-Fi网络或Wi-Fi接入点的环境中,仍然能够在诸如智能手机和数码相机等设备间实现点对点Wi-Fi连接。Wi-Fi Direct: is a new technology that enables peer-to-peer Wi-Fi connections between devices such as smartphones and digital cameras, even in environments without traditional Wi-Fi networks or Wi-Fi access points .

P2P:是英文Peer-to-Peer(对等)的简称,又被称为“点对点”。“对等”技术,是一种网络新技术,依赖网络中参与者的计算能力和带宽,而不是把依赖都聚集在较少的几台服务器上。P2P还是英文Point to Point(点对点)的简称。P2P: is the abbreviation of English Peer-to-Peer (peer-to-peer), also known as "peer-to-peer". "Peer-to-peer" technology is a new network technology that relies on the computing power and bandwidth of the participants in the network, rather than clustering dependencies on a few servers. P2P is also the abbreviation of Point to Point in English.

信道:也称作通道(Channel)、频段,是以无线信号(例如电磁波)作为传输载体的数据信号传送通道。无线网络(路由器、接入点(AccessPoint,AP)热点、电脑无线网卡)可在多个信道上运行。在无线信号覆盖范围内的各种无线网络设备应该尽量使用不同的信道,以避免信号之间的干扰。Channel: Also known as channel and frequency band, it is a data signal transmission channel that uses wireless signals (such as electromagnetic waves) as a transmission carrier. Wireless networks (routers, Access Point (AP) hotspots, computer wireless network cards) can operate on multiple channels. Various wireless network devices within the coverage of wireless signals should try to use different channels to avoid interference between signals.

5G Wi-Fi:(802.11ac)是指运行在5GHz无线电波频段,且采用802.11ac协议的Wi-Fi。更高的无线传输速度是5G Wi-Fi的最大特征。业界认为,5GWi-Fi的入门级速度是433Mbps,这至少是Wi-Fi速率的三倍,一些高性能的5G Wi-Fi还能达到1Gbps以上。5G Wi-Fi: (802.11ac) refers to Wi-Fi operating in the 5GHz radio wave band and using the 802.11ac protocol. Higher wireless transmission speed is the biggest feature of 5G Wi-Fi. The industry believes that the entry-level speed of 5G Wi-Fi is 433Mbps, which is at least three times the rate of Wi-Fi, and some high-performance 5G Wi-Fi can reach more than 1Gbps.

换机助手是一款便捷的手机资料迁移工具。该软件可以通过调用手机创建热点,进行两部手机之间匹配连接,实现安卓苹果跨平台、免流量、高保密、批量极速传输手机资料。换机助手的运行实现原理基本上都是通过旧手机开启Wi-Fi热点或者Wi-Fi P2P热点,新手机连接旧手机开启的热点,然后通过套接字(socket)技术来传输文件的。通过Wi-Fi传输,不仅比蓝牙等方式传输稳定,而且速度也较快。Switch Assistant is a convenient mobile phone data migration tool. The software can create a hotspot by calling a mobile phone, and perform a matching connection between two mobile phones to achieve cross-platform, traffic-free, high-secrecy, and batch-speed transfer of mobile phone data between Android and Apple. The operating principle of the replacement assistant is basically to open the Wi-Fi hotspot or Wi-Fi P2P hotspot through the old mobile phone, and the new mobile phone connects to the hotspot opened by the old mobile phone, and then transmits files through socket technology. Transmission through Wi-Fi is not only stable, but also faster than other methods such as Bluetooth.

在现有技术中,以目前市面上主流的换机助手为例,如图1A所示,为通过旧手机创建wifi P2P热点供新手机连接的一个示意图。旧手机创建wifi P2P热点(热点名带DIRECT的是P2P,反之为普通wifi)然后供新手机去扫描连接,然后开始传输。如图1B所示,为新手机和旧手机建立连接后,传输数据的一个示意图。在旧手机创建Wi-Fi P2P热点的时候,是直接创建的,如下代码:In the prior art, taking the current mainstream mobile phone replacement assistants as an example, as shown in FIG. 1A , it is a schematic diagram of creating a wifi P2P hotspot through an old mobile phone for connecting a new mobile phone. The old mobile phone creates a wifi P2P hotspot (the hotspot name with DIRECT is P2P, and vice versa is normal wifi) and then the new mobile phone scans the connection, and then starts transmission. As shown in Figure 1B, a schematic diagram of data transmission after establishing a connection between the new mobile phone and the old mobile phone. When the old mobile phone creates a Wi-Fi P2P hotspot, it is created directly, with the following code:

Reflect.invokeMethod(manager,"setWifiP2pChannels",channel,0,6,null);//设置信道Reflect.invokeMethod(manager,"setWifiP2pChannels",channel,0,6,null);//Set the channel

manager.createGroup(channel,listener);//创建2.4G wifi热点manager.createGroup(channel,listener);//Create 2.4G wifi hotspot

从上面创建Wi-Fi P2P热点代码中可知,这里面指定了一个固定的信道,Wi-FiP2P热点是2.4G wifi热点,信道为6。From the above code to create a Wi-Fi P2P hotspot, it can be seen that a fixed channel is specified here. The Wi-FiP2P hotspot is a 2.4G wifi hotspot, and the channel is 6.

现有技术中,在创建wifi热点时,指定了固定的信道。这样一来,手机的传输速度就有可能受周围wifi复杂环境的影响。如果旧手机开的wifi热点的信道和周围某个wifi信号的信道有重叠,就会对其有干扰。如图1C所示,为wifi热点的信道和其他wifi信号的信道有重叠的一个示意图。In the prior art, when creating a wifi hotspot, a fixed channel is specified. In this way, the transmission speed of the mobile phone may be affected by the surrounding wifi complex environment. If the channel of the Wi-Fi hotspot opened by the old mobile phone overlaps with the channel of a surrounding Wi-Fi signal, it will interfere with it. As shown in FIG. 1C , a schematic diagram showing that the channel of the wifi hotspot overlaps with the channels of other wifi signals.

从图1C中,可以看到在2.4G wifi中,其中1、6、11这三个信道之间是完全没有交叠的,也就是人们常说的三个不互相重叠的信道。每个信道20MHz带宽,图1C中也很容易看清楚其他各信道之间频谱重叠的情况。另外,如果设备支持,除1、6、11三个一组互不干扰的信道外,还有2、7、12;3、8、13;4、9、14三组互不干扰的信道。From Figure 1C, it can be seen that in 2.4G wifi, the three channels 1, 6, and 11 do not overlap at all, that is, the three channels that people often say do not overlap each other. Each channel has a 20MHz bandwidth, and it is easy to see the spectral overlap between other channels in Figure 1C. In addition, if the device supports it, in addition to the three groups of channels 1, 6, and 11 that do not interfere with each other, there are also three groups of channels 2, 7, 12; 3, 8, 13; 4, 9, and 14 that do not interfere with each other.

在本申请实施例中,终端设备可以部署在陆地上,包括室内或室外、手持、穿戴或车载;也可以部署在水面上(如轮船等);还可以部署在空中(例如飞机、气球和卫星上等)。In this embodiment of the present application, the terminal device can be deployed on land, including indoor or outdoor, handheld, wearable, or vehicle-mounted; it can also be deployed on water (such as ships, etc.); it can also be deployed in the air (such as airplanes, balloons, and satellites) superior).

在本申请实施例中,终端设备可以是手机(Mobile Phone)、平板电脑(Pad)、带无线收发功能的电脑、虚拟现实(Virtual Reality,VR)终端设备、增强现实(AugmentedReality,AR)终端设备、工业控制(industrial control)中的无线终端设备、无人驾驶(self driving)中的无线终端设备、远程医疗(remote medical)中的无线终端设备、智能电网(smart grid)中的无线终端设备、运输安全(transportation safety)中的无线终端设备、智慧城市(smart city)中的无线终端设备或智慧家庭(smart home)中的无线终端设备等。In this embodiment of the present application, the terminal device may be a mobile phone (Mobile Phone), a tablet computer (Pad), a computer with a wireless transceiver function, a virtual reality (Virtual Reality, VR) terminal device, and an augmented reality (Augmented Reality, AR) terminal device , wireless terminal equipment in industrial control, wireless terminal equipment in self driving, wireless terminal equipment in remote medical, wireless terminal equipment in smart grid, Wireless terminal equipment in transportation safety, wireless terminal equipment in smart city or wireless terminal equipment in smart home, etc.

作为示例而非限定,在本申请实施例中,该终端设备还可以是可穿戴设备。可穿戴设备也可以称为穿戴式智能设备,是应用穿戴式技术对日常穿戴进行智能化设计、开发出可以穿戴的设备的总称,如眼镜、手套、手表、服饰及鞋等。可穿戴设备即直接穿在身上,或是整合到用户的衣服或配件的一种便携式设备。可穿戴设备不仅仅是一种硬件设备,更是通过软件支持以及数据交互、云端交互来实现强大的功能。广义穿戴式智能设备包括功能全、尺寸大、可不依赖智能手机实现完整或者部分的功能,例如:智能手表或智能眼镜等,以及只专注于某一类应用功能,需要和其它设备如智能手机配合使用,如各类进行体征监测的智能手环、智能首饰等。As an example and not a limitation, in this embodiment of the present application, the terminal device may also be a wearable device. Wearable devices can also be called wearable smart devices, which are the general term for the intelligent design of daily wear and the development of wearable devices using wearable technology, such as glasses, gloves, watches, clothing and shoes. A wearable device is a portable device that is worn directly on the body or integrated into the user's clothing or accessories. Wearable device is not only a hardware device, but also realizes powerful functions through software support, data interaction, and cloud interaction. In a broad sense, wearable smart devices include full-featured, large-scale, complete or partial functions without relying on smart phones, such as smart watches or smart glasses, and only focus on a certain type of application function, which needs to cooperate with other devices such as smart phones. Use, such as all kinds of smart bracelets, smart jewelry, etc. for physical sign monitoring.

下面以实施例的方式,对本申请技术方案做进一步的说明,如图2所示,为本申请实施例中换机连接的方法的一个实施例示意图。可以包括:The technical solution of the present application will be further described below by way of embodiments. As shown in FIG. 2 , it is a schematic diagram of an embodiment of the method for switching and connecting in the embodiment of the present application. Can include:

201、第一终端设备扫描周围环境的多个wifi,获取多个wifi信息。201. The first terminal device scans multiple wifis in the surrounding environment to obtain multiple wifi information.

需要说明的是,本申请实施例应用于换机助手应用程序(application,APP)中。即第一终端设备和第二终端设备都需要安装换机助手APP。It should be noted that the embodiments of the present application are applied to a switch assistant application (application, APP). That is, both the first terminal device and the second terminal device need to install the switch assistant APP.

可选的,第一终端设备扫描周围环境的多个wifi,获取多个wifi信息,可以包括:第一终端设备响应用户打开无线局域网的操作,搜索扫描周围环境的wifi,获取多个wifi信息。Optionally, the first terminal device scans multiple wifi in the surrounding environment to obtain multiple wifi information, which may include: the first terminal device responds to the user's operation of opening the wireless local area network, searches and scans the wifi in the surrounding environment, and obtains multiple wifi information.

可选的,每个wifi信息可以包括:每个wifi信道标识和每个wifi信道带宽。Optionally, each wifi information may include: each wifi channel identifier and each wifi channel bandwidth.

可选的,每个wifi信息还可以包括:每个wifi信号强度,每个wifi传输速率等信息。Optionally, each wifi information may further include: each wifi signal strength, each wifi transmission rate and other information.

可以理解的是,周围环境指的是第一终端设备在当前坐在位置,可以搜索到的范围内的环境。而且,这里第一终端设备扫描获取周围环境的多个wifi信息,并不是为了连接某个wifi。It can be understood that the surrounding environment refers to an environment within a range that can be searched by the current sitting position of the first terminal device. Moreover, here the first terminal device scans to obtain multiple wifi information of the surrounding environment, not for connecting to a certain wifi.

示例性的,第一终端设备以旧手机,第二终端设备以新手机为例进行说明。旧手机先扫描周围环境中的wifi情况,获取wifi信息,可以通过如下代码实现:Exemplarily, the first terminal device is an old mobile phone, and the second terminal device is a new mobile phone as an example for description. The old mobile phone first scans the wifi situation in the surrounding environment to obtain wifi information, which can be achieved by the following code:

Figure BDA0003431372960000081
Figure BDA0003431372960000081

202、所述第一终端设备根据所述多个wifi信息,计算出目标信道。202. The first terminal device calculates a target channel according to the plurality of wifi information.

可选的,所述目标信道为干扰值最小的信道。Optionally, the target channel is the channel with the smallest interference value.

可选的,所述多个wifi信息包括多个wifi信道标识和多个wifi信道带宽,所述第一终端设备根据所述多个wifi信息,计算出目标信道,可以包括:所述第一终端设备根据所述多个wifi信道标识和所述多个wifi信道带宽,计算出目标信道。Optionally, the multiple wifi information includes multiple wifi channel identifiers and multiple wifi channel bandwidths, and the first terminal device calculates the target channel according to the multiple wifi information, which may include: the first terminal The device calculates the target channel according to the multiple wifi channel identifiers and the multiple wifi channel bandwidths.

可选的,所述多个wifi信息包括多个wifi信道标识、多个wifi信道带宽,以及多个wifi信号强度,所述第一终端设备根据所述多个wifi信息,计算出目标信道,可以包括:所述第一终端设备根据所述多个wifi信道标识、所述多个wifi信道带宽,以及多个wifi信号强度,计算出目标信道。Optionally, the multiple WiFi information includes multiple WiFi channel identifiers, multiple WiFi channel bandwidths, and multiple WiFi signal strengths, and the first terminal device calculates the target channel according to the multiple WiFi information, which may be The method includes: calculating, by the first terminal device, a target channel according to the plurality of wifi channel identifiers, the plurality of wifi channel bandwidths, and the plurality of wifi signal strengths.

可选的,所述第一终端设备根据所述多个wifi信息,计算出目标信道,可以包括:所述第一终端设备根据所述多个wifi信息,通过预设算法计算出目标信道。即第一终端设备拿到周围环境中每个wifi信息后,通过算法比较计算出此处环境中的最佳wifi信道。Optionally, calculating, by the first terminal device, the target channel according to the plurality of wifi information may include: calculating, by the first terminal device, the target channel through a preset algorithm according to the plurality of wifi information. That is, after obtaining each wifi information in the surrounding environment, the first terminal device calculates the best wifi channel in the environment through algorithm comparison.

可选的,所述第一终端设备根据所述多个wifi信息,计算出目标信道,可以包括:所述第一终端设备根据所述多个wifi信息,选出使用率最小的信道,作为目标信道。即所述第一终端设备根据所述多个wifi信息,计算每个wifi信道的使用率,从中选择出使用率最小的信道,即为目标信道。Optionally, calculating, by the first terminal device, the target channel according to the plurality of wifi information may include: the first terminal device selecting, according to the plurality of wifi information, the channel with the smallest usage rate as the target. channel. That is, the first terminal device calculates the usage rate of each wifi channel according to the multiple wifi information, and selects the channel with the smallest usage rate, which is the target channel.

可以理解的是,第一终端设备可以根据所述多个wifi信息,选出5G wifi信道和2.4G wifi信道;从5G wifi信道中选出使用率最小的信道,即为目标信道,从2.4G wifi信道中选出使用率最小的信道,即为目标信道,所以,这里的目标信道包括5G目标信道和2.4G目标信道。根据第一终端设备是否支持5G,从而,创建对应的wifi热点。It can be understood that the first terminal device can select a 5G wifi channel and a 2.4G wifi channel according to the multiple wifi information; select the channel with the lowest usage rate from the 5G wifi channels, which is the target channel, and the channel from 2.4G The channel with the least usage rate is selected from the wifi channel, which is the target channel. Therefore, the target channel here includes the 5G target channel and the 2.4G target channel. According to whether the first terminal device supports 5G, a corresponding wifi hotspot is created.

如图3A所示,为本申请实施例中终端设备计算目标信道的一个示意图。示例性的,终端设备扫描到的所有信道如下所示:As shown in FIG. 3A , it is a schematic diagram of calculating a target channel by a terminal device in an embodiment of the present application. Exemplarily, all the channels scanned by the terminal device are as follows:

5G信道={36,40,44,48,52,56,60,64,149,153,157,161,165};5G channel = {36, 40, 44, 48, 52, 56, 60, 64, 149, 153, 157, 161, 165};

2.4G信道={1,2,3,4,5,6,7,8,9,10,11,12,13}。2.4G channel = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13}.

旧手机根据多个wifi信息,计算出目标信道,可以通过如下代码实现:The old mobile phone calculates the target channel according to multiple wifi information, which can be achieved by the following code:

Figure BDA0003431372960000091
Figure BDA0003431372960000091

Figure BDA0003431372960000101
Figure BDA0003431372960000101

Figure BDA0003431372960000111
Figure BDA0003431372960000111

203、所述第一终端设备根据所述目标信道,创建wifi热点,所述wifi热点用于所述第一终端设备和第二终端设备进行连接。203. The first terminal device creates a wifi hotspot according to the target channel, where the wifi hotspot is used to connect the first terminal device and the second terminal device.

可选的,所述wifi热点为5G wifi热点或2.4G wifi热点。Optionally, the wifi hotspot is a 5G wifi hotspot or a 2.4G wifi hotspot.

可选的,所述第一终端设备根据所述目标信道,创建wifi热点,可以包括:判断所述第一终端设备是否支持5G,在所述第一终端设备支持5G的情况下,所述第一终端设备根据所述目标信道,创建5G wifi热点;在所述第一终端设备不支持5G的情况下,所述第一终端设备根据所述目标信道,创建2.4G wifi热点。5G wifi比2.4G wifi传输速率要高好几倍。Optionally, creating a wifi hotspot by the first terminal device according to the target channel may include: judging whether the first terminal device supports 5G, and in the case that the first terminal device supports 5G, the first terminal device supports 5G. A terminal device creates a 5G wifi hotspot according to the target channel; if the first terminal device does not support 5G, the first terminal device creates a 2.4G wifi hotspot according to the target channel. The transmission rate of 5G wifi is several times higher than that of 2.4G wifi.

可选的,所述第一终端设备的系统为安卓系统或苹果系统等,所述第二终端设备的系统为安卓系统或苹果系统等。即本申请实施例可以应用于跨系统的终端设备,例如:第一终端设备和第二终端设备的系统分别为安卓系统和安卓系统,或,安卓系统和苹果系统,或,苹果系统和安卓系统,或,苹果系统和苹果系统,双系统互通无障碍。Optionally, the system of the first terminal device is an Android system or an Apple system, and the system of the second terminal device is an Android system or an Apple system. That is, the embodiments of the present application can be applied to cross-system terminal devices, for example: the systems of the first terminal device and the second terminal device are respectively the Android system and the Android system, or the Android system and the Apple system, or the Apple system and the Android system , or, Apple system and Apple system, the two systems can communicate with each other without barriers.

可以理解的是,本申请实施例中的wifi热点也可以称为Wi-Fi P2P热点。旧手机在创建wifi热点之前,先扫描一遍周围环境中的wifi,并获取到每个wifi信息,例如信道带宽、信号强度,从而计算出最佳信道,即该最佳信道是即将创建的wifi热点的信道。然后动态的设置wifi热点,来提高此wifi热点的稳定性和传输速度。It can be understood that, the wifi hotspot in this embodiment of the present application may also be referred to as a Wi-Fi P2P hotspot. Before creating a wifi hotspot, the old mobile phone scans the wifi in the surrounding environment and obtains each wifi information, such as channel bandwidth and signal strength, so as to calculate the best channel, that is, the best channel is the wifi hotspot to be created. Channel. Then dynamically set the wifi hotspot to improve the stability and transmission speed of this wifi hotspot.

示例性的,旧手机设置信道创建wifi热点,可以通过如下代码实现:Exemplarily, the old mobile phone sets the channel to create a wifi hotspot, which can be implemented by the following code:

Figure BDA0003431372960000121
Figure BDA0003431372960000121

上面传入的frequency则为步骤202中计算出来的目标信道,也可以称为最佳信道。The frequency passed in above is the target channel calculated in step 202, which may also be called the optimal channel.

Figure BDA0003431372960000122
Figure BDA0003431372960000122

在本申请实施例中,第一终端设备扫描周围环境的多个无线保真wifi,获取多个wifi信息;所述第一终端设备根据所述多个wifi信息,计算出目标信道;所述第一终端设备根据所述目标信道,创建wifi热点,所述wifi热点用于所述第一终端设备和第二终端设备进行连接。相比于现有技术设置的固定wifi信道来说,本申请实施例中,第一终端设备可以根据周围环境的多个wifi信息,计算出目标信道,再根据该目标信道创建wifi热点,创建出的该wifi热点是结合周围环境得到的,从而,降低了该wifi热点受到干扰的概率。In the embodiment of the present application, the first terminal device scans multiple wireless fidelity WiFis in the surrounding environment to obtain multiple WiFi information; the first terminal device calculates the target channel according to the multiple WiFi information; the first terminal device calculates the target channel according to the multiple WiFi information. A terminal device creates a wifi hotspot according to the target channel, and the wifi hotspot is used to connect the first terminal device and the second terminal device. Compared with the fixed wifi channel set in the prior art, in the embodiment of the present application, the first terminal device can calculate a target channel according to multiple wifi information of the surrounding environment, and then create a wifi hotspot according to the target channel to create a wifi hotspot. The wifi hotspot is obtained in combination with the surrounding environment, thereby reducing the probability of the wifi hotspot being interfered.

如图4所示,为本申请实施例中换机连接的方法的一个实施例示意图。As shown in FIG. 4 , it is a schematic diagram of an embodiment of a method for switching and connecting in an embodiment of the present application.

可以包括:Can include:

401、第一终端设备扫描周围环境的多个wifi,获取多个wifi信息。401. The first terminal device scans multiple wifis in the surrounding environment to obtain multiple wifi information.

402、所述第一终端设备根据所述多个wifi信息,计算出目标信道。402. The first terminal device calculates a target channel according to the multiple pieces of wifi information.

403、所述第一终端设备根据所述目标信道,创建wifi热点,所述wifi热点用于所述第一终端设备和第二终端设备进行连接。403. The first terminal device creates a wifi hotspot according to the target channel, where the wifi hotspot is used to connect the first terminal device and the second terminal device.

需要说明的是,步骤401-403与图2所示实施例中的步骤201-203类似,此处不再赘述。It should be noted that steps 401-403 are similar to steps 201-203 in the embodiment shown in FIG. 2 , and details are not repeated here.

404、在所述第二终端设备通过所述wifi热点,与所述第一终端设备已连接的情况下,所述第一终端设备响应用户传输数据的操作,向所述第二终端设备发送数据。404. In the case that the second terminal device is connected to the first terminal device through the wifi hotspot, the first terminal device responds to the user's operation of transmitting data, and sends data to the second terminal device .

可以理解的是,第二终端设备可以连接第一终端设备开启的wifi热点,从而接收从第一终端设备传输的数据。It can be understood that the second terminal device can connect to the wifi hotspot opened by the first terminal device, so as to receive data transmitted from the first terminal device.

可选的,若所述wifi热点为5G wifi热点,第二终端设备可以连接该5Gwifi热点,从而,第一终端设备可以向第二终端设备传输数据。若所述wifi热点为2.4G wifi热点,第二终端设备可以连接该2.4G wifi热点,从而,第一终端设备可以向第二终端设备传输数据。Optionally, if the wifi hotspot is a 5G wifi hotspot, the second terminal device can connect to the 5G wifi hotspot, so that the first terminal device can transmit data to the second terminal device. If the wifi hotspot is a 2.4G wifi hotspot, the second terminal device can connect to the 2.4G wifi hotspot, so that the first terminal device can transmit data to the second terminal device.

可选的,第一终端设备根据目标信道创建wifi热点后,可以在显示界面上生成关于该wifi热点的二维码、三维码或四维码等,第二终端设备可以响应用户的扫描操作,扫描第一终端设备显示界面上显示的二维码、三维码或四维码等,连接该wifi热点。或者,第二终端设备可以响应用户的扫描操作,显示该wifi热点,再响应用户的连接操作,连接该wifi热点。第二终端设备连接第一终端设备该wifi热点的操作,可以包括但不限于上述的实现方式,此处不再赘述。示例性的,如图3B所示,为本申请实施例中第二终端设备连接第一终端设备wifi热点的一个示意图。Optionally, after the first terminal device creates a wifi hotspot according to the target channel, it can generate a two-dimensional code, three-dimensional code or four-dimensional code, etc. about the wifi hotspot on the display interface, and the second terminal device can respond to the user's scanning operation and scan the hotspot. The first terminal device displays the two-dimensional code, three-dimensional code, or four-dimensional code, etc. displayed on the interface to connect to the wifi hotspot. Alternatively, the second terminal device may display the wifi hotspot in response to the user's scanning operation, and then connect to the wifi hotspot in response to the user's connection operation. The operation of connecting the second terminal device to the wifi hotspot of the first terminal device may include, but is not limited to, the above-mentioned implementations, which will not be repeated here. Exemplarily, as shown in FIG. 3B , it is a schematic diagram of a second terminal device connecting to a wifi hotspot of the first terminal device in this embodiment of the present application.

可选的,所述数据包括通讯录、照片、视频、软件、短信、通话记录、书签、音乐和日程中的至少一项。Optionally, the data includes at least one of contacts, photos, videos, software, text messages, call records, bookmarks, music, and schedules.

需要说明的是,第一终端设备和第二终端设备之间传输数据,是免流量的;即利用手机近场热点连接,不耗费网络流量,免数据线隔空互传。进一步的,终端设备之间传输的数据类型是多样化的。例如:传输的数据可以包括通讯录、照片、视频、软件、短信、通话记录、音乐、日程等等,多种数据类型都可以覆盖。而且,容易操作,旧手机和新手机都显示操作步骤标识,可以通几个步骤就完成数据传输。数据传输的保密性也较高,因为是双机直接连接,无需经过第三方云端传输,所以可以避免数据泄露,从而全面保护手机隐私。It should be noted that the data transmission between the first terminal device and the second terminal device is free of traffic; that is, the near-field hotspot connection of the mobile phone is used, network traffic is not consumed, and data lines are not transmitted to each other through the air. Further, the types of data transmitted between terminal devices are diverse. For example, the transmitted data can include contacts, photos, videos, software, text messages, call records, music, schedules, etc., and various data types can be covered. Moreover, it is easy to operate. Both the old mobile phone and the new mobile phone display the operation step logo, and the data transfer can be completed in a few steps. The confidentiality of data transmission is also high. Because it is a direct connection between two devices, it does not need to be transmitted through a third-party cloud, so data leakage can be avoided, thereby comprehensively protecting the privacy of mobile phones.

可选的,第一终端设备向第二终端设备发送数据的时候,可以批量全选,也可以部分勾选,可以根据用户的实际需求而定,此处不再赘述。示例性的,如图3C所示,为本申请实施例中第一终端设备向第二终端设备传输数据的一个示意图。Optionally, when the first terminal device sends data to the second terminal device, it can select all in batches, or select part of it, which can be determined according to the actual needs of the user, which will not be repeated here. Exemplarily, as shown in FIG. 3C , it is a schematic diagram of data transmission from a first terminal device to a second terminal device in an embodiment of the present application.

可选的,第一终端设备向第二终端设备传输数据时,显示传输的数据的占用空间,从而可以帮助用户决定是批量全选还是部分勾选。Optionally, when the first terminal device transmits data to the second terminal device, the space occupied by the transmitted data is displayed, so as to help the user decide whether to select all or part of them in batches.

可选的,第二终端设备可以显示传输数据的百分比,显示传输数据的文件类型,显示剩余存储空间,以及显示传输数据的占用大小中的至少一项。Optionally, the second terminal device may display at least one of the percentage of the transmitted data, the file type of the transmitted data, the remaining storage space, and the occupied size of the transmitted data.

需要说明的是,在本申请实施例中,可以根据软件应用程序提示,允许终端设备授权换机助手wifi权限,因近场热点连接技术需关闭wifi,断开wifi属正常现象,传输过程属免流量传输,不消耗网络流量;还可以根据软件应用程序提示,允许授权换机助手对通讯录、照片、日历等相关数据的访问权限,才能正常读取数据进行选择传输;还可以根据软件应用程序提示,允许授权换机助手对摄像头的访问权限,才能正常进行扫码连接操作(例如新手机扫描旧手机生成关于wifi热点的二维码,从而连接新手机的wifi热点)。It should be noted that, in the embodiment of the present application, the terminal device can be allowed to authorize the Wi-Fi permission of the switch assistant according to the prompt of the software application. Due to the near-field hotspot connection technology, Wi-Fi needs to be turned off. Disconnecting Wi-Fi is a normal phenomenon, and the transmission process is free. Traffic transmission does not consume network traffic; according to the software application prompts, it is also possible to authorize the switch assistant to access related data such as contacts, photos, calendars, etc., in order to read the data normally for selection and transmission; it can also be selected according to the software application. Prompt, allow the authorized replacement assistant to access the camera, in order to perform the scan code connection operation normally (for example, the new mobile phone scans the old mobile phone to generate a QR code about the wifi hotspot, so as to connect to the wifi hotspot of the new mobile phone).

在本申请实施例中,第一终端设备扫描周围环境的多个无线保真wifi,获取多个wifi信息;所述第一终端设备根据所述多个wifi信息,计算出目标信道;所述第一终端设备根据所述目标信道,创建wifi热点,所述wifi热点用于所述第一终端设备和第二终端设备进行连接;在所述第二终端设备通过所述wifi热点,与所述第一终端设备已连接的情况下,所述第一终端设备响应用户传输数据的操作,向所述第二终端设备发送数据。相比于现有技术设置的固定wifi信道来说,本申请实施例中,第一终端设备可以根据周围环境的多个wifi信息,计算出目标信道,再根据该目标信道创建wifi热点,与第二终端设备进行wifi热点链接,因为创建出的该wifi热点是结合周围环境得到的,从而,降低了该wifi热点受到干扰的概率。动态的设置wifi热点的信道,可以极大的降低周围环境对此wifi热点信号的干扰,从而极大的提高换机助手传输的速度以及传输的稳定性。In the embodiment of the present application, the first terminal device scans multiple wireless fidelity WiFis in the surrounding environment to obtain multiple WiFi information; the first terminal device calculates the target channel according to the multiple WiFi information; the first terminal device calculates the target channel according to the multiple WiFi information. A terminal device creates a wifi hotspot according to the target channel, and the wifi hotspot is used for the connection between the first terminal device and the second terminal device; the second terminal device communicates with the first terminal device through the wifi hotspot. When a terminal device is connected, the first terminal device sends data to the second terminal device in response to the user's operation of transmitting data. Compared with the fixed wifi channel set in the prior art, in the embodiment of the present application, the first terminal device can calculate a target channel according to multiple wifi information of the surrounding environment, and then create a wifi hotspot according to the target channel, which is the same as the first terminal device. The two terminal devices perform a wifi hotspot link, because the created wifi hotspot is obtained in combination with the surrounding environment, thereby reducing the probability of the wifi hotspot being interfered. Dynamically setting the channel of the wifi hotspot can greatly reduce the interference of the surrounding environment to the wifi hotspot signal, thereby greatly improving the transmission speed and transmission stability of the switch assistant.

如图5A所示,为本申请实施例中终端设备的一个实施例示意图,可以包括:As shown in FIG. 5A , it is a schematic diagram of an embodiment of a terminal device in an embodiment of the present application, which may include:

获取模块501,用于扫描周围环境的多个无线保真wifi,获取多个wifi信息;The acquisition module 501 is used for scanning multiple wireless fidelity wifi in the surrounding environment to obtain multiple wifi information;

处理模块502,用于根据所述多个wifi信息,计算出目标信道;根据所述目标信道,创建wifi热点,所述wifi热点用于所述第一终端设备和第二终端设备进行连接。The processing module 502 is configured to calculate a target channel according to the plurality of wifi information; and create a wifi hotspot according to the target channel, and the wifi hotspot is used for the connection between the first terminal device and the second terminal device.

可选的,所述目标信道为干扰值最小的信道。Optionally, the target channel is the channel with the smallest interference value.

可选的,所述wifi热点为5G wifi热点或2.4G wifi热点。Optionally, the wifi hotspot is a 5G wifi hotspot or a 2.4G wifi hotspot.

可选的,处理模块502,具体用于判断所述第一终端设备是否支持5G,在所述第一终端设备支持5G的情况下,所述第一终端设备根据所述目标信道,创建5G wifi热点;在所述第一终端设备不支持5G的情况下,根据所述目标信道,创建2.4G wifi热点。Optionally, the processing module 502 is specifically configured to determine whether the first terminal device supports 5G, and in the case that the first terminal device supports 5G, the first terminal device creates a 5G wifi according to the target channel. Hotspot; if the first terminal device does not support 5G, create a 2.4G wifi hotspot according to the target channel.

可选的,所述多个无线保真wifi信息包括多个wifi信道标识和多个wifi信道带宽,处理模块502,具体用于根据所述多个wifi信道标识和所述多个wifi信道带宽,计算出目标信道。Optionally, the multiple Wi-Fi information includes multiple WiFi channel identifiers and multiple WiFi channel bandwidths. The processing module 502 is specifically configured to, according to the multiple WiFi channel identifiers and the multiple WiFi channel bandwidths, Calculate the target channel.

可选的,所述多个无线保真wifi信息包括多个wifi信道标识、多个wifi信道带宽,以及多个wifi信号强度,处理模块502,具体用于根据所述多个wifi信道标识、所述多个wifi信道带宽,以及多个wifi信号强度,计算出目标信道。Optionally, the multiple wireless fidelity WiFi information includes multiple WiFi channel identifiers, multiple WiFi channel bandwidths, and multiple WiFi signal strengths. The processing module 502 is specifically configured to, according to the multiple WiFi channel identifiers, The target channel is calculated based on the multiple WiFi channel bandwidths and multiple WiFi signal strengths.

可选的,处理模块502,具体用于根据所述多个wifi信息,选出使用率最小的信道,作为目标信道。Optionally, the processing module 502 is specifically configured to select the channel with the smallest usage rate as the target channel according to the multiple wifi information.

可选的,如图5B所示,为本申请实施例中终端设备的一个实施例示意图,所述终端设备还包括:Optionally, as shown in FIG. 5B , which is a schematic diagram of an embodiment of a terminal device in an embodiment of the present application, the terminal device further includes:

发送模块503,用于在所述第二终端设备通过所述wifi热点,与所述第一终端设备已连接的情况下,响应用户传输数据的操作,向所述第二终端设备发送数据。The sending module 503 is configured to send data to the second terminal device in response to the user's operation of transmitting data when the second terminal device is connected to the first terminal device through the wifi hotspot.

可选的,所述数据包括通讯录、照片、视频、软件、短信、通话记录、书签、音乐和日程中的至少一项。Optionally, the data includes at least one of contacts, photos, videos, software, text messages, call records, bookmarks, music, and schedules.

如图6所示,为本申请实施例中终端设备的另一个实施例示意图。图6示出的是与本发明实施例提供的终端设备相关的手机的部分结构的框图。参考图6,手机包括:射频(Radio Frequency,RF)电路610、存储器620、输入单元630、显示单元640、传感器650、音频电路660、无线保真(wireless fidelity,Wi-Fi)模块670、处理器680、以及电源690等部件。本领域技术人员可以理解,图6中示出的手机结构并不构成对手机的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。As shown in FIG. 6 , it is a schematic diagram of another embodiment of the terminal device in the embodiment of the present application. FIG. 6 is a block diagram showing a partial structure of a mobile phone related to a terminal device provided by an embodiment of the present invention. 6 , the mobile phone includes: a radio frequency (RF) circuit 610, a memory 620, an input unit 630, a display unit 640, a sensor 650, an audio circuit 660, a wireless fidelity (Wi-Fi) module 670, a processing 680, and the power supply 690 and other components. Those skilled in the art can understand that the structure of the mobile phone shown in FIG. 6 does not constitute a limitation on the mobile phone, and may include more or less components than the one shown, or combine some components, or arrange different components.

下面结合图6对手机的各个构成部件进行具体的介绍:Below in conjunction with Figure 6, the various components of the mobile phone are introduced in detail:

RF电路610可用于收发信息或通话过程中,信号的接收和发送,特别地,将基站的下行信息接收后,给处理器680处理;另外,将设计上行的数据发送给基站。通常,RF电路610包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器(Low NoiseAmplifier,LNA)、双工器等。此外,RF电路610还可以通过无线通信与网络和其他设备通信。上述无线通信可以使用任一通信标准或协议,包括但不限于全球移动通讯系统(GlobalSystem of Mobile communication,GSM)、通用分组无线服务(General Packet RadioService,GPRS)、码分多址(Code Division Multiple Access,CDMA)、宽带码分多址(Wideband Code Division Multiple Access,WCDMA)、长期演进(Long Term Evolution,LTE)、电子邮件、短消息服务(Short Messaging Service,SMS)等。The RF circuit 610 can be used for receiving and sending signals during transmission and reception of information or during a call. In particular, after receiving the downlink information of the base station, it is processed by the processor 680; in addition, the designed uplink data is sent to the base station. Typically, the RF circuit 610 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like. In addition, RF circuitry 610 may communicate with networks and other devices via wireless communications. The above-mentioned wireless communication can use any communication standard or protocol, including but not limited to Global System of Mobile Communication (GSM), General Packet Radio Service (General Packet Radio Service, GPRS), Code Division Multiple Access (Code Division Multiple Access) , CDMA), Wideband Code Division Multiple Access (Wideband Code Division Multiple Access, WCDMA), Long Term Evolution (Long Term Evolution, LTE), email, Short Messaging Service (Short Messaging Service, SMS) and the like.

存储器620可用于存储软件程序以及模块,处理器680通过运行存储在存储器620的软件程序以及模块,从而执行手机的各种功能应用以及数据处理。存储器620可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据手机的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器620可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。The memory 620 can be used to store software programs and modules, and the processor 680 executes various functional applications and data processing of the mobile phone by running the software programs and modules stored in the memory 620 . The memory 620 may mainly include a stored program area and a stored data area, wherein the stored program area may store an operating system, an application program (such as a sound playback function, an image playback function, etc.) required for at least one function, and the like; Data created by the use of the mobile phone (such as audio data, phone book, etc.), etc. Additionally, memory 620 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.

输入单元630可用于接收输入的数字或字符信息,以及产生与手机的用户设置以及功能控制有关的键信号输入。具体地,输入单元630可包括触控面板631以及其他输入设备632。触控面板631,也称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板631上或在触控面板631附近的操作),并根据预先设定的程式驱动相应的连接装置。可选的,触控面板631可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器680,并能接收处理器680发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触控面板631。除了触控面板631,输入单元630还可以包括其他输入设备632。具体地,其他输入设备632可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆等中的一种或多种。The input unit 630 may be used for receiving inputted numerical or character information, and generating key signal input related to user setting and function control of the mobile phone. Specifically, the input unit 630 may include a touch panel 631 and other input devices 632 . The touch panel 631, also referred to as a touch screen, can collect the user's touch operations on or near it (such as the user's finger, stylus, etc., any suitable object or attachment on or near the touch panel 631). operation), and drive the corresponding connection device according to the preset program. Optionally, the touch panel 631 may include two parts, a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and then sends it to the touch controller. To the processor 680, and can receive the commands sent by the processor 680 and execute them. In addition, the touch panel 631 can be realized by various types of resistive, capacitive, infrared, and surface acoustic waves. Besides the touch panel 631 , the input unit 630 may further include other input devices 632 . Specifically, other input devices 632 may include, but are not limited to, one or more of physical keyboards, function keys (such as volume control keys, switch keys, etc.), trackballs, mice, joysticks, and the like.

显示单元640可用于显示由用户输入的信息或提供给用户的信息以及手机的各种菜单。显示单元640可包括显示面板641,可选的,可以采用液晶显示器(Liquid CrystalDisplay,LCD)、有机发光二极管(Organic Light-Emitting Diode,OLED)等形式来配置显示面板641。进一步的,触控面板631可覆盖显示面板641,当触控面板631检测到在其上或附近的触摸操作后,传送给处理器680以确定触摸事件的类型,随后处理器680根据触摸事件的类型在显示面板641上提供相应的视觉输出。虽然在图6中,触控面板631与显示面板641是作为两个独立的部件来实现手机的输入和输入功能,但是在某些实施例中,可以将触控面板631与显示面板641集成而实现手机的输入和输出功能。The display unit 640 may be used to display information input by the user or information provided to the user and various menus of the mobile phone. The display unit 640 may include a display panel 641. Optionally, the display panel 641 may be configured in the form of a liquid crystal display (Liquid Crystal Display, LCD), an organic light-emitting diode (Organic Light-Emitting Diode, OLED), or the like. Further, the touch panel 631 can cover the display panel 641, and when the touch panel 631 detects a touch operation on or near it, it transmits it to the processor 680 to determine the type of the touch event, and then the processor 680 determines the type of the touch event according to the touch event. Type provides corresponding visual output on display panel 641 . Although in FIG. 6, the touch panel 631 and the display panel 641 are used as two independent components to realize the input and input functions of the mobile phone, in some embodiments, the touch panel 631 and the display panel 641 can be integrated to form Realize the input and output functions of the mobile phone.

手机还可包括至少一种传感器650,比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板641的亮度,接近传感器可在手机移动到耳边时,关闭显示面板641和/或背光。作为运动传感器的一种,加速计传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别手机姿态的应用(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;至于手机还可配置的陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器,在此不再赘述。The cell phone may also include at least one sensor 650, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 641 according to the brightness of the ambient light, and the proximity sensor may turn off the display panel 641 and/or when the mobile phone is moved to the ear. or backlight. As a kind of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in all directions (usually three axes), and can detect the magnitude and direction of gravity when it is stationary. games, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for other sensors such as gyroscope, barometer, hygrometer, thermometer, infrared sensor, etc. Repeat.

音频电路660、扬声器661,传声器662可提供用户与手机之间的音频接口。音频电路660可将接收到的音频数据转换后的电信号,传输到扬声器661,由扬声器661转换为声音信号输出;另一方面,传声器662将收集的声音信号转换为电信号,由音频电路660接收后转换为音频数据,再将音频数据输出处理器680处理后,经RF电路610以发送给比如另一手机,或者将音频数据输出至存储器620以便进一步处理。The audio circuit 660, the speaker 661, and the microphone 662 can provide an audio interface between the user and the mobile phone. The audio circuit 660 can transmit the received audio data converted electrical signal to the speaker 661, and the speaker 661 converts it into a sound signal for output; on the other hand, the microphone 662 converts the collected sound signal into an electrical signal, which is converted by the audio circuit 660 After receiving, it is converted into audio data, and then the audio data is output to the processor 680 for processing, and then sent to, for example, another mobile phone through the RF circuit 610, or the audio data is output to the memory 620 for further processing.

Wi-Fi属于短距离无线传输技术,手机通过Wi-Fi模块670可以帮助用户收发电子邮件、浏览网页和访问流式媒体等,它为用户提供了无线的宽带互联网访问。虽然图6示出了Wi-Fi模块670,但是可以理解的是,其并不属于手机的必须构成,完全可以根据需要在不改变发明的本质的范围内而省略。Wi-Fi is a short-distance wireless transmission technology. The mobile phone can help users to send and receive emails, browse web pages, and access streaming media through the Wi-Fi module 670. It provides users with wireless broadband Internet access. Although FIG. 6 shows the Wi-Fi module 670, it can be understood that it is not an essential component of the mobile phone, and can be completely omitted as required within the scope of not changing the essence of the invention.

处理器680是手机的控制中心,利用各种接口和线路连接整个手机的各个部分,通过运行或执行存储在存储器620内的软件程序和/或模块,以及调用存储在存储器620内的数据,执行手机的各种功能和处理数据,从而对手机进行整体监控。可选的,处理器680可包括一个或多个处理单元;优选的,处理器680可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器680中。The processor 680 is the control center of the mobile phone, using various interfaces and lines to connect various parts of the entire mobile phone, by running or executing the software programs and/or modules stored in the memory 620, and calling the data stored in the memory 620. Various functions of the mobile phone and processing data, so as to monitor the mobile phone as a whole. Optionally, the processor 680 may include one or more processing units; preferably, the processor 680 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, etc. , the modem processor mainly deals with wireless communication. It can be understood that, the above-mentioned modulation and demodulation processor may not be integrated into the processor 680 .

手机还包括给各个部件供电的电源690(比如电池),优选的,电源可以通过电源管理系统与处理器680逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。The mobile phone also includes a power supply 690 (such as a battery) for supplying power to various components. Preferably, the power supply can be logically connected to the processor 680 through a power management system, so as to manage charging, discharging, and power consumption management functions through the power management system.

尽管未示出,手机还可以包括摄像头、蓝牙模块等,在此不再赘述。Although not shown, the mobile phone may also include a camera, a Bluetooth module, and the like, which will not be repeated here.

在本发明实施例中,处理器680,用于扫描周围环境的多个无线保真wifi,获取多个wifi信息;根据所述多个wifi信息,计算出目标信道;根据所述目标信道,创建wifi热点,所述wifi热点用于所述第一终端设备和第二终端设备进行连接。In this embodiment of the present invention, the processor 680 is configured to scan multiple wireless fidelity wifi in the surrounding environment to obtain multiple wifi information; calculate a target channel according to the multiple wifi information; create a target channel according to the target channel A wifi hotspot, the wifi hotspot is used for the connection between the first terminal device and the second terminal device.

可选的,所述目标信道为干扰值最小的信道。Optionally, the target channel is the channel with the smallest interference value.

可选的,所述wifi热点为5G wifi热点或2.4G wifi热点。Optionally, the wifi hotspot is a 5G wifi hotspot or a 2.4G wifi hotspot.

可选的,处理器680,具体用于判断所述第一终端设备是否支持5G,在所述第一终端设备支持5G的情况下,所述第一终端设备根据所述目标信道,创建5G wifi热点;在所述第一终端设备不支持5G的情况下,所述第一终端设备根据所述目标信道,创建2.4G wifi热点。Optionally, the processor 680 is specifically configured to determine whether the first terminal device supports 5G, and in the case that the first terminal device supports 5G, the first terminal device creates a 5G wifi according to the target channel. Hotspot; if the first terminal device does not support 5G, the first terminal device creates a 2.4G wifi hotspot according to the target channel.

可选的,所述多个无线保真wifi信息包括多个wifi信道标识和多个wifi信道带宽,处理器680,具体用于根据所述多个wifi信道标识和所述多个wifi信道带宽,计算出目标信道。Optionally, the multiple Wi-Fi information includes multiple WiFi channel identifiers and multiple WiFi channel bandwidths. The processor 680 is specifically configured to, according to the multiple WiFi channel identifiers and the multiple WiFi channel bandwidths, Calculate the target channel.

可选的,所述多个无线保真wifi信息包括多个wifi信道标识、多个wifi信道带宽,以及多个wifi信号强度,处理器680,具体用于根据所述多个wifi信道标识、所述多个wifi信道带宽,以及多个wifi信号强度,计算出目标信道。Optionally, the multiple wireless fidelity wifi information includes multiple wifi channel identifiers, multiple wifi channel bandwidths, and multiple wifi signal strengths. The processor 680 is specifically configured to, according to the multiple wifi channel identifiers, The target channel is calculated based on the multiple WiFi channel bandwidths and multiple WiFi signal strengths.

可选的,处理器680,具体用于根据所述多个wifi信息,选出使用率最小的信道,作为目标信道。Optionally, the processor 680 is specifically configured to select the channel with the smallest usage rate as the target channel according to the multiple wifi information.

可选的,RF电路610,用于在所述第二终端设备通过所述wifi热点,与所述第一终端设备已连接的情况下,响应用户传输数据的操作,向所述第二终端设备发送数据。Optionally, the RF circuit 610 is configured to respond to the user's operation of transmitting data to the second terminal device when the second terminal device has been connected to the first terminal device through the wifi hotspot send data.

可选的,所述数据包括通讯录、照片、视频、软件、短信、通话记录、书签、音乐和日程中的至少一项。Optionally, the data includes at least one of contacts, photos, videos, software, text messages, call records, bookmarks, music, and schedules.

在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本发明实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(Digital Subscriber Line,DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存储的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘Solid State Disk(SSD))等。In the above-mentioned embodiments, it may be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented in software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer may be a general purpose computer, special purpose computer, computer network, or other programmable device. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be downloaded from a website site, computer, server, or data center The transmission is carried out to another website site, computer, server or data center by wire (eg coaxial cable, optical fiber, Digital Subscriber Line, DSL) or wireless (eg infrared, wireless, microwave, etc.). The computer-readable storage medium may be any available medium that can be stored by a computer or a data storage device such as a server, a data center, etc. that includes one or more available media integrated. The usable media may be magnetic media (eg, floppy disks, hard disks, magnetic tapes), optical media (eg, DVDs), or semiconductor media (eg, Solid State Disk (SSD)), among others.

所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system, device and unit described above may refer to the corresponding process in the foregoing method embodiments, which will not be repeated here.

在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.

所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.

另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.

所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-OnlyMemory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。The integrated unit, if implemented in the form of a software functional unit and sold or used as an independent product, may be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the present application can be embodied in the form of software products in essence, or the parts that contribute to the prior art, or all or part of the technical solutions, and the computer software products are stored in a storage medium , including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: U disk, removable hard disk, Read-Only Memory (ROM, Read-Only Memory), Random Access Memory (RAM, Random Access Memory), magnetic disk or optical disk and other media that can store program codes.

以上所述,以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。As mentioned above, the above embodiments are only used to illustrate the technical solutions of the present application, but not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand: The technical solutions described in the embodiments are modified, or some technical features thereof are equivalently replaced; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions in the embodiments of the present application.

Claims (10)

1. A method for connecting a switch, comprising:
the method comprises the steps that a first terminal device scans a plurality of wireless fidelity wifi of the surrounding environment to obtain a plurality of wifi information;
the first terminal equipment calculates a target channel according to the wifi information;
and the first terminal equipment creates a wifi hotspot according to the target channel, wherein the wifi hotspot is used for connecting the first terminal equipment and the second terminal equipment.
2. The method of claim 1, wherein the target channel is a channel with a minimum interference value.
3. The method according to claim 1 or 2, wherein the first terminal device creates a wifi hotspot according to the target channel, and comprises:
judging whether the first terminal equipment supports 5G or not, and under the condition that the first terminal equipment supports 5G, the first terminal equipment creates a 5G wifi hotspot according to the target channel;
and under the condition that the first terminal equipment does not support 5G, the first terminal equipment creates a 2.4G wifi hotspot according to the target channel.
4. The method according to claim 1 or 2, wherein the wifi information includes wifi channel identifiers and wifi channel bandwidths, and the first terminal device calculates a target channel according to the wifi information, including:
and the first terminal equipment calculates a target channel according to the plurality of wifi channel identifications and the plurality of wifi channel bandwidths.
5. The method of claim 1 or 2, wherein the wifi information comprises wifi channel identifiers, wifi channel bandwidths, and wifi signal strengths, and the first terminal device calculates the target channel according to the wifi information, comprising:
and the first terminal equipment calculates a target channel according to the plurality of wifi channel identifications, the plurality of wifi channel bandwidths and a plurality of wifi signal strengths.
6. The method according to claim 1 or 2, wherein the first terminal device calculates a target channel according to the wifi information, and comprises:
and the first terminal equipment selects the channel with the minimum utilization rate as a target channel according to the plurality of wifi information.
7. The method according to claim 1 or 2, characterized in that the method further comprises:
and under the condition that the second terminal equipment is connected with the first terminal equipment through the wifi hotspot, the first terminal equipment responds to the operation of data transmission of the user and sends data to the second terminal equipment.
8. A terminal device, comprising:
the system comprises an acquisition module, a processing module and a display module, wherein the acquisition module is used for scanning a plurality of wireless fidelity wifi of the surrounding environment and acquiring a plurality of wifi information;
the processing module is used for calculating a target channel according to the wifi information; and creating a wifi hotspot according to the target channel, wherein the wifi hotspot is used for connecting the first terminal device and the second terminal device.
9. A terminal device, comprising:
a memory storing executable program code;
a processor coupled with the memory;
the processor is used for scanning a plurality of wireless fidelity wifi of the surrounding environment to acquire a plurality of wifi information; calculating a target channel according to the plurality of wifi information; and creating a wifi hotspot according to the target channel, wherein the wifi hotspot is used for connecting the first terminal device and the second terminal device.
10. A computer-readable storage medium comprising instructions that, when executed on a processor, cause the processor to perform the method of any of claims 1-7.
CN202111596476.2A 2021-12-24 2021-12-24 Switching connection method, terminal device and storage medium Pending CN114286424A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111596476.2A CN114286424A (en) 2021-12-24 2021-12-24 Switching connection method, terminal device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111596476.2A CN114286424A (en) 2021-12-24 2021-12-24 Switching connection method, terminal device and storage medium

Publications (1)

Publication Number Publication Date
CN114286424A true CN114286424A (en) 2022-04-05

Family

ID=80875508

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111596476.2A Pending CN114286424A (en) 2021-12-24 2021-12-24 Switching connection method, terminal device and storage medium

Country Status (1)

Country Link
CN (1) CN114286424A (en)

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103079213A (en) * 2012-12-11 2013-05-01 清华大学 Large-scale wireless local area network channel plan method based on network evaluation strategy
WO2013066314A1 (en) * 2011-11-01 2013-05-10 Thomson Licensing Profiling wi-fi channel congestion and interference to optimize channel selection
EP3001749A1 (en) * 2014-09-24 2016-03-30 Alcatel Lucent Selection of an operation channel in a wireless network according to interference information
CN106332058A (en) * 2016-10-19 2017-01-11 广东欧珀移动通信有限公司 A data transmission method and terminal equipment
CN106921961A (en) * 2017-01-25 2017-07-04 北京奇虎科技有限公司 Data transmission method, device and mobile terminal between a kind of different system
CN107124714A (en) * 2017-04-13 2017-09-01 北京珠穆朗玛移动通信有限公司 Data transmission method for uplink and data send terminal
CN107395297A (en) * 2017-07-07 2017-11-24 广州视源电子科技股份有限公司 Channel selection method, system and storage medium for WiFi hotspot
US20180035434A1 (en) * 2016-07-28 2018-02-01 GM Global Technology Operations LLC Method for interference management in vehicles with multiple vehicle hotspots
CN108174449A (en) * 2018-01-11 2018-06-15 上海展扬通信技术有限公司 Router channels setting method, device and computer readable storage medium
CN108770068A (en) * 2018-06-04 2018-11-06 Oppo广东移动通信有限公司 WIFI frequency band selection method and device, storage medium and electronic equipment
CN110312274A (en) * 2019-07-30 2019-10-08 维沃移动通信有限公司 A kind of method for building up and electronic equipment of wireless access point
US10602462B1 (en) * 2018-11-30 2020-03-24 International Business Machines Corporation Hotspot channel congestion mitigation
CN112166639A (en) * 2019-09-20 2021-01-01 深圳市大疆创新科技有限公司 Method for determining communication channel, communication device and storage medium
CN112383950A (en) * 2020-10-26 2021-02-19 深圳Tcl新技术有限公司 Channel selection method and device, terminal equipment and readable storage medium

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013066314A1 (en) * 2011-11-01 2013-05-10 Thomson Licensing Profiling wi-fi channel congestion and interference to optimize channel selection
CN103079213A (en) * 2012-12-11 2013-05-01 清华大学 Large-scale wireless local area network channel plan method based on network evaluation strategy
EP3001749A1 (en) * 2014-09-24 2016-03-30 Alcatel Lucent Selection of an operation channel in a wireless network according to interference information
US20180035434A1 (en) * 2016-07-28 2018-02-01 GM Global Technology Operations LLC Method for interference management in vehicles with multiple vehicle hotspots
CN106332058A (en) * 2016-10-19 2017-01-11 广东欧珀移动通信有限公司 A data transmission method and terminal equipment
CN106921961A (en) * 2017-01-25 2017-07-04 北京奇虎科技有限公司 Data transmission method, device and mobile terminal between a kind of different system
CN107124714A (en) * 2017-04-13 2017-09-01 北京珠穆朗玛移动通信有限公司 Data transmission method for uplink and data send terminal
CN107395297A (en) * 2017-07-07 2017-11-24 广州视源电子科技股份有限公司 Channel selection method, system and storage medium for WiFi hotspot
CN108174449A (en) * 2018-01-11 2018-06-15 上海展扬通信技术有限公司 Router channels setting method, device and computer readable storage medium
CN108770068A (en) * 2018-06-04 2018-11-06 Oppo广东移动通信有限公司 WIFI frequency band selection method and device, storage medium and electronic equipment
US10602462B1 (en) * 2018-11-30 2020-03-24 International Business Machines Corporation Hotspot channel congestion mitigation
CN110312274A (en) * 2019-07-30 2019-10-08 维沃移动通信有限公司 A kind of method for building up and electronic equipment of wireless access point
CN112166639A (en) * 2019-09-20 2021-01-01 深圳市大疆创新科技有限公司 Method for determining communication channel, communication device and storage medium
CN112383950A (en) * 2020-10-26 2021-02-19 深圳Tcl新技术有限公司 Channel selection method and device, terminal equipment and readable storage medium

Similar Documents

Publication Publication Date Title
CN106301462B (en) Radio frequency control circuit and mobile terminal
CN106714103B (en) A kind of network positioning method and terminal device
CN107040610B (en) Data synchronization method, device, storage medium, terminal and server
CN110247692B (en) Path switching method, path switching device, electronic device and readable storage medium
CN107172671B (en) A channel switching method, device, storage medium and terminal
WO2018120905A1 (en) Message reminding method for terminal, and terminal
CN106658354B (en) Data transmission method and equipment
CN104683456A (en) Service processing method, server and terminal
CN106982097A (en) Radio frequency interference elimination method, device, storage medium and terminal
CN106714207A (en) An information processing method and terminal device
CN110311704A (en) Antenna switching method and related products
CN110224719A (en) Communication control method and Related product
CN106454810A (en) A method and terminal equipment for establishing a hotspot
CN106658623A (en) Hotspot network switching method and terminal equipment
CN106658353A (en) A data migration method and terminal equipment
CN106445739B (en) Data migration method and terminal equipment
WO2022227872A1 (en) Method for optimizing inter-system transformation, terminal device, and storage medium
CN111314900B (en) Wireless connection method, wireless connection device and mobile terminal
CN106454975A (en) Hotspot network switching method and terminal equipment
CN110212965B (en) Antenna switching method and related product
CN106714279A (en) A hotspot network switching method and terminal equipment
EP4130983B1 (en) Method and apparatus for installing application program, and terminal device and storage medium
CN106792434B (en) Hotspot establishing method and terminal equipment
CN108462994A (en) The channel selecting method and Related product of personal hot spot
CN112135321B (en) Channel switching method and related product

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20220405

RJ01 Rejection of invention patent application after publication